@intentic/sandbox-contract 1.231.0 → 1.233.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 +13 -2
- package/dist/agent-catalog.d.ts +2 -1
- package/dist/agent-catalog.d.ts.map +1 -1
- package/dist/agent-catalog.js +1 -1
- package/dist/agent-catalog.js.map +1 -1
- package/dist/chores/chores.d.ts +1 -1
- package/dist/chores/chores.d.ts.map +1 -1
- package/dist/chores/probes.d.ts +1 -1
- package/dist/chores/probes.d.ts.map +1 -1
- package/dist/chores/stack.d.ts.map +1 -1
- package/dist/chores/stack.js +2 -1
- package/dist/chores/stack.js.map +1 -1
- package/dist/chores/verdict.d.ts +1 -1
- package/dist/chores/verdict.d.ts.map +1 -1
- package/dist/command-classes.d.ts +14 -0
- package/dist/command-classes.d.ts.map +1 -0
- package/dist/command-classes.js +168 -0
- package/dist/command-classes.js.map +1 -0
- package/dist/contracts/activity.contract.js +1 -1
- package/dist/contracts/activity.contract.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +51 -2
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +13 -1
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +24 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +5 -1
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/automations.contract.js +2 -1
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +63 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +3 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/chores.contract.d.ts.map +1 -1
- package/dist/contracts/chores.contract.js +2 -1
- package/dist/contracts/chores.contract.js.map +1 -1
- package/dist/contracts/ci.contract.js +2 -1
- package/dist/contracts/ci.contract.js.map +1 -1
- package/dist/contracts/claude.contract.js +2 -1
- package/dist/contracts/claude.contract.js.map +1 -1
- package/dist/contracts/cursor.contract.js +2 -1
- package/dist/contracts/cursor.contract.js.map +1 -1
- package/dist/contracts/drafts.contract.d.ts.map +1 -1
- package/dist/contracts/drafts.contract.js +2 -1
- package/dist/contracts/drafts.contract.js.map +1 -1
- package/dist/contracts/endpoints.contract.d.ts.map +1 -1
- package/dist/contracts/endpoints.contract.js +2 -1
- package/dist/contracts/endpoints.contract.js.map +1 -1
- package/dist/contracts/exit.contract.d.ts.map +1 -1
- package/dist/contracts/exit.contract.js +2 -1
- package/dist/contracts/exit.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +42 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +4 -1
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.js +4 -1
- package/dist/contracts/git.contract.js.map +1 -1
- package/dist/contracts/grok.contract.d.ts.map +1 -1
- package/dist/contracts/grok.contract.js +2 -1
- package/dist/contracts/grok.contract.js.map +1 -1
- package/dist/contracts/history.contract.d.ts.map +1 -1
- package/dist/contracts/history.contract.js +2 -1
- package/dist/contracts/history.contract.js.map +1 -1
- package/dist/contracts/host.contract.d.ts +11 -0
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/host.contract.js +4 -1
- package/dist/contracts/host.contract.js.map +1 -1
- package/dist/contracts/intentic.contract.d.ts.map +1 -1
- package/dist/contracts/intentic.contract.js +2 -1
- package/dist/contracts/intentic.contract.js.map +1 -1
- package/dist/contracts/inventory.contract.js +1 -1
- package/dist/contracts/inventory.contract.js.map +1 -1
- package/dist/contracts/logs.contract.d.ts.map +1 -1
- package/dist/contracts/logs.contract.js +1 -1
- package/dist/contracts/logs.contract.js.map +1 -1
- package/dist/contracts/loops.contract.js +2 -1
- package/dist/contracts/loops.contract.js.map +1 -1
- package/dist/contracts/panels.contract.d.ts.map +1 -1
- package/dist/contracts/panels.contract.js +2 -1
- package/dist/contracts/panels.contract.js.map +1 -1
- package/dist/contracts/personas.contract.js +2 -1
- package/dist/contracts/personas.contract.js.map +1 -1
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.js +2 -1
- package/dist/contracts/ports.contract.js.map +1 -1
- package/dist/contracts/prepush.contract.d.ts.map +1 -1
- package/dist/contracts/prepush.contract.js +2 -1
- package/dist/contracts/prepush.contract.js.map +1 -1
- package/dist/contracts/providers.contract.d.ts.map +1 -1
- package/dist/contracts/providers.contract.js +2 -1
- package/dist/contracts/providers.contract.js.map +1 -1
- package/dist/contracts/public.contract.d.ts.map +1 -1
- package/dist/contracts/public.contract.js +2 -1
- package/dist/contracts/public.contract.js.map +1 -1
- package/dist/contracts/push.contract.d.ts.map +1 -1
- package/dist/contracts/push.contract.js +2 -1
- package/dist/contracts/push.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +151 -43
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +14 -1
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +2 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.js +1 -1
- package/dist/contracts/sessions.contract.js.map +1 -1
- package/dist/contracts/settings.contract.d.ts +20 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +3 -1
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/share.contract.d.ts.map +1 -1
- package/dist/contracts/share.contract.js +2 -1
- package/dist/contracts/share.contract.js.map +1 -1
- package/dist/contracts/skills.contract.d.ts.map +1 -1
- package/dist/contracts/skills.contract.js +2 -1
- package/dist/contracts/skills.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +35 -16
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +6 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/contracts/translator.contract.js +4 -1
- package/dist/contracts/translator.contract.js.map +1 -1
- package/dist/contracts/usage.contract.js +1 -1
- package/dist/contracts/usage.contract.js.map +1 -1
- package/dist/contracts/vpn.contract.d.ts.map +1 -1
- package/dist/contracts/vpn.contract.js +2 -1
- package/dist/contracts/vpn.contract.js.map +1 -1
- package/dist/contracts/webext.contract.d.ts +45 -0
- package/dist/contracts/webext.contract.d.ts.map +1 -0
- package/dist/contracts/webext.contract.js +12 -0
- package/dist/contracts/webext.contract.js.map +1 -0
- package/dist/contracts/workflows.contract.js +2 -1
- package/dist/contracts/workflows.contract.js.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +2 -2
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +7 -1
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/definition-action.d.ts +7 -0
- package/dist/definition-action.d.ts.map +1 -0
- package/dist/definition-action.js +3 -0
- package/dist/definition-action.js.map +1 -0
- package/dist/definition.d.ts +1064 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +93 -0
- package/dist/definition.js.map +1 -0
- package/dist/events.d.ts +109 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +30 -1
- package/dist/events.js.map +1 -1
- package/dist/fast-tier.d.ts +1 -1
- package/dist/fast-tier.d.ts.map +1 -1
- package/dist/history-state.d.ts.map +1 -1
- package/dist/history-state.js +1 -0
- package/dist/history-state.js.map +1 -1
- package/dist/index.d.ts +371 -103
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -1
- package/dist/index.js.map +1 -1
- package/dist/listener-protocol.js +1 -1
- package/dist/listener-protocol.js.map +1 -1
- package/dist/quick-model.d.ts +1 -1
- package/dist/quick-model.d.ts.map +1 -1
- package/dist/runner-protocol.d.ts +18 -0
- package/dist/runner-protocol.d.ts.map +1 -1
- package/dist/runner-protocol.js +8 -4
- package/dist/runner-protocol.js.map +1 -1
- package/dist/schemas/activity.d.ts +112 -0
- package/dist/schemas/activity.d.ts.map +1 -0
- package/dist/schemas/activity.js +70 -0
- package/dist/schemas/activity.js.map +1 -0
- package/dist/schemas/agent.d.ts +189 -0
- package/dist/schemas/agent.d.ts.map +1 -0
- package/dist/schemas/agent.js +170 -0
- package/dist/schemas/agent.js.map +1 -0
- package/dist/schemas/agents.d.ts +690 -0
- package/dist/schemas/agents.d.ts.map +1 -0
- package/dist/schemas/agents.js +314 -0
- package/dist/schemas/agents.js.map +1 -0
- package/dist/schemas/automations.d.ts +736 -0
- package/dist/schemas/automations.d.ts.map +1 -0
- package/dist/schemas/automations.js +218 -0
- package/dist/schemas/automations.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +753 -0
- package/dist/schemas/capabilities.d.ts.map +1 -0
- package/dist/schemas/capabilities.js +269 -0
- package/dist/schemas/capabilities.js.map +1 -0
- package/dist/schemas/ci.d.ts +179 -0
- package/dist/schemas/ci.d.ts.map +1 -0
- package/dist/schemas/ci.js +99 -0
- package/dist/schemas/ci.js.map +1 -0
- package/dist/schemas/claude-gate.d.ts +13 -0
- package/dist/schemas/claude-gate.d.ts.map +1 -0
- package/dist/schemas/claude-gate.js +8 -0
- package/dist/schemas/claude-gate.js.map +1 -0
- package/dist/schemas/codebase-health.d.ts +56 -0
- package/dist/schemas/codebase-health.d.ts.map +1 -0
- package/dist/schemas/codebase-health.js +43 -0
- package/dist/schemas/codebase-health.js.map +1 -0
- package/dist/schemas/computers.d.ts +386 -0
- package/dist/schemas/computers.d.ts.map +1 -0
- package/dist/schemas/computers.js +107 -0
- package/dist/schemas/computers.js.map +1 -0
- package/dist/schemas/drafts.d.ts +84 -0
- package/dist/schemas/drafts.d.ts.map +1 -0
- package/dist/schemas/drafts.js +44 -0
- package/dist/schemas/drafts.js.map +1 -0
- package/dist/schemas/environment.d.ts +349 -0
- package/dist/schemas/environment.d.ts.map +1 -0
- package/dist/schemas/environment.js +111 -0
- package/dist/schemas/environment.js.map +1 -0
- package/dist/schemas/exit.d.ts +151 -0
- package/dist/schemas/exit.d.ts.map +1 -0
- package/dist/schemas/exit.js +115 -0
- package/dist/schemas/exit.js.map +1 -0
- package/dist/schemas/extension-updates.d.ts +1014 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -0
- package/dist/schemas/extension-updates.js +197 -0
- package/dist/schemas/extension-updates.js.map +1 -0
- package/dist/schemas/fast-mode.d.ts +8 -0
- package/dist/schemas/fast-mode.d.ts.map +1 -0
- package/dist/schemas/fast-mode.js +3 -0
- package/dist/schemas/fast-mode.js.map +1 -0
- package/dist/schemas/git-history.d.ts +238 -0
- package/dist/schemas/git-history.d.ts.map +1 -0
- package/dist/schemas/git-history.js +152 -0
- package/dist/schemas/git-history.js.map +1 -0
- package/dist/schemas/git.d.ts +471 -0
- package/dist/schemas/git.d.ts.map +1 -0
- package/dist/schemas/git.js +204 -0
- package/dist/schemas/git.js.map +1 -0
- package/dist/schemas/history.d.ts +100 -0
- package/dist/schemas/history.d.ts.map +1 -0
- package/dist/schemas/history.js +54 -0
- package/dist/schemas/history.js.map +1 -0
- package/dist/schemas/hosts.d.ts +41 -0
- package/dist/schemas/hosts.d.ts.map +1 -0
- package/dist/schemas/hosts.js +18 -0
- package/dist/schemas/hosts.js.map +1 -0
- package/dist/schemas/intentic.d.ts +5 -0
- package/dist/schemas/intentic.d.ts.map +1 -0
- package/dist/schemas/intentic.js +3 -0
- package/dist/schemas/intentic.js.map +1 -0
- package/dist/schemas/internal.d.ts +8 -0
- package/dist/schemas/internal.d.ts.map +1 -0
- package/dist/schemas/internal.js +12 -0
- package/dist/schemas/internal.js.map +1 -0
- package/dist/schemas/inventory.d.ts +171 -0
- package/dist/schemas/inventory.d.ts.map +1 -0
- package/dist/schemas/inventory.js +51 -0
- package/dist/schemas/inventory.js.map +1 -0
- package/dist/schemas/logs.d.ts +67 -0
- package/dist/schemas/logs.d.ts.map +1 -0
- package/dist/schemas/logs.js +54 -0
- package/dist/schemas/logs.js.map +1 -0
- package/dist/schemas/loops.d.ts +415 -0
- package/dist/schemas/loops.d.ts.map +1 -0
- package/dist/schemas/loops.js +188 -0
- package/dist/schemas/loops.js.map +1 -0
- package/dist/schemas/maintenance.d.ts +557 -0
- package/dist/schemas/maintenance.d.ts.map +1 -0
- package/dist/schemas/maintenance.js +201 -0
- package/dist/schemas/maintenance.js.map +1 -0
- package/dist/schemas/marketplace.d.ts +64 -0
- package/dist/schemas/marketplace.d.ts.map +1 -0
- package/dist/schemas/marketplace.js +17 -0
- package/dist/schemas/marketplace.js.map +1 -0
- package/dist/schemas/panels.d.ts +61 -0
- package/dist/schemas/panels.d.ts.map +1 -0
- package/dist/schemas/panels.js +51 -0
- package/dist/schemas/panels.js.map +1 -0
- package/dist/schemas/personas.d.ts +122 -0
- package/dist/schemas/personas.d.ts.map +1 -0
- package/dist/schemas/personas.js +102 -0
- package/dist/schemas/personas.js.map +1 -0
- package/dist/schemas/plan-limits.d.ts +172 -0
- package/dist/schemas/plan-limits.d.ts.map +1 -0
- package/dist/schemas/plan-limits.js +126 -0
- package/dist/schemas/plan-limits.js.map +1 -0
- package/dist/schemas/ports.d.ts +71 -0
- package/dist/schemas/ports.d.ts.map +1 -0
- package/dist/schemas/ports.js +42 -0
- package/dist/schemas/ports.js.map +1 -0
- package/dist/schemas/provider-oauth.d.ts +128 -0
- package/dist/schemas/provider-oauth.d.ts.map +1 -0
- package/dist/schemas/provider-oauth.js +91 -0
- package/dist/schemas/provider-oauth.js.map +1 -0
- package/dist/schemas/provider-subscriptions.d.ts +9 -0
- package/dist/schemas/provider-subscriptions.d.ts.map +1 -0
- package/dist/schemas/provider-subscriptions.js +3 -0
- package/dist/schemas/provider-subscriptions.js.map +1 -0
- package/dist/schemas/public.d.ts +32 -0
- package/dist/schemas/public.d.ts.map +1 -0
- package/dist/schemas/public.js +29 -0
- package/dist/schemas/public.js.map +1 -0
- package/dist/schemas/push.d.ts +55 -0
- package/dist/schemas/push.d.ts.map +1 -0
- package/dist/schemas/push.js +60 -0
- package/dist/schemas/push.js.map +1 -0
- package/dist/schemas/secrets.d.ts +86 -0
- package/dist/schemas/secrets.d.ts.map +1 -0
- package/dist/schemas/secrets.js +51 -0
- package/dist/schemas/secrets.js.map +1 -0
- package/dist/schemas/sessions.d.ts +32 -0
- package/dist/schemas/sessions.d.ts.map +1 -0
- package/dist/schemas/sessions.js +11 -0
- package/dist/schemas/sessions.js.map +1 -0
- package/dist/schemas/settings.d.ts +548 -0
- package/dist/schemas/settings.d.ts.map +1 -0
- package/dist/schemas/settings.js +259 -0
- package/dist/schemas/settings.js.map +1 -0
- package/dist/schemas/share.d.ts +49 -0
- package/dist/schemas/share.d.ts.map +1 -0
- package/dist/schemas/share.js +26 -0
- package/dist/schemas/share.js.map +1 -0
- package/dist/schemas/shared.d.ts +22 -0
- package/dist/schemas/shared.d.ts.map +1 -0
- package/dist/schemas/shared.js +16 -0
- package/dist/schemas/shared.js.map +1 -0
- package/dist/schemas/system.d.ts +86 -0
- package/dist/schemas/system.d.ts.map +1 -0
- package/dist/schemas/system.js +64 -0
- package/dist/schemas/system.js.map +1 -0
- package/dist/schemas/terminal.d.ts +230 -0
- package/dist/schemas/terminal.d.ts.map +1 -0
- package/dist/schemas/terminal.js +133 -0
- package/dist/schemas/terminal.js.map +1 -0
- package/dist/schemas/usage.d.ts +113 -0
- package/dist/schemas/usage.d.ts.map +1 -0
- package/dist/schemas/usage.js +91 -0
- package/dist/schemas/usage.js.map +1 -0
- package/dist/schemas/vpn.d.ts +229 -0
- package/dist/schemas/vpn.d.ts.map +1 -0
- package/dist/schemas/vpn.js +115 -0
- package/dist/schemas/vpn.js.map +1 -0
- package/dist/schemas/webext.d.ts +98 -0
- package/dist/schemas/webext.d.ts.map +1 -0
- package/dist/schemas/webext.js +36 -0
- package/dist/schemas/webext.js.map +1 -0
- package/dist/schemas/workflows.d.ts +881 -0
- package/dist/schemas/workflows.d.ts.map +1 -0
- package/dist/schemas/workflows.js +164 -0
- package/dist/schemas/workflows.js.map +1 -0
- package/dist/schemas/workspace-repos.d.ts +143 -0
- package/dist/schemas/workspace-repos.d.ts.map +1 -0
- package/dist/schemas/workspace-repos.js +87 -0
- package/dist/schemas/workspace-repos.js.map +1 -0
- package/dist/schemas/workspace-search.d.ts +170 -0
- package/dist/schemas/workspace-search.d.ts.map +1 -0
- package/dist/schemas/workspace-search.js +85 -0
- package/dist/schemas/workspace-search.js.map +1 -0
- package/dist/schemas/workspace-setup.d.ts +48 -0
- package/dist/schemas/workspace-setup.d.ts.map +1 -0
- package/dist/schemas/workspace-setup.js +26 -0
- package/dist/schemas/workspace-setup.js.map +1 -0
- package/dist/schemas/workspace-tree.d.ts +120 -0
- package/dist/schemas/workspace-tree.d.ts.map +1 -0
- package/dist/schemas/workspace-tree.js +111 -0
- package/dist/schemas/workspace-tree.js.map +1 -0
- package/dist/webext-links.d.ts +13 -0
- package/dist/webext-links.d.ts.map +1 -0
- package/dist/webext-links.js +24 -0
- package/dist/webext-links.js.map +1 -0
- package/dist/webext-protocol.d.ts +8 -0
- package/dist/webext-protocol.d.ts.map +1 -0
- package/dist/webext-protocol.js +7 -0
- package/dist/webext-protocol.js.map +1 -0
- package/dist/workflow-faults.d.ts +1 -1
- package/dist/workflow-faults.d.ts.map +1 -1
- package/dist/workspace-state.d.ts +11 -2
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +4 -2
- package/dist/workspace-state.js.map +1 -1
- package/package.json +17 -6
- package/src/agent-catalog.test.ts +1 -1
- package/src/agent-catalog.ts +4 -11
- package/src/chores/chores.ts +1 -1
- package/src/chores/probes.ts +1 -1
- package/src/chores/stack.test.ts +19 -0
- package/src/chores/stack.ts +19 -3
- package/src/chores/verdict.test.ts +11 -1
- package/src/chores/verdict.ts +1 -1
- package/src/command-classes.test.ts +378 -0
- package/src/command-classes.ts +378 -0
- package/src/contracts/activity.contract.ts +1 -1
- package/src/contracts/agent.contract.ts +22 -12
- package/src/contracts/agents.contract.ts +6 -6
- package/src/contracts/automations.contract.ts +2 -2
- package/src/contracts/capabilities.contract.ts +3 -4
- package/src/contracts/chores.contract.ts +2 -1
- package/src/contracts/ci.contract.ts +2 -2
- package/src/contracts/claude.contract.ts +2 -2
- package/src/contracts/cursor.contract.ts +2 -2
- package/src/contracts/drafts.contract.ts +2 -1
- package/src/contracts/endpoints.contract.ts +2 -1
- package/src/contracts/exit.contract.ts +2 -1
- package/src/contracts/extensions.contract.ts +5 -5
- package/src/contracts/git.contract.ts +19 -18
- package/src/contracts/grok.contract.ts +2 -1
- package/src/contracts/history.contract.ts +2 -1
- package/src/contracts/host.contract.ts +4 -1
- package/src/contracts/intentic.contract.ts +2 -1
- package/src/contracts/inventory.contract.ts +1 -1
- package/src/contracts/logs.contract.ts +7 -1
- package/src/contracts/loops.contract.ts +2 -2
- package/src/contracts/panels.contract.ts +2 -1
- package/src/contracts/personas.contract.ts +3 -3
- package/src/contracts/ports.contract.ts +3 -2
- package/src/contracts/prepush.contract.ts +2 -1
- package/src/contracts/providers.contract.ts +2 -1
- package/src/contracts/public.contract.ts +3 -2
- package/src/contracts/push.contract.ts +2 -1
- package/src/contracts/runner.contract.ts +33 -1
- package/src/contracts/secrets.contract.ts +2 -1
- package/src/contracts/sessions.contract.ts +1 -1
- package/src/contracts/settings.contract.ts +3 -9
- package/src/contracts/share.contract.ts +3 -2
- package/src/contracts/skills.contract.ts +2 -1
- package/src/contracts/system.contract.ts +6 -9
- package/src/contracts/translator.contract.ts +4 -1
- package/src/contracts/usage.contract.ts +1 -1
- package/src/contracts/vpn.contract.ts +2 -8
- package/src/contracts/webext.contract.ts +37 -0
- package/src/contracts/workflows.contract.ts +2 -2
- package/src/contracts/workspace.contract.ts +10 -12
- package/src/conversation-ids.test.ts +1 -1
- package/src/definition-action.ts +8 -0
- package/src/definition.ts +235 -0
- package/src/events.ts +128 -22
- package/src/fast-tier.ts +1 -1
- package/src/history-state.ts +5 -0
- package/src/host-protocol.ts +1 -1
- package/src/hostnames.test.ts +2 -2
- package/src/index.ts +61 -1
- package/src/listener-protocol.ts +1 -1
- package/src/quick-model.ts +1 -1
- package/src/runner-protocol.ts +35 -5
- package/src/schemas/activity.ts +123 -0
- package/src/schemas/agent.ts +409 -0
- package/src/schemas/agents.ts +802 -0
- package/src/schemas/automations.ts +510 -0
- package/src/schemas/capabilities.ts +729 -0
- package/src/schemas/ci.ts +235 -0
- package/src/schemas/claude-gate.ts +13 -0
- package/src/schemas/codebase-health.ts +64 -0
- package/src/schemas/computers.ts +287 -0
- package/src/schemas/drafts.ts +108 -0
- package/src/schemas/environment.ts +276 -0
- package/src/schemas/exit.ts +222 -0
- package/src/schemas/extension-updates.ts +322 -0
- package/src/schemas/fast-mode.ts +8 -0
- package/src/schemas/git-history.ts +265 -0
- package/src/schemas/git.ts +430 -0
- package/src/schemas/history.ts +112 -0
- package/src/schemas/hosts.ts +37 -0
- package/src/schemas/intentic.ts +2 -0
- package/src/schemas/internal.ts +17 -0
- package/src/schemas/inventory.ts +68 -0
- package/src/schemas/logs.ts +96 -0
- package/src/schemas/loops.ts +401 -0
- package/src/schemas/maintenance.ts +421 -0
- package/src/schemas/marketplace.ts +23 -0
- package/src/schemas/panels.ts +99 -0
- package/src/schemas/personas.ts +281 -0
- package/src/schemas/plan-limits.ts +255 -0
- package/src/schemas/ports.ts +84 -0
- package/src/schemas/provider-oauth.ts +191 -0
- package/src/schemas/provider-subscriptions.ts +11 -0
- package/src/schemas/public.ts +52 -0
- package/src/schemas/push.ts +112 -0
- package/src/schemas/secrets.ts +68 -0
- package/src/schemas/sessions.ts +16 -0
- package/src/schemas/settings.ts +932 -0
- package/src/schemas/share.ts +71 -0
- package/src/schemas/shared.ts +32 -0
- package/src/schemas/system.ts +156 -0
- package/src/schemas/terminal.ts +286 -0
- package/src/schemas/usage.ts +303 -0
- package/src/{schemas.test.ts → schemas/version-seam.test.ts} +4 -2
- package/src/schemas/vpn.ts +215 -0
- package/src/schemas/webext.ts +79 -0
- package/src/schemas/workflows.ts +413 -0
- package/src/schemas/workspace-repos.ts +123 -0
- package/src/schemas/workspace-search.ts +141 -0
- package/src/schemas/workspace-setup.ts +43 -0
- package/src/schemas/workspace-tree.ts +234 -0
- package/src/title.test.ts +1 -1
- package/src/webext-links.ts +80 -0
- package/src/webext-protocol.ts +27 -0
- package/src/workflow-faults.test.ts +1 -1
- package/src/workflow-faults.ts +1 -1
- package/src/workspace-state.test.ts +7 -3
- package/src/workspace-state.ts +27 -13
- package/dist/schemas.d.ts +0 -9800
- package/dist/schemas.d.ts.map +0 -1
- package/dist/schemas.js +0 -4252
- package/dist/schemas.js.map +0 -1
- package/src/schemas.ts +0 -9999
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// share: a conversation published as a page
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/* The outbox holds FILES; a conversation is not one, so sharing it means RENDERING it into one. The result is
|
|
4
|
+
* an ordinary published page under the same `public-<slot>` hostname, with the same guards in front of it,
|
|
5
|
+
* which is the whole reason this rides the outbox rather than inventing a second public surface with its own
|
|
6
|
+
* auth story to get wrong.
|
|
7
|
+
*
|
|
8
|
+
* A share is a SNAPSHOT, not a window. The page holds the conversation as it read at the moment of sharing and
|
|
9
|
+
* does not move again until the owner re-takes it, because the alternative, a link that keeps publishing
|
|
10
|
+
* whatever is said next, makes every later turn a disclosure the user did not consciously make. `sharedAt`
|
|
11
|
+
* is therefore relied on by the row: it dates what the recipient can actually see. */
|
|
12
|
+
|
|
13
|
+
/* HOW MUCH OF A CONVERSATION TRAVELS, decided per share rather than by a setting, because the two answers suit
|
|
14
|
+
* genuinely different acts. `messages` is the two speakers' words and nothing else, what you send a friend to
|
|
15
|
+
* show what the thing said. `everything` adds the agent's work (its tool cards, the diffs of what it edited,
|
|
16
|
+
* the pictures it took) and its thinking, what you send a colleague to show HOW it got there, and which
|
|
17
|
+
* necessarily publishes the code and command output that appear in those cards.
|
|
18
|
+
*
|
|
19
|
+
* Two levels, not a set of switches: every extra toggle is another thing to get wrong about a link that cannot
|
|
20
|
+
* be recalled once sent, and the honest distinction here is between "the conversation" and "the record". */
|
|
21
|
+
export const ShareDetailSchema = z.enum(["messages", "everything"]);
|
|
22
|
+
export type ShareDetail = z.infer<typeof ShareDetailSchema>;
|
|
23
|
+
// One shared conversation, as the Public view lists it.
|
|
24
|
+
export const SharedConversationSchema = z.object({
|
|
25
|
+
/* The share's own id, and the name its page is filed under in the outbox. NOT the conversation's id: that
|
|
26
|
+
* one is a memorable pair (`swift-otter-k9m2`, see conversation-ids.ts) chosen to be guessable BY A HUMAN
|
|
27
|
+
* at a glance, which is the opposite of what should name a page whose only protection is that its address
|
|
28
|
+
* is not enumerable. Minted per share, so re-sharing the same conversation twice yields two links. */
|
|
29
|
+
id: z
|
|
30
|
+
.string()
|
|
31
|
+
.describe(
|
|
32
|
+
"The share's own id, minted fresh each time, so sharing one conversation twice gives two links. Deliberately not the conversation's id, which is memorable by design and would make a page's address guessable.",
|
|
33
|
+
),
|
|
34
|
+
// Which conversation the snapshot was taken from, what Update re-reads, and what the chat matches against
|
|
35
|
+
// to know it already has a share.
|
|
36
|
+
conversationId: z.string().describe("Which conversation it was taken from."),
|
|
37
|
+
title: z.string().describe("The title on the page, which is the sharer's choice rather than the conversation's own."),
|
|
38
|
+
detail: ShareDetailSchema.describe(
|
|
39
|
+
"How much travels: the two speakers' words alone, or the whole record including the agent's work and thinking, which necessarily publishes the code and command output in it.",
|
|
40
|
+
),
|
|
41
|
+
// When the snapshot was taken (epoch ms). A share is frozen, so this dates what a recipient can see,
|
|
42
|
+
// not when the conversation happened.
|
|
43
|
+
sharedAt: z
|
|
44
|
+
.number()
|
|
45
|
+
.describe(
|
|
46
|
+
"When the snapshot was taken, in milliseconds. A share is frozen, so this dates what a recipient can see rather than when the conversation happened.",
|
|
47
|
+
),
|
|
48
|
+
// How many messages the snapshot holds, so a row can say how much is behind the link without opening it.
|
|
49
|
+
messages: z.number().describe("How many messages are behind the link."),
|
|
50
|
+
// The page's public URL. Absent on a sandbox with no tunnel, which has nowhere to publish to, the same
|
|
51
|
+
// rule (and the same cause) as PublicFile.url.
|
|
52
|
+
url: z.string().optional().describe("The page's address. Absent on a sandbox with nowhere to publish to."),
|
|
53
|
+
});
|
|
54
|
+
export type SharedConversation = z.infer<typeof SharedConversationSchema>;
|
|
55
|
+
export const ShareListSchema = z.object({ shares: z.array(SharedConversationSchema).describe("Every conversation currently published as a page.") });
|
|
56
|
+
export type ShareList = z.infer<typeof ShareListSchema>;
|
|
57
|
+
// The title is the sharer's, not the conversation's: the chat's own name is only the default the dialog opens
|
|
58
|
+
// with. Bounded at the registry's title budget (title.ts MAX_LENGTH) so one surface can't store what the others
|
|
59
|
+
// truncate away.
|
|
60
|
+
export const ShareCreateSchema = z.object({
|
|
61
|
+
conversationId: z.string().min(1).describe("Which conversation to publish."),
|
|
62
|
+
title: z.string().min(1).max(80).describe("The title for the page. The conversation's own name is only what a dialog would open with."),
|
|
63
|
+
detail: ShareDetailSchema.describe(
|
|
64
|
+
"How much to publish. Two levels rather than a set of switches, because every extra toggle is another thing to get wrong about a link that cannot be recalled.",
|
|
65
|
+
),
|
|
66
|
+
});
|
|
67
|
+
// Re-take an existing share's snapshot, keeping its id, and therefore its link, which has already been sent.
|
|
68
|
+
export const ShareUpdateSchema = z.object({
|
|
69
|
+
id: z.string().min(1).describe("Which share to re-take. Its link stays the same, which matters because it has already been sent."),
|
|
70
|
+
});
|
|
71
|
+
export const ShareRemoveSchema = z.object({ id: z.string().min(1).describe("Which share to take down.") });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Success ack for routes that only report completion (push / disconnect / self-host register). A turn paused on
|
|
3
|
+
// a plan/question that no longer exists, or a missing repo/path, is an ORPCError thrown by the handler instead.
|
|
4
|
+
export const OkSchema = z.object({
|
|
5
|
+
ok: z
|
|
6
|
+
.literal(true)
|
|
7
|
+
.describe("Always true. A route that answers this either did the thing or refused with a status; there is no third outcome to report."),
|
|
8
|
+
});
|
|
9
|
+
// The trust tiers of everyone who can open this sandbox, ordered. `owner` is the one bound identity
|
|
10
|
+
// (auth/auth.ts); the other three are granted per email on the daemon's /members list. viewer watches,
|
|
11
|
+
// collaborator drives agents (outward actions become requests), maintainer has the owner's operating authority
|
|
12
|
+
// while remaining revokable. Ownership itself is not a grant and controls the access roster.
|
|
13
|
+
export const MemberRoleSchema = z.enum(["viewer", "collaborator", "maintainer", "owner"]);
|
|
14
|
+
export type MemberRole = z.infer<typeof MemberRoleSchema>;
|
|
15
|
+
// The roles an invite can grant, everything but `owner`, which is bound at first sign-in, never granted.
|
|
16
|
+
export const GrantedRoleSchema = z.enum(["viewer", "collaborator", "maintainer"]);
|
|
17
|
+
export type GrantedRole = z.infer<typeof GrantedRoleSchema>;
|
|
18
|
+
// Shared by every surface that gates on a role (daemon route floors, web affordances) so the order lives in
|
|
19
|
+
// exactly one place.
|
|
20
|
+
const MEMBER_ROLE_RANK: Record<MemberRole, number> = { viewer: 0, collaborator: 1, maintainer: 2, owner: 3 };
|
|
21
|
+
export const roleAtLeast = (role: MemberRole, floor: MemberRole): boolean => MEMBER_ROLE_RANK[role] >= MEMBER_ROLE_RANK[floor];
|
|
22
|
+
// Which repo a git route targets: "root" (the /work workspace repo) or a repo id, the repo's root-relative
|
|
23
|
+
// dir, which may be nested ("clients/foo"; URL-encoded in the path param). Kept as a bare string on the wire
|
|
24
|
+
// (not an enum) so an unknown repo is a handler-thrown NOT_FOUND, matching the daemon's prior 404, rather
|
|
25
|
+
// than an input-validation rejection.
|
|
26
|
+
export const RepoParamSchema = z.object({
|
|
27
|
+
repo: z
|
|
28
|
+
.string()
|
|
29
|
+
.describe(
|
|
30
|
+
'Which repository. "root" is the workspace itself; anything else is a repository\'s folder relative to the workspace root, URL-encoded.',
|
|
31
|
+
),
|
|
32
|
+
});
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// version: what this daemon runs (baked). latest/updateAvailable: the daemon compares its version to the
|
|
3
|
+
// latest published `stable` release so the web can offer a non-blocking update (see system/version-check.ts).
|
|
4
|
+
/* Whether an agent runtime can serve a turn right now, probed off the turn path (see the sandbox's
|
|
5
|
+
* agent/adapter-health.ts). "unknown" is a real answer, a probe that could not run must not read as
|
|
6
|
+
* "unavailable" and grey out a provider the user can in fact use, so surfaces treat it as
|
|
7
|
+
* available-but-unverified rather than as a soft no. */
|
|
8
|
+
export const AdapterHealthSchema = z.object({
|
|
9
|
+
state: z
|
|
10
|
+
.enum(["ready", "unavailable", "unknown"])
|
|
11
|
+
.describe(
|
|
12
|
+
"Whether this runtime can serve a turn. Unknown is a real answer rather than a soft no: a check that could not run must not grey out a provider you can in fact use.",
|
|
13
|
+
),
|
|
14
|
+
// Why it cannot serve, in the user's terms and naming what to do about it. Absent when ready.
|
|
15
|
+
detail: z.string().optional().describe("Why it cannot, and what to do about it. Absent when it can."),
|
|
16
|
+
checkedAt: z.number().describe("When it was last checked, in milliseconds."),
|
|
17
|
+
});
|
|
18
|
+
export type AdapterHealthReport = z.infer<typeof AdapterHealthSchema>;
|
|
19
|
+
/* AN UPDATE ALREADY DOWNLOADED AND BUILT, waiting for the restart that applies it.
|
|
20
|
+
*
|
|
21
|
+
* An update is one blocking operation but it was never one kind of work: pulling the new image and re-applying
|
|
22
|
+
* the environment recipe take the overwhelming majority of the wall clock, and the sandbox is up and serving
|
|
23
|
+
* through both of them. Only the cutover is downtime, and it is seconds.
|
|
24
|
+
*
|
|
25
|
+
* The daemon cannot know any of this by itself, it holds no host Docker socket, so `ic sandbox prepare`
|
|
26
|
+
* tells it, on the machine that runs the container. That is the whole reason this exists: without it, the
|
|
27
|
+
* update card had to quote the download as if it were an outage, and "a few minutes, this page loses the
|
|
28
|
+
* sandbox" is a completely different decision from "about half a minute".
|
|
29
|
+
*
|
|
30
|
+
* Advisory only, in the strict sense: it decides what a card SAYS and never what gets installed. The swap
|
|
31
|
+
* re-derives every one of these facts from the host-side record and refuses the fast path if any has drifted. */
|
|
32
|
+
export const StagedUpdateSchema = z.object({
|
|
33
|
+
// The version the staged image reports about itself. Absent when the image would not say (an older build,
|
|
34
|
+
// a probe that failed), which reads as "ready, version unknown", never as nothing being ready.
|
|
35
|
+
version: z.string().optional().describe("What the downloaded build says it is. Absent means ready but unnamed, never that nothing is ready."),
|
|
36
|
+
// The release channel it was staged FROM, which is not necessarily the one this sandbox follows: preparing
|
|
37
|
+
// a beta build is not moving onto beta.
|
|
38
|
+
channel: z
|
|
39
|
+
.string()
|
|
40
|
+
.describe(
|
|
41
|
+
"Which channel it was taken from. Not necessarily the one this sandbox follows: downloading a beta build is not the same as moving onto beta.",
|
|
42
|
+
),
|
|
43
|
+
// When it finished downloading, epoch ms, what answers "is this still the update I am being offered?"
|
|
44
|
+
at: z.number().describe("When the download finished, in milliseconds, which answers whether this is still the update being offered."),
|
|
45
|
+
});
|
|
46
|
+
export type StagedUpdate = z.infer<typeof StagedUpdateSchema>;
|
|
47
|
+
export const InfoSchema = z.object({
|
|
48
|
+
name: z.string().optional().describe("What this sandbox is called."),
|
|
49
|
+
image: z.string().optional().describe("The image it is running."),
|
|
50
|
+
version: z.string().optional().describe("The version of that image."),
|
|
51
|
+
latest: z.string().optional().describe("The newest published version on its channel."),
|
|
52
|
+
updateAvailable: z.boolean().optional().describe("Whether those two differ."),
|
|
53
|
+
// Keyed by AgentCapabilities.runtime. Absent until the first background sweep lands, which reads the same
|
|
54
|
+
// as every entry being "unknown", one of the two cannot go stale, so the daemon sends the absence.
|
|
55
|
+
runtimes: z
|
|
56
|
+
.record(z.string(), AdapterHealthSchema)
|
|
57
|
+
.optional()
|
|
58
|
+
.describe(
|
|
59
|
+
"Which agent runtimes can serve a turn right now, keyed by runtime. Absent until the first check has run, which reads the same as every entry being unknown.",
|
|
60
|
+
),
|
|
61
|
+
/* Which release channel this sandbox follows (`stable` unless it was moved), and the base image the last
|
|
62
|
+
* swap replaced, both set on the container by the host script that performed the swap, since neither is
|
|
63
|
+
* knowable from inside afterwards. `previousImage` is what a rollback returns to; absent means there is
|
|
64
|
+
* nothing to go back to and no rollback is offered. */
|
|
65
|
+
channel: z.string().optional().describe("Which release channel this sandbox follows."),
|
|
66
|
+
previousImage: z
|
|
67
|
+
.string()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe("The image the last update replaced, which is what a rollback would return to. Absent means there is nothing to go back to."),
|
|
70
|
+
/* WHAT IS IN THE UPDATE, in the words of the people it is for, the user-facing lines from every release
|
|
71
|
+
* between `version` and `latest`, newest first (platform/release-notes.ts reads them off the published
|
|
72
|
+
* GitHub Releases).
|
|
73
|
+
*
|
|
74
|
+
* The update card's other half. It could always say an update exists and what taking it costs, recreating
|
|
75
|
+
* the container interrupts every agent mid-turn, and never what the update was worth, which left the
|
|
76
|
+
* decision it asks for with nothing on one side of it.
|
|
77
|
+
*
|
|
78
|
+
* Absent, or empty, whenever there is nothing to say: the notes cache is cold, GitHub is unreachable, or
|
|
79
|
+
* every release in the gap changed only things nobody outside the project would notice. All three read the
|
|
80
|
+
* same way on the card, which shows the offer without them, exactly as it did before. */
|
|
81
|
+
updateNotes: z
|
|
82
|
+
.array(z.string())
|
|
83
|
+
.optional()
|
|
84
|
+
.describe(
|
|
85
|
+
"What is in the update, in the words of the people it is for, newest first. Absent or empty whenever there is nothing worth saying, which reads on screen exactly as it did before there were notes at all.",
|
|
86
|
+
),
|
|
87
|
+
// How many further notes the gap holds beyond the ones sent, for a sandbox that has been left alone a long
|
|
88
|
+
// time. Absent or 0 ⇒ `updateNotes` is the whole of it.
|
|
89
|
+
moreUpdateNotes: z
|
|
90
|
+
.number()
|
|
91
|
+
.optional()
|
|
92
|
+
.describe(
|
|
93
|
+
"How many further notes there are beyond the ones sent, for a sandbox left alone a long time. Absent or zero means you have all of them.",
|
|
94
|
+
),
|
|
95
|
+
/* WHAT THE UPDATE TAKES AWAY, the "Breaking changes" lines from every release in the same gap, uncapped
|
|
96
|
+
* (a warning that fell off a truncated list is a breaking update taken unwarned). Their presence is what
|
|
97
|
+
* turns the update card from an offer into a warning that asks to be read before it hands over the
|
|
98
|
+
* command. Absent for the overwhelming majority of updates, which break nothing. */
|
|
99
|
+
breakingNotes: z
|
|
100
|
+
.array(z.string())
|
|
101
|
+
.optional()
|
|
102
|
+
.describe(
|
|
103
|
+
"What the update takes away, uncapped, because a warning that fell off a shortened list is a breaking update taken unwarned. Absent for the overwhelming majority, which break nothing.",
|
|
104
|
+
),
|
|
105
|
+
/* AN UPDATE THAT HAS ALREADY BEEN DOWNLOADED AND BUILT on the machine that runs this container, and is
|
|
106
|
+
* waiting for the restart that applies it. Absent for the ordinary case where nothing is staged. */
|
|
107
|
+
staged: StagedUpdateSchema.optional().describe(
|
|
108
|
+
"An update already downloaded and built on the machine running this container, waiting only for the restart that applies it. That restart is seconds, where an unprepared update is minutes, which is a different decision entirely. Absent when nothing is waiting.",
|
|
109
|
+
),
|
|
110
|
+
});
|
|
111
|
+
export type Info = z.infer<typeof InfoSchema>;
|
|
112
|
+
/* WHAT THE DAEMON COULD NOT READ IN ITS OWN STATE FILES.
|
|
113
|
+
*
|
|
114
|
+
* Every manifest under `.intentic/` is read through a schema and falls back when that schema says no, which
|
|
115
|
+
* keeps the daemon up and, until this route, ended there. A settings file with one bad character read as
|
|
116
|
+
* every setting at its default, a misspelled flag was stripped in silence, and a skipped capability said so
|
|
117
|
+
* only in the daemon log. All three look identical from a browser: the feature is simply off.
|
|
118
|
+
*
|
|
119
|
+
* `kind` is what to do about it, which is why it is not just a message:
|
|
120
|
+
* unreadable , the whole file is being ignored. Everything in it is at its default.
|
|
121
|
+
* unknownKey , one key this build does not know. Only that key is ignored, and `suggestion` carries the
|
|
122
|
+
* name it was probably meant to be, when one is close enough to guess honestly.
|
|
123
|
+
* invalidEntry, one entry of a list was skipped. The rest of the file is unaffected.
|
|
124
|
+
*
|
|
125
|
+
* Reported per file rather than as one flat list because the file is the unit a person fixes, and only for the
|
|
126
|
+
* files a person CAN fix (REPORTED_MANIFEST_PATHS in workspace-state.ts). A daemon-written ledger that stops
|
|
127
|
+
* matching a tightened schema is not a repair job to hand the owner; it recovers on its own next write. */
|
|
128
|
+
export const ManifestProblemSchema = z.object({
|
|
129
|
+
kind: z
|
|
130
|
+
.enum(["unreadable", "unknownKey", "invalidEntry"])
|
|
131
|
+
.describe(
|
|
132
|
+
"What to do about it. Unreadable means the whole file is being ignored and everything in it is at its default. An unknown key means only that key is ignored. An invalid entry means one item of a list was skipped and the rest is fine.",
|
|
133
|
+
),
|
|
134
|
+
detail: z.string().describe("What exactly was wrong."),
|
|
135
|
+
suggestion: z.string().optional().describe("The name it was probably meant to be, when one is close enough to guess honestly."),
|
|
136
|
+
});
|
|
137
|
+
export type ManifestProblem = z.infer<typeof ManifestProblemSchema>;
|
|
138
|
+
// Workspace-relative path (`.intentic/config/settings.json`) and everything currently wrong with that file. A file
|
|
139
|
+
// with nothing wrong is absent from the list rather than present and empty.
|
|
140
|
+
export const ManifestProblemReportSchema = z.object({
|
|
141
|
+
path: z.string().describe("The file, as a workspace path. The file is the unit somebody fixes, which is why problems are grouped by it."),
|
|
142
|
+
problems: z
|
|
143
|
+
.array(ManifestProblemSchema)
|
|
144
|
+
.describe("Everything currently wrong with it. A file with nothing wrong is absent rather than present and empty."),
|
|
145
|
+
});
|
|
146
|
+
export type ManifestProblemReport = z.infer<typeof ManifestProblemReportSchema>;
|
|
147
|
+
export const ManifestProblemsSchema = z.array(ManifestProblemReportSchema);
|
|
148
|
+
// A daemon-minted session (system.session): the steady-state browser credential, exchanged for a verified
|
|
149
|
+
// Google ID token so Google UI is a sign-in moment instead of an hourly renewal. `expiresAt` is epoch ms,
|
|
150
|
+
// the browser renews ahead of it without parsing the token; `email` is who the daemon verified.
|
|
151
|
+
export const DaemonSessionSchema = z.object({
|
|
152
|
+
token: z.string().describe("The credential every other call carries. Present it as a bearer token."),
|
|
153
|
+
expiresAt: z.number().describe("When it stops working, in milliseconds, so a caller can renew ahead of it without reading the token."),
|
|
154
|
+
email: z.string().describe("Who the sandbox verified you as."),
|
|
155
|
+
});
|
|
156
|
+
export type DaemonSession = z.infer<typeof DaemonSessionSchema>;
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// EVERY live surface in the sandbox the web app's ONE global panel can show. Mostly tmux sessions (the
|
|
3
|
+
// interactive I/O is the /system/terminal WebSocket, not oRPC), plus the agent's browser, which is not a
|
|
4
|
+
// terminal at all, no more than a `process` row is, but IS the same question: what is running right now,
|
|
5
|
+
// and can I look at it? One list, because the panel that answers that question is one panel.
|
|
6
|
+
//
|
|
7
|
+
// `shell` = a web-* session the user opened (numbered pill),
|
|
8
|
+
// `panel` = a panel-* dev-server session (labeled by its panel key, started via Start; running:false =
|
|
9
|
+
// untracked, e.g. a finished one-shot job's lingering shell), `agent` = an agent-* session the Claude agent's
|
|
10
|
+
// Bash commands run in (live-watchable, AI-marked in the UI; running:false once every window is a finished
|
|
11
|
+
// command's dead pane, which is what lets the panel sweep it), `job` = a job-* session the daemon's terminal
|
|
12
|
+
// runner executes user-triggered flows in (capability adds, infra check), `process` = a managed background
|
|
13
|
+
// process riding a panel session (an extension's declared processes, dockerd), surfaced in the panel's
|
|
14
|
+
// background-processes popover with read-only log views, never as a killable tab; running is the actual
|
|
15
|
+
// process (a lingering shell after a crash reads false). A process row that maps to an installed extension's
|
|
16
|
+
// declared process carries extensionId+processName, the address for its /extensions start/stop routes. The
|
|
17
|
+
// `{name}` kill-route param is a bare string validated in the handler (a bad name is a BAD_REQUEST) since the
|
|
18
|
+
// same charset gates a `tmux kill-session -t` shell-out. The agent's BROWSER is deliberately NOT one of these
|
|
19
|
+
// kinds: a Chromium with its own tab strip is a surface in its own right, not a pane in the terminal panel, so
|
|
20
|
+
// it lists from /system/browsers with the pages it has open (BrowserSessionSchema below).
|
|
21
|
+
//
|
|
22
|
+
// `activityAt` (epoch ms of the session's last output) and `exitCode` (the LAST window's exit status, absent
|
|
23
|
+
// while that pane still lives) describe a session beyond "it exists": the panel's work popover orders its live
|
|
24
|
+
// rows by the one and dates them off it, and the daemon's retention sweep ages sessions out by the same clock.
|
|
25
|
+
// 0 is "tmux didn't say", treated as unknown by both, never as 1970.
|
|
26
|
+
export const TerminalSessionSchema = z.object({
|
|
27
|
+
name: z.string().describe("Its id, and what the close route takes."),
|
|
28
|
+
label: z.string().optional().describe("What to call it on screen."),
|
|
29
|
+
kind: z
|
|
30
|
+
.enum(["shell", "panel", "agent", "job", "process"])
|
|
31
|
+
.describe(
|
|
32
|
+
"What sort of thing it is: a terminal somebody opened, a repository's dev server, where an agent's commands run, a job the sandbox started, or a background process that is watched rather than typed into.",
|
|
33
|
+
),
|
|
34
|
+
running: z
|
|
35
|
+
.boolean()
|
|
36
|
+
.describe("Whether it is alive. A finished one-shot job leaves a dead shell behind, which reads as false and is how it gets swept up."),
|
|
37
|
+
activityAt: z.number().describe("When it last produced output, in milliseconds. Zero means it did not say, which is unknown rather than 1970."),
|
|
38
|
+
exitCode: z.number().optional().describe("How the last thing in it ended. Absent while that pane is still alive."),
|
|
39
|
+
/* WHAT THIS SESSION IS RUNNING RIGHT NOW, `pane_current_command` of its live pane, and ABSENT when it is
|
|
40
|
+
* sitting at its shell prompt. Not a second spelling of `running`: that field says whether a session is a
|
|
41
|
+
* live thing at all (and for a `web-*` shell it is unconditionally true, prompt or build), whereas this one
|
|
42
|
+
* says whether anything is HAPPENING in it. Killing a terminal is final, so the panel confirms on this
|
|
43
|
+
* field before its × ends a session that has work in it, and names the command in the question, see the
|
|
44
|
+
* daemon's `foreground` (system/system.routes.ts) for why a word rather than a flag. */
|
|
45
|
+
command: z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe(
|
|
49
|
+
"What is running in it right now. Absent when it is sitting at a prompt. Not a second spelling of whether it is alive: this says whether anything is happening, which is what a close button should ask about before it ends something.",
|
|
50
|
+
),
|
|
51
|
+
extensionId: z.string().optional().describe("Which extension declared this process, when one did."),
|
|
52
|
+
processName: z
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe("Which of that extension's processes it is, which together with the id above addresses its start and stop routes."),
|
|
56
|
+
// The agent has parked on a command that stopped for a PERSON, an OTP prompt, a security-key touch, a
|
|
57
|
+
// confirm it cannot answer, and is waiting at this session's live pane. `message` is its own account of
|
|
58
|
+
// what it needs. The terminal panel renders it as a banner over that session's tab (where the prompt the
|
|
59
|
+
// user has to answer already is) and its buttons settle the parked card through `POST /agent/reply` with
|
|
60
|
+
// `requestId`, exactly as the chat card does. The same shape as a browser's `help` below, on purpose: the
|
|
61
|
+
// two handovers differ in WHERE the person acts, not in what is being asked. Present only while open.
|
|
62
|
+
help: z
|
|
63
|
+
.object({
|
|
64
|
+
requestId: z.string().describe("What to send back when you answer, through the agent reply route."),
|
|
65
|
+
message: z.string().describe("What the agent needs, in its own words."),
|
|
66
|
+
requestedAt: z.number().describe("When it asked, in milliseconds."),
|
|
67
|
+
})
|
|
68
|
+
.optional()
|
|
69
|
+
.describe("The agent has stopped at something only a person can clear, and is waiting at this terminal. Present only while it is waiting."),
|
|
70
|
+
});
|
|
71
|
+
export const TerminalsListSchema = z.object({
|
|
72
|
+
sessions: z
|
|
73
|
+
.array(TerminalSessionSchema)
|
|
74
|
+
.describe("Every live surface the sandbox is holding, in one list, because the question they all answer is the same one."),
|
|
75
|
+
});
|
|
76
|
+
export type TerminalsList = z.infer<typeof TerminalsListSchema>;
|
|
77
|
+
export const TerminalNameParamSchema = z.object({ name: z.string().describe("Which terminal.") });
|
|
78
|
+
// One session's PANE HISTORY as plain text. This route exists because the browser cannot reach it any other
|
|
79
|
+
// way: a tmux client runs on the ALTERNATE screen, which has no scrollback of its own, so what the wheel moves
|
|
80
|
+
// through lives in tmux on the far side of the socket and never enters the xterm buffer the page could select.
|
|
81
|
+
// `lines` is how far back to ask for, tmux clamps it to the history it actually has, and `truncated` says the
|
|
82
|
+
// answer stopped at the request rather than at the beginning.
|
|
83
|
+
export const TerminalScrollbackQuerySchema = z.object({
|
|
84
|
+
name: z.string().describe("Which terminal."),
|
|
85
|
+
lines: z.coerce.number().min(1).max(100_000).default(20_000).describe("How far back to ask for. Clamped to the history that actually exists."),
|
|
86
|
+
});
|
|
87
|
+
export const TerminalScrollbackSchema = z.object({
|
|
88
|
+
name: z.string().describe("Which terminal this is from."),
|
|
89
|
+
// Oldest line first, wrapped lines rejoined so a copied URL or path comes back whole.
|
|
90
|
+
text: z.string().describe("The history, oldest line first, with wrapped lines rejoined so a copied address or path comes back whole."),
|
|
91
|
+
lines: z.number().describe("How many lines you got."),
|
|
92
|
+
truncated: z.boolean().describe("It stopped because you asked for that many, not because the history ran out."),
|
|
93
|
+
});
|
|
94
|
+
export type TerminalScrollback = z.infer<typeof TerminalScrollbackSchema>;
|
|
95
|
+
/* ---- browsers: the Chromium the agent drives through its @playwright/mcp tools ----
|
|
96
|
+
*
|
|
97
|
+
* A `browser-<sdk session>` Chromium (browser/browser-sessions.ts), watchable live over the
|
|
98
|
+
* /system/browser-view WebSocket. It lists apart from the terminals because it is shaped differently in the one
|
|
99
|
+
* way that decides a UI: a terminal is ONE stream of bytes, while a browser holds SEVERAL pages at once and the
|
|
100
|
+
* question "what is the agent looking at?" only has an answer if the wire carries all of them. So `pages` is the
|
|
101
|
+
* point of this schema, the view renders them as a tab strip and binds the screencast to whichever the user
|
|
102
|
+
* picks, and `active` is the one the agent itself last touched (what the view follows until the user says
|
|
103
|
+
* otherwise).
|
|
104
|
+
*
|
|
105
|
+
* `id` is opaque and minted per session, and it is what makes a tab survive a relist: it is stable for the life
|
|
106
|
+
* of the page, unlike its url (the agent navigates away) or its position (a closed tab renumbers the rest). */
|
|
107
|
+
export const BrowserPageSchema = z.object({
|
|
108
|
+
id: z
|
|
109
|
+
.string()
|
|
110
|
+
.describe(
|
|
111
|
+
"Stable for the life of the page, which is what lets a tab survive a refresh of this list. Its address changes as the agent navigates and its position changes when a sibling closes.",
|
|
112
|
+
),
|
|
113
|
+
// The page's own title. Absent mid-navigation, which is exactly when a tab still needs to render.
|
|
114
|
+
title: z.string().optional().describe("The page's title. Absent mid-navigation, which is exactly when a tab still has to be drawn."),
|
|
115
|
+
url: z.string().describe("Where it is."),
|
|
116
|
+
// The page the agent last drove, on a finished session, the one it ended on. Exactly one page has it.
|
|
117
|
+
active: z.boolean().describe("The one the agent last touched, or for a finished session, the one it ended on. Exactly one page has this."),
|
|
118
|
+
});
|
|
119
|
+
export const BrowserSessionSchema = z.object({
|
|
120
|
+
name: z.string().describe("Its id, and what the close route takes."),
|
|
121
|
+
// The pill's text: the active page's title, else its host, else which browser this is.
|
|
122
|
+
label: z.string().describe("What to call it on screen: the open page's title, or its site, or which browser this is."),
|
|
123
|
+
// Which MCP server drives it: `web` (the credential-free browser) or a logged-in capability's id, the
|
|
124
|
+
// difference between a throwaway page and one signed in as the user, which is worth saying out loud.
|
|
125
|
+
server: z
|
|
126
|
+
.string()
|
|
127
|
+
.describe(
|
|
128
|
+
"Which browser drives it: the credential-free one, or a signed-in account's. The difference between a throwaway page and one logged in as you, which is worth saying out loud.",
|
|
129
|
+
),
|
|
130
|
+
// False once that Chromium is gone (the turn ended, the agent closed it, it crashed). A finished session
|
|
131
|
+
// still lists for a while, with the pages it had, the record of where the agent went.
|
|
132
|
+
running: z
|
|
133
|
+
.boolean()
|
|
134
|
+
.describe("Whether it is still open. A closed one is listed for a while with the pages it had, as the record of where the agent went."),
|
|
135
|
+
activityAt: z.number().describe("When it last did anything, in milliseconds."),
|
|
136
|
+
// When that Chromium went away, for the "closed 20m ago" line a finished session leads with. Absent while
|
|
137
|
+
// running, which is the same fact as `running`, but the view needs the timestamp, not just the flag.
|
|
138
|
+
finishedAt: z.number().optional().describe("When it closed, in milliseconds. Absent while it is open."),
|
|
139
|
+
// The agent has hit something only a person can clear (a captcha, a password it does not hold, a phone
|
|
140
|
+
// check) and is PARKED on it: `message` is its own account of what it needs, in the user's language. The
|
|
141
|
+
// Browsers view renders it as a banner over the live stage, where "Take control" already is, and its
|
|
142
|
+
// buttons settle the parked card through `POST /agent/reply` with `requestId`, exactly as the chat card
|
|
143
|
+
// does; the field clears when the waiter settles, never by direct edit. Present only while open.
|
|
144
|
+
help: z
|
|
145
|
+
.object({
|
|
146
|
+
requestId: z.string().describe("What to send back when you answer, through the agent reply route."),
|
|
147
|
+
message: z.string().describe("What the agent needs, in its own words."),
|
|
148
|
+
requestedAt: z.number().describe("When it asked, in milliseconds."),
|
|
149
|
+
})
|
|
150
|
+
.optional()
|
|
151
|
+
.describe(
|
|
152
|
+
"The agent has hit something only a person can clear: a captcha, a password it does not hold, a check on your phone. Present only while it is waiting.",
|
|
153
|
+
),
|
|
154
|
+
pages: z
|
|
155
|
+
.array(BrowserPageSchema)
|
|
156
|
+
.describe("Every page it has open. A browser holds several at once, which is the reason it is listed apart from the terminals."),
|
|
157
|
+
});
|
|
158
|
+
export type BrowserPage = z.infer<typeof BrowserPageSchema>;
|
|
159
|
+
export type BrowserSession = z.infer<typeof BrowserSessionSchema>;
|
|
160
|
+
export const BrowsersListSchema = z.object({
|
|
161
|
+
sessions: z.array(BrowserSessionSchema).describe("Every browser the agents have running, open or recently closed."),
|
|
162
|
+
});
|
|
163
|
+
export type BrowsersList = z.infer<typeof BrowsersListSchema>;
|
|
164
|
+
export const BrowserNameParamSchema = z.object({ name: z.string().describe("Which browser.") });
|
|
165
|
+
/* ---- subagents: the agents an agent starts ----
|
|
166
|
+
*
|
|
167
|
+
* The third thing a turn spawns that the operator can be shown, after its shell and its browser, and the only
|
|
168
|
+
* one that is itself an agent. Two kinds land in this one list, because from outside they are the same fact
|
|
169
|
+
* (another agent, working, that you did not start):
|
|
170
|
+
* • `subagent`, the SDK's Agent/Task tool. The daemon learns of it from the SubagentStart/SubagentStop hooks
|
|
171
|
+
* and the task_* stream messages, joined on `toolUseId`.
|
|
172
|
+
* • `spawned`, a full agent the turn started through the daemon's own spawn door (children/children.ts), on
|
|
173
|
+
* ANY connected provider, Cursor's Composer, Codex, Gemini, another Claude. The daemon runs the child
|
|
174
|
+
* itself, so its whole life is reported by direct calls rather than reconstructed from hooks or stdout.
|
|
175
|
+
*
|
|
176
|
+
* `id` IS THE SPAWNING TOOL CALL'S id for an SDK child (the one key its meta file, its task messages and the
|
|
177
|
+
* client's `parentToolUseId` nesting all carry), and the child's own conversation id for a `spawned` one (the
|
|
178
|
+
* spawn door returns it, so both sides hold it). A card links to its subagent with the id it has, and the
|
|
179
|
+
* subagent points back at the card the same way. The ids the transcripts are actually READ with, the SDK's
|
|
180
|
+
* agent id, stay daemon-side, because no surface asks a question they answer.
|
|
181
|
+
*
|
|
182
|
+
* WHAT A KIND CHANGES, and it is only ever the live view: an SDK subagent has no process of its own to look
|
|
183
|
+
* at, so watching it means reading its transcript; a spawned child is a conversation of its own, so its live
|
|
184
|
+
* view is that conversation's stream. */
|
|
185
|
+
export const SubagentKindSchema = z.enum(["subagent", "spawned"]);
|
|
186
|
+
export type SubagentKind = z.infer<typeof SubagentKindSchema>;
|
|
187
|
+
// running/pending/blocked are live; the rest are terminal. Deliberately the SDK's own task vocabulary
|
|
188
|
+
// (SDKTaskUpdatedMessage.patch.status) rather than AgentStatus: this is not a fleet card's lifecycle (no
|
|
189
|
+
// draft/landed/conflict), and mapping the two would invent states neither side reports. `blocked` is the one
|
|
190
|
+
// addition the SDK never says: a spawned child's own question/permission/plan card raises it
|
|
191
|
+
// (children/children.ts), and it exists because "the child needs an answer" is the one live state a parent or
|
|
192
|
+
// an operator acts on differently from "the child is working".
|
|
193
|
+
export const SubagentStatusSchema = z.enum(["pending", "running", "blocked", "completed", "failed", "killed", "paused"]);
|
|
194
|
+
export type SubagentStatus = z.infer<typeof SubagentStatusSchema>;
|
|
195
|
+
/* WHETHER ANYTHING CHECKED WHAT THE HELPER DID, carried beside its report rather than left for the reader to
|
|
196
|
+
* assume. Computed from the helper's own tool calls, the files it edited against the checks that ran after
|
|
197
|
+
* them (the daemon's child-verification.ts), so it holds on every provider rather than only where the Claude
|
|
198
|
+
* hooks reach.
|
|
199
|
+
*
|
|
200
|
+
* The four states are deliberately not two. `verified` and `failing` each name the command that spoke, so a
|
|
201
|
+
* targeted test is never read as the suite; `unproven` is the one that matters most, work changed and nothing
|
|
202
|
+
* ran; and `no-code` says the helper edited nothing, which is the honest answer for a research helper and
|
|
203
|
+
* must not be rendered as approval. Absent ⇒ the daemon saw no tool calls from it at all. */
|
|
204
|
+
export const SubagentVerificationSchema = z.object({
|
|
205
|
+
state: z
|
|
206
|
+
.enum(["verified", "unproven", "failing", "no-code"])
|
|
207
|
+
.describe(
|
|
208
|
+
"Whether anything proved its work: a check passed after its last edit, it changed code and nothing checked it, a check ran and failed, or it changed no code at all.",
|
|
209
|
+
),
|
|
210
|
+
paths: z.array(z.string()).optional().describe("The code files it changed, most recent last. The first few; the record holds the rest."),
|
|
211
|
+
check: z
|
|
212
|
+
.string()
|
|
213
|
+
.optional()
|
|
214
|
+
.describe(
|
|
215
|
+
"The command that spoke: the one that cleared it, or the one that failed. Named rather than summarised, so a targeted test is not read as the whole suite.",
|
|
216
|
+
),
|
|
217
|
+
});
|
|
218
|
+
export type SubagentVerification = z.infer<typeof SubagentVerificationSchema>;
|
|
219
|
+
export const SubagentSessionSchema = z.object({
|
|
220
|
+
id: z
|
|
221
|
+
.string()
|
|
222
|
+
.describe(
|
|
223
|
+
"The id of the tool call that started it (an SDK child) or the child's own conversation id (a spawned one); either way both sides already hold it, so a card links to its helper with the id it has and the helper points back the same way.",
|
|
224
|
+
),
|
|
225
|
+
kind: SubagentKindSchema.describe(
|
|
226
|
+
"What sort of helper: one the runtime's own Task tool spawned in-process, or a full agent the daemon started for the turn. It changes only how you watch it.",
|
|
227
|
+
),
|
|
228
|
+
// The conversation whose turn spawned this, what the area groups its rows by, and the way back to the chat
|
|
229
|
+
// the card lives in.
|
|
230
|
+
conversationId: z.string().describe("The conversation whose turn started it, and the way back to the chat it belongs to."),
|
|
231
|
+
// What it is and what it was asked to do: the subagent type (`Explore`, `general-purpose`) or a spawned
|
|
232
|
+
// child's provider label, and the caller's one-line description. The area's row and the card's title read
|
|
233
|
+
// as `Explore · Locate claimIndexer definition`.
|
|
234
|
+
agentType: z.string().optional().describe("What kind of helper it is."),
|
|
235
|
+
description: z.string().optional().describe("What it was asked to do, in one line."),
|
|
236
|
+
model: z.string().optional().describe("Which model it runs on."),
|
|
237
|
+
// Which provider serves a `spawned` child (its AgentProvider id), so the row can wear the right logo. An
|
|
238
|
+
// SDK subagent implies its own: it runs on its parent's provider.
|
|
239
|
+
provider: z.string().optional().describe("Which provider serves it, for a helper spawned across providers."),
|
|
240
|
+
// How deep in the spawn tree (1 = spawned by the turn itself). From the SDK's meta.json; a subagent may
|
|
241
|
+
// itself delegate, and a flat list that cannot say so reads as though the turn started all of them.
|
|
242
|
+
spawnDepth: z
|
|
243
|
+
.number()
|
|
244
|
+
.optional()
|
|
245
|
+
.describe(
|
|
246
|
+
"How deep in the chain it sits, where one means the turn itself started it. A helper can start helpers, and a flat list that could not say so would read as though the turn started all of them.",
|
|
247
|
+
),
|
|
248
|
+
// Backgrounded: the parent went on working instead of waiting for it. This is the whole reason the list
|
|
249
|
+
// exists, a backgrounded child used to be invisible until its result landed, sometimes minutes later.
|
|
250
|
+
background: z
|
|
251
|
+
.boolean()
|
|
252
|
+
.optional()
|
|
253
|
+
.describe(
|
|
254
|
+
"The parent carried on working instead of waiting for it. This is the whole reason the list exists: such a helper used to be invisible until its result landed, sometimes minutes later.",
|
|
255
|
+
),
|
|
256
|
+
status: SubagentStatusSchema.describe(
|
|
257
|
+
"How it is going. Blocked means it needs an answer, which a parent and an operator act on differently from it simply working.",
|
|
258
|
+
),
|
|
259
|
+
startedAt: z.number().describe("When it started, in milliseconds."),
|
|
260
|
+
endedAt: z.number().optional().describe("When it finished, in milliseconds. Absent while it works."),
|
|
261
|
+
activityAt: z.number().describe("When it last did anything, in milliseconds."),
|
|
262
|
+
// What it has spent and done so far (task_progress). Tokens are the child's own, so a parent's cost line and
|
|
263
|
+
// the sum of its children's are two different true numbers.
|
|
264
|
+
tokens: z
|
|
265
|
+
.number()
|
|
266
|
+
.optional()
|
|
267
|
+
.describe("What it has spent. Its own, so a parent's cost and the sum of its helpers' are two different true numbers."),
|
|
268
|
+
toolUses: z.number().optional().describe("How many tools it has used."),
|
|
269
|
+
lastTool: z.string().optional().describe("The last one it reached for."),
|
|
270
|
+
// Its report, the last assistant message (SubagentStop) or the task summary. The answer to "what did it
|
|
271
|
+
// conclude?" without opening the transcript, which is the question a finished child is read for.
|
|
272
|
+
summary: z
|
|
273
|
+
.string()
|
|
274
|
+
.optional()
|
|
275
|
+
.describe("Its report: what it concluded, without opening its record. The question a finished helper gets read for."),
|
|
276
|
+
error: z.string().optional().describe("Why it failed, when it did."),
|
|
277
|
+
// Whether anything checked the work behind that report (SubagentVerificationSchema). Filled once it ends:
|
|
278
|
+
// a standing read while it is still working would be a verdict on a job half done.
|
|
279
|
+
verification: SubagentVerificationSchema.optional().describe("Whether anything proved the work its report describes."),
|
|
280
|
+
});
|
|
281
|
+
export type SubagentSession = z.infer<typeof SubagentSessionSchema>;
|
|
282
|
+
export const SubagentsListSchema = z.object({
|
|
283
|
+
sessions: z.array(SubagentSessionSchema).describe("Every helper this sandbox's conversations have started."),
|
|
284
|
+
});
|
|
285
|
+
export type SubagentsList = z.infer<typeof SubagentsListSchema>;
|
|
286
|
+
export const SubagentIdParamSchema = z.object({ id: z.string() });
|