@intentic/sandbox-contract 1.430.0 → 1.431.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 +12 -2
- 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/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 +357 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +3221 -1576
- 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 +31 -0
- 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 +12 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +3 -1
- package/dist/contracts/capabilities.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.contract.d.ts +27 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +1 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +1 -1
- 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/issues.contract.d.ts +11 -0
- package/dist/contracts/issues.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.d.ts +408 -0
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/offload.contract.d.ts +4 -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 +702 -1
- 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 +85 -0
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +6 -0
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +48 -0
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +2 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +1 -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/system.contract.d.ts +332 -4
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +14 -3
- 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/events/agent-events.d.ts +194 -0
- 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 +48 -0
- 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 +20 -1
- package/dist/events/agent-words.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/system-events.d.ts +86 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/transcript.d.ts +240 -0
- package/dist/events/transcript.d.ts.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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- 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/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/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/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/protocol/doors/listener-protocol.d.ts +4 -0
- package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/listener-protocol.js +4 -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/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/raw-json-routes.d.ts +512 -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 +164 -2
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +63 -35
- 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/agents-list.d.ts +34 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +656 -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 +83 -0
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +11 -1
- 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-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/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/devices.d.ts +64 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +6 -1
- 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 +2 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js +4 -0
- 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 +54 -0
- package/dist/schemas/host-power.d.ts.map +1 -0
- package/dist/schemas/host-power.js +46 -0
- package/dist/schemas/host-power.js.map +1 -0
- package/dist/schemas/hosts.d.ts +139 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +9 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/issues.d.ts +44 -0
- package/dist/schemas/issues.d.ts.map +1 -1
- package/dist/schemas/issues.js +12 -0
- 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/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 +8 -0
- package/dist/schemas/metrics.d.ts.map +1 -1
- package/dist/schemas/metrics.js +8 -0
- package/dist/schemas/metrics.js.map +1 -1
- package/dist/schemas/needs.d.ts +349 -1
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +45 -5
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/offload.d.ts +9 -0
- package/dist/schemas/offload.d.ts.map +1 -1
- package/dist/schemas/offload.js +2 -1
- package/dist/schemas/offload.js.map +1 -1
- 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/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/settings.d.ts +18 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +19 -1
- package/dist/schemas/settings.js.map +1 -1
- 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/state/auth-state.d.ts.map +1 -1
- package/dist/state/auth-state.js +1 -0
- package/dist/state/auth-state.js.map +1 -1
- package/dist/state/definition.d.ts +12 -0
- 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 +1 -1
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +1 -1
- 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/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 +7 -2
- package/src/contracts/device-ci-runners.contract.ts +81 -0
- package/src/contracts/extensions.contract.ts +1 -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 +12 -0
- package/src/contracts/settings.contract.ts +2 -0
- package/src/contracts/system.contract.ts +20 -3
- package/src/events/agent-events.ts +3 -2
- package/src/events/agent-words.test.ts +19 -1
- package/src/events/agent-words.ts +33 -1
- package/src/events/refusal-incidents.ts +60 -19
- 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 +3 -0
- 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/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/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/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/tests/admin-grant.test.ts +35 -0
- package/src/policy/tests/command-classes.test.ts +41 -0
- package/src/protocol/doors/listener-protocol.ts +18 -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/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/raw-json-routes.ts +45 -1
- package/src/protocol/raw/raw-routes.ts +88 -36
- package/src/protocol/route-meta.ts +4 -1
- package/src/schemas/account-routes.ts +126 -0
- package/src/schemas/activity.ts +4 -3
- package/src/schemas/agent-background.ts +104 -0
- package/src/schemas/agent-land.ts +21 -2
- package/src/schemas/agents.ts +26 -65
- package/src/schemas/auto-approve.ts +31 -0
- package/src/schemas/automations.ts +26 -1
- 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-fleet.ts +180 -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 +1 -1
- package/src/schemas/device-swaps.test.ts +1 -1
- package/src/schemas/devices.ts +19 -1
- package/src/schemas/egress-private.test.ts +1 -1
- package/src/schemas/environment.ts +4 -0
- package/src/schemas/extension-updates.ts +8 -0
- package/src/schemas/git/git.ts +14 -14
- package/src/schemas/host-power.ts +79 -0
- package/src/schemas/hosts.ts +24 -2
- package/src/schemas/intentic-os.ts +2 -2
- package/src/schemas/issues.ts +14 -0
- 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/members.ts +4 -16
- package/src/schemas/metrics.test.ts +9 -1
- package/src/schemas/metrics.ts +8 -0
- package/src/schemas/needs.ts +68 -5
- package/src/schemas/offload.ts +6 -3
- package/src/schemas/ports.ts +5 -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/settings.test.ts +5 -4
- package/src/schemas/settings.ts +45 -10
- 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/state/auth-state.ts +3 -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 +4 -4
- package/src/sync/workspace-sync-ignores.test.ts +48 -0
- package/src/sync/workspace-sync-ignores.ts +143 -0
- package/src/text/pages.ts +34 -7
- package/src/text/transcript-fold.test.ts +40 -2
- package/src/text/transcript-fold.ts +2 -2
|
@@ -20,7 +20,9 @@ const id = string().min(1).max(64);
|
|
|
20
20
|
const host = string().min(1).max(253);
|
|
21
21
|
|
|
22
22
|
/** keyring.ts's secret name, refusal code and capture outcome, as the extension sees them. */
|
|
23
|
-
export const KeyringNativeNameSchema = string()
|
|
23
|
+
export const KeyringNativeNameSchema = string()
|
|
24
|
+
.regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/u)
|
|
25
|
+
.refine((key) => !(key in Object.prototype) && key !== "prototype");
|
|
24
26
|
export const KeyringNativeRefusalCodeSchema = zEnum([
|
|
25
27
|
"no-keyring",
|
|
26
28
|
"locked",
|
package/src/schemas/keyring.ts
CHANGED
|
@@ -14,9 +14,14 @@ export const KeyringPublicKeySchema = z.string().regex(KEYRING_KEY_RE).describe(
|
|
|
14
14
|
// One secret's name, the same shape a sandbox secret's name and a reference to it take (SECRET_KEY_RE), so a shared
|
|
15
15
|
// entry is spent, typed and listed exactly like a sandbox-held one.
|
|
16
16
|
export const KEYRING_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/u;
|
|
17
|
+
// A name that keys a plain object in the keyring's vault (entries by name, phones by device) is never one of
|
|
18
|
+
// Object.prototype's members: `entries["constructor"]` would read the prototype's function instead of nothing, and an
|
|
19
|
+
// assignment to `entries["__proto__"]` would swap the dictionary's prototype for a peer's value.
|
|
20
|
+
export const isVaultKey = (key: string): boolean => !(key in Object.prototype) && key !== "prototype";
|
|
17
21
|
export const KeyringSecretNameSchema = z
|
|
18
22
|
.string()
|
|
19
23
|
.regex(KEYRING_NAME_RE)
|
|
24
|
+
.refine(isVaultKey, "not a name Object.prototype already has (`constructor`, `__proto__`, `toString`, ...)")
|
|
20
25
|
.describe("The secret's name, as a reference to it carries it: a letter or underscore, then letters, digits or `_`.");
|
|
21
26
|
|
|
22
27
|
export const KeyringShareModeSchema = z
|
|
@@ -431,7 +436,7 @@ export type KeyringPendingNeed = z.infer<typeof KeyringPendingNeedSchema>;
|
|
|
431
436
|
// way a Windows Hello signature is. Pairing is carried by a sandbox both are linked to, with both fingerprints shown.
|
|
432
437
|
export const KeyringPhoneKeysSchema = z
|
|
433
438
|
.object({
|
|
434
|
-
device: z.string().min(1).max(128).describe("The phone, by its device card."),
|
|
439
|
+
device: z.string().min(1).max(128).refine(isVaultKey, "not a name Object.prototype already has").describe("The phone, by its device card."),
|
|
435
440
|
label: z.string().min(1).max(200).describe("The phone's name for people, `Pixel 8`."),
|
|
436
441
|
seal: KeyringPublicKeySchema,
|
|
437
442
|
presence: z.string().min(1).max(512).describe("The presence key, X.509 SubjectPublicKeyInfo DER, base64."),
|
package/src/schemas/members.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// members: the daemon's shared-access roster (GET/POST/DELETE /members), who besides the owner reaches this sandbox
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { kindsWhere } from "../policy/capabilities/capability-kinds.js";
|
|
3
4
|
import type { CapabilityKind } from "./capabilities.js";
|
|
4
5
|
import { entryId } from "./internal.js";
|
|
5
6
|
import { type GrantedTier, GrantedTierSchema, type MemberTier, MemberTierSchema, withLegacyTier } from "./shared.js";
|
|
@@ -74,22 +75,9 @@ export type CredentialReach = z.infer<typeof CredentialReachSchema>;
|
|
|
74
75
|
// it per turn (a mount, a variable, a signature, a gateway request). The rest are the sandbox's own machinery with no
|
|
75
76
|
// value to withhold (Docker, a VPN once dialled, a mounted share, a local model, the wallet's owner-approved cards), so a
|
|
76
77
|
// reach neither lists nor removes them: a switch for one would be a line on a screen.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"browser",
|
|
81
|
-
"identity",
|
|
82
|
-
"ssh",
|
|
83
|
-
"device",
|
|
84
|
-
"phone",
|
|
85
|
-
"webext",
|
|
86
|
-
"plugin",
|
|
87
|
-
"extension",
|
|
88
|
-
// The owner's account: a person this sandbox works for may be kept from making sandboxes on it.
|
|
89
|
-
"fleet",
|
|
90
|
-
// Another of the owner's sandboxes: a person may be kept from handing it work.
|
|
91
|
-
"link",
|
|
92
|
-
];
|
|
78
|
+
// The owner's account (`fleet`) and another of their sandboxes (`link`) are among them: a person may be kept from
|
|
79
|
+
// making sandboxes on it, or from handing one work.
|
|
80
|
+
export const REACHABLE_CREDENTIAL_KINDS: readonly CapabilityKind[] = kindsWhere((traits) => traits.reachable);
|
|
93
81
|
|
|
94
82
|
// WHICH AI ACCOUNTS A PERSON'S CONVERSATIONS MAY RUN ON: the model accounts that pay for a turn (a Claude or Codex
|
|
95
83
|
// subscription, a routed provider's sign-in, an API-key endpoint), as distinct from the connections above, which are
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SandboxMetrics, SandboxMetricsSchema } from "./metrics.js";
|
|
1
|
+
import { type DiskPressure, type SandboxMetrics, DiskPressureSchema, SandboxMetricsSchema } from "./metrics.js";
|
|
2
2
|
|
|
3
3
|
// A daemon payload from before memoryBreakdown and the other optional accounting fields existed.
|
|
4
4
|
const legacyMetrics = {
|
|
@@ -18,6 +18,14 @@ const legacyMetrics = {
|
|
|
18
18
|
},
|
|
19
19
|
} satisfies SandboxMetrics;
|
|
20
20
|
|
|
21
|
+
test("disk-pressure readings keep old payloads valid and carry an optional host drive limit", () => {
|
|
22
|
+
const reading: DiskPressure = { level: "critical", freeBytes: 18_500_000_000, totalBytes: 394_500_000_000, measuredAt: 1, using: [] };
|
|
23
|
+
expect(DiskPressureSchema.parse(reading)).toEqual(reading);
|
|
24
|
+
expect(
|
|
25
|
+
DiskPressureSchema.parse({ ...reading, limitedBy: { drive: "C:\\", driveFreeBytes: 18_500_000_000 } }).limitedBy,
|
|
26
|
+
).toEqual({ drive: "C:\\", driveFreeBytes: 18_500_000_000 });
|
|
27
|
+
});
|
|
28
|
+
|
|
21
29
|
describe("the metrics memory accounting contract", () => {
|
|
22
30
|
test("an older payload parses unchanged without the optional breakdown or its categories", () => {
|
|
23
31
|
const parsed = SandboxMetricsSchema.parse(legacyMetrics);
|
package/src/schemas/metrics.ts
CHANGED
|
@@ -346,6 +346,10 @@ const StorageReportFields = z.object({
|
|
|
346
346
|
totalBytes: z.number().describe("The history volume's total size."),
|
|
347
347
|
floorBytes: z.number().describe("Space kept free before a new checkout: 2% of this volume clamped to 5–20 GiB."),
|
|
348
348
|
low: z.boolean().describe("Whether available history space is below the checkout floor."),
|
|
349
|
+
limitedBy: z
|
|
350
|
+
.object({ drive: z.string(), driveFreeBytes: z.number() })
|
|
351
|
+
.optional()
|
|
352
|
+
.describe("The Windows host drive limiting free space, when a host disk hint is available."),
|
|
349
353
|
})
|
|
350
354
|
.optional()
|
|
351
355
|
.describe("The filesystem holding conversation checkouts, independent of the workspace volume. Absent if unreadable."),
|
|
@@ -401,6 +405,10 @@ export const DiskPressureSchema = z.object({
|
|
|
401
405
|
freeBytes: z.number().describe("Space available on the history volume at the last reading."),
|
|
402
406
|
totalBytes: z.number().describe("The history volume's size."),
|
|
403
407
|
measuredAt: z.number().describe("When it was read, in milliseconds; 0 before the first reading."),
|
|
408
|
+
limitedBy: z
|
|
409
|
+
.object({ drive: z.string(), driveFreeBytes: z.number() })
|
|
410
|
+
.optional()
|
|
411
|
+
.describe("The Windows host drive limiting free space, when a host disk hint is available."),
|
|
404
412
|
reaped: z
|
|
405
413
|
.object({
|
|
406
414
|
bytes: z.number().describe("Space the removals gave back, as the volume measured it before and after."),
|
package/src/schemas/needs.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { KeyringShareModeSchema } from "./keyring.js";
|
|
3
3
|
import { AutomationSchema } from "./automations.js";
|
|
4
|
+
import { HostPowerFindingSchema } from "./host-power.js";
|
|
4
5
|
import { entryId } from "./internal.js";
|
|
6
|
+
import { PASS_SCOPES } from "../protocol/doors/pass-scopes.js";
|
|
5
7
|
|
|
6
8
|
// A need: something an agent cannot finish its task without that only a person can provide (a connection, a secret's
|
|
7
9
|
// value, wider reach, a tool in the image). Unlike a parked card it outlives the turn that raised it: the sandbox keeps
|
|
8
10
|
// it until someone answers, draws it wherever it is waiting, and wakes the conversation when it is met
|
|
9
11
|
// (docs/architecture/needs.md). Every word on a need is the daemon's except `why`, the agent's own case.
|
|
10
12
|
|
|
11
|
-
export const NEED_KINDS = ["capability", "secret", "grant", "release", "environment", "automation", "instruction"] as const;
|
|
13
|
+
export const NEED_KINDS = ["capability", "secret", "grant", "release", "environment", "automation", "instruction", "host-power", "claim", "route"] as const;
|
|
12
14
|
export const NeedKindSchema = z
|
|
13
15
|
.enum(NEED_KINDS)
|
|
14
16
|
.describe(
|
|
15
|
-
"What is being asked for: a connection, a secret's value, wider reach, a gated credential, a tool in the image, an automation to run unattended,
|
|
17
|
+
"What is being asked for: a connection, a secret's value, wider reach, a gated credential, a tool in the image, an automation to run unattended, a standing rule written into an AGENTS.md, power settings changed on the computer this sandbox runs on, a project claimed for this sandbox so the owner's other sandboxes report its problems here, or a person's leave for this sandbox to act as them in another.",
|
|
16
18
|
);
|
|
17
19
|
export type NeedKind = z.infer<typeof NeedKindSchema>;
|
|
18
20
|
|
|
@@ -192,6 +194,45 @@ export const InstructionNeedSchema = z.object({
|
|
|
192
194
|
});
|
|
193
195
|
export type InstructionNeed = z.infer<typeof InstructionNeedSchema>;
|
|
194
196
|
|
|
197
|
+
// The computer this sandbox runs on would sleep through work just booked on it (2026-11-22, host-power.ts): its power plan
|
|
198
|
+
// sleeps it after hours without input, its lid does, Windows Update may restart it in the night. Raised by the daemon
|
|
199
|
+
// itself, never by an agent's ask, in the conversation whose booking it would stop; a person's approval runs the
|
|
200
|
+
// computer's `power-stay-on` op, which changes what `fixable` findings say on mains power. Its outcome is the person's
|
|
201
|
+
// alone: the conversation is never woken to hear it, since a woken turn would run the booked work early.
|
|
202
|
+
export const HostPowerNeedSchema = z.object({
|
|
203
|
+
kind: z.literal("host-power"),
|
|
204
|
+
device: z.string().min(1).describe("The connected computer this sandbox runs on, by its device id."),
|
|
205
|
+
findings: z.array(HostPowerFindingSchema).describe("What its OS would do to the work, as read when the card was raised."),
|
|
206
|
+
dueAt: z.number().optional().describe("When the booked work that raised it is due, in milliseconds."),
|
|
207
|
+
});
|
|
208
|
+
export type HostPowerNeed = z.infer<typeof HostPowerNeedSchema>;
|
|
209
|
+
|
|
210
|
+
// A project claimed for this sandbox (docs/architecture/account-routing.md): the owner's other sandboxes then report the
|
|
211
|
+
// problems they see in it here (`projects report`), into this sandbox's issues inbox. Only the owner, signed in to the
|
|
212
|
+
// platform, writes a claim, so the agent proposes it and the owner's press makes it; one sandbox per project on an
|
|
213
|
+
// account, so a claim another sandbox held moves here.
|
|
214
|
+
export const ClaimNeedSchema = z.object({
|
|
215
|
+
kind: z.literal("claim"),
|
|
216
|
+
project: z.string().min(1).describe("The project, as its repository: github.com/owner/repo."),
|
|
217
|
+
heldBy: z.string().optional().describe("The sandbox on the owner's account that claims it now, which a yes moves it from."),
|
|
218
|
+
});
|
|
219
|
+
export type ClaimNeed = z.infer<typeof ClaimNeedSchema>;
|
|
220
|
+
|
|
221
|
+
// A person's leave for this sandbox to route as them into another one (docs/architecture/account-routing.md, 2026-11-24):
|
|
222
|
+
// every scope but a report needs the pairing secret that person minted at the target and handed here, so the platform's
|
|
223
|
+
// pass alone opens nothing but an inbox. Only that person can press it: their editor, signed in to both sandboxes, mints
|
|
224
|
+
// the secret over there and stores it here. Met once this sandbox holds a secret for (target, person).
|
|
225
|
+
export const RouteNeedSchema = z.object({
|
|
226
|
+
kind: z.literal("route"),
|
|
227
|
+
target: z.string().min(1).max(40).describe("The target sandbox's tunnel id."),
|
|
228
|
+
targetName: z.string().max(120).describe("Its name, as the platform gave it."),
|
|
229
|
+
person: z.string().min(1).max(254).describe("The one person this sandbox would route as, and the only one who can allow it."),
|
|
230
|
+
scopes: z.array(z.enum(PASS_SCOPES)).min(1).describe("What the routing is for: drop, read or task."),
|
|
231
|
+
address: z.string().max(400).optional().describe("The target's address, as the platform gave it, which the card reaches it at."),
|
|
232
|
+
from: z.string().max(40).optional().describe("This sandbox's own tunnel id, which the target keys the pairing on."),
|
|
233
|
+
});
|
|
234
|
+
export type RouteNeed = z.infer<typeof RouteNeedSchema>;
|
|
235
|
+
|
|
195
236
|
export const NeedSubjectSchema = z
|
|
196
237
|
.discriminatedUnion("kind", [
|
|
197
238
|
CapabilityNeedSchema,
|
|
@@ -201,6 +242,9 @@ export const NeedSubjectSchema = z
|
|
|
201
242
|
EnvironmentNeedSchema,
|
|
202
243
|
AutomationNeedSchema,
|
|
203
244
|
InstructionNeedSchema,
|
|
245
|
+
HostPowerNeedSchema,
|
|
246
|
+
ClaimNeedSchema,
|
|
247
|
+
RouteNeedSchema,
|
|
204
248
|
])
|
|
205
249
|
.describe("What exactly is asked for.");
|
|
206
250
|
export type NeedSubject = z.infer<typeof NeedSubjectSchema>;
|
|
@@ -264,6 +308,18 @@ export const NeedAskSchema = z.discriminatedUnion("kind", [
|
|
|
264
308
|
file: z.string().min(1).max(400).describe("The AGENTS.md, relative to the workspace root."),
|
|
265
309
|
text: z.string().trim().min(1).max(INSTRUCTION_MAX).describe("The rule, as it should read in the file."),
|
|
266
310
|
}),
|
|
311
|
+
// The project as the agent has it: github.com/owner/repo or any remote URL of it; the daemon normalises it.
|
|
312
|
+
z.object({ kind: z.literal("claim"), project: z.string().trim().min(1).max(400).describe("The project's repository, or any remote URL of it.") }),
|
|
313
|
+
// The target as the agent has it (its name or id); the person is the one the raising conversation acts for, never named here.
|
|
314
|
+
z.object({
|
|
315
|
+
kind: z.literal("route"),
|
|
316
|
+
target: z.string().trim().min(1).max(120).describe("The sandbox to route into, by its name or id."),
|
|
317
|
+
scopes: z
|
|
318
|
+
.array(z.enum(PASS_SCOPES))
|
|
319
|
+
.min(1)
|
|
320
|
+
.optional()
|
|
321
|
+
.describe("What it is for: drop, read or task (all three when left out)."),
|
|
322
|
+
}),
|
|
267
323
|
]);
|
|
268
324
|
export type NeedAsk = z.infer<typeof NeedAskSchema>;
|
|
269
325
|
|
|
@@ -399,6 +455,12 @@ export const ConversationGrantSchema = z.object({
|
|
|
399
455
|
.boolean()
|
|
400
456
|
.default(false)
|
|
401
457
|
.describe("Whether every request an allow-once could settle is allowed without asking, until somebody takes it back."),
|
|
458
|
+
// Put on from the conversation's card, read live by the card registry (schemas/auto-approve.ts): wider than
|
|
459
|
+
// `everything`, it answers the owner's hard rules too, and the conversations this one starts follow it.
|
|
460
|
+
autoApprove: z
|
|
461
|
+
.boolean()
|
|
462
|
+
.default(false)
|
|
463
|
+
.describe("Whether every permission it or a subagent it starts asks for is approved without asking, the owner's hard rules included."),
|
|
402
464
|
// Answered on a credential gateway card, read live by the gateway as each request its rules would ask about arrives.
|
|
403
465
|
rules: z
|
|
404
466
|
.array(BrokerRulePassSchema)
|
|
@@ -450,6 +512,7 @@ export const StandingGrantsSchema = z.object({
|
|
|
450
512
|
installs: z.boolean().default(false).describe("Whether its own dependency installs run without asking."),
|
|
451
513
|
secrets: z.array(z.string()).default([]).describe("Secrets it may send past their host guard without asking."),
|
|
452
514
|
everything: z.boolean().default(false).describe("Whether every request an allow-once could settle is allowed without asking."),
|
|
515
|
+
autoApprove: z.boolean().default(false).describe("Whether it and its subagents are approved without asking, the owner's hard rules included."),
|
|
453
516
|
rules: z.array(BrokerRulePassSchema).default([]).describe("Credential gateway rules that no longer ask before its requests."),
|
|
454
517
|
by: z.string().optional().describe("Who last allowed one of those."),
|
|
455
518
|
updatedAt: z.number().optional().describe("When one of those last changed, in milliseconds."),
|
|
@@ -472,11 +535,11 @@ export type StandingGrants = z.infer<typeof StandingGrantsSchema>;
|
|
|
472
535
|
export const ConversationGrantRevokeSchema = z.object({
|
|
473
536
|
conversationId: z.string(),
|
|
474
537
|
kind: z
|
|
475
|
-
.enum(["release", "install", "secret", "everything", "rule"])
|
|
538
|
+
.enum(["release", "install", "secret", "everything", "auto-approve", "rule"])
|
|
476
539
|
.describe(
|
|
477
|
-
"Which kind of yes: a credential's release, letting its installs run unasked, a secret sent past its host guard, allowing everything, or a credential gateway rule that stopped asking.",
|
|
540
|
+
"Which kind of yes: a credential's release, letting its installs run unasked, a secret sent past its host guard, allowing everything, its auto-approve mark, or a credential gateway rule that stopped asking.",
|
|
478
541
|
),
|
|
479
|
-
what: z.string().describe("The released credential or secret it named, or the rule's identity; empty for installs and
|
|
542
|
+
what: z.string().describe("The released credential or secret it named, or the rule's identity; empty for installs, everything and auto-approve."),
|
|
480
543
|
capability: z.string().optional().describe("For a rule, the capability whose rule it is; a rule's identity alone does not say."),
|
|
481
544
|
});
|
|
482
545
|
export type ConversationGrantRevoke = z.infer<typeof ConversationGrantRevokeSchema>;
|
package/src/schemas/offload.ts
CHANGED
|
@@ -102,9 +102,10 @@ export type SessionsPlacement = z.infer<typeof SessionsPlacementSchema>;
|
|
|
102
102
|
export const MachineStandingSchema = z.enum(["calm", "busy", "full"]);
|
|
103
103
|
export type MachineStanding = z.infer<typeof MachineStandingSchema>;
|
|
104
104
|
|
|
105
|
-
// What made a machine busy or full: memory short of what an agent needs, memory stalling, CPUs saturated,
|
|
106
|
-
// agents running as it has slots for
|
|
107
|
-
|
|
105
|
+
// What made a machine busy or full: memory short of what an agent needs, memory stalling, CPUs saturated, as many
|
|
106
|
+
// agents running as it has slots for, or its disk (the Windows drive under its engine, where that is tighter) too short
|
|
107
|
+
// for another agent's checkout and build.
|
|
108
|
+
export const MachineStrainSchema = z.enum(["memory", "memory-stall", "cpu", "agents", "disk"]);
|
|
108
109
|
export type MachineStrain = z.infer<typeof MachineStrainSchema>;
|
|
109
110
|
|
|
110
111
|
export const MachineLoadSchema = z.object({
|
|
@@ -117,6 +118,8 @@ export const MachineLoadSchema = z.object({
|
|
|
117
118
|
// What its resource budget has free, and the limit that is measured against; absent where nothing measures it.
|
|
118
119
|
memoryFreeMb: z.number().int().nonnegative().optional(),
|
|
119
120
|
memoryLimitMb: z.number().int().positive().optional(),
|
|
121
|
+
// What its workspace's disk has free, by the tighter of the volume and the host drive under it.
|
|
122
|
+
diskFreeMb: z.number().int().nonnegative().optional(),
|
|
120
123
|
// Conversations running a turn there now, and how many it holds at once (the fan-out scheduler's own slots).
|
|
121
124
|
agents: z.number().int().nonnegative(),
|
|
122
125
|
slots: z.number().int().positive(),
|
package/src/schemas/ports.ts
CHANGED
|
@@ -79,6 +79,11 @@ export const PortsListSchema = z.object({
|
|
|
79
79
|
});
|
|
80
80
|
export type PortsList = z.infer<typeof PortsListSchema>;
|
|
81
81
|
export const PortParamSchema = z.object({ port: z.number().int().min(1).max(65535).describe("Which port.") });
|
|
82
|
+
// (2026-11-23) A port on one of this sandbox's runners, for a conversation that runs there: previewed through the
|
|
83
|
+
// runner's uplink at an address of this sandbox's own.
|
|
84
|
+
export const PortForwardInputSchema = PortParamSchema.extend({
|
|
85
|
+
runner: z.string().min(1).optional().describe("The runner whose own port this is. Absent means a port of this sandbox."),
|
|
86
|
+
});
|
|
82
87
|
export const PortForwardResultSchema = z.object({
|
|
83
88
|
previewUrl: z
|
|
84
89
|
.string()
|
|
@@ -63,6 +63,15 @@ export const ProviderRefusalSchema = z.object({
|
|
|
63
63
|
.describe(
|
|
64
64
|
"Set by a person rather than by a refused turn, for a plan nothing can read: believed for a day, or until unmarked or a turn on it is answered.",
|
|
65
65
|
),
|
|
66
|
+
// Heard from the platform rather than refused here (2026-11-24, docs/architecture/account-routing.md): another of the
|
|
67
|
+
// owner's sandboxes signed in to the same provider account was refused for a spent allowance. Judged as a limit
|
|
68
|
+
// refusal like any other, and settled the same way: a turn answered here proves the account has room again.
|
|
69
|
+
source: z
|
|
70
|
+
.enum(["another-sandbox"])
|
|
71
|
+
.optional()
|
|
72
|
+
.describe(
|
|
73
|
+
"Where the refusal was seen, when not here: `another-sandbox` for a spent allowance another of the owner's sandboxes on the same account reported. Absent for one this sandbox's own turn met.",
|
|
74
|
+
),
|
|
66
75
|
});
|
|
67
76
|
export type ProviderRefusal = z.infer<typeof ProviderRefusalSchema>;
|
|
68
77
|
// A routed account's per-model bench as the translator holds it: the provider's own refusal of that account on that
|
|
@@ -60,6 +60,9 @@ export const RemoteStatusSchema = z.object({
|
|
|
60
60
|
allow: RemoteAccessAllowSchema,
|
|
61
61
|
// Empty until remoted has run once since the device connected.
|
|
62
62
|
monitors: z.array(RemoteAccessMonitorSchema),
|
|
63
|
+
// Why a computer that would show its screen here has none to show (no display and nothing to start a virtual desktop
|
|
64
|
+
// with, a Wayland session without PipeWire), in remoted's words naming what to install. Only while monitors is empty.
|
|
65
|
+
screenReason: z.string().optional(),
|
|
63
66
|
// The environments a terminal can open in.
|
|
64
67
|
environments: z.array(z.string()),
|
|
65
68
|
terminals: z.array(RemoteTerminalSchema),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { STATE_DIR } from "@intentic/constants";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { CHECKOUT_HOOKS_FILE } from "./checkout-hooks.js";
|
|
3
4
|
import { ArtifactNameSchema } from "./device-artifacts.js";
|
|
4
5
|
|
|
5
6
|
// <repo>/.intentic/run.json declares what a repository can run, and where: in the sandbox, on the owner's own computers, or
|
|
@@ -21,7 +22,7 @@ export const HEAVY_CLASSES_FILE = `${STATE_DIR}/heavy.json`;
|
|
|
21
22
|
|
|
22
23
|
// Project files under `.intentic/` live at each repository's root, including a project kept at the workspace root.
|
|
23
24
|
// The root repo tracks them (VERSIONED_STATE_PATHS in state/workspace-state.ts), so an agent's edit lands like code.
|
|
24
|
-
export const ROOT_PROJECT_PATHS: readonly string[] = [RUN_TARGETS_FILE, HEAVY_CLASSES_FILE];
|
|
25
|
+
export const ROOT_PROJECT_PATHS: readonly string[] = [RUN_TARGETS_FILE, HEAVY_CLASSES_FILE, CHECKOUT_HOOKS_FILE];
|
|
25
26
|
|
|
26
27
|
const RepoPathSchema = z
|
|
27
28
|
.string()
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// A PERSON'S LIVE VIEW OF A CONVERSATION THAT RUNS ON A RUNNER (2026-11-23), the editor's `runners.openView`. A runner is
|
|
4
|
+
// another machine's sandbox container; the editor only ever talks to this sandbox, whose netd carries the view's socket
|
|
5
|
+
// down the runner's uplink under `/system/runner-view/<runner>/…` once this daemon redeems the one-shot ticket the answer
|
|
6
|
+
// carries. Each dial asks again: a ticket opens one socket, for a few seconds.
|
|
7
|
+
|
|
8
|
+
export const RunnerViewKindSchema = z.enum(["terminal", "browser-view", "desktop-view"]);
|
|
9
|
+
export type RunnerViewKind = z.infer<typeof RunnerViewKindSchema>;
|
|
10
|
+
|
|
11
|
+
export const RunnerOpenViewInputSchema = z.object({
|
|
12
|
+
conversationId: z.string().min(1).describe("The conversation whose runner the view is of."),
|
|
13
|
+
kind: RunnerViewKindSchema.describe("A terminal, a browser window's picture, or the desktop's."),
|
|
14
|
+
session: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("The terminal session, the browser window (the runner's own name for it), or the desktop window; absent for the whole desktop."),
|
|
18
|
+
});
|
|
19
|
+
export type RunnerOpenViewInput = z.infer<typeof RunnerOpenViewInputSchema>;
|
|
20
|
+
|
|
21
|
+
export const RunnerViewSchema = z.object({
|
|
22
|
+
runner: z.string().describe("The runner the view opens on."),
|
|
23
|
+
// `/system/runner-view/<runner>/system/<view>`, on this sandbox's own address.
|
|
24
|
+
path: z.string().describe("Where the socket opens on this sandbox's address."),
|
|
25
|
+
query: z.string().describe("The query the socket opens with, its ticket included; add the view's own parameters to it."),
|
|
26
|
+
});
|
|
27
|
+
export type RunnerView = z.infer<typeof RunnerViewSchema>;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { MemberTierSchema } from "./shared.js";
|
|
3
|
+
|
|
4
|
+
// ONE SANDBOX'S TIES TO EVERYTHING OUTSIDE IT, as the person reading may see them (GET /system/reach). The editor asks
|
|
5
|
+
// every sandbox an account reaches for this answer and joins them into the account's access map (Settings ▸ Access
|
|
6
|
+
// map, docs/architecture/accounts.md): the other sandboxes this one hands work to and takes work from, the computers
|
|
7
|
+
// and servers its agents reach, and whether it may create sandboxes on its owner's account. Each daemon answers for
|
|
8
|
+
// its own ties alone, from what it stores and enforces, so the platform never learns them.
|
|
9
|
+
//
|
|
10
|
+
// Nothing here is a credential: no token, no address path, no secret. What joins two answers is an id both sides hold:
|
|
11
|
+
// a sandbox's platform id (else its address's host name), a computer's machine id (else its host name), a server's
|
|
12
|
+
// host name. Open sets (a link's answer, a device's kind, the switches it has on) are strings rather than enums, so a
|
|
13
|
+
// value a newer daemon adds never fails an older editor's parse; the known values are named below.
|
|
14
|
+
|
|
15
|
+
/** What a link's far side answered the last time this sandbox asked it (`GET /link`). */
|
|
16
|
+
export const REACH_LINK_ANSWERS = ["answering", "silent", "revoked"] as const;
|
|
17
|
+
export type ReachLinkAnswer = (typeof REACH_LINK_ANSWERS)[number];
|
|
18
|
+
|
|
19
|
+
/** What kind of thing a device card connects. */
|
|
20
|
+
export const REACH_DEVICE_KINDS = ["computer", "phone", "browser"] as const;
|
|
21
|
+
export type ReachDeviceKind = (typeof REACH_DEVICE_KINDS)[number];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A device card's switches that let an agent or a person act on the machine, in the order they are said. A card's
|
|
25
|
+
* switch that is on and named here is listed in `grants`; `roots` and the rest are settings, not grants.
|
|
26
|
+
*/
|
|
27
|
+
export const REACH_DEVICE_GRANTS = [
|
|
28
|
+
"shell",
|
|
29
|
+
"write",
|
|
30
|
+
"screen",
|
|
31
|
+
"control",
|
|
32
|
+
"sandboxes",
|
|
33
|
+
"destructive",
|
|
34
|
+
"admin",
|
|
35
|
+
"programs",
|
|
36
|
+
"remoteView",
|
|
37
|
+
"remoteControl",
|
|
38
|
+
"remoteTerminal",
|
|
39
|
+
] as const;
|
|
40
|
+
export type ReachDeviceGrant = (typeof REACH_DEVICE_GRANTS)[number];
|
|
41
|
+
|
|
42
|
+
/** The grants that let whoever holds them act on the machine as themselves (run, change or drive it), not only look. */
|
|
43
|
+
export const REACH_DEVICE_ACTING_GRANTS: readonly ReachDeviceGrant[] = ["shell", "write", "control", "destructive", "programs", "remoteControl", "remoteTerminal", "admin"];
|
|
44
|
+
|
|
45
|
+
/** A link's terms as the taking sandbox sets them, in the words both ends of a tie read. */
|
|
46
|
+
export const ReachLinkTermsSchema = z.object({
|
|
47
|
+
tasks: z.boolean().describe("Its agents may hand that sandbox tasks."),
|
|
48
|
+
records: z.boolean().describe("They may read that sandbox's conversations and diagnostics."),
|
|
49
|
+
operate: z.boolean().describe("They may run commands and read and write files there, as its owner's terminal would."),
|
|
50
|
+
approve: z.boolean().describe("Each new task waits for that sandbox's owner to allow it."),
|
|
51
|
+
role: z.string().optional().describe("The name of the role its tasks wear there; absent, they wear none."),
|
|
52
|
+
});
|
|
53
|
+
export type ReachLinkTerms = z.infer<typeof ReachLinkTermsSchema>;
|
|
54
|
+
|
|
55
|
+
// How many other people here may use one card through their own conversations: the owner and everyone on the roster
|
|
56
|
+
// who runs agents here and whose own access reaches the card. Only for a reader who runs people and access.
|
|
57
|
+
const othersField = z
|
|
58
|
+
.number()
|
|
59
|
+
.int()
|
|
60
|
+
.nonnegative()
|
|
61
|
+
.optional()
|
|
62
|
+
.describe("How many other people here may have their own agents use it. Absent when the roster is not the reader's to read.");
|
|
63
|
+
|
|
64
|
+
// Whether the reader's own conversations here may use one card: they run agents here, and their access reaches it.
|
|
65
|
+
const yoursField = z.boolean().describe("Whether the reader's own conversations here may use it.");
|
|
66
|
+
|
|
67
|
+
/** A `link` card here: this sandbox's agents may hand work to that one, under that sandbox's terms. */
|
|
68
|
+
export const ReachLinkOutSchema = z.object({
|
|
69
|
+
card: z.string().describe("The card's id here: what this sandbox's agents hand work `to`."),
|
|
70
|
+
name: z.string().optional().describe("What the other sandbox is called, as pairing named it."),
|
|
71
|
+
sandboxId: z.string().optional().describe("The other sandbox's platform id, when pairing named it."),
|
|
72
|
+
host: z.string().describe("The host name of the other sandbox's address, the join key when no id was named."),
|
|
73
|
+
answer: z.string().describe("What it answered when last asked: answering, silent (off or unreachable) or revoked."),
|
|
74
|
+
terms: ReachLinkTermsSchema.optional().describe("Its terms as the other sandbox last said them; absent while it has not answered."),
|
|
75
|
+
yours: yoursField,
|
|
76
|
+
others: othersField,
|
|
77
|
+
});
|
|
78
|
+
export type ReachLinkOut = z.infer<typeof ReachLinkOutSchema>;
|
|
79
|
+
|
|
80
|
+
/** An inbound link here: that sandbox's agents may hand work to this one, under the terms this sandbox's owner set. */
|
|
81
|
+
export const ReachLinkInSchema = z.object({
|
|
82
|
+
id: z.string(),
|
|
83
|
+
label: z.string().describe("What the asking sandbox is called here."),
|
|
84
|
+
sandboxId: z.string().optional().describe("The asking sandbox's platform id, when pairing named it."),
|
|
85
|
+
host: z.string().optional().describe("The host name of the asking sandbox's address, when pairing named it."),
|
|
86
|
+
terms: ReachLinkTermsSchema.extend({
|
|
87
|
+
runAs: z.string().optional().describe("The name of the service its tasks act as; absent, they act for this sandbox's owner."),
|
|
88
|
+
}),
|
|
89
|
+
lastUsedAt: z.number().optional().describe("When it was last used, epoch milliseconds; absent means never."),
|
|
90
|
+
waiting: z.number().int().nonnegative().describe("Tasks it handed over that wait for this sandbox's owner."),
|
|
91
|
+
});
|
|
92
|
+
export type ReachLinkIn = z.infer<typeof ReachLinkInSchema>;
|
|
93
|
+
|
|
94
|
+
/** A computer, phone or browser this sandbox's agents reach through a card of its own. */
|
|
95
|
+
export const ReachDeviceSchema = z.object({
|
|
96
|
+
card: z.string(),
|
|
97
|
+
kind: z.string().describe("computer, phone or browser."),
|
|
98
|
+
label: z.string().describe("What the owner calls it."),
|
|
99
|
+
machineId: z.string().optional().describe("The computer's own stable id, shared by every environment on it: the join key across sandboxes."),
|
|
100
|
+
hostname: z.string().optional().describe("Its OS host name, the join key when it has said no machine id."),
|
|
101
|
+
platform: z.string().optional().describe("windows, macos, linux, android, ios."),
|
|
102
|
+
online: z.boolean().optional().describe("Connected now; absent where nothing could say."),
|
|
103
|
+
grants: z.array(z.string()).describe("The card's switches that are on (REACH_DEVICE_GRANTS)."),
|
|
104
|
+
yours: yoursField,
|
|
105
|
+
others: othersField,
|
|
106
|
+
});
|
|
107
|
+
export type ReachDevice = z.infer<typeof ReachDeviceSchema>;
|
|
108
|
+
|
|
109
|
+
/** A server this sandbox's agents sign in to over SSH. */
|
|
110
|
+
export const ReachServerSchema = z.object({
|
|
111
|
+
card: z.string(),
|
|
112
|
+
host: z.string().describe("The host it dials, lowercased: the join key across sandboxes."),
|
|
113
|
+
user: z.string().optional(),
|
|
114
|
+
admin: z.boolean().describe("The card holds an admin password its agents may type to sudo or su."),
|
|
115
|
+
yours: yoursField,
|
|
116
|
+
others: othersField,
|
|
117
|
+
});
|
|
118
|
+
export type ReachServer = z.infer<typeof ReachServerSchema>;
|
|
119
|
+
|
|
120
|
+
export const SandboxReachSchema = z.object({
|
|
121
|
+
self: z.object({
|
|
122
|
+
sandboxId: z.string().optional().describe("This sandbox's platform id, as its last announce was answered; absent before one."),
|
|
123
|
+
runsOn: z
|
|
124
|
+
.object({ host: z.string().optional(), os: z.string().optional() })
|
|
125
|
+
.optional()
|
|
126
|
+
.describe("The machine this copy runs on and its side, as its host named them. Only for the owner and Full access."),
|
|
127
|
+
org: z
|
|
128
|
+
.object({ id: z.string(), name: z.string() })
|
|
129
|
+
.optional()
|
|
130
|
+
.describe("The organisation whose policy this daemon enforces here; absent for a personal sandbox."),
|
|
131
|
+
}),
|
|
132
|
+
reader: z.object({
|
|
133
|
+
tier: MemberTierSchema.describe("The reader's tier here, as this daemon enforces it now."),
|
|
134
|
+
agents: z.boolean().describe("Whether the reader's conversations here run agents."),
|
|
135
|
+
}),
|
|
136
|
+
linksOut: z.array(ReachLinkOutSchema),
|
|
137
|
+
linksIn: z.array(ReachLinkInSchema).optional().describe("Absent below Full access: minting and reading inbound links is theirs."),
|
|
138
|
+
devices: z.array(ReachDeviceSchema),
|
|
139
|
+
servers: z.array(ReachServerSchema),
|
|
140
|
+
fleet: z
|
|
141
|
+
.object({ yours: yoursField, others: othersField })
|
|
142
|
+
.optional()
|
|
143
|
+
.describe("This sandbox holds a fleet card: its agents may create and manage sandboxes on its owner's account."),
|
|
144
|
+
people: z
|
|
145
|
+
.number()
|
|
146
|
+
.int()
|
|
147
|
+
.nonnegative()
|
|
148
|
+
.optional()
|
|
149
|
+
.describe("How many other people may sign in here, the owner included when the reader is not them. Absent when the roster is not the reader's to read."),
|
|
150
|
+
readAt: z.number().describe("When this answer was put together, epoch milliseconds."),
|
|
151
|
+
});
|
|
152
|
+
export type SandboxReach = z.infer<typeof SandboxReachSchema>;
|
|
153
|
+
|
|
154
|
+
/** The host name of an address, lowercased, with no scheme, port, path or credentials: the join key two answers share. */
|
|
155
|
+
export const reachHostOf = (address: string): string =>
|
|
156
|
+
address
|
|
157
|
+
.trim()
|
|
158
|
+
.toLowerCase()
|
|
159
|
+
.replace(/^[a-z][a-z0-9+.-]*:\/\//, "")
|
|
160
|
+
.replace(/^[^@/]*@/, "")
|
|
161
|
+
.replace(/[/:?#].*$/, "");
|
|
@@ -244,6 +244,7 @@ test("build output defaults: six idle hours, reaping under 15% free, full debug
|
|
|
244
244
|
expect(defaults.buildOutputIdleHours).toBe(6);
|
|
245
245
|
expect(defaults.diskReapBelowPercent).toBe(15);
|
|
246
246
|
expect(defaults.leanRustBuilds).toBe(false);
|
|
247
|
+
expect(defaults.rustIncrementalOff).toBe(false);
|
|
247
248
|
expect(SandboxSettingsSchema.safeParse({ buildOutputIdleHours: 0 }).success).toBe(false);
|
|
248
249
|
expect(SandboxSettingsSchema.safeParse({ diskReapBelowPercent: 4 }).success).toBe(false);
|
|
249
250
|
});
|
|
@@ -298,13 +299,13 @@ describe(`default job setups`, () => {
|
|
|
298
299
|
});
|
|
299
300
|
});
|
|
300
301
|
|
|
301
|
-
// A memory kill's answer
|
|
302
|
-
//
|
|
302
|
+
// A memory kill's answer and the restart switch are both on to begin with: a memory kill lets its victims back one at a
|
|
303
|
+
// time once memory settles (turn-break.ts), any other restart resumes what it cut. Only the two answers it takes are written.
|
|
303
304
|
describe(`the answer to a memory kill`, () => {
|
|
304
|
-
test(`resumes by default,
|
|
305
|
+
test(`resumes by default, as resuming after any restart does`, () => {
|
|
305
306
|
const defaults = SandboxSettingsSchema.parse({});
|
|
306
307
|
expect(defaults.memoryKillPolicy).toBe(`resume`);
|
|
307
|
-
expect(defaults.autoResumeOnRestart).toBe(
|
|
308
|
+
expect(defaults.autoResumeOnRestart).toBe(true);
|
|
308
309
|
});
|
|
309
310
|
|
|
310
311
|
test(`takes wait or resume and nothing else`, () => {
|