@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,4 +1,8 @@
|
|
|
1
|
+
import { EXTENSION_DECLARED_EVENTS, EXTENSION_EXEC_CLASSES, EXTENSION_FIRE_HANDLER, EXTENSION_TURN_POWERS } from "@intentic/extension-manifest/permissions";
|
|
1
2
|
import { z } from "zod";
|
|
3
|
+
import { MemberTierSchema } from "../../schemas/shared.js";
|
|
4
|
+
import type { WebhookSignatureScheme } from "../../schemas/automations.js";
|
|
5
|
+
import { CiFeedEventSchema } from "../../schemas/ci.js";
|
|
2
6
|
import { rawRouteUrl } from "./raw-routes.js";
|
|
3
7
|
|
|
4
8
|
// The wire between the daemon and an extension's own code, its backend in the shared host and its declared processes
|
|
@@ -13,24 +17,59 @@ export const ExtensionOwnSettingsSchema = z.object({
|
|
|
13
17
|
});
|
|
14
18
|
export type ExtensionOwnSettings = z.infer<typeof ExtensionOwnSettingsSchema>;
|
|
15
19
|
|
|
20
|
+
// (2026-11-26) A run ending in a conversation the calling extension started (POST /agent with its own token): which run,
|
|
21
|
+
// how it ended, and its last top-level prose (cut to EXTENSION_RUN_CLOSING_MAX characters). Sent only to an extension
|
|
22
|
+
// that declared `run` in `permissions.events` and asked for it.
|
|
23
|
+
export const ExtensionRunSettledSchema = z.object({
|
|
24
|
+
kind: z.literal("run"),
|
|
25
|
+
conversationId: z.string(),
|
|
26
|
+
run: z.string(),
|
|
27
|
+
// `stopped`: a person's stop or a parent's cancel ended it rather than the turn itself.
|
|
28
|
+
outcome: z.enum(["done", "failed", "stopped"]),
|
|
29
|
+
error: z.string().optional(),
|
|
30
|
+
closing: z.string(),
|
|
31
|
+
});
|
|
32
|
+
export type ExtensionRunSettled = z.infer<typeof ExtensionRunSettledSchema>;
|
|
33
|
+
export const EXTENSION_RUN_CLOSING_MAX = 20_000;
|
|
34
|
+
|
|
35
|
+
// (2026-11-26) One frame of the CI feed (schemas/ci.ts CiFeedEventSchema: a run that finished, a job that ended), as the
|
|
36
|
+
// daemon publishes it on GET /ci/feed, sent only to an extension that declared `ci` and asked for it.
|
|
37
|
+
export const ExtensionCiHeardSchema = z.object({
|
|
38
|
+
kind: z.literal("ci"),
|
|
39
|
+
event: CiFeedEventSchema,
|
|
40
|
+
});
|
|
41
|
+
export type ExtensionCiHeard = z.infer<typeof ExtensionCiHeardSchema>;
|
|
42
|
+
|
|
16
43
|
// GET /extension/events: one ndjson frame per line, for as long as the caller holds the stream. A heartbeat every
|
|
17
44
|
// EXTENSION_EVENTS_HEARTBEAT_MS says the daemon is still there; the rest name what moved. `settings` carries only the
|
|
18
|
-
// calling extension's own keys whose value changed.
|
|
45
|
+
// calling extension's own keys whose value changed. `run`, `activity` and `ci` come only when asked for by name
|
|
46
|
+
// (EXTENSION_EVENTS_KINDS_PARAM) and declared: `activity` says whether any agent turn runs, once as the stream opens and
|
|
47
|
+
// again each time that flips; `ci` is each CI feed frame as it is heard.
|
|
19
48
|
export const ExtensionEventSchema = z.discriminatedUnion("kind", [
|
|
20
49
|
z.object({ kind: z.literal("heartbeat") }),
|
|
21
50
|
z.object({ kind: z.literal("files"), paths: z.array(z.string()) }),
|
|
22
51
|
z.object({ kind: z.literal("refs"), repos: z.array(z.string()) }),
|
|
23
52
|
z.object({ kind: z.literal("repos"), repos: z.array(z.string()) }),
|
|
24
53
|
z.object({ kind: z.literal("settings"), keys: z.array(z.string()) }),
|
|
54
|
+
ExtensionRunSettledSchema,
|
|
55
|
+
z.object({ kind: z.literal("activity"), live: z.boolean() }),
|
|
56
|
+
ExtensionCiHeardSchema,
|
|
25
57
|
]);
|
|
26
58
|
export type ExtensionEvent = z.infer<typeof ExtensionEventSchema>;
|
|
27
59
|
|
|
28
60
|
export const EXTENSION_EVENTS_HEARTBEAT_MS = 15_000;
|
|
29
61
|
|
|
30
|
-
// The kinds a listener subscribes to
|
|
62
|
+
// The kinds a listener subscribes to without declaring them.
|
|
31
63
|
export const EXTENSION_EVENT_KINDS = ["files", "refs", "repos", "settings"] as const;
|
|
32
64
|
export type ExtensionEventKind = (typeof EXTENSION_EVENT_KINDS)[number];
|
|
33
65
|
|
|
66
|
+
// The kinds an extension hears only once its manifest declares them (`permissions.events`), asked for on the stream by
|
|
67
|
+
// name: `?kinds=run,activity`. The daemon refuses the stream (403) when one asked for is not declared, and sends no
|
|
68
|
+
// frame of a kind not asked for, so a runtime from before them is sent none.
|
|
69
|
+
export { EXTENSION_DECLARED_EVENTS };
|
|
70
|
+
export const ExtensionDeclaredEventSchema = z.enum(EXTENSION_DECLARED_EVENTS);
|
|
71
|
+
export const EXTENSION_EVENTS_KINDS_PARAM = "kinds";
|
|
72
|
+
|
|
34
73
|
// A backend's own account of itself (`ServerActivation.health` in @intentic/extension-api), as the host reads it from
|
|
35
74
|
// the extension's code and passes it on: a closed set of states and an optional sentence.
|
|
36
75
|
export const ExtensionHealthSchema = z.object({
|
|
@@ -38,8 +77,423 @@ export const ExtensionHealthSchema = z.object({
|
|
|
38
77
|
detail: z.string().optional(),
|
|
39
78
|
});
|
|
40
79
|
|
|
80
|
+
// POST /extension/work/hold: work in flight, held for as long as the caller keeps the answer open. An ndjson stream of
|
|
81
|
+
// heartbeats; while it is open the sandbox counts the hold as work a restart or an idle stop waits for, named by its
|
|
82
|
+
// label, and closing it (or the caller dying) lets it go. Refused (403) unless the manifest declares `permissions.work`.
|
|
83
|
+
export const ExtensionWorkHoldSchema = z.object({
|
|
84
|
+
label: z.string().trim().min(1).max(120).describe("What the work is, as the sandbox names it to whoever waits on it."),
|
|
85
|
+
});
|
|
86
|
+
export type ExtensionWorkHold = z.infer<typeof ExtensionWorkHoldSchema>;
|
|
87
|
+
|
|
88
|
+
// POST /extension/activity (2026-11-26): one row in the sandbox's activity feed, written as the calling extension's own
|
|
89
|
+
// (`extra.extension` names it, from its token, never from the body): what its own work did that a person reading the
|
|
90
|
+
// feed, or a measurement of it, should see. Every extension token reaches it undeclared, as it reaches its settings.
|
|
91
|
+
export const ExtensionActivitySchema = z.object({
|
|
92
|
+
type: z
|
|
93
|
+
.string()
|
|
94
|
+
.trim()
|
|
95
|
+
.regex(/^[a-z][a-z0-9_-]*(\.[a-z][a-z0-9_-]*)+$/u)
|
|
96
|
+
.max(80)
|
|
97
|
+
.describe("What happened, dotted like the sandbox's own rows: `ci.repair_started`."),
|
|
98
|
+
content: z.string().max(4_000).describe("What happened, in a sentence a person reads."),
|
|
99
|
+
outcome: z.enum(["ok", "error"]).optional(),
|
|
100
|
+
conversationId: z.string().min(1).optional().describe("The conversation it is about, when there is one."),
|
|
101
|
+
});
|
|
102
|
+
export type ExtensionActivity = z.infer<typeof ExtensionActivitySchema>;
|
|
103
|
+
|
|
104
|
+
// POST /extension/exec: one command run to its end under a workload class the manifest declares (`permissions.exec`),
|
|
105
|
+
// admitted by the sandbox's memory budget first and, for `toolchain`, queued with the heavy commands. Never a shell: the
|
|
106
|
+
// argv runs as given.
|
|
107
|
+
export const ExtensionExecClassSchema = z.enum(EXTENSION_EXEC_CLASSES);
|
|
108
|
+
export const EXTENSION_EXEC_TIMEOUT_MAX_MS = 2 * 60 * 60_000;
|
|
109
|
+
export const EXTENSION_EXEC_OUTPUT_MAX_BYTES = 64 * 1024 * 1024;
|
|
110
|
+
export const ExtensionExecSchema = z.object({
|
|
111
|
+
argv: z.array(z.string()).min(1).describe("The program and its arguments."),
|
|
112
|
+
class: ExtensionExecClassSchema,
|
|
113
|
+
// Absolute, or relative to the workspace root; the workspace root when absent.
|
|
114
|
+
cwd: z.string().min(1).optional(),
|
|
115
|
+
// Laid over the daemon's own environment.
|
|
116
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
117
|
+
stdin: z.string().optional(),
|
|
118
|
+
timeoutMs: z.number().int().positive().max(EXTENSION_EXEC_TIMEOUT_MAX_MS),
|
|
119
|
+
// Kept per stream; past it the stream is still read, and `truncated` says so.
|
|
120
|
+
outputBytes: z.number().int().positive().max(EXTENSION_EXEC_OUTPUT_MAX_BYTES),
|
|
121
|
+
// Which end of an overflowing stream is kept.
|
|
122
|
+
keep: z.enum(["head", "tail"]).optional(),
|
|
123
|
+
// What the queue and the process list call it.
|
|
124
|
+
label: z.string().trim().min(1).max(120).optional(),
|
|
125
|
+
});
|
|
126
|
+
export type ExtensionExec = z.infer<typeof ExtensionExecSchema>;
|
|
127
|
+
export const ExtensionExecResultSchema = z.object({
|
|
128
|
+
// Set when the sandbox did not start it: no room came free within its deadline. Nothing ran.
|
|
129
|
+
refused: z.string().optional(),
|
|
130
|
+
// How long it waited for room or a queue slot before it started.
|
|
131
|
+
waitedMs: z.number(),
|
|
132
|
+
// Undefined when it did not exit by itself: ended here (`ended`), never started (`spawnError`), or by a signal.
|
|
133
|
+
exitCode: z.number().optional(),
|
|
134
|
+
signal: z.string().optional(),
|
|
135
|
+
stdout: z.string(),
|
|
136
|
+
stderr: z.string(),
|
|
137
|
+
truncated: z.boolean(),
|
|
138
|
+
ended: z.enum(["timeout", "aborted"]).optional(),
|
|
139
|
+
spawnError: z.string().optional(),
|
|
140
|
+
});
|
|
141
|
+
export type ExtensionExecResult = z.infer<typeof ExtensionExecResultSchema>;
|
|
142
|
+
|
|
143
|
+
// (2026-11-26) What an agent tool's call is told of the turn that made it, from the turn's own grants (its role and the
|
|
144
|
+
// reach of the people it is for): the sandbox browser accounts it holds, each with the sites it signs in on (sign-in
|
|
145
|
+
// families applied, as `type_credential` holds a page to them); the owner's own browsers it holds; and the cards it
|
|
146
|
+
// holds that the called extension contributes. Never a credential, and never more than the turn holds.
|
|
147
|
+
export const ToolGrantAccountSchema = z.object({
|
|
148
|
+
id: z.string().min(1),
|
|
149
|
+
kind: z.enum(["browser", "identity"]),
|
|
150
|
+
sites: z.array(z.string()),
|
|
151
|
+
});
|
|
152
|
+
export type ToolGrantAccount = z.infer<typeof ToolGrantAccountSchema>;
|
|
153
|
+
export const ToolCallGrantsSchema = z.object({
|
|
154
|
+
accounts: z.array(ToolGrantAccountSchema),
|
|
155
|
+
browsers: z.array(z.string()),
|
|
156
|
+
cards: z.array(z.string()),
|
|
157
|
+
});
|
|
158
|
+
export type ToolCallGrants = z.infer<typeof ToolCallGrantsSchema>;
|
|
159
|
+
export const NO_TOOL_GRANTS: ToolCallGrants = { accounts: [], browsers: [], cards: [] };
|
|
160
|
+
|
|
161
|
+
// What a tool call's own work may do with those grants (`permissions.turn`).
|
|
162
|
+
export const ExtensionTurnPowerSchema = z.enum(EXTENSION_TURN_POWERS);
|
|
163
|
+
|
|
164
|
+
// The page tools an extension's tool may call in an account's browser (@playwright/mcp's names, and the router's WebMCP
|
|
165
|
+
// call on the page): `browser_run_code_unsafe` runs in Playwright's process against the whole browser, every site's
|
|
166
|
+
// cookies included; the network tools carry a session's headers; the tab list names every site the profile has open.
|
|
167
|
+
export const EXTENSION_BROWSER_TOOLS = [
|
|
168
|
+
"browser_navigate",
|
|
169
|
+
"browser_navigate_back",
|
|
170
|
+
"browser_snapshot",
|
|
171
|
+
"browser_take_screenshot",
|
|
172
|
+
"browser_evaluate",
|
|
173
|
+
"browser_click",
|
|
174
|
+
"browser_hover",
|
|
175
|
+
"browser_drag",
|
|
176
|
+
"browser_type",
|
|
177
|
+
"browser_press_key",
|
|
178
|
+
"browser_select_option",
|
|
179
|
+
"browser_fill_form",
|
|
180
|
+
"browser_file_upload",
|
|
181
|
+
"browser_handle_dialog",
|
|
182
|
+
"browser_wait_for",
|
|
183
|
+
"browser_resize",
|
|
184
|
+
"browser_webmcp_call",
|
|
185
|
+
] as const;
|
|
186
|
+
|
|
187
|
+
// What a navigation's arguments name: where it goes, which must be on the account's sites.
|
|
188
|
+
export const ExtensionNavigateArgumentsSchema = z.looseObject({ url: z.string() });
|
|
189
|
+
|
|
190
|
+
// POST /extension/turn/browser (2026-11-26): one tool call to the sandbox's signed-in browser of an account the calling
|
|
191
|
+
// turn holds, through that turn's own browser router, held to the account's own sites. `turn` is the call's ticket (or
|
|
192
|
+
// a job's that the call started), minted by the daemon for the extension whose tool it is.
|
|
193
|
+
export const ExtensionBrowserCallSchema = z.object({
|
|
194
|
+
turn: z.string().min(1),
|
|
195
|
+
account: z.string().min(1),
|
|
196
|
+
tool: z.string().min(1),
|
|
197
|
+
arguments: z.record(z.string(), z.unknown()).optional(),
|
|
198
|
+
});
|
|
199
|
+
export type ExtensionBrowserCall = z.infer<typeof ExtensionBrowserCallSchema>;
|
|
200
|
+
|
|
201
|
+
// POST /extension/turn/owner-browser (2026-11-26): one tool call to the owner's own browser (a `webext` card) the calling
|
|
202
|
+
// turn holds, through its peer door, where the browser's own site switches apply.
|
|
203
|
+
export const ExtensionOwnerBrowserCallSchema = z.object({
|
|
204
|
+
turn: z.string().min(1),
|
|
205
|
+
browser: z.string().min(1),
|
|
206
|
+
tool: z.string().min(1),
|
|
207
|
+
arguments: z.record(z.string(), z.unknown()).optional(),
|
|
208
|
+
});
|
|
209
|
+
export type ExtensionOwnerBrowserCall = z.infer<typeof ExtensionOwnerBrowserCallSchema>;
|
|
210
|
+
|
|
211
|
+
// What either call answers: the tool's result as MCP carries it, stored secrets masked to their references. A refusal of
|
|
212
|
+
// the core's (no such grant, a site outside the account's, an undeclared power) is a 4xx with `{ error }` instead.
|
|
213
|
+
export const ExtensionToolResultSchema = z.looseObject({ content: z.array(z.unknown()), isError: z.boolean().optional() });
|
|
214
|
+
export type ExtensionToolResult = z.infer<typeof ExtensionToolResultSchema>;
|
|
215
|
+
export const ExtensionTurnCallAnswerSchema = z.object({ result: ExtensionToolResultSchema });
|
|
216
|
+
// The blocks of a result an extension's tool reads (`ToolContent` in @intentic/extension-api); any other kind of block
|
|
217
|
+
// is left out of what it is handed.
|
|
218
|
+
export const ExtensionToolContentSchema = z.discriminatedUnion("type", [
|
|
219
|
+
z.object({ type: z.literal("text"), text: z.string() }),
|
|
220
|
+
z.object({ type: z.literal("image"), data: z.string(), mimeType: z.string() }),
|
|
221
|
+
]);
|
|
222
|
+
// A refusal from one of the turn doors or the jobs doors.
|
|
223
|
+
export const ExtensionTurnRefusalSchema = z.object({ error: z.string() });
|
|
224
|
+
export type ExtensionTurnCallAnswer = z.infer<typeof ExtensionTurnCallAnswerSchema>;
|
|
225
|
+
|
|
226
|
+
// POST /extension/jobs (2026-11-26): a background job filed in the calling conversation, as a `run_in_background`
|
|
227
|
+
// command's is: the agent's `wait` takes its id, the conversation's card lists it, `stop` ends it, and a turn ended on it
|
|
228
|
+
// is woken by its end. The extension's backend does the work; the daemon keeps the job's record, its place in a lane
|
|
229
|
+
// (`lane`: at most `most` of one lane at once, never two of one `key` at once, first come first served) and its end.
|
|
230
|
+
// Answered as an ndjson stream of ExtensionJobFrame, held open for as long as the job runs: the caller letting go of it
|
|
231
|
+
// before the job's end ends the job as failed.
|
|
232
|
+
export const EXTENSION_JOB_LANE_MOST = 8;
|
|
233
|
+
export const ExtensionJobStartSchema = z.object({
|
|
234
|
+
turn: z.string().min(1),
|
|
235
|
+
// How `wait` and the transcript name it.
|
|
236
|
+
command: z.string().trim().min(1).max(400),
|
|
237
|
+
// What the conversation's card shows.
|
|
238
|
+
description: z.string().trim().min(1).max(200),
|
|
239
|
+
// Its output until it ends: what it is doing, and what to do if a restart takes it down meanwhile.
|
|
240
|
+
started: z.string().trim().min(1).max(4000),
|
|
241
|
+
lane: z
|
|
242
|
+
.object({
|
|
243
|
+
name: z.string().trim().min(1).max(120),
|
|
244
|
+
key: z.string().trim().min(1).max(400).optional(),
|
|
245
|
+
most: z.number().int().min(1).max(EXTENSION_JOB_LANE_MOST).optional(),
|
|
246
|
+
})
|
|
247
|
+
.optional(),
|
|
248
|
+
});
|
|
249
|
+
export type ExtensionJobStart = z.infer<typeof ExtensionJobStartSchema>;
|
|
250
|
+
export const ExtensionJobFrameSchema = z.discriminatedUnion("kind", [
|
|
251
|
+
// Filed: its id (what `wait` takes), its own ticket (what the job's work reaches the turn's grants and reports with)
|
|
252
|
+
// and how many runs of its lane were ahead of it.
|
|
253
|
+
z.object({ kind: z.literal("filed"), id: z.string().min(1), job: z.string().min(1), ahead: z.number().int().min(0) }),
|
|
254
|
+
// Its turn in the lane came: do the work now.
|
|
255
|
+
z.object({ kind: z.literal("begin") }),
|
|
256
|
+
// Stopped by the agent or a person: its end is written, and what the work still does is read by nobody.
|
|
257
|
+
z.object({ kind: z.literal("stopped") }),
|
|
258
|
+
z.object({ kind: z.literal("heartbeat") }),
|
|
259
|
+
]);
|
|
260
|
+
export type ExtensionJobFrame = z.infer<typeof ExtensionJobFrameSchema>;
|
|
261
|
+
|
|
262
|
+
// POST /extension/jobs/{id}: a line onto what the job shows while it runs (`say`), or its end (`end`), told with the
|
|
263
|
+
// job's own ticket. The end's `output` is what `wait` and the wake hand the agent.
|
|
264
|
+
export const EXTENSION_JOB_LINE_MAX = 4000;
|
|
265
|
+
export const ExtensionJobReportSchema = z.object({
|
|
266
|
+
job: z.string().min(1),
|
|
267
|
+
say: z.string().max(EXTENSION_JOB_LINE_MAX).optional(),
|
|
268
|
+
end: z.object({ ok: z.boolean(), output: z.string() }).optional(),
|
|
269
|
+
});
|
|
270
|
+
export type ExtensionJobReport = z.infer<typeof ExtensionJobReportSchema>;
|
|
271
|
+
|
|
272
|
+
// What an automation's fire carries to the handler it names (`api.automations.onFire`): the same `id` on every try, so a
|
|
273
|
+
// handler told twice (the daemon stopped before it heard the answer) can tell.
|
|
274
|
+
export const ExtensionFireSchema = z.object({
|
|
275
|
+
id: z.string().min(1),
|
|
276
|
+
automationId: z.string(),
|
|
277
|
+
handler: z.string().regex(EXTENSION_FIRE_HANDLER),
|
|
278
|
+
// When the automation fired (ms); a fire handed over late, after its backend was back, carries the moment it fired.
|
|
279
|
+
firedAt: z.number(),
|
|
280
|
+
// How many earlier fires of the same automation this one stands for: fired while the backend was down, and handed
|
|
281
|
+
// over as one.
|
|
282
|
+
coalesced: z.number().int().nonnegative(),
|
|
283
|
+
// The trigger's payload (a webhook's body, a workspace event) and what the automation's check saw, when either was there.
|
|
284
|
+
payload: z.string().optional(),
|
|
285
|
+
observed: z.string().optional(),
|
|
286
|
+
// The automation's own words (its `prompt`).
|
|
287
|
+
prompt: z.string(),
|
|
288
|
+
});
|
|
289
|
+
export type ExtensionFire = z.infer<typeof ExtensionFireSchema>;
|
|
290
|
+
|
|
291
|
+
// (2026-11-26) One check of a watch kind the extension declares (`api.checks.serve`), as the daemon's automations engine
|
|
292
|
+
// hands it to the backend host's door: the source's parameters, what the last passing check saw, and the credential-gateway
|
|
293
|
+
// addresses of the extension's own cards the kind declares, as the automation's role reaches them, never a credential.
|
|
294
|
+
export const ExtensionWatchCheckSchema = z.object({
|
|
295
|
+
// The kind's id, one the extension declares in `contributes.watchKinds`.
|
|
296
|
+
kind: z.string().min(1),
|
|
297
|
+
params: z.record(z.string(), z.union([z.string(), z.boolean()])),
|
|
298
|
+
// What the last passing check saw, cut to the daemon's bound; absent before the first, and for a check tried by hand.
|
|
299
|
+
last: z.string().optional(),
|
|
300
|
+
// `<VARIABLE>_<CARD>` to a gateway address, the names a turn's shell would see them by.
|
|
301
|
+
reach: z.record(z.string(), z.string()),
|
|
302
|
+
// The automation it checks for; absent for a check tried by hand (the composer's Check now, a proposal's card).
|
|
303
|
+
automationId: z.string().optional(),
|
|
304
|
+
});
|
|
305
|
+
export type ExtensionWatchCheck = z.infer<typeof ExtensionWatchCheckSchema>;
|
|
306
|
+
|
|
307
|
+
// What one check came to: it passes, with what it saw (what `fireOn: change` compares and the wake is told), or it does
|
|
308
|
+
// not, with what it is still waiting for in a sentence the run history shows.
|
|
309
|
+
export const ExtensionWatchAnswerSchema = z.discriminatedUnion("pass", [
|
|
310
|
+
z.object({ pass: z.literal(true), output: z.string() }),
|
|
311
|
+
z.object({ pass: z.literal(false), detail: z.string() }),
|
|
312
|
+
]);
|
|
313
|
+
export type ExtensionWatchAnswer = z.infer<typeof ExtensionWatchAnswerSchema>;
|
|
314
|
+
|
|
315
|
+
// (2026-11-26) WHO IS CALLING an extension's backend through /x/<id>, as the daemon verified it. The proxy strips every
|
|
316
|
+
// credential before it forwards, so a backend once heard a bare request; now the daemon attaches this assertion of the
|
|
317
|
+
// caller, minted for that one extension, signed with a key only the daemon holds in memory, and good for
|
|
318
|
+
// EXTENSION_CALLER_TTL_MS. The backend reads it (`api.caller(request)`), and POST /agent takes it back beside the
|
|
319
|
+
// extension's own token to start a turn as the person who pressed, held to that person's access as it stands then.
|
|
320
|
+
export const EXTENSION_CALLER_HEADER = "x-intentic-caller";
|
|
321
|
+
export const EXTENSION_CALLER_TTL_MS = 2 * 60_000;
|
|
322
|
+
|
|
323
|
+
// Who it is: a person signed in (their tier, the area ids their access holds and the workspace folders those come to, the
|
|
324
|
+
// parts of the sandbox they run), a repository's operator panel, a program holding a control token, another extension's
|
|
325
|
+
// backend, or nobody signed in at all, on a sandbox that runs without sign-in.
|
|
326
|
+
export const ExtensionCallerSchema = z.discriminatedUnion("kind", [
|
|
327
|
+
z.object({
|
|
328
|
+
kind: z.literal("person"),
|
|
329
|
+
email: z.string(),
|
|
330
|
+
name: z.string().optional(),
|
|
331
|
+
tier: MemberTierSchema,
|
|
332
|
+
areas: z.array(z.string()).optional(),
|
|
333
|
+
// Workspace-relative folders this person may read; absent is the whole workspace, empty is none of it.
|
|
334
|
+
folders: z.array(z.string()).optional(),
|
|
335
|
+
manages: z.array(z.string()).optional(),
|
|
336
|
+
}),
|
|
337
|
+
z.object({ kind: z.literal("panel") }),
|
|
338
|
+
z.object({ kind: z.literal("program"), id: z.string(), label: z.string() }),
|
|
339
|
+
z.object({ kind: z.literal("extension"), id: z.string() }),
|
|
340
|
+
z.object({ kind: z.literal("local") }),
|
|
341
|
+
]);
|
|
342
|
+
export type ExtensionCallerIdentity = z.infer<typeof ExtensionCallerSchema>;
|
|
343
|
+
|
|
344
|
+
// What the assertion carries, signed whole: the sandbox and the extension (its routing id) it was minted for, its
|
|
345
|
+
// window, a nonce, and the caller. `proof` is how a person proved who they are, which the daemon holds them to again
|
|
346
|
+
// when the assertion comes back.
|
|
347
|
+
export const ExtensionCallerClaimSchema = z.object({
|
|
348
|
+
v: z.literal(1),
|
|
349
|
+
sandbox: z.string(),
|
|
350
|
+
extension: z.string(),
|
|
351
|
+
issuedAt: z.number(),
|
|
352
|
+
expiresAt: z.number(),
|
|
353
|
+
nonce: z.string(),
|
|
354
|
+
caller: ExtensionCallerSchema,
|
|
355
|
+
proof: z.array(z.string()).optional(),
|
|
356
|
+
});
|
|
357
|
+
export type ExtensionCallerClaim = z.infer<typeof ExtensionCallerClaimSchema>;
|
|
358
|
+
|
|
359
|
+
// An assertion is `<base64url claim JSON>.<base64url signature>`; the claim reads without the key, the signature checks
|
|
360
|
+
// only with it.
|
|
361
|
+
export const readCallerClaim = (assertion: string): ExtensionCallerClaim | undefined => {
|
|
362
|
+
const [encoded = "", signature = "", ...rest] = assertion.split(".");
|
|
363
|
+
if (encoded === "" || signature === "" || rest.length > 0) {
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
try {
|
|
367
|
+
return ExtensionCallerClaimSchema.parse(JSON.parse(new TextDecoder().decode(base64UrlBytes(encoded))));
|
|
368
|
+
} catch {
|
|
369
|
+
// allow(silent-catch): an assertion that does not read is no caller, which the caller of this reports
|
|
370
|
+
return undefined;
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
const base64UrlBytes = (text: string): Uint8Array => {
|
|
375
|
+
const padded = text.replaceAll("-", "+").replaceAll("_", "/").padEnd(Math.ceil(text.length / 4) * 4, "=");
|
|
376
|
+
return Uint8Array.from(atob(padded), (char) => char.charCodeAt(0));
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
// (2026-11-26) A PUBLIC DOOR's request, as the backend hears it once the daemon's protections passed it
|
|
380
|
+
// (`contributes.publicRoutes`, served at /door/<id>/<path>): which declared route it landed on, the automation it is for,
|
|
381
|
+
// the Origin it was checked against or the door key that stood in, the signature scheme and the provider's delivery id,
|
|
382
|
+
// the caller a solved challenge was bound to, whether a Turnstile token passed, the caller's address as forwarded (advisory, never an identity), and when.
|
|
383
|
+
export const PUBLIC_DOOR_HEADER = "x-intentic-door";
|
|
384
|
+
export const PUBLIC_DOOR_POW_HEADER = "x-intentic-pow";
|
|
385
|
+
export const PUBLIC_DOOR_POW_CALLER_HEADER = "x-intentic-pow-caller";
|
|
386
|
+
export const PUBLIC_DOOR_KEY_PARAM = "key";
|
|
387
|
+
// GET /door/<id>/~challenge?caller=<id>: a proof-of-work challenge signed to that caller. No declared path can name it.
|
|
388
|
+
export const PUBLIC_DOOR_CHALLENGE = "~challenge";
|
|
389
|
+
export const PUBLIC_DOOR_CHALLENGE_PARAM = "caller";
|
|
390
|
+
|
|
391
|
+
// The signing schemes the daemon checks (the automations wire's own, which this list may not outgrow), spelled here so a
|
|
392
|
+
// process reading this subpath loads none of the automations schemas.
|
|
393
|
+
const DOOR_SIGNATURE_SCHEMES = ["github", "linear", "sentry", "stripe", "standard-webhooks"] as const satisfies readonly WebhookSignatureScheme[];
|
|
394
|
+
|
|
395
|
+
export const PublicDoorVerificationSchema = z.object({
|
|
396
|
+
route: z.string(),
|
|
397
|
+
automationId: z.string().optional(),
|
|
398
|
+
origin: z.string().optional(),
|
|
399
|
+
keyed: z.boolean().optional(),
|
|
400
|
+
signature: z.object({ scheme: z.enum(DOOR_SIGNATURE_SCHEMES), deliveryId: z.string().optional() }).optional(),
|
|
401
|
+
proofOfWork: z.object({ caller: z.string() }).optional(),
|
|
402
|
+
// (2026-11-26) A Cloudflare Turnstile token the daemon verified with Cloudflare under the route's secret.
|
|
403
|
+
turnstile: z.literal(true).optional(),
|
|
404
|
+
remoteIp: z.string().optional(),
|
|
405
|
+
at: z.number(),
|
|
406
|
+
});
|
|
407
|
+
export type PublicDoorVerification = z.infer<typeof PublicDoorVerificationSchema>;
|
|
408
|
+
|
|
409
|
+
// What the door header holds (base64url JSON), read back; undefined for anything else.
|
|
410
|
+
export const readPublicDoorVerification = (header: string | null | undefined): PublicDoorVerification | undefined => {
|
|
411
|
+
if (header === undefined || header === null || header === "") {
|
|
412
|
+
return undefined;
|
|
413
|
+
}
|
|
414
|
+
try {
|
|
415
|
+
return PublicDoorVerificationSchema.parse(JSON.parse(new TextDecoder().decode(base64UrlBytes(header))));
|
|
416
|
+
} catch {
|
|
417
|
+
// allow(silent-catch): a header that does not read is no verification, which the caller of this refuses
|
|
418
|
+
return undefined;
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
// The public path a door answers at, from the extension's routing id and the route's own path.
|
|
423
|
+
export const publicDoorPath = (extension: string, path: string): string => `/door/${encodeURIComponent(extension)}/${path}`;
|
|
424
|
+
|
|
41
425
|
export const extensionSettingsUrl = (): string => rawRouteUrl("GET /extension/settings");
|
|
42
426
|
export const extensionEventsUrl = (): string => rawRouteUrl("GET /extension/events");
|
|
427
|
+
export const extensionWorkHoldUrl = (): string => rawRouteUrl("POST /extension/work/hold");
|
|
428
|
+
export const extensionExecUrl = (): string => rawRouteUrl("POST /extension/exec");
|
|
429
|
+
export const extensionBrowserUrl = (): string => rawRouteUrl("POST /extension/turn/browser");
|
|
430
|
+
export const extensionOwnerBrowserUrl = (): string => rawRouteUrl("POST /extension/turn/owner-browser");
|
|
431
|
+
export const extensionJobsUrl = (): string => rawRouteUrl("POST /extension/jobs");
|
|
432
|
+
export const extensionJobUrl = (id: string): string => rawRouteUrl("POST /extension/jobs/{id}", { id });
|
|
433
|
+
export const extensionActivityUrl = (): string => rawRouteUrl("POST /extension/activity");
|
|
434
|
+
|
|
435
|
+
/* (2026-11-27) HOSTED SLEEP, as an extension's own code meets it (`api.sleep` in @intentic/extension-api). A sandbox the
|
|
436
|
+
* platform hosts stops when nobody uses it, and is woken again by a request at one of its wake doors (api-contract's
|
|
437
|
+
* wake-schemas.ts): an enabled webhook automation's fire URL, or an extension's public route declaring `wakes: true`,
|
|
438
|
+
* reached at the URL POST /extension/sleep/wake-url hands out. Every extension token reaches these four undeclared, and
|
|
439
|
+
* each answers only about the extension asking. */
|
|
440
|
+
|
|
441
|
+
// The query parameter a wake URL carries its wake secret in. The door hands the extension the request without it.
|
|
442
|
+
export const WAKE_DOOR_PARAM = "wake";
|
|
443
|
+
|
|
444
|
+
// POST /extension/sleep/wake-url: the full public URL of one of the caller's own `wakes` routes, its `*` filled with the
|
|
445
|
+
// automation an automation's route is for, its wake secret in WAKE_DOOR_PARAM. The same URL on every ask and after every
|
|
446
|
+
// restart, so a provider's webhook setting it was pasted into stays good.
|
|
447
|
+
export const ExtensionWakeUrlAskSchema = z.object({
|
|
448
|
+
route: z.string().min(1).max(512).describe("The route's path as the manifest declares it, e.g. `*/events`."),
|
|
449
|
+
automationId: z.string().min(1).max(200).optional().describe("The automation an automation's route is for."),
|
|
450
|
+
});
|
|
451
|
+
export const ExtensionWakeUrlSchema = z.object({ url: z.string() });
|
|
452
|
+
|
|
453
|
+
// GET /extension/sleep/boot: what this boot follows. `afterSleep`: the daemon stopped last time because the hosted machine
|
|
454
|
+
// went to sleep (its extensions' before-sleep hooks ran). `requestWake`: the platform started it for a request at a wake
|
|
455
|
+
// door, which the platform says once the boot has taken charge; the daemon waits up to EXTENSION_SLEEP_BOOT_WAIT_MS for
|
|
456
|
+
// that before answering false.
|
|
457
|
+
export const ExtensionSleepBootSchema = z.object({ afterSleep: z.boolean(), requestWake: z.boolean() });
|
|
458
|
+
export type ExtensionSleepBoot = z.infer<typeof ExtensionSleepBootSchema>;
|
|
459
|
+
export const EXTENSION_SLEEP_BOOT_WAIT_MS = 15_000;
|
|
460
|
+
|
|
461
|
+
// POST /extension/sleep/watch: held open for as long as the extension wants to hear that the machine is about to sleep,
|
|
462
|
+
// an ndjson stream of heartbeats (EXTENSION_EVENTS_HEARTBEAT_MS) and, right before a hosted sleep, one `sleep` frame per
|
|
463
|
+
// sleep. The extension answers it with POST /extension/sleep/ready naming its id once its own work is done; the daemon
|
|
464
|
+
// stops once every watcher answered or EXTENSION_SLEEP_HOOK_MS passed, whichever is first, and stops either way. A sleep
|
|
465
|
+
// asked of the watchers is never called off.
|
|
466
|
+
export const ExtensionSleepFrameSchema = z.discriminatedUnion("kind", [
|
|
467
|
+
z.object({ kind: z.literal("heartbeat") }),
|
|
468
|
+
z.object({ kind: z.literal("sleep"), id: z.string(), deadline: z.number() }),
|
|
469
|
+
]);
|
|
470
|
+
export type ExtensionSleepFrame = z.infer<typeof ExtensionSleepFrameSchema>;
|
|
471
|
+
export const ExtensionSleepReadySchema = z.object({ id: z.string().min(1).max(64) });
|
|
472
|
+
export const EXTENSION_SLEEP_HOOK_MS = 10_000;
|
|
473
|
+
|
|
474
|
+
// POST /extension/sleep/heard (2026-11-27): where the messages are that the platform's sleep watch heard for the caller's
|
|
475
|
+
// own connections while the hosted sandbox slept (a Discord bot whose owner let the platform hold it, the card's
|
|
476
|
+
// `sleepWatch`): ids only, never what they say, oldest first. Answered once: asking forgets them, and ends whatever the
|
|
477
|
+
// platform still held. Empty on a sandbox the platform does not host.
|
|
478
|
+
export const ExtensionSleepHeardSchema = z.object({
|
|
479
|
+
heard: z.array(
|
|
480
|
+
z.object({
|
|
481
|
+
service: z.string(),
|
|
482
|
+
connection: z.string().describe("The card's id in this sandbox."),
|
|
483
|
+
channelId: z.string(),
|
|
484
|
+
messageId: z.string(),
|
|
485
|
+
guildId: z.string().optional(),
|
|
486
|
+
at: z.number().describe("When the platform heard it, ms."),
|
|
487
|
+
}),
|
|
488
|
+
),
|
|
489
|
+
});
|
|
490
|
+
export type ExtensionSleepHeard = z.infer<typeof ExtensionSleepHeardSchema>;
|
|
491
|
+
|
|
492
|
+
export const extensionWakeUrlUrl = (): string => rawRouteUrl("POST /extension/sleep/wake-url");
|
|
493
|
+
export const extensionSleepHeardUrl = (): string => rawRouteUrl("POST /extension/sleep/heard");
|
|
494
|
+
export const extensionSleepBootUrl = (): string => rawRouteUrl("GET /extension/sleep/boot");
|
|
495
|
+
export const extensionSleepWatchUrl = (): string => rawRouteUrl("POST /extension/sleep/watch");
|
|
496
|
+
export const extensionSleepReadyUrl = (): string => rawRouteUrl("POST /extension/sleep/ready");
|
|
43
497
|
|
|
44
498
|
// What the daemon starts an extension's process with, and what `connectExtensionProcess` reads. The token is the same
|
|
45
499
|
// minted per-extension token its backend carries; the directories are the ones the backend api names.
|
|
@@ -53,7 +507,20 @@ export const EXTENSION_PROCESS_ENV = {
|
|
|
53
507
|
cache: "INTENTIC_EXTENSION_CACHE",
|
|
54
508
|
// The manifest's `permissions.daemon` as a JSON array, so a typed call outside it is refused before it is sent.
|
|
55
509
|
permissions: "INTENTIC_EXTENSION_PERMISSIONS",
|
|
510
|
+
// (2026-11-26) The rest of its `permissions` (events, work, exec, fires) as JSON, ExtensionDeclaredReachSchema: what the
|
|
511
|
+
// runtime asks for on the event stream, and refuses before asking when undeclared. Absent: nothing declared.
|
|
512
|
+
declared: "INTENTIC_EXTENSION_DECLARED",
|
|
56
513
|
} as const;
|
|
57
514
|
|
|
58
515
|
// What the permissions variable holds.
|
|
59
516
|
export const ExtensionPermissionsSchema = z.array(z.string());
|
|
517
|
+
|
|
518
|
+
// What the declared-reach variable holds (extension-manifest's ExtensionDeclaredReach).
|
|
519
|
+
export const ExtensionDeclaredReachSchema = z.object({
|
|
520
|
+
events: z.array(ExtensionDeclaredEventSchema),
|
|
521
|
+
work: z.boolean(),
|
|
522
|
+
exec: z.array(ExtensionExecClassSchema),
|
|
523
|
+
fires: z.array(z.string()),
|
|
524
|
+
// (2026-11-26) Absent from a daemon before it: nothing declared.
|
|
525
|
+
turn: z.array(ExtensionTurnPowerSchema).default([]),
|
|
526
|
+
});
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
EnvironmentRuntimeDecisionSchema,
|
|
14
14
|
EnvironmentSchema,
|
|
15
15
|
} from "../../schemas/environment.js";
|
|
16
|
-
import { SyncStatusSchema } from "../../schemas/devices.js";
|
|
16
|
+
import { SyncChangesSchema, SyncStatusSchema } from "../../schemas/devices.js";
|
|
17
17
|
import { ConversationBundleSchema, DiagnosticsAnswerSchema, DiagnosticsAskSchema, DiagnosticsQuerySchema } from "../../schemas/diagnostics.js";
|
|
18
18
|
import { HostsListSchema } from "../../schemas/hosts.js";
|
|
19
19
|
import { VoicesViewSchema } from "../../schemas/voice.js";
|
|
@@ -37,6 +37,22 @@ import {
|
|
|
37
37
|
PhonePasswordsPairSchema,
|
|
38
38
|
} from "../../schemas/phone-passwords.js";
|
|
39
39
|
import { OkSchema } from "../../schemas/shared.js";
|
|
40
|
+
import {
|
|
41
|
+
DropAcceptedSchema,
|
|
42
|
+
DropBodySchema,
|
|
43
|
+
DropFilesSchema,
|
|
44
|
+
DropSendOutcomeSchema,
|
|
45
|
+
DropSendSchema,
|
|
46
|
+
DropTakenSchema,
|
|
47
|
+
DropTakeSchema,
|
|
48
|
+
PairingMintedSchema,
|
|
49
|
+
PairingMintSchema,
|
|
50
|
+
PairingsListSchema,
|
|
51
|
+
ReceivedDropSchema,
|
|
52
|
+
ReceivedDropsSchema,
|
|
53
|
+
RouteSecretSchema,
|
|
54
|
+
RoutesListSchema,
|
|
55
|
+
} from "../../schemas/account-routes.js";
|
|
40
56
|
import { PeerPairingAnswerSchema, SyncPairAnswerSchema, SyncPairRequestSchema } from "../../schemas/short-codes.js";
|
|
41
57
|
import { SpeechStatusSchema, SpeechTranscriptSchema, SpeechWakeClaimSchema, SpeechWakeGrantSchema } from "../../schemas/speech.js";
|
|
42
58
|
import {
|
|
@@ -97,6 +113,7 @@ import {
|
|
|
97
113
|
import { DefinitionDiffSchema, DefinitionExportSchema, WorkspacePublishResultSchema, WorkspacePublishSchema, WorkspaceRemoteSchema } from "../../state/definition.js";
|
|
98
114
|
import {
|
|
99
115
|
RunnerDefinitionAppliedSchema,
|
|
116
|
+
RunnerLabelSchema,
|
|
100
117
|
RunnersListSchema,
|
|
101
118
|
} from "../doors/runner-protocol.js";
|
|
102
119
|
import type { RawRouteKey } from "./raw-routes.js";
|
|
@@ -180,8 +197,11 @@ export const RAW_JSON_ROUTES = {
|
|
|
180
197
|
"GET /system/runners": { output: RunnersListSchema },
|
|
181
198
|
"DELETE /system/runners/{id}": { output: OkSchema },
|
|
182
199
|
"POST /system/runners/{id}/definition/sync": { output: RunnerDefinitionAppliedSchema },
|
|
200
|
+
// A runner's name for people (its id never changes); empty clears it.
|
|
201
|
+
"POST /system/runners/{id}/label": { input: RunnerLabelSchema, output: OkSchema },
|
|
183
202
|
// Desktop sync: the sandbox-level state, the pairing (`?mode=mirror` asks for the narrower one), one machine's key.
|
|
184
203
|
"GET /system/sync": { output: SyncStatusSchema },
|
|
204
|
+
"GET /system/sync/changes": { output: SyncChangesSchema },
|
|
185
205
|
"POST /system/sync/pair": { input: SyncPairRequestSchema, output: SyncPairAnswerSchema },
|
|
186
206
|
"DELETE /system/authorized-key/{machine}": { output: OkSchema },
|
|
187
207
|
// Every browser session revoked, the owner's own included.
|
|
@@ -194,9 +214,33 @@ export const RAW_JSON_ROUTES = {
|
|
|
194
214
|
"POST /system/links/{id}/requests/{request}": { input: LinkRequestDecisionSchema, output: InboundLinkSummarySchema },
|
|
195
215
|
// Another sandbox on the owner's account reporting a problem about a project this one claims (schemas/issues.ts).
|
|
196
216
|
"POST /account/report": { input: AccountReportSchema, output: IssueAcceptedSchema },
|
|
217
|
+
// A task routed as a person: the link doors' own shapes, behind a pass and a pairing instead of a link token.
|
|
218
|
+
"POST /account/task": { input: LinkTaskSchema, output: LinkTaskStatusSchema },
|
|
219
|
+
"GET /account/task/{id}": { output: LinkTaskStatusSchema },
|
|
220
|
+
"POST /account/task/{id}/messages": { input: LinkMessageSchema, output: LinkMessageReceiptSchema },
|
|
221
|
+
"POST /account/task/{id}/answer": { input: LinkAnswerSchema, output: OkSchema },
|
|
222
|
+
"POST /account/task/{id}/stop": { output: LinkTaskStatusSchema },
|
|
197
223
|
"POST /account/outbox": { input: AccountSendSchema, output: AccountSendOutcomeSchema },
|
|
198
224
|
"GET /account/outbox": { output: AccountOutboxSchema },
|
|
199
225
|
"GET /account/projects": { output: AccountProjectsSchema },
|
|
226
|
+
"GET /account/projects/suggest": { output: AccountProjectsSchema },
|
|
227
|
+
// Routing as a person: the pairings this sandbox keeps for others, and the secrets it holds for itself.
|
|
228
|
+
"POST /account/pairings": { input: PairingMintSchema, output: PairingMintedSchema },
|
|
229
|
+
"GET /account/pairings": { output: PairingsListSchema },
|
|
230
|
+
"DELETE /account/pairings/{from}": { output: OkSchema },
|
|
231
|
+
"POST /account/routes/secret": { input: RouteSecretSchema, output: OkSchema },
|
|
232
|
+
"GET /account/routes": { output: RoutesListSchema },
|
|
233
|
+
// Routing as a person: a drop between daemons, the sending side's loopback send, and the inbox it lands in.
|
|
234
|
+
"POST /account/drop": { input: DropBodySchema, output: DropAcceptedSchema },
|
|
235
|
+
"POST /account/drops": { input: DropSendSchema, output: DropSendOutcomeSchema },
|
|
236
|
+
"GET /account/inbox": { output: ReceivedDropsSchema },
|
|
237
|
+
"GET /account/inbox/{id}": { output: ReceivedDropSchema },
|
|
238
|
+
"GET /account/inbox/{id}/files": { output: DropFilesSchema },
|
|
239
|
+
"POST /account/inbox/{id}/take": { input: DropTakeSchema, output: DropTakenSchema },
|
|
240
|
+
"DELETE /account/inbox/{id}": { output: OkSchema },
|
|
241
|
+
// A read as a person answers what the fleet's own reads answer (GET /fleet…, POST /diagnostics).
|
|
242
|
+
"POST /account/read/diagnostics": { input: DiagnosticsQuerySchema, output: DiagnosticsAnswerSchema },
|
|
243
|
+
"GET /account/read/agents/{handle}/bundle": { output: ConversationBundleSchema },
|
|
200
244
|
// The link doors, as the asking sandbox's daemon reads them. A status takes `?after=<version>&wait=<seconds>` to
|
|
201
245
|
// be held until it moves past that version.
|
|
202
246
|
"GET /link": { output: LinkHelloSchema },
|