@intentic/sandbox-contract 1.232.0 → 1.234.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 +11 -5
- package/dist/agent-catalog.d.ts +4 -2
- package/dist/agent-catalog.d.ts.map +1 -1
- package/dist/agent-catalog.js +20 -14
- 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/chores.js +36 -1
- package/dist/chores/chores.js.map +1 -1
- package/dist/chores/probes.d.ts +1 -1
- package/dist/chores/probes.d.ts.map +1 -1
- package/dist/chores/probes.js +70 -0
- package/dist/chores/probes.js.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 +17 -0
- package/dist/command-classes.d.ts.map +1 -0
- package/dist/command-classes.js +189 -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.d.ts +30 -0
- package/dist/contracts/automations.contract.d.ts.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 +17 -0
- 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 +44 -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/issues.contract.d.ts +89 -0
- package/dist/contracts/issues.contract.d.ts.map +1 -0
- package/dist/contracts/issues.contract.js +50 -0
- package/dist/contracts/issues.contract.js.map +1 -0
- 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 +127 -84
- 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 +32 -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/credential-material.d.ts +2 -0
- package/dist/credential-material.d.ts.map +1 -0
- package/dist/credential-material.js +36 -0
- package/dist/credential-material.js.map +1 -0
- 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 +132 -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 +2 -0
- package/dist/history-state.js.map +1 -1
- package/dist/hostnames.d.ts +2 -0
- package/dist/hostnames.d.ts.map +1 -1
- package/dist/hostnames.js +3 -1
- package/dist/hostnames.js.map +1 -1
- package/dist/index.d.ts +411 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -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/runtime-state.d.ts +9 -0
- package/dist/runtime-state.d.ts.map +1 -1
- package/dist/runtime-state.js +3 -0
- package/dist/runtime-state.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 +195 -0
- package/dist/schemas/agent.d.ts.map +1 -0
- package/dist/schemas/agent.js +171 -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 +781 -0
- package/dist/schemas/automations.d.ts.map +1 -0
- package/dist/schemas/automations.js +223 -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 +1016 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -0
- package/dist/schemas/extension-updates.js +199 -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/issues.d.ts +324 -0
- package/dist/schemas/issues.d.ts.map +1 -0
- package/dist/schemas/issues.js +107 -0
- package/dist/schemas/issues.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 +618 -0
- package/dist/schemas/maintenance.d.ts.map +1 -0
- package/dist/schemas/maintenance.js +222 -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 +554 -0
- package/dist/schemas/settings.d.ts.map +1 -0
- package/dist/schemas/settings.js +263 -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 +122 -0
- package/dist/schemas/webext.d.ts.map +1 -0
- package/dist/schemas/webext.js +45 -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 +14 -0
- package/dist/webext-links.d.ts.map +1 -0
- package/dist/webext-links.js +25 -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 +12 -8
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +15 -10
- package/dist/workspace-state.js.map +1 -1
- package/package.json +19 -8
- package/src/agent-catalog.test.ts +56 -55
- package/src/agent-catalog.ts +33 -33
- package/src/capability-ledger.test.ts +11 -2
- package/src/chores/chores.test.ts +1 -1
- package/src/chores/chores.ts +67 -2
- package/src/chores/probes.test.ts +65 -0
- package/src/chores/probes.ts +133 -1
- package/src/chores/stack.test.ts +19 -0
- package/src/chores/stack.ts +19 -3
- package/src/chores/verdict.test.ts +40 -20
- package/src/chores/verdict.ts +1 -1
- package/src/command-classes.test.ts +445 -0
- package/src/command-classes.ts +468 -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 +8 -7
- 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/issues.contract.ts +60 -0
- 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/credential-material.test.ts +120 -0
- package/src/credential-material.ts +100 -0
- 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 +17 -0
- package/src/host-protocol.ts +1 -1
- package/src/hostnames.test.ts +2 -2
- package/src/hostnames.ts +18 -2
- package/src/index.ts +65 -1
- package/src/listener-protocol.ts +1 -1
- package/src/quick-model.ts +1 -1
- package/src/routes.test.ts +4 -2
- package/src/runner-protocol.ts +35 -5
- package/src/runtime-state.ts +16 -0
- package/src/schemas/activity.ts +123 -0
- package/src/schemas/agent.ts +422 -0
- package/src/schemas/agents.ts +802 -0
- package/src/schemas/automations.ts +522 -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 +324 -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/issues.ts +279 -0
- package/src/schemas/logs.ts +96 -0
- package/src/schemas/loops.ts +401 -0
- package/src/schemas/maintenance.ts +471 -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 +964 -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 +288 -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 +108 -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/tunnel-ids.test.ts +3 -1
- package/src/webext-links.ts +90 -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 +6 -4
- package/src/workspace-state.ts +35 -50
- 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/hostnames.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const sandboxHostname = (id: string, zone: string): string => `${sandboxS
|
|
|
14
14
|
// The container sshd hostname the desktop-sync (Mutagen) reaches over the sandbox tunnel: `ssh-<id>.<zone>`.
|
|
15
15
|
export const sshHostname = (id: string, zone: string): string => `ssh-${id}.${zone}`;
|
|
16
16
|
|
|
17
|
-
/* The LOOPBACK name:
|
|
17
|
+
/* The LOOPBACK name: `<id>.local.<zone>`, resolving to 127.0.0.1 under ONE wildcard record for the whole zone.
|
|
18
18
|
*
|
|
19
19
|
* A public DNS name for a private address looks odd until you ask what the alternative is. A browser on the
|
|
20
20
|
* same machine as the sandbox can reach its daemon in microseconds instead of crossing to a Cloudflare edge
|
|
@@ -23,9 +23,25 @@ export const sshHostname = (id: string, zone: string): string => `ssh-${id}.${zo
|
|
|
23
23
|
* one; this can. The daemon holds the key and gets the certificate by proving control of the zone over
|
|
24
24
|
* DNS-01 (there is nothing on the public internet for a CA to connect to).
|
|
25
25
|
*
|
|
26
|
+
* IT IS A LABEL DEEPER THAN THE OTHER NAMES, and that is the entire point rather than a naming preference. A
|
|
27
|
+
* DNS wildcard matches ONE label, so `*.<zone>` cannot cover `<id>.local.<zone>` and `*.local.<zone>` covers
|
|
28
|
+
* every sandbox that will ever exist: one record for the platform, not one per sandbox. The shape it replaced,
|
|
29
|
+
* `local-<id>.<zone>`, needed a record each, and a zone has a hard per-record quota (Cloudflare 81045). Every
|
|
30
|
+
* OTHER per-sandbox record went away with the move to the zrok hub, so this was the last thing consuming that
|
|
31
|
+
* quota, and when the zone filled the platform could no longer write the record OR the ACME challenge beside
|
|
32
|
+
* it: the certified shortcut stopped resolving, every browser fell back to the plain-http loopback, and that
|
|
33
|
+
* transport is HTTP/1.1 with six connections per origin (see the editor's streamBudget.ts for what that cost).
|
|
34
|
+
* A quota nothing can exhaust is the fix that keeps working.
|
|
35
|
+
*
|
|
26
36
|
* It discloses nothing: the id is already the leading label of the sandbox's public hostname, and the address
|
|
27
37
|
* it resolves to is every machine's own loopback. */
|
|
28
|
-
export const localHostname = (id: string, zone: string): string =>
|
|
38
|
+
export const localHostname = (id: string, zone: string): string => `${id}.${LOCAL_LABEL}.${zone}`;
|
|
39
|
+
|
|
40
|
+
// The label the loopback names live under, so the wildcard has something to be a wildcard OF.
|
|
41
|
+
export const LOCAL_LABEL = "local";
|
|
42
|
+
|
|
43
|
+
// The single record that answers for all of them. Never per-sandbox, never reaped.
|
|
44
|
+
export const localWildcardHostname = (zone: string): string => `*.${LOCAL_LABEL}.${zone}`;
|
|
29
45
|
|
|
30
46
|
// What that record points at, and the reason it is safe to publish: every resolver on earth gets 127.0.0.1.
|
|
31
47
|
export const LOCAL_ADDRESS = "127.0.0.1";
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { grokContract } from "./contracts/grok.contract.js";
|
|
|
19
19
|
import { historyContract } from "./contracts/history.contract.js";
|
|
20
20
|
import { intenticContract } from "./contracts/intentic.contract.js";
|
|
21
21
|
import { inventoryContract } from "./contracts/inventory.contract.js";
|
|
22
|
+
import { issuesContract } from "./contracts/issues.contract.js";
|
|
22
23
|
import { logsContract } from "./contracts/logs.contract.js";
|
|
23
24
|
import { loopsContract } from "./contracts/loops.contract.js";
|
|
24
25
|
import { panelsContract } from "./contracts/panels.contract.js";
|
|
@@ -59,10 +60,14 @@ export { historyContract } from "./contracts/history.contract.js";
|
|
|
59
60
|
/* Deliberately NOT part of `sandboxContract` below: that map is the daemon's own HTTP surface, and this one is
|
|
60
61
|
* spoken the other way round, over a connected computer's WebSocket, with the MACHINE implementing it. */
|
|
61
62
|
export { hostContract } from "./contracts/host.contract.js";
|
|
63
|
+
// The same inversion again, one layer in: spoken over the socket a BROWSER EXTENSION opened, with the
|
|
64
|
+
// extension implementing it (contracts/webext.contract.ts).
|
|
65
|
+
export { webextContract } from "./contracts/webext.contract.js";
|
|
62
66
|
// Same inversion, other direction of trust: spoken over a RUNNER's WebSocket, with the runner implementing it.
|
|
63
67
|
export { runnerContract } from "./contracts/runner.contract.js";
|
|
64
68
|
export { intenticContract } from "./contracts/intentic.contract.js";
|
|
65
69
|
export { inventoryContract } from "./contracts/inventory.contract.js";
|
|
70
|
+
export { issuesContract } from "./contracts/issues.contract.js";
|
|
66
71
|
export { logsContract } from "./contracts/logs.contract.js";
|
|
67
72
|
export { REQUEST_ID_EVIDENCE_ROUTE, REQUEST_ID_HEADER } from "./request-id.js";
|
|
68
73
|
export { loopsContract } from "./contracts/loops.contract.js";
|
|
@@ -104,11 +109,15 @@ export * from "./history-state.js";
|
|
|
104
109
|
export * from "./agent-catalog.js";
|
|
105
110
|
export * from "./agent-run-model.js";
|
|
106
111
|
export * from "./capability-env.js";
|
|
112
|
+
export * from "./command-classes.js";
|
|
113
|
+
export * from "./credential-material.js";
|
|
107
114
|
export * from "./capability-secrets.js";
|
|
108
115
|
export * from "./conversation-ids.js";
|
|
109
116
|
export * from "./documents.js";
|
|
110
117
|
export * from "./fast-tier.js";
|
|
111
118
|
export * from "./host-protocol.js";
|
|
119
|
+
export * from "./webext-protocol.js";
|
|
120
|
+
export * from "./webext-links.js";
|
|
112
121
|
export * from "./runner-protocol.js";
|
|
113
122
|
export * from "./listener-protocol.js";
|
|
114
123
|
export * from "./hostnames.js";
|
|
@@ -118,7 +127,61 @@ export * from "./prompt-complexity.js";
|
|
|
118
127
|
export * from "./quick-model.js";
|
|
119
128
|
export * from "./output-fields.js";
|
|
120
129
|
export * from "./publish-drafts.js";
|
|
121
|
-
|
|
130
|
+
/* The wire shapes, one module per subject area, mirroring `contracts/` above: every request and response the
|
|
131
|
+
* daemon speaks is declared in exactly one of them. Inputs that carry a `{param}` in their route path (repo /
|
|
132
|
+
* id / name) merge the path param into the same flat object, oRPC fills the path placeholder from the matching
|
|
133
|
+
* key and routes the rest to the body (POST/PUT) or query (GET).
|
|
134
|
+
*
|
|
135
|
+
* `schemas/internal.ts` is deliberately absent: it holds the id and ref primitives these modules are written
|
|
136
|
+
* in, which are vocabulary rather than shapes either side of the wire sends. */
|
|
137
|
+
export * from "./schemas/activity.js";
|
|
138
|
+
export * from "./schemas/agent.js";
|
|
139
|
+
export * from "./schemas/agents.js";
|
|
140
|
+
export * from "./schemas/automations.js";
|
|
141
|
+
export * from "./schemas/capabilities.js";
|
|
142
|
+
export * from "./schemas/ci.js";
|
|
143
|
+
export * from "./schemas/claude-gate.js";
|
|
144
|
+
export * from "./schemas/codebase-health.js";
|
|
145
|
+
export * from "./schemas/computers.js";
|
|
146
|
+
export * from "./schemas/drafts.js";
|
|
147
|
+
export * from "./schemas/environment.js";
|
|
148
|
+
export * from "./schemas/exit.js";
|
|
149
|
+
export * from "./schemas/extension-updates.js";
|
|
150
|
+
export * from "./schemas/fast-mode.js";
|
|
151
|
+
export * from "./schemas/git.js";
|
|
152
|
+
export * from "./schemas/git-history.js";
|
|
153
|
+
export * from "./schemas/history.js";
|
|
154
|
+
export * from "./schemas/hosts.js";
|
|
155
|
+
export * from "./schemas/intentic.js";
|
|
156
|
+
export * from "./schemas/inventory.js";
|
|
157
|
+
export * from "./schemas/issues.js";
|
|
158
|
+
export * from "./schemas/logs.js";
|
|
159
|
+
export * from "./schemas/loops.js";
|
|
160
|
+
export * from "./schemas/maintenance.js";
|
|
161
|
+
export * from "./schemas/marketplace.js";
|
|
162
|
+
export * from "./schemas/panels.js";
|
|
163
|
+
export * from "./schemas/personas.js";
|
|
164
|
+
export * from "./schemas/plan-limits.js";
|
|
165
|
+
export * from "./schemas/ports.js";
|
|
166
|
+
export * from "./schemas/provider-oauth.js";
|
|
167
|
+
export * from "./schemas/provider-subscriptions.js";
|
|
168
|
+
export * from "./schemas/public.js";
|
|
169
|
+
export * from "./schemas/push.js";
|
|
170
|
+
export * from "./schemas/secrets.js";
|
|
171
|
+
export * from "./schemas/sessions.js";
|
|
172
|
+
export * from "./schemas/settings.js";
|
|
173
|
+
export * from "./schemas/share.js";
|
|
174
|
+
export * from "./schemas/shared.js";
|
|
175
|
+
export * from "./schemas/system.js";
|
|
176
|
+
export * from "./schemas/terminal.js";
|
|
177
|
+
export * from "./schemas/usage.js";
|
|
178
|
+
export * from "./schemas/vpn.js";
|
|
179
|
+
export * from "./schemas/webext.js";
|
|
180
|
+
export * from "./schemas/workflows.js";
|
|
181
|
+
export * from "./schemas/workspace-repos.js";
|
|
182
|
+
export * from "./schemas/workspace-search.js";
|
|
183
|
+
export * from "./schemas/workspace-setup.js";
|
|
184
|
+
export * from "./schemas/workspace-tree.js";
|
|
122
185
|
export * from "./definition.js";
|
|
123
186
|
export * from "./search-globs.js";
|
|
124
187
|
export * from "./starter.js";
|
|
@@ -154,6 +217,7 @@ export const sandboxContract = {
|
|
|
154
217
|
history: historyContract,
|
|
155
218
|
workspace: workspaceContract,
|
|
156
219
|
inventory: inventoryContract,
|
|
220
|
+
issues: issuesContract,
|
|
157
221
|
logs: logsContract,
|
|
158
222
|
loops: loopsContract,
|
|
159
223
|
panels: panelsContract,
|
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/routes.test.ts
CHANGED
|
@@ -77,7 +77,9 @@ describe(`routeShapes`, () => {
|
|
|
77
77
|
it(`changes the fingerprint when a field is added`, () => {
|
|
78
78
|
const before = routeShapes(shaped(z.object({ a: z.string() })))[`vpn.list`];
|
|
79
79
|
const after = routeShapes(shaped(z.object({ a: z.string(), b: z.number() })))[`vpn.list`];
|
|
80
|
-
|
|
80
|
+
// A fingerprint is a string, and saying so is what makes the line below mean something: with `before`
|
|
81
|
+
// undefined and `after` a real shape, "they differ" is true for the wrong reason.
|
|
82
|
+
expect(before).toEqual(expect.any(String));
|
|
81
83
|
expect(after).not.toBe(before);
|
|
82
84
|
});
|
|
83
85
|
|
|
@@ -99,7 +101,7 @@ describe(`routeShapes`, () => {
|
|
|
99
101
|
const one = z.object({ a: z.string().default(`x`) });
|
|
100
102
|
const asOutput = routeShapes(shaped(one))[`vpn.list`];
|
|
101
103
|
const asInput = routeShapes({ vpn: { list: oc.route({ method: "GET", path: "/vpn" }).input(one) } })[`vpn.list`];
|
|
102
|
-
expect(asOutput).
|
|
104
|
+
expect(asOutput).toEqual(expect.any(String));
|
|
103
105
|
expect(asInput).not.toBe(asOutput);
|
|
104
106
|
});
|
|
105
107
|
|
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>;
|
package/src/runtime-state.ts
CHANGED
|
@@ -69,6 +69,22 @@ const RUNTIME_DOMAINS = [
|
|
|
69
69
|
// is why the daemon rate-limits this domain rather than pushing every mutation (see runtime-watch.ts).
|
|
70
70
|
{ domain: "subagents", invalidates: [["subagents"]] },
|
|
71
71
|
|
|
72
|
+
/* THE MACHINES ON THE OTHER END OF A SOCKET, three domains that are one story: the user's computers, the
|
|
73
|
+
* browsers holding the extension, and this sandbox's runners.
|
|
74
|
+
*
|
|
75
|
+
* Announced, and about as announced as a fact can be. "Online" here is not sampled, inferred or timed out
|
|
76
|
+
* of, it IS a socket in this process: the hub accepts one, replaces one, drops one on a failed heartbeat, or
|
|
77
|
+
* cuts one on a revoke, and those four moments are the entire set of ways the answer changes. Nothing on
|
|
78
|
+
* disk moves, no pane appears, and no other feed could carry it.
|
|
79
|
+
*
|
|
80
|
+
* They land on `capabilities` because a host or webext card's state is LITERALLY the hub's answer
|
|
81
|
+
* (handlers/host.ts: `hub.online(id) ? active : pending`), which is what a person watches while they paste a
|
|
82
|
+
* pairing command into a laptop. That wait is the whole reason these are here: it was three seconds of
|
|
83
|
+
* polling per card, running only because nobody had told the browser that the daemon already knew. */
|
|
84
|
+
{ domain: "hosts", invalidates: [["capabilities"], ["computers"]] },
|
|
85
|
+
{ domain: "webext", invalidates: [["capabilities"]] },
|
|
86
|
+
{ domain: "runners", invalidates: [["runners"]] },
|
|
87
|
+
|
|
72
88
|
/* The post queue, when the DAEMON moves it rather than the owner. Approving is the owner's own mutation and
|
|
73
89
|
* refetches itself, but everything after that happens while nobody is touching the page: a held post coming
|
|
74
90
|
* due, a Discord send landing, a publish turn writing back what went out. Those are the moments the row on
|
|
@@ -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>;
|