@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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// WHAT A CONVERSATION LEAVES GOING BESIDE ITS TURN, as its card carries it (AgentSummarySchema): the commands it left
|
|
4
|
+
// running in the background, and the workflow runs it started, which keep starting subagents of their own while the
|
|
5
|
+
// conversation rests. Both outlive the turn that started them, so both are a person's to stop from the card.
|
|
6
|
+
|
|
7
|
+
// In memory only: a daemon restart leaves transcript rows naming jobs this list no longer carries.
|
|
8
|
+
export const AgentJobsSchema = z
|
|
9
|
+
.array(
|
|
10
|
+
z.object({
|
|
11
|
+
id: z.string().describe("The daemon's handle for this job, the one its transcript row names."),
|
|
12
|
+
label: z.string().describe("What the job is, in the agent's own words when it gave any, else its command on one line."),
|
|
13
|
+
session: z.string().describe("The terminal session its pane runs in, which is what opening it focuses."),
|
|
14
|
+
startedAt: z.number().describe("When it started, in milliseconds."),
|
|
15
|
+
endedAt: z.number().optional().describe("When the command exited, in milliseconds. Absent while it runs."),
|
|
16
|
+
exitCode: z.number().int().optional().describe("The code it exited with. Absent while it runs, or when its exit left none."),
|
|
17
|
+
// What the turn that left it running decided about it (agent/tools/jobs/job-fates.ts): one of these, or none
|
|
18
|
+
// while its turn is still going.
|
|
19
|
+
watch: z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe(
|
|
23
|
+
"The watch its exit wakes this conversation through. Present once the turn that left it running has ended and the conversation is waiting on it.",
|
|
24
|
+
),
|
|
25
|
+
handed: z
|
|
26
|
+
.boolean()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe(
|
|
29
|
+
"Left running for the person: the agent kept it for them with the `keep` tool (or it holds a port this conversation already left them), so it outlives the turn, wakes nothing and is theirs to stop.",
|
|
30
|
+
),
|
|
31
|
+
ports: z.array(z.number().int()).optional().describe("The ports it was listening on when its turn ended."),
|
|
32
|
+
stoppedBy: z
|
|
33
|
+
.enum(["turn", "person", "agent"])
|
|
34
|
+
.optional()
|
|
35
|
+
.describe(
|
|
36
|
+
"Who stopped it: the sandbox, when the turn that used it ended without handing it over; a person; or the agent itself. Present from the moment the stop is asked. Absent for a job that exited by itself.",
|
|
37
|
+
),
|
|
38
|
+
// agent/tools/jobs/input-wait.ts: told from /proc, never from what it printed, since a prompt can go
|
|
39
|
+
// straight to the terminal or sit in a pipe.
|
|
40
|
+
inputWait: z
|
|
41
|
+
.object({
|
|
42
|
+
since: z.number().describe("When it went still, in milliseconds."),
|
|
43
|
+
program: z.string().describe("The process blocked reading the terminal, as its command line."),
|
|
44
|
+
})
|
|
45
|
+
.optional()
|
|
46
|
+
.describe(
|
|
47
|
+
"Present while it sits blocked reading its terminal with nothing moving: a prompt nobody in the sandbox will answer, which only stopping it or a person typing into its terminal ends. Absent while it runs on, and once it ends.",
|
|
48
|
+
),
|
|
49
|
+
}),
|
|
50
|
+
)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe(
|
|
53
|
+
"Commands this conversation left running in the background, and how the most recent ones ended. Absent means none since the daemon started. A job is running exactly while it has no end.",
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
// In memory, as the runs are (agent/subagents/workflows/live-runs.ts): a run a restart picks up is listed again as it goes
|
|
57
|
+
// on. A run is a script, not a turn: it keeps starting subagents while the conversation itself rests.
|
|
58
|
+
export const AgentScriptRunsSchema = z
|
|
59
|
+
.array(
|
|
60
|
+
z.object({
|
|
61
|
+
id: z.string().describe("The run's id, the one its agent was given (`wfr-…`)."),
|
|
62
|
+
name: z.string().describe("The workflow's name, from its script's `meta`."),
|
|
63
|
+
calls: z.number().int().min(0).describe("How many subagents it has started so far. One run starts at most 200."),
|
|
64
|
+
working: z.number().int().min(0).describe("How many of its subagents are at work now."),
|
|
65
|
+
failed: z.number().int().min(0).describe("How many of its calls failed or were stopped."),
|
|
66
|
+
phase: z.string().optional().describe("The phase its script last marked."),
|
|
67
|
+
startedAt: z.number().describe("When it started, in milliseconds."),
|
|
68
|
+
}),
|
|
69
|
+
)
|
|
70
|
+
.optional()
|
|
71
|
+
.describe(
|
|
72
|
+
"Workflow runs this conversation started that are still going. A run starts subagents of its own until its script ends, whether or not the conversation is running, so stopping its subagents one at a time does not end it: it starts the next. Stopping the run does (`stopFamily`). Absent means none.",
|
|
73
|
+
);
|
|
74
|
+
export type AgentScriptRun = NonNullable<z.infer<typeof AgentScriptRunsSchema>>[number];
|
|
75
|
+
|
|
76
|
+
// Naming a run stops only that run and its subagents; naming none stops everything the conversation has going.
|
|
77
|
+
export const AgentStopFamilySchema = z.object({
|
|
78
|
+
id: z.string().min(1).describe("Which conversation."),
|
|
79
|
+
run: z.string().min(1).optional().describe("One of its workflow runs, by the id its card carries. Absent stops its turn, every run and every agent below it."),
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const AgentFamilyStoppedSchema = z.object({
|
|
83
|
+
turn: z.boolean().describe("Whether its own turn was running and was stopped."),
|
|
84
|
+
runs: z.number().int().min(0).describe("How many workflow runs were stopped: its own, and those of the agents below it."),
|
|
85
|
+
agents: z.number().int().min(0).describe("How many agents below it had work stopped: a running turn, a start still waiting, a re-run the sandbox had booked."),
|
|
86
|
+
});
|
|
87
|
+
export type AgentFamilyStopped = z.infer<typeof AgentFamilyStoppedSchema>;
|
|
88
|
+
|
|
89
|
+
// Outside conditions a conversation is parked on; a finished-looking card can restart itself when one fires, and an
|
|
90
|
+
// armed watch keeps a hosted machine (and its bill) awake. The check command itself never rides the wire, since it
|
|
91
|
+
// may hold a secret.
|
|
92
|
+
export const AgentWatchesSchema = z
|
|
93
|
+
.array(
|
|
94
|
+
z.object({
|
|
95
|
+
id: z.string().describe("The daemon's handle for this watch, the same one the agent was given when it armed it."),
|
|
96
|
+
note: z.string().describe("The agent's own line on what it is waiting for."),
|
|
97
|
+
intervalSeconds: z.number().int().min(1).describe("How often the check runs."),
|
|
98
|
+
deadlineAt: z.number().describe("When it gives up and wakes the conversation anyway, in milliseconds. Every watch has one."),
|
|
99
|
+
}),
|
|
100
|
+
)
|
|
101
|
+
.optional()
|
|
102
|
+
.describe(
|
|
103
|
+
"Outside conditions this conversation is parked on, each of which will wake it. Absent means none, which is nearly every conversation: an armed watch is why a finished-looking agent starts working by itself, and why a hosted machine will not go idle.",
|
|
104
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// What a land answers and takes: the conflicts that stopped it, its outcome,
|
|
2
|
-
// for. Apart from agents.ts, which re-exports every name here, so a conversation's summary and the land press's own
|
|
1
|
+
// What a land answers and takes: the conflicts that stopped it, its outcome, the modes and spans a land can be asked
|
|
2
|
+
// for, and the workspace extensions it would turn on. Apart from agents.ts, which re-exports every name here, so a conversation's summary and the land press's own
|
|
3
3
|
// shapes are not one file.
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
@@ -96,3 +96,22 @@ export const AgentLandSchema = z.object({
|
|
|
96
96
|
span: AgentSpanSchema.optional().describe("How much of the work to take. Leave it out for everything not yet merged."),
|
|
97
97
|
force: z.boolean().optional().describe("Go ahead despite a check that would otherwise refuse."),
|
|
98
98
|
});
|
|
99
|
+
|
|
100
|
+
// The workspace extensions a land would turn on, on the review before the press: a land is the yes to the extensions it
|
|
101
|
+
// carries (the daemon's extensions/landed-extensions.ts). Judged against the approvals as they stand now.
|
|
102
|
+
export const LandingExtensionsSchema = z
|
|
103
|
+
.array(
|
|
104
|
+
z.object({
|
|
105
|
+
id: z.string().describe("The extension, as publisher.name."),
|
|
106
|
+
dir: z.string().describe("Its folder under .intentic/config/workspace-extensions/."),
|
|
107
|
+
powers: z
|
|
108
|
+
.array(z.string())
|
|
109
|
+
.describe("What merging lets it do that it was not approved for, one plain sentence each. Empty when it asks for nothing new."),
|
|
110
|
+
approvedBefore: z.boolean().describe("Whether it ran here before, approved for fewer powers."),
|
|
111
|
+
}),
|
|
112
|
+
)
|
|
113
|
+
.optional()
|
|
114
|
+
.describe(
|
|
115
|
+
"Extensions written in this workspace that merging this work turns on: new ones, and ones asking for powers they were not approved for. A merge is the yes to them, so their code runs in your browser and the sandbox from then on, until you switch one off or take the yes back. Absent when there are none.",
|
|
116
|
+
);
|
|
117
|
+
export type LandingExtensions = NonNullable<z.infer<typeof LandingExtensionsSchema>>;
|
package/src/schemas/agents.ts
CHANGED
|
@@ -10,7 +10,9 @@ import { LoopStateSchema } from "./loops.js";
|
|
|
10
10
|
import { LimitPolicySchema, MemoryKillPolicySchema, RetryPolicySchema, RoomPolicySchema, TurnBreakPolicySchema, TurnBreakSchema } from "./turn-break.js";
|
|
11
11
|
import { KeepWarmSchema } from "./keep-warm.js";
|
|
12
12
|
import { proceedOverride } from "./proceed-without-asking.js";
|
|
13
|
+
import { autoApproveMark } from "./auto-approve.js";
|
|
13
14
|
import { AgentNeedSchema } from "./needs.js";
|
|
15
|
+
import { AgentJobsSchema, AgentScriptRunsSchema, AgentWatchesSchema } from "./agent-background.js";
|
|
14
16
|
import { StrandedCloneSchema } from "./stranded-clone.js";
|
|
15
17
|
import { EMOJI_MAX_LENGTH, isSingleEmoji } from "../text/emoji.js";
|
|
16
18
|
import { ProgramAskSchema } from "../events/requests.js";
|
|
@@ -84,6 +86,9 @@ export type AgentActivity = z.infer<typeof AgentActivitySchema>;
|
|
|
84
86
|
export const AgentChecklistSchema = z.object({
|
|
85
87
|
done: z.number().describe("Items it has completed."),
|
|
86
88
|
total: z.number().describe("Items on the list. Never zero: a conversation that kept no list carries no clause at all."),
|
|
89
|
+
// Optional because only the live list knows it: the reading kept across a daemon restart (`unfinished.steps`)
|
|
90
|
+
// counts what was left open, not what was in hand.
|
|
91
|
+
doing: z.number().optional().describe("Items it has marked in progress and not yet completed. Absent when nothing is, or when the list was read back after a restart."),
|
|
87
92
|
});
|
|
88
93
|
export type AgentChecklist = z.infer<typeof AgentChecklistSchema>;
|
|
89
94
|
// Which "needs you" flags are raised, the fleet badge aggregates these across all agents.
|
|
@@ -376,6 +381,8 @@ export const AgentSummarySchema = z.object({
|
|
|
376
381
|
"This conversation's own answer to a turn the sandbox killed because it ran out of memory: `resume` sends it again by itself once memory has stayed free, `wait` holds it for a press. Absent means it follows the sandbox-wide setting.",
|
|
377
382
|
),
|
|
378
383
|
proceedWithoutAsking: proceedOverride,
|
|
384
|
+
// Not a posture: kept with the conversation's other yeses (schemas/auto-approve.ts), projected so the card can wear it.
|
|
385
|
+
autoApprove: autoApproveMark,
|
|
379
386
|
// A collaborator's ask to land (collaborators can't merge themselves); cleared by whichever merge or discard
|
|
380
387
|
// answers it.
|
|
381
388
|
landRequested: z
|
|
@@ -716,22 +723,8 @@ export const AgentSummarySchema = z.object({
|
|
|
716
723
|
.describe(
|
|
717
724
|
"Whether this conversation runs again by itself with nobody pressing anything: a watch is armed on it, or words the sandbox or another agent sent wait for it. A finished-looking card that is awaiting a wake is not finished yet.",
|
|
718
725
|
),
|
|
719
|
-
// Outside conditions a conversation is parked on
|
|
720
|
-
|
|
721
|
-
// may hold a secret.
|
|
722
|
-
watches: z
|
|
723
|
-
.array(
|
|
724
|
-
z.object({
|
|
725
|
-
id: z.string().describe("The daemon's handle for this watch, the same one the agent was given when it armed it."),
|
|
726
|
-
note: z.string().describe("The agent's own line on what it is waiting for."),
|
|
727
|
-
intervalSeconds: z.number().int().min(1).describe("How often the check runs."),
|
|
728
|
-
deadlineAt: z.number().describe("When it gives up and wakes the conversation anyway, in milliseconds. Every watch has one."),
|
|
729
|
-
}),
|
|
730
|
-
)
|
|
731
|
-
.optional()
|
|
732
|
-
.describe(
|
|
733
|
-
"Outside conditions this conversation is parked on, each of which will wake it. Absent means none, which is nearly every conversation: an armed watch is why a finished-looking agent starts working by itself, and why a hosted machine will not go idle.",
|
|
734
|
-
),
|
|
726
|
+
// Outside conditions a conversation is parked on (agent-background.ts).
|
|
727
|
+
watches: AgentWatchesSchema,
|
|
735
728
|
// Kept in the needs store, so unlike `jobs` this survives a restart and stands while the conversation is idle.
|
|
736
729
|
needs: z
|
|
737
730
|
.array(AgentNeedSchema)
|
|
@@ -739,54 +732,9 @@ export const AgentSummarySchema = z.object({
|
|
|
739
732
|
.describe(
|
|
740
733
|
"What it is waiting on people for and has not got yet, oldest first. Absent means nothing: an open need is why an idle-looking agent still needs you.",
|
|
741
734
|
),
|
|
742
|
-
//
|
|
743
|
-
jobs:
|
|
744
|
-
|
|
745
|
-
z.object({
|
|
746
|
-
id: z.string().describe("The daemon's handle for this job, the one its transcript row names."),
|
|
747
|
-
label: z.string().describe("What the job is, in the agent's own words when it gave any, else its command on one line."),
|
|
748
|
-
session: z.string().describe("The terminal session its pane runs in, which is what opening it focuses."),
|
|
749
|
-
startedAt: z.number().describe("When it started, in milliseconds."),
|
|
750
|
-
endedAt: z.number().optional().describe("When the command exited, in milliseconds. Absent while it runs."),
|
|
751
|
-
exitCode: z.number().int().optional().describe("The code it exited with. Absent while it runs, or when its exit left none."),
|
|
752
|
-
// What the turn that left it running decided about it (agent/tools/jobs/job-fates.ts): one of these, or none
|
|
753
|
-
// while its turn is still going.
|
|
754
|
-
watch: z
|
|
755
|
-
.string()
|
|
756
|
-
.optional()
|
|
757
|
-
.describe(
|
|
758
|
-
"The watch its exit wakes this conversation through. Present once the turn that left it running has ended and the conversation is waiting on it.",
|
|
759
|
-
),
|
|
760
|
-
handed: z
|
|
761
|
-
.boolean()
|
|
762
|
-
.optional()
|
|
763
|
-
.describe(
|
|
764
|
-
"Left running for the person: the agent kept it for them with the `keep` tool (or it holds a port this conversation already left them), so it outlives the turn, wakes nothing and is theirs to stop.",
|
|
765
|
-
),
|
|
766
|
-
ports: z.array(z.number().int()).optional().describe("The ports it was listening on when its turn ended."),
|
|
767
|
-
stoppedBy: z
|
|
768
|
-
.enum(["turn", "person", "agent"])
|
|
769
|
-
.optional()
|
|
770
|
-
.describe(
|
|
771
|
-
"Who stopped it: the sandbox, when the turn that used it ended without handing it over; a person; or the agent itself. Present from the moment the stop is asked. Absent for a job that exited by itself.",
|
|
772
|
-
),
|
|
773
|
-
// agent/tools/jobs/input-wait.ts: told from /proc, never from what it printed, since a prompt can go
|
|
774
|
-
// straight to the terminal or sit in a pipe.
|
|
775
|
-
inputWait: z
|
|
776
|
-
.object({
|
|
777
|
-
since: z.number().describe("When it went still, in milliseconds."),
|
|
778
|
-
program: z.string().describe("The process blocked reading the terminal, as its command line."),
|
|
779
|
-
})
|
|
780
|
-
.optional()
|
|
781
|
-
.describe(
|
|
782
|
-
"Present while it sits blocked reading its terminal with nothing moving: a prompt nobody in the sandbox will answer, which only stopping it or a person typing into its terminal ends. Absent while it runs on, and once it ends.",
|
|
783
|
-
),
|
|
784
|
-
}),
|
|
785
|
-
)
|
|
786
|
-
.optional()
|
|
787
|
-
.describe(
|
|
788
|
-
"Commands this conversation left running in the background, and how the most recent ones ended. Absent means none since the daemon started. A job is running exactly while it has no end.",
|
|
789
|
-
),
|
|
735
|
+
// Background commands and workflow runs (agent-background.ts): what keeps going beside its turn.
|
|
736
|
+
jobs: AgentJobsSchema,
|
|
737
|
+
scriptRuns: AgentScriptRunsSchema,
|
|
790
738
|
// Epoch ms it was archived; nothing is lost (branch, transcript, counters stay), and unarchiving re-attaches a
|
|
791
739
|
// fresh worktree from the branch.
|
|
792
740
|
archivedAt: z
|
|
@@ -818,6 +766,18 @@ export const AgentStopWatchingSchema = AgentIdSchema.extend({
|
|
|
818
766
|
watchId: z.string().optional().describe("Which watch to disarm. Absent disarms every watch this conversation is parked on."),
|
|
819
767
|
});
|
|
820
768
|
|
|
769
|
+
// What a person's stop on a card answers (2026-11-23): the card as the press left it, and whether anything stopped. A job
|
|
770
|
+
// that had already ended, a watch that had already fired, or a runner out of reach is `stopped: false` with the reason,
|
|
771
|
+
// never an error: the press was heard, and the card shows what is still going.
|
|
772
|
+
export const AgentStopAnswerSchema = AgentSummarySchema.extend({
|
|
773
|
+
stopped: z.boolean().describe("Whether anything was stopped by this press."),
|
|
774
|
+
stopReason: z
|
|
775
|
+
.string()
|
|
776
|
+
.optional()
|
|
777
|
+
.describe("Why nothing (or not everything) was stopped: it had already ended, or the runner it runs on is out of reach."),
|
|
778
|
+
});
|
|
779
|
+
export type AgentStopAnswer = z.infer<typeof AgentStopAnswerSchema>;
|
|
780
|
+
|
|
821
781
|
export const AgentStopJobSchema = AgentIdSchema.extend({
|
|
822
782
|
jobId: z.string().min(1).describe("Which of its background jobs, by the id its card and transcript row carry."),
|
|
823
783
|
});
|
|
@@ -954,4 +914,5 @@ export const AgentFileDiffQuerySchema = z.object({
|
|
|
954
914
|
repo: z.string().min(1).describe("Which repository."),
|
|
955
915
|
path: z.string().min(1).describe("Which file, relative to that repository."),
|
|
956
916
|
});
|
|
957
|
-
export { LandConflictReasonSchema, type LandConflictReason, LandConflictPathSchema, LandConflictSchema, type LandConflict, LandResultSchema, type LandResult, LandModeSchema, type LandMode, AgentSpanSchema, type AgentSpan, AgentLandSchema } from "./agent-land.js";
|
|
917
|
+
export { LandConflictReasonSchema, type LandConflictReason, LandConflictPathSchema, LandConflictSchema, type LandConflict, LandResultSchema, type LandResult, LandModeSchema, type LandMode, AgentSpanSchema, type AgentSpan, AgentLandSchema, LandingExtensionsSchema, type LandingExtensions } from "./agent-land.js";
|
|
918
|
+
export { AgentFamilyStoppedSchema, AgentStopFamilySchema, type AgentFamilyStopped, type AgentScriptRun } from "./agent-background.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// AUTO-APPROVE (2026-11-22). A mark a person puts on a conversation from its card, alone or on several selected at once,
|
|
4
|
+
// so it stops asking them anything a permission card would ask: every such card raised there, or in a subagent it
|
|
5
|
+
// starts, settles as allowed the moment it is raised, until somebody takes the mark off. Wider than a permission card's
|
|
6
|
+
// "Allow everything in this conversation" in two ways: it answers the owner's hard rules too (a destructive command on
|
|
7
|
+
// the sandbox or on one of the owner's computers), and the conversations it starts follow it. It still never answers a
|
|
8
|
+
// card whose consequence reaches other conversations (restarting the sandbox stops their turns too) or one addressed to
|
|
9
|
+
// a named person (a gated credential's approvers), and it never turns a refusal into a yes: what the owner's policy or a
|
|
10
|
+
// device's own switch refuses stays refused. Kept with the other yeses in the conversation grants, off anything an agent
|
|
11
|
+
// can write, and listed under Access ▸ Allowed, where it can be taken back too.
|
|
12
|
+
|
|
13
|
+
/** How a card carries the mark: its own, or followed from the conversation that started it. Absent: neither. */
|
|
14
|
+
export const autoApproveMark = z
|
|
15
|
+
.enum(["own", "inherited"])
|
|
16
|
+
.optional()
|
|
17
|
+
.describe(
|
|
18
|
+
"Whether every permission this conversation asks for is approved without asking anybody, the owner's hard rules included: `own` when it was marked itself, `inherited` when a conversation that started it was. Absent means its permission cards wait for a person as usual.",
|
|
19
|
+
);
|
|
20
|
+
export type AutoApproveMark = z.infer<typeof autoApproveMark>;
|
|
21
|
+
|
|
22
|
+
/** POST /agents/auto-approve: puts the mark on, or takes it off, several conversations at once. */
|
|
23
|
+
export const AgentAutoApproveSchema = z.object({
|
|
24
|
+
ids: z.array(z.string().min(1)).min(1).max(500).describe("Which conversations."),
|
|
25
|
+
on: z
|
|
26
|
+
.boolean()
|
|
27
|
+
.describe(
|
|
28
|
+
"True marks each so its permission cards, and those of the subagents it starts, are approved without asking from now on, cards already waiting included. False takes each one's own mark off; a conversation started by one still marked keeps following that one.",
|
|
29
|
+
),
|
|
30
|
+
});
|
|
31
|
+
export type AgentAutoApprove = z.infer<typeof AgentAutoApproveSchema>;
|
|
@@ -16,6 +16,8 @@ export { WorkspaceEventKindSchema, WorkspaceEventSchema, type WorkspaceEventKind
|
|
|
16
16
|
// the sandbox was down still lands, late, on the next poll
|
|
17
17
|
// event: fires when an external system POSTs /automations/{id}/fire; its auth token lives outside the manifest
|
|
18
18
|
// (.intentic/secrets/doors.json), never in this versioned, widely-readable file
|
|
19
|
+
// `signature` additionally requires the provider's own signature, its secret named, not held, here; a signed
|
|
20
|
+
// webhook also drops a redelivery of a call it already took (src/automations/fire/webhook-signature.ts)
|
|
19
21
|
// listener: fires from a realtime source's own connection (an extension's gateway), no cron, no token, never reachable
|
|
20
22
|
// via /fire. `channelId`/`eventType`/`mentioned` narrow it; absent means unfiltered. `provider`/`eventType` are open
|
|
21
23
|
// strings validated at upsert against installed extensions' declared vocabulary
|
|
@@ -25,6 +27,21 @@ export { WorkspaceEventKindSchema, WorkspaceEventSchema, type WorkspaceEventKind
|
|
|
25
27
|
// pushes one branch per agent
|
|
26
28
|
// workspace: fires from the sandbox's own codebase (WorkspaceEventKindSchema)
|
|
27
29
|
|
|
30
|
+
// How a webhook's sender signs what it sends, by the provider's own scheme: github (X-Hub-Signature-256), linear
|
|
31
|
+
// (Linear-Signature), sentry (Sentry-Hook-Signature), stripe (Stripe-Signature) and standard-webhooks
|
|
32
|
+
// (webhook-id/webhook-timestamp/webhook-signature, what Svix, Clerk, Resend and others send).
|
|
33
|
+
export const WEBHOOK_SIGNATURE_SCHEMES = ["github", "linear", "sentry", "stripe", "standard-webhooks"] as const;
|
|
34
|
+
export const WebhookSignatureSchemeSchema = z.enum(WEBHOOK_SIGNATURE_SCHEMES);
|
|
35
|
+
export type WebhookSignatureScheme = z.infer<typeof WebhookSignatureSchemeSchema>;
|
|
36
|
+
export const WebhookSignatureSchema = z.object({
|
|
37
|
+
scheme: WebhookSignatureSchemeSchema.describe("Which provider's signing scheme the sender uses."),
|
|
38
|
+
secret: z
|
|
39
|
+
.string()
|
|
40
|
+
.regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/)
|
|
41
|
+
.describe("The name of the sandbox secret holding the signing secret the provider showed, like GITHUB_WEBHOOK_SECRET. The value itself is never stored here."),
|
|
42
|
+
});
|
|
43
|
+
export type WebhookSignature = z.infer<typeof WebhookSignatureSchema>;
|
|
44
|
+
|
|
28
45
|
export const TriggerSchema = z.discriminatedUnion("kind", [
|
|
29
46
|
z.object({
|
|
30
47
|
kind: z.literal("schedule").describe("On a clock."),
|
|
@@ -64,6 +81,11 @@ export const TriggerSchema = z.discriminatedUnion("kind", [
|
|
|
64
81
|
.positive()
|
|
65
82
|
.optional()
|
|
66
83
|
.describe("How many webhook calls a day may wake the agent, across every caller. Absent is a modest default rather than unlimited."),
|
|
84
|
+
// Added 2026-11-24, optional: a webhook that also proves its sender. The secret's VALUE stays in the sandbox's
|
|
85
|
+
// secrets store (never this versioned file); only its name is kept here.
|
|
86
|
+
signature: WebhookSignatureSchema.optional().describe(
|
|
87
|
+
"Require the sender's own signature on every call, on top of the webhook's token, and drop redeliveries of a call already taken. Absent accepts any call that carries the token.",
|
|
88
|
+
),
|
|
67
89
|
}),
|
|
68
90
|
z.object({
|
|
69
91
|
kind: z.literal("listener").describe("When a message arrives from somewhere outside."),
|
|
@@ -513,7 +535,10 @@ export const AutomationRunSchema = z.object({
|
|
|
513
535
|
// error: the guard passed but the turn errored
|
|
514
536
|
// interrupted: the daemon died mid-wake; without this value an interrupted fire vanishes from history and reads as
|
|
515
537
|
// never having fired
|
|
516
|
-
|
|
538
|
+
// carried: the turn was refused for a spent allowance and the sandbox carried it on by itself, moved to the next
|
|
539
|
+
// model or booked to go again at the reset (its detail says which). Not a failure: 2026-11-25, these were recorded as
|
|
540
|
+
// `error`, painted red and counted toward switching the automation off, against automationFailureLimit's own word
|
|
541
|
+
outcome: z.enum(["completed", "skipped", "error", "interrupted", "carried"]),
|
|
517
542
|
detail: z.string().optional(),
|
|
518
543
|
// Absent only for a run skipped before a conversation was needed.
|
|
519
544
|
conversationId: z.string().optional(),
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// The desktop git bridge's view of a sandbox's repositories, on the ports list it already polls.
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { PortsListSchema } from "./ports.js";
|
|
4
|
+
|
|
5
|
+
// (2026-11-24) What the desktop git bridge used to ask over a fresh SSH login per repo every five seconds
|
|
6
|
+
// (`git ls-remote --symref sandbox HEAD`, plus an `ls /history/gits` every minute): two logins a second into a
|
|
7
|
+
// ten-repo sandbox. Answered on GET /ports from the git dirs' files instead, on the poll the device already makes.
|
|
8
|
+
// Kept out of schemas/ports, which extensions read under the extension API's version (extension-api/src/wire.ts): an
|
|
9
|
+
// extension has no use for it, and its parse of the list drops the field.
|
|
10
|
+
export const BridgeHeadSchema = z.object({
|
|
11
|
+
repo: z.string().min(1).describe("The repository, as its git dir under /history/gits is named, decoded."),
|
|
12
|
+
branch: z.string().min(1).optional().describe("The branch its HEAD names. Absent for a detached HEAD, which has no branch to follow."),
|
|
13
|
+
tip: z
|
|
14
|
+
.string()
|
|
15
|
+
.regex(/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/)
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("The commit that branch points at. Absent while the branch has no commits yet."),
|
|
18
|
+
probe: z
|
|
19
|
+
.literal(true)
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Set when the sandbox could not read the head off its files (a ref format it does not parse): ask git over SSH instead."),
|
|
22
|
+
});
|
|
23
|
+
export type BridgeHead = z.infer<typeof BridgeHeadSchema>;
|
|
24
|
+
|
|
25
|
+
// The ports list as GET /ports answers it. `bridgeHeads` goes only to a desktop-sync caller (the `x-intentic-sync`
|
|
26
|
+
// header), and is absent from a sandbox from before 2026-11-24, whose device then keeps asking over SSH.
|
|
27
|
+
export const SyncPortsListSchema = PortsListSchema.extend({
|
|
28
|
+
bridgeHeads: z
|
|
29
|
+
.array(BridgeHeadSchema)
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("Every repository's checked-out branch and its tip, for a paired computer's git bridge. Sent only to a desktop-sync caller."),
|
|
32
|
+
});
|
|
33
|
+
export type SyncPortsList = z.infer<typeof SyncPortsListSchema>;
|
|
@@ -165,6 +165,7 @@ export type IdentityConfig = z.infer<typeof IdentityConfigSchema>;
|
|
|
165
165
|
// machine, never here, so a compromised sandbox can't exceed what the owner ticked.
|
|
166
166
|
// on/off, not boolean: capability configs arrive from the form as strings, and a select renders an enum.
|
|
167
167
|
const hostScope = z.enum(["on", "off"]);
|
|
168
|
+
type HostScope = z.infer<typeof hostScope>;
|
|
168
169
|
export const DeviceScopesSchema = z.object({
|
|
169
170
|
// Run commands in a real shell (PowerShell on Windows, the login shell on Linux). Off ⇒ files/screen only.
|
|
170
171
|
shell: hostScope.default("on"),
|
|
@@ -192,10 +193,32 @@ export const DeviceScopesSchema = z.object({
|
|
|
192
193
|
remoteControl: hostScope.default("off"),
|
|
193
194
|
// Let people open terminals: a shell on this computer, in any of its environments.
|
|
194
195
|
remoteTerminal: hostScope.default("off"),
|
|
196
|
+
// (2026-11-23) Run commands as administrator: run_command's `admin`, on Windows, through intentic-remoted's service,
|
|
197
|
+
// with no UAC prompt at the computer. Its own switch, default off, beside `shell` and never implied by it: what a
|
|
198
|
+
// command may do as the person and what it may do as the computer's administrator are different grants. Each run
|
|
199
|
+
// still asks on a card in chat, which only a conversation's auto-approve mark answers by itself.
|
|
200
|
+
admin: hostScope.default("off"),
|
|
195
201
|
// One directory per line. Empty ⇒ the machine's home directory, which is what the agent reports at connect.
|
|
196
202
|
roots: z.string().optional(),
|
|
197
203
|
});
|
|
198
204
|
export type DeviceScopes = z.infer<typeof DeviceScopesSchema>;
|
|
205
|
+
/** A device permission switch: every scope but `roots`, which is folders, not on/off. */
|
|
206
|
+
export type DeviceSwitch = Exclude<keyof DeviceScopes, "roots">;
|
|
207
|
+
/** Every device switch, in the schema's order, so a new switch reaches whatever reads this without an edit. */
|
|
208
|
+
export const DEVICE_SWITCHES: readonly DeviceSwitch[] = DeviceScopesSchema.keyof().options.filter((key): key is DeviceSwitch => key !== "roots");
|
|
209
|
+
/**
|
|
210
|
+
* A grant with exactly `on` switched on and every other switch off, a new switch included; `extra` is laid over it.
|
|
211
|
+
* Not `DeviceScopesSchema.parse({})`, whose defaults turn `shell` and `screen` on.
|
|
212
|
+
*/
|
|
213
|
+
export const deviceScopesOn = <Extra extends Partial<DeviceScopes> = Record<never, never>>(
|
|
214
|
+
on: readonly DeviceSwitch[] = [],
|
|
215
|
+
extra?: Extra,
|
|
216
|
+
): Record<DeviceSwitch, HostScope> & Extra => ({
|
|
217
|
+
// SAFETY: one entry for every switch, each "on" or "off".
|
|
218
|
+
...(Object.fromEntries(DEVICE_SWITCHES.map((name) => [name, on.includes(name) ? "on" : "off"])) as Record<DeviceSwitch, HostScope>),
|
|
219
|
+
// SAFETY: an absent extra adds nothing, which is what the default Extra says.
|
|
220
|
+
...(extra ?? ({} as Extra)),
|
|
221
|
+
});
|
|
199
222
|
export const DeviceConfigSchema = DeviceScopesSchema.extend({ platform: z.string().min(1) });
|
|
200
223
|
// An ACP agent served as a chat provider: the daemon spawns `command` as a long-lived JSON-RPC subprocess, and the
|
|
201
224
|
// capability id becomes the provider id. `env` is a pasted KEY=VALUE block, the whole secret field; `loginCommand` runs
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { STATE_DIR } from "@intentic/constants";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
// <repo>/.intentic/checkout.json declares what runs around a conversation's own checkout of the repository, beside
|
|
5
|
+
// run.json (run-targets.ts), which declares what the repository can run:
|
|
6
|
+
// - `setup`, once when the checkout is created, before the conversation's turn starts (installing what a fresh tree
|
|
7
|
+
// lacks, seeding a dev database).
|
|
8
|
+
// - `archive`, before the checkout is removed (dumping state somewhere it outlives the checkout). A failure holds the
|
|
9
|
+
// removal back.
|
|
10
|
+
// Each runs from the checkout's root, and only once the owner has approved its exact content (the command and the bytes
|
|
11
|
+
// of the files it runs), so a branch that edits either asks again (conversations/worktrees/lifecycle/checkout-hooks.ts).
|
|
12
|
+
|
|
13
|
+
export const CHECKOUT_HOOKS_FILE = `${STATE_DIR}/checkout.json`;
|
|
14
|
+
|
|
15
|
+
// The longest a hook may run before it is stopped and counted as failed.
|
|
16
|
+
export const MAX_CHECKOUT_HOOK_SECONDS = 1800;
|
|
17
|
+
|
|
18
|
+
const RepoFileSchema = z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.max(500)
|
|
22
|
+
.refine((path) => !path.startsWith("/") && !path.split(/[\\/]/).includes(".."), "a path inside the repository, relative to its root");
|
|
23
|
+
|
|
24
|
+
export const CheckoutHookSchema = z
|
|
25
|
+
.object({
|
|
26
|
+
// A shell command, run with `sh -c` from the checkout's root.
|
|
27
|
+
command: z.string().min(1).max(4000),
|
|
28
|
+
// Files the approval pins beside the command, for a script that the command reaches indirectly. A file the
|
|
29
|
+
// command names by its repository path is pinned without being listed.
|
|
30
|
+
files: z.array(RepoFileSchema).max(20).default([]),
|
|
31
|
+
timeoutSeconds: z.int().min(1).max(MAX_CHECKOUT_HOOK_SECONDS).default(300),
|
|
32
|
+
})
|
|
33
|
+
.strict();
|
|
34
|
+
export type CheckoutHook = z.infer<typeof CheckoutHookSchema>;
|
|
35
|
+
|
|
36
|
+
export const CheckoutHooksFileSchema = z
|
|
37
|
+
.object({
|
|
38
|
+
setup: CheckoutHookSchema.optional(),
|
|
39
|
+
archive: CheckoutHookSchema.optional(),
|
|
40
|
+
})
|
|
41
|
+
.strict();
|
|
42
|
+
export type CheckoutHooksFile = z.infer<typeof CheckoutHooksFileSchema>;
|
|
43
|
+
|
|
44
|
+
export type CheckoutHookKind = keyof CheckoutHooksFile;
|