Skip to main content
Manifest contract: Manifest, the *Config models, and the filter-predicate signatures. The *Config models include the transport config TaiMCPConfig. The impl methods that build the derived lookup maps and run the include/exclude filtering (model_post_init + the private _build_*/_should_include helpers) are logic and stay with the impl — only the field shape, the model validators, and the public predicate/query signatures are the contract.

MCP_TRANSPORT_BY_ADDRESS

tai42_contract.manifest.MCP_TRANSPORT_BY_ADDRESS

AgentsConfig

tai42_contract.manifest.AgentsConfig
An agents block: a module import path plus selection config. Agents carry no clip-on extensions, so an extensions key here is refused as an unknown key, like any other (BaseConfig’s extra="forbid"). Attributes

ApiToolsConfig

tai42_contract.manifest.ApiToolsConfig
Curates the MCP tool surface projected from the operations layer. A single app-owned block, so it carries no title and is deliberately NOT a BaseConfig subclass. include/exclude name operations to project or suppress; expose_destructive gates destructive-flagged operations; the extensions map (from the mixin) attaches extension combos to projected operations. Unlike BaseConfig, a name appearing in BOTH include and exclude is a loud validation error — this stricter rule is unique to this config and is never retrofitted onto other configs. Attributes

BaseConfig

tai42_contract.manifest.BaseConfig
Shared config fields: a title plus include/exclude selection lists. Attributes

ExtensionElement

tai42_contract.manifest.ExtensionElement

ExtensionsConfigMixin

tai42_contract.manifest.ExtensionsConfigMixin
Carries the extensions attachment map for config kinds that support clip-on extensions. Mixed into ToolsConfig and TaiMCPConfig. extensions maps a tool base-name to the extension combo(s) attached to it, applied AFTER selection and independent of include/exclude. The stored shape is always tool -> list-of-combos (dict[str, list[list[ExtensionElement]]]) so resolution reads ONE shape regardless of how the YAML was written; each combo element is an extension name or a {"name", "config"} mapping binding author config to it. The normalizing validator wraps a flat combo and rejects malformed input loudly. Attributes

Members

normalize_extensions

tai42_contract.manifest.ExtensionsConfigMixin.normalize_extensions
Normalize each value to a list of combos and reject malformed input loudly. No silent coercion. A flat combo value is a single combo and is wrapped ({weather: [chain]} -> {"weather": [["chain"]]}); a list-of-combos value is kept as multiple combos. A combo element is an extension name or a {"name", "config"} mapping (author-bound config). This enforces SHAPE only: it does NOT check that the extension names are registered (ExtensionRegistry’s job) or that the tool is selected (missing_tools’ job). Parameters

MCPConfig

tai42_contract.manifest.MCPConfig
Transport config for one MCP server: exactly one of url/uds/command. The address field that is set decides the transport. type is optional; when given it must name the transport of that address (http for url, uds for uds, stdio for command) — a disagreement is refused. Attributes

Members

normalize_args

tai42_contract.manifest.MCPConfig.normalize_args
Coerce a None args value to an empty list. Parameters

normalize_dict_values

tai42_contract.manifest.MCPConfig.normalize_dict_values
Coerce None to an empty dict and stringify values, failing loudly on a None value. Parameters

MCPTransport

tai42_contract.manifest.MCPTransport

Manifest

tai42_contract.manifest.Manifest
The whole application manifest: tool/agent/MCP blocks, module lists, and derived maps. Attributes

Members

should_include_tool

tai42_contract.manifest.Manifest.should_include_tool
Whether tool name from module survives the include/exclude filter. Also records the decision on the matching config. Parameters

should_include_agent

tai42_contract.manifest.Manifest.should_include_agent
Whether agent name from module survives the include/exclude filter. Parameters

should_include_mcp_tool

tai42_contract.manifest.Manifest.should_include_mcp_tool
Whether MCP tool name under title survives the include/exclude filter. Parameters

replace_mcp

tai42_contract.manifest.Manifest.replace_mcp
Swap the MCP rows and rebuild the derived maps (surgical reload). Parameters

live_manifest

tai42_contract.manifest.Manifest.live_manifest
A deep copy whose tools/agents/mcp reflect the live config maps. The maps are post-filter.

find_title

tai42_contract.manifest.Manifest.find_title
Map a module path to the owning tool config’s title (longest prefix). Parameters

TaiMCPConfig

tai42_contract.manifest.TaiMCPConfig
An MCP block: a transport config plus optional managed-connector binding. Attributes

Members

is_managed

tai42_contract.manifest.TaiMCPConfig.is_managed
Whether this MCP block is backed by a managed connector.

ToolsConfig

tai42_contract.manifest.ToolsConfig
A tools block: a module import path plus selection and extension config. Attributes

normalize_extension_element

tai42_contract.manifest.normalize_extension_element
Validate one combo member and return it in canonical form, raising ValueError when malformed. A non-empty str is an extension name with no bound config. A dict binds author config and must carry a non-empty string name (registration is checked later) and a config mapping, with no other keys. Parameters