@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
package/src/ids/project-dir.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { STARTER_REPO } from "../state/starter.js";
|
|
|
4
4
|
// A PROJECT SANDBOX is made for one folder on the owner's computer, synced live into `/work/<name>` rather than into
|
|
5
5
|
// /work itself: the workspace root is the daemon's own, where it keeps its state, seeds its starter repo and serves
|
|
6
6
|
// `public/` to anyone with a link. `<name>` is derived from the folder's name once, on the owner's side, and every
|
|
7
|
-
// later reader (the sync agent, `ic`, the daemon) only validates it. `
|
|
7
|
+
// later reader (the sync agent, `ic`, the daemon) only validates it. `_hosts/ic/src/sandbox/project_dir.rs` holds the
|
|
8
8
|
// validation again for the host side; `project-dir.fixture.json` is the one set of cases both run.
|
|
9
9
|
|
|
10
10
|
// Top-level names the daemon treats as its own, so a project can never land on one: the public outbox, the reference
|
|
@@ -23,4 +23,18 @@ describe("project id", () => {
|
|
|
23
23
|
expect(normalizeProjectId(text)).toBeUndefined();
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
+
|
|
27
|
+
it("drops a query, a fragment and trailing slashes as before", () => {
|
|
28
|
+
expect(normalizeProjectId("https://github.com/acme/app.git//?ref=main#readme")).toBe("github.com/acme/app");
|
|
29
|
+
expect(normalizeProjectId("https://github.com//acme///app///")).toBe("github.com/acme/app");
|
|
30
|
+
expect(normalizeProjectId("https://github.com/acme/app#x?y")).toBe("github.com/acme/app");
|
|
31
|
+
expect(normalizeProjectId("github.com/acme/.git")).toBeUndefined();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("answers at once for a long run of `#` or `/`", () => {
|
|
35
|
+
// No clock: the old patterns were quadratic on these, so a return of them runs past the test's own timeout.
|
|
36
|
+
expect(normalizeProjectId(`#${"#".repeat(100_000)}`)).toBeUndefined();
|
|
37
|
+
expect(normalizeProjectId(`a${"/".repeat(100_000)}b?`)).toBeUndefined();
|
|
38
|
+
expect(normalizeProjectId(`github.com${"/".repeat(100_000)}acme/app${"/".repeat(100_000)}`)).toBe("github.com/acme/app");
|
|
39
|
+
});
|
|
26
40
|
});
|
package/src/ids/project-id.ts
CHANGED
|
@@ -24,11 +24,13 @@ export const normalizeProjectId = (raw: string): string | undefined => {
|
|
|
24
24
|
text = text.replace(/^[^@/]*@/, "");
|
|
25
25
|
text = text.replace(/^([^/:]+):\d+\//, "$1/");
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
// Cut at the first `?` or `#` and collapse slash runs before taking the trailing one: `/[?#].*$/` and `/\/+$/` retried
|
|
28
|
+
// from every `#` or `/` in a long remote, quadratic in its length.
|
|
29
|
+
const query = text.search(/[?#]/);
|
|
30
|
+
text = (query === -1 ? text : text.slice(0, query))
|
|
31
31
|
.replace(/\/+/g, "/")
|
|
32
|
+
.replace(/\/$/, "")
|
|
33
|
+
.replace(/\.git$/i, "")
|
|
32
34
|
.toLowerCase();
|
|
33
35
|
return text.length <= PROJECT_ID_MAX && PROJECT_ID.test(text) ? text : undefined;
|
|
34
36
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TranscriptPatch, TranscriptRow } from "../events/transcript.js";
|
|
2
|
+
import { RunRowIds } from "./run-row-ids.js";
|
|
3
|
+
|
|
4
|
+
// The stamp every server of a run puts on its rows (the sandbox daemon, the desktop app's agents on a computer): which
|
|
5
|
+
// run made a row, and the row's own id, kept in step with the fold's rows by following its patches.
|
|
6
|
+
|
|
7
|
+
const row = (text: string, rowId?: string): TranscriptRow => (rowId === undefined ? { role: `assistant`, text } : { role: `assistant`, text, rowId });
|
|
8
|
+
|
|
9
|
+
describe(`RunRowIds`, () => {
|
|
10
|
+
it(`keeps the ids its opening rows came with, and draws one for a row that has none`, () => {
|
|
11
|
+
const ids = new RunRowIds([row(`kept`, `row_kept`), row(`new`)]);
|
|
12
|
+
expect(ids.at(0)).toBe(`row_kept`);
|
|
13
|
+
expect(ids.at(1)).toEqual(expect.any(String));
|
|
14
|
+
expect(ids.at(1)).not.toBe(`row_kept`);
|
|
15
|
+
expect(ids.at(2)).toBeUndefined();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it(`stamps an appended row with its run and a fresh id, and names the row every later change is about`, () => {
|
|
19
|
+
const ids = new RunRowIds([]);
|
|
20
|
+
const appended = ids.stamp({ op: `append`, row: row(`hello`) }, `run-1`);
|
|
21
|
+
const rowId = ids.at(0);
|
|
22
|
+
expect(appended).toEqual({ op: `append`, row: { role: `assistant`, text: `hello`, run: `run-1`, rowId } });
|
|
23
|
+
expect(ids.stamp({ op: `text`, index: 0, text: ` there` }, `run-1`)).toEqual({ op: `text`, index: 0, rowId, text: ` there` });
|
|
24
|
+
const replaced: TranscriptPatch = ids.stamp({ op: `replace`, index: 0, row: row(`whole`) }, `run-1`);
|
|
25
|
+
expect(replaced).toEqual({ op: `replace`, index: 0, rowId, row: { role: `assistant`, text: `whole`, run: `run-1`, rowId } });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it(`lets a dropped row's id go, so the rows after it keep their own`, () => {
|
|
29
|
+
const ids = new RunRowIds([row(`a`, `row_a`), row(`b`, `row_b`)]);
|
|
30
|
+
expect(ids.stamp({ op: `drop`, index: 0 }, `run-1`)).toEqual({ op: `drop`, index: 0, rowId: `row_a` });
|
|
31
|
+
expect(ids.at(0)).toBe(`row_b`);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it(`leaves a change to a row it never saw as it came`, () => {
|
|
35
|
+
const ids = new RunRowIds([]);
|
|
36
|
+
expect(ids.stamp({ op: `text`, index: 3, text: `late` }, `run-1`)).toEqual({ op: `text`, index: 3, text: `late` });
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { TranscriptPatch, TranscriptRow } from "../events/transcript.js";
|
|
2
|
+
import { newRowId } from "./row-ids.js";
|
|
3
|
+
|
|
4
|
+
// Each of a run's rows by its own id (TranscriptRow.rowId), kept beside the fold's rows (index for index) rather than in
|
|
5
|
+
// them: the fold mints nothing, and every change it makes to its rows leaves as a patch, so following the patches, in
|
|
6
|
+
// the fold's order, keeps the two aligned. A run carried on after a restart keeps the ids its rows were drawn under,
|
|
7
|
+
// which the windows showing it hold.
|
|
8
|
+
//
|
|
9
|
+
// In the contract, beside the row ids it hands out, because everything that serves a run stamps its rows the same way: the sandbox's
|
|
10
|
+
// daemon, and the desktop app's agents on a computer (2026-11-24). A reader finds where a run's rows sit in what it
|
|
11
|
+
// already holds by these stamps (`run`, `rowId`), so a server that left them off had its finished turn drawn twice.
|
|
12
|
+
export class RunRowIds {
|
|
13
|
+
private readonly ids: string[];
|
|
14
|
+
|
|
15
|
+
constructor(opening: readonly TranscriptRow[]) {
|
|
16
|
+
this.ids = opening.map((row) => row.rowId ?? newRowId());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** The id of the row at `index` as the fold holds it now. */
|
|
20
|
+
at(index: number): string | undefined {
|
|
21
|
+
return this.ids[index];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A patch naming its row, and the stamp `run` on any row it carries: an append draws a new id (or keeps the one the
|
|
26
|
+
* row came with), a drop lets its row's go, and every other change names the row it changes.
|
|
27
|
+
*/
|
|
28
|
+
stamp(patch: TranscriptPatch, run: string): TranscriptPatch {
|
|
29
|
+
switch (patch.op) {
|
|
30
|
+
case "append": {
|
|
31
|
+
const rowId = patch.row.rowId ?? newRowId();
|
|
32
|
+
this.ids.push(rowId);
|
|
33
|
+
return { ...patch, row: { ...patch.row, run, rowId } };
|
|
34
|
+
}
|
|
35
|
+
case "drop": {
|
|
36
|
+
const [rowId] = this.ids.splice(patch.index, 1);
|
|
37
|
+
return rowId === undefined ? patch : { ...patch, rowId };
|
|
38
|
+
}
|
|
39
|
+
case "replace": {
|
|
40
|
+
const rowId = this.ids[patch.index];
|
|
41
|
+
return rowId === undefined ? { ...patch, row: { ...patch.row, run } } : { ...patch, rowId, row: { ...patch.row, run, rowId } };
|
|
42
|
+
}
|
|
43
|
+
default: {
|
|
44
|
+
const rowId = this.ids[patch.index];
|
|
45
|
+
return rowId === undefined ? patch : { ...patch, rowId };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { providersContract } from "./contracts/providers.contract.js";
|
|
|
41
41
|
import { publicContract } from "./contracts/public.contract.js";
|
|
42
42
|
import { pushContract } from "./contracts/push.contract.js";
|
|
43
43
|
import { remoteContract } from "./contracts/remote.contract.js";
|
|
44
|
+
import { runnersContract } from "./contracts/runners.contract.js";
|
|
44
45
|
import { rolesContract } from "./contracts/roles.contract.js";
|
|
45
46
|
import { runsContract } from "./contracts/runs.contract.js";
|
|
46
47
|
import { safetyContract } from "./contracts/safety.contract.js";
|
|
@@ -103,6 +104,7 @@ export const sandboxContract: {
|
|
|
103
104
|
push: typeof pushContract;
|
|
104
105
|
remote: typeof remoteContract;
|
|
105
106
|
roles: typeof rolesContract;
|
|
107
|
+
runners: typeof runnersContract;
|
|
106
108
|
runs: typeof runsContract;
|
|
107
109
|
safety: typeof safetyContract;
|
|
108
110
|
seal: typeof sealContract;
|
|
@@ -158,6 +160,7 @@ export const sandboxContract: {
|
|
|
158
160
|
push: pushContract,
|
|
159
161
|
remote: remoteContract,
|
|
160
162
|
roles: rolesContract,
|
|
163
|
+
runners: runnersContract,
|
|
161
164
|
runs: runsContract,
|
|
162
165
|
safety: safetyContract,
|
|
163
166
|
seal: sealContract,
|
|
@@ -275,14 +275,17 @@ test("the ceiling has nothing to disclose; a floor names what it lacks", () => {
|
|
|
275
275
|
expect(acp).not.toContain("no code runs, shell only");
|
|
276
276
|
expect(acpCaps.commands).toBe(true);
|
|
277
277
|
expect(acpCaps.terminals).toBe(true);
|
|
278
|
-
// Per-tool approvals and
|
|
279
|
-
//
|
|
280
|
-
// the turn's one exit's (a failure coded by its words, a silent agent coded an
|
|
278
|
+
// Per-tool approvals, questions and effort ride the protocol's own seams (request_permission, form elicitation, the
|
|
279
|
+
// session's `thought_level` option where the agent offers one); isolation stays off, since the pooled process is
|
|
280
|
+
// every conversation's. Recovery is the turn's one exit's (a failure coded by its words, a silent agent coded an
|
|
281
|
+
// outage), so it is every agent's too.
|
|
281
282
|
expect(acpCaps.permissions).toBe("modes");
|
|
282
283
|
expect(acpCaps.questions).toBe(true);
|
|
284
|
+
expect(acpCaps.effort).toBe(true);
|
|
283
285
|
expect(acp).not.toContain("no per-tool approvals");
|
|
284
286
|
expect(acp).not.toContain("no clarifying questions");
|
|
285
|
-
expect(acp).
|
|
287
|
+
expect(acp).not.toContain("no effort control");
|
|
288
|
+
expect(acp).toContain("worktree by cwd only");
|
|
286
289
|
expect(acp).not.toContain("no auto-resume after outage");
|
|
287
290
|
|
|
288
291
|
// Codex takes the daemon's own servers too, over the door, so only plugins are missing.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { providerHas, providerTraits } from "./providers/provider-traits.js";
|
|
1
2
|
import { ACP, type AgentCapabilities, CLAUDE_CODE, CODEX, MUSE, OPENCODE, PI } from "./agent-runtimes.js";
|
|
2
3
|
import { type LoopTerms, type NativeProvider, PROVIDER_SPECS, type ProviderAccess, type ProviderLoops, providerSpec } from "./provider-specs.js";
|
|
3
4
|
import type { AgentHarness, AgentLoop, AgentProvider, PermissionMode } from "../schemas/agent.js";
|
|
@@ -257,7 +258,7 @@ export const EFFORT_TIERS: readonly string[] = ["minimal", "low", "medium", "hig
|
|
|
257
258
|
// Filters exactly one pair: Claude's `max` with thinking explicitly false, the one combination Anthropic's API refuses
|
|
258
259
|
// (400). Absent thinking is not off; the model's own default answers, every other tier or provider passes through.
|
|
259
260
|
export const effortAllowed = (effort: string, provider: AgentProvider, thinking: boolean | undefined): boolean =>
|
|
260
|
-
effort !== "max" || provider !== "
|
|
261
|
+
effort !== "max" || providerTraits(provider)?.effortScale !== "anthropic" || thinking !== false;
|
|
261
262
|
|
|
262
263
|
// The same rule applied as a repair, not a filter: a route, extension, restored tab or pinned model can all bypass the
|
|
263
264
|
// picker. The tier moves, not the thinking setting, since turning thinking off was the user's own deliberate choice.
|
|
@@ -273,4 +274,4 @@ export const sendableThinking = (effort: string | undefined, thinking: boolean |
|
|
|
273
274
|
// false). The Claude Code loop also needs a first-party route, since it serves translated and non-Anthropic endpoints
|
|
274
275
|
// that refuse it; any other loop that can ask speaks to its own vendor, whose catalog is where the badge came from.
|
|
275
276
|
export const fastAllowed = (capabilities: AgentCapabilities, provider: AgentProvider, badges: readonly ModelBadge[] | undefined): boolean =>
|
|
276
|
-
capabilities.fastMode && (capabilities.runtime !== "claude-code" || provider
|
|
277
|
+
capabilities.fastMode && (capabilities.runtime !== "claude-code" || providerHas(provider, "firstPartyAnthropic")) && (badges ?? []).includes("fast");
|
|
@@ -3,7 +3,7 @@ import type { AutomationApproval } from "../schemas/automations.js";
|
|
|
3
3
|
import { goesBySelf } from "../schemas/agent-next.js";
|
|
4
4
|
import { automationOf, movedAt, type StackMember, stackHeads } from "./agent-stack.js";
|
|
5
5
|
import { parentOf } from "./agent-starter.js";
|
|
6
|
-
import { type AgentStanding, blocked, heardByParent, onlyOwnerCanAnswer, turnInFlight, turnWorking, watching } from "./agent-standing.js";
|
|
6
|
+
import { type AgentStanding, blocked, heardByParent, onlyOwnerCanAnswer, supervising, turnInFlight, turnWorking, watching } from "./agent-standing.js";
|
|
7
7
|
|
|
8
8
|
// The lane every surface files a conversation in, and what of a fleet calls the person. Moved here from the editor
|
|
9
9
|
// (_editor/web/src/models/agent-status/agentStatus-lanes.ts, which re-exports it) on 2026-10-16, so the daemon's
|
|
@@ -81,6 +81,13 @@ export const laneOf = (agent: AgentStanding): FleetLane => {
|
|
|
81
81
|
if (goesBySelf(agent)) {
|
|
82
82
|
return "active";
|
|
83
83
|
}
|
|
84
|
+
// A parent whose own turn ended while what it started works on (a workflow run, a spawned child still running or
|
|
85
|
+
// still waiting to start) is woken by their reports, so the same holds: Finished would call over an orchestration
|
|
86
|
+
// that is half done. The board already lifted a family into Active for a child conversation running under it
|
|
87
|
+
// (childFold), but a workflow between agents and a child not yet started are no card, so nothing lifted it.
|
|
88
|
+
if (supervising(agent)) {
|
|
89
|
+
return "active";
|
|
90
|
+
}
|
|
84
91
|
// `landed`/`idle`/`ready` all finish here: `ready` is work held on the branch because auto-land is off, still
|
|
85
92
|
// finished rather than attention since nothing is failing. `resumed` lands here too: nothing running, nothing
|
|
86
93
|
// owed.
|
|
@@ -268,9 +268,10 @@ export const ACP: AgentCapabilities = {
|
|
|
268
268
|
mcp: "tools",
|
|
269
269
|
// The JS backend is the door's `code` server, each script asked of the turn's gate before it runs.
|
|
270
270
|
execution: ["shell", "js"],
|
|
271
|
-
// A session's `thought_level` option takes the turn's effort where the agent offers one (acp-model.ts)
|
|
272
|
-
//
|
|
273
|
-
|
|
271
|
+
// A session's `thought_level` option takes the turn's effort where the agent offers one (acp-model.ts); one offering
|
|
272
|
+
// none keeps its own level. The agent owns its reasoning settings, so the picker draws no scale and names no effort
|
|
273
|
+
// for it (the editor's effortScale.ts ownsReasoning): only an effort a turn names itself, a spawn's, reaches it.
|
|
274
|
+
effort: true,
|
|
274
275
|
fastMode: false,
|
|
275
276
|
// One warm process serves every conversation on the agent, each session in its own cwd; a mount namespace belongs to
|
|
276
277
|
// one turn, so a process shared across conversations can stand in none of them. Keying the pool by namespace would
|
|
@@ -329,9 +330,9 @@ export const GROK_BUILD: AgentCapabilities = {
|
|
|
329
330
|
...ACP,
|
|
330
331
|
runtime: "grok-build",
|
|
331
332
|
effort: true,
|
|
332
|
-
// Its ask-user tool
|
|
333
|
-
//
|
|
334
|
-
questions:
|
|
333
|
+
// Its ask-user tool asks through an xAI protocol extension (`_x.ai/ask_user_question`), not form elicitation; the
|
|
334
|
+
// daemon answers it on the question card through Grok's dialect (@intentic/acp-events dialects/grok-questions.ts).
|
|
335
|
+
questions: true,
|
|
335
336
|
};
|
|
336
337
|
|
|
337
338
|
// Pi driven over its RPC mode: above the ACP floor and below the Claude Code ceiling. Real mid-turn steering, an effort
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type AgentAttention,
|
|
3
3
|
type AgentJob,
|
|
4
|
+
type AgentScriptRun,
|
|
4
5
|
type AgentStatus,
|
|
5
6
|
type AgentWatch,
|
|
6
7
|
awaitsWake,
|
|
@@ -67,6 +68,10 @@ export interface AgentStanding {
|
|
|
67
68
|
// review, test or ask, which hangs under that conversation's card and is never reported to it
|
|
68
69
|
// (subagents/child-report.ts), so nothing it stops on is that conversation's news. Absent for every other one.
|
|
69
70
|
readonly fresh?: { readonly of: string } | undefined;
|
|
71
|
+
// Workflow runs it started that are still going (AgentSummary.scriptRuns), and how many of the subagents it started
|
|
72
|
+
// are still live (AgentSummary.subagents); `supervising` reads both. Absent for nearly every conversation.
|
|
73
|
+
readonly scriptRuns?: readonly AgentScriptRun[] | undefined;
|
|
74
|
+
readonly subagents?: { readonly running: number } | undefined;
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
// A spent allowance, not a failure to fix: nothing broken, and it comes back. Read off `failureCode` rather than
|
|
@@ -100,6 +105,14 @@ export const conflictIsYours = (agent: AgentStanding): boolean =>
|
|
|
100
105
|
// reading (a watch, or a wake waiting in its queue); a daemon older than it is read by its watches.
|
|
101
106
|
export const watching = (agent: AgentStanding): boolean => awaitsWake(agent);
|
|
102
107
|
|
|
108
|
+
// Something it started is still at work and will be reported to it in a turn of its own: a workflow run still starting
|
|
109
|
+
// agents, or a subagent that is live (spawned, handed over a link, or waiting for a seat, memory or the owner to
|
|
110
|
+
// start). Such a parent is not finished even when its own turn ended. An in-process subagent dies with the turn that ran
|
|
111
|
+
// it (subagents.ts `closeSubagents`), so once that turn is over the count holds only children that will report back.
|
|
112
|
+
// 2026-11-25: an orchestrator whose workflow had three children waiting to start was shown in Finished with "3 at work"
|
|
113
|
+
// in its tray.
|
|
114
|
+
export const supervising = (agent: AgentStanding): boolean => (agent.scriptRuns?.length ?? 0) > 0 || (agent.subagents?.running ?? 0) > 0;
|
|
115
|
+
|
|
103
116
|
// The running job behind one of its armed watches that sits at a prompt (AgentJob.inputWait: blocked reading its
|
|
104
117
|
// terminal, nothing moving), the first such where there are several. Its watch fires only on an exit that will not
|
|
105
118
|
// come, so the card names it and offers to end it.
|
|
@@ -165,12 +165,12 @@ test("cursor holds every mode, a tool list, the terminal panel and its own skill
|
|
|
165
165
|
});
|
|
166
166
|
|
|
167
167
|
// Devin runs the ACP floor under its own name: what the floor gained (approvals, questions) it has too, and the effort
|
|
168
|
-
// scale it does not advertise stays off.
|
|
168
|
+
// scale it does not advertise stays off, the one place it differs from the floor.
|
|
169
169
|
test("devin is the ACP floor under its own name", () => {
|
|
170
170
|
const devin = capabilitiesOf("devin", "native");
|
|
171
171
|
const floor = capabilitiesOf("some-installed-agent", "native");
|
|
172
172
|
expect(devin.runtime).toBe("devin");
|
|
173
|
-
expect({ ...devin, runtime: floor.runtime }).toEqual(floor);
|
|
173
|
+
expect({ ...devin, runtime: floor.runtime, effort: floor.effort }).toEqual(floor);
|
|
174
174
|
expect(devin.permissions).toBe("modes");
|
|
175
175
|
expect(devin.questions).toBe(true);
|
|
176
176
|
expect(devin.effort).toBe(false);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { HUB_ACCOUNT_PROVIDERS } from "../../schemas/connection-hub.js";
|
|
2
|
+
import { NATIVE_PROVIDERS, providerSpec } from "../provider-specs.js";
|
|
3
|
+
import { HUB_PROVIDERS, isModelPlaced, PROVIDER_TRAITS, providerHas, providersWhere, providerTraits } from "./provider-traits.js";
|
|
4
|
+
|
|
5
|
+
// Sorted, so a pin reads as a list and order never decides a match.
|
|
6
|
+
const sorted = (providers: Iterable<string>): string[] => [...providers].toSorted();
|
|
7
|
+
const where = (pick: Parameters<typeof providersWhere>[0]): string[] => sorted(providersWhere(pick));
|
|
8
|
+
const byProvider = <T,>(read: (provider: (typeof NATIVE_PROVIDERS)[number]) => T): Record<string, T> =>
|
|
9
|
+
Object.fromEntries(NATIVE_PROVIDERS.map((provider) => [provider, read(provider)]));
|
|
10
|
+
|
|
11
|
+
test("the table has one row per native provider", () => {
|
|
12
|
+
expect(sorted(Object.keys(PROVIDER_TRAITS))).toEqual(sorted(NATIVE_PROVIDERS));
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Each pin is the hand-kept list or `provider === "x"` branch the trait replaced, as it stood on 2026-11-23: a change here is
|
|
16
|
+
// a behaviour change.
|
|
17
|
+
test("every derived set matches the list or branch it replaced", () => {
|
|
18
|
+
expect(HUB_ACCOUNT_PROVIDERS).toEqual(["cursor", "devin", "zai", "meta"]);
|
|
19
|
+
expect(HUB_PROVIDERS).toEqual(HUB_ACCOUNT_PROVIDERS);
|
|
20
|
+
expect(where((t) => t.firstPartyAnthropic)).toEqual(["claude"]);
|
|
21
|
+
expect(where((t) => t.effortScale === "anthropic")).toEqual(["claude"]);
|
|
22
|
+
expect(where((t) => t.thinkingToggle)).toEqual(["claude"]);
|
|
23
|
+
expect(where((t) => t.seatProbe)).toEqual(["claude"]);
|
|
24
|
+
expect(where((t) => t.placesByModel)).toEqual(sorted(["claude", "cursor"]));
|
|
25
|
+
expect(where((t) => t.childPlacement === "per-account")).toEqual(["claude"]);
|
|
26
|
+
expect(where((t) => t.needsProject)).toEqual(["gemini"]);
|
|
27
|
+
expect(where((t) => t.refusesClaudeCodeMentions)).toEqual(["gemini"]);
|
|
28
|
+
expect(where((t) => t.opencodeWire === "openai-responses")).toEqual(["codex"]);
|
|
29
|
+
expect(where((t) => t.pasteBack === "token")).toEqual(["devin"]);
|
|
30
|
+
expect(where((t) => t.signInCodePrefilled)).toEqual(["grok"]);
|
|
31
|
+
expect(Object.fromEntries(providersWhere((t) => t.ownSignInLoop !== undefined).map((p) => [p, providerTraits(p)?.ownSignInLoop]))).toEqual({
|
|
32
|
+
grok: "opencode",
|
|
33
|
+
});
|
|
34
|
+
expect(Object.fromEntries(providersWhere((t) => t.translatorSignIn !== undefined).map((p) => [p, providerTraits(p)?.translatorSignIn]))).toEqual({
|
|
35
|
+
codex: "device-or-loopback",
|
|
36
|
+
grok: "device",
|
|
37
|
+
kimi: "device",
|
|
38
|
+
gemini: "redirect",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test("the compliance report's provider hosts are today's", () => {
|
|
43
|
+
expect(byProvider((provider) => providerTraits(provider)?.destination)).toEqual({
|
|
44
|
+
claude: { hosts: ["api.anthropic.com"], operator: "Anthropic PBC", region: "US", thirdCountry: true },
|
|
45
|
+
codex: { hosts: ["chatgpt.com", "api.openai.com"], operator: "OpenAI", region: "US", thirdCountry: true },
|
|
46
|
+
grok: { hosts: ["api.x.ai"], operator: "xAI", region: "US", thirdCountry: true },
|
|
47
|
+
kimi: { hosts: ["api.kimi.com"], operator: "Moonshot AI", region: "CN", thirdCountry: true },
|
|
48
|
+
gemini: undefined,
|
|
49
|
+
cursor: undefined,
|
|
50
|
+
devin: undefined,
|
|
51
|
+
meta: { hosts: ["api.meta.ai"], operator: "Meta Platforms", region: "US", thirdCountry: true },
|
|
52
|
+
zai: { hosts: ["api.z.ai"], operator: "Z.ai", thirdCountry: true },
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test("translator-only traits sit on translator providers alone", () => {
|
|
57
|
+
for (const provider of NATIVE_PROVIDERS) {
|
|
58
|
+
const translator = providerSpec(provider)?.auth.kind === "translator";
|
|
59
|
+
expect({ provider, signIn: providerTraits(provider)?.translatorSignIn !== undefined }).toEqual({ provider, signIn: translator });
|
|
60
|
+
if (providerTraits(provider)?.ownSignInLoop !== undefined) {
|
|
61
|
+
expect(translator).toBe(true);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("a string no native provider answers to has no traits", () => {
|
|
67
|
+
expect(providerTraits("endpoint/acme")).toBeUndefined();
|
|
68
|
+
expect(providerHas("endpoint/acme", "firstPartyAnthropic")).toBe(false);
|
|
69
|
+
expect(isModelPlaced("cursor")).toBe(true);
|
|
70
|
+
expect(isModelPlaced("devin")).toBe(false);
|
|
71
|
+
});
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// WHAT EACH NATIVE PROVIDER IS, beyond what its spec row (provider-specs.ts) says it costs and how it signs in: one row per
|
|
2
|
+
// provider of every fact a surface used to answer with `provider === "x"`. A reader asks the trait ("is Anthropic itself on
|
|
3
|
+
// the wire", "does its key travel through the hub"), never the name, so a new provider is one row the compiler makes
|
|
4
|
+
// complete (`satisfies Record<NativeProvider, …>`) instead of a branch hunt across the editor and the daemon.
|
|
5
|
+
// Pure data with no schema, so the contract lock does not see it.
|
|
6
|
+
import type { AgentLoop } from "../../schemas/agent.js";
|
|
7
|
+
import type { NativeProvider } from "../provider-specs.js";
|
|
8
|
+
|
|
9
|
+
// Who a model provider's own hosts belong to, for the compliance report's data-flow list. A region is given only where the
|
|
10
|
+
// operator publishes one.
|
|
11
|
+
export interface ProviderDestination {
|
|
12
|
+
readonly hosts: readonly string[];
|
|
13
|
+
readonly operator: string;
|
|
14
|
+
readonly region?: string;
|
|
15
|
+
readonly thirdCountry: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ProviderTraits {
|
|
19
|
+
// Its account is a key that does not rotate, so it may travel through the connections hub (schemas/connection-hub.ts).
|
|
20
|
+
readonly hubAccount: boolean;
|
|
21
|
+
// Its own hosts and their operator, for the compliance report; absent where the report names none.
|
|
22
|
+
readonly destination?: ProviderDestination;
|
|
23
|
+
// Anthropic itself serves the wire, not a vendor wearing Anthropic's API: its prompt cache lifetime is published, the
|
|
24
|
+
// CLI's tool search and fast mode reach it, and a cold-cache trim is worth making.
|
|
25
|
+
readonly firstPartyAnthropic: boolean;
|
|
26
|
+
// The reasoning ladder its models climb before a catalog says otherwise. `anthropic` claims `max` in the floor, and its
|
|
27
|
+
// API refuses `max` with thinking explicitly off.
|
|
28
|
+
readonly effortScale: "anthropic" | "standard";
|
|
29
|
+
// It publishes an extended-thinking switch a person may turn off.
|
|
30
|
+
readonly thinkingToggle: boolean;
|
|
31
|
+
// An account an admin held back is probed again for its seat (the seat check), so a lifted hold is found.
|
|
32
|
+
readonly seatProbe: boolean;
|
|
33
|
+
// Which account an unnamed pick lands on depends on the model, so an unnamed model is judged as the catalog's default.
|
|
34
|
+
readonly placesByModel: boolean;
|
|
35
|
+
// How the budget planner sees its ready accounts: each one a child may be placed on, or one pool the gateway spends.
|
|
36
|
+
readonly childPlacement: "per-account" | "pooled";
|
|
37
|
+
// A loop of a translator provider that spends the provider's own default sign-in (held at its own door) rather than the
|
|
38
|
+
// translator's subscription: OpenCode holds Grok's xAI account. That loop holds one such account.
|
|
39
|
+
readonly ownSignInLoop?: AgentLoop;
|
|
40
|
+
// How the translator's sign-in for it runs, for a translator provider: a device code, a redirect the vendor's page
|
|
41
|
+
// ends on, or a device login that may instead end on a loopback redirect a paired computer catches.
|
|
42
|
+
readonly translatorSignIn?: "device" | "redirect" | "device-or-loopback";
|
|
43
|
+
// Its sign-in must also discover a billing project, and a credential filed without one cannot run a turn.
|
|
44
|
+
readonly needsProject: boolean;
|
|
45
|
+
// Its vendor refuses requests that announce Claude Code, so the gateway scrubs those phrases on the way out.
|
|
46
|
+
readonly refusesClaudeCodeMentions: boolean;
|
|
47
|
+
// The wire its translator route speaks to OpenCode: Codex's own Responses surface, or Chat Completions.
|
|
48
|
+
readonly opencodeWire: "openai-responses" | "openai-chat";
|
|
49
|
+
// What the person brings back from a paste-back sign-in, named as the vendor's page names it.
|
|
50
|
+
readonly pasteBack: "code" | "token";
|
|
51
|
+
// Its device sign-in opens with the code already filled in, so there is nothing to type.
|
|
52
|
+
readonly signInCodePrefilled: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const plain = {
|
|
56
|
+
hubAccount: false,
|
|
57
|
+
firstPartyAnthropic: false,
|
|
58
|
+
effortScale: "standard",
|
|
59
|
+
thinkingToggle: false,
|
|
60
|
+
seatProbe: false,
|
|
61
|
+
placesByModel: false,
|
|
62
|
+
childPlacement: "pooled",
|
|
63
|
+
needsProject: false,
|
|
64
|
+
refusesClaudeCodeMentions: false,
|
|
65
|
+
opencodeWire: "openai-chat",
|
|
66
|
+
pasteBack: "code",
|
|
67
|
+
signInCodePrefilled: false,
|
|
68
|
+
} as const;
|
|
69
|
+
|
|
70
|
+
// In PROVIDER_SPECS' order but for Z.ai before Meta: a derived list keeps the table's order, and HUB_ACCOUNT_PROVIDERS'
|
|
71
|
+
// wire enum has always listed zai first (the contract lock would see the swap).
|
|
72
|
+
export const PROVIDER_TRAITS = {
|
|
73
|
+
claude: {
|
|
74
|
+
...plain,
|
|
75
|
+
destination: { hosts: ["api.anthropic.com"], operator: "Anthropic PBC", region: "US", thirdCountry: true },
|
|
76
|
+
firstPartyAnthropic: true,
|
|
77
|
+
effortScale: "anthropic",
|
|
78
|
+
thinkingToggle: true,
|
|
79
|
+
seatProbe: true,
|
|
80
|
+
placesByModel: true,
|
|
81
|
+
childPlacement: "per-account",
|
|
82
|
+
},
|
|
83
|
+
codex: {
|
|
84
|
+
...plain,
|
|
85
|
+
destination: { hosts: ["chatgpt.com", "api.openai.com"], operator: "OpenAI", region: "US", thirdCountry: true },
|
|
86
|
+
translatorSignIn: "device-or-loopback",
|
|
87
|
+
opencodeWire: "openai-responses",
|
|
88
|
+
},
|
|
89
|
+
grok: {
|
|
90
|
+
...plain,
|
|
91
|
+
destination: { hosts: ["api.x.ai"], operator: "xAI", region: "US", thirdCountry: true },
|
|
92
|
+
ownSignInLoop: "opencode",
|
|
93
|
+
translatorSignIn: "device",
|
|
94
|
+
signInCodePrefilled: true,
|
|
95
|
+
},
|
|
96
|
+
kimi: {
|
|
97
|
+
...plain,
|
|
98
|
+
destination: { hosts: ["api.kimi.com"], operator: "Moonshot AI", region: "CN", thirdCountry: true },
|
|
99
|
+
translatorSignIn: "device",
|
|
100
|
+
},
|
|
101
|
+
gemini: { ...plain, translatorSignIn: "redirect", needsProject: true, refusesClaudeCodeMentions: true },
|
|
102
|
+
cursor: { ...plain, hubAccount: true, placesByModel: true },
|
|
103
|
+
devin: { ...plain, hubAccount: true, pasteBack: "token" },
|
|
104
|
+
zai: { ...plain, hubAccount: true, destination: { hosts: ["api.z.ai"], operator: "Z.ai", thirdCountry: true } },
|
|
105
|
+
meta: { ...plain, hubAccount: true, destination: { hosts: ["api.meta.ai"], operator: "Meta Platforms", region: "US", thirdCountry: true } },
|
|
106
|
+
} as const satisfies Record<NativeProvider, ProviderTraits>;
|
|
107
|
+
|
|
108
|
+
type Table = typeof PROVIDER_TRAITS;
|
|
109
|
+
|
|
110
|
+
// The providers whose row matches `P`, as a type: `ProvidersWhere<{ hubAccount: true }>` is "cursor" | "devin" | ….
|
|
111
|
+
export type ProvidersWhere<P> = { [K in keyof Table]: Table[K] extends P ? K : never }[keyof Table];
|
|
112
|
+
|
|
113
|
+
// The table's own keys, which `satisfies` holds to exactly the native providers.
|
|
114
|
+
// SAFETY: Object.keys of a table that satisfies Record<NativeProvider, …> lists native providers and nothing else.
|
|
115
|
+
const PROVIDERS = Object.keys(PROVIDER_TRAITS) as NativeProvider[];
|
|
116
|
+
|
|
117
|
+
// The providers whose row passes `test`, in the table's order.
|
|
118
|
+
export const providersWhere = (test: (traits: ProviderTraits) => boolean): readonly NativeProvider[] =>
|
|
119
|
+
PROVIDERS.filter((provider) => test(PROVIDER_TRAITS[provider]));
|
|
120
|
+
|
|
121
|
+
// One provider's row, or undefined for anything else (an endpoint, an ACP agent, a provider a newer build knows).
|
|
122
|
+
export const providerTraits = (provider: string): ProviderTraits | undefined => {
|
|
123
|
+
const found = PROVIDERS.find((candidate) => candidate === provider);
|
|
124
|
+
return found === undefined ? undefined : PROVIDER_TRAITS[found];
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// Whether a provider's row has this trait on; false for a string no native provider answers to.
|
|
128
|
+
export const providerHas = (provider: string, trait: BooleanTrait): boolean => providerTraits(provider)?.[trait] === true;
|
|
129
|
+
|
|
130
|
+
type BooleanTrait = { [K in keyof ProviderTraits]-?: ProviderTraits[K] extends boolean ? K : never }[keyof ProviderTraits];
|
|
131
|
+
|
|
132
|
+
// The providers whose row matches `P`, as a list typed by them. `P` and `test` must say the same thing; the contract's test
|
|
133
|
+
// pins every list built with this to its literal.
|
|
134
|
+
const providersTyped = <P>(test: (traits: ProviderTraits) => boolean): readonly ProvidersWhere<P>[] =>
|
|
135
|
+
// SAFETY: the caller's `test` selects the rows `P` describes, pinned per list in provider-traits.test.ts.
|
|
136
|
+
providersWhere(test) as readonly ProvidersWhere<P>[];
|
|
137
|
+
|
|
138
|
+
// The providers whose static key may travel through the connections hub, typed by them.
|
|
139
|
+
export type HubProvider = ProvidersWhere<{ readonly hubAccount: true }>;
|
|
140
|
+
export const HUB_PROVIDERS = providersTyped<{ readonly hubAccount: true }>((traits) => traits.hubAccount);
|
|
141
|
+
|
|
142
|
+
// The providers whose unnamed account pick is judged for the model, typed by them.
|
|
143
|
+
export type ModelPlacedProvider = ProvidersWhere<{ readonly placesByModel: true }>;
|
|
144
|
+
export const isModelPlaced = (provider: string): provider is ModelPlacedProvider => providerHas(provider, "placesByModel");
|
package/src/netd/browser-wire.ts
CHANGED
|
@@ -129,3 +129,16 @@ export const DEVICE_SOCKET_DIR = "/run/intentic/devices";
|
|
|
129
129
|
// The codes netd closes a device's uplink with: `displaced`, a newer uplink of the same device replaced it; `withdrawn`,
|
|
130
130
|
// the daemon withdrew the device's registration.
|
|
131
131
|
export const DEVICE_UPLINK_CLOSE_CODES = { displaced: 4001, withdrawn: 4003 } as const;
|
|
132
|
+
|
|
133
|
+
// A runner's uplink to its parent (2026-11-23): the runner's netd dials RUNNER_UPLINK_PATH on the parent's address with
|
|
134
|
+
// its durable token and RUNNER_HEADER naming its id, and a person's view of the runner opens on the parent at
|
|
135
|
+
// `${RUNNER_VIEW_PATH}/<runner>/<path on the runner>?<its query>&ticket=…`, the path one of `system/terminal`,
|
|
136
|
+
// `system/browser-view`, `system/desktop-view` (each needing a runner view ticket the parent minted) or
|
|
137
|
+
// `system/browser-media/<session>` (castd's token decides). The parent's netd takes the ticket off before the runner sees it.
|
|
138
|
+
export const RUNNER_UPLINK_PATH = "/system/runner-uplink";
|
|
139
|
+
export const RUNNER_HEADER = "x-intentic-runner";
|
|
140
|
+
export const RUNNER_VIEW_PATH = "/system/runner-view";
|
|
141
|
+
export const RUNNER_VIEW_TICKET = "ticket";
|
|
142
|
+
|
|
143
|
+
// The codes a parent's netd closes a runner's uplink with, as a device's.
|
|
144
|
+
export const RUNNER_UPLINK_CLOSE_CODES = { displaced: 4001, withdrawn: 4003 } as const;
|
|
@@ -1660,6 +1660,16 @@
|
|
|
1660
1660
|
"title": "EdgeVerdict"
|
|
1661
1661
|
}
|
|
1662
1662
|
},
|
|
1663
|
+
"runner": {
|
|
1664
|
+
"closeCodes": {
|
|
1665
|
+
"displaced": 4001,
|
|
1666
|
+
"withdrawn": 4003
|
|
1667
|
+
},
|
|
1668
|
+
"header": "x-intentic-runner",
|
|
1669
|
+
"uplinkPath": "/system/runner-uplink",
|
|
1670
|
+
"viewPath": "/system/runner-view",
|
|
1671
|
+
"viewTicket": "ticket"
|
|
1672
|
+
},
|
|
1663
1673
|
"terminal": {
|
|
1664
1674
|
"client": {
|
|
1665
1675
|
"description": "What the browser sends on a terminal socket, each a JSON text message.",
|