Documentation Index
Fetch the complete documentation index at: https://docs.skrmir.com/llms.txt
Use this file to discover all available pages before exploring further.
Gateway to Probe Command Contract v0
Scope
Defines the current executable v0 command contract that Gateway uses to send authorized intents to Probe in AIOS. This page covers the common command envelope, the current executable v0 command set, payload expectations, Probe-side validation, and the boundary between platform commands and DevBox-internal coding-tool activity. This is an executable freeze for the currently implemented subset. It does not reserve or promise additional future command types beyond what is listed here.Terminology
- Gateway: the sole control-plane authority for desired state, routing intent, approval, and lifecycle decisions.
- Probe: the host-side data-plane runtime that executes authorized commands against local Worker Sandbox and channel resources.
- Lease epoch: the fencing token that invalidates stale commands.
- Desired version: monotonically increasing desired-state revision issued by Gateway.
Normative Spec
Command Principles
Gateway-issued commands MUST follow these rules in v0:- Gateway is the only authoritative command source.
- Every command MUST be constrained by
lease_epoch. - Probe MUST execute authorized intent only and MUST NOT invent new desired state.
- Probe MUST treat
command_idas an idempotency key.
Common Command Envelope
All Gateway-to-Probe commands MUST include:command_idcommand_typeresource_idsession_iddesired_versionlease_epochdeadline_unixreasonpayload
approval_refsnapshot_refretry_count
Field Rules
command_idMUST be unique for idempotent execution tracking.command_typeMUST be one of the supported v0 command enums.resource_idMUST identify the local runtime target such as DevBox, Worker Sandbox, or runtime unit.desired_versionMUST be used by Probe to reject stale desired-state mutations.lease_epochMUST be used for fencing stale commands.deadline_unixMUST be enforced by Probe; expired commands MUST NOT execute.approval_refMAY appear for platform-level risky actions, but MUST NOT be used for DevBox-internal Codex, Claude Code, or OpenCode command approval.retry_countMAY be attached by Gateway as metadata for bounded recovery continuity and MUST NOT be treated as caller-owned policy input.
Current Executable v0 Command Set
Probe currently supports this executable v0 command set:StartSessionStopSessionAttachChannelDetachChannelReportHealth
Channel Command Rules
AttachChannelandDetachChannelMUST only target top-level channel typesssh_remoteordialog.- When
channel_type=ssh_remote,remote_modeMUST be present and MUST be eitheride_primaryorterminal_fallback. dialog.targetMAY be any supported v0 target such ascodex,claude_code,opencode,wechat, ortelegram.
Probe Validation Rules
Before execution, Probe MUST validate:command_id,session_id, andcommand_typeare present.deadline_unixhas not expired when provided.approval_refexists when the current command type requires platform-level approval.lease_epochis not older than the currently valid lease when leaseguard validation is applied.desired_versionis not older than the local known desired version when leaseguard validation is applied.
Approval and Authority Boundary
- Platform-level risky actions MAY require
approval_ref. - DevBox-internal coding-tool commands remain outside AIOS secondary approval.
- Scheduler-triggered execution MUST still materialize through this contract before Probe acts.
Examples
Error & Recovery
- Expired
deadline_unix: Probe MUST reject without side effects. - Stale
lease_epoch: Probe MUST reject as stale lease when leaseguard validation is active. - Older
desired_version: Probe MUST reject as stale desired intent when leaseguard validation is active. - Missing required envelope fields: Probe MUST reject as invalid command.
Security & Audit
- Commands MUST be auditable through metadata with
command_id,reason,lease_epoch, and correlation fields. - Gateway remains the sole authority for desired state and approval decisions.
- Probe validation is local enforcement, not policy authorship.
- Commands MUST NOT be used to backdoor approval for DevBox-internal coding-tool operations.
Status
Current status:active
Source discussions:
docs/maintainers/conversation-records/agent-platform/2026-03-24-gateway-to-probe-command-contract-v0-draft.mddocs/maintainers/conversation-records/agent-platform/2026-03-24-p0-freeze-result-accepted.mddocs/maintainers/conversation-records/agent-platform/2026-03-24-p1-freeze-result-accepted.md
Changelog
- 2026-03-24: Initial formal v0 contract created from frozen discussion draft.
- 2026-04-02: Narrowed the page to the currently executable v0 subset so it can be validated by repository-local contract checks.