aeat.application.operator_surface._manifest module

Operator-surface manifest: the agent-facing capability catalogue.

Projects the backend-owned OperatorSurfaceContract together with the CLI’s registered JSON command-result schema keys into a single machine-readable OperatorSurfaceManifest. This is the capability catalogue an LLM operator reads to learn the two-root command tree, each command family’s intent and OperatorMutability, the modelo CALCULATE -> VERIFY -> FILE lifecycle, and the per-command result-schema reference. It is also the natural source a tool-exposure server consumes for its tool list.

The contract half is owned here in the application layer. The command_schemas half is the CLI’s own --json result-schema registry, an entrypoint-layer concern; the CLI adapter enumerates it and injects it into build_operator_surface_manifest(), so this module never imports the CLI schema registry and the hexagonal direction is preserved.

class CommandSchemaRef(**data)[source]

Bases: BaseModel

One registered command-path to result-schema reference.

command is a stable SCHEMA_REGISTRY key (e.g. "modelo.calculate"); schema_name is the registered OutputSchema subclass name an operator (or a tool-exposure server) resolves to read the command’s result shape.

Parameters:
  • command (str)

  • schema_name (str)

command: str
schema_name: str
class OperatorSurfaceManifest(**data)[source]

Bases: BaseModel

Agent-facing capability catalogue over the operator surface.

Wraps the immutable OperatorSurfaceContract (roots, mounted command families with their mutability and intent, modelo lifecycle, source-kind taxonomy, service owners) and the CLI’s registered result-schema references. An LLM operator reads one manifest to discover what the CLI can do, which verbs mutate state, and where each command’s result schema lives, instead of scraping --help.

Parameters:
manifest_version: str
envelope_schema_version: str
contract: OperatorSurfaceContract
command_schemas: tuple[CommandSchemaRef, ...]
build_operator_surface_manifest(*, envelope_schema_version, command_schemas)[source]

Build the OperatorSurfaceManifest from the cached contract.

The contract is read from get_operator_surface_contract(). The envelope_schema_version and command_schemas are supplied by the CLI adapter, which owns the JSON-contract registry; this keeps the application layer free of any dependency on the entrypoint package.

Parameters:
  • envelope_schema_version (str) – The shared CLI envelope contract version (ENVELOPE_SCHEMA_VERSION) the manifest documents.

  • command_schemas (tuple[CommandSchemaRef, ...]) – The registered command-path to result-schema references, enumerated by the CLI from its schema registry.

Return type:

OperatorSurfaceManifest

Returns:

The validated OperatorSurfaceManifest.