@intentic/sandbox-contract 1.232.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 +7 -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 +40 -2
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +4 -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 +7 -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 +45 -2
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +10 -2
- 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 +31 -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 +124 -21
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +29 -7
- package/dist/definition.js.map +1 -1
- package/dist/events.d.ts +101 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +25 -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 +355 -103
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -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 +2 -2
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +2 -2
- package/dist/workspace-state.js.map +1 -1
- package/package.json +15 -4
- 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 +4 -13
- 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 +18 -2
- 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 +74 -10
- package/src/events.ts +84 -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 +60 -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 +3 -3
- package/src/workspace-state.ts +8 -13
- package/dist/schemas.d.ts +0 -9909
- package/dist/schemas.d.ts.map +0 -1
- package/dist/schemas.js +0 -4288
- package/dist/schemas.js.map +0 -1
- package/src/schemas.ts +0 -10090
package/src/events.ts
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
RateLimitInfoSchema,
|
|
11
|
-
ShareDetailSchema,
|
|
12
|
-
SubagentKindSchema,
|
|
13
|
-
SubagentStatusSchema,
|
|
14
|
-
UsageWindowSchema,
|
|
15
|
-
} from "./schemas.js";
|
|
2
|
+
import { AgentProviderSchema, PermissionModeSchema } from "./schemas/agent.js";
|
|
3
|
+
import { AgentSummarySchema, LandConflictSchema } from "./schemas/agents.js";
|
|
4
|
+
import { RateLimitInfoSchema } from "./schemas/claude-gate.js";
|
|
5
|
+
import { FastModeStateSchema } from "./schemas/fast-mode.js";
|
|
6
|
+
import { AgentReplySchema, UsageWindowSchema } from "./schemas/plan-limits.js";
|
|
7
|
+
import { ShareDetailSchema } from "./schemas/share.js";
|
|
8
|
+
import { MemberRoleSchema } from "./schemas/shared.js";
|
|
9
|
+
import { SubagentKindSchema, SubagentStatusSchema, SubagentVerificationSchema } from "./schemas/terminal.js";
|
|
16
10
|
|
|
17
11
|
// The wire shapes streamed from the daemon's event-iterator procedures. This is their canonical home: the
|
|
18
12
|
// daemon yields them and the browser client consumes them from the same schema, so the two can't drift (they
|
|
@@ -35,6 +29,29 @@ export const AskQuestionSchema = z.object({
|
|
|
35
29
|
});
|
|
36
30
|
export type AskQuestion = z.infer<typeof AskQuestionSchema>;
|
|
37
31
|
|
|
32
|
+
/* THE PROGRAM A COMMAND CARD IS HOLDING, as the thing it is rather than as prose about it.
|
|
33
|
+
*
|
|
34
|
+
* It used to ride in `description`, the field every other permission ask fills with a sentence, which left the
|
|
35
|
+
* card with no way to know it was holding four hundred characters of shell: it rendered them as a paragraph,
|
|
36
|
+
* wrapped mid-flag, and the fragment that caused the hold was somewhere in the middle of it.
|
|
37
|
+
*
|
|
38
|
+
* `spans` is the gate's own evidence, computed by the classifier at the moment the rule fired (contract's
|
|
39
|
+
* command-classes.ts, matchCommand) and carried rather than re-derived: a browser that re-ran the patterns
|
|
40
|
+
* would be a second classifier, and the day the two disagreed the card would be marking a fragment that is not
|
|
41
|
+
* the one anybody was held for. Offsets are into `text` AFTER truncation, so they are always paintable.
|
|
42
|
+
*
|
|
43
|
+
* `language` is a Shiki grammar id, and the two are the two execution backends the gate reads (command-gate's
|
|
44
|
+
* EXECUTION_SOURCES): a shell line and a script. */
|
|
45
|
+
export const ProgramAskSchema = z.object({
|
|
46
|
+
text: z.string().describe("What would run."),
|
|
47
|
+
language: z.enum(["bash", "javascript"]).describe("Which of the two backends it is written for, named as the grammar that colours it."),
|
|
48
|
+
truncated: z.boolean().describe("Whether this is the head of a longer program, so the card can say so instead of ending mid-word."),
|
|
49
|
+
spans: z
|
|
50
|
+
.array(z.object({ start: z.number().int().nonnegative(), end: z.number().int().nonnegative() }))
|
|
51
|
+
.describe("Which fragments of the text put it in the class that held it. Offsets into text, in order, never overlapping."),
|
|
52
|
+
});
|
|
53
|
+
export type ProgramAsk = z.infer<typeof ProgramAskSchema>;
|
|
54
|
+
|
|
38
55
|
// One per-tool permission prompt (the SDK's canUseTool callback, surfaced as a card). The daemon passes the
|
|
39
56
|
// bridge's own rendered strings through rather than re-deriving them, so the prompt reads exactly as Claude
|
|
40
57
|
// Code words it. `alwaysLabel` is present only when the SDK offered rules to persist, without it the card
|
|
@@ -56,6 +73,15 @@ export const PermissionAskSchema = z.object({
|
|
|
56
73
|
.describe(
|
|
57
74
|
"The wording for an always-allow answer. Present only when there is something an always could actually remember; without it the only answers are once and no.",
|
|
58
75
|
),
|
|
76
|
+
program: ProgramAskSchema.optional().describe(
|
|
77
|
+
"The program this card is holding, when the card is about one. Present on a command gate's card and absent on every other permission ask.",
|
|
78
|
+
),
|
|
79
|
+
explain: z
|
|
80
|
+
.string()
|
|
81
|
+
.optional()
|
|
82
|
+
.describe(
|
|
83
|
+
"One plain sentence saying what the program does and why the agent wants it. Written by the quick model, never by the agent being gated, and only when the owner switched the setting on.",
|
|
84
|
+
),
|
|
59
85
|
});
|
|
60
86
|
export type PermissionAsk = z.infer<typeof PermissionAskSchema>;
|
|
61
87
|
|
|
@@ -360,8 +386,9 @@ export const RestoredMessageSchema = z.object({
|
|
|
360
386
|
thinking: z.string().optional().describe("What the agent was reasoning about."),
|
|
361
387
|
tools: z.array(RestoredToolCallSchema).optional().describe("The tool calls this part of the turn made."),
|
|
362
388
|
/* What the daemon added to this turn's message (user rows only), the same notes the live `preamble` frame
|
|
363
|
-
* carries
|
|
364
|
-
*
|
|
389
|
+
* carries. A daemon-recorded turn takes them straight off that frame in its own log, typed end to end
|
|
390
|
+
* (sessions/turn-transcript.ts); only a conversation adopted from a provider's session store recovers them
|
|
391
|
+
* by parsing the composed prompt kept there, the one store the daemon never wrote typed.
|
|
365
392
|
*
|
|
366
393
|
* On the message rather than as a row of its own, and that matters twice: they ARE part of what was
|
|
367
394
|
* sent, and a record row per turn preamble would break the one-row-per-bubble correspondence a branch counts
|
|
@@ -489,8 +516,9 @@ export type ParkedCard = z.infer<typeof ParkedCardSchema>;
|
|
|
489
516
|
// ~40 SDKMessage types down to this union: high-value block types get a dedicated frame
|
|
490
517
|
// (delta/thinking/tool_call/tool_call_update/todos/usage/rate_limit_info/account_usage/context_usage/init/compact); any SDK message
|
|
491
518
|
// without a UI mapping is dropped. `plan`/`question`/`permission` pause the turn until the user answers on the
|
|
492
|
-
// `POST /agent/reply` side channel, and `resolved` releases the one it names; `
|
|
493
|
-
// permission
|
|
519
|
+
// `POST /agent/reply` side channel, and `resolved` releases the one it names; `permission_note` adds a sentence
|
|
520
|
+
// to a permission card already on screen without settling it; `mode` reports the live permission posture as the
|
|
521
|
+
// agent changes it.
|
|
494
522
|
// `parentToolUseId` tags frames produced inside a subagent (Task tool); `subagent`/`subagent_update` report the
|
|
495
523
|
// subagent itself, keyed by the same tool_use id those tagged frames carry.
|
|
496
524
|
export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
@@ -554,12 +582,14 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
|
554
582
|
* way to find out what those instructions said. This frame is the fix: the note text verbatim, one entry per
|
|
555
583
|
* note, rendered collapsed so it costs a click rather than a scroll.
|
|
556
584
|
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
585
|
+
* Emitted from the TYPED notes the wire prompt is serialized from at the same point (turn-preamble.ts,
|
|
586
|
+
* composeWirePrompt), so the disclosure and what the model receives cannot drift: a note is in both or in
|
|
587
|
+
* neither, and a note nobody thought to title cannot reach the wire unlabelled.
|
|
559
588
|
*
|
|
560
589
|
* ONE MOMENT, always: the notes went in front of the user's own message before the turn started, so they hang
|
|
561
|
-
* off that message and are stored on it,
|
|
562
|
-
*
|
|
590
|
+
* off that message and are stored on it, the transcript fold reads this very frame out of the turn's own
|
|
591
|
+
* frame log (sessions/turn-transcript.ts), which is how a reopened tab still has them. Nothing is injected
|
|
592
|
+
* into a RUNNING turn, the rebase taken while a card sat waiting was the only thing that ever was, and it no
|
|
563
593
|
* longer says anything to the model at all (agent/turn-preamble.ts). */
|
|
564
594
|
z.object({ kind: z.literal("preamble"), notes: z.array(TurnNoteSchema) }),
|
|
565
595
|
// The SDK's init handshake; carries the model it actually resolved for the turn.
|
|
@@ -666,6 +696,9 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
|
666
696
|
lastTool: z.string().optional(),
|
|
667
697
|
summary: z.string().optional(),
|
|
668
698
|
error: z.string().optional(),
|
|
699
|
+
// Whether anything checked the work the report describes (SubagentVerificationSchema). Rides the frame
|
|
700
|
+
// that ENDS the child, beside the report itself, so the card carries both at once.
|
|
701
|
+
verification: SubagentVerificationSchema.optional(),
|
|
669
702
|
}),
|
|
670
703
|
z.object({ kind: z.literal("todos"), items: z.array(TodoItemSchema) }),
|
|
671
704
|
// The provider's own slash commands (ACP available_commands_update), replaced whole each time, the
|
|
@@ -875,6 +908,19 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
|
875
908
|
// already moved on. It rides verbatim, exactly as the client POSTed it; absent, nobody answered (the turn
|
|
876
909
|
// was stopped, or died under the card), which is not a decision and must not replay as one.
|
|
877
910
|
z.object({ kind: z.literal("resolved"), requestId: z.string(), reply: AgentReplySchema.optional() }),
|
|
911
|
+
/* A LATE SENTENCE FOR A CARD ALREADY ON SCREEN: the quick model's plain-language reading of a held command,
|
|
912
|
+
* landing on the permission card named by `requestId` (see PermissionAsk.explain).
|
|
913
|
+
*
|
|
914
|
+
* A frame of its own rather than a field on the card, because the card MUST NOT WAIT FOR IT. This is a
|
|
915
|
+
* safety prompt and the turn is parked on it; a quick-model rung can take tens of seconds before the chain
|
|
916
|
+
* steps down (agent/quick-model.ts measured one at 58), and holding the card back for that reads exactly
|
|
917
|
+
* like the agent freezing, which is the failure the explanation was meant to prevent rather than cause. So
|
|
918
|
+
* the card goes out complete and unexplained, and this arrives if and when it does. Same shape and the same
|
|
919
|
+
* reason as `service_event`, which streams a running service's status onto an offer already rendered.
|
|
920
|
+
*
|
|
921
|
+
* Never arrives at all when the setting is off, when nothing is connected to answer, or when the user
|
|
922
|
+
* settles the card first, and none of those change what the card says. */
|
|
923
|
+
z.object({ kind: z.literal("permission_note"), requestId: z.string(), explain: z.string() }),
|
|
878
924
|
// The turn's permission mode, whenever it changes, the user's pick at turn start, then every move the
|
|
879
925
|
// AGENT makes on its own (EnterPlanMode on a request that needs thinking through, ExitPlanMode once the
|
|
880
926
|
// user approves). The composer's mode selector follows this, so the UI never lies about the live posture.
|
|
@@ -955,6 +1001,22 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
|
955
1001
|
* context-window-too-small does: they never reached a provider, and losing them to a
|
|
956
1002
|
* capacity fact the user did not cause would be ours to answer for. */
|
|
957
1003
|
"sandbox-memory-low",
|
|
1004
|
+
/* THE LOOP RAN OUT OF ITERATIONS, not out of work: the runtime hit its own turn ceiling and
|
|
1005
|
+
* stopped. Nothing failed, nothing is disconnected and nothing is spent, which is exactly why
|
|
1006
|
+
* it needs a code of its own rather than a sentence: it is the one ending that LOOKS like a
|
|
1007
|
+
* finished turn from the outside, and a ledger that filed it as an ordinary error told a
|
|
1008
|
+
* reader nothing they could act on.
|
|
1009
|
+
*
|
|
1010
|
+
* The recovery is the user's, not the daemon's: whatever the turn was doing is half done, and
|
|
1011
|
+
* re-running it blind would either redo the finished half or resume work nobody looked at. */
|
|
1012
|
+
"turn-cap",
|
|
1013
|
+
/* THE HARNESS ENDED THE TURN WITHOUT SUCCEEDING and did not say why in terms anything here
|
|
1014
|
+
* models: an internal execution error, or a result subtype a later vendor build invented. The
|
|
1015
|
+
* sentence carries the subtype verbatim, because that word is the only thing separating two of
|
|
1016
|
+
* these, and a code that meant "one of several unrelated things" would be worse than none. It
|
|
1017
|
+
* is a real classification all the same: it says the failure came from the LOOP rather than
|
|
1018
|
+
* from the provider, the credential or the request, which rules out every recovery next door. */
|
|
1019
|
+
"harness-incomplete",
|
|
958
1020
|
])
|
|
959
1021
|
.optional(),
|
|
960
1022
|
// rate_limit only: when the exhausted window reopens (epoch seconds, from the stream's own
|
package/src/fast-tier.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compareCheapestFirst, isCheaperRung } from "./model-order.js";
|
|
2
2
|
import { parsePinned } from "./quick-model.js";
|
|
3
|
-
import type { AgentProvider } from "./schemas.js";
|
|
3
|
+
import type { AgentProvider } from "./schemas/agent.js";
|
|
4
4
|
|
|
5
5
|
/* WHICH MODEL A DOWNGRADED TURN ACTUALLY RUNS ON, the second half of automatic tier selection.
|
|
6
6
|
* prompt-complexity.ts decides a turn COULD be cheaper; this decides whether there is anything cheaper to put
|
package/src/history-state.ts
CHANGED
|
@@ -128,6 +128,11 @@ export const HISTORY_STATE_FILES: readonly StateFile[] = [
|
|
|
128
128
|
{ path: "sync-enrollments.json", portability: "identity", note: "Re-pair desktop sync from the Sync tab." },
|
|
129
129
|
{ path: "sync-pair-consumed.json", portability: "identity" },
|
|
130
130
|
{ path: "host-enrollments.json", portability: "identity" },
|
|
131
|
+
/* A connected BROWSER's enrollment (webext/webext-store.ts). Identity for the hosts file's reason and one
|
|
132
|
+
* more of its own: the token admits a socket into somebody's signed-in browser, and that browser was paired
|
|
133
|
+
* with THIS sandbox — carried into another one it would either be dead weight or, worse, a second sandbox
|
|
134
|
+
* holding a live key to a browser its owner never connected it to. Re-pairing is a code and one click. */
|
|
135
|
+
{ path: "webext-enrollments.json", portability: "identity", note: "Pair your browser again from its card: the extension is still installed." },
|
|
131
136
|
// The burn list for setup-time computer pairings. Identity, like sync's beside it, and for a sharper reason:
|
|
132
137
|
// carrying it into another sandbox would mark that sandbox's own fresh pairing as already spent.
|
|
133
138
|
{ path: "host-pair-consumed.json", portability: "identity" },
|
package/src/host-protocol.ts
CHANGED
|
@@ -24,7 +24,7 @@ export const HostHelloSchema = z.object({
|
|
|
24
24
|
* onto one-shot tickets, auth/ws-tickets.ts). A frame is body, not URL, so it is logged nowhere. Until this
|
|
25
25
|
* arrives the socket is anonymous and short-lived: the daemon closes it in seconds if it never does. */
|
|
26
26
|
token: z.string(),
|
|
27
|
-
// The @intentic/
|
|
27
|
+
// The @intentic/machine build the machine is running, surfaced per machine so an old binary is visible rather
|
|
28
28
|
// than mysteriously missing a tool. What the machine IS (`describe`) is not here: it is pulled over the
|
|
29
29
|
// typed link a moment later, so there is one definition of those facts rather than two.
|
|
30
30
|
version: z.string(),
|
package/src/hostnames.test.ts
CHANGED
|
@@ -25,8 +25,8 @@ test("preview and port hostnames round-trip through their Host-header parsers",
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
test("the two schemes never bleed into each other, and stray/wrong-id hosts parse to nothing", () => {
|
|
28
|
-
expect(portSlotFromHost(
|
|
29
|
-
expect(panelFromHost(
|
|
28
|
+
expect(portSlotFromHost(`preview-app-${ID}.example.com`, ID)).toBeUndefined();
|
|
29
|
+
expect(panelFromHost(`port-a-${ID}.example.com`, ID)).toBeUndefined();
|
|
30
30
|
expect(panelFromHost("app.example.com", ID)).toBeUndefined();
|
|
31
31
|
expect(panelFromHost(`preview-app-000000000000.example.com`, ID)).toBeUndefined();
|
|
32
32
|
expect(portSlotFromHost(`port-a-000000000000.example.com`, ID)).toBeUndefined();
|
package/src/index.ts
CHANGED
|
@@ -59,6 +59,9 @@ export { historyContract } from "./contracts/history.contract.js";
|
|
|
59
59
|
/* Deliberately NOT part of `sandboxContract` below: that map is the daemon's own HTTP surface, and this one is
|
|
60
60
|
* spoken the other way round, over a connected computer's WebSocket, with the MACHINE implementing it. */
|
|
61
61
|
export { hostContract } from "./contracts/host.contract.js";
|
|
62
|
+
// The same inversion again, one layer in: spoken over the socket a BROWSER EXTENSION opened, with the
|
|
63
|
+
// extension implementing it (contracts/webext.contract.ts).
|
|
64
|
+
export { webextContract } from "./contracts/webext.contract.js";
|
|
62
65
|
// Same inversion, other direction of trust: spoken over a RUNNER's WebSocket, with the runner implementing it.
|
|
63
66
|
export { runnerContract } from "./contracts/runner.contract.js";
|
|
64
67
|
export { intenticContract } from "./contracts/intentic.contract.js";
|
|
@@ -104,11 +107,14 @@ export * from "./history-state.js";
|
|
|
104
107
|
export * from "./agent-catalog.js";
|
|
105
108
|
export * from "./agent-run-model.js";
|
|
106
109
|
export * from "./capability-env.js";
|
|
110
|
+
export * from "./command-classes.js";
|
|
107
111
|
export * from "./capability-secrets.js";
|
|
108
112
|
export * from "./conversation-ids.js";
|
|
109
113
|
export * from "./documents.js";
|
|
110
114
|
export * from "./fast-tier.js";
|
|
111
115
|
export * from "./host-protocol.js";
|
|
116
|
+
export * from "./webext-protocol.js";
|
|
117
|
+
export * from "./webext-links.js";
|
|
112
118
|
export * from "./runner-protocol.js";
|
|
113
119
|
export * from "./listener-protocol.js";
|
|
114
120
|
export * from "./hostnames.js";
|
|
@@ -118,7 +124,60 @@ export * from "./prompt-complexity.js";
|
|
|
118
124
|
export * from "./quick-model.js";
|
|
119
125
|
export * from "./output-fields.js";
|
|
120
126
|
export * from "./publish-drafts.js";
|
|
121
|
-
|
|
127
|
+
/* The wire shapes, one module per subject area, mirroring `contracts/` above: every request and response the
|
|
128
|
+
* daemon speaks is declared in exactly one of them. Inputs that carry a `{param}` in their route path (repo /
|
|
129
|
+
* id / name) merge the path param into the same flat object, oRPC fills the path placeholder from the matching
|
|
130
|
+
* key and routes the rest to the body (POST/PUT) or query (GET).
|
|
131
|
+
*
|
|
132
|
+
* `schemas/internal.ts` is deliberately absent: it holds the id and ref primitives these modules are written
|
|
133
|
+
* in, which are vocabulary rather than shapes either side of the wire sends. */
|
|
134
|
+
export * from "./schemas/activity.js";
|
|
135
|
+
export * from "./schemas/agent.js";
|
|
136
|
+
export * from "./schemas/agents.js";
|
|
137
|
+
export * from "./schemas/automations.js";
|
|
138
|
+
export * from "./schemas/capabilities.js";
|
|
139
|
+
export * from "./schemas/ci.js";
|
|
140
|
+
export * from "./schemas/claude-gate.js";
|
|
141
|
+
export * from "./schemas/codebase-health.js";
|
|
142
|
+
export * from "./schemas/computers.js";
|
|
143
|
+
export * from "./schemas/drafts.js";
|
|
144
|
+
export * from "./schemas/environment.js";
|
|
145
|
+
export * from "./schemas/exit.js";
|
|
146
|
+
export * from "./schemas/extension-updates.js";
|
|
147
|
+
export * from "./schemas/fast-mode.js";
|
|
148
|
+
export * from "./schemas/git.js";
|
|
149
|
+
export * from "./schemas/git-history.js";
|
|
150
|
+
export * from "./schemas/history.js";
|
|
151
|
+
export * from "./schemas/hosts.js";
|
|
152
|
+
export * from "./schemas/intentic.js";
|
|
153
|
+
export * from "./schemas/inventory.js";
|
|
154
|
+
export * from "./schemas/logs.js";
|
|
155
|
+
export * from "./schemas/loops.js";
|
|
156
|
+
export * from "./schemas/maintenance.js";
|
|
157
|
+
export * from "./schemas/marketplace.js";
|
|
158
|
+
export * from "./schemas/panels.js";
|
|
159
|
+
export * from "./schemas/personas.js";
|
|
160
|
+
export * from "./schemas/plan-limits.js";
|
|
161
|
+
export * from "./schemas/ports.js";
|
|
162
|
+
export * from "./schemas/provider-oauth.js";
|
|
163
|
+
export * from "./schemas/provider-subscriptions.js";
|
|
164
|
+
export * from "./schemas/public.js";
|
|
165
|
+
export * from "./schemas/push.js";
|
|
166
|
+
export * from "./schemas/secrets.js";
|
|
167
|
+
export * from "./schemas/sessions.js";
|
|
168
|
+
export * from "./schemas/settings.js";
|
|
169
|
+
export * from "./schemas/share.js";
|
|
170
|
+
export * from "./schemas/shared.js";
|
|
171
|
+
export * from "./schemas/system.js";
|
|
172
|
+
export * from "./schemas/terminal.js";
|
|
173
|
+
export * from "./schemas/usage.js";
|
|
174
|
+
export * from "./schemas/vpn.js";
|
|
175
|
+
export * from "./schemas/webext.js";
|
|
176
|
+
export * from "./schemas/workflows.js";
|
|
177
|
+
export * from "./schemas/workspace-repos.js";
|
|
178
|
+
export * from "./schemas/workspace-search.js";
|
|
179
|
+
export * from "./schemas/workspace-setup.js";
|
|
180
|
+
export * from "./schemas/workspace-tree.js";
|
|
122
181
|
export * from "./definition.js";
|
|
123
182
|
export * from "./search-globs.js";
|
|
124
183
|
export * from "./starter.js";
|
package/src/listener-protocol.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { ActivityStatusSchema } from "./schemas.js";
|
|
2
|
+
import { ActivityStatusSchema } from "./schemas/activity.js";
|
|
3
3
|
|
|
4
4
|
/* The wire between the daemon and an extension's realtime-listener GATEWAY process (ext-discord, ext-slack,
|
|
5
5
|
* ext-telegram, ext-whatsapp, ext-imap): the four provider-scoped routes app.ts mounts under
|
package/src/quick-model.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ACCESS_COST, accessFor, modelsFor, PROVIDERS } from "./agent-catalog.js";
|
|
2
2
|
import { compareCheapestFirst, familyOf, tierRankOf } from "./model-order.js";
|
|
3
|
-
import type { AgentProvider } from "./schemas.js";
|
|
3
|
+
import type { AgentProvider } from "./schemas/agent.js";
|
|
4
4
|
|
|
5
5
|
/* THE QUICK MODEL, the cheap, fast model a small automatic job spends instead of the frontier model the chat
|
|
6
6
|
* runs on. Today that is the commit message written when an agent's work lands; anything else of that shape (a
|
package/src/runner-protocol.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { DefinitionActionSchema } from "./definition-action.js";
|
|
2
3
|
|
|
3
4
|
/* THE RUNNER LINK'S EDGES: the handshake on /system/runners/connect, the env a runner boots with, and the
|
|
4
5
|
* placement value a turn request carries. The procedures spoken over the link once it exists live in
|
|
@@ -30,6 +31,13 @@ export const RunnerHelloSchema = z.object({
|
|
|
30
31
|
image: z.string(),
|
|
31
32
|
channel: z.string().optional(),
|
|
32
33
|
overlayHash: z.string().optional(),
|
|
34
|
+
/* The runner's DECLARED SHAPE, as the definition format spells it (definition.ts): a sandbox.toml whose
|
|
35
|
+
* only populated section is settings, because that is all a runner declares — capabilities and secrets
|
|
36
|
+
* never travel to one, and its repos are a mirror of the parent's git rather than clones with remotes.
|
|
37
|
+
* The parent diffs this against its own settings to itemize drift (a stale toolchain is a rebuild; a
|
|
38
|
+
* drifted setting is one applyDefinition call over this same socket), so parity stops being a bare
|
|
39
|
+
* "outdated" and becomes lines naming what differs. Absent on an image too old to derive one. */
|
|
40
|
+
definitionToml: z.string().optional(),
|
|
33
41
|
});
|
|
34
42
|
export type RunnerHello = z.infer<typeof RunnerHelloSchema>;
|
|
35
43
|
|
|
@@ -44,7 +52,8 @@ export const runnerEnrollUrl = (parentUrl: string): string => `${parentUrl.repla
|
|
|
44
52
|
* parent serves from its real git dirs (<historyRoot>/gits/<encoded id>), authenticated by the runner's own
|
|
45
53
|
* token as a bearer. One builder because three parties spell it: the parent's route, the runner's sync, and
|
|
46
54
|
* anyone debugging with a hand-typed clone. */
|
|
47
|
-
export const runnerGitUrl = (parentUrl: string, repo: string): string =>
|
|
55
|
+
export const runnerGitUrl = (parentUrl: string, repo: string): string =>
|
|
56
|
+
`${parentUrl.replace(/\/$/, "")}/system/runners/git/${encodeURIComponent(repo)}`;
|
|
48
57
|
|
|
49
58
|
/* Where a runner's push LANDS in the parent's git dirs. Never refs/heads/agent/<id> directly: that branch is
|
|
50
59
|
* checked out in the parent's mirror worktree, and git itself refuses updating a checked-out ref, which is a
|
|
@@ -52,6 +61,12 @@ export const runnerGitUrl = (parentUrl: string, repo: string): string => `${pare
|
|
|
52
61
|
* the mirror worktree to this ref, which advances the checked-out branch through the door git sanctions. */
|
|
53
62
|
export const runnerIncomingRef = (conversationId: string): string => `refs/runner-incoming/${conversationId}`;
|
|
54
63
|
|
|
64
|
+
/* THE CONTAINER A RUNNER'S NAME MEANS on the machine holding it, which is how the update and rebuild flows
|
|
65
|
+
* address it. The prefix is `ic`'s own (runner.rs SLUG_PREFIX) and the two must stay identical: a mismatch
|
|
66
|
+
* does not fail loudly, it sends an update at a container that does not exist and reports "no such sandbox"
|
|
67
|
+
* about a runner sitting right there in the list. */
|
|
68
|
+
export const runnerSlug = (name: string): string => `runner-${name}`;
|
|
69
|
+
|
|
55
70
|
/* THE CREDENTIAL DOORS: a runner's turns spend the ORIGIN sandbox's model providers, never accounts of their
|
|
56
71
|
* own. The shape is a service, not a sync: the parent resolves each turn's credential with the same code its
|
|
57
72
|
* local turns use and answers with the least that travels — an access token minted for the turn, or a route.
|
|
@@ -128,10 +143,20 @@ export const RunnerFactsSchema = z.object({
|
|
|
128
143
|
});
|
|
129
144
|
export type RunnerFacts = z.infer<typeof RunnerFactsSchema>;
|
|
130
145
|
|
|
146
|
+
/* WHETHER IT IS RUNNING WHAT THIS SANDBOX IS RUNNING (§7 of the design): `current` matches on image, channel
|
|
147
|
+
* and approved overlay; `outdated` differs on one of them and gets the update button; `unknown` is a runner
|
|
148
|
+
* that has never connected, or a parent that cannot name its own image (a dev daemon), where a warning would
|
|
149
|
+
* be one nobody can act on. Reported, never enforced: an outdated runner still runs turns. */
|
|
150
|
+
export const RunnerParitySchema = z.enum(["current", "outdated", "unknown"]);
|
|
151
|
+
export type RunnerParity = z.infer<typeof RunnerParitySchema>;
|
|
152
|
+
|
|
131
153
|
// One runner as the owner's views list it: enrolled state plus whatever the hub knows right now, the
|
|
132
154
|
// HostSummary shape retold for a runner (no platform/scopes, parity instead).
|
|
133
155
|
export const RunnerSummarySchema = z.object({
|
|
134
156
|
id: z.string(),
|
|
157
|
+
// The connected computer holding it, when this sandbox is what asked for it (the Computers view's create
|
|
158
|
+
// flow). Absent for one started by hand on a machine, which this sandbox can dispatch to but not manage.
|
|
159
|
+
host: z.string().optional(),
|
|
135
160
|
online: z.boolean(),
|
|
136
161
|
version: z.string().optional(),
|
|
137
162
|
image: z.string().optional(),
|
|
@@ -139,6 +164,14 @@ export const RunnerSummarySchema = z.object({
|
|
|
139
164
|
overlayHash: z.string().optional(),
|
|
140
165
|
facts: RunnerFactsSchema.optional(),
|
|
141
166
|
lastSeen: z.number().optional(),
|
|
167
|
+
// Computed by the daemon (runners/runner-parity.ts) rather than by each surface, so the badge on a row and
|
|
168
|
+
// the note in the placement picker cannot disagree about the same runner.
|
|
169
|
+
parity: RunnerParitySchema,
|
|
170
|
+
/* Where the runner's environment stands against this sandbox's, one line per difference (the definition
|
|
171
|
+
* surface's drift unit, computed parent-side from the hello's definitionToml plus the overlay hashes).
|
|
172
|
+
* Absent when the runner never said, empty when they agree. Lines whose subject is a Setting are fixable
|
|
173
|
+
* over the live link (the sync door); an overlay line takes a rebuild. */
|
|
174
|
+
drift: z.array(DefinitionActionSchema).optional(),
|
|
142
175
|
});
|
|
143
176
|
export type RunnerSummary = z.infer<typeof RunnerSummarySchema>;
|
|
144
177
|
|
|
@@ -202,8 +235,5 @@ export type RunnerTurn = z.infer<typeof RunnerTurnSchema>;
|
|
|
202
235
|
* client sends them. `runner` implies isolation, a remote conversation is always branch-anchored, because its
|
|
203
236
|
* branch is the unit that moves between machines. Absent means local, which is why this is optional
|
|
204
237
|
* everywhere: the default costs nothing to anyone who never uses it. */
|
|
205
|
-
export const AgentPlacementSchema = z.union([
|
|
206
|
-
z.object({ kind: z.literal("local") }),
|
|
207
|
-
z.object({ kind: z.literal("runner"), id: z.string().min(1) }),
|
|
208
|
-
]);
|
|
238
|
+
export const AgentPlacementSchema = z.union([z.object({ kind: z.literal("local") }), z.object({ kind: z.literal("runner"), id: z.string().min(1) })]);
|
|
209
239
|
export type AgentPlacement = z.infer<typeof AgentPlacementSchema>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// activity: the activity audit log (historyRoot/activity.jsonl)
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { AgentOriginSchema } from "./agent.js";
|
|
4
|
+
// One provider-agnostic event per agent↔provider interaction, appended by the daemon only (never the agent,
|
|
5
|
+
// the log lives under historyRoot, outside /work, so the agent can't read or rewrite its own trail). Discord
|
|
6
|
+
// is the first source; other cli providers reuse the same shape.
|
|
7
|
+
|
|
8
|
+
export const ActivityEventSchema = z.object({
|
|
9
|
+
id: z.string().describe("The entry's own id."),
|
|
10
|
+
// Epoch ms; also the paging cursor.
|
|
11
|
+
at: z.number().describe("When it happened, in milliseconds. Also what you page by."),
|
|
12
|
+
// "discord", …; absent on provider-less system events (a cron automation.run).
|
|
13
|
+
provider: z.string().optional().describe("Which outside service, when one was involved. Absent for the sandbox's own events."),
|
|
14
|
+
// Which provider account handled the turn, the attribution key for per-account usage totals. Absent on
|
|
15
|
+
// provider-less events and turns that ran on the provider's default account.
|
|
16
|
+
account: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("Which account handled it. Absent for the sandbox's own events and for work run on a provider's default."),
|
|
20
|
+
direction: z.enum(["in", "out", "system"]).describe("Whether something arrived, something went out, or the sandbox did it to itself."),
|
|
21
|
+
// in: message.received | voice_utterance.received | voice_transcript.received
|
|
22
|
+
// out: message.send | reaction.add | messages.read | api.call (unclassified provider endpoint)
|
|
23
|
+
// system: gateway.login_failed | dispatch.failed | voice.session_started | voice.session_ended | automation.run
|
|
24
|
+
// | turn.started | turn.plan | turn.error | turn.completed (agent turn lifecycle; provider = claude/codex)
|
|
25
|
+
// | rule.blocked_push | rule.held_work | rule.continued_turn (a rule DID something, see RuleSchema.
|
|
26
|
+
// Only the three outcomes a person would otherwise have no explanation for: a push that did not
|
|
27
|
+
// go, work that did not arrive, a turn that did not end. A rule that ran and passed says nothing,
|
|
28
|
+
// because a feed that logs every green check is one the eye learns to skip.)
|
|
29
|
+
type: z
|
|
30
|
+
.string()
|
|
31
|
+
.describe(
|
|
32
|
+
"Exactly what happened: a message received or sent, a reaction, a turn starting or ending, a rule doing something. A rule that ran and passed says nothing here, because a feed of green ticks is one the eye learns to skip.",
|
|
33
|
+
),
|
|
34
|
+
channelId: z.string().optional().describe("Which channel or thread it happened in."),
|
|
35
|
+
// Inbound author display name.
|
|
36
|
+
author: z.string().optional().describe("Who sent it, for something that arrived."),
|
|
37
|
+
// Full message text (inbound) or sent payload content (outbound).
|
|
38
|
+
content: z.string().optional().describe("The message, in full, whichever direction it went."),
|
|
39
|
+
// Outbound HTTP method + endpoint path (tokens ride headers, never URLs).
|
|
40
|
+
method: z.string().optional().describe("The verb of an outgoing call."),
|
|
41
|
+
endpoint: z.string().optional().describe("The address of an outgoing call. Credentials travel in headers, so they are never here."),
|
|
42
|
+
// The agent turn that made/handled it, the join key between an inbound wake and its outbound calls.
|
|
43
|
+
sessionId: z.string().optional().describe("The provider session behind it."),
|
|
44
|
+
/* ONE TURN'S EVENTS, TIED TOGETHER. A turn writes four lifecycle events plus one per outbound provider call,
|
|
45
|
+
* and read as five rows they say one thing five times, so the feed groups on this instead. It cannot be
|
|
46
|
+
* sessionId: the runtime does not mint one until the stream's first frame, which is AFTER turn.started, so
|
|
47
|
+
* the very event carrying the prompt is the one that could never be joined. Minted by the turn itself. */
|
|
48
|
+
turnId: z
|
|
49
|
+
.string()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe(
|
|
52
|
+
"Ties one turn's entries together. A turn writes several, and read as separate rows they say one thing several times, so a feed groups on this.",
|
|
53
|
+
),
|
|
54
|
+
// The stable conversation the turn belongs to. Outlives sessionId, which a provider/account/harness switch
|
|
55
|
+
// retires mid-conversation, so this, not sessionId, is what "the same agent" means across a feed.
|
|
56
|
+
conversationId: z
|
|
57
|
+
.string()
|
|
58
|
+
.optional()
|
|
59
|
+
.describe(
|
|
60
|
+
"Which conversation. This, rather than the provider session, is what the same agent means across a feed, because a session is retired whenever the model changes.",
|
|
61
|
+
),
|
|
62
|
+
// The conversation's display title as it stood when the event was written. Denormalised on purpose: the
|
|
63
|
+
// registry entry it came from is prunable and renameable, and an audit row must still read as words years
|
|
64
|
+
// later. Absent on the first event of a fresh conversation, the auto-namer has not run yet.
|
|
65
|
+
title: z
|
|
66
|
+
.string()
|
|
67
|
+
.optional()
|
|
68
|
+
.describe(
|
|
69
|
+
"What that conversation was called at the time. Copied in rather than looked up, because an audit entry must still read as words years later, after the conversation has been renamed or pruned.",
|
|
70
|
+
),
|
|
71
|
+
// What woke the conversation from outside, when something did (see AgentOriginSchema), the feed's "who
|
|
72
|
+
// called me" attribution, and how a turn is filed under Discord rather than under the runtime that served it.
|
|
73
|
+
origin: AgentOriginSchema.optional().describe(
|
|
74
|
+
"What woke the conversation from outside, when something did. It is how a turn gets filed under the chat service that caused it rather than under the model that served it.",
|
|
75
|
+
),
|
|
76
|
+
automationIds: z.array(z.string()).optional().describe("Which automations were involved."),
|
|
77
|
+
outcome: z.enum(["ok", "error"]).optional().describe("How it ended."),
|
|
78
|
+
error: z.string().optional().describe("What went wrong, when something did."),
|
|
79
|
+
// Source-specific detail: guildId, attachments, transcript path, participants…
|
|
80
|
+
extra: z
|
|
81
|
+
.record(z.string(), z.unknown())
|
|
82
|
+
.optional()
|
|
83
|
+
.describe("Whatever else the source had to say: attachments, participants, a recording's path. Shape varies by source."),
|
|
84
|
+
});
|
|
85
|
+
export type ActivityEvent = z.infer<typeof ActivityEventSchema>;
|
|
86
|
+
export const ActivityQuerySchema = z.object({
|
|
87
|
+
provider: z.string().optional().describe("Narrow it to one outside service."),
|
|
88
|
+
limit: z.coerce.number().min(1).max(500).default(100).describe("How many entries to return."),
|
|
89
|
+
// `at` cursor, exclusive, newest-first paging.
|
|
90
|
+
before: z.coerce.number().optional().describe("Only entries older than this timestamp, so paging walks backwards through the feed."),
|
|
91
|
+
});
|
|
92
|
+
export type ActivityQuery = z.infer<typeof ActivityQuerySchema>;
|
|
93
|
+
export const ActivityListSchema = z.object({ events: z.array(ActivityEventSchema).describe("The audit entries, newest first.") });
|
|
94
|
+
// Live connection health, probed per provider capability (not stored): gateway state from the client pool
|
|
95
|
+
// (idle = the gateway is up but has no enabled listener automation to connect for, distinct from a
|
|
96
|
+
// connection that should be up but isn't; pairing = the socket is up but the credential is a ceremony nobody
|
|
97
|
+
// has finished, which no amount of waiting fixes), lastError from the newest system-error event in the log.
|
|
98
|
+
export const ActivityConnectionSchema = z.object({
|
|
99
|
+
capabilityId: z.string().describe("Which connection."),
|
|
100
|
+
provider: z.string().describe("Which service it is."),
|
|
101
|
+
gateway: z
|
|
102
|
+
.enum(["ready", "connecting", "pairing", "disconnected", "idle"])
|
|
103
|
+
.describe(
|
|
104
|
+
"Idle means it is up but has nothing to listen for, which is different from a connection that should be up and is not. Pairing means somebody started a sign-in and never finished it, which no amount of waiting will fix.",
|
|
105
|
+
),
|
|
106
|
+
lastError: z.string().optional().describe("The most recent thing that went wrong on it."),
|
|
107
|
+
});
|
|
108
|
+
export const ActivityStatusSchema = z.object({
|
|
109
|
+
connections: z
|
|
110
|
+
.array(ActivityConnectionSchema)
|
|
111
|
+
.describe("Each source feeding the record, and whether it is working. Probed now rather than remembered."),
|
|
112
|
+
// The daemon's live voice session, when one is up.
|
|
113
|
+
voice: z
|
|
114
|
+
.object({
|
|
115
|
+
channelId: z.string().describe("Which channel."),
|
|
116
|
+
channelName: z.string().describe("What it is called."),
|
|
117
|
+
startedAt: z.number().describe("When it joined, in milliseconds."),
|
|
118
|
+
participants: z.array(z.string()).describe("Who else is in it."),
|
|
119
|
+
})
|
|
120
|
+
.optional()
|
|
121
|
+
.describe("A voice call the sandbox is currently in, when it is in one."),
|
|
122
|
+
});
|
|
123
|
+
export type ActivityStatus = z.infer<typeof ActivityStatusSchema>;
|