@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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// inventory: the i.have.* / i.want.service entries in deploy.config.ts's managed region
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
// The daemon renders/parses these; the browser edits them through the inventory routes. Moved here from the
|
|
4
|
+
// daemon's deploy-config.ts so the daemon and the browser validate against ONE schema (no cross-repo dupes).
|
|
5
|
+
|
|
6
|
+
export const InventoryProviderSchema = z.enum(["host", "cloudflare", "github", "gitlab", "stripe"]);
|
|
7
|
+
export type InventoryProvider = z.infer<typeof InventoryProviderSchema>;
|
|
8
|
+
export const ServiceKindSchema = z.enum(["signoz", "outline", "paperless", "openproject", "invoiceninja", "infisical"]);
|
|
9
|
+
export type ServiceKind = z.infer<typeof ServiceKindSchema>;
|
|
10
|
+
// Non-secret option values the user provides; secret options (sshKey, apiToken, apiKey) are emitted as env()
|
|
11
|
+
// references and never travel over the wire.
|
|
12
|
+
export const InventoryValuesSchema = z.record(z.string(), z.union([z.string(), z.number()]));
|
|
13
|
+
// `const <name>` binding in deploy.config.ts, so it must be a valid identifier.
|
|
14
|
+
const inventoryName = z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(60)
|
|
18
|
+
.regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/);
|
|
19
|
+
export const BackendEntrySchema = z.object({
|
|
20
|
+
kind: z.literal("backend").describe("Something you already have: a machine, an account with a hosting provider."),
|
|
21
|
+
provider: InventoryProviderSchema.describe("Which provider it is with."),
|
|
22
|
+
name: z.string().describe("What to call it, which is also how everything else refers to it."),
|
|
23
|
+
values: InventoryValuesSchema.describe("Its settings. Anything secret is stored separately and referred to here, never written in."),
|
|
24
|
+
});
|
|
25
|
+
export const ServiceEntrySchema = z.object({
|
|
26
|
+
kind: z.literal("service").describe("Something you want provisioned."),
|
|
27
|
+
service: ServiceKindSchema.describe("Which service."),
|
|
28
|
+
name: z.string().describe("What to call it."),
|
|
29
|
+
values: InventoryValuesSchema.describe("Its settings."),
|
|
30
|
+
on: z.string().describe("Which of your machines to put it on."),
|
|
31
|
+
expose: z.string().describe("How it should be reachable."),
|
|
32
|
+
});
|
|
33
|
+
// i.want.app, a deployable app built from source. Single production environment on `main`; `values.domain` is
|
|
34
|
+
// where it's exposed. Multi-env/teams/use wiring is hand-authored outside the managed region.
|
|
35
|
+
export const AppEntrySchema = z.object({
|
|
36
|
+
kind: z.literal("app").describe("An app of your own, built from source and deployed."),
|
|
37
|
+
name: z.string().describe("What to call it."),
|
|
38
|
+
values: InventoryValuesSchema.describe("Its settings, including the address it should answer on."),
|
|
39
|
+
on: z.string().describe("Which of your machines to put it on."),
|
|
40
|
+
expose: z.string().describe("How it should be reachable."),
|
|
41
|
+
});
|
|
42
|
+
export const InventoryEntrySchema = z.discriminatedUnion("kind", [BackendEntrySchema, ServiceEntrySchema, AppEntrySchema]);
|
|
43
|
+
export type InventoryEntry = z.infer<typeof InventoryEntrySchema>;
|
|
44
|
+
export const AddInventoryInputSchema = z.discriminatedUnion("kind", [
|
|
45
|
+
BackendEntrySchema.extend({ name: inventoryName }),
|
|
46
|
+
ServiceEntrySchema.extend({ name: inventoryName }),
|
|
47
|
+
AppEntrySchema.extend({ name: inventoryName }),
|
|
48
|
+
]);
|
|
49
|
+
export type AddInventoryInput = z.infer<typeof AddInventoryInputSchema>;
|
|
50
|
+
export const InventoryNameParamSchema = z.object({ name: z.string().describe("Which entry, by name.") });
|
|
51
|
+
export const InventoryListSchema = z.object({
|
|
52
|
+
entries: z.array(InventoryEntrySchema).describe("Everything declared: what you have, and what you want provisioned."),
|
|
53
|
+
});
|
|
54
|
+
// A deploy-target host self-registering via the connect-host script's POST /enroll (connect-token auth). The SSH
|
|
55
|
+
// key (+ optional Cloudflare token) is written to desired-state/.env; the host (+ cf) is upserted into inventory.
|
|
56
|
+
export const EnrollHostInputSchema = z.object({
|
|
57
|
+
name: inventoryName,
|
|
58
|
+
user: z.string().min(1),
|
|
59
|
+
address: z.string().min(1),
|
|
60
|
+
port: z.coerce.number().default(22),
|
|
61
|
+
via: z.enum(["direct", "cloudflared"]).default("cloudflared"),
|
|
62
|
+
sshKey: z.string().min(1),
|
|
63
|
+
cfToken: z.string().optional(),
|
|
64
|
+
// The zone the connect script resolved alongside cfToken, recorded on the i.have.cloudflare entry so
|
|
65
|
+
// resolve validates against it (no re-discovery) and the Add-service dialog offers `<subdomain>.<zone>`.
|
|
66
|
+
cfZone: z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
export type EnrollHostInput = z.infer<typeof EnrollHostInputSchema>;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// issues: inbound bug reports from the owner's own sites and apps, grouped by fingerprint
|
|
2
|
+
// (.intentic/records/issues/<fingerprint>.json, one file per group)
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { entryId } from "./internal.js";
|
|
5
|
+
|
|
6
|
+
/* WHAT A USER'S CRASH LOOKS LIKE BY THE TIME AN AGENT CAN ACT ON IT.
|
|
7
|
+
*
|
|
8
|
+
* Three shapes live here and the split between them is the whole design:
|
|
9
|
+
*
|
|
10
|
+
* IssueReportSchema what a stranger's browser POSTs to /intake/<id>/report. UNTRUSTED, every field of it,
|
|
11
|
+
* and bounded field by field because the endpoint is public and the body is a stack trace
|
|
12
|
+
* somebody else's machine wrote.
|
|
13
|
+
* IssueSchema what the daemon KEEPS: one group per fingerprint, with a count, a first/last seen and
|
|
14
|
+
* the most recent sample. A crash loop is one of these, not ten thousand.
|
|
15
|
+
* IssuesConfigSchema what the owner configures on the automation, and IssuePublicConfigSchema the subset the
|
|
16
|
+
* SDK is allowed to read back. Named field by field there, never by omission, the same
|
|
17
|
+
* rule WebchatConfig's public half is built on.
|
|
18
|
+
*
|
|
19
|
+
* The SDK imports these as TYPES ONLY (`import type`), so zod never reaches a visitor's browser, which is why
|
|
20
|
+
* the wire shapes live in this package beside the stored ones rather than being re-typed in the bundle. */
|
|
21
|
+
|
|
22
|
+
// What kind of thing arrived. `crash` and `detection` GROUP (one fingerprint, a rising count); `report` never
|
|
23
|
+
// does, because two people describing the same annoyance in their own words are two things to read.
|
|
24
|
+
export const IssueKindSchema = z.enum(["crash", "report", "detection"]);
|
|
25
|
+
export type IssueKind = z.infer<typeof IssueKindSchema>;
|
|
26
|
+
|
|
27
|
+
/* One thing that happened before the crash. Deliberately a flat {at, kind, message} rather than a per-source
|
|
28
|
+
* union: the value of a breadcrumb is being READ in order next to the others, and a shape the SDK can produce
|
|
29
|
+
* for a console line, a failed fetch and a route change alike is one the agent can render as a timeline
|
|
30
|
+
* without knowing which instrumentations the site switched on. */
|
|
31
|
+
export const IssueBreadcrumbSchema = z.object({
|
|
32
|
+
at: z.number().describe("When, in milliseconds."),
|
|
33
|
+
kind: z.string().max(40).describe("What sort of thing it was: a console line, a request, a click, a route change."),
|
|
34
|
+
message: z.string().max(300).describe("What it said, already truncated by the SDK."),
|
|
35
|
+
});
|
|
36
|
+
export type IssueBreadcrumb = z.infer<typeof IssueBreadcrumbSchema>;
|
|
37
|
+
|
|
38
|
+
// How much of the reporter we are willing to believe: nothing. Both fields are typed by whoever is reporting,
|
|
39
|
+
// so they reach the model beside the content rather than above it, exactly as a Front Desk visitor's
|
|
40
|
+
// `unverifiedDisplayName` does. There is no signed identity on this endpoint and there should not be one: a
|
|
41
|
+
// crash handler fires on a dying page, where no sign-in ceremony can run.
|
|
42
|
+
export const IssueReporterSchema = z.object({
|
|
43
|
+
email: z.string().max(320).optional().describe("An address they typed, to reach them about it. Unverified."),
|
|
44
|
+
name: z.string().max(200).optional().describe("A name they typed. Unverified, and never identity."),
|
|
45
|
+
});
|
|
46
|
+
export type IssueReporter = z.infer<typeof IssueReporterSchema>;
|
|
47
|
+
|
|
48
|
+
// A small bag of host-supplied strings (route, app version, locale, tenant). Bounded in both dimensions
|
|
49
|
+
// because it is the one open-ended field on a public endpoint, and an unbounded map is a storage bug waiting
|
|
50
|
+
// for the first person who loops over it.
|
|
51
|
+
const CONTEXT_KEYS_MAX = 20;
|
|
52
|
+
const IssueContextSchema = z
|
|
53
|
+
.record(z.string().max(60), z.string().max(300))
|
|
54
|
+
.refine((context) => Object.keys(context).length <= CONTEXT_KEYS_MAX, { message: `at most ${CONTEXT_KEYS_MAX} context entries` });
|
|
55
|
+
|
|
56
|
+
/* ONE REPORT, AS IT ARRIVES. Everything optional except `kind` and `message`, because the three kinds carry
|
|
57
|
+
* genuinely different evidence and a schema that demanded the union of them would refuse the commonest case:
|
|
58
|
+
* `window.onerror` in an old browser, which has a message and very little else. */
|
|
59
|
+
export const IssueReportSchema = z.object({
|
|
60
|
+
kind: IssueKindSchema.describe("A crash the SDK caught, something a person wrote in, or a problem the SDK noticed on its own."),
|
|
61
|
+
message: z.string().min(1).max(1000).describe("The error's own message, or the headline of what a person reported."),
|
|
62
|
+
stack: z.string().max(20_000).optional().describe("The stack, verbatim from the browser."),
|
|
63
|
+
url: z.string().max(2000).optional().describe("Where it happened: the page's address, or a screen name in an app."),
|
|
64
|
+
/* THE ONE FIELD THAT REPLACES AN ENTIRE INTEGRATION. The agent has the repository, so a build's sha or tag
|
|
65
|
+
* is enough to check that commit out and read the real frames; there is nothing to upload, no artifact
|
|
66
|
+
* store, and no sourcemap pipeline to keep in step with a deploy. A site that sets nothing here still gets
|
|
67
|
+
* a grouped, readable issue: it just costs the agent a guess about which build it came from. */
|
|
68
|
+
release: z.string().max(200).optional().describe("Which build it came from: a commit sha or a tag. With it the agent reads your real source rather than minified frames."),
|
|
69
|
+
userAgent: z.string().max(400).optional().describe("What the browser said it was."),
|
|
70
|
+
description: z.string().max(5000).optional().describe("What the person typed, when a person is the one reporting."),
|
|
71
|
+
reporter: IssueReporterSchema.optional().describe("Who says they are reporting it. Unverified by construction."),
|
|
72
|
+
breadcrumbs: z.array(IssueBreadcrumbSchema).max(40).optional().describe("What happened just before, oldest first."),
|
|
73
|
+
context: IssueContextSchema.optional().describe("Whatever else the app attached: a route, a version, a locale."),
|
|
74
|
+
/* The host's own grouping override, Sentry's convention and worth keeping: an app that knows two crashes
|
|
75
|
+
* are the same thing (or knows one crash is really two) can say so, and the daemon groups on this instead
|
|
76
|
+
* of on the stack. It is hashed like everything else, never used as a filename directly. */
|
|
77
|
+
fingerprint: z.string().max(200).optional().describe("Group by this instead of by the stack, when your app knows better than the stack does."),
|
|
78
|
+
});
|
|
79
|
+
export type IssueReport = z.infer<typeof IssueReportSchema>;
|
|
80
|
+
|
|
81
|
+
/* The body POSTed to /intake/<id>/report: the report plus the two things the GATE needs and the report itself
|
|
82
|
+
* has no business carrying, a client id to rate-limit against and the anti-bot answer. Kept out of
|
|
83
|
+
* IssueReportSchema so that what gets STORED (the sample) is the evidence and not the doorman's paperwork. */
|
|
84
|
+
export const IssueIngestSchema = z.object({
|
|
85
|
+
report: IssueReportSchema,
|
|
86
|
+
// The SDK's own per-browser id (localStorage). Not a secret and not identity, anyone can mint one: it is
|
|
87
|
+
// the key the per-minute limit counts against, so one runaway tab cannot spend the whole day's budget.
|
|
88
|
+
clientId: z.string().min(1).max(200).describe("The SDK's own id for this browser. Not a secret: it is what the rate limit counts against."),
|
|
89
|
+
// Only for `report`, and only when the automation asks for a proof of work: a crash fires on a dying page,
|
|
90
|
+
// where there is no second to spend on a puzzle and no user to wait for it.
|
|
91
|
+
powNonce: z.string().max(400).optional(),
|
|
92
|
+
// Minted by the owner, pasted into a mobile or server SDK that has no Origin header for the allowlist to
|
|
93
|
+
// read. An abuse LABEL rather than a secret (it ships inside a mobile binary and can be pulled out of one):
|
|
94
|
+
// the real ceilings are the dedup, the rate limit and the daily budget.
|
|
95
|
+
key: z.string().max(200).optional(),
|
|
96
|
+
});
|
|
97
|
+
export type IssueIngest = z.infer<typeof IssueIngestSchema>;
|
|
98
|
+
|
|
99
|
+
/* Where a group stands with the owner. `investigating` is set by the daemon when a turn is actually started
|
|
100
|
+
* for it (from a wake or from the Investigate button), never guessed: it is the difference between "nobody has
|
|
101
|
+
* looked at this" and "something is looking at it right now", which is the question a triage inbox is for. */
|
|
102
|
+
export const IssueStatusSchema = z.enum(["open", "investigating", "resolved", "ignored"]);
|
|
103
|
+
export type IssueStatus = z.infer<typeof IssueStatusSchema>;
|
|
104
|
+
|
|
105
|
+
// One agent turn started for this issue. The conversation id is the link: the fleet board already knows how to
|
|
106
|
+
// open one, so the inbox does not have to store anything about the run beyond which conversation it became.
|
|
107
|
+
export const IssueRunSchema = z.object({
|
|
108
|
+
conversationId: z.string().describe("The conversation this run became."),
|
|
109
|
+
at: z.number().describe("When it started, in milliseconds."),
|
|
110
|
+
// What the count stood at when this run was started, so a recurrence after a fix reads as "it came back",
|
|
111
|
+
// not as "someone already looked at this".
|
|
112
|
+
atCount: z.number().describe("How many times it had happened when this run started."),
|
|
113
|
+
});
|
|
114
|
+
export type IssueRun = z.infer<typeof IssueRunSchema>;
|
|
115
|
+
|
|
116
|
+
/* ONE GROUP. The id is the fingerprint and is the FILENAME, never in the body (json-dir.ts owns that rule), so
|
|
117
|
+
* a body that disagrees with its own grouping cannot be written. */
|
|
118
|
+
export const IssueSchema = z.object({
|
|
119
|
+
kind: IssueKindSchema,
|
|
120
|
+
// The one-line headline the inbox lists it under, derived from the report rather than typed, so two
|
|
121
|
+
// recurrences of one crash cannot be filed under two names.
|
|
122
|
+
title: z.string().min(1).max(300).describe("The one line this is listed under."),
|
|
123
|
+
culprit: z.string().max(300).optional().describe("The frame it came from, when the stack named one."),
|
|
124
|
+
// Which issues automation received it. A workspace can run several (one per site), and the inbox is one
|
|
125
|
+
// list across all of them, so the group has to say which door it came in through.
|
|
126
|
+
automationId: entryId.describe("Which intake received it."),
|
|
127
|
+
// The site or app it came from, as the browser's Origin or the SDK's declared one; absent for a keyed
|
|
128
|
+
// client (a mobile app, a server) that has no origin to send.
|
|
129
|
+
origin: z.string().max(400).optional().describe("Which site it came from."),
|
|
130
|
+
firstSeen: z.number().describe("When it first happened, in milliseconds."),
|
|
131
|
+
lastSeen: z.number().describe("When it last happened, in milliseconds."),
|
|
132
|
+
count: z.number().describe("How many times this exact thing has arrived."),
|
|
133
|
+
status: IssueStatusSchema.default("open").describe("Where it stands with you."),
|
|
134
|
+
statusAt: z.number().optional().describe("When the status last changed, in milliseconds."),
|
|
135
|
+
release: z.string().max(200).optional().describe("The build the latest one came from."),
|
|
136
|
+
// The most recent event in full. The LATEST rather than the first, deliberately: when a crash is still
|
|
137
|
+
// happening, what it looks like now is what a fix has to reproduce, and the first one is often from a
|
|
138
|
+
// build that no longer exists.
|
|
139
|
+
sample: IssueReportSchema.describe("The most recent one, in full."),
|
|
140
|
+
/* How many arrivals had been counted the last time this group WOKE an agent. The whole of the escalation
|
|
141
|
+
* rule lives in this one number: a group fires once when it is new, and again only when it has moved this
|
|
142
|
+
* far past its last firing. Stored rather than derived, because "how many since the last wake" is not
|
|
143
|
+
* recoverable from a count and a timestamp after a restart. */
|
|
144
|
+
firedAt: z.number().optional().describe("What the count stood at the last time this woke an agent."),
|
|
145
|
+
runs: z.array(IssueRunSchema).max(20).optional().describe("The turns started for it."),
|
|
146
|
+
});
|
|
147
|
+
export type Issue = z.infer<typeof IssueSchema>;
|
|
148
|
+
|
|
149
|
+
// The list row: the stored group plus its filename id (the fingerprint).
|
|
150
|
+
export const IssueSummarySchema = IssueSchema.extend({ id: entryId.describe("The issue's id, which is its fingerprint.") });
|
|
151
|
+
export type IssueSummary = z.infer<typeof IssueSummarySchema>;
|
|
152
|
+
|
|
153
|
+
// `invalid` is the same trust-boundary confession the drafts list makes, for the opposite reason: nothing but
|
|
154
|
+
// the daemon writes these, so a file in here that will not parse is a BUG in this daemon or a half-written
|
|
155
|
+
// volume, and either is worth seeing rather than silently skipping.
|
|
156
|
+
export const IssuesListSchema = z.object({
|
|
157
|
+
issues: z.array(IssueSummarySchema).describe("The inbox, most recently seen first."),
|
|
158
|
+
invalid: z.array(z.string()).describe("Files in the issues directory that could not be read at all."),
|
|
159
|
+
});
|
|
160
|
+
export type IssuesList = z.infer<typeof IssuesListSchema>;
|
|
161
|
+
|
|
162
|
+
export const IssueIdParamSchema = z.object({ id: entryId.describe("Which issue.") });
|
|
163
|
+
// Triage: the owner moving one row. `investigating` is not offered here, the daemon sets it when a turn
|
|
164
|
+
// actually starts, and letting a click claim it would make the one status that means something a lie.
|
|
165
|
+
export const IssueStatusInputSchema = z.object({
|
|
166
|
+
id: entryId.describe("Which issue."),
|
|
167
|
+
status: z.enum(["open", "resolved", "ignored"]).describe("Where it now stands with you."),
|
|
168
|
+
});
|
|
169
|
+
export type IssueStatusInput = z.infer<typeof IssueStatusInputSchema>;
|
|
170
|
+
|
|
171
|
+
/* ---- the automation's own settings ----
|
|
172
|
+
*
|
|
173
|
+
* Present only on `issues` listener automations, ignored on every other trigger, the shape WebchatConfig
|
|
174
|
+
* already established. `allowedOrigins` is NOT here: it lives on the trigger, because it is the admission gate
|
|
175
|
+
* the ingest route reads rather than a rendering choice, and one gate in two places is one gate. */
|
|
176
|
+
export const IssuesConfigSchema = z.object({
|
|
177
|
+
/* The key a client with no Origin presents (a mobile app, a server, a desktop build). Minted by the daemon
|
|
178
|
+
* on upsert like the event webhook's token, and for the same reason: every sender supports "paste this
|
|
179
|
+
* string", and nothing else is available to a caller with no identity and no browser.
|
|
180
|
+
*
|
|
181
|
+
* It is an abuse LABEL, not a secret, and the difference matters: it ships inside a binary anyone can pull
|
|
182
|
+
* apart. What it buys is that a leaked key can be rotated in one click while the origin allowlist keeps
|
|
183
|
+
* covering the web. The ceilings are what actually bound the damage. */
|
|
184
|
+
ingestKey: z.string().min(1).optional().describe("The key an app with no website origin presents. Rotate it freely: the limits, not this, are what bound the damage."),
|
|
185
|
+
/* Whether a browser with no allowed origin may still report by presenting the key. Off by default: the
|
|
186
|
+
* commonest way an intake gets abused is its key ending up in a public web bundle, and the allowlist is
|
|
187
|
+
* the thing that stops that mattering. */
|
|
188
|
+
keyFromBrowsers: z.boolean().optional().describe("Let a browser report with the key alone, rather than only from a site you listed. Off unless you need it."),
|
|
189
|
+
// The whole intake's ceiling per UTC day, counted in reports that reach the store. Absent ⇒
|
|
190
|
+
// ISSUES_DAILY_MAX_DEFAULT, never uncapped, for the reason the Front Desk's own daily cap gives.
|
|
191
|
+
dailyReportMax: z.number().int().positive().optional().describe("How many reports a day this intake accepts at all."),
|
|
192
|
+
/* HOW FAR A KNOWN CRASH HAS TO GO BEFORE IT INTERRUPTS ANYONE AGAIN. A group wakes an agent when it is
|
|
193
|
+
* new, and after that only when its count has grown by this much since the last wake. Absent ⇒
|
|
194
|
+
* ISSUES_ESCALATE_AFTER_DEFAULT.
|
|
195
|
+
*
|
|
196
|
+
* This is the number that makes the whole product safe to leave on. Without it a crash loop on one popular
|
|
197
|
+
* page is an agent turn per affected browser, which is a bill rather than a bug report. */
|
|
198
|
+
escalateAfter: z.number().int().positive().optional().describe("How many more times a known crash must happen before it wakes an agent again."),
|
|
199
|
+
// A proof-of-work puzzle on WRITTEN REPORTS only (a crash has no second to spend and no user to wait for
|
|
200
|
+
// it). Absent ⇒ off, leaving the origin allowlist and the ceilings as the whole boundary.
|
|
201
|
+
antiBot: z.enum(["pow"]).optional().describe("Make a person's browser solve a small puzzle before it accepts a written report."),
|
|
202
|
+
/* ---- the report dialog's chrome, all of it public by construction ---- */
|
|
203
|
+
title: z.string().max(80).optional().describe("The dialog's heading."),
|
|
204
|
+
prompt: z.string().max(300).optional().describe("The line above the box they type in."),
|
|
205
|
+
thanks: z.string().max(300).optional().describe("What it says once they have sent it."),
|
|
206
|
+
askEmail: z.boolean().optional().describe("Ask for an address to reply to. Optional for them either way."),
|
|
207
|
+
// A hex colour, for the reason WebchatConfig's `accent` is one: the SDK derives a hover and a focus ring
|
|
208
|
+
// from its channels rather than only painting it.
|
|
209
|
+
accent: z
|
|
210
|
+
.string()
|
|
211
|
+
.regex(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, "accent must be a hex colour, e.g. #e47100")
|
|
212
|
+
.optional(),
|
|
213
|
+
// Whether the SDK arms window.onerror / unhandledrejection at all. Absent ⇒ on: a site that embedded a
|
|
214
|
+
// crash reporter meant to report crashes.
|
|
215
|
+
captureCrashes: z.boolean().optional().describe("Catch uncaught errors automatically, as well as what people write in."),
|
|
216
|
+
});
|
|
217
|
+
export type IssuesConfig = z.infer<typeof IssuesConfigSchema>;
|
|
218
|
+
|
|
219
|
+
/* What the SDK is told about itself, fully RESOLVED daemon-side so the bundle carries no fallback logic. Every
|
|
220
|
+
* field is named here rather than spread from the config: a secret added to IssuesConfig later is invisible to
|
|
221
|
+
* a stranger's browser until somebody deliberately lists it, which is the property this shape exists for.
|
|
222
|
+
* `ingestKey` is conspicuously absent, a browser proves itself by its origin. */
|
|
223
|
+
export const IssuePublicConfigSchema = z.object({
|
|
224
|
+
automationId: z.string(),
|
|
225
|
+
title: z.string(),
|
|
226
|
+
prompt: z.string(),
|
|
227
|
+
thanks: z.string(),
|
|
228
|
+
askEmail: z.boolean(),
|
|
229
|
+
accent: z.string(),
|
|
230
|
+
captureCrashes: z.boolean(),
|
|
231
|
+
// "off" spelled out rather than left absent, for the reason the Front Desk's is: the SDK branches on it,
|
|
232
|
+
// and a missing field meaning "no challenge" is how one serialization bug becomes an open door.
|
|
233
|
+
antiBot: z.enum(["pow", "off"]),
|
|
234
|
+
});
|
|
235
|
+
export type IssuePublicConfig = z.infer<typeof IssuePublicConfigSchema>;
|
|
236
|
+
|
|
237
|
+
// The proof-of-work challenge, the same shape and the same solver as the Front Desk's.
|
|
238
|
+
export const IssueChallengeSchema = z.object({ salt: z.string(), difficulty: z.number().int().positive() });
|
|
239
|
+
export type IssueChallenge = z.infer<typeof IssueChallengeSchema>;
|
|
240
|
+
|
|
241
|
+
/* What the intake answers with. A short reference the reporter can be shown ("we filed this as 4f3a…"), and
|
|
242
|
+
* nothing else: whether this crash is new, how often it has happened and whether it woke anybody are the
|
|
243
|
+
* owner's facts, and the caller is a stranger's browser. */
|
|
244
|
+
export const IssueAcceptedSchema = z.object({ ok: z.literal(true), id: z.string() });
|
|
245
|
+
export type IssueAccepted = z.infer<typeof IssueAcceptedSchema>;
|
|
246
|
+
|
|
247
|
+
/* Which origins have loaded this intake's SDK, and which were turned away. The Front Desk's install probe,
|
|
248
|
+
* whole, because the setup mistake is identical and so is the silence it produces: a snippet that was never
|
|
249
|
+
* pasted, and one pasted on an origin the allowlist does not have, are both "an intake with no reports". */
|
|
250
|
+
export const IssueInstallSchema = z.object({
|
|
251
|
+
origin: z.string(),
|
|
252
|
+
allowed: z.boolean(),
|
|
253
|
+
lastSeenAt: z.number(),
|
|
254
|
+
loads: z.number(),
|
|
255
|
+
});
|
|
256
|
+
export const IssueInstallsSchema = z.object({ origins: z.array(IssueInstallSchema) });
|
|
257
|
+
export type IssueInstalls = z.infer<typeof IssueInstallsSchema>;
|
|
258
|
+
export const IssueIntakeIdParamSchema = z.object({ automationId: entryId.describe("Which intake.") });
|
|
259
|
+
|
|
260
|
+
/* ---- the numbers both ends need ----
|
|
261
|
+
*
|
|
262
|
+
* Here rather than beside the route that enforces them, for WebchatConfig's reason: the automation editor has
|
|
263
|
+
* to be able to show the owner what they are already protected by, and a limit that is invisible until it is
|
|
264
|
+
* hit gets filed as a bug. */
|
|
265
|
+
|
|
266
|
+
/* The daily ceiling an intake gets when its owner sets none. Larger than the Front Desk's 200 because the unit
|
|
267
|
+
* is different: a report is a file write and only SOMETIMES an agent turn (dedup decides), where a visitor
|
|
268
|
+
* message is always a turn. High enough that a real product's bad afternoon fits inside it, low enough that a
|
|
269
|
+
* script pointed at the endpoint stops being interesting within seconds. */
|
|
270
|
+
export const ISSUES_DAILY_MAX_DEFAULT = 2000;
|
|
271
|
+
|
|
272
|
+
/* How much a known crash has to grow before it wakes anybody again. Ten is chosen to be quiet on the tail (one
|
|
273
|
+
* more person hitting a known bug is not news) and prompt on a spike: a regression that starts affecting
|
|
274
|
+
* everybody crosses it almost at once, which is exactly when the second wake is worth having. */
|
|
275
|
+
export const ISSUES_ESCALATE_AFTER_DEFAULT = 10;
|
|
276
|
+
|
|
277
|
+
// How much of one ingest body the daemon will read. A stack plus forty breadcrumbs plus a description is a few
|
|
278
|
+
// kilobytes; this leaves room for a pathological framework trace without letting the endpoint be a file upload.
|
|
279
|
+
export const ISSUE_PAYLOAD_MAX = 96_000;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// logs: daemon-owned debug logs (historyRoot/logs)
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
// Terminal pipe-pane captures (terminals/), intentic CLI run logs (intentic-runs/), and the daemon's own pino
|
|
4
|
+
// file (daemon.log), written by the daemon/tmux only, under historyRoot so the agent can't rewrite them.
|
|
5
|
+
|
|
6
|
+
export const LogFileEntrySchema = z.object({
|
|
7
|
+
// Path relative to the logs root, e.g. "terminals/web-1-%0.log" or "daemon.log".
|
|
8
|
+
name: z.string().describe("Its name, which is what the read route takes."),
|
|
9
|
+
sizeBytes: z.number().describe("Size in bytes."),
|
|
10
|
+
// Epoch ms mtime.
|
|
11
|
+
modifiedAt: z.number().describe("When it last changed, in milliseconds."),
|
|
12
|
+
});
|
|
13
|
+
export type LogFileEntry = z.infer<typeof LogFileEntrySchema>;
|
|
14
|
+
export const LogsListSchema = z.object({
|
|
15
|
+
files: z.array(LogFileEntrySchema).describe("Every log the sandbox keeps: captured terminal output, command runs, and its own log."),
|
|
16
|
+
});
|
|
17
|
+
// `name` rides the query (log names contain slashes, which don't fit a path segment); `bytes` is the tail
|
|
18
|
+
// size, the newest bytes win when the file is larger.
|
|
19
|
+
export const LogReadQuerySchema = z.object({
|
|
20
|
+
name: z.string().min(1).describe("Which log. It travels in the query rather than the address, because log names contain slashes."),
|
|
21
|
+
bytes: z.coerce
|
|
22
|
+
.number()
|
|
23
|
+
.min(1)
|
|
24
|
+
.max(1_048_576)
|
|
25
|
+
.default(65_536)
|
|
26
|
+
.describe("How much of the end to read. The newest bytes win when the file is larger."),
|
|
27
|
+
});
|
|
28
|
+
export const LogReadSchema = z.object({
|
|
29
|
+
name: z.string().describe("Which log this is from."),
|
|
30
|
+
sizeBytes: z.number().describe("How large the whole file is."),
|
|
31
|
+
// The tail text; truncated when the file holds more than the requested bytes.
|
|
32
|
+
text: z.string().describe("The end of it, as text."),
|
|
33
|
+
truncated: z.boolean().describe("There is more before what you got."),
|
|
34
|
+
});
|
|
35
|
+
export type LogRead = z.infer<typeof LogReadSchema>;
|
|
36
|
+
/* ---- client diagnostics: what the BROWSER saw, landed where the daemon's own records live ----
|
|
37
|
+
*
|
|
38
|
+
* The one gap no daemon-side record could ever close. Everything the editor measured or caught ended at
|
|
39
|
+
* `console.warn`: the perf ring buffer dies on reload, a render error reaches Vue's handler and stops there, and
|
|
40
|
+
* the startup self-heal CLEARS this origin's storage and reloads, destroying the evidence for the one class of
|
|
41
|
+
* bug that reproduces least often. So when a user hit a bug in their own browser the durable record was
|
|
42
|
+
* nothing, and the only way to investigate was to re-drive a browser and hope. Measured over 728 sessions that
|
|
43
|
+
* is 1,545 screenshots against 65 console reads, and a quarter of all prompts arriving with a picture attached
|
|
44
|
+
* because there was no other channel.
|
|
45
|
+
*
|
|
46
|
+
* Deliberately NARROW. This is not analytics (PostHog owns product events) and not a log pipe: it carries the
|
|
47
|
+
* things a person cannot describe and a screenshot cannot show, which are caught errors, self-heal wipes, and
|
|
48
|
+
* spans that blew their frame budget. Everything is capped at the schema so one looping component cannot fill
|
|
49
|
+
* the /history volume, and the daemon appends to logs/client.jsonl under the same prune sweep as the rest. */
|
|
50
|
+
export const ClientDiagnosticSchema = z.object({
|
|
51
|
+
// When the BROWSER saw it. Distinct from the `time` the daemon stamps on the record, because a batch can
|
|
52
|
+
// arrive seconds late and a reader correlating a stutter to a daemon span needs the moment it happened.
|
|
53
|
+
seenAt: z.number().describe("When the browser saw it, in milliseconds."),
|
|
54
|
+
level: z.enum(["warn", "error"]).describe("How bad it was."),
|
|
55
|
+
// A stable name, not free text: this is what a reader filters on. e.g. `vue.render`, `window.error`,
|
|
56
|
+
// `unhandled.rejection`, `self-heal.wipe`, `perf.slow`.
|
|
57
|
+
event: z.string().min(1).max(100).describe("What kind of thing it was, as a stable name."),
|
|
58
|
+
message: z.string().max(2_000).describe("What it said."),
|
|
59
|
+
// The app route the user was on, which is the single most useful field for reproducing anything.
|
|
60
|
+
route: z.string().max(300).optional().describe("Which page they were on."),
|
|
61
|
+
/* The id this browser put on the daemon call it was making, when there was one. The join key: without it
|
|
62
|
+
* "the UI stuttered at 15:22" and "slow http.request at 15:22" can only be matched by eye. */
|
|
63
|
+
requestId: z.string().max(100).optional().describe("Which daemon call it belonged to, when it belonged to one."),
|
|
64
|
+
// Which build this browser was running, so a report from a tab nobody has reloaded in a week says so.
|
|
65
|
+
build: z.string().max(100).optional().describe("Which build of the app was running."),
|
|
66
|
+
// Bounded and primitive: a stack, an op name, a duration. Kept flat so a line stays greppable.
|
|
67
|
+
fields: z
|
|
68
|
+
.record(z.string().max(60), z.union([z.string().max(4_000), z.number(), z.boolean()]))
|
|
69
|
+
.optional()
|
|
70
|
+
.describe("Whatever else was worth keeping."),
|
|
71
|
+
});
|
|
72
|
+
export type ClientDiagnostic = z.infer<typeof ClientDiagnosticSchema>;
|
|
73
|
+
// A batch. Capped: the client coalesces and drops on its own side too, and a route that accepts an unbounded
|
|
74
|
+
// array is a way to fill a disk with one request.
|
|
75
|
+
export const ClientDiagnosticsReportSchema = z.object({
|
|
76
|
+
events: z.array(ClientDiagnosticSchema).min(1).max(50).describe("What the browser has to report, oldest first."),
|
|
77
|
+
});
|
|
78
|
+
export type ClientDiagnosticsReport = z.infer<typeof ClientDiagnosticsReportSchema>;
|
|
79
|
+
export const ClientDiagnosticsAcceptedSchema = z.object({
|
|
80
|
+
recorded: z.number().describe("How many were written down."),
|
|
81
|
+
});
|
|
82
|
+
// A tab's self-report of what it is looking at, keyed by its /events connection's clientId. Full replace,
|
|
83
|
+
// not a merge, an absent field means "cleared", so a tab leaving a file drops the path with the same report.
|
|
84
|
+
export const PresenceReportSchema = z.object({
|
|
85
|
+
clientId: z.string().describe("This connection's own id, the same one it gave the event stream."),
|
|
86
|
+
idle: z.boolean().describe("Whether the person has stopped doing anything."),
|
|
87
|
+
view: z.string().optional().describe("Which view they are on."),
|
|
88
|
+
sessionId: z.string().optional().describe("Which conversation they have open."),
|
|
89
|
+
path: z
|
|
90
|
+
.string()
|
|
91
|
+
.optional()
|
|
92
|
+
.describe(
|
|
93
|
+
"Which file they are looking at. Sent whole rather than merged: leaving a field out clears it, so a tab that closes a file drops the path in the same report.",
|
|
94
|
+
),
|
|
95
|
+
});
|
|
96
|
+
export type PresenceReport = z.infer<typeof PresenceReportSchema>;
|