@intentic/sandbox-contract 1.430.0 → 1.432.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -5
- package/dist/app-routes/app-pages.d.ts +1 -0
- package/dist/app-routes/app-pages.d.ts.map +1 -1
- package/dist/app-routes/app-pages.js +1 -0
- package/dist/app-routes/app-pages.js.map +1 -1
- package/dist/app-routes/index.d.ts +1 -0
- package/dist/app-routes/index.d.ts.map +1 -1
- package/dist/app-routes/index.js +1 -0
- package/dist/app-routes/index.js.map +1 -1
- package/dist/app-routes/return-path.d.ts +2 -0
- package/dist/app-routes/return-path.d.ts.map +1 -0
- package/dist/app-routes/return-path.js +8 -0
- package/dist/app-routes/return-path.js.map +1 -0
- package/dist/briefs/agent-ask.d.ts +10 -0
- package/dist/briefs/agent-ask.d.ts.map +1 -0
- package/dist/briefs/agent-ask.js +2 -0
- package/dist/briefs/agent-ask.js.map +1 -0
- package/dist/{chores/extension-update.d.ts → briefs/extension-update-brief.d.ts} +1 -1
- package/dist/briefs/extension-update-brief.d.ts.map +1 -0
- package/dist/{chores/extension-update.js → briefs/extension-update-brief.js} +2 -2
- package/dist/briefs/extension-update-brief.js.map +1 -0
- package/dist/chores/digest.d.ts.map +1 -1
- package/dist/chores/digest.js.map +1 -1
- package/dist/chores/index.d.ts +2 -2
- package/dist/chores/index.d.ts.map +1 -1
- package/dist/chores/index.js +1 -1
- package/dist/chores/index.js.map +1 -1
- package/dist/chores/prompt.d.ts +1 -9
- package/dist/chores/prompt.d.ts.map +1 -1
- package/dist/chores/prompt.js +1 -1
- package/dist/chores/prompt.js.map +1 -1
- package/dist/chores/stack.d.ts.map +1 -1
- package/dist/chores/stack.js.map +1 -1
- package/dist/chores/verdict.d.ts.map +1 -1
- package/dist/chores/verdict.js.map +1 -1
- package/dist/chores/workspace-scope.d.ts +1 -3
- package/dist/chores/workspace-scope.d.ts.map +1 -1
- package/dist/chores/workspace-scope.js +1 -3
- package/dist/chores/workspace-scope.js.map +1 -1
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/accounts.contract.js +2 -0
- package/dist/contracts/accounts.contract.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +1226 -12
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +2665 -733
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +35 -5
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/automations.contract.d.ts +90 -8
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.js +1 -0
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +49 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +24 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/ci.contract.d.ts +222 -95
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/ci.contract.js +87 -26
- package/dist/contracts/ci.contract.js.map +1 -1
- package/dist/contracts/device-ci-runners.contract.d.ts +108 -0
- package/dist/contracts/device-ci-runners.contract.d.ts.map +1 -0
- package/dist/contracts/device-ci-runners.contract.js +56 -0
- package/dist/contracts/device-ci-runners.contract.js.map +1 -0
- package/dist/contracts/device-stacks.contract.d.ts +129 -0
- package/dist/contracts/device-stacks.contract.d.ts.map +1 -0
- package/dist/contracts/device-stacks.contract.js +66 -0
- package/dist/contracts/device-stacks.contract.js.map +1 -0
- package/dist/contracts/device.contract.d.ts +74 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +604 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +11 -2
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts +7 -0
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.d.ts +1097 -18
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/offload.contract.d.ts +25 -0
- package/dist/contracts/offload.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.d.ts +8 -0
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.js +6 -5
- package/dist/contracts/ports.contract.js.map +1 -1
- package/dist/contracts/remote.contract.d.ts +1 -0
- package/dist/contracts/remote.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +1203 -9
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +49 -2
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/runners.contract.d.ts +16 -0
- package/dist/contracts/runners.contract.d.ts.map +1 -0
- package/dist/contracts/runners.contract.js +15 -0
- package/dist/contracts/runners.contract.js.map +1 -0
- package/dist/contracts/safety.contract.d.ts.map +1 -1
- package/dist/contracts/safety.contract.js +1 -0
- package/dist/contracts/safety.contract.js.map +1 -1
- package/dist/contracts/seal.contract.d.ts +100 -0
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +15 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +27 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +159 -2
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +59 -42
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +19 -0
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/skills.contract.d.ts +6 -0
- package/dist/contracts/skills.contract.d.ts.map +1 -1
- package/dist/contracts/stack-grants.contract.d.ts +418 -0
- package/dist/contracts/stack-grants.contract.d.ts.map +1 -0
- package/dist/contracts/stack-grants.contract.js +46 -0
- package/dist/contracts/stack-grants.contract.js.map +1 -0
- package/dist/contracts/system.contract.d.ts +516 -69
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +26 -45
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/usage.contract.d.ts +3 -0
- package/dist/contracts/usage.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +0 -55
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +0 -19
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +615 -8
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +2 -2
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/agent-transcript.d.ts +159 -2
- package/dist/events/agent-transcript.d.ts.map +1 -1
- package/dist/events/agent-words.d.ts +5 -0
- package/dist/events/agent-words.d.ts.map +1 -1
- package/dist/events/agent-words.js +22 -2
- package/dist/events/agent-words.js.map +1 -1
- package/dist/events/child-news.d.ts +32 -0
- package/dist/events/child-news.d.ts.map +1 -0
- package/dist/events/child-news.js +171 -0
- package/dist/events/child-news.js.map +1 -0
- package/dist/events/prompt-origins.d.ts +42 -0
- package/dist/events/prompt-origins.d.ts.map +1 -1
- package/dist/events/prompt-origins.js +28 -0
- package/dist/events/prompt-origins.js.map +1 -1
- package/dist/events/refusal-incidents.d.ts +1 -0
- package/dist/events/refusal-incidents.d.ts.map +1 -1
- package/dist/events/refusal-incidents.js +42 -19
- package/dist/events/refusal-incidents.js.map +1 -1
- package/dist/events/requests.d.ts +14 -0
- package/dist/events/requests.d.ts.map +1 -1
- package/dist/events/requests.js +12 -0
- package/dist/events/requests.js.map +1 -1
- package/dist/events/system-events.d.ts +98 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/transcript.d.ts +799 -10
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +2 -1
- package/dist/events/transcript.js.map +1 -1
- package/dist/ids/conversation-ids.d.ts +1 -0
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js +2 -1
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/ids/project-id.d.ts.map +1 -1
- package/dist/ids/project-id.js +4 -4
- package/dist/ids/project-id.js.map +1 -1
- package/dist/ids/run-row-ids.d.ts +8 -0
- package/dist/ids/run-row-ids.d.ts.map +1 -0
- package/dist/ids/run-row-ids.js +32 -0
- package/dist/ids/run-row-ids.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/models/agent-catalog.d.ts.map +1 -1
- package/dist/models/agent-catalog.js +3 -2
- package/dist/models/agent-catalog.js.map +1 -1
- package/dist/models/agent-lanes.d.ts.map +1 -1
- package/dist/models/agent-lanes.js +4 -1
- package/dist/models/agent-lanes.js.map +1 -1
- package/dist/models/agent-runtimes.d.ts.map +1 -1
- package/dist/models/agent-runtimes.js +2 -2
- package/dist/models/agent-runtimes.js.map +1 -1
- package/dist/models/agent-standing.d.ts +6 -1
- package/dist/models/agent-standing.d.ts.map +1 -1
- package/dist/models/agent-standing.js +1 -0
- package/dist/models/agent-standing.js.map +1 -1
- package/dist/models/model-roles.d.ts +91 -37
- package/dist/models/model-roles.d.ts.map +1 -1
- package/dist/models/model-roles.js +106 -35
- package/dist/models/model-roles.js.map +1 -1
- package/dist/models/model-setups.d.ts +10 -8
- package/dist/models/model-setups.d.ts.map +1 -1
- package/dist/models/model-setups.js +15 -15
- package/dist/models/model-setups.js.map +1 -1
- package/dist/models/providers/provider-traits.d.ts +215 -0
- package/dist/models/providers/provider-traits.d.ts.map +1 -0
- package/dist/models/providers/provider-traits.js +60 -0
- package/dist/models/providers/provider-traits.js.map +1 -0
- package/dist/netd/browser-wire.d.ts +8 -0
- package/dist/netd/browser-wire.d.ts.map +1 -1
- package/dist/netd/browser-wire.js +5 -0
- package/dist/netd/browser-wire.js.map +1 -1
- package/dist/netd/generated/wire.d.ts +42 -1
- package/dist/netd/generated/wire.d.ts.map +1 -1
- package/dist/policy/admin/admin-grant.d.ts +21 -0
- package/dist/policy/admin/admin-grant.d.ts.map +1 -0
- package/dist/policy/admin/admin-grant.js +41 -0
- package/dist/policy/admin/admin-grant.js.map +1 -0
- package/dist/policy/approvals-execution.d.ts +5 -2
- package/dist/policy/approvals-execution.d.ts.map +1 -1
- package/dist/policy/approvals-execution.js +3 -4
- package/dist/policy/approvals-execution.js.map +1 -1
- package/dist/policy/batch-runs.d.ts +1 -1
- package/dist/policy/batch-runs.d.ts.map +1 -1
- package/dist/policy/batch-runs.js +2 -1
- package/dist/policy/batch-runs.js.map +1 -1
- package/dist/policy/capabilities/capability-kinds.d.ts +268 -0
- package/dist/policy/capabilities/capability-kinds.d.ts.map +1 -0
- package/dist/policy/capabilities/capability-kinds.js +47 -0
- package/dist/policy/capabilities/capability-kinds.js.map +1 -0
- package/dist/policy/command-classes.d.ts.map +1 -1
- package/dist/policy/command-classes.js +3 -1
- package/dist/policy/command-classes.js.map +1 -1
- package/dist/policy/device-programs.d.ts +79 -2
- package/dist/policy/device-programs.d.ts.map +1 -1
- package/dist/policy/device-programs.js +15 -16
- package/dist/policy/device-programs.js.map +1 -1
- package/dist/policy/message-limits.d.ts.map +1 -1
- package/dist/policy/message-limits.js.map +1 -1
- package/dist/policy/org-locks.d.ts +1 -1
- package/dist/policy/org-locks.d.ts.map +1 -1
- package/dist/policy/org-locks.js +1 -0
- package/dist/policy/org-locks.js.map +1 -1
- package/dist/policy/reserved-servers.d.ts.map +1 -1
- package/dist/policy/reserved-servers.js +5 -1
- package/dist/policy/reserved-servers.js.map +1 -1
- package/dist/policy/role-capability.d.ts.map +1 -1
- package/dist/policy/role-capability.js +2 -1
- package/dist/policy/role-capability.js.map +1 -1
- package/dist/policy/shell/command-normalise.d.ts +10 -0
- package/dist/policy/shell/command-normalise.d.ts.map +1 -0
- package/dist/policy/shell/command-normalise.js +153 -0
- package/dist/policy/shell/command-normalise.js.map +1 -0
- package/dist/policy/shell/workspace-root-exclude.d.ts +4 -0
- package/dist/policy/shell/workspace-root-exclude.d.ts.map +1 -0
- package/dist/policy/shell/workspace-root-exclude.js +4 -0
- package/dist/policy/shell/workspace-root-exclude.js.map +1 -0
- package/dist/protocol/doors/listener-protocol.d.ts +11 -0
- package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/listener-protocol.js +5 -0
- package/dist/protocol/doors/listener-protocol.js.map +1 -1
- package/dist/protocol/doors/loopback-proof.d.ts +8 -0
- package/dist/protocol/doors/loopback-proof.d.ts.map +1 -0
- package/dist/protocol/doors/loopback-proof.js +11 -0
- package/dist/protocol/doors/loopback-proof.js.map +1 -0
- package/dist/protocol/doors/pass-scopes.d.ts +4 -0
- package/dist/protocol/doors/pass-scopes.d.ts.map +1 -0
- package/dist/protocol/doors/pass-scopes.js +3 -0
- package/dist/protocol/doors/pass-scopes.js.map +1 -0
- package/dist/protocol/doors/runner-protocol.d.ts +187 -0
- package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/runner-protocol.js +48 -1
- package/dist/protocol/doors/runner-protocol.js.map +1 -1
- package/dist/protocol/doors/sandbox-pass.d.ts +19 -2
- package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -1
- package/dist/protocol/doors/sandbox-pass.js +42 -10
- package/dist/protocol/doors/sandbox-pass.js.map +1 -1
- package/dist/protocol/doors/webext-links.d.ts.map +1 -1
- package/dist/protocol/doors/webext-links.js.map +1 -1
- package/dist/protocol/member-reach.d.ts +6 -0
- package/dist/protocol/member-reach.d.ts.map +1 -1
- package/dist/protocol/member-reach.js +24 -0
- package/dist/protocol/member-reach.js.map +1 -1
- package/dist/protocol/peer-mcp-server.d.ts +2 -0
- package/dist/protocol/peer-mcp-server.d.ts.map +1 -1
- package/dist/protocol/peer-mcp-server.js +1 -0
- package/dist/protocol/peer-mcp-server.js.map +1 -1
- package/dist/protocol/raw/extension-protocol.d.ts +518 -0
- package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
- package/dist/protocol/raw/extension-protocol.js +276 -0
- package/dist/protocol/raw/extension-protocol.js.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +572 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +25 -2
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +245 -3
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +79 -36
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/protocol/route-meta.d.ts.map +1 -1
- package/dist/protocol/route-meta.js.map +1 -1
- package/dist/schemas/account-routes.d.ts +176 -0
- package/dist/schemas/account-routes.d.ts.map +1 -0
- package/dist/schemas/account-routes.js +73 -0
- package/dist/schemas/account-routes.js.map +1 -0
- package/dist/schemas/activity.d.ts.map +1 -1
- package/dist/schemas/activity.js.map +1 -1
- package/dist/schemas/agent-background.d.ts +48 -0
- package/dist/schemas/agent-background.d.ts.map +1 -0
- package/dist/schemas/agent-background.js +63 -0
- package/dist/schemas/agent-background.js.map +1 -0
- package/dist/schemas/agent-land.d.ts +7 -0
- package/dist/schemas/agent-land.d.ts.map +1 -1
- package/dist/schemas/agent-land.js +11 -0
- package/dist/schemas/agent-land.js.map +1 -1
- package/dist/schemas/agent.d.ts +4 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +4 -2
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +40 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +668 -17
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +16 -41
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/auto-approve.d.ts +12 -0
- package/dist/schemas/auto-approve.d.ts.map +1 -0
- package/dist/schemas/auto-approve.js +12 -0
- package/dist/schemas/auto-approve.js.map +1 -0
- package/dist/schemas/automations.d.ts +170 -27
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +26 -34
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/bridge-heads.d.ts +57 -0
- package/dist/schemas/bridge-heads.d.ts.map +1 -0
- package/dist/schemas/bridge-heads.js +22 -0
- package/dist/schemas/bridge-heads.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +21 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +6 -0
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/checkout-hooks.d.ts +24 -0
- package/dist/schemas/checkout-hooks.d.ts.map +1 -0
- package/dist/schemas/checkout-hooks.js +23 -0
- package/dist/schemas/checkout-hooks.js.map +1 -0
- package/dist/schemas/ci-deployments.d.ts +30 -0
- package/dist/schemas/ci-deployments.d.ts.map +1 -0
- package/dist/schemas/ci-deployments.js +18 -0
- package/dist/schemas/ci-deployments.js.map +1 -0
- package/dist/schemas/ci-fleet.d.ts +216 -0
- package/dist/schemas/ci-fleet.d.ts.map +1 -0
- package/dist/schemas/ci-fleet.js +87 -0
- package/dist/schemas/ci-fleet.js.map +1 -0
- package/dist/schemas/ci.d.ts +348 -21
- package/dist/schemas/ci.d.ts.map +1 -1
- package/dist/schemas/ci.js +110 -19
- package/dist/schemas/ci.js.map +1 -1
- package/dist/schemas/command-run.d.ts +29 -0
- package/dist/schemas/command-run.d.ts.map +1 -0
- package/dist/schemas/command-run.js +20 -0
- package/dist/schemas/command-run.js.map +1 -0
- package/dist/schemas/connection-hub.d.ts +3 -1
- package/dist/schemas/connection-hub.d.ts.map +1 -1
- package/dist/schemas/connection-hub.js +2 -1
- package/dist/schemas/connection-hub.js.map +1 -1
- package/dist/schemas/context-continues.d.ts.map +1 -1
- package/dist/schemas/context-continues.js +2 -2
- package/dist/schemas/context-continues.js.map +1 -1
- package/dist/schemas/data-protection.d.ts +15 -2
- package/dist/schemas/data-protection.d.ts.map +1 -1
- package/dist/schemas/data-protection.js +15 -23
- package/dist/schemas/data-protection.js.map +1 -1
- package/dist/schemas/device-stacks.d.ts +131 -0
- package/dist/schemas/device-stacks.d.ts.map +1 -1
- package/dist/schemas/device-stacks.js +81 -0
- package/dist/schemas/device-stacks.js.map +1 -1
- package/dist/schemas/devices.d.ts +137 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +11 -2
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/environment.d.ts +1 -0
- package/dist/schemas/environment.d.ts.map +1 -1
- package/dist/schemas/environment.js +1 -0
- package/dist/schemas/environment.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +1186 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js +22 -4
- package/dist/schemas/extension-updates.js.map +1 -1
- package/dist/schemas/git/git.d.ts +13 -0
- package/dist/schemas/git/git.d.ts.map +1 -1
- package/dist/schemas/git/git.js +7 -7
- package/dist/schemas/git/git.js.map +1 -1
- package/dist/schemas/git/index-run.d.ts +1 -0
- package/dist/schemas/git/index-run.d.ts.map +1 -1
- package/dist/schemas/host-power.d.ts +76 -0
- package/dist/schemas/host-power.d.ts.map +1 -0
- package/dist/schemas/host-power.js +101 -0
- package/dist/schemas/host-power.js.map +1 -0
- package/dist/schemas/hosts.d.ts +365 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +33 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/issues.d.ts +55 -225
- package/dist/schemas/issues.d.ts.map +1 -1
- package/dist/schemas/issues.js +21 -43
- package/dist/schemas/issues.js.map +1 -1
- package/dist/schemas/keyring-native.d.ts.map +1 -1
- package/dist/schemas/keyring-native.js +3 -1
- package/dist/schemas/keyring-native.js.map +1 -1
- package/dist/schemas/keyring.d.ts +1 -0
- package/dist/schemas/keyring.d.ts.map +1 -1
- package/dist/schemas/keyring.js +3 -1
- package/dist/schemas/keyring.js.map +1 -1
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/members.d.ts.map +1 -1
- package/dist/schemas/members.js +2 -14
- package/dist/schemas/members.js.map +1 -1
- package/dist/schemas/metrics.d.ts +33 -0
- package/dist/schemas/metrics.d.ts.map +1 -1
- package/dist/schemas/metrics.js +26 -0
- package/dist/schemas/metrics.js.map +1 -1
- package/dist/schemas/need-kinds.d.ts +19 -0
- package/dist/schemas/need-kinds.d.ts.map +1 -0
- package/dist/schemas/need-kinds.js +7 -0
- package/dist/schemas/need-kinds.js.map +1 -0
- package/dist/schemas/needs.d.ts +868 -27
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +79 -9
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/offload.d.ts +61 -0
- package/dist/schemas/offload.d.ts.map +1 -1
- package/dist/schemas/offload.js +14 -1
- package/dist/schemas/offload.js.map +1 -1
- package/dist/schemas/outward-action.d.ts +39 -0
- package/dist/schemas/outward-action.d.ts.map +1 -0
- package/dist/schemas/outward-action.js +40 -0
- package/dist/schemas/outward-action.js.map +1 -0
- package/dist/schemas/ports.d.ts +4 -0
- package/dist/schemas/ports.d.ts.map +1 -1
- package/dist/schemas/ports.js +3 -0
- package/dist/schemas/ports.js.map +1 -1
- package/dist/schemas/providers/capacity.d.ts +6 -0
- package/dist/schemas/providers/capacity.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.d.ts +1 -0
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +1 -0
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/providers/refusals.d.ts +12 -0
- package/dist/schemas/providers/refusals.d.ts.map +1 -1
- package/dist/schemas/providers/refusals.js +4 -0
- package/dist/schemas/providers/refusals.js.map +1 -1
- package/dist/schemas/remote-access.d.ts +1 -0
- package/dist/schemas/remote-access.d.ts.map +1 -1
- package/dist/schemas/remote-access.js +1 -0
- package/dist/schemas/remote-access.js.map +1 -1
- package/dist/schemas/run-targets.d.ts.map +1 -1
- package/dist/schemas/run-targets.js +2 -1
- package/dist/schemas/run-targets.js.map +1 -1
- package/dist/schemas/runner-views.d.ts +24 -0
- package/dist/schemas/runner-views.d.ts.map +1 -0
- package/dist/schemas/runner-views.js +16 -0
- package/dist/schemas/runner-views.js.map +1 -0
- package/dist/schemas/sandbox-reach.d.ts +157 -0
- package/dist/schemas/sandbox-reach.d.ts.map +1 -0
- package/dist/schemas/sandbox-reach.js +112 -0
- package/dist/schemas/sandbox-reach.js.map +1 -0
- package/dist/schemas/secrets.d.ts +17 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +12 -5
- package/dist/schemas/secrets.js.map +1 -1
- package/dist/schemas/settings-history.d.ts +1 -1
- package/dist/schemas/settings-history.d.ts.map +1 -1
- package/dist/schemas/settings-history.js +5 -4
- package/dist/schemas/settings-history.js.map +1 -1
- package/dist/schemas/settings-savings.d.ts +58 -0
- package/dist/schemas/settings-savings.d.ts.map +1 -1
- package/dist/schemas/settings-savings.js +22 -0
- package/dist/schemas/settings-savings.js.map +1 -1
- package/dist/schemas/settings.d.ts +20 -42
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +24 -7
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/stack-grants.d.ts +60 -0
- package/dist/schemas/stack-grants.d.ts.map +1 -0
- package/dist/schemas/stack-grants.js +33 -0
- package/dist/schemas/stack-grants.js.map +1 -0
- package/dist/schemas/system.d.ts +19 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +9 -0
- package/dist/schemas/system.js.map +1 -1
- package/dist/schemas/terminal.d.ts +46 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +19 -0
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/watch-sources.d.ts +72 -0
- package/dist/schemas/watch-sources.d.ts.map +1 -0
- package/dist/schemas/watch-sources.js +88 -0
- package/dist/schemas/watch-sources.js.map +1 -0
- package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-search.js +1 -1
- package/dist/schemas/workspace/workspace-search.js.map +1 -1
- package/dist/schemas/wsl-memory.d.ts +76 -0
- package/dist/schemas/wsl-memory.d.ts.map +1 -0
- package/dist/schemas/wsl-memory.js +36 -0
- package/dist/schemas/wsl-memory.js.map +1 -0
- package/dist/state/auth-state.d.ts.map +1 -1
- package/dist/state/auth-state.js +3 -0
- package/dist/state/auth-state.js.map +1 -1
- package/dist/state/definition.d.ts +16 -8
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/runtime-state.d.ts +1 -1
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +1 -1
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/state/workspace-state.d.ts +9 -4
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +9 -4
- package/dist/state/workspace-state.js.map +1 -1
- package/dist/sync/workspace-sync-ignores.d.ts +4 -0
- package/dist/sync/workspace-sync-ignores.d.ts.map +1 -0
- package/dist/sync/workspace-sync-ignores.js +75 -0
- package/dist/sync/workspace-sync-ignores.js.map +1 -0
- package/dist/text/pages.d.ts.map +1 -1
- package/dist/text/pages.js +17 -4
- package/dist/text/pages.js.map +1 -1
- package/dist/text/transcript-fold.js +2 -2
- package/dist/text/transcript-fold.js.map +1 -1
- package/package.json +5 -5
- package/src/app-routes/app-pages.ts +3 -0
- package/src/app-routes/index.ts +1 -0
- package/src/app-routes/return-path.ts +16 -0
- package/src/briefs/agent-ask.ts +23 -0
- package/src/{chores/extension-update.ts → briefs/extension-update-brief.ts} +3 -2
- package/src/chores/digest.ts +1 -0
- package/src/chores/index.ts +13 -2
- package/src/chores/prompt.ts +3 -18
- package/src/chores/stack.ts +1 -0
- package/src/chores/verdict.ts +1 -0
- package/src/chores/workspace-scope.ts +3 -8
- package/src/contracts/accounts.contract.ts +3 -0
- package/src/contracts/agents.contract.ts +41 -5
- package/src/contracts/automations.contract.ts +2 -0
- package/src/contracts/capabilities.contract.ts +31 -2
- package/src/contracts/ci.contract.ts +119 -37
- package/src/contracts/device-ci-runners.contract.ts +81 -0
- package/src/contracts/device-stacks.contract.ts +97 -0
- package/src/contracts/extensions.contract.ts +12 -1
- package/src/contracts/ports.contract.ts +6 -6
- package/src/contracts/runner.contract.ts +117 -3
- package/src/contracts/runners.contract.ts +19 -0
- package/src/contracts/safety.contract.ts +2 -0
- package/src/contracts/secrets.contract.ts +39 -0
- package/src/contracts/settings.contract.ts +26 -0
- package/src/contracts/stack-grants.contract.ts +51 -0
- package/src/contracts/system.contract.ts +36 -62
- package/src/contracts/workspace.contract.ts +0 -22
- package/src/events/agent-events.ts +3 -2
- package/src/events/agent-words.test.ts +19 -1
- package/src/events/agent-words.ts +36 -2
- package/src/events/child-news.test.ts +91 -0
- package/src/events/child-news.ts +269 -0
- package/src/events/prompt-origins.ts +35 -0
- package/src/events/refusal-incidents.ts +60 -19
- package/src/events/requests.ts +18 -0
- package/src/events/transcript.ts +10 -1
- package/src/ids/conversation-ids.test.ts +3 -1
- package/src/ids/conversation-ids.ts +6 -4
- package/src/ids/project-dir.test.ts +1 -1
- package/src/ids/project-dir.ts +1 -1
- package/src/ids/project-id.test.ts +14 -0
- package/src/ids/project-id.ts +6 -4
- package/src/ids/run-row-ids.test.ts +38 -0
- package/src/ids/run-row-ids.ts +49 -0
- package/src/index.ts +6 -6
- package/src/models/agent-catalog.test.ts +7 -4
- package/src/models/agent-catalog.ts +3 -2
- package/src/models/agent-lanes.ts +8 -1
- package/src/models/agent-runtimes.ts +7 -6
- package/src/models/agent-standing.ts +13 -0
- package/src/models/model-roles.test.ts +61 -4
- package/src/models/model-roles.ts +153 -49
- package/src/models/model-setups.ts +49 -26
- package/src/models/provider-specs.test.ts +2 -2
- package/src/models/providers/provider-traits.test.ts +71 -0
- package/src/models/providers/provider-traits.ts +144 -0
- package/src/netd/browser-wire.ts +13 -0
- package/src/netd/generated/browser-wire.json +10 -0
- package/src/netd/generated/netd-wire.json +224 -1
- package/src/netd/generated/wire.ts +18 -6
- package/src/netd/wire-manifests.test.ts +16 -0
- package/src/policy/admin/admin-grant.ts +69 -0
- package/src/policy/approvals-execution.ts +11 -6
- package/src/policy/batch-runs.ts +2 -2
- package/src/policy/capabilities/capability-kinds.test.ts +112 -0
- package/src/policy/capabilities/capability-kinds.ts +110 -0
- package/src/policy/command-classes.ts +5 -3
- package/src/policy/credential-material.ts +1 -1
- package/src/policy/device-programs.ts +29 -20
- package/src/policy/message-limits.ts +8 -4
- package/src/policy/org-locks.ts +1 -0
- package/src/policy/overlay-lint.ts +1 -1
- package/src/policy/reserved-servers.ts +5 -1
- package/src/policy/role-capability.ts +3 -1
- package/src/policy/shell/command-normalise.test.ts +72 -0
- package/src/policy/shell/command-normalise.ts +212 -0
- package/src/policy/shell/workspace-root-exclude.ts +11 -0
- package/src/policy/tests/admin-grant.test.ts +35 -0
- package/src/policy/tests/command-classes.test.ts +41 -0
- package/src/protocol/doors/listener-protocol.ts +32 -1
- package/src/protocol/doors/loopback-proof.ts +34 -0
- package/src/protocol/doors/pass-scopes.ts +12 -0
- package/src/protocol/doors/runner-protocol.ts +133 -4
- package/src/protocol/doors/sandbox-pass.test.ts +33 -1
- package/src/protocol/doors/sandbox-pass.ts +92 -16
- package/src/protocol/doors/webext-links.ts +3 -1
- package/src/protocol/ingress-contract.fixture.json +5 -1
- package/src/protocol/member-reach.test.ts +40 -1
- package/src/protocol/member-reach.ts +40 -0
- package/src/protocol/peer-mcp-server.ts +6 -0
- package/src/protocol/raw/extension-protocol.ts +469 -2
- package/src/protocol/raw/raw-json-routes.ts +45 -1
- package/src/protocol/raw/raw-routes.ts +133 -40
- package/src/protocol/route-meta.ts +4 -1
- package/src/schemas/account-routes.ts +126 -0
- package/src/schemas/activity.ts +6 -4
- package/src/schemas/agent-background.ts +104 -0
- package/src/schemas/agent-land.ts +21 -2
- package/src/schemas/agent.test.ts +3 -0
- package/src/schemas/agent.ts +10 -4
- package/src/schemas/agents.ts +26 -65
- package/src/schemas/auto-approve.ts +31 -0
- package/src/schemas/automations.ts +51 -42
- package/src/schemas/bridge-heads.ts +33 -0
- package/src/schemas/capabilities.ts +23 -0
- package/src/schemas/checkout-hooks.ts +44 -0
- package/src/schemas/ci-deployments.ts +26 -0
- package/src/schemas/ci-fleet.ts +180 -0
- package/src/schemas/ci.ts +185 -45
- package/src/schemas/command-run.ts +44 -0
- package/src/schemas/compose-overlay.test.ts +1 -1
- package/src/schemas/compose-overlay.ts +1 -1
- package/src/schemas/connection-hub.ts +4 -2
- package/src/schemas/context-continues.ts +6 -3
- package/src/schemas/data-protection.ts +28 -34
- package/src/schemas/device-stacks.ts +162 -3
- package/src/schemas/device-swaps.test.ts +1 -1
- package/src/schemas/devices.ts +31 -2
- package/src/schemas/egress-private.test.ts +1 -1
- package/src/schemas/environment.ts +4 -0
- package/src/schemas/extension-updates.ts +35 -7
- package/src/schemas/git/git.ts +14 -14
- package/src/schemas/host-power.test.ts +53 -0
- package/src/schemas/host-power.ts +173 -0
- package/src/schemas/hosts.test.ts +32 -0
- package/src/schemas/hosts.ts +86 -2
- package/src/schemas/intentic-os.ts +2 -2
- package/src/schemas/issues.ts +43 -86
- package/src/schemas/keyring-native.test.ts +11 -3
- package/src/schemas/keyring-native.ts +3 -1
- package/src/schemas/keyring.ts +6 -1
- package/src/schemas/maintenance.ts +4 -3
- package/src/schemas/members.ts +4 -16
- package/src/schemas/metrics.test.ts +9 -1
- package/src/schemas/metrics.ts +43 -0
- package/src/schemas/need-kinds.ts +13 -0
- package/src/schemas/needs.ts +118 -14
- package/src/schemas/offload.ts +37 -3
- package/src/schemas/outward-action.ts +47 -0
- package/src/schemas/ports.ts +5 -0
- package/src/schemas/providers/plan-limits.ts +1 -0
- package/src/schemas/providers/refusals.ts +9 -0
- package/src/schemas/remote-access.ts +3 -0
- package/src/schemas/run-targets.ts +2 -1
- package/src/schemas/runner-views.ts +27 -0
- package/src/schemas/sandbox-reach.ts +161 -0
- package/src/schemas/secrets.ts +23 -5
- package/src/schemas/settings-history.ts +10 -5
- package/src/schemas/settings-savings.ts +29 -0
- package/src/schemas/settings.test.ts +24 -23
- package/src/schemas/settings.ts +55 -22
- package/src/schemas/stack-grants.ts +59 -0
- package/src/schemas/state-plan.test.ts +1 -1
- package/src/schemas/state-plan.ts +2 -2
- package/src/schemas/system.ts +16 -1
- package/src/schemas/terminal.ts +28 -0
- package/src/schemas/updates.test.ts +1 -1
- package/src/schemas/updates.ts +1 -1
- package/src/schemas/version-seam.test.ts +4 -1
- package/src/schemas/watch-sources.ts +127 -0
- package/src/schemas/workspace/workspace-search.ts +5 -2
- package/src/schemas/wsl-memory.ts +59 -0
- package/src/state/auth-state.ts +10 -0
- package/src/state/runtime-state.test.ts +3 -2
- package/src/state/runtime-state.ts +3 -1
- package/src/state/update-probation.ts +1 -1
- package/src/state/ways-back.test.ts +1 -1
- package/src/state/workspace-state.test.ts +2 -0
- package/src/state/workspace-state.ts +21 -21
- package/src/sync/workspace-sync-ignores.test.ts +48 -0
- package/src/sync/workspace-sync-ignores.ts +143 -0
- package/src/text/embed.ts +2 -2
- package/src/text/pages.ts +34 -7
- package/src/text/transcript-fold.test.ts +40 -2
- package/src/text/transcript-fold.ts +2 -2
- package/dist/chores/extension-update.d.ts.map +0 -1
- package/dist/chores/extension-update.js.map +0 -1
- package/dist/contracts/chores.contract.d.ts +0 -213
- package/dist/contracts/chores.contract.d.ts.map +0 -1
- package/dist/contracts/chores.contract.js +0 -32
- package/dist/contracts/chores.contract.js.map +0 -1
- package/dist/contracts/issues.contract.d.ts +0 -95
- package/dist/contracts/issues.contract.d.ts.map +0 -1
- package/dist/contracts/issues.contract.js +0 -50
- package/dist/contracts/issues.contract.js.map +0 -1
- package/src/chores/chores.test.ts +0 -24
- package/src/chores/digest.test.ts +0 -27
- package/src/chores/probes.integration.test.ts +0 -494
- package/src/chores/stack.test.ts +0 -140
- package/src/chores/verdict.test.ts +0 -761
- package/src/contracts/chores.contract.ts +0 -39
- package/src/contracts/issues.contract.ts +0 -53
|
@@ -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>>;
|
|
@@ -12,6 +12,7 @@ describe("TurnProfile", () => {
|
|
|
12
12
|
"fast",
|
|
13
13
|
"harness",
|
|
14
14
|
"isolated",
|
|
15
|
+
"job",
|
|
15
16
|
"model",
|
|
16
17
|
"runRole",
|
|
17
18
|
"thinking",
|
|
@@ -35,6 +36,7 @@ describe("TurnProfile", () => {
|
|
|
35
36
|
isolated: true,
|
|
36
37
|
unattended: true,
|
|
37
38
|
runRole: "loop-iteration",
|
|
39
|
+
job: "pipeline-fix",
|
|
38
40
|
permissionMode: "plan",
|
|
39
41
|
autoLand: false,
|
|
40
42
|
});
|
|
@@ -50,6 +52,7 @@ describe("TurnProfile", () => {
|
|
|
50
52
|
isolated: true,
|
|
51
53
|
unattended: true,
|
|
52
54
|
runRole: "loop-iteration",
|
|
55
|
+
job: "pipeline-fix",
|
|
53
56
|
});
|
|
54
57
|
});
|
|
55
58
|
|
package/src/schemas/agent.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { TurnErrandSchema } from "./speaker.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { CONVERSATION_ID, CONVERSATION_TITLE_MAX } from "../ids/conversation-ids.js";
|
|
4
4
|
import { canonicalHarness } from "../models/agent-catalog.js";
|
|
5
|
-
import { ModelRoleSchema } from "../models/model-roles.js";
|
|
5
|
+
import { ModelRoleSchema, RunRoleSchema } from "../models/model-roles.js";
|
|
6
6
|
import { NATIVE_PROVIDERS } from "../models/provider-specs.js";
|
|
7
7
|
import { AgentPlacementSchema } from "../protocol/doors/runner-protocol.js";
|
|
8
8
|
import { MENTION_LIMIT } from "../text/mentions.js";
|
|
@@ -198,8 +198,13 @@ const AgentTurnFieldsSchema = z.object({
|
|
|
198
198
|
),
|
|
199
199
|
// Which per-job model list answers when nobody named a model or provider (turn-resume.ts); names the job, not a
|
|
200
200
|
// tier, and never overrides an explicit pick.
|
|
201
|
-
runRole:
|
|
202
|
-
"What started this turn, when it was not a person typing: which of the sandbox's per-job model lists answers for it. Only used when the turn names no model of its own.",
|
|
201
|
+
runRole: RunRoleSchema.optional().describe(
|
|
202
|
+
"What started this turn, when it was not a person typing: which of the sandbox's per-job model lists answers for it, one of the jobs every sandbox has known (`pipeline-fix`, `loop-iteration`). A job an extension declares goes in `job`. Only used when the turn names no model of its own.",
|
|
203
|
+
),
|
|
204
|
+
// (2026-11-26) Any job's id, an extension's (`contributes.modelRoles`) included; `runRole` beside it keeps the closed
|
|
205
|
+
// list every daemon and the far ends of the field read, so it never shrinks (model-roles.ts RunRoleSchema).
|
|
206
|
+
job: ModelRoleSchema.optional().describe(
|
|
207
|
+
"The same as `runRole` for any job, one an enabled extension declares included (`nightly-audit`); wins over `runRole`. A sandbox from before 2026-11-26 ignores it.",
|
|
203
208
|
),
|
|
204
209
|
// Set only by the daemon's own dispatchers, never a client; requires conversationId to record it on.
|
|
205
210
|
origin: AgentOriginSchema.optional().describe(
|
|
@@ -387,7 +392,7 @@ export const withRuntimeDefaults = <T extends { readonly agent?: AgentProvider |
|
|
|
387
392
|
return { ...turn, agent, harness: canonicalHarness(agent, turn.harness) };
|
|
388
393
|
};
|
|
389
394
|
// Which turn this is, as opposed to what it says: who serves it and how (agent, harness, account, model and its knobs),
|
|
390
|
-
// as whom (actsAs), where (isolated), whether anyone watches (unattended) and for which job (runRole). A turn that
|
|
395
|
+
// as whom (actsAs), where (isolated), whether anyone watches (unattended) and for which job (job, runRole). A turn that
|
|
391
396
|
// continues another (a resume, a wake, a nudge, a child's follow-up) carries this whole, never a hand-picked part.
|
|
392
397
|
export const TurnProfileSchema = AgentTurnFieldsSchema.pick({
|
|
393
398
|
agent: true,
|
|
@@ -401,6 +406,7 @@ export const TurnProfileSchema = AgentTurnFieldsSchema.pick({
|
|
|
401
406
|
isolated: true,
|
|
402
407
|
unattended: true,
|
|
403
408
|
runRole: true,
|
|
409
|
+
job: true,
|
|
404
410
|
});
|
|
405
411
|
export type TurnProfile = z.infer<typeof TurnProfileSchema>;
|
|
406
412
|
const PROFILE_KEYS = Object.keys(TurnProfileSchema.shape) as readonly (keyof TurnProfile)[];
|
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>;
|
|
@@ -5,6 +5,7 @@ import { entryId } from "./internal.js";
|
|
|
5
5
|
import { IssuesConfigSchema } from "./issues.js";
|
|
6
6
|
import { ZoneSchema } from "../time/zone.js";
|
|
7
7
|
import { WorkspaceEventKindSchema } from "./automation-events.js";
|
|
8
|
+
import { WatchKindSchema, WatchSourceSchema } from "./watch-sources.js";
|
|
8
9
|
export { WorkspaceEventKindSchema, WorkspaceEventSchema, type WorkspaceEventKind, type WorkspaceEvent } from "./automation-events.js";
|
|
9
10
|
// An automation wakes the agent: the daemon fires each enabled one on its trigger, runs the optional guard command
|
|
10
11
|
// (non-zero exit skips the wake), then runs one turn with the prompt. The manifest is user config; run history is
|
|
@@ -16,6 +17,8 @@ export { WorkspaceEventKindSchema, WorkspaceEventSchema, type WorkspaceEventKind
|
|
|
16
17
|
// the sandbox was down still lands, late, on the next poll
|
|
17
18
|
// event: fires when an external system POSTs /automations/{id}/fire; its auth token lives outside the manifest
|
|
18
19
|
// (.intentic/secrets/doors.json), never in this versioned, widely-readable file
|
|
20
|
+
// `signature` additionally requires the provider's own signature, its secret named, not held, here; a signed
|
|
21
|
+
// webhook also drops a redelivery of a call it already took (src/automations/fire/webhook-signature.ts)
|
|
19
22
|
// listener: fires from a realtime source's own connection (an extension's gateway), no cron, no token, never reachable
|
|
20
23
|
// via /fire. `channelId`/`eventType`/`mentioned` narrow it; absent means unfiltered. `provider`/`eventType` are open
|
|
21
24
|
// strings validated at upsert against installed extensions' declared vocabulary
|
|
@@ -25,6 +28,21 @@ export { WorkspaceEventKindSchema, WorkspaceEventSchema, type WorkspaceEventKind
|
|
|
25
28
|
// pushes one branch per agent
|
|
26
29
|
// workspace: fires from the sandbox's own codebase (WorkspaceEventKindSchema)
|
|
27
30
|
|
|
31
|
+
// How a webhook's sender signs what it sends, by the provider's own scheme: github (X-Hub-Signature-256), linear
|
|
32
|
+
// (Linear-Signature), sentry (Sentry-Hook-Signature), stripe (Stripe-Signature) and standard-webhooks
|
|
33
|
+
// (webhook-id/webhook-timestamp/webhook-signature, what Svix, Clerk, Resend and others send).
|
|
34
|
+
export const WEBHOOK_SIGNATURE_SCHEMES = ["github", "linear", "sentry", "stripe", "standard-webhooks"] as const;
|
|
35
|
+
export const WebhookSignatureSchemeSchema = z.enum(WEBHOOK_SIGNATURE_SCHEMES);
|
|
36
|
+
export type WebhookSignatureScheme = z.infer<typeof WebhookSignatureSchemeSchema>;
|
|
37
|
+
export const WebhookSignatureSchema = z.object({
|
|
38
|
+
scheme: WebhookSignatureSchemeSchema.describe("Which provider's signing scheme the sender uses."),
|
|
39
|
+
secret: z
|
|
40
|
+
.string()
|
|
41
|
+
.regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/)
|
|
42
|
+
.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."),
|
|
43
|
+
});
|
|
44
|
+
export type WebhookSignature = z.infer<typeof WebhookSignatureSchema>;
|
|
45
|
+
|
|
28
46
|
export const TriggerSchema = z.discriminatedUnion("kind", [
|
|
29
47
|
z.object({
|
|
30
48
|
kind: z.literal("schedule").describe("On a clock."),
|
|
@@ -64,6 +82,11 @@ export const TriggerSchema = z.discriminatedUnion("kind", [
|
|
|
64
82
|
.positive()
|
|
65
83
|
.optional()
|
|
66
84
|
.describe("How many webhook calls a day may wake the agent, across every caller. Absent is a modest default rather than unlimited."),
|
|
85
|
+
// Added 2026-11-24, optional: a webhook that also proves its sender. The secret's VALUE stays in the sandbox's
|
|
86
|
+
// secrets store (never this versioned file); only its name is kept here.
|
|
87
|
+
signature: WebhookSignatureSchema.optional().describe(
|
|
88
|
+
"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.",
|
|
89
|
+
),
|
|
67
90
|
}),
|
|
68
91
|
z.object({
|
|
69
92
|
kind: z.literal("listener").describe("When a message arrives from somewhere outside."),
|
|
@@ -83,6 +106,12 @@ export const TriggerSchema = z.discriminatedUnion("kind", [
|
|
|
83
106
|
.array(z.string())
|
|
84
107
|
.optional()
|
|
85
108
|
.describe("Which websites may reach the public endpoint, the chat widget's or the bug reporter's. Absent or empty admits nobody."),
|
|
109
|
+
// (2026-11-26) Read by an extension's public door whose route declares `keyFromBrowsers`; until then the bug
|
|
110
|
+
// intake's own setting (`issues.keyFromBrowsers`), moved here by the automations file's conversion.
|
|
111
|
+
keyFromBrowsers: z
|
|
112
|
+
.boolean()
|
|
113
|
+
.optional()
|
|
114
|
+
.describe("Let a browser on a site you did not list in with this automation's key, rather than only from a site you listed. Off unless you need it."),
|
|
86
115
|
}),
|
|
87
116
|
// `repo` narrows to events whose span touches one workspace repo ("root" or a repo id); absent ⇒ any.
|
|
88
117
|
z.object({
|
|
@@ -92,48 +121,14 @@ export const TriggerSchema = z.discriminatedUnion("kind", [
|
|
|
92
121
|
}),
|
|
93
122
|
]);
|
|
94
123
|
export type Trigger = z.infer<typeof TriggerSchema>;
|
|
95
|
-
|
|
96
|
-
// or one of these ready-made sources, which the daemon checks itself (automations/watch/watch-sources.ts). Only once the check
|
|
97
|
-
// says so does anything run, and what it saw goes with the wake. No source needs an extension, a token or a shell.
|
|
98
|
-
// npm: the registry's view of one package. With `range`, the check passes once a published version satisfies it, and
|
|
99
|
-
// what it saw is that version; without, what it saw is the version under `tag` (latest by default), for `fireOn: change`.
|
|
100
|
-
// github-release: a public repository's newest release (prereleases only when asked), for `fireOn: change`.
|
|
101
|
-
// url: one page, its text or the first `select` match, for `fireOn: change`.
|
|
102
|
-
export const WatchSourceSchema = z.discriminatedUnion("kind", [
|
|
103
|
-
z.object({
|
|
104
|
-
kind: z.literal("npm").describe("A package on the npm registry."),
|
|
105
|
-
package: z.string().min(1).max(214).describe("The package name, scoped or not, like bun or @scope/name."),
|
|
106
|
-
range: z
|
|
107
|
-
.string()
|
|
108
|
-
.min(1)
|
|
109
|
-
.max(200)
|
|
110
|
-
.optional()
|
|
111
|
-
.describe("A semver range, like >=1.4.3. Passes once a published version satisfies it. Prereleases count only when the range names one."),
|
|
112
|
-
tag: z.string().min(1).max(100).optional().describe("Which dist-tag to read without a range. Absent means latest."),
|
|
113
|
-
}),
|
|
114
|
-
z.object({
|
|
115
|
-
kind: z.literal("github-release").describe("The newest release of a public GitHub repository."),
|
|
116
|
-
repo: z
|
|
117
|
-
.string()
|
|
118
|
-
.regex(/^[\w.-]+\/[\w.-]+$/, "repo must look like owner/name")
|
|
119
|
-
.describe("The repository, as owner/name."),
|
|
120
|
-
prereleases: z.boolean().optional().describe("Count prereleases too. Absent means only full releases."),
|
|
121
|
-
}),
|
|
122
|
-
z.object({
|
|
123
|
-
kind: z.literal("url").describe("One web page."),
|
|
124
|
-
url: z.string().url().describe("The page, http or https."),
|
|
125
|
-
select: z
|
|
126
|
-
.string()
|
|
127
|
-
.min(1)
|
|
128
|
-
.max(500)
|
|
129
|
-
.optional()
|
|
130
|
-
.describe("A regular expression; what it matches (its first group, if it has one) is what is watched rather than the whole page's text."),
|
|
131
|
-
}),
|
|
132
|
-
]);
|
|
133
|
-
export type WatchSource = z.infer<typeof WatchSourceSchema>;
|
|
124
|
+
export * from "./watch-sources.js";
|
|
134
125
|
// What a passing check sets off. `agent` (the default) is a new agent with the prompt, as every automation always did;
|
|
135
126
|
// `conversation` continues one that already exists, the way a watch wakes the conversation that armed it, so a plan
|
|
136
127
|
// made weeks ago resumes where it stopped; `notify` runs no model at all, and only tells the owner what the check saw.
|
|
128
|
+
// (2026-11-26) `extension` runs no model either: it hands the fire to a handler an extension's backend registered
|
|
129
|
+
// (`api.automations.onFire`) and its manifest declares (`permissions.fires`), through a backend-host door no person's,
|
|
130
|
+
// panel's or agent's token reaches. Only that extension saves one naming itself; a fire made while its backend is down
|
|
131
|
+
// is kept and handed over once it is back. An older daemon skips such an entry and keeps it in the file.
|
|
137
132
|
export const AutomationTargetSchema = z.discriminatedUnion("kind", [
|
|
138
133
|
z.object({ kind: z.literal("agent").describe("A new agent, told the prompt and what the check saw.") }),
|
|
139
134
|
z.object({
|
|
@@ -141,6 +136,11 @@ export const AutomationTargetSchema = z.discriminatedUnion("kind", [
|
|
|
141
136
|
conversationId: z.string().min(1).describe("Which conversation."),
|
|
142
137
|
}),
|
|
143
138
|
z.object({ kind: z.literal("notify").describe("No agent: a notification to the owner with what the check saw.") }),
|
|
139
|
+
z.object({
|
|
140
|
+
kind: z.literal("extension").describe("No agent: an extension's own code, woken through a handler its backend registered."),
|
|
141
|
+
extension: z.string().min(1).describe("The extension, as publisher.name."),
|
|
142
|
+
handler: z.string().min(1).describe("Which of its handlers, as its manifest's `permissions.fires` names them."),
|
|
143
|
+
}),
|
|
144
144
|
]);
|
|
145
145
|
export type AutomationTarget = z.infer<typeof AutomationTargetSchema>;
|
|
146
146
|
// `pass` (the default): every check that passes fires. `change`: a check fires only when what it saw differs from what
|
|
@@ -340,7 +340,7 @@ export const AutomationSchema = z.object({
|
|
|
340
340
|
// The guard's alternative: a condition the daemon checks itself. Refused at upsert beside a guard, since two checks
|
|
341
341
|
// would leave "what the check saw" meaning two things.
|
|
342
342
|
source: WatchSourceSchema.optional().describe(
|
|
343
|
-
"A ready-made check instead of a guard command: an npm package's version
|
|
343
|
+
"A ready-made check instead of a guard command: a web page, or a kind an enabled extension declares, like an npm package's version or a GitHub repository's newest release.",
|
|
344
344
|
),
|
|
345
345
|
fireOn: FireOnSchema.optional().describe(
|
|
346
346
|
"Fire on every passing check, or only when what the check saw changed since the last one. Absent means every passing check.",
|
|
@@ -443,7 +443,7 @@ export const AutomationSchema = z.object({
|
|
|
443
443
|
.string()
|
|
444
444
|
.optional()
|
|
445
445
|
.describe(
|
|
446
|
-
"Who made it, as the sandbox recorded it: a member's email,
|
|
446
|
+
"Who made it, as the sandbox recorded it: a member's email, agent:<conversation id> for one an agent proposed and a person approved, or extension:<publisher.name> for one an extension saved with its own token. Its notices (a watch firing or ending, a one-time wake done) go to them. Set by the sandbox; a value sent with a save is ignored. Absent on one made before it was kept, whose notices go to the sandbox's owner and maintainers.",
|
|
447
447
|
),
|
|
448
448
|
});
|
|
449
449
|
export type Automation = z.infer<typeof AutomationSchema>;
|
|
@@ -513,7 +513,10 @@ export const AutomationRunSchema = z.object({
|
|
|
513
513
|
// error: the guard passed but the turn errored
|
|
514
514
|
// interrupted: the daemon died mid-wake; without this value an interrupted fire vanishes from history and reads as
|
|
515
515
|
// never having fired
|
|
516
|
-
|
|
516
|
+
// carried: the turn was refused for a spent allowance and the sandbox carried it on by itself, moved to the next
|
|
517
|
+
// model or booked to go again at the reset (its detail says which). Not a failure: 2026-11-25, these were recorded as
|
|
518
|
+
// `error`, painted red and counted toward switching the automation off, against automationFailureLimit's own word
|
|
519
|
+
outcome: z.enum(["completed", "skipped", "error", "interrupted", "carried"]),
|
|
517
520
|
detail: z.string().optional(),
|
|
518
521
|
// Absent only for a run skipped before a conversation was needed.
|
|
519
522
|
conversationId: z.string().optional(),
|
|
@@ -582,6 +585,10 @@ export const TriggerSourceSchema = z.object({
|
|
|
582
585
|
mentionLabel: z.string().min(1).optional(),
|
|
583
586
|
// The provider owns the payload vocabulary, so it owns the first prompt that explains that payload.
|
|
584
587
|
starterPrompt: z.string().min(1).optional(),
|
|
588
|
+
// (2026-11-26) Set on a source anyone on the internet reaches (a listener's `strangers`), naming which of the owner's
|
|
589
|
+
// admission floors its wakes answer to: `visitor` (a website visitor's), `report` (a bug report's). Absent: a source
|
|
590
|
+
// whose senders the owner connected, held to the team chat floor.
|
|
591
|
+
strangers: z.enum(["visitor", "report"]).optional(),
|
|
585
592
|
// Any one connected capability is enough; computed client-side, since capability facts are pushed live and a served
|
|
586
593
|
// boolean would go stale between polls.
|
|
587
594
|
requires: z.array(z.string().min(1)).default([]),
|
|
@@ -630,5 +637,7 @@ export type AutomationTemplate = z.infer<typeof AutomationTemplateSchema>;
|
|
|
630
637
|
export const AutomationCatalogSchema = z.object({
|
|
631
638
|
sources: z.array(TriggerSourceSchema),
|
|
632
639
|
templates: z.array(AutomationTemplateSchema),
|
|
640
|
+
// (2026-11-26) Each installed extension's watch kinds; absent from an older daemon (BUILT_IN_WATCH_KINDS).
|
|
641
|
+
watchKinds: z.array(WatchKindSchema).optional(),
|
|
633
642
|
});
|
|
634
643
|
export type AutomationCatalog = z.infer<typeof AutomationCatalogSchema>;
|
|
@@ -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;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// ---- (2026-11-25) a deployment told to the forge: POST /ci/deployments ------------------------------------------------
|
|
4
|
+
// The repository's forge shows that a commit went to an environment, through the token of the github/gitlab
|
|
5
|
+
// connection the CI board already uses: on GitHub a Deployment (`environment`) and its statuses, on GitLab a commit
|
|
6
|
+
// status named `deploy/<environment>`. The first report for a deployment answers its `deploymentId`; the later states
|
|
7
|
+
// pass it back. A token without the scope is refused in the forge's words, never retried.
|
|
8
|
+
export const CiDeploymentStateSchema = z.enum(["in_progress", "success", "failure", "inactive"]);
|
|
9
|
+
export const CiDeploymentReportSchema = z.object({
|
|
10
|
+
repo: z.string().min(1).max(500),
|
|
11
|
+
sha: z.string().regex(/^[0-9a-f]{40,64}$/),
|
|
12
|
+
environment: z.string().min(1).max(100),
|
|
13
|
+
state: CiDeploymentStateSchema,
|
|
14
|
+
production: z.boolean().optional(),
|
|
15
|
+
description: z.string().max(140).optional(),
|
|
16
|
+
environmentUrl: z.string().url().max(2000).optional(),
|
|
17
|
+
logUrl: z.string().url().max(2000).optional(),
|
|
18
|
+
deploymentId: z.number().optional(),
|
|
19
|
+
});
|
|
20
|
+
export type CiDeploymentReport = z.infer<typeof CiDeploymentReportSchema>;
|
|
21
|
+
export const CiDeploymentAnswerSchema = z.object({
|
|
22
|
+
deploymentId: z.number().optional(),
|
|
23
|
+
// The forge's page for it, when it has one.
|
|
24
|
+
url: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
export type CiDeploymentAnswer = z.infer<typeof CiDeploymentAnswerSchema>;
|