@intentic/sandbox-contract 1.232.0 → 1.233.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/agent-catalog.d.ts +2 -1
- package/dist/agent-catalog.d.ts.map +1 -1
- package/dist/agent-catalog.js +1 -1
- package/dist/agent-catalog.js.map +1 -1
- package/dist/chores/chores.d.ts +1 -1
- package/dist/chores/chores.d.ts.map +1 -1
- package/dist/chores/probes.d.ts +1 -1
- package/dist/chores/probes.d.ts.map +1 -1
- package/dist/chores/stack.d.ts.map +1 -1
- package/dist/chores/stack.js +2 -1
- package/dist/chores/stack.js.map +1 -1
- package/dist/chores/verdict.d.ts +1 -1
- package/dist/chores/verdict.d.ts.map +1 -1
- package/dist/command-classes.d.ts +14 -0
- package/dist/command-classes.d.ts.map +1 -0
- package/dist/command-classes.js +168 -0
- package/dist/command-classes.js.map +1 -0
- package/dist/contracts/activity.contract.js +1 -1
- package/dist/contracts/activity.contract.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +40 -2
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +4 -1
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +24 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +5 -1
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/automations.contract.js +2 -1
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +63 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +3 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/chores.contract.d.ts.map +1 -1
- package/dist/contracts/chores.contract.js +2 -1
- package/dist/contracts/chores.contract.js.map +1 -1
- package/dist/contracts/ci.contract.js +2 -1
- package/dist/contracts/ci.contract.js.map +1 -1
- package/dist/contracts/claude.contract.js +2 -1
- package/dist/contracts/claude.contract.js.map +1 -1
- package/dist/contracts/cursor.contract.js +2 -1
- package/dist/contracts/cursor.contract.js.map +1 -1
- package/dist/contracts/drafts.contract.d.ts.map +1 -1
- package/dist/contracts/drafts.contract.js +2 -1
- package/dist/contracts/drafts.contract.js.map +1 -1
- package/dist/contracts/endpoints.contract.d.ts.map +1 -1
- package/dist/contracts/endpoints.contract.js +2 -1
- package/dist/contracts/endpoints.contract.js.map +1 -1
- package/dist/contracts/exit.contract.d.ts.map +1 -1
- package/dist/contracts/exit.contract.js +2 -1
- package/dist/contracts/exit.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +42 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +4 -1
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.js +4 -1
- package/dist/contracts/git.contract.js.map +1 -1
- package/dist/contracts/grok.contract.d.ts.map +1 -1
- package/dist/contracts/grok.contract.js +2 -1
- package/dist/contracts/grok.contract.js.map +1 -1
- package/dist/contracts/history.contract.d.ts.map +1 -1
- package/dist/contracts/history.contract.js +2 -1
- package/dist/contracts/history.contract.js.map +1 -1
- package/dist/contracts/host.contract.d.ts +7 -0
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/host.contract.js +4 -1
- package/dist/contracts/host.contract.js.map +1 -1
- package/dist/contracts/intentic.contract.d.ts.map +1 -1
- package/dist/contracts/intentic.contract.js +2 -1
- package/dist/contracts/intentic.contract.js.map +1 -1
- package/dist/contracts/inventory.contract.js +1 -1
- package/dist/contracts/inventory.contract.js.map +1 -1
- package/dist/contracts/logs.contract.d.ts.map +1 -1
- package/dist/contracts/logs.contract.js +1 -1
- package/dist/contracts/logs.contract.js.map +1 -1
- package/dist/contracts/loops.contract.js +2 -1
- package/dist/contracts/loops.contract.js.map +1 -1
- package/dist/contracts/panels.contract.d.ts.map +1 -1
- package/dist/contracts/panels.contract.js +2 -1
- package/dist/contracts/panels.contract.js.map +1 -1
- package/dist/contracts/personas.contract.js +2 -1
- package/dist/contracts/personas.contract.js.map +1 -1
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.js +2 -1
- package/dist/contracts/ports.contract.js.map +1 -1
- package/dist/contracts/prepush.contract.d.ts.map +1 -1
- package/dist/contracts/prepush.contract.js +2 -1
- package/dist/contracts/prepush.contract.js.map +1 -1
- package/dist/contracts/providers.contract.d.ts.map +1 -1
- package/dist/contracts/providers.contract.js +2 -1
- package/dist/contracts/providers.contract.js.map +1 -1
- package/dist/contracts/public.contract.d.ts.map +1 -1
- package/dist/contracts/public.contract.js +2 -1
- package/dist/contracts/public.contract.js.map +1 -1
- package/dist/contracts/push.contract.d.ts.map +1 -1
- package/dist/contracts/push.contract.js +2 -1
- package/dist/contracts/push.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +45 -2
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +10 -2
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +2 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.js +1 -1
- package/dist/contracts/sessions.contract.js.map +1 -1
- package/dist/contracts/settings.contract.d.ts +20 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +3 -1
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/share.contract.d.ts.map +1 -1
- package/dist/contracts/share.contract.js +2 -1
- package/dist/contracts/share.contract.js.map +1 -1
- package/dist/contracts/skills.contract.d.ts.map +1 -1
- package/dist/contracts/skills.contract.js +2 -1
- package/dist/contracts/skills.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +31 -16
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +6 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/translator.contract.d.ts.map +1 -1
- package/dist/contracts/translator.contract.js +4 -1
- package/dist/contracts/translator.contract.js.map +1 -1
- package/dist/contracts/usage.contract.js +1 -1
- package/dist/contracts/usage.contract.js.map +1 -1
- package/dist/contracts/vpn.contract.d.ts.map +1 -1
- package/dist/contracts/vpn.contract.js +2 -1
- package/dist/contracts/vpn.contract.js.map +1 -1
- package/dist/contracts/webext.contract.d.ts +45 -0
- package/dist/contracts/webext.contract.d.ts.map +1 -0
- package/dist/contracts/webext.contract.js +12 -0
- package/dist/contracts/webext.contract.js.map +1 -0
- package/dist/contracts/workflows.contract.js +2 -1
- package/dist/contracts/workflows.contract.js.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +2 -2
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +7 -1
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/definition-action.d.ts +7 -0
- package/dist/definition-action.d.ts.map +1 -0
- package/dist/definition-action.js +3 -0
- package/dist/definition-action.js.map +1 -0
- package/dist/definition.d.ts +124 -21
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +29 -7
- package/dist/definition.js.map +1 -1
- package/dist/events.d.ts +101 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +25 -1
- package/dist/events.js.map +1 -1
- package/dist/fast-tier.d.ts +1 -1
- package/dist/fast-tier.d.ts.map +1 -1
- package/dist/history-state.d.ts.map +1 -1
- package/dist/history-state.js +1 -0
- package/dist/history-state.js.map +1 -1
- package/dist/index.d.ts +355 -103
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -1
- package/dist/index.js.map +1 -1
- package/dist/listener-protocol.js +1 -1
- package/dist/listener-protocol.js.map +1 -1
- package/dist/quick-model.d.ts +1 -1
- package/dist/quick-model.d.ts.map +1 -1
- package/dist/runner-protocol.d.ts +18 -0
- package/dist/runner-protocol.d.ts.map +1 -1
- package/dist/runner-protocol.js +8 -4
- package/dist/runner-protocol.js.map +1 -1
- package/dist/schemas/activity.d.ts +112 -0
- package/dist/schemas/activity.d.ts.map +1 -0
- package/dist/schemas/activity.js +70 -0
- package/dist/schemas/activity.js.map +1 -0
- package/dist/schemas/agent.d.ts +189 -0
- package/dist/schemas/agent.d.ts.map +1 -0
- package/dist/schemas/agent.js +170 -0
- package/dist/schemas/agent.js.map +1 -0
- package/dist/schemas/agents.d.ts +690 -0
- package/dist/schemas/agents.d.ts.map +1 -0
- package/dist/schemas/agents.js +314 -0
- package/dist/schemas/agents.js.map +1 -0
- package/dist/schemas/automations.d.ts +736 -0
- package/dist/schemas/automations.d.ts.map +1 -0
- package/dist/schemas/automations.js +218 -0
- package/dist/schemas/automations.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +753 -0
- package/dist/schemas/capabilities.d.ts.map +1 -0
- package/dist/schemas/capabilities.js +269 -0
- package/dist/schemas/capabilities.js.map +1 -0
- package/dist/schemas/ci.d.ts +179 -0
- package/dist/schemas/ci.d.ts.map +1 -0
- package/dist/schemas/ci.js +99 -0
- package/dist/schemas/ci.js.map +1 -0
- package/dist/schemas/claude-gate.d.ts +13 -0
- package/dist/schemas/claude-gate.d.ts.map +1 -0
- package/dist/schemas/claude-gate.js +8 -0
- package/dist/schemas/claude-gate.js.map +1 -0
- package/dist/schemas/codebase-health.d.ts +56 -0
- package/dist/schemas/codebase-health.d.ts.map +1 -0
- package/dist/schemas/codebase-health.js +43 -0
- package/dist/schemas/codebase-health.js.map +1 -0
- package/dist/schemas/computers.d.ts +386 -0
- package/dist/schemas/computers.d.ts.map +1 -0
- package/dist/schemas/computers.js +107 -0
- package/dist/schemas/computers.js.map +1 -0
- package/dist/schemas/drafts.d.ts +84 -0
- package/dist/schemas/drafts.d.ts.map +1 -0
- package/dist/schemas/drafts.js +44 -0
- package/dist/schemas/drafts.js.map +1 -0
- package/dist/schemas/environment.d.ts +349 -0
- package/dist/schemas/environment.d.ts.map +1 -0
- package/dist/schemas/environment.js +111 -0
- package/dist/schemas/environment.js.map +1 -0
- package/dist/schemas/exit.d.ts +151 -0
- package/dist/schemas/exit.d.ts.map +1 -0
- package/dist/schemas/exit.js +115 -0
- package/dist/schemas/exit.js.map +1 -0
- package/dist/schemas/extension-updates.d.ts +1014 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -0
- package/dist/schemas/extension-updates.js +197 -0
- package/dist/schemas/extension-updates.js.map +1 -0
- package/dist/schemas/fast-mode.d.ts +8 -0
- package/dist/schemas/fast-mode.d.ts.map +1 -0
- package/dist/schemas/fast-mode.js +3 -0
- package/dist/schemas/fast-mode.js.map +1 -0
- package/dist/schemas/git-history.d.ts +238 -0
- package/dist/schemas/git-history.d.ts.map +1 -0
- package/dist/schemas/git-history.js +152 -0
- package/dist/schemas/git-history.js.map +1 -0
- package/dist/schemas/git.d.ts +471 -0
- package/dist/schemas/git.d.ts.map +1 -0
- package/dist/schemas/git.js +204 -0
- package/dist/schemas/git.js.map +1 -0
- package/dist/schemas/history.d.ts +100 -0
- package/dist/schemas/history.d.ts.map +1 -0
- package/dist/schemas/history.js +54 -0
- package/dist/schemas/history.js.map +1 -0
- package/dist/schemas/hosts.d.ts +41 -0
- package/dist/schemas/hosts.d.ts.map +1 -0
- package/dist/schemas/hosts.js +18 -0
- package/dist/schemas/hosts.js.map +1 -0
- package/dist/schemas/intentic.d.ts +5 -0
- package/dist/schemas/intentic.d.ts.map +1 -0
- package/dist/schemas/intentic.js +3 -0
- package/dist/schemas/intentic.js.map +1 -0
- package/dist/schemas/internal.d.ts +8 -0
- package/dist/schemas/internal.d.ts.map +1 -0
- package/dist/schemas/internal.js +12 -0
- package/dist/schemas/internal.js.map +1 -0
- package/dist/schemas/inventory.d.ts +171 -0
- package/dist/schemas/inventory.d.ts.map +1 -0
- package/dist/schemas/inventory.js +51 -0
- package/dist/schemas/inventory.js.map +1 -0
- package/dist/schemas/logs.d.ts +67 -0
- package/dist/schemas/logs.d.ts.map +1 -0
- package/dist/schemas/logs.js +54 -0
- package/dist/schemas/logs.js.map +1 -0
- package/dist/schemas/loops.d.ts +415 -0
- package/dist/schemas/loops.d.ts.map +1 -0
- package/dist/schemas/loops.js +188 -0
- package/dist/schemas/loops.js.map +1 -0
- package/dist/schemas/maintenance.d.ts +557 -0
- package/dist/schemas/maintenance.d.ts.map +1 -0
- package/dist/schemas/maintenance.js +201 -0
- package/dist/schemas/maintenance.js.map +1 -0
- package/dist/schemas/marketplace.d.ts +64 -0
- package/dist/schemas/marketplace.d.ts.map +1 -0
- package/dist/schemas/marketplace.js +17 -0
- package/dist/schemas/marketplace.js.map +1 -0
- package/dist/schemas/panels.d.ts +61 -0
- package/dist/schemas/panels.d.ts.map +1 -0
- package/dist/schemas/panels.js +51 -0
- package/dist/schemas/panels.js.map +1 -0
- package/dist/schemas/personas.d.ts +122 -0
- package/dist/schemas/personas.d.ts.map +1 -0
- package/dist/schemas/personas.js +102 -0
- package/dist/schemas/personas.js.map +1 -0
- package/dist/schemas/plan-limits.d.ts +172 -0
- package/dist/schemas/plan-limits.d.ts.map +1 -0
- package/dist/schemas/plan-limits.js +126 -0
- package/dist/schemas/plan-limits.js.map +1 -0
- package/dist/schemas/ports.d.ts +71 -0
- package/dist/schemas/ports.d.ts.map +1 -0
- package/dist/schemas/ports.js +42 -0
- package/dist/schemas/ports.js.map +1 -0
- package/dist/schemas/provider-oauth.d.ts +128 -0
- package/dist/schemas/provider-oauth.d.ts.map +1 -0
- package/dist/schemas/provider-oauth.js +91 -0
- package/dist/schemas/provider-oauth.js.map +1 -0
- package/dist/schemas/provider-subscriptions.d.ts +9 -0
- package/dist/schemas/provider-subscriptions.d.ts.map +1 -0
- package/dist/schemas/provider-subscriptions.js +3 -0
- package/dist/schemas/provider-subscriptions.js.map +1 -0
- package/dist/schemas/public.d.ts +32 -0
- package/dist/schemas/public.d.ts.map +1 -0
- package/dist/schemas/public.js +29 -0
- package/dist/schemas/public.js.map +1 -0
- package/dist/schemas/push.d.ts +55 -0
- package/dist/schemas/push.d.ts.map +1 -0
- package/dist/schemas/push.js +60 -0
- package/dist/schemas/push.js.map +1 -0
- package/dist/schemas/secrets.d.ts +86 -0
- package/dist/schemas/secrets.d.ts.map +1 -0
- package/dist/schemas/secrets.js +51 -0
- package/dist/schemas/secrets.js.map +1 -0
- package/dist/schemas/sessions.d.ts +32 -0
- package/dist/schemas/sessions.d.ts.map +1 -0
- package/dist/schemas/sessions.js +11 -0
- package/dist/schemas/sessions.js.map +1 -0
- package/dist/schemas/settings.d.ts +548 -0
- package/dist/schemas/settings.d.ts.map +1 -0
- package/dist/schemas/settings.js +259 -0
- package/dist/schemas/settings.js.map +1 -0
- package/dist/schemas/share.d.ts +49 -0
- package/dist/schemas/share.d.ts.map +1 -0
- package/dist/schemas/share.js +26 -0
- package/dist/schemas/share.js.map +1 -0
- package/dist/schemas/shared.d.ts +22 -0
- package/dist/schemas/shared.d.ts.map +1 -0
- package/dist/schemas/shared.js +16 -0
- package/dist/schemas/shared.js.map +1 -0
- package/dist/schemas/system.d.ts +86 -0
- package/dist/schemas/system.d.ts.map +1 -0
- package/dist/schemas/system.js +64 -0
- package/dist/schemas/system.js.map +1 -0
- package/dist/schemas/terminal.d.ts +230 -0
- package/dist/schemas/terminal.d.ts.map +1 -0
- package/dist/schemas/terminal.js +133 -0
- package/dist/schemas/terminal.js.map +1 -0
- package/dist/schemas/usage.d.ts +113 -0
- package/dist/schemas/usage.d.ts.map +1 -0
- package/dist/schemas/usage.js +91 -0
- package/dist/schemas/usage.js.map +1 -0
- package/dist/schemas/vpn.d.ts +229 -0
- package/dist/schemas/vpn.d.ts.map +1 -0
- package/dist/schemas/vpn.js +115 -0
- package/dist/schemas/vpn.js.map +1 -0
- package/dist/schemas/webext.d.ts +98 -0
- package/dist/schemas/webext.d.ts.map +1 -0
- package/dist/schemas/webext.js +36 -0
- package/dist/schemas/webext.js.map +1 -0
- package/dist/schemas/workflows.d.ts +881 -0
- package/dist/schemas/workflows.d.ts.map +1 -0
- package/dist/schemas/workflows.js +164 -0
- package/dist/schemas/workflows.js.map +1 -0
- package/dist/schemas/workspace-repos.d.ts +143 -0
- package/dist/schemas/workspace-repos.d.ts.map +1 -0
- package/dist/schemas/workspace-repos.js +87 -0
- package/dist/schemas/workspace-repos.js.map +1 -0
- package/dist/schemas/workspace-search.d.ts +170 -0
- package/dist/schemas/workspace-search.d.ts.map +1 -0
- package/dist/schemas/workspace-search.js +85 -0
- package/dist/schemas/workspace-search.js.map +1 -0
- package/dist/schemas/workspace-setup.d.ts +48 -0
- package/dist/schemas/workspace-setup.d.ts.map +1 -0
- package/dist/schemas/workspace-setup.js +26 -0
- package/dist/schemas/workspace-setup.js.map +1 -0
- package/dist/schemas/workspace-tree.d.ts +120 -0
- package/dist/schemas/workspace-tree.d.ts.map +1 -0
- package/dist/schemas/workspace-tree.js +111 -0
- package/dist/schemas/workspace-tree.js.map +1 -0
- package/dist/webext-links.d.ts +13 -0
- package/dist/webext-links.d.ts.map +1 -0
- package/dist/webext-links.js +24 -0
- package/dist/webext-links.js.map +1 -0
- package/dist/webext-protocol.d.ts +8 -0
- package/dist/webext-protocol.d.ts.map +1 -0
- package/dist/webext-protocol.js +7 -0
- package/dist/webext-protocol.js.map +1 -0
- package/dist/workflow-faults.d.ts +1 -1
- package/dist/workflow-faults.d.ts.map +1 -1
- package/dist/workspace-state.d.ts +2 -2
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +2 -2
- package/dist/workspace-state.js.map +1 -1
- package/package.json +15 -4
- package/src/agent-catalog.test.ts +1 -1
- package/src/agent-catalog.ts +4 -11
- package/src/chores/chores.ts +1 -1
- package/src/chores/probes.ts +1 -1
- package/src/chores/stack.test.ts +19 -0
- package/src/chores/stack.ts +19 -3
- package/src/chores/verdict.test.ts +11 -1
- package/src/chores/verdict.ts +1 -1
- package/src/command-classes.test.ts +378 -0
- package/src/command-classes.ts +378 -0
- package/src/contracts/activity.contract.ts +1 -1
- package/src/contracts/agent.contract.ts +4 -13
- package/src/contracts/agents.contract.ts +6 -6
- package/src/contracts/automations.contract.ts +2 -2
- package/src/contracts/capabilities.contract.ts +3 -4
- package/src/contracts/chores.contract.ts +2 -1
- package/src/contracts/ci.contract.ts +2 -2
- package/src/contracts/claude.contract.ts +2 -2
- package/src/contracts/cursor.contract.ts +2 -2
- package/src/contracts/drafts.contract.ts +2 -1
- package/src/contracts/endpoints.contract.ts +2 -1
- package/src/contracts/exit.contract.ts +2 -1
- package/src/contracts/extensions.contract.ts +5 -5
- package/src/contracts/git.contract.ts +19 -18
- package/src/contracts/grok.contract.ts +2 -1
- package/src/contracts/history.contract.ts +2 -1
- package/src/contracts/host.contract.ts +4 -1
- package/src/contracts/intentic.contract.ts +2 -1
- package/src/contracts/inventory.contract.ts +1 -1
- package/src/contracts/logs.contract.ts +7 -1
- package/src/contracts/loops.contract.ts +2 -2
- package/src/contracts/panels.contract.ts +2 -1
- package/src/contracts/personas.contract.ts +3 -3
- package/src/contracts/ports.contract.ts +3 -2
- package/src/contracts/prepush.contract.ts +2 -1
- package/src/contracts/providers.contract.ts +2 -1
- package/src/contracts/public.contract.ts +3 -2
- package/src/contracts/push.contract.ts +2 -1
- package/src/contracts/runner.contract.ts +18 -2
- package/src/contracts/secrets.contract.ts +2 -1
- package/src/contracts/sessions.contract.ts +1 -1
- package/src/contracts/settings.contract.ts +3 -9
- package/src/contracts/share.contract.ts +3 -2
- package/src/contracts/skills.contract.ts +2 -1
- package/src/contracts/system.contract.ts +6 -9
- package/src/contracts/translator.contract.ts +4 -1
- package/src/contracts/usage.contract.ts +1 -1
- package/src/contracts/vpn.contract.ts +2 -8
- package/src/contracts/webext.contract.ts +37 -0
- package/src/contracts/workflows.contract.ts +2 -2
- package/src/contracts/workspace.contract.ts +10 -12
- package/src/conversation-ids.test.ts +1 -1
- package/src/definition-action.ts +8 -0
- package/src/definition.ts +74 -10
- package/src/events.ts +84 -22
- package/src/fast-tier.ts +1 -1
- package/src/history-state.ts +5 -0
- package/src/host-protocol.ts +1 -1
- package/src/hostnames.test.ts +2 -2
- package/src/index.ts +60 -1
- package/src/listener-protocol.ts +1 -1
- package/src/quick-model.ts +1 -1
- package/src/runner-protocol.ts +35 -5
- package/src/schemas/activity.ts +123 -0
- package/src/schemas/agent.ts +409 -0
- package/src/schemas/agents.ts +802 -0
- package/src/schemas/automations.ts +510 -0
- package/src/schemas/capabilities.ts +729 -0
- package/src/schemas/ci.ts +235 -0
- package/src/schemas/claude-gate.ts +13 -0
- package/src/schemas/codebase-health.ts +64 -0
- package/src/schemas/computers.ts +287 -0
- package/src/schemas/drafts.ts +108 -0
- package/src/schemas/environment.ts +276 -0
- package/src/schemas/exit.ts +222 -0
- package/src/schemas/extension-updates.ts +322 -0
- package/src/schemas/fast-mode.ts +8 -0
- package/src/schemas/git-history.ts +265 -0
- package/src/schemas/git.ts +430 -0
- package/src/schemas/history.ts +112 -0
- package/src/schemas/hosts.ts +37 -0
- package/src/schemas/intentic.ts +2 -0
- package/src/schemas/internal.ts +17 -0
- package/src/schemas/inventory.ts +68 -0
- package/src/schemas/logs.ts +96 -0
- package/src/schemas/loops.ts +401 -0
- package/src/schemas/maintenance.ts +421 -0
- package/src/schemas/marketplace.ts +23 -0
- package/src/schemas/panels.ts +99 -0
- package/src/schemas/personas.ts +281 -0
- package/src/schemas/plan-limits.ts +255 -0
- package/src/schemas/ports.ts +84 -0
- package/src/schemas/provider-oauth.ts +191 -0
- package/src/schemas/provider-subscriptions.ts +11 -0
- package/src/schemas/public.ts +52 -0
- package/src/schemas/push.ts +112 -0
- package/src/schemas/secrets.ts +68 -0
- package/src/schemas/sessions.ts +16 -0
- package/src/schemas/settings.ts +932 -0
- package/src/schemas/share.ts +71 -0
- package/src/schemas/shared.ts +32 -0
- package/src/schemas/system.ts +156 -0
- package/src/schemas/terminal.ts +286 -0
- package/src/schemas/usage.ts +303 -0
- package/src/{schemas.test.ts → schemas/version-seam.test.ts} +4 -2
- package/src/schemas/vpn.ts +215 -0
- package/src/schemas/webext.ts +79 -0
- package/src/schemas/workflows.ts +413 -0
- package/src/schemas/workspace-repos.ts +123 -0
- package/src/schemas/workspace-search.ts +141 -0
- package/src/schemas/workspace-setup.ts +43 -0
- package/src/schemas/workspace-tree.ts +234 -0
- package/src/title.test.ts +1 -1
- package/src/webext-links.ts +80 -0
- package/src/webext-protocol.ts +27 -0
- package/src/workflow-faults.test.ts +1 -1
- package/src/workflow-faults.ts +1 -1
- package/src/workspace-state.test.ts +3 -3
- package/src/workspace-state.ts +8 -13
- package/dist/schemas.d.ts +0 -9909
- package/dist/schemas.d.ts.map +0 -1
- package/dist/schemas.js +0 -4288
- package/dist/schemas.js.map +0 -1
- package/src/schemas.ts +0 -10090
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
// maintenance: the standing evidence a chore is decided from
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { WorkspaceHotspotSchema, WorkspaceKeyModuleSchema } from "./codebase-health.js";
|
|
4
|
+
/* THE DAEMON SERVES FACTS; THE BROWSER DECIDES. Everything below is measurement, what a tool reported, what the
|
|
5
|
+
* manifests say, when a chore last ran. Not one field here says "you should do something", and that is the whole
|
|
6
|
+
* boundary: which chore is DUE is computed by @intentic/sandbox-contract/chores, which both the Maintenance view and its rail
|
|
7
|
+
* badge run, so the number on the tile and the reason in the panel can never disagree. Put the verdict on the wire
|
|
8
|
+
* instead and a daemon one image behind would be quietly arguing with the browser about what needs doing.
|
|
9
|
+
*
|
|
10
|
+
* The split inside the evidence is by COST, not by subject:
|
|
11
|
+
* probes subprocesses (pnpm outdated, pnpm audit, knip, jscpd), minutes, so they are cached on disk with a
|
|
12
|
+
* TTL and refreshed by a background runner. A route hit never waits on one.
|
|
13
|
+
* signals things the daemon already knows, the resident iq index's health ranking, the package manifests it
|
|
14
|
+
* reads for the dependency graph, its own node version. Recomputed per request; all of it is cheap. */
|
|
15
|
+
|
|
16
|
+
export const PROBE_IDS = ["outdated", "audit", "knip", "jscpd", "ui", "bundle"] as const;
|
|
17
|
+
export const ProbeIdSchema = z.enum(PROBE_IDS);
|
|
18
|
+
export type ProbeId = z.infer<typeof ProbeIdSchema>;
|
|
19
|
+
// One dependency the registry has moved past. `kind` is the SEMVER distance, which is the whole reason this is
|
|
20
|
+
// not one number: forty patch releases behind is a morning's work and one major is a project.
|
|
21
|
+
export const OutdatedPackageSchema = z.object({
|
|
22
|
+
name: z.string().describe("The dependency."),
|
|
23
|
+
current: z.string().describe("What you are on."),
|
|
24
|
+
latest: z.string().describe("What is published."),
|
|
25
|
+
kind: z
|
|
26
|
+
.enum(["major", "minor", "patch"])
|
|
27
|
+
.describe(
|
|
28
|
+
"How far apart those are. This is not one number because forty patch releases behind is a morning's work and one major version is a project.",
|
|
29
|
+
),
|
|
30
|
+
// "dependencies" / "devDependencies" / "optionalDependencies", a dev-only major is a different risk.
|
|
31
|
+
section: z
|
|
32
|
+
.string()
|
|
33
|
+
.describe("Which part of the manifest declares it. A major version behind on a build-time tool is a different risk from one that ships."),
|
|
34
|
+
});
|
|
35
|
+
export type OutdatedPackage = z.infer<typeof OutdatedPackageSchema>;
|
|
36
|
+
// One advisory, reduced to what a decision needs. No CVSS vector and no reference list: those are for reading on
|
|
37
|
+
// the advisory page, and carrying them would put a kilobyte of prose per finding on every poll of this route.
|
|
38
|
+
export const AdvisorySchema = z.object({
|
|
39
|
+
name: z.string().describe("The dependency it concerns."),
|
|
40
|
+
severity: z.enum(["critical", "high", "moderate", "low", "info"]).describe("How bad it is said to be."),
|
|
41
|
+
title: z
|
|
42
|
+
.string()
|
|
43
|
+
.describe(
|
|
44
|
+
"What it is, in one line. No scoring vector and no reference list: those are for reading on the advisory's own page, and carrying them would put a kilobyte of prose per finding on every poll.",
|
|
45
|
+
),
|
|
46
|
+
// The range that fixes it, when the advisory names one. Absent ⇒ no patch published yet, which is the case
|
|
47
|
+
// where a chore must NOT offer to bump and say so instead.
|
|
48
|
+
patched: z
|
|
49
|
+
.string()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe(
|
|
52
|
+
"Which versions fix it. Absent means no fix has been published, which is exactly when nothing should offer to upgrade and something should say so instead.",
|
|
53
|
+
),
|
|
54
|
+
// Whether it reaches a production dependency path. A build-time-only tool's transitive CVE is a different
|
|
55
|
+
// problem, and the chore's prompt says so rather than treating every advisory alike.
|
|
56
|
+
dev: z.boolean().describe("Whether it only reaches build-time tooling, which is a different problem from one that reaches what you ship."),
|
|
57
|
+
});
|
|
58
|
+
export type Advisory = z.infer<typeof AdvisorySchema>;
|
|
59
|
+
// knip's counts, by the kind of thing it found unreachable. Counts plus a sample rather than the full list: the
|
|
60
|
+
// agent re-runs knip itself against the live tree (a list from a probe hours old would send it at files that are
|
|
61
|
+
// already gone), so what travels here only has to be enough to decide whether the turn is worth starting.
|
|
62
|
+
export const DeadCodeSchema = z.object({
|
|
63
|
+
files: z.number().int().nonnegative().describe("Files nothing reaches."),
|
|
64
|
+
exports: z.number().int().nonnegative().describe("Exported things nothing uses."),
|
|
65
|
+
types: z.number().int().nonnegative().describe("Types nothing uses."),
|
|
66
|
+
dependencies: z.number().int().nonnegative().describe("Declared dependencies nothing imports."),
|
|
67
|
+
devDependencies: z.number().int().nonnegative().describe("The same, for build-time ones."),
|
|
68
|
+
// A handful of the unreferenced files, for the panel to show instead of asking the reader to take "31" on faith.
|
|
69
|
+
sample: z
|
|
70
|
+
.array(z.string())
|
|
71
|
+
.describe(
|
|
72
|
+
"A handful of the files, so a reader need not take the count on faith. Counts and a sample rather than the whole list, because an agent re-measures against the live tree anyway.",
|
|
73
|
+
),
|
|
74
|
+
});
|
|
75
|
+
export type DeadCode = z.infer<typeof DeadCodeSchema>;
|
|
76
|
+
// jscpd's headline plus the biggest clones. `percentage` is of scanned lines, which is the figure a threshold is
|
|
77
|
+
// worth setting against, a clone COUNT grows with the repo and would mean something different every quarter.
|
|
78
|
+
export const DuplicationSchema = z.object({
|
|
79
|
+
percentage: z
|
|
80
|
+
.number()
|
|
81
|
+
.describe(
|
|
82
|
+
"How much of the scanned code is duplicated. A share rather than a count, because a count grows with the repository and would mean something different every quarter.",
|
|
83
|
+
),
|
|
84
|
+
clones: z.number().int().nonnegative().describe("How many duplicated stretches were found."),
|
|
85
|
+
top: z
|
|
86
|
+
.array(
|
|
87
|
+
z.object({
|
|
88
|
+
lines: z.number().int().nonnegative().describe("How long the duplicated stretch is."),
|
|
89
|
+
first: z.string().describe("One of the two places."),
|
|
90
|
+
second: z.string().describe("The other."),
|
|
91
|
+
}),
|
|
92
|
+
)
|
|
93
|
+
.describe("The largest of them."),
|
|
94
|
+
});
|
|
95
|
+
export type Duplication = z.infer<typeof DuplicationSchema>;
|
|
96
|
+
/* ONE SWEEP OF THE UI SOURCE, serving three chores. Component files, Tailwind classes that hard-code a value, and
|
|
97
|
+
* files still on a replaced framework idiom are three questions about the same tree, and asking them in three
|
|
98
|
+
* probes would walk it three times for nothing.
|
|
99
|
+
*
|
|
100
|
+
* Counts per FILE rather than the matched text. A reader deciding whether to open something is served better by
|
|
101
|
+
* "Checkout.vue · 11 hard-coded values" than by eleven class attributes, and a file path is an identity a digest
|
|
102
|
+
* can be built from while a class string is not. */
|
|
103
|
+
export const UiScanSchema = z.object({
|
|
104
|
+
// Framework-shaped source files, tests, stories and generated output excluded. The inventory that makes a
|
|
105
|
+
// duplication finding a COMPONENT duplication finding rather than a generic one.
|
|
106
|
+
components: z.array(z.string()).describe("The interface's own source files, with tests, stories and generated output left out."),
|
|
107
|
+
// Where the design system was routed around, and how often in each file.
|
|
108
|
+
bypasses: z
|
|
109
|
+
.array(
|
|
110
|
+
z.object({
|
|
111
|
+
path: z.string().describe("The file."),
|
|
112
|
+
count: z.number().int().positive().describe("How many times, in that file."),
|
|
113
|
+
}),
|
|
114
|
+
)
|
|
115
|
+
.describe(
|
|
116
|
+
"Where the design system was routed around and a value hard-coded instead. Counted per file, because a reader deciding what to open is served by a file and a number, not by eleven snippets.",
|
|
117
|
+
),
|
|
118
|
+
// Files still on an idiom their framework has replaced, grouped by which one. `id` is looked up in the stack
|
|
119
|
+
// table rather than enumerated here: the rules are a product decision that ships with the browser, and a
|
|
120
|
+
// daemon an image behind must be able to report one this schema has never heard of.
|
|
121
|
+
idioms: z
|
|
122
|
+
.array(
|
|
123
|
+
z.object({
|
|
124
|
+
id: z
|
|
125
|
+
.string()
|
|
126
|
+
.describe(
|
|
127
|
+
"Which outdated idiom. Looked up rather than listed here, so a sandbox one version behind can still report one this list has never heard of.",
|
|
128
|
+
),
|
|
129
|
+
files: z.array(z.string()).describe("The files still on it."),
|
|
130
|
+
}),
|
|
131
|
+
)
|
|
132
|
+
.describe("Files still written the way their framework has since replaced."),
|
|
133
|
+
});
|
|
134
|
+
export type UiScan = z.infer<typeof UiScanSchema>;
|
|
135
|
+
/* WHAT THE LAST BUILD ACTUALLY PRODUCED. Measured from the build output already on disk, never by running the
|
|
136
|
+
* build: a maintenance probe that mutates the owner's working tree, and `dist/` appearing in their `git status`
|
|
137
|
+
* is exactly that, is a worse surprise than a measurement that is sometimes a commit behind. It also means this
|
|
138
|
+
* never needs the env vars, secrets or network a real production build would.
|
|
139
|
+
*
|
|
140
|
+
* Gzip alongside raw because gzip is what crosses the wire, and the ratio between them is the difference between
|
|
141
|
+
* "this chunk is big" and "this chunk is big and incompressible", which are different problems. */
|
|
142
|
+
export const BundleSchema = z.object({
|
|
143
|
+
// Which directory was measured, so the panel can say what it is talking about rather than implying it built.
|
|
144
|
+
dir: z
|
|
145
|
+
.string()
|
|
146
|
+
.describe(
|
|
147
|
+
"Which folder was measured. Read from build output already on disk rather than by building, so this is sometimes a commit behind and never leaves anything in your working tree.",
|
|
148
|
+
),
|
|
149
|
+
totalBytes: z.number().int().nonnegative().describe("The whole thing, raw."),
|
|
150
|
+
totalGzip: z
|
|
151
|
+
.number()
|
|
152
|
+
.int()
|
|
153
|
+
.nonnegative()
|
|
154
|
+
.describe(
|
|
155
|
+
"The whole thing, compressed. The ratio between the two is the difference between big and big-and-incompressible, which are different problems.",
|
|
156
|
+
),
|
|
157
|
+
assets: z
|
|
158
|
+
.array(
|
|
159
|
+
z.object({
|
|
160
|
+
path: z.string().describe("The file."),
|
|
161
|
+
bytes: z.number().int().nonnegative().describe("Its raw size."),
|
|
162
|
+
gzip: z.number().int().nonnegative().describe("Its compressed size."),
|
|
163
|
+
}),
|
|
164
|
+
)
|
|
165
|
+
.describe("What is in it, piece by piece."),
|
|
166
|
+
});
|
|
167
|
+
export type Bundle = z.infer<typeof BundleSchema>;
|
|
168
|
+
/* One probe's cached result. The three states are deliberately distinct, because a panel that collapses them
|
|
169
|
+
* lies about the most important case:
|
|
170
|
+
* ok the tool ran and reported. `facts` carries its findings, including "nothing found", which is
|
|
171
|
+
* a real answer and the one that keeps a chore quiet.
|
|
172
|
+
* unavailable the tool is not part of this repo (knip is not a devDependency, there is no lockfile to audit).
|
|
173
|
+
* Not a failure and not evidence of health: the chore renders as unmeasured, and can never badge.
|
|
174
|
+
* failed the tool ran and broke, a network-less audit, a jscpd that ran out of memory. Says so, with
|
|
175
|
+
* the tail of what it printed, rather than reading as "clean".
|
|
176
|
+
* Merging `unavailable` into `ok`-with-zeros is how a maintenance surface ends up reporting a green repository
|
|
177
|
+
* it has never actually measured. */
|
|
178
|
+
export const ProbeStateSchema = z.enum(["ok", "unavailable", "failed"]);
|
|
179
|
+
export type ProbeState = z.infer<typeof ProbeStateSchema>;
|
|
180
|
+
// The findings, discriminated by which probe produced them. Absent while the probe has never completed, and on
|
|
181
|
+
// `unavailable`/`failed`, a reader must go through `state` to reach facts, so there is no shape in which a
|
|
182
|
+
// missing measurement can be mistaken for a zero.
|
|
183
|
+
export const ProbeFactsSchema = z.discriminatedUnion("id", [
|
|
184
|
+
z.object({ id: z.literal("outdated"), packages: z.array(OutdatedPackageSchema) }),
|
|
185
|
+
z.object({ id: z.literal("audit"), advisories: z.array(AdvisorySchema) }),
|
|
186
|
+
z.object({ id: z.literal("knip"), deadCode: DeadCodeSchema }),
|
|
187
|
+
z.object({ id: z.literal("jscpd"), duplication: DuplicationSchema }),
|
|
188
|
+
z.object({ id: z.literal("ui"), scan: UiScanSchema }),
|
|
189
|
+
z.object({ id: z.literal("bundle"), bundle: BundleSchema }),
|
|
190
|
+
]);
|
|
191
|
+
export type ProbeFacts = z.infer<typeof ProbeFactsSchema>;
|
|
192
|
+
export const ProbeResultSchema = z.object({
|
|
193
|
+
id: ProbeIdSchema.describe("Which measurement this is."),
|
|
194
|
+
state: ProbeStateSchema.describe(
|
|
195
|
+
"Whether the tool ran and reported, is not part of this repository at all, or broke. The middle one is not evidence of health: the check simply cannot be made here.",
|
|
196
|
+
),
|
|
197
|
+
// When the probe last COMPLETED, the age the panel shows, and what the runner's TTL is measured from.
|
|
198
|
+
ranAt: z.number().describe("When it last finished, in milliseconds, which is what its age is measured from."),
|
|
199
|
+
// How long it took. Shown because a seven-minute jscpd is why the tier-2 refresh is weekly, and a reader
|
|
200
|
+
// deciding whether to force a refresh deserves to know what they are asking for.
|
|
201
|
+
tookMs: z.number().int().nonnegative().describe("How long it took. Worth knowing before asking for it again: some of these run for minutes."),
|
|
202
|
+
facts: ProbeFactsSchema.optional().describe(
|
|
203
|
+
"What it found, including finding nothing, which is a real answer and the one that keeps a chore quiet.",
|
|
204
|
+
),
|
|
205
|
+
// On `failed`, how it broke, a bounded quote of the tool's own output, never a summary of it. On
|
|
206
|
+
// `unavailable`, what is missing, in the probe spec's own words ("no lockfile"): there is no tool output to
|
|
207
|
+
// quote when the tool never ran, and the alternative, a sentence built from the probe's name, would have an
|
|
208
|
+
// unmeasured probe claiming there is nothing to measure.
|
|
209
|
+
reason: z
|
|
210
|
+
.string()
|
|
211
|
+
.optional()
|
|
212
|
+
.describe(
|
|
213
|
+
"Why it broke, quoted from the tool rather than summarised, or, when it never ran, what is missing. Never a sentence built from the check's own name, which would have an unmeasured check claiming there is nothing to measure.",
|
|
214
|
+
),
|
|
215
|
+
});
|
|
216
|
+
export type ProbeResult = z.infer<typeof ProbeResultSchema>;
|
|
217
|
+
// One workspace package as its manifest declares it, what the daemon already reads to build the dependency
|
|
218
|
+
// graph, carried through so chores can reason about the repo's own shape without a probe. `documented` is the
|
|
219
|
+
// one derived field: whether <dir>/README.md exists, a stat per package. A package's architecture document IS
|
|
220
|
+
// its README in this workspace, which is what makes that a stat on the package itself rather than a lookup.
|
|
221
|
+
export const ChorePackageSchema = z.object({
|
|
222
|
+
dir: z.string().describe("Where the package lives."),
|
|
223
|
+
name: z.string().describe("What it declares itself as."),
|
|
224
|
+
// The manifest's `engines` map, verbatim, the runtime chore compares it against what the daemon is running.
|
|
225
|
+
engines: z.record(z.string(), z.string()).optional().describe("Which runtime versions it says it needs, verbatim."),
|
|
226
|
+
dependencies: z.array(z.string()).describe("What it depends on."),
|
|
227
|
+
devDependencies: z.array(z.string()).describe("What it needs only to build."),
|
|
228
|
+
documented: z.boolean().describe("Whether it has a README, which in this workspace is what a package's own documentation is."),
|
|
229
|
+
});
|
|
230
|
+
export type ChorePackage = z.infer<typeof ChorePackageSchema>;
|
|
231
|
+
/* The cheap half of the evidence: what the daemon knows without starting anything. `hotspots` and `keyModules`
|
|
232
|
+
* are the same rankings GET /workspace/health serves, capped tighter, a chore only ever asks whether a file has
|
|
233
|
+
* ENTERED the top of the ranking, so a leaderboard is enough and a full report per repo per poll is not. */
|
|
234
|
+
/* WHAT THIS REPOSITORY IS MADE OF, the facts that decide whether a chore is a QUESTION worth asking of it at
|
|
235
|
+
* all, as opposed to whether the answer happens to be yes.
|
|
236
|
+
*
|
|
237
|
+
* The distinction is the difference between a maintenance surface that reads as attentive and one that reads as
|
|
238
|
+
* generic. "Re-read the documentation against the code" in a repository with no documentation is not a chore
|
|
239
|
+
* that is currently clear, it is a chore that will never make sense here, and showing it teaches the owner that
|
|
240
|
+
* this list was written by someone who had not looked. Same for a Docker chore with no Dockerfile, or a CI chore
|
|
241
|
+
* with no pipeline.
|
|
242
|
+
*
|
|
243
|
+
* These are all paths, deliberately: presence of a FILE is checkable, cheap, and cannot be argued with, which is
|
|
244
|
+
* the same evidence-over-identity rule the extension activation facts follow. Every field is a list rather than a
|
|
245
|
+
* boolean where the paths themselves are worth showing, a chore that says "not applicable: no Dockerfile" is
|
|
246
|
+
* useful, and one that says "3 Dockerfiles: ./Dockerfile, _editor/web/Dockerfile, …" is more so. */
|
|
247
|
+
export const ChoreShapeSchema = z.object({
|
|
248
|
+
// The repository MAP, when one exists (docs/architecture/*.md), capped, the count is what matters, and the
|
|
249
|
+
// drift survey needs to know there is something to re-read. Package pages are READMEs and are counted per
|
|
250
|
+
// package by `ChorePackage.documented`; a repo with a map has been through the documentation flow at all,
|
|
251
|
+
// which is the question this gate actually asks.
|
|
252
|
+
docs: z
|
|
253
|
+
.array(z.string())
|
|
254
|
+
.describe(
|
|
255
|
+
"The repository's own architecture documents, when it has any. Their existence is the question: a repository with none has never been through the documentation flow at all.",
|
|
256
|
+
),
|
|
257
|
+
dockerfiles: z.array(z.string()).describe("Container definitions in it."),
|
|
258
|
+
// CI pipeline definitions: .github/workflows/*.yml, .gitlab-ci.yml, and the other single-file conventions.
|
|
259
|
+
ci: z.array(z.string()).describe("Pipeline definitions in it."),
|
|
260
|
+
// Whether dependencies are resolved to a lockfile, what makes an audit mean anything.
|
|
261
|
+
lockfile: z.boolean().describe("Whether dependencies are pinned to exact versions, which is what makes a security audit mean anything."),
|
|
262
|
+
// A package.json at the repo root. The gate for every chore whose subject is the JavaScript dependency tree:
|
|
263
|
+
// a Rust or Go repository has no majors to be behind on and no engines field to be pinned by, and offering it
|
|
264
|
+
// those chores would be this surface guessing at what it is looking at.
|
|
265
|
+
packageManifest: z
|
|
266
|
+
.boolean()
|
|
267
|
+
.describe(
|
|
268
|
+
"Whether it is a JavaScript project at all. A Rust or Go repository has no majors to be behind on, and offering it those checks would be this surface guessing at what it is looking at.",
|
|
269
|
+
),
|
|
270
|
+
/* EVERY DEPENDENCY NAME DECLARED ANYWHERE IN THE REPO, the root manifest's blocks unioned with every
|
|
271
|
+
* workspace package's, sorted and deduplicated.
|
|
272
|
+
*
|
|
273
|
+
* It is here rather than derived from `packages` because `packages` is EMPTY for a repository that is not a
|
|
274
|
+
* pnpm workspace, and the repositories these names exist to recognise, a Vite app, a Next app, an Angular
|
|
275
|
+
* CLI project, are overwhelmingly single-package. A framework gate built on `packages` would be dark in
|
|
276
|
+
* exactly the repositories it was written for, silently, which is the worst way for a gate to be wrong.
|
|
277
|
+
*
|
|
278
|
+
* NAMES, not a `framework: "react"` verdict. Which names amount to "this is a React app" is a product
|
|
279
|
+
* decision, and product decisions live in the chore book that ships with the browser, a daemon baked into an
|
|
280
|
+
* image months ago must not be the thing that decides Svelte is not a UI framework. */
|
|
281
|
+
deps: z
|
|
282
|
+
.array(z.string())
|
|
283
|
+
.describe(
|
|
284
|
+
"Every dependency name declared anywhere in the repository. Names rather than a verdict about which framework this is, because that judgement belongs to whatever reads this, not to a sandbox baked months ago.",
|
|
285
|
+
),
|
|
286
|
+
});
|
|
287
|
+
export type ChoreShape = z.infer<typeof ChoreShapeSchema>;
|
|
288
|
+
export const ChoreSignalsSchema = z.object({
|
|
289
|
+
packages: z.array(ChorePackageSchema).describe("Each package in the repository, as its own manifest declares it."),
|
|
290
|
+
shape: ChoreShapeSchema.describe("What the repository is made of, which decides whether a given chore is even a sensible question to ask of it."),
|
|
291
|
+
hotspots: z
|
|
292
|
+
.array(WorkspaceHotspotSchema)
|
|
293
|
+
.describe(
|
|
294
|
+
"Files that change often and are complicated at once, capped tight: a chore only asks whether something has entered the top of the ranking.",
|
|
295
|
+
),
|
|
296
|
+
keyModules: z.array(WorkspaceKeyModuleSchema).describe("The parts the rest of the code leans on most, capped the same way."),
|
|
297
|
+
totals: z
|
|
298
|
+
.object({
|
|
299
|
+
files: z.number().describe("Files counted."),
|
|
300
|
+
symbols: z.number().describe("Named things they export."),
|
|
301
|
+
complexity: z.number().describe("Branch points added up."),
|
|
302
|
+
hotspots: z.number().describe("How many files qualify as hotspots at all."),
|
|
303
|
+
})
|
|
304
|
+
.describe("The repository in numbers."),
|
|
305
|
+
// Whether the index these rankings came from is current. A chore must not fire on a half-built index, and
|
|
306
|
+
// this is how the browser knows to hold its verdict rather than act on a partial ranking.
|
|
307
|
+
indexed: z.boolean().describe("Whether the index these rankings came from is finished. Nothing should act on a half-built one."),
|
|
308
|
+
});
|
|
309
|
+
export type ChoreSignals = z.infer<typeof ChoreSignalsSchema>;
|
|
310
|
+
// What a finished chore turn left behind, written by the agent, read back to decide whether the chore is still
|
|
311
|
+
// due. `clean` is the important one: an agent that looked and found the tool's findings to be false positives
|
|
312
|
+
// must be able to say so, or the next poll starts the same turn again forever.
|
|
313
|
+
export const ChoreOutcomeSchema = z.enum(["acted", "reported", "clean"]);
|
|
314
|
+
export type ChoreOutcome = z.infer<typeof ChoreOutcomeSchema>;
|
|
315
|
+
/* One chore's history in one repo. The DIGEST is what makes this a debounce rather than a suppression: it is a
|
|
316
|
+
* hash of the evidence that was standing when the turn ran, so a chore whose evidence has since changed is due
|
|
317
|
+
* again on its own merits while one whose evidence is unchanged stays quiet, with the run still visible in the
|
|
318
|
+
* panel, saying when it ran and what it concluded. Nothing here can hide a chore from the view; it only decides
|
|
319
|
+
* whether the rail is allowed to speak. */
|
|
320
|
+
export const ChoreLedgerEntrySchema = z.object({
|
|
321
|
+
repo: z.string().describe("Which repository."),
|
|
322
|
+
chore: z.string().describe("Which chore."),
|
|
323
|
+
ranAt: z.number().describe("When it ran, in milliseconds."),
|
|
324
|
+
runId: z.string().describe("The conversation that ran it, so its whole record can be opened."),
|
|
325
|
+
outcome: ChoreOutcomeSchema.describe(
|
|
326
|
+
"What it concluded: it did something, it wrote something down, or it looked and found the finding to be false. That last one matters most, or the same turn starts again for ever.",
|
|
327
|
+
),
|
|
328
|
+
digest: z
|
|
329
|
+
.string()
|
|
330
|
+
.describe(
|
|
331
|
+
"A fingerprint of the evidence standing at the time. A chore whose evidence has since changed is due again on its own merits; one whose evidence has not stays quiet.",
|
|
332
|
+
),
|
|
333
|
+
// Set by the owner from the panel, the chore stays visible and stays out of the badge until this passes.
|
|
334
|
+
// Distinct from opting out, which is the absence of the chore from `enabled` in the sandbox's settings.
|
|
335
|
+
snoozedUntil: z
|
|
336
|
+
.number()
|
|
337
|
+
.optional()
|
|
338
|
+
.describe(
|
|
339
|
+
"Not until then, in milliseconds. The chore stays visible and stays out of the badge. Different from switching it off, which is a setting.",
|
|
340
|
+
),
|
|
341
|
+
});
|
|
342
|
+
export type ChoreLedgerEntry = z.infer<typeof ChoreLedgerEntrySchema>;
|
|
343
|
+
/* A measurement that is HAPPENING, as opposed to one that has happened. The probe cache can only ever describe
|
|
344
|
+
* finished work, `ranAt` is the completion stamp, so a surface reading it alone has no way to say "we are
|
|
345
|
+
* measuring this right now", and the panel's re-measure button spent its whole life looking like it did nothing:
|
|
346
|
+
* the request is an ack, the sweep takes minutes, and every visible fact on the row went on describing the
|
|
347
|
+
* measurement it was replacing.
|
|
348
|
+
*
|
|
349
|
+
* `startedAt` is when the probe actually began, absent while it is still waiting behind another one, the runner
|
|
350
|
+
* has ONE lane across the whole sandbox, so "queued" is a real and common state, and a reader told "measuring"
|
|
351
|
+
* about a probe that has not started is being lied to about how long it has left. */
|
|
352
|
+
export const RunningProbeSchema = z.object({
|
|
353
|
+
repo: z.string().describe("Which repository."),
|
|
354
|
+
id: ProbeIdSchema.describe("Which measurement."),
|
|
355
|
+
// When this was asked for. Always present, so a waiting probe can still say how long it has been waiting.
|
|
356
|
+
askedAt: z.number().describe("When it was asked for, in milliseconds, so one still waiting can say how long it has waited."),
|
|
357
|
+
startedAt: z
|
|
358
|
+
.number()
|
|
359
|
+
.optional()
|
|
360
|
+
.describe(
|
|
361
|
+
"When it actually began. Absent while it is queued behind another, which is a real and common state: there is one lane for the whole sandbox.",
|
|
362
|
+
),
|
|
363
|
+
});
|
|
364
|
+
export type RunningProbe = z.infer<typeof RunningProbeSchema>;
|
|
365
|
+
// GET /chores, every discovered repo's standing evidence, plus the ledger, in one read. One route rather than
|
|
366
|
+
// one per repo because the rail badge scans ALL of them on a timer, and N requests a minute to answer "is
|
|
367
|
+
// anything due" is the kind of poll that shows up in a battery graph.
|
|
368
|
+
export const ChoresReportSchema = z.object({
|
|
369
|
+
repos: z
|
|
370
|
+
.array(
|
|
371
|
+
z.object({
|
|
372
|
+
repo: z.string().describe("Which repository."),
|
|
373
|
+
probes: z
|
|
374
|
+
.array(ProbeResultSchema)
|
|
375
|
+
.describe("The expensive measurements, served from a cache with an age on each rather than run on demand."),
|
|
376
|
+
signals: ChoreSignalsSchema.describe("The cheap facts, worked out fresh every time."),
|
|
377
|
+
}),
|
|
378
|
+
)
|
|
379
|
+
.describe(
|
|
380
|
+
"Every repository's standing evidence. One answer for all of them, because a badge polls this on a timer and one request per repository is the kind of poll that shows up in a battery graph.",
|
|
381
|
+
),
|
|
382
|
+
ledger: z.array(ChoreLedgerEntrySchema).describe("What has already been done about all of it."),
|
|
383
|
+
// What the runner is measuring and what is waiting behind it, right now. Part of the standing read rather
|
|
384
|
+
// than a route of its own: it is the same question ("what does this repo currently say") asked about work in
|
|
385
|
+
// flight, and a panel that had to ask twice would show the two halves disagreeing.
|
|
386
|
+
running: z
|
|
387
|
+
.array(RunningProbeSchema)
|
|
388
|
+
.describe(
|
|
389
|
+
"What is being measured right now and what is waiting behind it. Part of this read rather than a route of its own, because a screen that had to ask twice would show the two halves disagreeing.",
|
|
390
|
+
),
|
|
391
|
+
// The daemon's own runtime, for the chore that asks whether this sandbox is running something end-of-life.
|
|
392
|
+
// Read off the process rather than a manifest: what is INSTALLED is the fact that matters, and an `engines`
|
|
393
|
+
// range is a wish.
|
|
394
|
+
node: z
|
|
395
|
+
.string()
|
|
396
|
+
.describe(
|
|
397
|
+
"The runtime version this sandbox is actually running, read off the process rather than off a manifest, because what is installed is the fact that matters and a declared range is a wish.",
|
|
398
|
+
),
|
|
399
|
+
});
|
|
400
|
+
export type ChoresReport = z.infer<typeof ChoresReportSchema>;
|
|
401
|
+
// POST /chores/probe, force one probe to re-run now, ahead of its TTL. Returns immediately; the runner does the
|
|
402
|
+
// work and the next GET /chores carries the result, the same shape the panel already polls.
|
|
403
|
+
export const ChoreProbeRequestSchema = z.object({
|
|
404
|
+
repo: z.string().min(1).describe("Which repository."),
|
|
405
|
+
id: ProbeIdSchema.describe("Which measurement to retake, ahead of its usual schedule."),
|
|
406
|
+
});
|
|
407
|
+
// POST /chores/ledger, record a run, or snooze. Written daemon-side rather than by the browser so a chore turn
|
|
408
|
+
// started from anywhere (the panel, an automation, the agent itself) lands in one ledger.
|
|
409
|
+
export const ChoreLedgerWriteSchema = ChoreLedgerEntrySchema;
|
|
410
|
+
/* One publishability check and what it found. `warn` is a real third state, not a soft failure: the permissions
|
|
411
|
+
* check has nothing to say about an extension nobody has exercised yet, and reporting that as a pass would be
|
|
412
|
+
* the check lying at the exact moment it matters most. */
|
|
413
|
+
export const ReadinessCheckSchema = z.object({
|
|
414
|
+
id: z.string().describe("Which check."),
|
|
415
|
+
label: z.string().describe("What it is called."),
|
|
416
|
+
status: z.enum(["pass", "warn", "fail"]).describe("How it went. A warning is a real third answer rather than a soft failure."),
|
|
417
|
+
detail: z.string().describe("What it found."),
|
|
418
|
+
});
|
|
419
|
+
export const ExtensionReadinessSchema = z.object({
|
|
420
|
+
checks: z.array(ReadinessCheckSchema).describe("Everything that can be checked from the extension's own files, for an author about to publish."),
|
|
421
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// The extension marketplace request and its answer.
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { RegistryEntrySchema } from "@intentic/registry";
|
|
4
|
+
// Browse an extension/plugin registry (a git repo with .claude-plugin/marketplace.json, see
|
|
5
|
+
// @intentic/registry for the format). POST so the optional token for a private registry never rides a URL or
|
|
6
|
+
// an access log.
|
|
7
|
+
export const MarketplaceRequestSchema = z.object({
|
|
8
|
+
url: z.url().describe("The registry to read."),
|
|
9
|
+
token: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("A credential for a private one. Sent as a body rather than in the address, so it never lands in a log."),
|
|
14
|
+
});
|
|
15
|
+
// The rows are RegistryEntry, the curated decision joined to the resolved pointer and the scanner's upstream
|
|
16
|
+
// facts, exactly as the site's gallery renders them, so browsing in the app and browsing the web show one list.
|
|
17
|
+
export const MarketplaceSchema = z.object({
|
|
18
|
+
name: z.string().describe("What the registry calls itself."),
|
|
19
|
+
plugins: z
|
|
20
|
+
.array(RegistryEntrySchema)
|
|
21
|
+
.describe("What it lists, each with the curated decision, the resolved pointer and what a scan found upstream."),
|
|
22
|
+
});
|
|
23
|
+
export type Marketplace = z.infer<typeof MarketplaceSchema>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// panels: per-repository dev servers + the content facts extensions detect on
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
// Every discovered git repo under /work is one list row: its runnable-panel runtime status (a `dev` script at
|
|
4
|
+
// operator/ or the repo root; the daemon runs it, auto-assigns a free port, and the preview proxy routes
|
|
5
|
+
// preview-<panelKey>-<sandboxId>.<zone> to it) PLUS content facts, evidence the web app's extensions run their
|
|
6
|
+
// detect() over, computed daemon-side in one pass so the browser never scans /work file-by-file.
|
|
7
|
+
|
|
8
|
+
export const PanelSummarySchema = z.object({
|
|
9
|
+
// The repo id: its root-relative dir under /work (slashes become `--` in the preview subdomain label).
|
|
10
|
+
repo: z.string().describe("Which repository."),
|
|
11
|
+
// Whether the repo ships a runnable dev server (a package.json `dev` script at operator/ or the root).
|
|
12
|
+
hasPanel: z.boolean().describe("Whether it has anything runnable at all."),
|
|
13
|
+
running: z.boolean().describe("Whether the sandbox has it running."),
|
|
14
|
+
// Whether anything this repo owns is answering, see `servers`. Not the same question as `running`: a panel
|
|
15
|
+
// whose install is still going is running and not yet healthy, and a dev server someone started in their own
|
|
16
|
+
// terminal is healthy without the daemon running it.
|
|
17
|
+
healthy: z
|
|
18
|
+
.boolean()
|
|
19
|
+
.describe(
|
|
20
|
+
"Whether anything it owns is actually answering. A different question: a server still installing is running and not yet healthy, and one somebody started by hand is healthy without the sandbox running it.",
|
|
21
|
+
),
|
|
22
|
+
// The dev server's OS-assigned port; absent when not running. What the daemon TOLD the repo to bind (the
|
|
23
|
+
// preview proxy forwards it), `servers` is what the repo actually bound, which for a repo that pins its own
|
|
24
|
+
// ports is a different number entirely.
|
|
25
|
+
port: z
|
|
26
|
+
.number()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe(
|
|
29
|
+
"The port the sandbox told it to use. What it actually bound is below, and for a repository that pins its own ports those are different numbers.",
|
|
30
|
+
),
|
|
31
|
+
// Every dev server the repo is really serving, discovered from the sandbox's listening sockets and probed for
|
|
32
|
+
// the scheme each speaks (a Vite on a committed dev cert serves https). One entry for the ordinary repo; a
|
|
33
|
+
// monorepo whose `dev` fans out across packages has one per app, which is why `dir` is here, `_editor/web` vs
|
|
34
|
+
// `_site/site` is the only thing that tells them apart. Empty when nothing answers.
|
|
35
|
+
//
|
|
36
|
+
// `session` is the terminal it is running in: the panel's own when the daemon started it, the user's when
|
|
37
|
+
// they ran it by hand, and ABSENT when nothing in the sandbox owns it. That last case is the one worth
|
|
38
|
+
// designing for, the repo is plainly answering, and no terminal here can show, stop or restart it.
|
|
39
|
+
servers: z
|
|
40
|
+
.array(
|
|
41
|
+
z.object({
|
|
42
|
+
// The port itself, not just the URL it appears in: forwarding one is how a repo answering on
|
|
43
|
+
// several ports becomes previewable at all, and that call takes a number.
|
|
44
|
+
port: z.number().describe("The port it is listening on, which is what forwarding it takes."),
|
|
45
|
+
url: z.string().describe("Where it answers, with the right scheme: a server on its own certificate is served over https."),
|
|
46
|
+
dir: z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe(
|
|
50
|
+
"Which part of the repository it belongs to, which for a repository whose dev command fans out is the only thing telling them apart.",
|
|
51
|
+
),
|
|
52
|
+
session: z
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe(
|
|
56
|
+
"The terminal it runs in: the sandbox's when it started it, yours when you did, and absent when nothing here owns it, which is the case worth designing for.",
|
|
57
|
+
),
|
|
58
|
+
}),
|
|
59
|
+
)
|
|
60
|
+
.describe("Every server this repository is really serving, found by looking at what is listening. Empty when nothing answers."),
|
|
61
|
+
/* https://preview-<repo>-<sandboxId>.<zone>, and ONLY where that address actually serves this repo: absent
|
|
62
|
+
* on a sandbox with no zone or connect token (loopback/tests), and absent whenever the preview proxy has
|
|
63
|
+
* nothing to route it to — nothing running, still starting, or (the ordinary monorepo) several dev servers
|
|
64
|
+
* on ports of their own, none of which one hostname can stand for. Present ⇒ safe to open or frame, which
|
|
65
|
+
* is what stops a surface from showing a 502 as if it were the app. */
|
|
66
|
+
previewUrl: z
|
|
67
|
+
.string()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe("Where to open it from outside, present only while that address really serves it. Absent on a sandbox with no outside address."),
|
|
70
|
+
// The workspace role this repo dir occupies (the three fixed dirs); absent for extra clones.
|
|
71
|
+
role: z
|
|
72
|
+
.enum(["intent", "desired-state", "app"])
|
|
73
|
+
.optional()
|
|
74
|
+
.describe("Which of the workspace's three fixed roles this repository fills. Absent for one that was simply cloned in."),
|
|
75
|
+
// Content facts: deploy.config.ts (the intent ledger's day-one marker), desired-state.json (present after
|
|
76
|
+
// the first resolve), .intentic/ui/index.html (a sandboxed directory UI), pnpm-workspace.yaml +
|
|
77
|
+
// turbo.json (a pnpm+turbo monorepo), vitest evidence (a root vitest.config.ts, or "vitest" in the
|
|
78
|
+
// root manifest / workspace catalog), docs/user-stories (a directory of stories an agent can test
|
|
79
|
+
// against the running app, the one fact here that says nothing about the repo's language), and
|
|
80
|
+
// docs/architecture (the repo carries generated architecture documentation).
|
|
81
|
+
deployConfig: z.boolean().describe("It declares infrastructure."),
|
|
82
|
+
desiredState: z.boolean().describe("That declaration has been resolved at least once."),
|
|
83
|
+
directoryUi: z.boolean().describe("It carries a small interface of its own."),
|
|
84
|
+
monorepo: z.boolean().describe("It holds several packages."),
|
|
85
|
+
vitest: z.boolean().describe("It has tests that can be run."),
|
|
86
|
+
userStories: z
|
|
87
|
+
.boolean()
|
|
88
|
+
.describe("It carries stories an agent could test the running app against. The one fact here that says nothing about the language."),
|
|
89
|
+
docs: z.boolean().describe("It carries generated architecture documentation."),
|
|
90
|
+
});
|
|
91
|
+
export type PanelSummary = z.infer<typeof PanelSummarySchema>;
|
|
92
|
+
export const PanelsListSchema = z.object({
|
|
93
|
+
panels: z
|
|
94
|
+
.array(PanelSummarySchema)
|
|
95
|
+
.describe("One entry per repository, worked out in a single pass so nothing has to walk the workspace file by file."),
|
|
96
|
+
});
|
|
97
|
+
export type PanelsList = z.infer<typeof PanelsListSchema>;
|
|
98
|
+
// The {repo} path param on the start/stop/terminals routes (a bare string: unknown repo is a handler NOT_FOUND).
|
|
99
|
+
export const PanelRepoParamSchema = z.object({ repo: z.string().describe("Which repository.") });
|