@intentic/sandbox-contract 1.430.0 → 1.432.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -5
- package/dist/app-routes/app-pages.d.ts +1 -0
- package/dist/app-routes/app-pages.d.ts.map +1 -1
- package/dist/app-routes/app-pages.js +1 -0
- package/dist/app-routes/app-pages.js.map +1 -1
- package/dist/app-routes/index.d.ts +1 -0
- package/dist/app-routes/index.d.ts.map +1 -1
- package/dist/app-routes/index.js +1 -0
- package/dist/app-routes/index.js.map +1 -1
- package/dist/app-routes/return-path.d.ts +2 -0
- package/dist/app-routes/return-path.d.ts.map +1 -0
- package/dist/app-routes/return-path.js +8 -0
- package/dist/app-routes/return-path.js.map +1 -0
- package/dist/briefs/agent-ask.d.ts +10 -0
- package/dist/briefs/agent-ask.d.ts.map +1 -0
- package/dist/briefs/agent-ask.js +2 -0
- package/dist/briefs/agent-ask.js.map +1 -0
- package/dist/{chores/extension-update.d.ts → briefs/extension-update-brief.d.ts} +1 -1
- package/dist/briefs/extension-update-brief.d.ts.map +1 -0
- package/dist/{chores/extension-update.js → briefs/extension-update-brief.js} +2 -2
- package/dist/briefs/extension-update-brief.js.map +1 -0
- package/dist/chores/digest.d.ts.map +1 -1
- package/dist/chores/digest.js.map +1 -1
- package/dist/chores/index.d.ts +2 -2
- package/dist/chores/index.d.ts.map +1 -1
- package/dist/chores/index.js +1 -1
- package/dist/chores/index.js.map +1 -1
- package/dist/chores/prompt.d.ts +1 -9
- package/dist/chores/prompt.d.ts.map +1 -1
- package/dist/chores/prompt.js +1 -1
- package/dist/chores/prompt.js.map +1 -1
- package/dist/chores/stack.d.ts.map +1 -1
- package/dist/chores/stack.js.map +1 -1
- package/dist/chores/verdict.d.ts.map +1 -1
- package/dist/chores/verdict.js.map +1 -1
- package/dist/chores/workspace-scope.d.ts +1 -3
- package/dist/chores/workspace-scope.d.ts.map +1 -1
- package/dist/chores/workspace-scope.js +1 -3
- package/dist/chores/workspace-scope.js.map +1 -1
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/accounts.contract.js +2 -0
- package/dist/contracts/accounts.contract.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +1226 -12
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +2665 -733
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +35 -5
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/automations.contract.d.ts +90 -8
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.js +1 -0
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +49 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +24 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/ci.contract.d.ts +222 -95
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/ci.contract.js +87 -26
- package/dist/contracts/ci.contract.js.map +1 -1
- package/dist/contracts/device-ci-runners.contract.d.ts +108 -0
- package/dist/contracts/device-ci-runners.contract.d.ts.map +1 -0
- package/dist/contracts/device-ci-runners.contract.js +56 -0
- package/dist/contracts/device-ci-runners.contract.js.map +1 -0
- package/dist/contracts/device-stacks.contract.d.ts +129 -0
- package/dist/contracts/device-stacks.contract.d.ts.map +1 -0
- package/dist/contracts/device-stacks.contract.js +66 -0
- package/dist/contracts/device-stacks.contract.js.map +1 -0
- package/dist/contracts/device.contract.d.ts +74 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +604 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +11 -2
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts +7 -0
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.d.ts +1097 -18
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/offload.contract.d.ts +25 -0
- package/dist/contracts/offload.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.d.ts +8 -0
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.js +6 -5
- package/dist/contracts/ports.contract.js.map +1 -1
- package/dist/contracts/remote.contract.d.ts +1 -0
- package/dist/contracts/remote.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +1203 -9
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +49 -2
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/runners.contract.d.ts +16 -0
- package/dist/contracts/runners.contract.d.ts.map +1 -0
- package/dist/contracts/runners.contract.js +15 -0
- package/dist/contracts/runners.contract.js.map +1 -0
- package/dist/contracts/safety.contract.d.ts.map +1 -1
- package/dist/contracts/safety.contract.js +1 -0
- package/dist/contracts/safety.contract.js.map +1 -1
- package/dist/contracts/seal.contract.d.ts +100 -0
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +15 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +27 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +159 -2
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +59 -42
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +19 -0
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/skills.contract.d.ts +6 -0
- package/dist/contracts/skills.contract.d.ts.map +1 -1
- package/dist/contracts/stack-grants.contract.d.ts +418 -0
- package/dist/contracts/stack-grants.contract.d.ts.map +1 -0
- package/dist/contracts/stack-grants.contract.js +46 -0
- package/dist/contracts/stack-grants.contract.js.map +1 -0
- package/dist/contracts/system.contract.d.ts +516 -69
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +26 -45
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/usage.contract.d.ts +3 -0
- package/dist/contracts/usage.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +0 -55
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +0 -19
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +615 -8
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +2 -2
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/agent-transcript.d.ts +159 -2
- package/dist/events/agent-transcript.d.ts.map +1 -1
- package/dist/events/agent-words.d.ts +5 -0
- package/dist/events/agent-words.d.ts.map +1 -1
- package/dist/events/agent-words.js +22 -2
- package/dist/events/agent-words.js.map +1 -1
- package/dist/events/child-news.d.ts +32 -0
- package/dist/events/child-news.d.ts.map +1 -0
- package/dist/events/child-news.js +171 -0
- package/dist/events/child-news.js.map +1 -0
- package/dist/events/prompt-origins.d.ts +42 -0
- package/dist/events/prompt-origins.d.ts.map +1 -1
- package/dist/events/prompt-origins.js +28 -0
- package/dist/events/prompt-origins.js.map +1 -1
- package/dist/events/refusal-incidents.d.ts +1 -0
- package/dist/events/refusal-incidents.d.ts.map +1 -1
- package/dist/events/refusal-incidents.js +42 -19
- package/dist/events/refusal-incidents.js.map +1 -1
- package/dist/events/requests.d.ts +14 -0
- package/dist/events/requests.d.ts.map +1 -1
- package/dist/events/requests.js +12 -0
- package/dist/events/requests.js.map +1 -1
- package/dist/events/system-events.d.ts +98 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/transcript.d.ts +799 -10
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +2 -1
- package/dist/events/transcript.js.map +1 -1
- package/dist/ids/conversation-ids.d.ts +1 -0
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js +2 -1
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/ids/project-id.d.ts.map +1 -1
- package/dist/ids/project-id.js +4 -4
- package/dist/ids/project-id.js.map +1 -1
- package/dist/ids/run-row-ids.d.ts +8 -0
- package/dist/ids/run-row-ids.d.ts.map +1 -0
- package/dist/ids/run-row-ids.js +32 -0
- package/dist/ids/run-row-ids.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/models/agent-catalog.d.ts.map +1 -1
- package/dist/models/agent-catalog.js +3 -2
- package/dist/models/agent-catalog.js.map +1 -1
- package/dist/models/agent-lanes.d.ts.map +1 -1
- package/dist/models/agent-lanes.js +4 -1
- package/dist/models/agent-lanes.js.map +1 -1
- package/dist/models/agent-runtimes.d.ts.map +1 -1
- package/dist/models/agent-runtimes.js +2 -2
- package/dist/models/agent-runtimes.js.map +1 -1
- package/dist/models/agent-standing.d.ts +6 -1
- package/dist/models/agent-standing.d.ts.map +1 -1
- package/dist/models/agent-standing.js +1 -0
- package/dist/models/agent-standing.js.map +1 -1
- package/dist/models/model-roles.d.ts +91 -37
- package/dist/models/model-roles.d.ts.map +1 -1
- package/dist/models/model-roles.js +106 -35
- package/dist/models/model-roles.js.map +1 -1
- package/dist/models/model-setups.d.ts +10 -8
- package/dist/models/model-setups.d.ts.map +1 -1
- package/dist/models/model-setups.js +15 -15
- package/dist/models/model-setups.js.map +1 -1
- package/dist/models/providers/provider-traits.d.ts +215 -0
- package/dist/models/providers/provider-traits.d.ts.map +1 -0
- package/dist/models/providers/provider-traits.js +60 -0
- package/dist/models/providers/provider-traits.js.map +1 -0
- package/dist/netd/browser-wire.d.ts +8 -0
- package/dist/netd/browser-wire.d.ts.map +1 -1
- package/dist/netd/browser-wire.js +5 -0
- package/dist/netd/browser-wire.js.map +1 -1
- package/dist/netd/generated/wire.d.ts +42 -1
- package/dist/netd/generated/wire.d.ts.map +1 -1
- package/dist/policy/admin/admin-grant.d.ts +21 -0
- package/dist/policy/admin/admin-grant.d.ts.map +1 -0
- package/dist/policy/admin/admin-grant.js +41 -0
- package/dist/policy/admin/admin-grant.js.map +1 -0
- package/dist/policy/approvals-execution.d.ts +5 -2
- package/dist/policy/approvals-execution.d.ts.map +1 -1
- package/dist/policy/approvals-execution.js +3 -4
- package/dist/policy/approvals-execution.js.map +1 -1
- package/dist/policy/batch-runs.d.ts +1 -1
- package/dist/policy/batch-runs.d.ts.map +1 -1
- package/dist/policy/batch-runs.js +2 -1
- package/dist/policy/batch-runs.js.map +1 -1
- package/dist/policy/capabilities/capability-kinds.d.ts +268 -0
- package/dist/policy/capabilities/capability-kinds.d.ts.map +1 -0
- package/dist/policy/capabilities/capability-kinds.js +47 -0
- package/dist/policy/capabilities/capability-kinds.js.map +1 -0
- package/dist/policy/command-classes.d.ts.map +1 -1
- package/dist/policy/command-classes.js +3 -1
- package/dist/policy/command-classes.js.map +1 -1
- package/dist/policy/device-programs.d.ts +79 -2
- package/dist/policy/device-programs.d.ts.map +1 -1
- package/dist/policy/device-programs.js +15 -16
- package/dist/policy/device-programs.js.map +1 -1
- package/dist/policy/message-limits.d.ts.map +1 -1
- package/dist/policy/message-limits.js.map +1 -1
- package/dist/policy/org-locks.d.ts +1 -1
- package/dist/policy/org-locks.d.ts.map +1 -1
- package/dist/policy/org-locks.js +1 -0
- package/dist/policy/org-locks.js.map +1 -1
- package/dist/policy/reserved-servers.d.ts.map +1 -1
- package/dist/policy/reserved-servers.js +5 -1
- package/dist/policy/reserved-servers.js.map +1 -1
- package/dist/policy/role-capability.d.ts.map +1 -1
- package/dist/policy/role-capability.js +2 -1
- package/dist/policy/role-capability.js.map +1 -1
- package/dist/policy/shell/command-normalise.d.ts +10 -0
- package/dist/policy/shell/command-normalise.d.ts.map +1 -0
- package/dist/policy/shell/command-normalise.js +153 -0
- package/dist/policy/shell/command-normalise.js.map +1 -0
- package/dist/policy/shell/workspace-root-exclude.d.ts +4 -0
- package/dist/policy/shell/workspace-root-exclude.d.ts.map +1 -0
- package/dist/policy/shell/workspace-root-exclude.js +4 -0
- package/dist/policy/shell/workspace-root-exclude.js.map +1 -0
- package/dist/protocol/doors/listener-protocol.d.ts +11 -0
- package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/listener-protocol.js +5 -0
- package/dist/protocol/doors/listener-protocol.js.map +1 -1
- package/dist/protocol/doors/loopback-proof.d.ts +8 -0
- package/dist/protocol/doors/loopback-proof.d.ts.map +1 -0
- package/dist/protocol/doors/loopback-proof.js +11 -0
- package/dist/protocol/doors/loopback-proof.js.map +1 -0
- package/dist/protocol/doors/pass-scopes.d.ts +4 -0
- package/dist/protocol/doors/pass-scopes.d.ts.map +1 -0
- package/dist/protocol/doors/pass-scopes.js +3 -0
- package/dist/protocol/doors/pass-scopes.js.map +1 -0
- package/dist/protocol/doors/runner-protocol.d.ts +187 -0
- package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/runner-protocol.js +48 -1
- package/dist/protocol/doors/runner-protocol.js.map +1 -1
- package/dist/protocol/doors/sandbox-pass.d.ts +19 -2
- package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -1
- package/dist/protocol/doors/sandbox-pass.js +42 -10
- package/dist/protocol/doors/sandbox-pass.js.map +1 -1
- package/dist/protocol/doors/webext-links.d.ts.map +1 -1
- package/dist/protocol/doors/webext-links.js.map +1 -1
- package/dist/protocol/member-reach.d.ts +6 -0
- package/dist/protocol/member-reach.d.ts.map +1 -1
- package/dist/protocol/member-reach.js +24 -0
- package/dist/protocol/member-reach.js.map +1 -1
- package/dist/protocol/peer-mcp-server.d.ts +2 -0
- package/dist/protocol/peer-mcp-server.d.ts.map +1 -1
- package/dist/protocol/peer-mcp-server.js +1 -0
- package/dist/protocol/peer-mcp-server.js.map +1 -1
- package/dist/protocol/raw/extension-protocol.d.ts +518 -0
- package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
- package/dist/protocol/raw/extension-protocol.js +276 -0
- package/dist/protocol/raw/extension-protocol.js.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +572 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +25 -2
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +245 -3
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +79 -36
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/protocol/route-meta.d.ts.map +1 -1
- package/dist/protocol/route-meta.js.map +1 -1
- package/dist/schemas/account-routes.d.ts +176 -0
- package/dist/schemas/account-routes.d.ts.map +1 -0
- package/dist/schemas/account-routes.js +73 -0
- package/dist/schemas/account-routes.js.map +1 -0
- package/dist/schemas/activity.d.ts.map +1 -1
- package/dist/schemas/activity.js.map +1 -1
- package/dist/schemas/agent-background.d.ts +48 -0
- package/dist/schemas/agent-background.d.ts.map +1 -0
- package/dist/schemas/agent-background.js +63 -0
- package/dist/schemas/agent-background.js.map +1 -0
- package/dist/schemas/agent-land.d.ts +7 -0
- package/dist/schemas/agent-land.d.ts.map +1 -1
- package/dist/schemas/agent-land.js +11 -0
- package/dist/schemas/agent-land.js.map +1 -1
- package/dist/schemas/agent.d.ts +4 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +4 -2
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +40 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +668 -17
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +16 -41
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/auto-approve.d.ts +12 -0
- package/dist/schemas/auto-approve.d.ts.map +1 -0
- package/dist/schemas/auto-approve.js +12 -0
- package/dist/schemas/auto-approve.js.map +1 -0
- package/dist/schemas/automations.d.ts +170 -27
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +26 -34
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/bridge-heads.d.ts +57 -0
- package/dist/schemas/bridge-heads.d.ts.map +1 -0
- package/dist/schemas/bridge-heads.js +22 -0
- package/dist/schemas/bridge-heads.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +21 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +6 -0
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/checkout-hooks.d.ts +24 -0
- package/dist/schemas/checkout-hooks.d.ts.map +1 -0
- package/dist/schemas/checkout-hooks.js +23 -0
- package/dist/schemas/checkout-hooks.js.map +1 -0
- package/dist/schemas/ci-deployments.d.ts +30 -0
- package/dist/schemas/ci-deployments.d.ts.map +1 -0
- package/dist/schemas/ci-deployments.js +18 -0
- package/dist/schemas/ci-deployments.js.map +1 -0
- package/dist/schemas/ci-fleet.d.ts +216 -0
- package/dist/schemas/ci-fleet.d.ts.map +1 -0
- package/dist/schemas/ci-fleet.js +87 -0
- package/dist/schemas/ci-fleet.js.map +1 -0
- package/dist/schemas/ci.d.ts +348 -21
- package/dist/schemas/ci.d.ts.map +1 -1
- package/dist/schemas/ci.js +110 -19
- package/dist/schemas/ci.js.map +1 -1
- package/dist/schemas/command-run.d.ts +29 -0
- package/dist/schemas/command-run.d.ts.map +1 -0
- package/dist/schemas/command-run.js +20 -0
- package/dist/schemas/command-run.js.map +1 -0
- package/dist/schemas/connection-hub.d.ts +3 -1
- package/dist/schemas/connection-hub.d.ts.map +1 -1
- package/dist/schemas/connection-hub.js +2 -1
- package/dist/schemas/connection-hub.js.map +1 -1
- package/dist/schemas/context-continues.d.ts.map +1 -1
- package/dist/schemas/context-continues.js +2 -2
- package/dist/schemas/context-continues.js.map +1 -1
- package/dist/schemas/data-protection.d.ts +15 -2
- package/dist/schemas/data-protection.d.ts.map +1 -1
- package/dist/schemas/data-protection.js +15 -23
- package/dist/schemas/data-protection.js.map +1 -1
- package/dist/schemas/device-stacks.d.ts +131 -0
- package/dist/schemas/device-stacks.d.ts.map +1 -1
- package/dist/schemas/device-stacks.js +81 -0
- package/dist/schemas/device-stacks.js.map +1 -1
- package/dist/schemas/devices.d.ts +137 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +11 -2
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/environment.d.ts +1 -0
- package/dist/schemas/environment.d.ts.map +1 -1
- package/dist/schemas/environment.js +1 -0
- package/dist/schemas/environment.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +1186 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js +22 -4
- package/dist/schemas/extension-updates.js.map +1 -1
- package/dist/schemas/git/git.d.ts +13 -0
- package/dist/schemas/git/git.d.ts.map +1 -1
- package/dist/schemas/git/git.js +7 -7
- package/dist/schemas/git/git.js.map +1 -1
- package/dist/schemas/git/index-run.d.ts +1 -0
- package/dist/schemas/git/index-run.d.ts.map +1 -1
- package/dist/schemas/host-power.d.ts +76 -0
- package/dist/schemas/host-power.d.ts.map +1 -0
- package/dist/schemas/host-power.js +101 -0
- package/dist/schemas/host-power.js.map +1 -0
- package/dist/schemas/hosts.d.ts +365 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +33 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/issues.d.ts +55 -225
- package/dist/schemas/issues.d.ts.map +1 -1
- package/dist/schemas/issues.js +21 -43
- package/dist/schemas/issues.js.map +1 -1
- package/dist/schemas/keyring-native.d.ts.map +1 -1
- package/dist/schemas/keyring-native.js +3 -1
- package/dist/schemas/keyring-native.js.map +1 -1
- package/dist/schemas/keyring.d.ts +1 -0
- package/dist/schemas/keyring.d.ts.map +1 -1
- package/dist/schemas/keyring.js +3 -1
- package/dist/schemas/keyring.js.map +1 -1
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/members.d.ts.map +1 -1
- package/dist/schemas/members.js +2 -14
- package/dist/schemas/members.js.map +1 -1
- package/dist/schemas/metrics.d.ts +33 -0
- package/dist/schemas/metrics.d.ts.map +1 -1
- package/dist/schemas/metrics.js +26 -0
- package/dist/schemas/metrics.js.map +1 -1
- package/dist/schemas/need-kinds.d.ts +19 -0
- package/dist/schemas/need-kinds.d.ts.map +1 -0
- package/dist/schemas/need-kinds.js +7 -0
- package/dist/schemas/need-kinds.js.map +1 -0
- package/dist/schemas/needs.d.ts +868 -27
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +79 -9
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/offload.d.ts +61 -0
- package/dist/schemas/offload.d.ts.map +1 -1
- package/dist/schemas/offload.js +14 -1
- package/dist/schemas/offload.js.map +1 -1
- package/dist/schemas/outward-action.d.ts +39 -0
- package/dist/schemas/outward-action.d.ts.map +1 -0
- package/dist/schemas/outward-action.js +40 -0
- package/dist/schemas/outward-action.js.map +1 -0
- package/dist/schemas/ports.d.ts +4 -0
- package/dist/schemas/ports.d.ts.map +1 -1
- package/dist/schemas/ports.js +3 -0
- package/dist/schemas/ports.js.map +1 -1
- package/dist/schemas/providers/capacity.d.ts +6 -0
- package/dist/schemas/providers/capacity.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.d.ts +1 -0
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +1 -0
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/providers/refusals.d.ts +12 -0
- package/dist/schemas/providers/refusals.d.ts.map +1 -1
- package/dist/schemas/providers/refusals.js +4 -0
- package/dist/schemas/providers/refusals.js.map +1 -1
- package/dist/schemas/remote-access.d.ts +1 -0
- package/dist/schemas/remote-access.d.ts.map +1 -1
- package/dist/schemas/remote-access.js +1 -0
- package/dist/schemas/remote-access.js.map +1 -1
- package/dist/schemas/run-targets.d.ts.map +1 -1
- package/dist/schemas/run-targets.js +2 -1
- package/dist/schemas/run-targets.js.map +1 -1
- package/dist/schemas/runner-views.d.ts +24 -0
- package/dist/schemas/runner-views.d.ts.map +1 -0
- package/dist/schemas/runner-views.js +16 -0
- package/dist/schemas/runner-views.js.map +1 -0
- package/dist/schemas/sandbox-reach.d.ts +157 -0
- package/dist/schemas/sandbox-reach.d.ts.map +1 -0
- package/dist/schemas/sandbox-reach.js +112 -0
- package/dist/schemas/sandbox-reach.js.map +1 -0
- package/dist/schemas/secrets.d.ts +17 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +12 -5
- package/dist/schemas/secrets.js.map +1 -1
- package/dist/schemas/settings-history.d.ts +1 -1
- package/dist/schemas/settings-history.d.ts.map +1 -1
- package/dist/schemas/settings-history.js +5 -4
- package/dist/schemas/settings-history.js.map +1 -1
- package/dist/schemas/settings-savings.d.ts +58 -0
- package/dist/schemas/settings-savings.d.ts.map +1 -1
- package/dist/schemas/settings-savings.js +22 -0
- package/dist/schemas/settings-savings.js.map +1 -1
- package/dist/schemas/settings.d.ts +20 -42
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +24 -7
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/stack-grants.d.ts +60 -0
- package/dist/schemas/stack-grants.d.ts.map +1 -0
- package/dist/schemas/stack-grants.js +33 -0
- package/dist/schemas/stack-grants.js.map +1 -0
- package/dist/schemas/system.d.ts +19 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +9 -0
- package/dist/schemas/system.js.map +1 -1
- package/dist/schemas/terminal.d.ts +46 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +19 -0
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/watch-sources.d.ts +72 -0
- package/dist/schemas/watch-sources.d.ts.map +1 -0
- package/dist/schemas/watch-sources.js +88 -0
- package/dist/schemas/watch-sources.js.map +1 -0
- package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-search.js +1 -1
- package/dist/schemas/workspace/workspace-search.js.map +1 -1
- package/dist/schemas/wsl-memory.d.ts +76 -0
- package/dist/schemas/wsl-memory.d.ts.map +1 -0
- package/dist/schemas/wsl-memory.js +36 -0
- package/dist/schemas/wsl-memory.js.map +1 -0
- package/dist/state/auth-state.d.ts.map +1 -1
- package/dist/state/auth-state.js +3 -0
- package/dist/state/auth-state.js.map +1 -1
- package/dist/state/definition.d.ts +16 -8
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/runtime-state.d.ts +1 -1
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +1 -1
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/state/workspace-state.d.ts +9 -4
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +9 -4
- package/dist/state/workspace-state.js.map +1 -1
- package/dist/sync/workspace-sync-ignores.d.ts +4 -0
- package/dist/sync/workspace-sync-ignores.d.ts.map +1 -0
- package/dist/sync/workspace-sync-ignores.js +75 -0
- package/dist/sync/workspace-sync-ignores.js.map +1 -0
- package/dist/text/pages.d.ts.map +1 -1
- package/dist/text/pages.js +17 -4
- package/dist/text/pages.js.map +1 -1
- package/dist/text/transcript-fold.js +2 -2
- package/dist/text/transcript-fold.js.map +1 -1
- package/package.json +5 -5
- package/src/app-routes/app-pages.ts +3 -0
- package/src/app-routes/index.ts +1 -0
- package/src/app-routes/return-path.ts +16 -0
- package/src/briefs/agent-ask.ts +23 -0
- package/src/{chores/extension-update.ts → briefs/extension-update-brief.ts} +3 -2
- package/src/chores/digest.ts +1 -0
- package/src/chores/index.ts +13 -2
- package/src/chores/prompt.ts +3 -18
- package/src/chores/stack.ts +1 -0
- package/src/chores/verdict.ts +1 -0
- package/src/chores/workspace-scope.ts +3 -8
- package/src/contracts/accounts.contract.ts +3 -0
- package/src/contracts/agents.contract.ts +41 -5
- package/src/contracts/automations.contract.ts +2 -0
- package/src/contracts/capabilities.contract.ts +31 -2
- package/src/contracts/ci.contract.ts +119 -37
- package/src/contracts/device-ci-runners.contract.ts +81 -0
- package/src/contracts/device-stacks.contract.ts +97 -0
- package/src/contracts/extensions.contract.ts +12 -1
- package/src/contracts/ports.contract.ts +6 -6
- package/src/contracts/runner.contract.ts +117 -3
- package/src/contracts/runners.contract.ts +19 -0
- package/src/contracts/safety.contract.ts +2 -0
- package/src/contracts/secrets.contract.ts +39 -0
- package/src/contracts/settings.contract.ts +26 -0
- package/src/contracts/stack-grants.contract.ts +51 -0
- package/src/contracts/system.contract.ts +36 -62
- package/src/contracts/workspace.contract.ts +0 -22
- package/src/events/agent-events.ts +3 -2
- package/src/events/agent-words.test.ts +19 -1
- package/src/events/agent-words.ts +36 -2
- package/src/events/child-news.test.ts +91 -0
- package/src/events/child-news.ts +269 -0
- package/src/events/prompt-origins.ts +35 -0
- package/src/events/refusal-incidents.ts +60 -19
- package/src/events/requests.ts +18 -0
- package/src/events/transcript.ts +10 -1
- package/src/ids/conversation-ids.test.ts +3 -1
- package/src/ids/conversation-ids.ts +6 -4
- package/src/ids/project-dir.test.ts +1 -1
- package/src/ids/project-dir.ts +1 -1
- package/src/ids/project-id.test.ts +14 -0
- package/src/ids/project-id.ts +6 -4
- package/src/ids/run-row-ids.test.ts +38 -0
- package/src/ids/run-row-ids.ts +49 -0
- package/src/index.ts +6 -6
- package/src/models/agent-catalog.test.ts +7 -4
- package/src/models/agent-catalog.ts +3 -2
- package/src/models/agent-lanes.ts +8 -1
- package/src/models/agent-runtimes.ts +7 -6
- package/src/models/agent-standing.ts +13 -0
- package/src/models/model-roles.test.ts +61 -4
- package/src/models/model-roles.ts +153 -49
- package/src/models/model-setups.ts +49 -26
- package/src/models/provider-specs.test.ts +2 -2
- package/src/models/providers/provider-traits.test.ts +71 -0
- package/src/models/providers/provider-traits.ts +144 -0
- package/src/netd/browser-wire.ts +13 -0
- package/src/netd/generated/browser-wire.json +10 -0
- package/src/netd/generated/netd-wire.json +224 -1
- package/src/netd/generated/wire.ts +18 -6
- package/src/netd/wire-manifests.test.ts +16 -0
- package/src/policy/admin/admin-grant.ts +69 -0
- package/src/policy/approvals-execution.ts +11 -6
- package/src/policy/batch-runs.ts +2 -2
- package/src/policy/capabilities/capability-kinds.test.ts +112 -0
- package/src/policy/capabilities/capability-kinds.ts +110 -0
- package/src/policy/command-classes.ts +5 -3
- package/src/policy/credential-material.ts +1 -1
- package/src/policy/device-programs.ts +29 -20
- package/src/policy/message-limits.ts +8 -4
- package/src/policy/org-locks.ts +1 -0
- package/src/policy/overlay-lint.ts +1 -1
- package/src/policy/reserved-servers.ts +5 -1
- package/src/policy/role-capability.ts +3 -1
- package/src/policy/shell/command-normalise.test.ts +72 -0
- package/src/policy/shell/command-normalise.ts +212 -0
- package/src/policy/shell/workspace-root-exclude.ts +11 -0
- package/src/policy/tests/admin-grant.test.ts +35 -0
- package/src/policy/tests/command-classes.test.ts +41 -0
- package/src/protocol/doors/listener-protocol.ts +32 -1
- package/src/protocol/doors/loopback-proof.ts +34 -0
- package/src/protocol/doors/pass-scopes.ts +12 -0
- package/src/protocol/doors/runner-protocol.ts +133 -4
- package/src/protocol/doors/sandbox-pass.test.ts +33 -1
- package/src/protocol/doors/sandbox-pass.ts +92 -16
- package/src/protocol/doors/webext-links.ts +3 -1
- package/src/protocol/ingress-contract.fixture.json +5 -1
- package/src/protocol/member-reach.test.ts +40 -1
- package/src/protocol/member-reach.ts +40 -0
- package/src/protocol/peer-mcp-server.ts +6 -0
- package/src/protocol/raw/extension-protocol.ts +469 -2
- package/src/protocol/raw/raw-json-routes.ts +45 -1
- package/src/protocol/raw/raw-routes.ts +133 -40
- package/src/protocol/route-meta.ts +4 -1
- package/src/schemas/account-routes.ts +126 -0
- package/src/schemas/activity.ts +6 -4
- package/src/schemas/agent-background.ts +104 -0
- package/src/schemas/agent-land.ts +21 -2
- package/src/schemas/agent.test.ts +3 -0
- package/src/schemas/agent.ts +10 -4
- package/src/schemas/agents.ts +26 -65
- package/src/schemas/auto-approve.ts +31 -0
- package/src/schemas/automations.ts +51 -42
- package/src/schemas/bridge-heads.ts +33 -0
- package/src/schemas/capabilities.ts +23 -0
- package/src/schemas/checkout-hooks.ts +44 -0
- package/src/schemas/ci-deployments.ts +26 -0
- package/src/schemas/ci-fleet.ts +180 -0
- package/src/schemas/ci.ts +185 -45
- package/src/schemas/command-run.ts +44 -0
- package/src/schemas/compose-overlay.test.ts +1 -1
- package/src/schemas/compose-overlay.ts +1 -1
- package/src/schemas/connection-hub.ts +4 -2
- package/src/schemas/context-continues.ts +6 -3
- package/src/schemas/data-protection.ts +28 -34
- package/src/schemas/device-stacks.ts +162 -3
- package/src/schemas/device-swaps.test.ts +1 -1
- package/src/schemas/devices.ts +31 -2
- package/src/schemas/egress-private.test.ts +1 -1
- package/src/schemas/environment.ts +4 -0
- package/src/schemas/extension-updates.ts +35 -7
- package/src/schemas/git/git.ts +14 -14
- package/src/schemas/host-power.test.ts +53 -0
- package/src/schemas/host-power.ts +173 -0
- package/src/schemas/hosts.test.ts +32 -0
- package/src/schemas/hosts.ts +86 -2
- package/src/schemas/intentic-os.ts +2 -2
- package/src/schemas/issues.ts +43 -86
- package/src/schemas/keyring-native.test.ts +11 -3
- package/src/schemas/keyring-native.ts +3 -1
- package/src/schemas/keyring.ts +6 -1
- package/src/schemas/maintenance.ts +4 -3
- package/src/schemas/members.ts +4 -16
- package/src/schemas/metrics.test.ts +9 -1
- package/src/schemas/metrics.ts +43 -0
- package/src/schemas/need-kinds.ts +13 -0
- package/src/schemas/needs.ts +118 -14
- package/src/schemas/offload.ts +37 -3
- package/src/schemas/outward-action.ts +47 -0
- package/src/schemas/ports.ts +5 -0
- package/src/schemas/providers/plan-limits.ts +1 -0
- package/src/schemas/providers/refusals.ts +9 -0
- package/src/schemas/remote-access.ts +3 -0
- package/src/schemas/run-targets.ts +2 -1
- package/src/schemas/runner-views.ts +27 -0
- package/src/schemas/sandbox-reach.ts +161 -0
- package/src/schemas/secrets.ts +23 -5
- package/src/schemas/settings-history.ts +10 -5
- package/src/schemas/settings-savings.ts +29 -0
- package/src/schemas/settings.test.ts +24 -23
- package/src/schemas/settings.ts +55 -22
- package/src/schemas/stack-grants.ts +59 -0
- package/src/schemas/state-plan.test.ts +1 -1
- package/src/schemas/state-plan.ts +2 -2
- package/src/schemas/system.ts +16 -1
- package/src/schemas/terminal.ts +28 -0
- package/src/schemas/updates.test.ts +1 -1
- package/src/schemas/updates.ts +1 -1
- package/src/schemas/version-seam.test.ts +4 -1
- package/src/schemas/watch-sources.ts +127 -0
- package/src/schemas/workspace/workspace-search.ts +5 -2
- package/src/schemas/wsl-memory.ts +59 -0
- package/src/state/auth-state.ts +10 -0
- package/src/state/runtime-state.test.ts +3 -2
- package/src/state/runtime-state.ts +3 -1
- package/src/state/update-probation.ts +1 -1
- package/src/state/ways-back.test.ts +1 -1
- package/src/state/workspace-state.test.ts +2 -0
- package/src/state/workspace-state.ts +21 -21
- package/src/sync/workspace-sync-ignores.test.ts +48 -0
- package/src/sync/workspace-sync-ignores.ts +143 -0
- package/src/text/embed.ts +2 -2
- package/src/text/pages.ts +34 -7
- package/src/text/transcript-fold.test.ts +40 -2
- package/src/text/transcript-fold.ts +2 -2
- package/dist/chores/extension-update.d.ts.map +0 -1
- package/dist/chores/extension-update.js.map +0 -1
- package/dist/contracts/chores.contract.d.ts +0 -213
- package/dist/contracts/chores.contract.d.ts.map +0 -1
- package/dist/contracts/chores.contract.js +0 -32
- package/dist/contracts/chores.contract.js.map +0 -1
- package/dist/contracts/issues.contract.d.ts +0 -95
- package/dist/contracts/issues.contract.d.ts.map +0 -1
- package/dist/contracts/issues.contract.js +0 -50
- package/dist/contracts/issues.contract.js.map +0 -1
- package/src/chores/chores.test.ts +0 -24
- package/src/chores/digest.test.ts +0 -27
- package/src/chores/probes.integration.test.ts +0 -494
- package/src/chores/stack.test.ts +0 -140
- package/src/chores/verdict.test.ts +0 -761
- package/src/contracts/chores.contract.ts +0 -39
- package/src/contracts/issues.contract.ts +0 -53
|
@@ -24,6 +24,8 @@ export const safetyContract = {
|
|
|
24
24
|
description:
|
|
25
25
|
"Replaces the document whole. Nothing in it can widen what the sandbox is structurally allowed to do: it decides which of the things an agent may already do are worth interrupting you about.",
|
|
26
26
|
})
|
|
27
|
+
// The policy the command judge reads: never a panel process's to rewrite.
|
|
28
|
+
.meta({ panel: false })
|
|
27
29
|
.input(z.object({ text: z.string().describe("The policy, as you want it written.") }))
|
|
28
30
|
.output(OkSchema),
|
|
29
31
|
// Verdicts teach the owner which policy line to add next; answers why you weren't asked about something.
|
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
SecretKeyParamSchema,
|
|
12
12
|
SecretGeneratedSchema,
|
|
13
13
|
SecretGenerateSchema,
|
|
14
|
+
SecretImportSchema,
|
|
15
|
+
SecretMarksRequestSchema,
|
|
16
|
+
SecretMarksResponseSchema,
|
|
14
17
|
SecretRegenerateSchema,
|
|
15
18
|
SecretHostGuardSetResultSchema,
|
|
16
19
|
SecretHostGuardSetSchema,
|
|
@@ -47,6 +50,8 @@ export const secretsContract = {
|
|
|
47
50
|
description:
|
|
48
51
|
"Writes one name and value into the sandbox's own secret store, where the agent's references resolve it, without a restart.",
|
|
49
52
|
})
|
|
53
|
+
// A value put in place of the owner's: withheld from the panel token every panel process holds.
|
|
54
|
+
.meta({ panel: false })
|
|
50
55
|
.input(SecretSetSchema)
|
|
51
56
|
.output(OkSchema),
|
|
52
57
|
generate: secretRoute
|
|
@@ -61,6 +66,30 @@ export const secretsContract = {
|
|
|
61
66
|
.meta({ agent: true })
|
|
62
67
|
.input(SecretGenerateSchema)
|
|
63
68
|
.output(SecretGeneratedSchema),
|
|
69
|
+
importValue: secretRoute
|
|
70
|
+
.route({
|
|
71
|
+
method: "POST",
|
|
72
|
+
path: "/secrets/import",
|
|
73
|
+
summary: "Store a value under a new name",
|
|
74
|
+
description:
|
|
75
|
+
"Stores a value read from the `secrets import` command's input under a name nothing here holds yet, where `set` would have put it: how a value moves from where it lives now (another orchestrator's variables, a file on a server) without passing through the chat. Answers the name and its length, never the value. Refused for a name something here already holds, so it can add a credential and never replace one.",
|
|
76
|
+
})
|
|
77
|
+
// (2026-11-25) The `secrets import` CLI, on the agent token; withheld from the panel token, as `set` is.
|
|
78
|
+
.meta({ agent: true, panel: false })
|
|
79
|
+
.input(SecretImportSchema)
|
|
80
|
+
.output(SecretGeneratedSchema),
|
|
81
|
+
// (2026-11-25) Keyed marks of named values (schemas/secrets.ts), never the values: how the Deployments extension tells
|
|
82
|
+
// that a secret a stack received changed since. An extension reaches it by declaring it; not the agent, not a panel.
|
|
83
|
+
marks: procedure
|
|
84
|
+
.route({
|
|
85
|
+
method: "POST",
|
|
86
|
+
path: "/secrets/marks",
|
|
87
|
+
summary: "A keyed mark of each named secret's value",
|
|
88
|
+
description: "An HMAC of each value under a key only this sandbox holds, so two marks compare equal exactly when the value is unchanged. Never the value.",
|
|
89
|
+
})
|
|
90
|
+
.meta({ floor: "maintainer", control: "never", panel: false })
|
|
91
|
+
.input(SecretMarksRequestSchema)
|
|
92
|
+
.output(SecretMarksResponseSchema),
|
|
64
93
|
regenerate: secretRoute
|
|
65
94
|
.route({
|
|
66
95
|
method: "POST",
|
|
@@ -69,6 +98,8 @@ export const secretsContract = {
|
|
|
69
98
|
description:
|
|
70
99
|
"Replaces the value of a secret a person set here (not a connection's or a computer's) with a random one, for a value too short to hide from the model. Answers the name and its length, never the value. Whatever checks the old value (a server, an account) has to be given the new one, or it stops working.",
|
|
71
100
|
})
|
|
101
|
+
// Replaces a stored value, breaking whatever checks the old one: the owner's, never a panel process's.
|
|
102
|
+
.meta({ panel: false })
|
|
72
103
|
.input(SecretRegenerateSchema)
|
|
73
104
|
.output(SecretGeneratedSchema),
|
|
74
105
|
list: secretRoute
|
|
@@ -86,6 +117,8 @@ export const secretsContract = {
|
|
|
86
117
|
summary: "Delete a secret",
|
|
87
118
|
description: "Removes one by name.",
|
|
88
119
|
})
|
|
120
|
+
// Removing a stored value is the owner's, never a panel process's.
|
|
121
|
+
.meta({ panel: false })
|
|
89
122
|
.input(SecretKeyParamSchema)
|
|
90
123
|
.output(OkSchema),
|
|
91
124
|
inventory: secretRoute
|
|
@@ -129,6 +162,8 @@ export const secretsContract = {
|
|
|
129
162
|
description:
|
|
130
163
|
"Names exactly who may release one secret or one connected account, and how far a single release goes. The owner's call alone. A signed-in browser or a mounted server cannot be released for one use, so those are always for the rest of the conversation.",
|
|
131
164
|
})
|
|
165
|
+
// Who may release a credential is the owner's to say, never a panel process's.
|
|
166
|
+
.meta({ panel: false })
|
|
132
167
|
.input(CredentialGateSchema)
|
|
133
168
|
.output(OkSchema),
|
|
134
169
|
removeGate: secretRoute
|
|
@@ -138,6 +173,8 @@ export const secretsContract = {
|
|
|
138
173
|
summary: "Stop requiring approval for a credential",
|
|
139
174
|
description: "Removes one gate, so the agent can use that credential the way it uses any other. The owner's call alone.",
|
|
140
175
|
})
|
|
176
|
+
// Lifting a gate is the owner's, never a panel process's.
|
|
177
|
+
.meta({ panel: false })
|
|
141
178
|
.input(CredentialGuardSubjectParamSchema)
|
|
142
179
|
.output(OkSchema),
|
|
143
180
|
// The host guard, the gate's second half: kept beside the gates, off the agent-editable config for the same reason. The
|
|
@@ -264,6 +301,8 @@ export const secretsContract = {
|
|
|
264
301
|
description:
|
|
265
302
|
"The owner's alone, and never the agent's: handing the agent the credential itself, or replacing what the gateway lets it do, is a decision about the credential, not a use of it.",
|
|
266
303
|
})
|
|
304
|
+
// Hands the agent a credential or rewrites its rules: never a panel process's.
|
|
305
|
+
.meta({ panel: false })
|
|
267
306
|
.input(CredentialPolicySetSchema)
|
|
268
307
|
.output(CredentialPolicySchema),
|
|
269
308
|
request: secretRoute
|
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
TimezoneOfferSchema,
|
|
21
21
|
TimezoneStateSchema,
|
|
22
22
|
} from "../schemas/settings.js";
|
|
23
|
+
import { ModelRolesSchema } from "../models/model-roles.js";
|
|
24
|
+
import { OutwardActionsSchema } from "../schemas/data-protection.js";
|
|
23
25
|
import { OkSchema } from "../schemas/shared.js";
|
|
24
26
|
import { DayWindowQuerySchema } from "../schemas/providers/usage.js";
|
|
25
27
|
|
|
@@ -58,6 +60,8 @@ export const settingsContract = {
|
|
|
58
60
|
summary: "Change the sandbox settings",
|
|
59
61
|
description: "Writes the settings whole, so send the complete object rather than the fields you changed.",
|
|
60
62
|
})
|
|
63
|
+
// The command judge, auto-approval and the rest of what holds the agent back: never a panel process's to change.
|
|
64
|
+
.meta({ panel: false })
|
|
61
65
|
.input(SandboxSettingsWriteSchema)
|
|
62
66
|
.output(OkSchema),
|
|
63
67
|
savings: procedure
|
|
@@ -90,6 +94,28 @@ export const settingsContract = {
|
|
|
90
94
|
"A separate read rather than a field on the settings, because a rule firing is not somebody editing anything: folding it in would turn every firing into a settings write and put a self-changing value inside the object a screen edits.",
|
|
91
95
|
})
|
|
92
96
|
.output(RuleFiringsSchema),
|
|
97
|
+
// Read off the enabled extensions' manifests, not out of the settings file: the rules are the owner's, the actions
|
|
98
|
+
// they can be written for are each extension's own declaration (2026-11-25).
|
|
99
|
+
outwardActions: procedure
|
|
100
|
+
.route({
|
|
101
|
+
method: "GET",
|
|
102
|
+
path: "/settings/outward-actions",
|
|
103
|
+
summary: "What the action rules can be written for",
|
|
104
|
+
description:
|
|
105
|
+
"Every outward action the enabled extensions declare (send a Slack message, upload to OneDrive), by the key an action rule for it is written under. Reads are left out: a rule on one would hold a bot reading its own channel.",
|
|
106
|
+
})
|
|
107
|
+
.output(OutwardActionsSchema),
|
|
108
|
+
// Read off the extensions' manifests, not out of the settings file: which setup a job runs on is the owner's, the jobs
|
|
109
|
+
// there are are the sandbox's own and each extension's declaration (2026-11-26).
|
|
110
|
+
modelRoles: procedure
|
|
111
|
+
.route({
|
|
112
|
+
method: "GET",
|
|
113
|
+
path: "/settings/model-roles",
|
|
114
|
+
summary: "The jobs a model setup can be chosen for",
|
|
115
|
+
description:
|
|
116
|
+
"Every job this sandbox picks a model for: its own (commit messages, the safety judge, loop iterations), then each installed extension's (`contributes.modelRoles`: pipeline fixes, maintenance chores), with whether that extension is switched on. A switched-off extension's job stays listed so the owner's choice for it is kept, and is not shown.",
|
|
117
|
+
})
|
|
118
|
+
.output(ModelRolesSchema),
|
|
93
119
|
// Read off the repositories themselves, not out of the settings file: the declaration is a tracked file in each
|
|
94
120
|
// repository, and only the owner's answer to it lives here.
|
|
95
121
|
repoChecks: procedure
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { procedure } from "../protocol/route-meta.js";
|
|
2
|
+
import { NeedRaisedSchema } from "../schemas/needs.js";
|
|
3
|
+
import { OkSchema } from "../schemas/shared.js";
|
|
4
|
+
import { StackGrantRefSchema, StackGrantRequestSchema, StackGrantSetSchema, StackGrantsResponseSchema } from "../schemas/stack-grants.js";
|
|
5
|
+
|
|
6
|
+
// WHICH SECRETS EACH MANAGED STACK MAY RECEIVE (schemas/stack-grants.ts). Reading the grants reaches an extension (the
|
|
7
|
+
// Deployments board shows what is missing) and the agent; granting and revoking are the owner's alone, never a machine
|
|
8
|
+
// credential's, and the handlers hold the caller to the Secrets right again. An agent asks on a card instead.
|
|
9
|
+
const grantRoute = procedure.meta({ control: "never", panel: false });
|
|
10
|
+
|
|
11
|
+
export const stackGrantsContract = {
|
|
12
|
+
list: grantRoute
|
|
13
|
+
.route({
|
|
14
|
+
method: "GET",
|
|
15
|
+
path: "/stack-grants",
|
|
16
|
+
summary: "Which secrets each managed stack may receive",
|
|
17
|
+
description: "Every grant: the repository, stack and computer it is for, and the secret names it covers. Names only, never a value.",
|
|
18
|
+
})
|
|
19
|
+
.meta({ agent: true })
|
|
20
|
+
.output(StackGrantsResponseSchema),
|
|
21
|
+
request: grantRoute
|
|
22
|
+
.route({
|
|
23
|
+
method: "POST",
|
|
24
|
+
path: "/stack-grants/request",
|
|
25
|
+
summary: "Ask the owner to let a stack receive some secrets",
|
|
26
|
+
description:
|
|
27
|
+
"Raises a card in the asking conversation listing the names; the owner's yes grants exactly those, for that stack from that repository on that computer.",
|
|
28
|
+
})
|
|
29
|
+
.meta({ agent: true, floor: "maintainer" })
|
|
30
|
+
.input(StackGrantRequestSchema)
|
|
31
|
+
.output(NeedRaisedSchema),
|
|
32
|
+
grant: grantRoute
|
|
33
|
+
.route({
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: "/stack-grants/grant",
|
|
36
|
+
summary: "Let a stack receive these secrets",
|
|
37
|
+
})
|
|
38
|
+
.meta({ floor: "maintainer", right: "secrets" })
|
|
39
|
+
.input(StackGrantSetSchema)
|
|
40
|
+
.output(StackGrantsResponseSchema),
|
|
41
|
+
revoke: grantRoute
|
|
42
|
+
.route({
|
|
43
|
+
method: "POST",
|
|
44
|
+
path: "/stack-grants/revoke",
|
|
45
|
+
summary: "Stop a stack receiving secrets",
|
|
46
|
+
description: "Its next managed deploy is refused until granted again; what already runs keeps its `.env`.",
|
|
47
|
+
})
|
|
48
|
+
.meta({ floor: "maintainer", right: "secrets" })
|
|
49
|
+
.input(StackGrantRefSchema)
|
|
50
|
+
.output(OkSchema),
|
|
51
|
+
};
|
|
@@ -10,22 +10,16 @@ import {
|
|
|
10
10
|
DeviceSandboxFlowInputSchema,
|
|
11
11
|
DevicesListSchema,
|
|
12
12
|
} from "../schemas/devices.js";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
DeviceStackDeployResultSchema,
|
|
16
|
-
DeviceStackLogsInputSchema,
|
|
17
|
-
DeviceStackOpInputSchema,
|
|
18
|
-
DeviceStacksInputSchema,
|
|
19
|
-
DeviceStacksSchema,
|
|
20
|
-
StackLogsSchema,
|
|
21
|
-
StackOpResultSchema,
|
|
22
|
-
} from "../schemas/device-stacks.js";
|
|
13
|
+
import { deviceCiRunnerRoutes } from "./device-ci-runners.contract.js";
|
|
14
|
+
import { deviceStackRoutes } from "./device-stacks.contract.js";
|
|
23
15
|
import { EgressOwnerKeysReadSchema } from "../schemas/egress.js";
|
|
16
|
+
import { SandboxReachSchema } from "../schemas/sandbox-reach.js";
|
|
24
17
|
import { PresenceReportSchema } from "../schemas/logs.js";
|
|
25
18
|
import {
|
|
26
19
|
CheckoutPressInputSchema,
|
|
27
20
|
CheckoutPressResultSchema,
|
|
28
21
|
DiskPressureSchema,
|
|
22
|
+
MemoryReclaimResultSchema,
|
|
29
23
|
SandboxMetricsSchema,
|
|
30
24
|
StorageCleanInputSchema,
|
|
31
25
|
StorageCleanResultSchema,
|
|
@@ -50,8 +44,8 @@ import {
|
|
|
50
44
|
OpenBrowserInputSchema,
|
|
51
45
|
OpenBrowserResultSchema,
|
|
52
46
|
ReopenBrowserPageInputSchema,
|
|
53
|
-
DesktopStateSchema,
|
|
54
47
|
SubagentsListSchema,
|
|
48
|
+
SystemDesktopSchema,
|
|
55
49
|
TerminalNameParamSchema,
|
|
56
50
|
TerminalScrollbackQuerySchema,
|
|
57
51
|
TerminalScrollbackSchema,
|
|
@@ -166,7 +160,8 @@ export const systemContract = {
|
|
|
166
160
|
"Exchanges a verified sign-in, or a session that has not expired yet, for a fresh session the daemon minted. That session is the credential every other call carries, and calling this again with a live one renews it.",
|
|
167
161
|
})
|
|
168
162
|
// Staying signed in and on the roster is identity, not power, and needs nothing the boot chain builds.
|
|
169
|
-
|
|
163
|
+
// The session it answers is a credential: never a panel process's.
|
|
164
|
+
.meta({ beforeBoot: true, floor: "viewer", guest: true, panel: false })
|
|
170
165
|
.output(DaemonSessionSchema),
|
|
171
166
|
events: procedure
|
|
172
167
|
.route({
|
|
@@ -291,6 +286,18 @@ export const systemContract = {
|
|
|
291
286
|
})
|
|
292
287
|
.input(CheckoutPressInputSchema)
|
|
293
288
|
.output(CheckoutPressResultSchema),
|
|
289
|
+
// (2026-11-26) The composer's "Free memory" press while the computer under this sandbox is short (offload.placement
|
|
290
|
+
// `reclaim`). The owner's alone: it empties caches every conversation here was reading from.
|
|
291
|
+
reclaimMemory: systemRoute
|
|
292
|
+
.route({
|
|
293
|
+
method: "POST",
|
|
294
|
+
path: "/system/memory/reclaim",
|
|
295
|
+
summary: "Give memory back to the computer this sandbox runs on",
|
|
296
|
+
description:
|
|
297
|
+
"Has this sandbox let go of memory it can do without (cached files first) now, and says how much it let go and what the computer it runs on had available just before and a few seconds after. On a Windows PC much of what a sandbox lets go stays inside the WSL VM, so the answer can be that Windows got none of it. Refused, with why, where that computer says nothing of its memory, where the kernel takes no reclaim, or while this sandbox is short of memory itself.",
|
|
298
|
+
})
|
|
299
|
+
.meta({ floor: "owner", panel: false })
|
|
300
|
+
.output(MemoryReclaimResultSchema),
|
|
294
301
|
// Control plane only; live I/O is /system/terminal WebSocket, exempt from the Bearer auth these routes take.
|
|
295
302
|
terminals: systemRoute
|
|
296
303
|
.route({
|
|
@@ -444,7 +451,7 @@ export const systemContract = {
|
|
|
444
451
|
description:
|
|
445
452
|
"Whether the sandbox's desktop is up, which display it is, and which windows are open on it. The live picture of it, or of one window on it, comes over a separate socket; this says whether there is anything to see.",
|
|
446
453
|
})
|
|
447
|
-
.output(
|
|
454
|
+
.output(SystemDesktopSchema),
|
|
448
455
|
// In-process and spawned alike: the board draws each under the card of the conversation that started it, and a chat
|
|
449
456
|
// draws it on the card of the call that started it. Pushed through the `subagents` runtime domain, never polled. A
|
|
450
457
|
// subagent's work is read where it lives: an in-process one's on its delegation's card in its parent's record, a
|
|
@@ -470,6 +477,18 @@ export const systemContract = {
|
|
|
470
477
|
"Every computer this sandbox can see, whether it reached it through desktop sync or through a connected device, in one row per machine: what it says about itself, which sandboxes it holds, and what stopped it answering when nothing came back.",
|
|
471
478
|
})
|
|
472
479
|
.output(DevicesListSchema),
|
|
480
|
+
// (2026-11-22) The account's access map asks every sandbox it reaches for this one answer and joins them
|
|
481
|
+
// (docs/architecture/accounts.md). Read from what the daemon stores and its live connections, never by calling a
|
|
482
|
+
// machine, so a map of ten sandboxes costs ten cheap reads; only the link cards' terms ask the far sandbox, briefly.
|
|
483
|
+
reach: systemRoute
|
|
484
|
+
.route({
|
|
485
|
+
method: "GET",
|
|
486
|
+
path: "/system/reach",
|
|
487
|
+
summary: "What this sandbox is tied to outside itself",
|
|
488
|
+
description:
|
|
489
|
+
"The other sandboxes this one hands work to and takes work from, with their terms; the computers, phones, browsers and servers its agents reach, with the switches each has on; whether it may create sandboxes on its owner's account; and, for each, whether the reader's own conversations may use it and how many other people's may. Shaped for the reader: inbound links and where it runs are Full access's, the counts of other people are for whoever runs people and access.",
|
|
490
|
+
})
|
|
491
|
+
.output(SandboxReachSchema),
|
|
473
492
|
// One stream for every op; the daemon adds no judgment, a refusal is the machine's own `error` line.
|
|
474
493
|
manageDeviceSandbox: systemRoute
|
|
475
494
|
.route({
|
|
@@ -514,53 +533,8 @@ export const systemContract = {
|
|
|
514
533
|
})
|
|
515
534
|
.input(DeviceAgentFlowInputSchema)
|
|
516
535
|
.output(streamOf(DeviceFlowLineSchema)),
|
|
517
|
-
// Docker compose stacks on a connected computer (
|
|
518
|
-
|
|
519
|
-
//
|
|
520
|
-
|
|
521
|
-
.route({
|
|
522
|
-
method: "GET",
|
|
523
|
-
path: "/system/devices/{id}/stacks",
|
|
524
|
-
summary: "The Docker compose stacks on one of your devices",
|
|
525
|
-
description:
|
|
526
|
-
"Every Docker compose project on a computer you connected, with each service's container, image and state, and the folder this sandbox deploys stacks into there. Intentic's own sandboxes are marked rather than left out. Needs that computer's \"Run commands\" switch.",
|
|
527
|
-
})
|
|
528
|
-
.meta({ floor: "maintainer", panel: false })
|
|
529
|
-
.input(DeviceStacksInputSchema)
|
|
530
|
-
.output(DeviceStacksSchema),
|
|
531
|
-
// Up, restart, start, stop, or pull-then-up; nothing here removes a stack or a volume.
|
|
532
|
-
deviceStackOp: systemRoute
|
|
533
|
-
.route({
|
|
534
|
-
method: "POST",
|
|
535
|
-
path: "/system/devices/{id}/stacks/{name}/ops/{op}",
|
|
536
|
-
summary: "Start, stop, restart or update a stack on one of your devices",
|
|
537
|
-
description:
|
|
538
|
-
"Runs `docker compose` for one stack on a computer you connected: `up` applies its files, `pull` fetches newer images and then applies, and `restart`, `start` and `stop` do what they say. Nothing here removes a stack or its volumes. Needs that computer's \"Run commands\" switch.",
|
|
539
|
-
})
|
|
540
|
-
.meta({ panel: false })
|
|
541
|
-
.input(DeviceStackOpInputSchema)
|
|
542
|
-
.output(StackOpResultSchema),
|
|
543
|
-
// Floored like the actions, though it only reads: a log can hold anything the service printed.
|
|
544
|
-
deviceStackLogs: systemRoute
|
|
545
|
-
.route({
|
|
546
|
-
method: "GET",
|
|
547
|
-
path: "/system/devices/{id}/stacks/{name}/logs",
|
|
548
|
-
summary: "The recent log of a stack on one of your devices",
|
|
549
|
-
description: "The last lines every service of one compose stack printed, oldest first, as `docker compose logs` gives them.",
|
|
550
|
-
})
|
|
551
|
-
.meta({ floor: "maintainer", panel: false })
|
|
552
|
-
.input(DeviceStackLogsInputSchema)
|
|
553
|
-
.output(StackLogsSchema),
|
|
554
|
-
// The repository's committed tree, packed here, carried over the device link and brought up there with `--build`.
|
|
555
|
-
deployDeviceStack: systemRoute
|
|
556
|
-
.route({
|
|
557
|
-
method: "POST",
|
|
558
|
-
path: "/system/devices/{id}/stacks/{name}/deploy",
|
|
559
|
-
summary: "Deploy a workspace repository to one of your devices",
|
|
560
|
-
description:
|
|
561
|
-
"Packs the committed tree (HEAD) of a workspace repository, carries it to a computer you connected and runs it there as a Docker compose stack of the given name, building its images on that computer. Uncommitted changes are not deployed. A `.env` already in the stack's folder there is kept: secrets are placed into it by an agent, never sent with a deploy. Needs that computer's \"Run commands\" and \"Run programs this sandbox sends\" switches.",
|
|
562
|
-
})
|
|
563
|
-
.meta({ panel: false })
|
|
564
|
-
.input(DeviceStackDeployInputSchema)
|
|
565
|
-
.output(DeviceStackDeployResultSchema),
|
|
536
|
+
// Docker compose stacks on a connected computer (device-stacks.contract.ts).
|
|
537
|
+
...deviceStackRoutes,
|
|
538
|
+
// The self-hosted CI runners on a connected computer, for the Pipelines view (device-ci-runners.contract.ts).
|
|
539
|
+
...deviceCiRunnerRoutes,
|
|
566
540
|
};
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
TemplatesListSchema,
|
|
16
16
|
WorkspaceSyncSchema,
|
|
17
17
|
} from "../schemas/workspace/workspace-repos.js";
|
|
18
|
-
import { PackageModulesParamSchema, PackageModulesSchema, WorkspaceGraphSchema } from "../schemas/workspace/workspace-graph.js";
|
|
19
18
|
import { WorkspaceSearchFrameSchema, WorkspaceSearchQuerySchema, WorkspaceSearchResultSchema } from "../schemas/workspace/workspace-search.js";
|
|
20
19
|
import { WorkspaceInstallResultSchema, WorkspaceInstallSchema, WorkspaceSetupSchema } from "../schemas/workspace/workspace-setup.js";
|
|
21
20
|
import {
|
|
@@ -380,27 +379,6 @@ export const workspaceContract = {
|
|
|
380
379
|
})
|
|
381
380
|
.input(RepoAppsParamSchema)
|
|
382
381
|
.output(AppsListSchema),
|
|
383
|
-
// The monorepo's package dependency graph, from pnpm-workspace.yaml globs and each package.json's deps.
|
|
384
|
-
packageGraph: procedure
|
|
385
|
-
.route({
|
|
386
|
-
method: "GET",
|
|
387
|
-
path: "/workspace/repos/{repo}/graph",
|
|
388
|
-
summary: "How a repo's packages depend on each other",
|
|
389
|
-
description: "Every package in one multi-package repo and which of its siblings each one uses, which is what a dependency view draws.",
|
|
390
|
-
})
|
|
391
|
-
.input(RepoAppsParamSchema)
|
|
392
|
-
.output(WorkspaceGraphSchema),
|
|
393
|
-
// One package's modules grouped into units, and the value imports between them, placed in its declared layers.
|
|
394
|
-
packageModules: procedure
|
|
395
|
-
.route({
|
|
396
|
-
method: "GET",
|
|
397
|
-
path: "/workspace/repos/{repo}/layers",
|
|
398
|
-
summary: "How one package's modules import each other",
|
|
399
|
-
description:
|
|
400
|
-
"One workspace package's source directories as units, the value imports between them, and the layers its layers.json declares, which is what a view of its insides draws.",
|
|
401
|
-
})
|
|
402
|
-
.input(PackageModulesParamSchema)
|
|
403
|
-
.output(PackageModulesSchema),
|
|
404
382
|
// Every repo's package dirs in one call, since a review spans repos and per-repo would fan out per open.
|
|
405
383
|
modules: procedure
|
|
406
384
|
.route({
|
|
@@ -228,9 +228,10 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
|
228
228
|
}),
|
|
229
229
|
// The agent started running Bash in its live `agent-<id>` tmux session; one per turn, reused across all of a turn's
|
|
230
230
|
// commands including subagents'.
|
|
231
|
-
|
|
231
|
+
// `runner` (2026-11-23): stamped by the parent on a frame relayed from a runner, whose session lives there.
|
|
232
|
+
z.object({ kind: z.literal("terminal"), session: z.string(), runner: z.string().optional() }),
|
|
232
233
|
// The agent used a browser tool; one per turn, since one Chromium serves every browser call the turn makes.
|
|
233
|
-
z.object({ kind: z.literal("browser"), session: z.string() }),
|
|
234
|
+
z.object({ kind: z.literal("browser"), session: z.string(), runner: z.string().optional() }),
|
|
234
235
|
// One frame per subagent a turn starts, whichever mechanism starts it, then `subagent_update` as it works, mirroring
|
|
235
236
|
// `tool_call`/`tool_call_update`. `id` is its roster id: the spawning call's own id for an in-process subagent (the
|
|
236
237
|
// runtime's Agent/Task tool), its own conversation id for a spawned one, whose card is the call whose result names
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { agentWordsOf, agentWordsRow, childReportPrompt, peerMessagePrompt, unspokenPromptRow } from "./agent-words.js";
|
|
1
|
+
import { agentWordsBody, agentWordsOf, agentWordsRow, childReportPrompt, peerMessagePrompt, unspokenPromptRow } from "./agent-words.js";
|
|
2
2
|
import { watchWakePrompt } from "./watch-wake.js";
|
|
3
3
|
|
|
4
4
|
const peerTitled = (title: string | undefined): string => peerMessagePrompt({ from: "sharp-shale-htw8", title, message: "the sweep is done" });
|
|
@@ -73,6 +73,24 @@ describe("another agent's words", () => {
|
|
|
73
73
|
expect(agentWordsOf(stored)).toMatchObject({ kind: "child", from: "sub-x7", title: "Port the parser" });
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
+
it("hands back what the other agent said, without the lines the sandbox wraps it in", () => {
|
|
77
|
+
expect(agentWordsBody(peer())).toEqual({ said: "the sweep is done" });
|
|
78
|
+
const multi = report({ report: "Ported.\n\n- 12 tests pass\n- 1 skipped", machine: "omen", landing: "Held off your checkout." });
|
|
79
|
+
expect(agentWordsBody(multi)).toEqual({ said: "Ported.\n\n- 12 tests pass\n- 1 skipped" });
|
|
80
|
+
expect(agentWordsBody(report({ result: { json: '{"ok":true}' } }))?.said).toContain('{"ok":true}');
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("reads a child's verification state, and says nothing where it carried none", () => {
|
|
84
|
+
expect(agentWordsBody(report({ verification: { state: "failing", check: "pnpm test" } }))).toMatchObject({ verification: "failing" });
|
|
85
|
+
expect(agentWordsBody(report({ verification: { state: "no-code" } }))).toMatchObject({ verification: "no-code" });
|
|
86
|
+
expect(agentWordsBody(report()) ?? {}).not.toHaveProperty("verification");
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("says a report a child ended without as nothing, and answers no other prompt", () => {
|
|
90
|
+
expect(agentWordsBody(report({ report: " " }))).toEqual({ said: "" });
|
|
91
|
+
expect(agentWordsBody("fix the bug\n\nplease\n\nnow")).toBeUndefined();
|
|
92
|
+
});
|
|
93
|
+
|
|
76
94
|
it("ignores every other prompt, so any reader can ask without checking first", () => {
|
|
77
95
|
expect(agentWordsOf("fix the bug")).toBeUndefined();
|
|
78
96
|
expect(agentWordsOf("Message from another conversation in this workspace: nobody")).toBeUndefined();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { oneLine } from "@intentic/base/one-line";
|
|
2
2
|
import type { SubagentVerification } from "../schemas/terminal.js";
|
|
3
3
|
import type { TranscriptAgentWords, TranscriptRow } from "./transcript.js";
|
|
4
|
+
import { childNewsRow } from "./child-news.js";
|
|
4
5
|
import { needWakeRow } from "./need-wake.js";
|
|
5
6
|
import { watchWakeRow } from "./watch-wake.js";
|
|
6
7
|
|
|
@@ -98,7 +99,7 @@ export const childReportPrompt = (fields: ChildReportFields): string => {
|
|
|
98
99
|
...(fields.machine === undefined ? [] : [`${MACHINE_OPENING}\`${fields.machine}\`, not this sandbox.`]),
|
|
99
100
|
...(verification === undefined ? [] : [verification]),
|
|
100
101
|
"",
|
|
101
|
-
fields.report.trim() === "" ?
|
|
102
|
+
fields.report.trim() === "" ? NO_REPORT : fields.report.trim(),
|
|
102
103
|
...resultLines(fields.result),
|
|
103
104
|
"",
|
|
104
105
|
fields.review === undefined
|
|
@@ -115,6 +116,11 @@ const reviewClosing = (from: string, landing: string | undefined): string =>
|
|
|
115
116
|
"finding it left open that holds, check its own edits rather than trusting them, and say plainly which findings you think are " +
|
|
116
117
|
`wrong and why. If nothing is left open, say so in a line and stop. Ask it something with \`agents message ${from} '<text>'\`.`;
|
|
117
118
|
|
|
119
|
+
// What stands for a report a child ended without; read back by the parser, so it stays unchanged too.
|
|
120
|
+
const NO_REPORT = "(It ended without a closing report.)";
|
|
121
|
+
// The verification line's state, as `verificationLine` writes it.
|
|
122
|
+
const VERIFICATION_LINE = /^Verification: (verified|failing|unproven|no-code) —/u;
|
|
123
|
+
|
|
118
124
|
// The report's second line for a child that ran on a runner; read back by the parser, so it stays unchanged too.
|
|
119
125
|
const MACHINE_OPENING = "It ran on the runner ";
|
|
120
126
|
const MACHINE_LINE = /^It ran on the runner `([^`]+)`/u;
|
|
@@ -165,6 +171,33 @@ const reviewOf = (first: string, prompt: string): TranscriptAgentWords | undefin
|
|
|
165
171
|
};
|
|
166
172
|
};
|
|
167
173
|
|
|
174
|
+
/** What the other agent itself said, out of a prompt `agentWordsOf` recognises: the words between the opening lines and
|
|
175
|
+
* the closing paragraph the sandbox adds to every such prompt (`said`, empty for a child that ended without a report),
|
|
176
|
+
* and a child's verification state where its report carries one. */
|
|
177
|
+
export interface AgentWordsBody {
|
|
178
|
+
readonly said: string;
|
|
179
|
+
readonly verification?: SubagentVerification["state"];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export const agentWordsBody = (prompt: string): AgentWordsBody | undefined => {
|
|
183
|
+
const lines = prompt.split("\n");
|
|
184
|
+
const opened = lines.indexOf("");
|
|
185
|
+
const closed = lines.lastIndexOf("");
|
|
186
|
+
if (opened === -1 || closed <= opened || agentWordsOf(prompt) === undefined) {
|
|
187
|
+
return undefined;
|
|
188
|
+
}
|
|
189
|
+
const said = lines.slice(opened + 1, closed).join("\n").trim();
|
|
190
|
+
const state = lines
|
|
191
|
+
.slice(1, opened)
|
|
192
|
+
.map((line) => VERIFICATION_LINE.exec(line)?.[1])
|
|
193
|
+
.find((found) => found !== undefined);
|
|
194
|
+
const words = said === NO_REPORT ? "" : said;
|
|
195
|
+
return isVerificationState(state) ? { said: words, verification: state } : { said: words };
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const VERIFICATION_STATES: ReadonlySet<string> = new Set<SubagentVerification["state"]>(["verified", "failing", "unproven", "no-code"]);
|
|
199
|
+
const isVerificationState = (word: string | undefined): word is SubagentVerification["state"] => word !== undefined && VERIFICATION_STATES.has(word);
|
|
200
|
+
|
|
168
201
|
/** Which other agent's words a stored prompt is; undefined for every other prompt. */
|
|
169
202
|
export const agentWordsOf = (prompt: string): TranscriptAgentWords | undefined => {
|
|
170
203
|
const first = prompt.split("\n", 1)[0] ?? "";
|
|
@@ -189,4 +222,5 @@ export const agentWordsRow = (prompt: string): TranscriptRow | undefined => {
|
|
|
189
222
|
};
|
|
190
223
|
|
|
191
224
|
/** The row for a prompt nobody at the composer typed; every transcript reader asks this one function. */
|
|
192
|
-
export const unspokenPromptRow = (prompt: string): TranscriptRow | undefined =>
|
|
225
|
+
export const unspokenPromptRow = (prompt: string): TranscriptRow | undefined =>
|
|
226
|
+
watchWakeRow(prompt) ?? needWakeRow(prompt) ?? agentWordsRow(prompt) ?? childNewsRow(prompt);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { unspokenPromptRow } from "./agent-words.js";
|
|
2
|
+
import {
|
|
3
|
+
allowedWords,
|
|
4
|
+
answerLostWords,
|
|
5
|
+
asChildNews,
|
|
6
|
+
childNewsOf,
|
|
7
|
+
driftWords,
|
|
8
|
+
fellBackWords,
|
|
9
|
+
landConflictWords,
|
|
10
|
+
landedWords,
|
|
11
|
+
linkedQuestionWords,
|
|
12
|
+
messageLostWords,
|
|
13
|
+
movedHereWords,
|
|
14
|
+
notStartedWords,
|
|
15
|
+
otherModelWords,
|
|
16
|
+
questionWords,
|
|
17
|
+
restartedWords,
|
|
18
|
+
stoppedWords,
|
|
19
|
+
workingWords,
|
|
20
|
+
} from "./child-news.js";
|
|
21
|
+
|
|
22
|
+
const who = { child: "sub-moon-4rfr", title: "#2 Targeted memory reclaim instead of global drop_caches" };
|
|
23
|
+
|
|
24
|
+
// The runner's own failure, word for word as runner-dispatch.ts says it: the news that drew four of the owner's bubbles.
|
|
25
|
+
const FAILURE =
|
|
26
|
+
"Preparing the runner's workspace failed: the runner \"omen\" runs an older build (0.0.0), whose sync can lose a turn's uncommitted work, so nothing was sent there. Update it (Devices, its Update button), or move this conversation here to go on in this sandbox.";
|
|
27
|
+
|
|
28
|
+
describe("news about a subagent", () => {
|
|
29
|
+
// 2026-11-26: the sentence as the owner's chat held it, before it was composed here; records keep it so.
|
|
30
|
+
it("reads the words a parent was told before they were composed here", () => {
|
|
31
|
+
const stored = `Your subagent \`sub-moon-4rfr\` ("#2 Targeted memory reclaim instead of global drop_caches") could not start on the runner "omen": ${FAILURE} It runs here, in this sandbox, instead, and its report reaches you when it ends.`;
|
|
32
|
+
expect(movedHereWords(who, "omen", FAILURE)).toBe(stored);
|
|
33
|
+
expect(childNewsOf(stored)).toEqual({ kind: "movedHere", from: "sub-moon-4rfr", title: who.title, runner: "omen", cause: FAILURE, sent: stored });
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Composer and parser are one piece of knowledge: every sentence reads back as the kind it was written as.
|
|
37
|
+
it.each([
|
|
38
|
+
["stopped", stoppedWords(who, "its allowance never reopened."), { cause: "its allowance never reopened." }],
|
|
39
|
+
["restarted", restartedWords(who), {}],
|
|
40
|
+
["otherModel", otherModelWords(who, "kimi-k3", "kimi-k3-256k"), { model: "kimi-k3" }],
|
|
41
|
+
["fellBack", fellBackWords(who, "claude/opus", "codex/gpt-6", "429: allowance spent"), { model: "codex/gpt-6", cause: "429: allowance spent" }],
|
|
42
|
+
["working", workingWords(who, "the sandbox sent its turn again by itself because its allowance reopened"), { cause: "the sandbox sent its turn again by itself because its allowance reopened" }],
|
|
43
|
+
["question", questionWords(who, [{ question: "Which cache?", options: [{ label: "page" }, { label: "slab" }] }]), { cause: "Which cache?" }],
|
|
44
|
+
["landed", landedWords(who, ["intentic"]), {}],
|
|
45
|
+
["landConflict", landConflictWords(who, ["a.ts", "b.ts"]), {}],
|
|
46
|
+
["drift", driftWords(who, "`intentic` moved 3 commits."), { cause: "`intentic` moved 3 commits." }],
|
|
47
|
+
] as const)("reads %s back with its subagent and what it carries", (kind, prompt, carried) => {
|
|
48
|
+
expect(childNewsOf(prompt)).toEqual({ kind, from: who.child, title: who.title, ...carried, sent: prompt });
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it.each([
|
|
52
|
+
["notStarted", notStartedWords("sub-x7", "the owner declined it."), { cause: "the owner declined it." }],
|
|
53
|
+
["allowed", allowedWords("sub-x7", "It runs on omen."), {}],
|
|
54
|
+
["messageLost", messageLostWords("sub-x7", "it is archived."), { cause: "it is archived." }],
|
|
55
|
+
["answerLost", answerLostWords("sub-x7", "it is not waiting on a question."), { cause: "it is not waiting on a question." }],
|
|
56
|
+
["question", linkedQuestionWords("sub-x7", "acme", [{ question: "Ship it?", options: [] }]), { cause: "Ship it?" }],
|
|
57
|
+
] as const)("reads %s, which names no title, back with its subagent", (kind, prompt, carried) => {
|
|
58
|
+
expect(childNewsOf(prompt)).toEqual({ kind, from: "sub-x7", ...carried, sent: prompt });
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("ends a title where the fixed words after it begin, whatever quotes or brackets it holds", () => {
|
|
62
|
+
const odd = { child: "sub-tuna-25dq", title: 'Propose a "WSL" VM size (card")' };
|
|
63
|
+
expect(childNewsOf(restartedWords(odd))).toMatchObject({ kind: "restarted", title: odd.title });
|
|
64
|
+
expect(childNewsOf(restartedWords({ child: "sub-tuna-25dq" }))).not.toHaveProperty("title");
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("is not news when a prompt only mentions a subagent", () => {
|
|
68
|
+
expect(childNewsOf("Your subagent `sub-x7` looks stuck, can you check?")).toBeUndefined();
|
|
69
|
+
expect(childNewsOf("Report from a subagent you started: `sub-x7` finished.\n\nDone.")).toBeUndefined();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("is a notice wherever a prompt becomes a row, never the owner's words", () => {
|
|
73
|
+
const prompt = restartedWords(who);
|
|
74
|
+
expect(unspokenPromptRow(prompt)).toMatchObject({ role: "notice", childNews: { kind: "restarted", from: who.child } });
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it("reads a row recorded as the user's as the news it was, keeping its place and moment", () => {
|
|
78
|
+
const text = stoppedWords(who, "no fallback took it.");
|
|
79
|
+
const read = asChildNews({ role: "user", text, rowId: "r1", run: "run-1", sentAt: 1000, speaker: { kind: "sandbox" } });
|
|
80
|
+
expect(read).toMatchObject({ role: "notice", rowId: "r1", run: "run-1", openedAt: 1000, childNews: { kind: "stopped" } });
|
|
81
|
+
expect(read).not.toHaveProperty("speaker");
|
|
82
|
+
expect(read).not.toHaveProperty("sentAt");
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it("leaves a person's own words alone, even word for word the same", () => {
|
|
86
|
+
const row = { role: "user" as const, text: restartedWords(who), speaker: { kind: "person" as const, email: "a@b.c" } };
|
|
87
|
+
expect(asChildNews(row)).toBe(row);
|
|
88
|
+
const plain = { role: "user" as const, text: "hello" };
|
|
89
|
+
expect(asChildNews(plain)).toBe(plain);
|
|
90
|
+
});
|
|
91
|
+
});
|