TaiApp facade.
One Protocol per feature (see tai42_contract.app.facets), composed into
a single TaiApp protocol that exposes them as namespaces (app.tools,
app.agents, …). The app members are partitioned across the
sub-protocols — each lives in exactly one, save the shared leaf names
store (versioning + presets) and register/get
(webhook_verifiers + channels). The runtime forwarding handle is
tai42_app (see tai42_contract.app.handle).
AppAdmin
tai42_contract.app.facets.AppAdmin
Members
reload_mcp
tai42_contract.app.facets.AppAdmin.reload_mcp
deregister_mcp
tai42_contract.app.facets.AppAdmin.deregister_mcp
reload_config
tai42_contract.app.facets.AppAdmin.reload_config
tool_reloader
tai42_contract.app.facets.AppAdmin.tool_reloader
(action, name) -> dict reloader for kind.
Parameters
run_tool_reload
tai42_contract.app.facets.AppAdmin.run_tool_reload
reload_failed_mcps
tai42_contract.app.facets.AppAdmin.reload_failed_mcps
list_failed_mcps
tai42_contract.app.facets.AppAdmin.list_failed_mcps
live_mcp_status
tai42_contract.app.facets.AppAdmin.live_mcp_status
AppAgents
tai42_contract.app.facets.AppAgents
Members
agent
tai42_contract.app.facets.AppAgents.agent
Agent subclass under name and auto-register
its JSON run tool.
The decorator returns the class unchanged, so the decorated symbol keeps
its concrete subclass type.
Parameters
get_agent
tai42_contract.app.facets.AppAgents.get_agent
all_agents
tai42_contract.app.facets.AppAgents.all_agents
AppBackends
tai42_contract.app.facets.AppBackends
Members
register_backend
tai42_contract.app.facets.AppBackends.register_backend
AppBackup
tai42_contract.app.facets.AppBackup
name by supplying an exporter() that returns a JSON-safe payload and
an importer(payload) that applies it and returns a section report.
sections() lists the registered sections for the UI. export_section
/ import_section run one section’s exporter/importer by name and raise
loudly on an unknown name — never a silent no-op.
Members
register_section
tai42_contract.app.facets.AppBackup.register_section
sections
tai42_contract.app.facets.AppBackup.sections
export_section
tai42_contract.app.facets.AppBackup.export_section
import_section
tai42_contract.app.facets.AppBackup.import_section
AppChannels
tai42_contract.app.facets.AppChannels
Members
register
tai42_contract.app.facets.AppChannels.register
Channel under name.
A channel plugin calls this through the tai42_app handle when its
import-only channel_modules entry loads. Registering a name already
taken raises loudly — a silent overwrite could swap the medium a live
ask is delivered on.
Parameters
get
tai42_contract.app.facets.AppChannels.get
ask_user is called with channel=name,
BEFORE any interaction state is written, so an unknown name surfaces as
a loud failure, never a question silently delivered nowhere.
Parameters
names
tai42_contract.app.facets.AppChannels.names
AppClients
tai42_contract.app.facets.AppClients
Members
client_ctx
tai42_contract.app.facets.AppClients.client_ctx
fresh=True). settings is a kit
ClientSettings whose client_kwargs() supplies the connection key.
Parameters
shutdown_clients
tai42_contract.app.facets.AppClients.shutdown_clients
AppConfig
tai42_contract.app.facets.AppConfig
AppConnectors
tai42_contract.app.facets.AppConnectors
Members
register_connector
tai42_contract.app.facets.AppConnectors.register_connector
tai42_app handle when the manifest
loads it (a connector is pure data, so this is a plain call, not a decorator).
Parameters
token_store
tai42_contract.app.facets.AppConnectors.token_store
connection_id).
AppExtensions
tai42_contract.app.facets.AppExtensions
Members
extension
tai42_contract.app.facets.AppExtensions.extension
name (default: the
function’s own name); usable bare or with arguments.
requires_body_locality marks an extension whose wrapper only works
in the process running the tool body it wraps — e.g. a proxy layer that
routes the body’s egress through a task-scoped contextvar, visible only
where the body executes. The flag is stored as registration metadata the
apply site reads to order a stacked combo: a locality-requiring
extension must bind INSIDE any execution-relocating extension
(ExtensionKind.relocates_execution), so its wrapper travels with the
body to the worker. Bound outside a relocating layer, the wrapper stays
behind in the submitting process and silently does not apply.
Parameters
available_extensions
tai42_contract.app.facets.AppExtensions.available_extensions
[{"name", "kind"}].
AppHttp
tai42_contract.app.facets.AppHttp
Members
middleware
tai42_contract.app.facets.AppHttp.middleware
custom_route
tai42_contract.app.facets.AppHttp.custom_route
summary— a one-line operation summary (required, non-empty).tags— at least one OpenAPI tag grouping the route (required).response_model— the pydantic model wrapped in the{"data": ...}success envelope, orNoneas the explicit opaque marker for a route with no structured response. Required — there is no default, so a route cannot silently omit it.request_model— the pydantic model of the request body; required for any route that reads a body, omitted (None) otherwise.authed— whether the route requires the api key (defaultTrue); emitted as thesecurityrequirement.
503 response is derived from the handler body.
Parameters
AppLifecycle
tai42_contract.app.facets.AppLifecycle
Members
on_startup
tai42_contract.app.facets.AppLifecycle.on_startup
on_shutdown
tai42_contract.app.facets.AppLifecycle.on_shutdown
on_reload
tai42_contract.app.facets.AppLifecycle.on_reload
reload_config) —
e.g. dynamic tool loaders that on_startup ran once.
Parameters
on_fleet_op_applied
tai42_contract.app.facets.AppLifecycle.on_fleet_op_applied
wait_until_ready
tai42_contract.app.facets.AppLifecycle.wait_until_ready
AppMonitoring
tai42_contract.app.facets.AppMonitoring
Members
register_monitoring
tai42_contract.app.facets.AppMonitoring.register_monitoring
active
tai42_contract.app.facets.AppMonitoring.active
AppPresets
tai42_contract.app.facets.AppPresets
app.presets) — the typed view + the bind kernel.
store is the PresetStore-typed view over
app.versioning.store (kind="preset"). bind is the kernel BOTH tiers
(ephemeral and versioned) build their live tool through, so its typed-schema
behavior reaches both.
Attributes
Members
bind
tai42_contract.app.facets.AppPresets.bind
base_tool as a new named tool.
Built in ONE Tool.from_tool call: each fixed_kwargs key is baked as
a HIDDEN, FIXED constant (removed from the exposed schema; a caller that
passes it is rejected — it cannot be overridden at runtime) while the
REMAINING arguments keep the base tool’s real typed schema (names, types,
descriptions). tags sets the transformed tool’s native tags. An
output_schema (an object JSON Schema) is baked into an agent base’s
response_format (forcing structured output) or advertised + validated on
a plain tool base. bind is async because it must resolve the base
Tool object (via app.tools.get_tool(base_tool)) to feed the
transform.
Parameters
AppStorage
tai42_contract.app.facets.AppStorage
Members
register_storage
tai42_contract.app.facets.AppStorage.register_storage
resource_manager
tai42_contract.app.facets.AppStorage.resource_manager
AppSubApp
tai42_contract.app.facets.AppSubApp
AppTools
tai42_contract.tools.AppTools
Members
tool_title
tai42_contract.tools.AppTools.tool_title
get_tool
tai42_contract.tools.AppTools.get_tool
get_tools
tai42_contract.tools.AppTools.get_tools
get_client_tools
tai42_contract.tools.AppTools.get_client_tools
run_tool
tai42_contract.tools.AppTools.run_tool
remove_tool
tai42_contract.tools.AppTools.remove_tool
register_tool_info
tai42_contract.tools.AppTools.register_tool_info
unregister_tool_info
tai42_contract.tools.AppTools.unregister_tool_info
unregister_tool_base
tai42_contract.tools.AppTools.unregister_tool_base
AppVersioning
tai42_contract.app.facets.AppVersioning
app.versioning).
This is the platform persistence primitive — append-only versions + an active
pointer + rollback over an opaque JSONB body, discriminated by kind. Direct
consumers (e.g. AC policies under kind="ac_policy") reach it here; presets
reach it through AppPresets, never as a new kind.
Attributes
AppWebhookVerifiers
tai42_contract.app.facets.AppWebhookVerifiers
Members
register
tai42_contract.app.facets.AppWebhookVerifiers.register
WebhookVerifier under name.
A provider plugin calls this through the tai42_app handle when its
import-only webhook_verifier_modules entry loads. Registering a name
already taken raises loudly — a silent overwrite could swap a topic’s
verifier out from under a live binding.
Parameters
get
tai42_contract.app.facets.AppWebhookVerifiers.get
TaiApp
tai42_contract.app.TaiApp
tai42_app
tai42_contract.app.tai42_app
AppAgents
tai42_contract.app.facets.AppAgents
Members
agent
tai42_contract.app.facets.AppAgents.agent
Agent subclass under name and auto-register
its JSON run tool.
The decorator returns the class unchanged, so the decorated symbol keeps
its concrete subclass type.
Parameters
get_agent
tai42_contract.app.facets.AppAgents.get_agent
all_agents
tai42_contract.app.facets.AppAgents.all_agents
AppBackends
tai42_contract.app.facets.AppBackends
Members
register_backend
tai42_contract.app.facets.AppBackends.register_backend
AppStorage
tai42_contract.app.facets.AppStorage
Members
register_storage
tai42_contract.app.facets.AppStorage.register_storage
resource_manager
tai42_contract.app.facets.AppStorage.resource_manager
AppMonitoring
tai42_contract.app.facets.AppMonitoring
Members
register_monitoring
tai42_contract.app.facets.AppMonitoring.register_monitoring
active
tai42_contract.app.facets.AppMonitoring.active
AppExtensions
tai42_contract.app.facets.AppExtensions
Members
extension
tai42_contract.app.facets.AppExtensions.extension
name (default: the
function’s own name); usable bare or with arguments.
requires_body_locality marks an extension whose wrapper only works
in the process running the tool body it wraps — e.g. a proxy layer that
routes the body’s egress through a task-scoped contextvar, visible only
where the body executes. The flag is stored as registration metadata the
apply site reads to order a stacked combo: a locality-requiring
extension must bind INSIDE any execution-relocating extension
(ExtensionKind.relocates_execution), so its wrapper travels with the
body to the worker. Bound outside a relocating layer, the wrapper stays
behind in the submitting process and silently does not apply.
Parameters
available_extensions
tai42_contract.app.facets.AppExtensions.available_extensions
[{"name", "kind"}].
AppWebhookVerifiers
tai42_contract.app.facets.AppWebhookVerifiers
Members
register
tai42_contract.app.facets.AppWebhookVerifiers.register
WebhookVerifier under name.
A provider plugin calls this through the tai42_app handle when its
import-only webhook_verifier_modules entry loads. Registering a name
already taken raises loudly — a silent overwrite could swap a topic’s
verifier out from under a live binding.
Parameters
get
tai42_contract.app.facets.AppWebhookVerifiers.get
AppChannels
tai42_contract.app.facets.AppChannels
Members
register
tai42_contract.app.facets.AppChannels.register
Channel under name.
A channel plugin calls this through the tai42_app handle when its
import-only channel_modules entry loads. Registering a name already
taken raises loudly — a silent overwrite could swap the medium a live
ask is delivered on.
Parameters
get
tai42_contract.app.facets.AppChannels.get
ask_user is called with channel=name,
BEFORE any interaction state is written, so an unknown name surfaces as
a loud failure, never a question silently delivered nowhere.
Parameters
names
tai42_contract.app.facets.AppChannels.names
AppConnectors
tai42_contract.app.facets.AppConnectors
Members
register_connector
tai42_contract.app.facets.AppConnectors.register_connector
tai42_app handle when the manifest
loads it (a connector is pure data, so this is a plain call, not a decorator).
Parameters
token_store
tai42_contract.app.facets.AppConnectors.token_store
connection_id).
AppHttp
tai42_contract.app.facets.AppHttp
Members
middleware
tai42_contract.app.facets.AppHttp.middleware
custom_route
tai42_contract.app.facets.AppHttp.custom_route
summary— a one-line operation summary (required, non-empty).tags— at least one OpenAPI tag grouping the route (required).response_model— the pydantic model wrapped in the{"data": ...}success envelope, orNoneas the explicit opaque marker for a route with no structured response. Required — there is no default, so a route cannot silently omit it.request_model— the pydantic model of the request body; required for any route that reads a body, omitted (None) otherwise.authed— whether the route requires the api key (defaultTrue); emitted as thesecurityrequirement.
503 response is derived from the handler body.
Parameters
AppClients
tai42_contract.app.facets.AppClients
Members
client_ctx
tai42_contract.app.facets.AppClients.client_ctx
fresh=True). settings is a kit
ClientSettings whose client_kwargs() supplies the connection key.
Parameters
shutdown_clients
tai42_contract.app.facets.AppClients.shutdown_clients
AppLifecycle
tai42_contract.app.facets.AppLifecycle
Members
on_startup
tai42_contract.app.facets.AppLifecycle.on_startup
on_shutdown
tai42_contract.app.facets.AppLifecycle.on_shutdown
on_reload
tai42_contract.app.facets.AppLifecycle.on_reload
reload_config) —
e.g. dynamic tool loaders that on_startup ran once.
Parameters
on_fleet_op_applied
tai42_contract.app.facets.AppLifecycle.on_fleet_op_applied
wait_until_ready
tai42_contract.app.facets.AppLifecycle.wait_until_ready
AppAdmin
tai42_contract.app.facets.AppAdmin
Members
reload_mcp
tai42_contract.app.facets.AppAdmin.reload_mcp
deregister_mcp
tai42_contract.app.facets.AppAdmin.deregister_mcp
reload_config
tai42_contract.app.facets.AppAdmin.reload_config
tool_reloader
tai42_contract.app.facets.AppAdmin.tool_reloader
(action, name) -> dict reloader for kind.
Parameters
run_tool_reload
tai42_contract.app.facets.AppAdmin.run_tool_reload
reload_failed_mcps
tai42_contract.app.facets.AppAdmin.reload_failed_mcps
list_failed_mcps
tai42_contract.app.facets.AppAdmin.list_failed_mcps
live_mcp_status
tai42_contract.app.facets.AppAdmin.live_mcp_status
AppConfig
tai42_contract.app.facets.AppConfig
AppBackup
tai42_contract.app.facets.AppBackup
name by supplying an exporter() that returns a JSON-safe payload and
an importer(payload) that applies it and returns a section report.
sections() lists the registered sections for the UI. export_section
/ import_section run one section’s exporter/importer by name and raise
loudly on an unknown name — never a silent no-op.
Members
register_section
tai42_contract.app.facets.AppBackup.register_section
sections
tai42_contract.app.facets.AppBackup.sections
export_section
tai42_contract.app.facets.AppBackup.export_section
import_section
tai42_contract.app.facets.AppBackup.import_section
AppSubApp
tai42_contract.app.facets.AppSubApp
AppVersioning
tai42_contract.app.facets.AppVersioning
app.versioning).
This is the platform persistence primitive — append-only versions + an active
pointer + rollback over an opaque JSONB body, discriminated by kind. Direct
consumers (e.g. AC policies under kind="ac_policy") reach it here; presets
reach it through AppPresets, never as a new kind.
Attributes
AppPresets
tai42_contract.app.facets.AppPresets
app.presets) — the typed view + the bind kernel.
store is the PresetStore-typed view over
app.versioning.store (kind="preset"). bind is the kernel BOTH tiers
(ephemeral and versioned) build their live tool through, so its typed-schema
behavior reaches both.
Attributes
Members
bind
tai42_contract.app.facets.AppPresets.bind
base_tool as a new named tool.
Built in ONE Tool.from_tool call: each fixed_kwargs key is baked as
a HIDDEN, FIXED constant (removed from the exposed schema; a caller that
passes it is rejected — it cannot be overridden at runtime) while the
REMAINING arguments keep the base tool’s real typed schema (names, types,
descriptions). tags sets the transformed tool’s native tags. An
output_schema (an object JSON Schema) is baked into an agent base’s
response_format (forcing structured output) or advertised + validated on
a plain tool base. bind is async because it must resolve the base
Tool object (via app.tools.get_tool(base_tool)) to feed the
transform.
Parameters

