Skip to content

cayu.tools.structured_commands

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu.tools import RUN_COMMAND_RESULT_SCHEMA
RUN_COMMAND_RESULT_SCHEMA = 'cayu.run_command_result.v1'

Release source · Runtime guarantees · Capability guides

from cayu.tools import RunCommandTool

Run one bounded structured command selected from an admitted toolchain profile.

Bases: Tool.

RunCommandTool.__init__(*, toolchain_profile: DockerCodingToolchainProfile) -> None
RunCommandTool.name() -> str
RunCommandTool.execution_profile_identity() -> ExecutionProfileBehaviorIdentity | None

Return the stable behavior declaration frozen with this tool’s spec.

RunCommandTool.retain_arguments_for_model() -> bool

Retain bounded redacted original inputs privately for the same profile.

Independent of audit publication; oversized and compacted-away inputs may be omitted. This does not grant knowledge read or activation rights.

RunCommandTool.description() -> str
RunCommandTool.schema() -> dict[str, Any]
async RunCommandTool.run(ctx: ToolContext, args: dict) -> ToolResult
RunCommandTool.toolchain_profile() -> DockerCodingToolchainProfile
RunCommandTool.selectors() -> tuple[DockerCodingCommandAuthority, ...]
RunCommandTool.command_policy() -> CommandPolicy

Return the exact identity-bearing policy for the complete selector catalogue.

async RunCommandTool.reconcile_durable_tool_call(*, parent_session_id: str, parent_run_epoch: int, execution_profile_fingerprint: str | None, environment_name: str | None, environment_allocation_fingerprint: str | None, model_step_id: str, model_attempt_id: str, tool_round_id: str, tool_call_id: str, idempotency_key: str, arguments: dict[str, Any], started: bool, load_operation: Callable[[str], Awaitable[dict[str, Any] | None]], recovery_authority: DurableToolRecoveryAuthority | None=None) -> DurableToolRecoveryEvidence | None

Reconcile durable command evidence without ever replaying the command.

async RunCommandTool.inspect_durable_tool_call(*, identity: DurableToolRecoveryIdentity, load_operation, observe_receipt) -> bool

Release source · Runtime guarantees · Capability guides

from cayu.tools import STRUCTURED_COMMAND_TOOL_POLICY_SCHEMA
STRUCTURED_COMMAND_TOOL_POLICY_SCHEMA = 'cayu.structured_command_tool_policy.v1'

Release source · Runtime guarantees · Capability guides

from cayu.tools import StructuredCommandToolPolicy

Resolve structured commands before runtime policy and durable approval.

Bases: ToolPolicy.

StructuredCommandToolPolicy.execution_profile_identity() -> ExecutionProfileBehaviorIdentity | None
async StructuredCommandToolPolicy.authorize(request: ToolPolicyRequest) -> ToolPolicyResult
StructuredCommandToolPolicy.__init__(*, toolchain_profile: DockerCodingToolchainProfile, base_policy: ToolPolicy | None=None) -> None

Release source · Runtime guarantees · Capability guides