aeat.entrypoints.mcp._resources module¶
Operating-layer resource templates: pull the harness by aeat:// URI.
ADR R4’s second delivery channel above the tools-only floor: MCP resource
templates aeat://skill/{name}, aeat://rule/{name} and
aeat://persona/{name} let a resources-capable client enumerate and pull the
shipped operating layer verbatim as text/markdown. The concrete resource set
and the read resolution are both DERIVED from the shipped aeat/_data/agent/
tree through the aeat.agent package facade (iter_skill_documents,
iter_operator_rules, iter_personas), never hand-listed, so a new skill,
rule, or persona ships as a new resource with zero registration and the surface
cannot drift from the data.
Like _tools / _meta_tools / _prompts, this module is SDK-independent
pure functions over typed models: _server adapts HarnessResourceRef
to the SDK Resource, HarnessResourceTemplate to ResourceTemplate,
and HarnessResourceContent to the read result, so this module imports
with or without the aeat-cli[agent] extra and is unit-tested directly.
- class HarnessResourceKind(*values)[source]¶
Bases:
StrEnumThe operating-layer resource categories, matching the URI authority.
SKILL/RULE/PERSONAenumerate the shipped agent tree;CORPUSis a template-only category resolving a citation id orcorpus_refto its verbatim bundled legal text (ADR R3).- SKILL¶
- RULE¶
- PERSONA¶
- CORPUS¶
- class HarnessResourceRef(**data)[source]¶
Bases:
BaseModelA concrete resource row for
resources/list- no body text.Listing advertises the addressable set; the body is fetched separately by
resources/read, so a ref carries only the URI, name, kind, and label.- Parameters:
uri (str)
name (str)
kind (HarnessResourceKind)
description (str)
mime_type (str)
- uri: str¶
- name: str¶
- kind: HarnessResourceKind¶
- description: str¶
- mime_type: str¶
- class HarnessResourceTemplate(**data)[source]¶
Bases:
BaseModelOne RFC 6570 resource template for
resources/templates/list.- Parameters:
uri_template (str)
name (str)
kind (HarnessResourceKind)
description (str)
mime_type (str)
- uri_template: str¶
- name: str¶
- kind: HarnessResourceKind¶
- description: str¶
- mime_type: str¶
- class HarnessResourceContent(**data)[source]¶
Bases:
BaseModelThe resolved
resources/readpayload: a ref plus its verbatim text.- Parameters:
ref (HarnessResourceRef)
text (str)
- ref: HarnessResourceRef¶
- text: str¶
- exception HarnessResourceNotFoundError[source]¶
Bases:
LookupErrorRaised when a
resources/readURI does not resolve to a shipped document.
- resource_uri(kind, name)[source]¶
Render the
aeat://<kind>/<name>URI for one operating-layer document.- Return type:
- Parameters:
kind (HarnessResourceKind)
name (str)
- list_harness_resources()[source]¶
Return every concrete operating-layer resource, kind-then-name ordered.
One row per shipped skill, operator rule, and persona - the addressable set a
resources/listadvertises.- Return type:
- Returns:
- list_harness_resource_templates()[source]¶
Return the three
aeat://<kind>/{name}resource templates.- Return type:
- Returns:
- read_harness_resource(uri)[source]¶
Resolve an
aeat://<kind>/<name>URI to its shipped document text.- Raises:
HarnessResourceNotFoundError – The URI is malformed or names a document that is not in the shipped tree.
- Return type:
- Returns:
- Parameters:
uri (str)