@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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { TranscriptPatch, TranscriptRow } from "../events/transcript.js";
|
|
2
|
+
import { newRowId } from "./row-ids.js";
|
|
3
|
+
|
|
4
|
+
// Each of a run's rows by its own id (TranscriptRow.rowId), kept beside the fold's rows (index for index) rather than in
|
|
5
|
+
// them: the fold mints nothing, and every change it makes to its rows leaves as a patch, so following the patches, in
|
|
6
|
+
// the fold's order, keeps the two aligned. A run carried on after a restart keeps the ids its rows were drawn under,
|
|
7
|
+
// which the windows showing it hold.
|
|
8
|
+
//
|
|
9
|
+
// In the contract, beside the row ids it hands out, because everything that serves a run stamps its rows the same way: the sandbox's
|
|
10
|
+
// daemon, and the desktop app's agents on a computer (2026-11-24). A reader finds where a run's rows sit in what it
|
|
11
|
+
// already holds by these stamps (`run`, `rowId`), so a server that left them off had its finished turn drawn twice.
|
|
12
|
+
export class RunRowIds {
|
|
13
|
+
private readonly ids: string[];
|
|
14
|
+
|
|
15
|
+
constructor(opening: readonly TranscriptRow[]) {
|
|
16
|
+
this.ids = opening.map((row) => row.rowId ?? newRowId());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** The id of the row at `index` as the fold holds it now. */
|
|
20
|
+
at(index: number): string | undefined {
|
|
21
|
+
return this.ids[index];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A patch naming its row, and the stamp `run` on any row it carries: an append draws a new id (or keeps the one the
|
|
26
|
+
* row came with), a drop lets its row's go, and every other change names the row it changes.
|
|
27
|
+
*/
|
|
28
|
+
stamp(patch: TranscriptPatch, run: string): TranscriptPatch {
|
|
29
|
+
switch (patch.op) {
|
|
30
|
+
case "append": {
|
|
31
|
+
const rowId = patch.row.rowId ?? newRowId();
|
|
32
|
+
this.ids.push(rowId);
|
|
33
|
+
return { ...patch, row: { ...patch.row, run, rowId } };
|
|
34
|
+
}
|
|
35
|
+
case "drop": {
|
|
36
|
+
const [rowId] = this.ids.splice(patch.index, 1);
|
|
37
|
+
return rowId === undefined ? patch : { ...patch, rowId };
|
|
38
|
+
}
|
|
39
|
+
case "replace": {
|
|
40
|
+
const rowId = this.ids[patch.index];
|
|
41
|
+
return rowId === undefined ? { ...patch, row: { ...patch.row, run } } : { ...patch, rowId, row: { ...patch.row, run, rowId } };
|
|
42
|
+
}
|
|
43
|
+
default: {
|
|
44
|
+
const rowId = this.ids[patch.index];
|
|
45
|
+
return rowId === undefined ? patch : { ...patch, rowId };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -16,7 +16,6 @@ import { basesContract } from "./contracts/bases.contract.js";
|
|
|
16
16
|
import { bookmarksContract } from "./contracts/bookmarks.contract.js";
|
|
17
17
|
import { browserContract } from "./contracts/browser.contract.js";
|
|
18
18
|
import { capabilitiesContract } from "./contracts/capabilities.contract.js";
|
|
19
|
-
import { choresContract } from "./contracts/chores.contract.js";
|
|
20
19
|
import { ciContract } from "./contracts/ci.contract.js";
|
|
21
20
|
import { complianceContract } from "./contracts/compliance.contract.js";
|
|
22
21
|
import { diffContract } from "./contracts/diff.contract.js";
|
|
@@ -26,7 +25,6 @@ import { extensionsContract } from "./contracts/extensions.contract.js";
|
|
|
26
25
|
import { gitContract } from "./contracts/git.contract.js";
|
|
27
26
|
import { historyContract } from "./contracts/history.contract.js";
|
|
28
27
|
import { hubContract } from "./contracts/hub.contract.js";
|
|
29
|
-
import { issuesContract } from "./contracts/issues.contract.js";
|
|
30
28
|
import { logsContract } from "./contracts/logs.contract.js";
|
|
31
29
|
import { loopsContract } from "./contracts/loops.contract.js";
|
|
32
30
|
import { needsContract } from "./contracts/needs.contract.js";
|
|
@@ -41,6 +39,7 @@ import { providersContract } from "./contracts/providers.contract.js";
|
|
|
41
39
|
import { publicContract } from "./contracts/public.contract.js";
|
|
42
40
|
import { pushContract } from "./contracts/push.contract.js";
|
|
43
41
|
import { remoteContract } from "./contracts/remote.contract.js";
|
|
42
|
+
import { runnersContract } from "./contracts/runners.contract.js";
|
|
44
43
|
import { rolesContract } from "./contracts/roles.contract.js";
|
|
45
44
|
import { runsContract } from "./contracts/runs.contract.js";
|
|
46
45
|
import { safetyContract } from "./contracts/safety.contract.js";
|
|
@@ -51,6 +50,7 @@ import { sessionsContract } from "./contracts/sessions.contract.js";
|
|
|
51
50
|
import { settingsContract } from "./contracts/settings.contract.js";
|
|
52
51
|
import { shareContract } from "./contracts/share.contract.js";
|
|
53
52
|
import { skillsContract } from "./contracts/skills.contract.js";
|
|
53
|
+
import { stackGrantsContract } from "./contracts/stack-grants.contract.js";
|
|
54
54
|
import { systemContract } from "./contracts/system.contract.js";
|
|
55
55
|
import { translatorContract } from "./contracts/translator.contract.js";
|
|
56
56
|
import { usageContract } from "./contracts/usage.contract.js";
|
|
@@ -77,7 +77,6 @@ export const sandboxContract: {
|
|
|
77
77
|
bookmarks: typeof bookmarksContract;
|
|
78
78
|
browser: typeof browserContract;
|
|
79
79
|
capabilities: typeof capabilitiesContract;
|
|
80
|
-
chores: typeof choresContract;
|
|
81
80
|
ci: typeof ciContract;
|
|
82
81
|
compliance: typeof complianceContract;
|
|
83
82
|
diff: typeof diffContract;
|
|
@@ -87,7 +86,6 @@ export const sandboxContract: {
|
|
|
87
86
|
git: typeof gitContract;
|
|
88
87
|
history: typeof historyContract;
|
|
89
88
|
hub: typeof hubContract;
|
|
90
|
-
issues: typeof issuesContract;
|
|
91
89
|
logs: typeof logsContract;
|
|
92
90
|
loops: typeof loopsContract;
|
|
93
91
|
needs: typeof needsContract;
|
|
@@ -103,6 +101,7 @@ export const sandboxContract: {
|
|
|
103
101
|
push: typeof pushContract;
|
|
104
102
|
remote: typeof remoteContract;
|
|
105
103
|
roles: typeof rolesContract;
|
|
104
|
+
runners: typeof runnersContract;
|
|
106
105
|
runs: typeof runsContract;
|
|
107
106
|
safety: typeof safetyContract;
|
|
108
107
|
seal: typeof sealContract;
|
|
@@ -112,6 +111,7 @@ export const sandboxContract: {
|
|
|
112
111
|
settings: typeof settingsContract;
|
|
113
112
|
share: typeof shareContract;
|
|
114
113
|
skills: typeof skillsContract;
|
|
114
|
+
stackGrants: typeof stackGrantsContract;
|
|
115
115
|
system: typeof systemContract;
|
|
116
116
|
translator: typeof translatorContract;
|
|
117
117
|
usage: typeof usageContract;
|
|
@@ -132,7 +132,6 @@ export const sandboxContract: {
|
|
|
132
132
|
bookmarks: bookmarksContract,
|
|
133
133
|
browser: browserContract,
|
|
134
134
|
capabilities: capabilitiesContract,
|
|
135
|
-
chores: choresContract,
|
|
136
135
|
ci: ciContract,
|
|
137
136
|
compliance: complianceContract,
|
|
138
137
|
diff: diffContract,
|
|
@@ -142,7 +141,6 @@ export const sandboxContract: {
|
|
|
142
141
|
git: gitContract,
|
|
143
142
|
history: historyContract,
|
|
144
143
|
hub: hubContract,
|
|
145
|
-
issues: issuesContract,
|
|
146
144
|
logs: logsContract,
|
|
147
145
|
loops: loopsContract,
|
|
148
146
|
needs: needsContract,
|
|
@@ -158,6 +156,7 @@ export const sandboxContract: {
|
|
|
158
156
|
push: pushContract,
|
|
159
157
|
remote: remoteContract,
|
|
160
158
|
roles: rolesContract,
|
|
159
|
+
runners: runnersContract,
|
|
161
160
|
runs: runsContract,
|
|
162
161
|
safety: safetyContract,
|
|
163
162
|
seal: sealContract,
|
|
@@ -167,6 +166,7 @@ export const sandboxContract: {
|
|
|
167
166
|
settings: settingsContract,
|
|
168
167
|
share: shareContract,
|
|
169
168
|
skills: skillsContract,
|
|
169
|
+
stackGrants: stackGrantsContract,
|
|
170
170
|
system: systemContract,
|
|
171
171
|
translator: translatorContract,
|
|
172
172
|
usage: usageContract,
|
|
@@ -275,14 +275,17 @@ test("the ceiling has nothing to disclose; a floor names what it lacks", () => {
|
|
|
275
275
|
expect(acp).not.toContain("no code runs, shell only");
|
|
276
276
|
expect(acpCaps.commands).toBe(true);
|
|
277
277
|
expect(acpCaps.terminals).toBe(true);
|
|
278
|
-
// Per-tool approvals and
|
|
279
|
-
//
|
|
280
|
-
// the turn's one exit's (a failure coded by its words, a silent agent coded an
|
|
278
|
+
// Per-tool approvals, questions and effort ride the protocol's own seams (request_permission, form elicitation, the
|
|
279
|
+
// session's `thought_level` option where the agent offers one); isolation stays off, since the pooled process is
|
|
280
|
+
// every conversation's. Recovery is the turn's one exit's (a failure coded by its words, a silent agent coded an
|
|
281
|
+
// outage), so it is every agent's too.
|
|
281
282
|
expect(acpCaps.permissions).toBe("modes");
|
|
282
283
|
expect(acpCaps.questions).toBe(true);
|
|
284
|
+
expect(acpCaps.effort).toBe(true);
|
|
283
285
|
expect(acp).not.toContain("no per-tool approvals");
|
|
284
286
|
expect(acp).not.toContain("no clarifying questions");
|
|
285
|
-
expect(acp).
|
|
287
|
+
expect(acp).not.toContain("no effort control");
|
|
288
|
+
expect(acp).toContain("worktree by cwd only");
|
|
286
289
|
expect(acp).not.toContain("no auto-resume after outage");
|
|
287
290
|
|
|
288
291
|
// Codex takes the daemon's own servers too, over the door, so only plugins are missing.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { providerHas, providerTraits } from "./providers/provider-traits.js";
|
|
1
2
|
import { ACP, type AgentCapabilities, CLAUDE_CODE, CODEX, MUSE, OPENCODE, PI } from "./agent-runtimes.js";
|
|
2
3
|
import { type LoopTerms, type NativeProvider, PROVIDER_SPECS, type ProviderAccess, type ProviderLoops, providerSpec } from "./provider-specs.js";
|
|
3
4
|
import type { AgentHarness, AgentLoop, AgentProvider, PermissionMode } from "../schemas/agent.js";
|
|
@@ -257,7 +258,7 @@ export const EFFORT_TIERS: readonly string[] = ["minimal", "low", "medium", "hig
|
|
|
257
258
|
// Filters exactly one pair: Claude's `max` with thinking explicitly false, the one combination Anthropic's API refuses
|
|
258
259
|
// (400). Absent thinking is not off; the model's own default answers, every other tier or provider passes through.
|
|
259
260
|
export const effortAllowed = (effort: string, provider: AgentProvider, thinking: boolean | undefined): boolean =>
|
|
260
|
-
effort !== "max" || provider !== "
|
|
261
|
+
effort !== "max" || providerTraits(provider)?.effortScale !== "anthropic" || thinking !== false;
|
|
261
262
|
|
|
262
263
|
// The same rule applied as a repair, not a filter: a route, extension, restored tab or pinned model can all bypass the
|
|
263
264
|
// picker. The tier moves, not the thinking setting, since turning thinking off was the user's own deliberate choice.
|
|
@@ -273,4 +274,4 @@ export const sendableThinking = (effort: string | undefined, thinking: boolean |
|
|
|
273
274
|
// false). The Claude Code loop also needs a first-party route, since it serves translated and non-Anthropic endpoints
|
|
274
275
|
// that refuse it; any other loop that can ask speaks to its own vendor, whose catalog is where the badge came from.
|
|
275
276
|
export const fastAllowed = (capabilities: AgentCapabilities, provider: AgentProvider, badges: readonly ModelBadge[] | undefined): boolean =>
|
|
276
|
-
capabilities.fastMode && (capabilities.runtime !== "claude-code" || provider
|
|
277
|
+
capabilities.fastMode && (capabilities.runtime !== "claude-code" || providerHas(provider, "firstPartyAnthropic")) && (badges ?? []).includes("fast");
|
|
@@ -3,7 +3,7 @@ import type { AutomationApproval } from "../schemas/automations.js";
|
|
|
3
3
|
import { goesBySelf } from "../schemas/agent-next.js";
|
|
4
4
|
import { automationOf, movedAt, type StackMember, stackHeads } from "./agent-stack.js";
|
|
5
5
|
import { parentOf } from "./agent-starter.js";
|
|
6
|
-
import { type AgentStanding, blocked, heardByParent, onlyOwnerCanAnswer, turnInFlight, turnWorking, watching } from "./agent-standing.js";
|
|
6
|
+
import { type AgentStanding, blocked, heardByParent, onlyOwnerCanAnswer, supervising, turnInFlight, turnWorking, watching } from "./agent-standing.js";
|
|
7
7
|
|
|
8
8
|
// The lane every surface files a conversation in, and what of a fleet calls the person. Moved here from the editor
|
|
9
9
|
// (_editor/web/src/models/agent-status/agentStatus-lanes.ts, which re-exports it) on 2026-10-16, so the daemon's
|
|
@@ -81,6 +81,13 @@ export const laneOf = (agent: AgentStanding): FleetLane => {
|
|
|
81
81
|
if (goesBySelf(agent)) {
|
|
82
82
|
return "active";
|
|
83
83
|
}
|
|
84
|
+
// A parent whose own turn ended while what it started works on (a workflow run, a spawned child still running or
|
|
85
|
+
// still waiting to start) is woken by their reports, so the same holds: Finished would call over an orchestration
|
|
86
|
+
// that is half done. The board already lifted a family into Active for a child conversation running under it
|
|
87
|
+
// (childFold), but a workflow between agents and a child not yet started are no card, so nothing lifted it.
|
|
88
|
+
if (supervising(agent)) {
|
|
89
|
+
return "active";
|
|
90
|
+
}
|
|
84
91
|
// `landed`/`idle`/`ready` all finish here: `ready` is work held on the branch because auto-land is off, still
|
|
85
92
|
// finished rather than attention since nothing is failing. `resumed` lands here too: nothing running, nothing
|
|
86
93
|
// owed.
|
|
@@ -268,9 +268,10 @@ export const ACP: AgentCapabilities = {
|
|
|
268
268
|
mcp: "tools",
|
|
269
269
|
// The JS backend is the door's `code` server, each script asked of the turn's gate before it runs.
|
|
270
270
|
execution: ["shell", "js"],
|
|
271
|
-
// A session's `thought_level` option takes the turn's effort where the agent offers one (acp-model.ts)
|
|
272
|
-
//
|
|
273
|
-
|
|
271
|
+
// A session's `thought_level` option takes the turn's effort where the agent offers one (acp-model.ts); one offering
|
|
272
|
+
// none keeps its own level. The agent owns its reasoning settings, so the picker draws no scale and names no effort
|
|
273
|
+
// for it (the editor's effortScale.ts ownsReasoning): only an effort a turn names itself, a spawn's, reaches it.
|
|
274
|
+
effort: true,
|
|
274
275
|
fastMode: false,
|
|
275
276
|
// One warm process serves every conversation on the agent, each session in its own cwd; a mount namespace belongs to
|
|
276
277
|
// one turn, so a process shared across conversations can stand in none of them. Keying the pool by namespace would
|
|
@@ -329,9 +330,9 @@ export const GROK_BUILD: AgentCapabilities = {
|
|
|
329
330
|
...ACP,
|
|
330
331
|
runtime: "grok-build",
|
|
331
332
|
effort: true,
|
|
332
|
-
// Its ask-user tool
|
|
333
|
-
//
|
|
334
|
-
questions:
|
|
333
|
+
// Its ask-user tool asks through an xAI protocol extension (`_x.ai/ask_user_question`), not form elicitation; the
|
|
334
|
+
// daemon answers it on the question card through Grok's dialect (@intentic/acp-events dialects/grok-questions.ts).
|
|
335
|
+
questions: true,
|
|
335
336
|
};
|
|
336
337
|
|
|
337
338
|
// Pi driven over its RPC mode: above the ACP floor and below the Claude Code ceiling. Real mid-turn steering, an effort
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type AgentAttention,
|
|
3
3
|
type AgentJob,
|
|
4
|
+
type AgentScriptRun,
|
|
4
5
|
type AgentStatus,
|
|
5
6
|
type AgentWatch,
|
|
6
7
|
awaitsWake,
|
|
@@ -67,6 +68,10 @@ export interface AgentStanding {
|
|
|
67
68
|
// review, test or ask, which hangs under that conversation's card and is never reported to it
|
|
68
69
|
// (subagents/child-report.ts), so nothing it stops on is that conversation's news. Absent for every other one.
|
|
69
70
|
readonly fresh?: { readonly of: string } | undefined;
|
|
71
|
+
// Workflow runs it started that are still going (AgentSummary.scriptRuns), and how many of the subagents it started
|
|
72
|
+
// are still live (AgentSummary.subagents); `supervising` reads both. Absent for nearly every conversation.
|
|
73
|
+
readonly scriptRuns?: readonly AgentScriptRun[] | undefined;
|
|
74
|
+
readonly subagents?: { readonly running: number } | undefined;
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
// A spent allowance, not a failure to fix: nothing broken, and it comes back. Read off `failureCode` rather than
|
|
@@ -100,6 +105,14 @@ export const conflictIsYours = (agent: AgentStanding): boolean =>
|
|
|
100
105
|
// reading (a watch, or a wake waiting in its queue); a daemon older than it is read by its watches.
|
|
101
106
|
export const watching = (agent: AgentStanding): boolean => awaitsWake(agent);
|
|
102
107
|
|
|
108
|
+
// Something it started is still at work and will be reported to it in a turn of its own: a workflow run still starting
|
|
109
|
+
// agents, or a subagent that is live (spawned, handed over a link, or waiting for a seat, memory or the owner to
|
|
110
|
+
// start). Such a parent is not finished even when its own turn ended. An in-process subagent dies with the turn that ran
|
|
111
|
+
// it (subagents.ts `closeSubagents`), so once that turn is over the count holds only children that will report back.
|
|
112
|
+
// 2026-11-25: an orchestrator whose workflow had three children waiting to start was shown in Finished with "3 at work"
|
|
113
|
+
// in its tray.
|
|
114
|
+
export const supervising = (agent: AgentStanding): boolean => (agent.scriptRuns?.length ?? 0) > 0 || (agent.subagents?.running ?? 0) > 0;
|
|
115
|
+
|
|
103
116
|
// The running job behind one of its armed watches that sits at a prompt (AgentJob.inputWait: blocked reading its
|
|
104
117
|
// terminal, nothing moving), the first such where there are several. Its watch fires only on an exit that will not
|
|
105
118
|
// come, so the card names it and offers to end it.
|
|
@@ -1,15 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgentTurnSchema } from "../schemas/agent.js";
|
|
2
|
+
import {
|
|
3
|
+
contributedModelRole,
|
|
4
|
+
jobFields,
|
|
5
|
+
CORE_MODEL_ROLES,
|
|
6
|
+
EXTENSION_ROLES_BEFORE_CONTRIBUTIONS,
|
|
7
|
+
ModelRoleSchema,
|
|
8
|
+
PRESET_SETUPS,
|
|
9
|
+
ROLES_BEFORE_CONTRIBUTIONS,
|
|
10
|
+
} from "./model-roles.js";
|
|
2
11
|
|
|
3
12
|
// The catalog draws the settings page directly, so its properties must hold of the table itself, not be remembered by
|
|
4
13
|
// whoever adds a row.
|
|
5
14
|
|
|
6
15
|
test("the page reads one-shots first, then whole sessions, in the table's own order", () => {
|
|
7
|
-
const kinds =
|
|
16
|
+
const kinds = CORE_MODEL_ROLES.map((role) => role.kind);
|
|
8
17
|
|
|
9
18
|
expect(kinds.indexOf(`run`)).toBe(kinds.lastIndexOf(`helper`) + 1);
|
|
10
19
|
});
|
|
11
20
|
|
|
12
21
|
test("every job is suggested a preset, and the cheap one is never suggested for a whole session", () => {
|
|
13
|
-
expect(
|
|
14
|
-
expect(new Set<string>(
|
|
22
|
+
expect(CORE_MODEL_ROLES.every((role) => PRESET_SETUPS.includes(role.setup))).toBe(true);
|
|
23
|
+
expect(new Set<string>(CORE_MODEL_ROLES.filter((role) => role.kind === `run`).map((role) => role.setup)).has(`low`)).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// (2026-11-26) Six jobs left the table for their extensions' manifests; what a daemon from before served stays readable.
|
|
27
|
+
describe(`jobs extensions declare`, () => {
|
|
28
|
+
test(`a job's id is any lowercase dashed word, so an extension's reads wherever a job is named`, () => {
|
|
29
|
+
expect(ModelRoleSchema.safeParse(`pipeline-fix`).success).toBe(true);
|
|
30
|
+
expect(ModelRoleSchema.safeParse(`saldeo-reconcile`).success).toBe(true);
|
|
31
|
+
expect(ModelRoleSchema.safeParse(`Pipeline fix`).success).toBe(false);
|
|
32
|
+
expect(ModelRoleSchema.safeParse(``).success).toBe(false);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test(`none of the six is the sandbox's own any more, and the table of before still lists every job in its order`, () => {
|
|
36
|
+
const moved: readonly string[] = EXTENSION_ROLES_BEFORE_CONTRIBUTIONS.map((role) => role.id);
|
|
37
|
+
expect(moved).toEqual([`pipeline-fix`, `deployment-fix`, `maintenance-chore`, `refactor-run`, `documentation-run`, `acceptance-run`]);
|
|
38
|
+
expect(CORE_MODEL_ROLES.filter((role) => moved.includes(role.id))).toEqual([]);
|
|
39
|
+
expect(ROLES_BEFORE_CONTRIBUTIONS.map((role) => role.id).toSorted()).toEqual([...CORE_MODEL_ROLES.map((role) => role.id), ...moved].toSorted());
|
|
40
|
+
expect(ROLES_BEFORE_CONTRIBUTIONS.slice(8, 11).map((role) => role.id)).toEqual([`pipeline-fix`, `deployment-fix`, `workflow-fix`]);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test(`a declaration is served as a whole session, suggested medium and drawn with a wrench unless it says otherwise`, () => {
|
|
44
|
+
expect(contributedModelRole({ id: `nightly-audit`, label: `Nightly audits`, explanation: `The audit run each night.` }, `acme.audit`, false)).toEqual({
|
|
45
|
+
id: `nightly-audit`,
|
|
46
|
+
label: `Nightly audits`,
|
|
47
|
+
blurb: `The audit run each night.`,
|
|
48
|
+
kind: `run`,
|
|
49
|
+
icon: `wrench`,
|
|
50
|
+
setup: `medium`,
|
|
51
|
+
extension: `acme.audit`,
|
|
52
|
+
enabled: false,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// `runRole` stays the closed list every daemon reads, so it never shrinks for a far end still reading it; an extension's
|
|
58
|
+
// job travels as `job`, which a daemon from before ignores.
|
|
59
|
+
describe(`how a turn names its job`, () => {
|
|
60
|
+
test(`one every daemon knows rides as runRole, any other as job`, () => {
|
|
61
|
+
expect(jobFields(`maintenance-chore`)).toEqual({ runRole: `maintenance-chore` });
|
|
62
|
+
expect(jobFields(`loop-iteration`)).toEqual({ runRole: `loop-iteration` });
|
|
63
|
+
expect(jobFields(`nightly-audit`)).toEqual({ job: `nightly-audit` });
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test(`runRole takes only the closed list, job any job's id`, () => {
|
|
67
|
+
expect(AgentTurnSchema.safeParse({ prompt: `go`, runRole: `pipeline-fix` }).success).toBe(true);
|
|
68
|
+
expect(AgentTurnSchema.safeParse({ prompt: `go`, runRole: `nightly-audit` }).success).toBe(false);
|
|
69
|
+
expect(AgentTurnSchema.parse({ prompt: `go`, job: `nightly-audit` }).job).toBe(`nightly-audit`);
|
|
70
|
+
expect(AgentTurnSchema.safeParse({ prompt: `go`, job: `Nightly audit` }).success).toBe(false);
|
|
71
|
+
});
|
|
15
72
|
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { MODEL_ROLE_ID, MODEL_ROLE_ID_MAX, type ModelRoleContribution } from "@intentic/extension-manifest";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
|
|
3
4
|
// Every job that picks a model, one row per job; the unit is the role, not a difficulty tier. A job runs on the setup it
|
|
4
5
|
// was put on (model-setups.ts), an ordered fallback ladder it shares with every other job put there; a job on none, or
|
|
5
|
-
// on an empty one, is off (helper) or falls back to the caller's own chat model (run).
|
|
6
|
-
//
|
|
6
|
+
// on an empty one, is off (helper) or falls back to the caller's own chat model (run). This table holds the sandbox's
|
|
7
|
+
// own jobs; an extension declares the jobs it starts runs for (`contributes.modelRoles`), and the daemon serves both
|
|
8
|
+
// (`GET /settings/model-roles`), which the settings page and every reader that resolves a job by id read.
|
|
9
|
+
// (2026-11-26) Until then this table also listed six extensions' jobs, so a job could not come and go with its extension.
|
|
7
10
|
|
|
8
11
|
export const ModelRoleKindSchema = z.enum(["helper", "run"]);
|
|
9
12
|
export type ModelRoleKind = z.infer<typeof ModelRoleKindSchema>;
|
|
@@ -13,9 +16,8 @@ export type ModelRoleKind = z.infer<typeof ModelRoleKindSchema>;
|
|
|
13
16
|
export const PRESET_SETUPS = ["low", "medium", "high"] as const;
|
|
14
17
|
export type PresetSetup = (typeof PRESET_SETUPS)[number];
|
|
15
18
|
|
|
16
|
-
// `id` is a bare string
|
|
17
|
-
|
|
18
|
-
interface ModelRoleRow {
|
|
19
|
+
// One job, the sandbox's own or an extension's. `id` is a bare string: an extension's job is named by its declaration.
|
|
20
|
+
export interface ModelRoleSpec {
|
|
19
21
|
readonly id: string;
|
|
20
22
|
// The owner's own words for the job; never a difficulty tier.
|
|
21
23
|
readonly label: string;
|
|
@@ -29,8 +31,9 @@ interface ModelRoleRow {
|
|
|
29
31
|
readonly setup: PresetSetup;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
// Ids are wire-stable (`AgentTurn.runRole`); order is the settings page's: one-shot helpers first, then whole sessions
|
|
33
|
-
|
|
34
|
+
// Ids are wire-stable (`AgentTurn.job`, `runRole`); order is the settings page's: one-shot helpers first, then whole sessions,
|
|
35
|
+
// then the enabled extensions' jobs.
|
|
36
|
+
export const CORE_MODEL_ROLES = [
|
|
34
37
|
{
|
|
35
38
|
id: "commit-message",
|
|
36
39
|
label: "Commit messages",
|
|
@@ -105,6 +108,102 @@ export const MODEL_ROLES = [
|
|
|
105
108
|
icon: "server",
|
|
106
109
|
setup: "low",
|
|
107
110
|
},
|
|
111
|
+
{
|
|
112
|
+
// Started by a person's press on a failure the app cannot settle by itself (agentFix.ts in the editor): a sync that
|
|
113
|
+
// conflicts, a push the remote refuses, a commit a hook refuses, a dev server that crashed, a build that failed.
|
|
114
|
+
id: "workflow-fix",
|
|
115
|
+
label: "Workflow fixes",
|
|
116
|
+
blurb: "The agent started by Fix with agent on a failed sync, push, commit, run or build.",
|
|
117
|
+
kind: "run",
|
|
118
|
+
icon: "wrench",
|
|
119
|
+
setup: "high",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "approval-queue",
|
|
123
|
+
label: "Approvals queue",
|
|
124
|
+
blurb: "The turn that publishes or acts on what you approved.",
|
|
125
|
+
kind: "run",
|
|
126
|
+
icon: "check-circle",
|
|
127
|
+
setup: "medium",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "extension-review",
|
|
131
|
+
label: "Extension update reviews",
|
|
132
|
+
blurb: "The agent that reads an extension update before it is applied.",
|
|
133
|
+
kind: "run",
|
|
134
|
+
icon: "box",
|
|
135
|
+
setup: "medium",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
id: "loop-iteration",
|
|
139
|
+
label: "Loop iterations",
|
|
140
|
+
blurb: "Each round of a loop working towards its goal.",
|
|
141
|
+
kind: "run",
|
|
142
|
+
icon: "repeat",
|
|
143
|
+
setup: "high",
|
|
144
|
+
},
|
|
145
|
+
] as const satisfies readonly ModelRoleSpec[];
|
|
146
|
+
|
|
147
|
+
// One of the sandbox's own jobs.
|
|
148
|
+
export type CoreModelRole = (typeof CORE_MODEL_ROLES)[number]["id"];
|
|
149
|
+
// Any job's id, the sandbox's own or one an extension declares: what `AgentTurn.job` and the keys of `roleSetups` hold.
|
|
150
|
+
export type ModelRole = string;
|
|
151
|
+
|
|
152
|
+
const CORE_IDS = new Set<string>(CORE_MODEL_ROLES.map((role) => role.id));
|
|
153
|
+
export const isCoreModelRole = (id: string): id is CoreModelRole => CORE_IDS.has(id);
|
|
154
|
+
|
|
155
|
+
/** One of the sandbox's own jobs by id, or undefined for an extension's (or nobody's). */
|
|
156
|
+
export const coreModelRole = (id: string): ModelRoleSpec | undefined => CORE_MODEL_ROLES.find((role) => role.id === id);
|
|
157
|
+
|
|
158
|
+
// A string, not the table's enum (2026-11-26): an extension's job is named by its declaration, which the contract cannot
|
|
159
|
+
// list. A run naming a job nobody declares opens on the caller's own model, as a run naming none does.
|
|
160
|
+
export const ModelRoleSchema = z
|
|
161
|
+
.string()
|
|
162
|
+
.max(MODEL_ROLE_ID_MAX)
|
|
163
|
+
.regex(MODEL_ROLE_ID, "a job's id is lowercase words joined by dashes")
|
|
164
|
+
.describe("A job's id: one of the sandbox's own (`commit-message`, `loop-iteration`) or one an enabled extension declares (`pipeline-fix`).");
|
|
165
|
+
|
|
166
|
+
// One job as the daemon serves it to the settings page (`GET /settings/model-roles`): the sandbox's own and every
|
|
167
|
+
// installed extension's, an extension's switched off kept in the list so a page placing jobs keeps its stored choice.
|
|
168
|
+
export const ModelRoleEntrySchema = z.object({
|
|
169
|
+
id: ModelRoleSchema,
|
|
170
|
+
label: z.string().min(1).describe("What the settings page calls the job."),
|
|
171
|
+
blurb: z.string().min(1).describe("One sentence on what starts it, beyond the label."),
|
|
172
|
+
kind: ModelRoleKindSchema.describe("`helper`: a one-shot call the sandbox makes. `run`: a whole session."),
|
|
173
|
+
icon: z.string().min(1).describe("A name from the host's icon set."),
|
|
174
|
+
setup: z.enum(PRESET_SETUPS).describe("The preset it runs on until it is placed, and where it goes when placed again."),
|
|
175
|
+
extension: z.string().min(1).optional().describe("The extension that declares it (`publisher.name`); absent on the sandbox's own jobs."),
|
|
176
|
+
enabled: z.boolean().describe("False while the extension that declares it is switched off: its job is not shown, and the owner's choice for it is kept."),
|
|
177
|
+
});
|
|
178
|
+
export type ModelRoleEntry = z.infer<typeof ModelRoleEntrySchema>;
|
|
179
|
+
|
|
180
|
+
export const ModelRolesSchema = z.object({
|
|
181
|
+
roles: z.array(ModelRoleEntrySchema).describe("The sandbox's own jobs, then each installed extension's, in the settings page's order."),
|
|
182
|
+
});
|
|
183
|
+
export type ModelRoles = z.infer<typeof ModelRolesSchema>;
|
|
184
|
+
|
|
185
|
+
/** A job an extension declares, as it is served: always a whole session, suggested `medium` unless it says otherwise. */
|
|
186
|
+
export const contributedModelRole = (declared: ModelRoleContribution, extension: string, enabled: boolean): ModelRoleEntry => ({
|
|
187
|
+
id: declared.id,
|
|
188
|
+
label: declared.label,
|
|
189
|
+
blurb: declared.explanation,
|
|
190
|
+
kind: "run",
|
|
191
|
+
icon: declared.icon ?? "wrench",
|
|
192
|
+
setup: declared.setup ?? "medium",
|
|
193
|
+
extension,
|
|
194
|
+
enabled,
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
/** The sandbox's own jobs as served. */
|
|
198
|
+
export const coreModelRoleEntries = (): ModelRoleEntry[] => CORE_MODEL_ROLES.map((role) => ({ ...role, enabled: true }));
|
|
199
|
+
|
|
200
|
+
// (2026-11-26) The six jobs this table held for extensions until they declared them in their manifests
|
|
201
|
+
// (`contributes.modelRoles`), as the table had them, by the extension that now declares each. Frozen, and read only where
|
|
202
|
+
// the past is: a daemon older than extension API 2.52.0 serves no job list and knows these as its own, so the settings
|
|
203
|
+
// page shows them from here (docs/architecture/app-plane.md, older daemons); and the 2026-10-12 settings conversion
|
|
204
|
+
// placed jobs in the table's order of that day (settings-history.ts). `refactor-run` belongs to nobody: nothing has
|
|
205
|
+
// started it since the Health tab went (2026-11-18), and it stays only so a stored choice naming it still reads.
|
|
206
|
+
export const EXTENSION_ROLES_BEFORE_CONTRIBUTIONS = [
|
|
108
207
|
{
|
|
109
208
|
id: "pipeline-fix",
|
|
110
209
|
label: "Pipeline fixes",
|
|
@@ -112,6 +211,7 @@ export const MODEL_ROLES = [
|
|
|
112
211
|
kind: "run",
|
|
113
212
|
icon: "wave-pulse",
|
|
114
213
|
setup: "high",
|
|
214
|
+
extension: "intentic.pipelines",
|
|
115
215
|
},
|
|
116
216
|
{
|
|
117
217
|
id: "deployment-fix",
|
|
@@ -120,16 +220,7 @@ export const MODEL_ROLES = [
|
|
|
120
220
|
kind: "run",
|
|
121
221
|
icon: "server",
|
|
122
222
|
setup: "high",
|
|
123
|
-
|
|
124
|
-
{
|
|
125
|
-
// Started by a person's press on a failure the app cannot settle by itself (agentFix.ts in the editor): a sync that
|
|
126
|
-
// conflicts, a push the remote refuses, a commit a hook refuses, a dev server that crashed, a build that failed.
|
|
127
|
-
id: "workflow-fix",
|
|
128
|
-
label: "Workflow fixes",
|
|
129
|
-
blurb: "The agent started by Fix with agent on a failed sync, push, commit, run or build.",
|
|
130
|
-
kind: "run",
|
|
131
|
-
icon: "wrench",
|
|
132
|
-
setup: "high",
|
|
223
|
+
extension: "intentic.deployments",
|
|
133
224
|
},
|
|
134
225
|
{
|
|
135
226
|
id: "maintenance-chore",
|
|
@@ -138,16 +229,16 @@ export const MODEL_ROLES = [
|
|
|
138
229
|
kind: "run",
|
|
139
230
|
icon: "wrench",
|
|
140
231
|
setup: "medium",
|
|
232
|
+
extension: "intentic.maintenance",
|
|
141
233
|
},
|
|
142
234
|
{
|
|
143
235
|
id: "refactor-run",
|
|
144
236
|
label: "Refactors",
|
|
145
|
-
// Started from the Health tab, removed with iq (2026-11-18). The id stays: every saved roleSetups names it, and a
|
|
146
|
-
// newer editor reads an older daemon's settings with this enum.
|
|
147
237
|
blurb: "Kept so settings saved before the Health tab was removed still read; nothing starts a refactor run now.",
|
|
148
238
|
kind: "run",
|
|
149
239
|
icon: "hammer",
|
|
150
240
|
setup: "high",
|
|
241
|
+
extension: undefined,
|
|
151
242
|
},
|
|
152
243
|
{
|
|
153
244
|
id: "documentation-run",
|
|
@@ -156,6 +247,7 @@ export const MODEL_ROLES = [
|
|
|
156
247
|
kind: "run",
|
|
157
248
|
icon: "book",
|
|
158
249
|
setup: "medium",
|
|
250
|
+
extension: "intentic.documentation",
|
|
159
251
|
},
|
|
160
252
|
{
|
|
161
253
|
id: "acceptance-run",
|
|
@@ -164,37 +256,49 @@ export const MODEL_ROLES = [
|
|
|
164
256
|
kind: "run",
|
|
165
257
|
icon: "list-check",
|
|
166
258
|
setup: "high",
|
|
259
|
+
extension: "intentic.acceptance",
|
|
167
260
|
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
] as const satisfies readonly ModelRoleRow[];
|
|
261
|
+
] as const satisfies readonly (ModelRoleSpec & { readonly extension: string | undefined })[];
|
|
262
|
+
|
|
263
|
+
// The order the table held every job in until 2026-11-26, the six above among the sandbox's own.
|
|
264
|
+
const ORDER_BEFORE_CONTRIBUTIONS = [
|
|
265
|
+
"commit-message",
|
|
266
|
+
"session-title",
|
|
267
|
+
"safety-judge",
|
|
268
|
+
"loop-verdict",
|
|
269
|
+
"handoff-summary",
|
|
270
|
+
"spoken-reply",
|
|
271
|
+
"model-router",
|
|
272
|
+
"subagent-sizing",
|
|
273
|
+
"pipeline-fix",
|
|
274
|
+
"deployment-fix",
|
|
275
|
+
"workflow-fix",
|
|
276
|
+
"maintenance-chore",
|
|
277
|
+
"refactor-run",
|
|
278
|
+
"documentation-run",
|
|
279
|
+
"acceptance-run",
|
|
280
|
+
"approval-queue",
|
|
281
|
+
"extension-review",
|
|
282
|
+
"loop-iteration",
|
|
283
|
+
] as const;
|
|
193
284
|
|
|
194
|
-
|
|
195
|
-
|
|
285
|
+
// The ids `AgentTurn.runRole` takes: every job the table held until 2026-11-26, frozen. A schema a door's far end reads in
|
|
286
|
+
// the field may only grow (_tools/checks/lib/release-doors.mjs), so this enum stays as it was beside the open `job` that
|
|
287
|
+
// names an extension's job; every daemon reads `runRole`, and one from before ignores `job`.
|
|
288
|
+
export const RunRoleSchema = z.enum(ORDER_BEFORE_CONTRIBUTIONS);
|
|
289
|
+
export type RunRole = z.infer<typeof RunRoleSchema>;
|
|
196
290
|
|
|
197
|
-
|
|
291
|
+
/** How a turn names its job: `runRole` for one every daemon knows, `job` for one only a newer daemon does. */
|
|
292
|
+
export const jobFields = (role: ModelRole): { readonly runRole: RunRole } | { readonly job: ModelRole } => {
|
|
293
|
+
const known = RunRoleSchema.safeParse(role);
|
|
294
|
+
return known.success ? { runRole: known.data } : { job: role };
|
|
295
|
+
};
|
|
198
296
|
|
|
199
|
-
|
|
200
|
-
export const
|
|
297
|
+
/** Every job the table held until 2026-11-26, in its order then: what a daemon from before served, and what the 2026-10-12 conversion placed. */
|
|
298
|
+
export const ROLES_BEFORE_CONTRIBUTIONS: readonly ModelRoleSpec[] = ORDER_BEFORE_CONTRIBUTIONS.map((id) => {
|
|
299
|
+
const spec = coreModelRole(id) ?? EXTENSION_ROLES_BEFORE_CONTRIBUTIONS.find((role) => role.id === id);
|
|
300
|
+
if (spec === undefined) {
|
|
301
|
+
throw new Error(`model-roles: "${id}" is in neither table`);
|
|
302
|
+
}
|
|
303
|
+
return spec;
|
|
304
|
+
});
|