plexus.documentation package
Plexus agent documentation knowledge base.
The plexus.documentation package owns the runtime view of the
agent-facing documentation tree. Markdown files under
documentation/agent/ carry YAML frontmatter that this package parses
into a structured index used by MCP.tools.tactus_runtime.execute
to back plexus.docs.list and plexus.docs.get.
- class plexus.documentation.Document(metadata: dict[str, Any], body: str, path: str)
Bases:
objectA single resolved documentation entry.
- __init__(metadata: dict[str, Any], body: str, path: str) None
- body: str
- property id: str
- metadata: dict[str, Any]
- path: str
- class plexus.documentation.DocumentationRepository(root_dir: str)
Bases:
objectIndex a documentation tree rooted at
root_dir.The repository is intentionally stateless beyond the root path; each
list_docsandget_doccall walks the tree fresh so updates on disk are immediately visible. The tree is small enough that this is fine in practice, and it keeps test isolation simple.- __init__(root_dir: str) None
- get_doc(doc_id: str) Document
Return the full document for
doc_id.Raises
InvalidDocumentationKeyErrorfor unsafe keys or for ids that do not resolve to an indexed file.
- list_docs(*, namespace: str | None = None) ListResult
Return metadata summaries for every indexable doc.
README.mdand_index.mdfiles are excluded from the listing. Files without frontmatter are reported underListResult.invalidinstead of raising, so a single bad file does not break the whole index.
- property root: str
- class plexus.documentation.InvalidDocumentationFile(path: str, reason: str)
Bases:
objectA markdown file that could not be indexed.
- __init__(path: str, reason: str) None
- path: str
- reason: str
- exception plexus.documentation.InvalidDocumentationKeyError
Bases:
ValueErrorRaised when a caller asks for a doc id that is unsafe or unknown.
- class plexus.documentation.ListResult(entries: list[dict[str, ~typing.Any]]=<factory>, invalid: list[InvalidDocumentationFile] = <factory>)
Bases:
objectResult of a
DocumentationRepository.list_docs()call.- __init__(entries: list[dict[str, ~typing.Any]]=<factory>, invalid: list[InvalidDocumentationFile] = <factory>) None
- entries: list[dict[str, Any]]
- invalid: list[InvalidDocumentationFile]