@intentic/sandbox-contract 1.248.0 → 1.250.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 +18 -15
- package/dist/chores/chores.d.ts.map +1 -1
- package/dist/chores/chores.js.map +1 -1
- package/dist/chores/digest.d.ts.map +1 -1
- package/dist/chores/digest.js.map +1 -1
- package/dist/chores/extension-update.d.ts.map +1 -1
- package/dist/chores/extension-update.js.map +1 -1
- package/dist/chores/fix-deps.d.ts.map +1 -1
- package/dist/chores/fix-deps.js.map +1 -1
- package/dist/chores/index.d.ts +2 -2
- package/dist/chores/index.d.ts.map +1 -1
- package/dist/chores/index.js +1 -1
- package/dist/chores/index.js.map +1 -1
- package/dist/chores/probes.d.ts.map +1 -1
- package/dist/chores/probes.js.map +1 -1
- package/dist/chores/prompt.d.ts.map +1 -1
- package/dist/chores/prompt.js.map +1 -1
- package/dist/chores/stack.d.ts.map +1 -1
- package/dist/chores/stack.js.map +1 -1
- package/dist/chores/verdict.d.ts +7 -1
- package/dist/chores/verdict.d.ts.map +1 -1
- package/dist/chores/verdict.js +8 -0
- package/dist/chores/verdict.js.map +1 -1
- package/dist/contracts/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/accounts.contract.js.map +1 -1
- package/dist/contracts/activity.contract.d.ts +1 -0
- package/dist/contracts/activity.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +12 -205
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +2 -1
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +228 -54
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +11 -2
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/automations.contract.d.ts +35 -17
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.js +10 -1
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +0 -12
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +1 -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.map +1 -1
- package/dist/contracts/ci.contract.d.ts +9 -0
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/endpoints.contract.d.ts.map +1 -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 +1 -1
- package/dist/contracts/exit.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts +45 -6
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.js +9 -9
- package/dist/contracts/git.contract.js.map +1 -1
- package/dist/contracts/host.contract.d.ts +2 -0
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/host.contract.js.map +1 -1
- package/dist/contracts/intentic.contract.js +1 -1
- package/dist/contracts/intentic.contract.js.map +1 -1
- package/dist/contracts/logs.contract.d.ts.map +1 -1
- package/dist/contracts/logs.contract.js.map +1 -1
- package/dist/contracts/loops.contract.d.ts.map +1 -1
- package/dist/contracts/loops.contract.js.map +1 -1
- package/dist/contracts/personas.contract.d.ts +1 -0
- package/dist/contracts/personas.contract.d.ts.map +1 -1
- package/dist/contracts/personas.contract.js +1 -1
- package/dist/contracts/personas.contract.js.map +1 -1
- package/dist/contracts/providers.contract.d.ts.map +1 -1
- package/dist/contracts/providers.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +97 -171
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +2 -2
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/safety.contract.d.ts.map +1 -1
- package/dist/contracts/safety.contract.js +1 -1
- package/dist/contracts/safety.contract.js.map +1 -1
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +2 -41
- package/dist/contracts/sessions.contract.d.ts.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 +8 -18
- package/dist/contracts/settings.contract.d.ts.map +1 -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.map +1 -1
- package/dist/contracts/skills.contract.d.ts +6 -0
- package/dist/contracts/skills.contract.d.ts.map +1 -1
- package/dist/contracts/skills.contract.js +13 -4
- package/dist/contracts/skills.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +49 -73
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +12 -2
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/usage.contract.d.ts.map +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 +1 -1
- package/dist/contracts/vpn.contract.js.map +1 -1
- package/dist/contracts/webext.contract.d.ts.map +1 -1
- package/dist/contracts/webext.contract.js.map +1 -1
- package/dist/contracts/workflows.contract.d.ts +7 -6
- package/dist/contracts/workflows.contract.d.ts.map +1 -1
- package/dist/contracts/workflows.contract.js +12 -3
- package/dist/contracts/workflows.contract.js.map +1 -1
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +1237 -0
- package/dist/events/agent-events.d.ts.map +1 -0
- package/dist/events/agent-events.js +226 -0
- package/dist/events/agent-events.js.map +1 -0
- package/dist/events/cards.d.ts +404 -0
- package/dist/events/cards.d.ts.map +1 -0
- package/dist/events/cards.js +179 -0
- package/dist/events/cards.js.map +1 -0
- package/dist/events/resume.d.ts +23 -0
- package/dist/events/resume.d.ts.map +1 -0
- package/dist/events/resume.js +31 -0
- package/dist/events/resume.js.map +1 -0
- package/dist/events/system-events.d.ts +615 -0
- package/dist/events/system-events.d.ts.map +1 -0
- package/dist/events/system-events.js +64 -0
- package/dist/events/system-events.js.map +1 -0
- package/dist/events/transcript.d.ts +1755 -0
- package/dist/events/transcript.d.ts.map +1 -0
- package/dist/events/transcript.js +205 -0
- package/dist/events/transcript.js.map +1 -0
- package/dist/ids/conversation-ids.d.ts +8 -0
- package/dist/ids/conversation-ids.d.ts.map +1 -0
- package/dist/{conversation-ids.js → ids/conversation-ids.js} +13 -0
- package/dist/ids/conversation-ids.js.map +1 -0
- package/dist/ids/hostnames.d.ts.map +1 -0
- package/dist/ids/hostnames.js.map +1 -0
- package/dist/ids/session-names.d.ts.map +1 -0
- package/dist/ids/session-names.js.map +1 -0
- package/dist/ids/share-paths.d.ts.map +1 -0
- package/dist/ids/share-paths.js.map +1 -0
- package/dist/{tunnel-ids.d.ts → ids/tunnel-ids.d.ts} +1 -0
- package/dist/ids/tunnel-ids.d.ts.map +1 -0
- package/dist/{tunnel-ids.js → ids/tunnel-ids.js} +1 -0
- package/dist/ids/tunnel-ids.js.map +1 -0
- package/dist/index.d.ts +429 -450
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -46
- package/dist/index.js.map +1 -1
- package/dist/{agent-catalog.d.ts → models/agent-catalog.d.ts} +2 -2
- package/dist/models/agent-catalog.d.ts.map +1 -0
- package/dist/models/agent-catalog.js.map +1 -0
- package/dist/models/agent-runtimes.d.ts.map +1 -0
- package/dist/models/agent-runtimes.js.map +1 -0
- package/dist/{fast-tier.d.ts → models/fast-tier.d.ts} +1 -1
- package/dist/models/fast-tier.d.ts.map +1 -0
- package/dist/models/fast-tier.js.map +1 -0
- package/dist/models/model-order.d.ts.map +1 -0
- package/dist/{model-order.js → models/model-order.js} +2 -0
- package/dist/models/model-order.js.map +1 -0
- package/dist/{model-pins.d.ts → models/model-pins.d.ts} +1 -1
- package/dist/models/model-pins.d.ts.map +1 -0
- package/dist/models/model-pins.js.map +1 -0
- package/dist/{model-roles.d.ts → models/model-roles.d.ts} +0 -33
- package/dist/models/model-roles.d.ts.map +1 -0
- package/dist/{model-roles.js → models/model-roles.js} +0 -35
- package/dist/models/model-roles.js.map +1 -0
- package/dist/{plan-pools.d.ts → models/plan-pools.d.ts} +1 -1
- package/dist/models/plan-pools.d.ts.map +1 -0
- package/dist/models/plan-pools.js.map +1 -0
- package/dist/models/prompt-complexity.d.ts.map +1 -0
- package/dist/models/prompt-complexity.js.map +1 -0
- package/dist/models/provider-specs.d.ts.map +1 -0
- package/dist/models/provider-specs.js.map +1 -0
- package/dist/policy/approvals-execution.d.ts.map +1 -0
- package/dist/policy/approvals-execution.js.map +1 -0
- package/dist/{batch-runs.d.ts → policy/batch-runs.d.ts} +5 -1
- package/dist/policy/batch-runs.d.ts.map +1 -0
- package/dist/{batch-runs.js → policy/batch-runs.js} +10 -7
- package/dist/policy/batch-runs.js.map +1 -0
- package/dist/policy/capability-env.d.ts.map +1 -0
- package/dist/policy/capability-env.js.map +1 -0
- package/dist/policy/capability-secrets.d.ts.map +1 -0
- package/dist/policy/capability-secrets.js.map +1 -0
- package/dist/{card-status.d.ts → policy/card-status.d.ts} +2 -2
- package/dist/policy/card-status.d.ts.map +1 -0
- package/dist/{card-status.js → policy/card-status.js} +1 -5
- package/dist/policy/card-status.js.map +1 -0
- package/dist/{command-classes.d.ts → policy/command-classes.d.ts} +6 -2
- package/dist/policy/command-classes.d.ts.map +1 -0
- package/dist/{command-classes.js → policy/command-classes.js} +48 -11
- package/dist/policy/command-classes.js.map +1 -0
- package/dist/{command-run.d.ts → policy/command-run.d.ts} +1 -1
- package/dist/policy/command-run.d.ts.map +1 -0
- package/dist/policy/command-run.js.map +1 -0
- package/dist/policy/control-scopes.d.ts +16 -0
- package/dist/policy/control-scopes.d.ts.map +1 -0
- package/dist/policy/control-scopes.js +26 -0
- package/dist/policy/control-scopes.js.map +1 -0
- package/dist/policy/credential-material.d.ts.map +1 -0
- package/dist/policy/credential-material.js.map +1 -0
- package/dist/policy/needs-action.d.ts.map +1 -0
- package/dist/policy/needs-action.js.map +1 -0
- package/dist/policy/output-fields.d.ts.map +1 -0
- package/dist/policy/output-fields.js.map +1 -0
- package/dist/policy/overlay-lint.d.ts.map +1 -0
- package/dist/policy/overlay-lint.js.map +1 -0
- package/dist/policy/owner-ticket.d.ts.map +1 -0
- package/dist/{owner-ticket.js → policy/owner-ticket.js} +1 -1
- package/dist/policy/owner-ticket.js.map +1 -0
- package/dist/{safety-policy.d.ts → policy/safety-policy.d.ts} +6 -5
- package/dist/policy/safety-policy.d.ts.map +1 -0
- package/dist/{safety-policy.js → policy/safety-policy.js} +12 -12
- package/dist/policy/safety-policy.js.map +1 -0
- package/dist/policy/search-globs.d.ts.map +1 -0
- package/dist/policy/search-globs.js.map +1 -0
- package/dist/protocol/container-requirements.d.ts +20 -0
- package/dist/protocol/container-requirements.d.ts.map +1 -0
- package/dist/protocol/container-requirements.js +23 -0
- package/dist/protocol/container-requirements.js.map +1 -0
- package/dist/{host-protocol.d.ts → protocol/host-protocol.d.ts} +1 -0
- package/dist/protocol/host-protocol.d.ts.map +1 -0
- package/dist/{host-protocol.js → protocol/host-protocol.js} +1 -0
- package/dist/protocol/host-protocol.js.map +1 -0
- package/dist/protocol/ingress-contract.d.ts.map +1 -0
- package/dist/{ingress-contract.js → protocol/ingress-contract.js} +1 -1
- package/dist/protocol/ingress-contract.js.map +1 -0
- package/dist/protocol/ingress-protocol.d.ts.map +1 -0
- package/dist/protocol/ingress-protocol.js.map +1 -0
- package/dist/protocol/listener-protocol.d.ts.map +1 -0
- package/dist/{listener-protocol.js → protocol/listener-protocol.js} +1 -1
- package/dist/protocol/listener-protocol.js.map +1 -0
- package/dist/{peer-dial.d.ts → protocol/peer-dial.d.ts} +4 -1
- package/dist/protocol/peer-dial.d.ts.map +1 -0
- package/dist/{peer-dial.js → protocol/peer-dial.js} +51 -10
- package/dist/protocol/peer-dial.js.map +1 -0
- package/dist/protocol/peer-mcp-server.d.ts.map +1 -0
- package/dist/protocol/peer-mcp-server.js.map +1 -0
- package/dist/protocol/request-id.d.ts.map +1 -0
- package/dist/protocol/request-id.js.map +1 -0
- package/dist/protocol/routes.d.ts.map +1 -0
- package/dist/protocol/routes.js.map +1 -0
- package/dist/{runner-protocol.d.ts → protocol/runner-protocol.d.ts} +1 -0
- package/dist/protocol/runner-protocol.d.ts.map +1 -0
- package/dist/{runner-protocol.js → protocol/runner-protocol.js} +2 -1
- package/dist/protocol/runner-protocol.js.map +1 -0
- package/dist/protocol/sse.d.ts.map +1 -0
- package/dist/protocol/sse.js.map +1 -0
- package/dist/{terminal-protocol.d.ts → protocol/terminal-protocol.d.ts} +1 -3
- package/dist/protocol/terminal-protocol.d.ts.map +1 -0
- package/dist/protocol/terminal-protocol.js.map +1 -0
- package/dist/protocol/webext-links.d.ts.map +1 -0
- package/dist/protocol/webext-links.js.map +1 -0
- package/dist/{webext-protocol.d.ts → protocol/webext-protocol.d.ts} +1 -0
- package/dist/protocol/webext-protocol.d.ts.map +1 -0
- package/dist/{webext-protocol.js → protocol/webext-protocol.js} +1 -0
- package/dist/protocol/webext-protocol.js.map +1 -0
- package/dist/schemas/activity.d.ts +2 -0
- package/dist/schemas/activity.d.ts.map +1 -1
- package/dist/schemas/activity.js +4 -0
- package/dist/schemas/activity.js.map +1 -1
- package/dist/schemas/agent.d.ts +16 -4
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +21 -4
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents.d.ts +17 -4
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +15 -4
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/approvals.d.ts.map +1 -1
- package/dist/schemas/approvals.js.map +1 -1
- package/dist/schemas/automations.d.ts +54 -28
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +26 -8
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/capabilities.d.ts +0 -8
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +0 -4
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/ci.d.ts +10 -0
- package/dist/schemas/ci.d.ts.map +1 -1
- package/dist/schemas/ci.js +9 -1
- package/dist/schemas/ci.js.map +1 -1
- package/dist/schemas/codebase-health.d.ts.map +1 -1
- package/dist/schemas/codebase-health.js.map +1 -1
- package/dist/schemas/devices.d.ts +92 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +12 -1
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/engines.d.ts.map +1 -1
- package/dist/schemas/engines.js.map +1 -1
- package/dist/schemas/environment.d.ts.map +1 -1
- package/dist/schemas/environment.js.map +1 -1
- package/dist/schemas/exit.d.ts.map +1 -1
- package/dist/schemas/exit.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js.map +1 -1
- package/dist/schemas/git-history.d.ts.map +1 -1
- package/dist/schemas/git-history.js.map +1 -1
- package/dist/schemas/git.d.ts +80 -16
- package/dist/schemas/git.d.ts.map +1 -1
- package/dist/schemas/git.js +37 -25
- package/dist/schemas/git.js.map +1 -1
- package/dist/schemas/history.d.ts.map +1 -1
- package/dist/schemas/history.js.map +1 -1
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/inventory.d.ts.map +1 -1
- package/dist/schemas/inventory.js.map +1 -1
- package/dist/schemas/issues.d.ts +0 -1
- package/dist/schemas/issues.d.ts.map +1 -1
- package/dist/schemas/issues.js +0 -1
- package/dist/schemas/issues.js.map +1 -1
- package/dist/schemas/logs.d.ts.map +1 -1
- package/dist/schemas/logs.js.map +1 -1
- package/dist/schemas/loops.d.ts.map +1 -1
- package/dist/schemas/loops.js +1 -1
- package/dist/schemas/loops.js.map +1 -1
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/marketplace.d.ts +0 -4
- package/dist/schemas/marketplace.d.ts.map +1 -1
- package/dist/schemas/panels.d.ts.map +1 -1
- package/dist/schemas/panels.js.map +1 -1
- package/dist/schemas/personas.d.ts +2 -1
- package/dist/schemas/personas.d.ts.map +1 -1
- package/dist/schemas/personas.js +6 -2
- package/dist/schemas/personas.js.map +1 -1
- package/dist/schemas/plan-limits.d.ts +2 -4
- package/dist/schemas/plan-limits.d.ts.map +1 -1
- package/dist/schemas/plan-limits.js +5 -8
- package/dist/schemas/plan-limits.js.map +1 -1
- package/dist/schemas/ports.d.ts.map +1 -1
- package/dist/schemas/ports.js.map +1 -1
- package/dist/schemas/provider-oauth.d.ts.map +1 -1
- package/dist/schemas/provider-oauth.js.map +1 -1
- package/dist/schemas/provider-subscriptions.d.ts +1 -1
- package/dist/schemas/provider-subscriptions.d.ts.map +1 -1
- package/dist/schemas/provider-subscriptions.js +1 -1
- package/dist/schemas/provider-subscriptions.js.map +1 -1
- package/dist/schemas/public.d.ts.map +1 -1
- package/dist/schemas/public.js.map +1 -1
- package/dist/schemas/push.d.ts.map +1 -1
- package/dist/schemas/push.js.map +1 -1
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js.map +1 -1
- package/dist/schemas/settings.d.ts +11 -9
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +22 -7
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/share.d.ts.map +1 -1
- package/dist/schemas/share.js.map +1 -1
- package/dist/schemas/shared.d.ts +4 -0
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/schemas/shared.js +3 -0
- package/dist/schemas/shared.js.map +1 -1
- package/dist/schemas/system.d.ts +6 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +10 -0
- package/dist/schemas/system.js.map +1 -1
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/usage.d.ts.map +1 -1
- package/dist/schemas/usage.js.map +1 -1
- package/dist/schemas/vpn.d.ts.map +1 -1
- package/dist/schemas/vpn.js.map +1 -1
- package/dist/schemas/webext.d.ts.map +1 -1
- package/dist/schemas/webext.js.map +1 -1
- package/dist/schemas/workflows.d.ts +66 -9
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/schemas/workflows.js +6 -5
- package/dist/schemas/workflows.js.map +1 -1
- package/dist/schemas/workspace-repos.d.ts.map +1 -1
- package/dist/schemas/workspace-repos.js.map +1 -1
- package/dist/schemas/workspace-search.d.ts.map +1 -1
- package/dist/schemas/workspace-search.js.map +1 -1
- package/dist/schemas/workspace-setup.d.ts.map +1 -1
- package/dist/schemas/workspace-setup.js.map +1 -1
- package/dist/schemas/workspace-tree.d.ts.map +1 -1
- package/dist/schemas/workspace-tree.js.map +1 -1
- package/dist/state/arrival.d.ts.map +1 -0
- package/dist/{arrival.js → state/arrival.js} +1 -1
- package/dist/state/arrival.js.map +1 -0
- package/dist/state/contract-lock.d.ts.map +1 -0
- package/dist/{contract-lock.js → state/contract-lock.js} +1 -1
- package/dist/state/contract-lock.js.map +1 -0
- package/dist/{definition.d.ts → state/definition.d.ts} +21 -17
- package/dist/state/definition.d.ts.map +1 -0
- package/dist/{definition.js → state/definition.js} +4 -4
- package/dist/state/definition.js.map +1 -0
- package/dist/state/history-state.d.ts.map +1 -0
- package/dist/{history-state.js → state/history-state.js} +1 -0
- package/dist/state/history-state.js.map +1 -0
- package/dist/state/runtime-state.d.ts.map +1 -0
- package/dist/state/runtime-state.js.map +1 -0
- package/dist/state/starter.d.ts.map +1 -0
- package/dist/state/starter.js.map +1 -0
- package/dist/state/state-portability.d.ts.map +1 -0
- package/dist/state/state-portability.js.map +1 -0
- package/dist/state/versions.d.ts.map +1 -0
- package/dist/state/versions.js.map +1 -0
- package/dist/{workspace-state.d.ts → state/workspace-state.d.ts} +8 -0
- package/dist/state/workspace-state.d.ts.map +1 -0
- package/dist/{workspace-state.js → state/workspace-state.js} +25 -0
- package/dist/state/workspace-state.js.map +1 -0
- package/dist/{documents.d.ts → text/documents.d.ts} +1 -1
- package/dist/text/documents.d.ts.map +1 -0
- package/dist/{documents.js → text/documents.js} +1 -1
- package/dist/text/documents.js.map +1 -0
- package/dist/text/embed.d.ts.map +1 -0
- package/dist/text/embed.js.map +1 -0
- package/dist/text/mentions.d.ts.map +1 -0
- package/dist/text/mentions.js.map +1 -0
- package/dist/text/model-answer.d.ts +3 -0
- package/dist/text/model-answer.d.ts.map +1 -0
- package/dist/text/model-answer.js +3 -0
- package/dist/text/model-answer.js.map +1 -0
- package/dist/text/path-refs.d.ts.map +1 -0
- package/dist/text/path-refs.js.map +1 -0
- package/dist/{shell-regions.d.ts → text/shell-regions.d.ts} +1 -1
- package/dist/text/shell-regions.d.ts.map +1 -0
- package/dist/text/shell-regions.js.map +1 -0
- package/dist/text/title.d.ts.map +1 -0
- package/dist/text/title.js.map +1 -0
- package/dist/{transcript-fold.d.ts → text/transcript-fold.d.ts} +2 -1
- package/dist/text/transcript-fold.d.ts.map +1 -0
- package/dist/{transcript-fold.js → text/transcript-fold.js} +2 -16
- package/dist/text/transcript-fold.js.map +1 -0
- package/dist/text/whisper.d.ts +3 -0
- package/dist/text/whisper.d.ts.map +1 -0
- package/dist/text/whisper.js +11 -0
- package/dist/text/whisper.js.map +1 -0
- package/dist/{workflow-faults.d.ts → text/workflow-faults.d.ts} +1 -1
- package/dist/text/workflow-faults.d.ts.map +1 -0
- package/dist/{workflow-faults.js → text/workflow-faults.js} +1 -1
- package/dist/text/workflow-faults.js.map +1 -0
- package/package.json +70 -70
- package/src/chores/chores.test.ts +4 -10
- package/src/chores/chores.ts +148 -392
- package/src/chores/digest.ts +8 -28
- package/src/chores/extension-update.ts +3 -8
- package/src/chores/fix-deps.ts +4 -18
- package/src/chores/index.ts +2 -2
- package/src/chores/probes.test.ts +7 -43
- package/src/chores/probes.ts +62 -167
- package/src/chores/prompt.ts +10 -34
- package/src/chores/stack.test.ts +6 -45
- package/src/chores/stack.ts +27 -118
- package/src/chores/verdict.test.ts +101 -80
- package/src/chores/verdict.ts +54 -99
- package/src/contracts/accounts.contract.ts +4 -19
- package/src/contracts/agent.contract.ts +7 -22
- package/src/contracts/agents.contract.ts +25 -71
- package/src/contracts/automations.contract.ts +14 -30
- package/src/contracts/capabilities.contract.ts +8 -35
- package/src/contracts/chores.contract.ts +4 -15
- package/src/contracts/endpoints.contract.ts +5 -22
- package/src/contracts/exit.contract.ts +7 -30
- package/src/contracts/extensions.contract.ts +8 -30
- package/src/contracts/git.contract.ts +25 -49
- package/src/contracts/host.contract.ts +9 -44
- package/src/contracts/intentic.contract.ts +1 -1
- package/src/contracts/logs.contract.ts +3 -13
- package/src/contracts/loops.contract.ts +9 -40
- package/src/contracts/personas.contract.ts +10 -35
- package/src/contracts/providers.contract.ts +4 -17
- package/src/contracts/runner.contract.ts +12 -39
- package/src/contracts/safety.contract.ts +5 -14
- package/src/contracts/secrets.contract.ts +4 -22
- package/src/contracts/sessions.contract.ts +1 -1
- package/src/contracts/settings.contract.ts +4 -10
- package/src/contracts/share.contract.ts +3 -9
- package/src/contracts/skills.contract.ts +21 -19
- package/src/contracts/system.contract.ts +26 -52
- package/src/contracts/usage.contract.ts +7 -21
- package/src/contracts/vpn.contract.ts +9 -16
- package/src/contracts/webext.contract.ts +9 -25
- package/src/contracts/workflows.contract.ts +34 -58
- package/src/contracts/workspace.contract.ts +19 -50
- package/src/events/agent-events.ts +345 -0
- package/src/events/cards.ts +286 -0
- package/src/{events.test.ts → events/resume.test.ts} +4 -19
- package/src/events/resume.ts +60 -0
- package/src/events/system-events.ts +139 -0
- package/src/events/transcript.ts +320 -0
- package/src/{conversation-ids.test.ts → ids/conversation-ids.test.ts} +25 -13
- package/src/ids/conversation-ids.ts +178 -0
- package/src/ids/hostnames.ts +129 -0
- package/src/ids/session-names.ts +29 -0
- package/src/ids/share-paths.ts +43 -0
- package/src/{tunnel-ids.test.ts → ids/tunnel-ids.test.ts} +1 -14
- package/src/ids/tunnel-ids.ts +29 -0
- package/src/index.ts +71 -87
- package/src/{agent-catalog.test.ts → models/agent-catalog.test.ts} +19 -93
- package/src/models/agent-catalog.ts +174 -0
- package/src/models/agent-runtimes.ts +201 -0
- package/src/models/capability-ledger.test.ts +84 -0
- package/src/{fast-tier.test.ts → models/fast-tier.test.ts} +7 -18
- package/src/models/fast-tier.ts +36 -0
- package/src/{model-order.test.ts → models/model-order.test.ts} +54 -40
- package/src/models/model-order.ts +171 -0
- package/src/{model-pins.test.ts → models/model-pins.test.ts} +12 -46
- package/src/models/model-pins.ts +57 -0
- package/src/models/model-roles.test.ts +38 -0
- package/src/models/model-roles.ts +180 -0
- package/src/{plan-pools.test.ts → models/plan-pools.test.ts} +6 -11
- package/src/models/plan-pools.ts +65 -0
- package/src/{prompt-complexity.test.ts → models/prompt-complexity.test.ts} +8 -60
- package/src/models/prompt-complexity.ts +215 -0
- package/src/{provider-specs.test.ts → models/provider-specs.test.ts} +18 -47
- package/src/models/provider-specs.ts +272 -0
- package/src/policy/approvals-execution.ts +58 -0
- package/src/{batch-runs.test.ts → policy/batch-runs.test.ts} +4 -20
- package/src/policy/batch-runs.ts +137 -0
- package/src/policy/capability-secrets.ts +5 -0
- package/src/{card-status.ts → policy/card-status.ts} +11 -26
- package/src/{command-classes.test.ts → policy/command-classes.test.ts} +11 -118
- package/src/policy/command-classes.ts +395 -0
- package/src/policy/command-run.ts +65 -0
- package/src/policy/control-scopes.ts +38 -0
- package/src/{credential-material.test.ts → policy/credential-material.test.ts} +4 -26
- package/src/policy/credential-material.ts +91 -0
- package/src/policy/needs-action.ts +5 -0
- package/src/policy/output-fields.ts +86 -0
- package/src/policy/overlay-lint.ts +100 -0
- package/src/{owner-ticket.test.ts → policy/owner-ticket.test.ts} +1 -1
- package/src/{owner-ticket.ts → policy/owner-ticket.ts} +9 -31
- package/src/policy/safety-policy.test.ts +84 -0
- package/src/policy/safety-policy.ts +142 -0
- package/src/policy/search-globs.ts +60 -0
- package/src/protocol/container-requirements.test.ts +72 -0
- package/src/protocol/container-requirements.ts +58 -0
- package/src/protocol/host-protocol.ts +29 -0
- package/src/protocol/ingress-contract.ts +103 -0
- package/src/{ingress-protocol.test.ts → protocol/ingress-protocol.test.ts} +25 -90
- package/src/protocol/ingress-protocol.ts +441 -0
- package/src/protocol/listener-protocol.ts +75 -0
- package/src/{peer-dial.test.ts → protocol/peer-dial.test.ts} +52 -1
- package/src/protocol/peer-dial.ts +207 -0
- package/src/{peer-mcp-server.ts → protocol/peer-mcp-server.ts} +16 -41
- package/src/protocol/request-id.ts +5 -0
- package/src/{routes.test.ts → protocol/routes.test.ts} +14 -22
- package/src/protocol/routes.ts +159 -0
- package/src/protocol/runner-protocol.ts +197 -0
- package/src/protocol/terminal-protocol.ts +13 -0
- package/src/protocol/webext-links.ts +50 -0
- package/src/protocol/webext-protocol.ts +24 -0
- package/src/schemas/activity.ts +22 -30
- package/src/schemas/agent.ts +130 -238
- package/src/schemas/agents.ts +165 -483
- package/src/schemas/approvals.ts +23 -71
- package/src/schemas/automations.ts +142 -250
- package/src/schemas/capabilities.ts +127 -414
- package/src/schemas/ci.ts +56 -108
- package/src/schemas/codebase-health.ts +7 -11
- package/src/schemas/devices.ts +103 -321
- package/src/schemas/engines.ts +16 -44
- package/src/schemas/environment.ts +41 -91
- package/src/schemas/exit.ts +24 -81
- package/src/schemas/extension-updates.ts +42 -87
- package/src/schemas/git-history.ts +30 -84
- package/src/schemas/git.ts +141 -256
- package/src/schemas/history.ts +14 -40
- package/src/schemas/hosts.ts +9 -15
- package/src/schemas/inventory.ts +8 -10
- package/src/schemas/issues.ts +66 -134
- package/src/schemas/logs.ts +15 -34
- package/src/schemas/loops.ts +46 -163
- package/src/schemas/maintenance.ts +47 -172
- package/src/schemas/panels.ts +20 -45
- package/src/schemas/personas.ts +50 -200
- package/src/schemas/plan-limits.ts +58 -197
- package/src/schemas/ports.ts +14 -32
- package/src/schemas/provider-oauth.ts +23 -76
- package/src/schemas/provider-subscriptions.ts +4 -13
- package/src/schemas/public.ts +4 -15
- package/src/schemas/push.ts +8 -36
- package/src/schemas/secrets.ts +20 -64
- package/src/schemas/settings.ts +182 -602
- package/src/schemas/share.ts +14 -32
- package/src/schemas/shared.ts +14 -13
- package/src/schemas/system.ts +46 -78
- package/src/schemas/terminal.ts +41 -120
- package/src/schemas/usage.ts +44 -233
- package/src/schemas/version-seam.test.ts +9 -26
- package/src/schemas/vpn.ts +27 -64
- package/src/schemas/webext.ts +22 -53
- package/src/schemas/workflows.ts +57 -183
- package/src/schemas/workspace-repos.ts +12 -24
- package/src/schemas/workspace-search.ts +17 -35
- package/src/schemas/workspace-setup.ts +4 -11
- package/src/schemas/workspace-tree.ts +32 -91
- package/src/state/arrival.ts +109 -0
- package/src/state/contract-lock.test.ts +17 -0
- package/src/state/contract-lock.ts +49 -0
- package/src/state/definition.ts +143 -0
- package/src/state/history-state.ts +103 -0
- package/src/{runtime-state.test.ts → state/runtime-state.test.ts} +3 -10
- package/src/state/runtime-state.ts +63 -0
- package/src/state/starter.ts +5 -0
- package/src/state/state-portability.ts +27 -0
- package/src/state/versions.ts +26 -0
- package/src/{workspace-state.test.ts → state/workspace-state.test.ts} +65 -172
- package/src/state/workspace-state.ts +669 -0
- package/src/{documents.test.ts → text/documents.test.ts} +1 -1
- package/src/text/documents.ts +42 -0
- package/src/text/embed.ts +132 -0
- package/src/text/mentions.ts +21 -0
- package/src/text/model-answer.ts +9 -0
- package/src/text/path-refs.ts +39 -0
- package/src/text/shell-regions.ts +224 -0
- package/src/{title.test.ts → text/title.test.ts} +13 -32
- package/src/text/title.ts +202 -0
- package/src/{transcript-fold.test.ts → text/transcript-fold.test.ts} +5 -83
- package/src/{transcript-fold.ts → text/transcript-fold.ts} +65 -170
- package/src/text/whisper.test.ts +19 -0
- package/src/text/whisper.ts +17 -0
- package/src/{workflow-faults.test.ts → text/workflow-faults.test.ts} +6 -24
- package/src/{workflow-faults.ts → text/workflow-faults.ts} +20 -60
- package/dist/agent-catalog.d.ts.map +0 -1
- package/dist/agent-catalog.js.map +0 -1
- package/dist/agent-runtimes.d.ts.map +0 -1
- package/dist/agent-runtimes.js.map +0 -1
- package/dist/approvals-execution.d.ts.map +0 -1
- package/dist/approvals-execution.js.map +0 -1
- package/dist/arrival.d.ts.map +0 -1
- package/dist/arrival.js.map +0 -1
- package/dist/batch-runs.d.ts.map +0 -1
- package/dist/batch-runs.js.map +0 -1
- package/dist/capability-env.d.ts.map +0 -1
- package/dist/capability-env.js.map +0 -1
- package/dist/capability-secrets.d.ts.map +0 -1
- package/dist/capability-secrets.js.map +0 -1
- package/dist/card-status.d.ts.map +0 -1
- package/dist/card-status.js.map +0 -1
- package/dist/command-classes.d.ts.map +0 -1
- package/dist/command-classes.js.map +0 -1
- package/dist/command-run.d.ts.map +0 -1
- package/dist/command-run.js.map +0 -1
- package/dist/contract-lock.d.ts.map +0 -1
- package/dist/contract-lock.js.map +0 -1
- package/dist/conversation-ids.d.ts +0 -4
- package/dist/conversation-ids.d.ts.map +0 -1
- package/dist/conversation-ids.js.map +0 -1
- package/dist/credential-material.d.ts.map +0 -1
- package/dist/credential-material.js.map +0 -1
- package/dist/definition.d.ts.map +0 -1
- package/dist/definition.js.map +0 -1
- package/dist/documents.d.ts.map +0 -1
- package/dist/documents.js.map +0 -1
- package/dist/embed.d.ts.map +0 -1
- package/dist/embed.js.map +0 -1
- package/dist/events.d.ts +0 -4336
- package/dist/events.d.ts.map +0 -1
- package/dist/events.js +0 -725
- package/dist/events.js.map +0 -1
- package/dist/fast-tier.d.ts.map +0 -1
- package/dist/fast-tier.js.map +0 -1
- package/dist/history-state.d.ts.map +0 -1
- package/dist/history-state.js.map +0 -1
- package/dist/host-protocol.d.ts.map +0 -1
- package/dist/host-protocol.js.map +0 -1
- package/dist/hostnames.d.ts.map +0 -1
- package/dist/hostnames.js.map +0 -1
- package/dist/ingress-contract.d.ts.map +0 -1
- package/dist/ingress-contract.js.map +0 -1
- package/dist/ingress-protocol.d.ts.map +0 -1
- package/dist/ingress-protocol.js.map +0 -1
- package/dist/listener-protocol.d.ts.map +0 -1
- package/dist/listener-protocol.js.map +0 -1
- package/dist/mentions.d.ts.map +0 -1
- package/dist/mentions.js.map +0 -1
- package/dist/model-order.d.ts.map +0 -1
- package/dist/model-order.js.map +0 -1
- package/dist/model-pins.d.ts.map +0 -1
- package/dist/model-pins.js.map +0 -1
- package/dist/model-roles.d.ts.map +0 -1
- package/dist/model-roles.js.map +0 -1
- package/dist/needs-action.d.ts.map +0 -1
- package/dist/needs-action.js.map +0 -1
- package/dist/output-fields.d.ts.map +0 -1
- package/dist/output-fields.js.map +0 -1
- package/dist/overlay-lint.d.ts.map +0 -1
- package/dist/overlay-lint.js.map +0 -1
- package/dist/owner-ticket.d.ts.map +0 -1
- package/dist/owner-ticket.js.map +0 -1
- package/dist/path-refs.d.ts.map +0 -1
- package/dist/path-refs.js.map +0 -1
- package/dist/peer-dial.d.ts.map +0 -1
- package/dist/peer-dial.js.map +0 -1
- package/dist/peer-mcp-server.d.ts.map +0 -1
- package/dist/peer-mcp-server.js.map +0 -1
- package/dist/plan-pools.d.ts.map +0 -1
- package/dist/plan-pools.js.map +0 -1
- package/dist/prompt-complexity.d.ts.map +0 -1
- package/dist/prompt-complexity.js.map +0 -1
- package/dist/provider-specs.d.ts.map +0 -1
- package/dist/provider-specs.js.map +0 -1
- package/dist/request-id.d.ts.map +0 -1
- package/dist/request-id.js.map +0 -1
- package/dist/routes.d.ts.map +0 -1
- package/dist/routes.js.map +0 -1
- package/dist/runner-protocol.d.ts.map +0 -1
- package/dist/runner-protocol.js.map +0 -1
- package/dist/runtime-state.d.ts.map +0 -1
- package/dist/runtime-state.js.map +0 -1
- package/dist/safety-policy.d.ts.map +0 -1
- package/dist/safety-policy.js.map +0 -1
- package/dist/search-globs.d.ts.map +0 -1
- package/dist/search-globs.js.map +0 -1
- package/dist/session-names.d.ts.map +0 -1
- package/dist/session-names.js.map +0 -1
- package/dist/share-paths.d.ts.map +0 -1
- package/dist/share-paths.js.map +0 -1
- package/dist/shell-regions.d.ts.map +0 -1
- package/dist/shell-regions.js.map +0 -1
- package/dist/sse.d.ts.map +0 -1
- package/dist/sse.js.map +0 -1
- package/dist/starter.d.ts.map +0 -1
- package/dist/starter.js.map +0 -1
- package/dist/state-portability.d.ts.map +0 -1
- package/dist/state-portability.js.map +0 -1
- package/dist/terminal-protocol.d.ts.map +0 -1
- package/dist/terminal-protocol.js.map +0 -1
- package/dist/title.d.ts.map +0 -1
- package/dist/title.js.map +0 -1
- package/dist/transcript-fold.d.ts.map +0 -1
- package/dist/transcript-fold.js.map +0 -1
- package/dist/tunnel-ids.d.ts.map +0 -1
- package/dist/tunnel-ids.js.map +0 -1
- package/dist/versions.d.ts.map +0 -1
- package/dist/versions.js.map +0 -1
- package/dist/webext-links.d.ts.map +0 -1
- package/dist/webext-links.js.map +0 -1
- package/dist/webext-protocol.d.ts.map +0 -1
- package/dist/webext-protocol.js.map +0 -1
- package/dist/workflow-faults.d.ts.map +0 -1
- package/dist/workflow-faults.js.map +0 -1
- package/dist/workspace-state.d.ts.map +0 -1
- package/dist/workspace-state.js.map +0 -1
- package/src/agent-catalog.ts +0 -316
- package/src/agent-runtimes.ts +0 -419
- package/src/approvals-execution.ts +0 -96
- package/src/arrival.ts +0 -160
- package/src/batch-runs.ts +0 -188
- package/src/capability-ledger.test.ts +0 -140
- package/src/capability-secrets.ts +0 -20
- package/src/command-classes.ts +0 -617
- package/src/command-run.ts +0 -78
- package/src/contract-lock.test.ts +0 -23
- package/src/contract-lock.ts +0 -66
- package/src/conversation-ids.ts +0 -207
- package/src/credential-material.ts +0 -181
- package/src/definition.ts +0 -207
- package/src/documents.ts +0 -67
- package/src/embed.ts +0 -164
- package/src/events.ts +0 -1870
- package/src/fast-tier.ts +0 -72
- package/src/history-state.ts +0 -174
- package/src/host-protocol.ts +0 -36
- package/src/hostnames.ts +0 -180
- package/src/ingress-contract.ts +0 -157
- package/src/ingress-protocol.ts +0 -625
- package/src/listener-protocol.ts +0 -96
- package/src/mentions.ts +0 -25
- package/src/model-order.ts +0 -262
- package/src/model-pins.ts +0 -132
- package/src/model-roles.test.ts +0 -52
- package/src/model-roles.ts +0 -320
- package/src/needs-action.ts +0 -14
- package/src/output-fields.ts +0 -111
- package/src/overlay-lint.ts +0 -116
- package/src/path-refs.ts +0 -59
- package/src/peer-dial.ts +0 -163
- package/src/plan-pools.ts +0 -92
- package/src/prompt-complexity.ts +0 -334
- package/src/provider-specs.ts +0 -432
- package/src/request-id.ts +0 -41
- package/src/routes.ts +0 -219
- package/src/runner-protocol.ts +0 -239
- package/src/runtime-state.ts +0 -140
- package/src/safety-policy.test.ts +0 -88
- package/src/safety-policy.ts +0 -258
- package/src/search-globs.ts +0 -76
- package/src/session-names.ts +0 -44
- package/src/share-paths.ts +0 -68
- package/src/shell-regions.ts +0 -289
- package/src/starter.ts +0 -13
- package/src/state-portability.ts +0 -56
- package/src/terminal-protocol.ts +0 -16
- package/src/title.ts +0 -267
- package/src/tunnel-ids.ts +0 -57
- package/src/versions.ts +0 -48
- package/src/webext-links.ts +0 -90
- package/src/webext-protocol.ts +0 -27
- package/src/workspace-state.ts +0 -1090
- /package/dist/{hostnames.d.ts → ids/hostnames.d.ts} +0 -0
- /package/dist/{hostnames.js → ids/hostnames.js} +0 -0
- /package/dist/{session-names.d.ts → ids/session-names.d.ts} +0 -0
- /package/dist/{session-names.js → ids/session-names.js} +0 -0
- /package/dist/{share-paths.d.ts → ids/share-paths.d.ts} +0 -0
- /package/dist/{share-paths.js → ids/share-paths.js} +0 -0
- /package/dist/{agent-catalog.js → models/agent-catalog.js} +0 -0
- /package/dist/{agent-runtimes.d.ts → models/agent-runtimes.d.ts} +0 -0
- /package/dist/{agent-runtimes.js → models/agent-runtimes.js} +0 -0
- /package/dist/{fast-tier.js → models/fast-tier.js} +0 -0
- /package/dist/{model-order.d.ts → models/model-order.d.ts} +0 -0
- /package/dist/{model-pins.js → models/model-pins.js} +0 -0
- /package/dist/{plan-pools.js → models/plan-pools.js} +0 -0
- /package/dist/{prompt-complexity.d.ts → models/prompt-complexity.d.ts} +0 -0
- /package/dist/{prompt-complexity.js → models/prompt-complexity.js} +0 -0
- /package/dist/{provider-specs.d.ts → models/provider-specs.d.ts} +0 -0
- /package/dist/{provider-specs.js → models/provider-specs.js} +0 -0
- /package/dist/{approvals-execution.d.ts → policy/approvals-execution.d.ts} +0 -0
- /package/dist/{approvals-execution.js → policy/approvals-execution.js} +0 -0
- /package/dist/{capability-env.d.ts → policy/capability-env.d.ts} +0 -0
- /package/dist/{capability-env.js → policy/capability-env.js} +0 -0
- /package/dist/{capability-secrets.d.ts → policy/capability-secrets.d.ts} +0 -0
- /package/dist/{capability-secrets.js → policy/capability-secrets.js} +0 -0
- /package/dist/{command-run.js → policy/command-run.js} +0 -0
- /package/dist/{credential-material.d.ts → policy/credential-material.d.ts} +0 -0
- /package/dist/{credential-material.js → policy/credential-material.js} +0 -0
- /package/dist/{needs-action.d.ts → policy/needs-action.d.ts} +0 -0
- /package/dist/{needs-action.js → policy/needs-action.js} +0 -0
- /package/dist/{output-fields.d.ts → policy/output-fields.d.ts} +0 -0
- /package/dist/{output-fields.js → policy/output-fields.js} +0 -0
- /package/dist/{overlay-lint.d.ts → policy/overlay-lint.d.ts} +0 -0
- /package/dist/{overlay-lint.js → policy/overlay-lint.js} +0 -0
- /package/dist/{owner-ticket.d.ts → policy/owner-ticket.d.ts} +0 -0
- /package/dist/{search-globs.d.ts → policy/search-globs.d.ts} +0 -0
- /package/dist/{search-globs.js → policy/search-globs.js} +0 -0
- /package/dist/{ingress-contract.d.ts → protocol/ingress-contract.d.ts} +0 -0
- /package/dist/{ingress-protocol.d.ts → protocol/ingress-protocol.d.ts} +0 -0
- /package/dist/{ingress-protocol.js → protocol/ingress-protocol.js} +0 -0
- /package/dist/{listener-protocol.d.ts → protocol/listener-protocol.d.ts} +0 -0
- /package/dist/{peer-mcp-server.d.ts → protocol/peer-mcp-server.d.ts} +0 -0
- /package/dist/{peer-mcp-server.js → protocol/peer-mcp-server.js} +0 -0
- /package/dist/{request-id.d.ts → protocol/request-id.d.ts} +0 -0
- /package/dist/{request-id.js → protocol/request-id.js} +0 -0
- /package/dist/{routes.d.ts → protocol/routes.d.ts} +0 -0
- /package/dist/{routes.js → protocol/routes.js} +0 -0
- /package/dist/{sse.d.ts → protocol/sse.d.ts} +0 -0
- /package/dist/{sse.js → protocol/sse.js} +0 -0
- /package/dist/{terminal-protocol.js → protocol/terminal-protocol.js} +0 -0
- /package/dist/{webext-links.d.ts → protocol/webext-links.d.ts} +0 -0
- /package/dist/{webext-links.js → protocol/webext-links.js} +0 -0
- /package/dist/{arrival.d.ts → state/arrival.d.ts} +0 -0
- /package/dist/{contract-lock.d.ts → state/contract-lock.d.ts} +0 -0
- /package/dist/{history-state.d.ts → state/history-state.d.ts} +0 -0
- /package/dist/{runtime-state.d.ts → state/runtime-state.d.ts} +0 -0
- /package/dist/{runtime-state.js → state/runtime-state.js} +0 -0
- /package/dist/{starter.d.ts → state/starter.d.ts} +0 -0
- /package/dist/{starter.js → state/starter.js} +0 -0
- /package/dist/{state-portability.d.ts → state/state-portability.d.ts} +0 -0
- /package/dist/{state-portability.js → state/state-portability.js} +0 -0
- /package/dist/{versions.d.ts → state/versions.d.ts} +0 -0
- /package/dist/{versions.js → state/versions.js} +0 -0
- /package/dist/{embed.d.ts → text/embed.d.ts} +0 -0
- /package/dist/{embed.js → text/embed.js} +0 -0
- /package/dist/{mentions.d.ts → text/mentions.d.ts} +0 -0
- /package/dist/{mentions.js → text/mentions.js} +0 -0
- /package/dist/{path-refs.d.ts → text/path-refs.d.ts} +0 -0
- /package/dist/{path-refs.js → text/path-refs.js} +0 -0
- /package/dist/{shell-regions.js → text/shell-regions.js} +0 -0
- /package/dist/{title.d.ts → text/title.d.ts} +0 -0
- /package/dist/{title.js → text/title.js} +0 -0
- /package/src/{hostnames.test.ts → ids/hostnames.test.ts} +0 -0
- /package/src/{share-paths.test.ts → ids/share-paths.test.ts} +0 -0
- /package/src/{capability-env.ts → policy/capability-env.ts} +0 -0
- /package/src/{overlay-lint.test.ts → policy/overlay-lint.test.ts} +0 -0
- /package/src/{search-globs.test.ts → policy/search-globs.test.ts} +0 -0
- /package/src/{ingress-contract.test.ts → protocol/ingress-contract.test.ts} +0 -0
- /package/src/{peer-mcp-server.test.ts → protocol/peer-mcp-server.test.ts} +0 -0
- /package/src/{sse.ts → protocol/sse.ts} +0 -0
- /package/src/{versions.test.ts → state/versions.test.ts} +0 -0
- /package/src/{embed.test.ts → text/embed.test.ts} +0 -0
- /package/src/{mentions.test.ts → text/mentions.test.ts} +0 -0
- /package/src/{path-refs.test.ts → text/path-refs.test.ts} +0 -0
package/src/chores/verdict.ts
CHANGED
|
@@ -1,46 +1,10 @@
|
|
|
1
|
-
import type { ChoreLedgerEntry, ChoresReport, ProbeId, ProbeResult } from "../schemas/maintenance.js";
|
|
1
|
+
import type { ChoreLedgerEntry, ChoreOutcome, ChoresReport, ProbeId, ProbeResult } from "../schemas/maintenance.js";
|
|
2
2
|
import { type Chore, type ChoreContext, type ChoreFinding, CHORES, chorePrompt } from "./chores.js";
|
|
3
3
|
import { probeSpec } from "./probes.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* Six states, and the distinctions between them are the whole design:
|
|
10
|
-
*
|
|
11
|
-
* not-applicable this chore is not a QUESTION worth asking of this repository, there is no Dockerfile to
|
|
12
|
-
* slim, no pipeline to tighten, no documentation to re-read. Dropped from the panel entirely
|
|
13
|
-
* rather than shown as clear, because "clear" claims we checked, and there was nothing to check.
|
|
14
|
-
* The reason survives in the panel's scope note, so "why is there no Docker chore here?" has an answer.
|
|
15
|
-
* unavailable we have not measured this. knip is not a devDependency; there is no lockfile to audit. Rendered
|
|
16
|
-
* greyed, never badged, and never collapsed into `clear`, a maintenance surface reporting a green
|
|
17
|
-
* repository it has never actually measured is worse than one that says nothing.
|
|
18
|
-
* clear we measured, and there is nothing to do. This is the common state, and it has to be visibly
|
|
19
|
-
* reachable or the panel is just a list of complaints.
|
|
20
|
-
* snoozed the owner said "not now". Still listed, still showing its evidence, silent until it lapses.
|
|
21
|
-
* stale we measured, then work landed, and we have not measured since. The evidence is still shown; the
|
|
22
|
-
* CLAIM comes off it, because it describes a tree that no longer exists.
|
|
23
|
-
* due there is something to do.
|
|
24
|
-
*
|
|
25
|
-
* The first three are all ways of saying "no", and keeping them apart is what makes the surface trustworthy: they
|
|
26
|
-
* mean we cannot ask, we did not measure, and we measured and found nothing, three different claims, and only
|
|
27
|
-
* the last one is reassurance.
|
|
28
|
-
*
|
|
29
|
-
* And one flag that is not a state: `settled`. A due chore that has been RE-MEASURED since a turn was spent on
|
|
30
|
-
* it, and whose evidence did not move, stays due, because it is, but must never light the rail again. This is
|
|
31
|
-
* what stops the surface repeating itself while a fix sits in review, and it is why the ledger stores a digest
|
|
32
|
-
* rather than a timestamp: "ran 3 days ago" cannot tell you whether it ran against THIS.
|
|
33
|
-
*
|
|
34
|
-
* `stale` is the other half of that sentence, and it exists because the digest alone cannot tell the two apart.
|
|
35
|
-
* A probe that never re-ran produces an unchanged digest for free, so "the fix did not move the numbers" and "we
|
|
36
|
-
* have not looked since the fix" arrived at this function looking identical, and the panel showed the second as
|
|
37
|
-
* the first, quoting a week-old count an hour after the work that invalidated it. Comparing the run's time to the
|
|
38
|
-
* MEASUREMENT's time is what separates them, and it is a comparison of two numbers the report already carries.
|
|
39
|
-
*
|
|
40
|
-
* Nothing here can hide a problem. Snoozing and settling change whether the rail SPEAKS; the panel still shows
|
|
41
|
-
* the chore, its evidence and its state. The one thing that removes a row entirely is `not-applicable`, and that
|
|
42
|
-
* is not hiding, it is the absence of a subject, counted in the panel's scope note and expandable to the reason.
|
|
43
|
-
* A maintenance surface you can quietly bury findings in is a maintenance surface nobody trusts. */
|
|
5
|
+
// The one function deciding whether a chore is due, run by both the panel and its badge over the same report so
|
|
6
|
+
// neither can drift from the other. Six states (not-applicable, unavailable and clear are different ways of saying no);
|
|
7
|
+
// `settled` is a due chore re-measured with no change, still due but never re-badged.
|
|
44
8
|
|
|
45
9
|
export type ChoreState = "due" | "clear" | "snoozed" | "stale" | "unavailable" | "not-applicable";
|
|
46
10
|
|
|
@@ -49,27 +13,23 @@ export interface ChoreVerdict {
|
|
|
49
13
|
readonly repo: string;
|
|
50
14
|
readonly state: ChoreState;
|
|
51
15
|
readonly severity: ChoreFinding["severity"];
|
|
52
|
-
// Always present
|
|
16
|
+
// Always present in every state; "nothing to do" and "not measured" are answers a reader deserves in words.
|
|
53
17
|
readonly headline: string;
|
|
54
18
|
readonly detail: readonly string[];
|
|
55
19
|
// The evidence identity. Empty for `unavailable`, where there is no evidence to identify.
|
|
56
20
|
readonly digest: string;
|
|
57
|
-
|
|
58
|
-
* measurement from last Tuesday read as this morning's. Undefined when the verdict rests on no measurement at
|
|
59
|
-
* all: a survey is decided by the calendar, and an unavailable chore has nothing to be out of date. */
|
|
21
|
+
// When the evidence was taken; undefined when the verdict rests on no measurement (a survey, or unavailable).
|
|
60
22
|
readonly measuredAt: number | undefined;
|
|
61
|
-
//
|
|
62
|
-
// invitation to spend money proving that nothing is wrong.
|
|
23
|
+
// Present only when there is something to do; offering it on a clear chore would invite proving nothing's wrong.
|
|
63
24
|
readonly prompt: string | undefined;
|
|
64
25
|
readonly lastRun: ChoreLedgerEntry | undefined;
|
|
65
|
-
// A turn
|
|
66
|
-
//
|
|
26
|
+
// A turn was spent, the evidence was re-measured since and didn't move, and the cadence hasn't lapsed: still due,
|
|
27
|
+
// still shown, never badged.
|
|
67
28
|
readonly settled: boolean;
|
|
68
29
|
}
|
|
69
30
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* and an unavailable chore's probe did not produce one. */
|
|
31
|
+
// How old the evidence is: the oldest of the measurements a verdict rests on, since a claim is only as current
|
|
32
|
+
// as the least current input. Undefined when it rests on none (a survey, or an unavailable probe).
|
|
73
33
|
const measurementAge = (needs: readonly ProbeId[], probes: ReadonlyMap<ProbeId, ProbeResult>): number | undefined => {
|
|
74
34
|
const taken = needs.flatMap((id) => {
|
|
75
35
|
const probe = probes.get(id);
|
|
@@ -78,14 +38,13 @@ const measurementAge = (needs: readonly ProbeId[], probes: ReadonlyMap<ProbeId,
|
|
|
78
38
|
return taken.length === 0 ? undefined : Math.min(...taken);
|
|
79
39
|
};
|
|
80
40
|
|
|
81
|
-
// A
|
|
82
|
-
//
|
|
83
|
-
// about the calendar.
|
|
41
|
+
// A clear survey says when it was last read, since "nothing to do" under a chore with no measurement would be a
|
|
42
|
+
// claim about the code rather than the calendar.
|
|
84
43
|
const clearHeadline = (chore: Chore, lastRun: ChoreLedgerEntry | undefined, nowMs: number): string =>
|
|
85
44
|
chore.survey === true && lastRun !== undefined ? `Surveyed ${Math.round((nowMs - lastRun.ranAt) / 86_400_000)} days ago` : `Nothing to do`;
|
|
86
45
|
|
|
87
|
-
// Why a chore
|
|
88
|
-
//
|
|
46
|
+
// Why a chore couldn't be assessed, in the words of the thing that couldn't: never invented, an `unavailable`
|
|
47
|
+
// probe carries the tool's own reason, an unrun one says it hasn't run yet.
|
|
89
48
|
const unmeasuredDetail = (needs: readonly ProbeId[], probes: ReadonlyMap<ProbeId, ProbeResult>): string[] =>
|
|
90
49
|
needs.flatMap((id) => {
|
|
91
50
|
const probe = probes.get(id);
|
|
@@ -96,9 +55,7 @@ const unmeasuredDetail = (needs: readonly ProbeId[], probes: ReadonlyMap<ProbeId
|
|
|
96
55
|
if (probe.state === `ok`) {
|
|
97
56
|
return [];
|
|
98
57
|
}
|
|
99
|
-
// An unavailable probe's reason already says what
|
|
100
|
-
// available in this repository" only says the same thing twice. A failure has to keep its label: its
|
|
101
|
-
// reason is the tool's own output, which on its own reads as a fact rather than as a breakage.
|
|
58
|
+
// An unavailable probe's reason already says what's missing; prefixing it would just say the same thing twice.
|
|
102
59
|
if (probe.state === `unavailable`) {
|
|
103
60
|
return [`${spec.title} · ${probe.reason ?? `not available in this repository`}`];
|
|
104
61
|
}
|
|
@@ -108,10 +65,8 @@ const unmeasuredDetail = (needs: readonly ProbeId[], probes: ReadonlyMap<ProbeId
|
|
|
108
65
|
export const assessChore = (chore: Chore, context: ChoreContext, ledger: ChoreLedgerEntry | undefined): ChoreVerdict => {
|
|
109
66
|
const base = { chore, repo: context.repo, lastRun: ledger, settled: false, prompt: undefined } as const;
|
|
110
67
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
* function would be answering it anyway. The cause is carried as the headline, because the scope note, which
|
|
114
|
-
* groups these rows BY it, is the only place it will ever be read. */
|
|
68
|
+
// Decided before anything is measured; the cause is carried as the headline since the scope note is the only place
|
|
69
|
+
// it is read.
|
|
115
70
|
const inapplicable = chore.applies?.(context.signals);
|
|
116
71
|
if (inapplicable !== undefined) {
|
|
117
72
|
return { ...base, state: `not-applicable`, severity: `info`, headline: inapplicable, detail: [], digest: ``, measuredAt: undefined };
|
|
@@ -138,17 +93,11 @@ export const assessChore = (chore: Chore, context: ChoreContext, ledger: ChoreLe
|
|
|
138
93
|
};
|
|
139
94
|
}
|
|
140
95
|
|
|
141
|
-
|
|
142
|
-
* does not become worth looking at again because ninety days passed, it becomes worth looking at again when
|
|
143
|
-
* the advisory set changes. Anything with a cadence expires its own settlement, so "we looked and chose not to
|
|
144
|
-
* act" cannot silence a chore for good. */
|
|
96
|
+
// A cadence of 0 is decided by evidence alone; any other cadence expires its own settlement over time.
|
|
145
97
|
const lapsed = ledger !== undefined && chore.cadenceMs > 0 && context.nowMs - ledger.ranAt >= chore.cadenceMs;
|
|
146
98
|
const sameEvidence = ledger?.digest === finding.digest && !lapsed;
|
|
147
99
|
|
|
148
|
-
|
|
149
|
-
* and a run inside the current period settles it until the next one begins. Checked against the run's TIME
|
|
150
|
-
* rather than its digest, because a survey run three days into a quarter and one three days before its end
|
|
151
|
-
* are the same period but very different answers to "when was this last read?". */
|
|
100
|
+
// A survey's only trigger is the calendar, checked against the run's time rather than its digest.
|
|
152
101
|
if (chore.survey === true && ledger !== undefined && context.nowMs - ledger.ranAt < chore.cadenceMs) {
|
|
153
102
|
return {
|
|
154
103
|
...base,
|
|
@@ -176,10 +125,8 @@ export const assessChore = (chore: Chore, context: ChoreContext, ledger: ChoreLe
|
|
|
176
125
|
};
|
|
177
126
|
}
|
|
178
127
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
* starts the same turn again and the surface has taught the owner that its rows are wrong. It stops sticking
|
|
182
|
-
* when the evidence changes (a different digest) or the cadence lapses. */
|
|
128
|
+
// The agent looked at exactly this evidence and found nothing there; that verdict sticks until the evidence changes
|
|
129
|
+
// or the cadence lapses.
|
|
183
130
|
if (sameEvidence && ledger?.outcome === `clean`) {
|
|
184
131
|
return {
|
|
185
132
|
...base,
|
|
@@ -192,13 +139,8 @@ export const assessChore = (chore: Chore, context: ChoreContext, ledger: ChoreLe
|
|
|
192
139
|
};
|
|
193
140
|
}
|
|
194
141
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
* quoting the count from six days before it. `sameEvidence` cannot catch this: an unchanged digest is exactly
|
|
198
|
-
* what a probe that never re-ran produces, so the flag says "settled" at its most confident when it knows
|
|
199
|
-
* least. The chore steps down instead, evidence stays on the row, the CLAIM comes off it, and carries no
|
|
200
|
-
* prompt, because the honest next move is to measure again rather than to spend a second turn on a finding
|
|
201
|
-
* nobody has re-checked. It cannot badge either, which is what stops the tile lighting for work already done. */
|
|
142
|
+
// The measurement predates the last run: an unchanged digest is what a stale probe produces too, so the claim and
|
|
143
|
+
// prompt come off, not the evidence.
|
|
202
144
|
if (ledger !== undefined && measuredAt !== undefined && ledger.ranAt > measuredAt) {
|
|
203
145
|
return { ...base, state: `stale`, severity: `info`, headline: finding.headline, detail: finding.detail, digest: finding.digest, measuredAt };
|
|
204
146
|
}
|
|
@@ -216,13 +158,35 @@ export const assessChore = (chore: Chore, context: ChoreContext, ledger: ChoreLe
|
|
|
216
158
|
};
|
|
217
159
|
};
|
|
218
160
|
|
|
219
|
-
//
|
|
220
|
-
//
|
|
161
|
+
// Has anyone already answered this, and does the answer still stand; the digest is what makes this an answer
|
|
162
|
+
// rather than a timestamp, since a run against evidence that has since changed answered a different question.
|
|
163
|
+
export interface ChoreAnswer {
|
|
164
|
+
readonly outcome: ChoreOutcome;
|
|
165
|
+
readonly ranAt: number;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// What was concluded about this evidence, whenever that was: history, not standing. A lapsed chore still shows
|
|
169
|
+
// its old answer, since that is a fact worth having before spending a second turn.
|
|
170
|
+
export const choreAnswer = (verdict: ChoreVerdict): ChoreAnswer | undefined => {
|
|
171
|
+
const { lastRun, digest } = verdict;
|
|
172
|
+
// An empty digest identifies no evidence, so nothing can have been concluded about it (unavailable, not-applicable,
|
|
173
|
+
// plain clear).
|
|
174
|
+
if (lastRun === undefined || digest === `` || lastRun.digest !== digest) {
|
|
175
|
+
return undefined;
|
|
176
|
+
}
|
|
177
|
+
return { outcome: lastRun.outcome, ranAt: lastRun.ranAt };
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// Whether there is anything left to start: `settled` or `stale`, not gated on `choreAnswer`, since a stale row
|
|
181
|
+
// has nothing to press either way. A lapsed chore returns to full weight; expiry asks again.
|
|
182
|
+
export const choreAnswered = (verdict: ChoreVerdict): boolean => verdict.settled || verdict.state === `stale`;
|
|
183
|
+
|
|
184
|
+
// The ledger is keyed by repo + chore, the grain a verdict is decided at: the same chore in two repos is two
|
|
185
|
+
// independent answers.
|
|
221
186
|
export const ledgerKey = (repo: string, chore: string): string => `${repo}|${chore}`;
|
|
222
187
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
* reaches both surfaces without touching either. */
|
|
188
|
+
// Every chore in every repo, from one report; the single traversal both the panel and the badge call, so adding
|
|
189
|
+
// a chore to CHORES reaches both without touching either.
|
|
226
190
|
export const assessReport = (report: ChoresReport, nowMs: number): ChoreVerdict[] => {
|
|
227
191
|
const ledger = new Map(report.ledger.map((entry) => [ledgerKey(entry.repo, entry.chore), entry]));
|
|
228
192
|
return report.repos.flatMap(({ repo, probes, signals }) => {
|
|
@@ -231,17 +195,8 @@ export const assessReport = (report: ChoresReport, nowMs: number): ChoreVerdict[
|
|
|
231
195
|
});
|
|
232
196
|
};
|
|
233
197
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
*
|
|
238
|
-
* state === due the obvious one, and it is also what keeps `stale` silent, since a measurement taken before
|
|
239
|
-
* the last turn is not a fact anyone should be interrupted about.
|
|
240
|
-
* !settled a turn has been spent on this chore and the re-measured evidence did not move.
|
|
241
|
-
* unseen digest the owner has already LOOKED at this evidence in the panel. Acknowledgement is per digest
|
|
242
|
-
* rather than per chore, so acknowledging today's finding does not also swallow tomorrow's.
|
|
243
|
-
*
|
|
244
|
-
* `seen` maps ledgerKey → the digest last acknowledged. It lives in a file beside the ledger, because the badge is
|
|
245
|
-
* derived from files and its acknowledgement belongs in the same tree. */
|
|
198
|
+
// What the rail may say: something happened you don't already know about, never a statistic. Filters out:
|
|
199
|
+
// - not due, or settled (a turn already re-measured this with no change)
|
|
200
|
+
// - already acknowledged at this exact digest in the panel
|
|
246
201
|
export const unseenVerdicts = (verdicts: readonly ChoreVerdict[], seen: Readonly<Record<string, string>>): ChoreVerdict[] =>
|
|
247
202
|
verdicts.filter((verdict) => verdict.state === `due` && !verdict.settled && seen[ledgerKey(verdict.repo, verdict.chore.id)] !== verdict.digest);
|
|
@@ -14,23 +14,9 @@ import {
|
|
|
14
14
|
} from "../schemas/provider-oauth.js";
|
|
15
15
|
import { OkSchema } from "../schemas/shared.js";
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* its own key), each "the previous one's shape" with a verb renamed: `oauth/start` here, `login/start` there,
|
|
21
|
-
* an `exchange` for the flow whose proof travelled and a `complete` for the one whose proof did not. The
|
|
22
|
-
* lesson providers.contract.ts learned about model catalogs holds for accounts too: the operations are the
|
|
23
|
-
* same six for all of them, so the id is a parameter and a provider's own mechanism is its module's to declare
|
|
24
|
-
* (the daemon's ProviderModule.accounts), not a vertical slice through the contract, the router and every test
|
|
25
|
-
* double.
|
|
26
|
-
*
|
|
27
|
-
* WHY NOT THE TRANSLATOR ROUTES. Those address subscriptions CLIProxyAPI holds and re-serves behind an Anthropic
|
|
28
|
-
* endpoint; these credentials live in this daemon's own auth tree (or, for Grok, in OpenCode's), and a
|
|
29
|
-
* disconnect here removes a file rather than asking a proxy to forget one. A provider served both ways (Grok)
|
|
30
|
-
* has a row in each.
|
|
31
|
-
*
|
|
32
|
-
* Nothing redeemable is on any answer here: `accounts` is an OauthAccount list, whose shape has no field a
|
|
33
|
-
* credential could ride in, and a sign-in's proof never leaves the sandbox (provider-oauth.ts, LoginStart). */
|
|
17
|
+
// One route family for the accounts this sandbox holds itself, with the provider as a parameter rather than a vertical
|
|
18
|
+
// slice per provider. Distinct from the translator routes (subscriptions proxied through CLIProxyAPI): these
|
|
19
|
+
// credentials live in this daemon's own auth tree, and no credential ever rides in an answer.
|
|
34
20
|
export const accountsContract = {
|
|
35
21
|
start: oc
|
|
36
22
|
.route({
|
|
@@ -61,8 +47,7 @@ export const accountsContract = {
|
|
|
61
47
|
})
|
|
62
48
|
.input(NativeProviderParamSchema.extend(LoginCancelSchema.shape))
|
|
63
49
|
.output(OkSchema),
|
|
64
|
-
//
|
|
65
|
-
// answering (AccountListQuerySchema); a provider with nothing to measure accepts it and answers at once.
|
|
50
|
+
// `force` re-measures before answering; a provider with nothing to measure accepts it and answers at once.
|
|
66
51
|
accounts: oc
|
|
67
52
|
.route({
|
|
68
53
|
method: "GET",
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { eventIterator, oc } from "@orpc/contract";
|
|
2
|
-
import { AgentCommandsQuerySchema, AgentCommandsSchema
|
|
2
|
+
import { AgentCommandsQuerySchema, AgentCommandsSchema } from "../events/cards.js";
|
|
3
|
+
import { AttachFrameSchema } from "../events/agent-events.js";
|
|
3
4
|
import { AgentTurnSchema, AttachTurnSchema, StartedTurnSchema } from "../schemas/agent.js";
|
|
4
5
|
import { RewindResultSchema, RewindTurnSchema } from "../schemas/history.js";
|
|
5
6
|
import { AgentReplySchema, ProviderRefusalsSchema, ResumeTurnSchema, SteerSchema, StopTurnSchema } from "../schemas/plan-limits.js";
|
|
6
7
|
import { OkSchema } from "../schemas/shared.js";
|
|
7
8
|
|
|
8
|
-
// A turn
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
// turn waiting on any interactive card (plan approval, clarifying questions, a per-tool permission prompt);
|
|
12
|
-
// steer injects a user message into the running turn; stop hard-cancels it daemon-side.
|
|
9
|
+
// A turn executes as a detached daemon-side run. `run` starts it, `attach` streams it to any number of clients
|
|
10
|
+
// (replay then live, no special stream for the initiator), `reply` un-parks it, `steer` injects a message, `stop`
|
|
11
|
+
// hard-cancels it.
|
|
13
12
|
export const agentContract = {
|
|
14
13
|
run: oc
|
|
15
14
|
.route({
|
|
@@ -60,14 +59,7 @@ export const agentContract = {
|
|
|
60
59
|
})
|
|
61
60
|
.input(StopTurnSchema)
|
|
62
61
|
.output(OkSchema),
|
|
63
|
-
|
|
64
|
-
* NOT_FOUND when it holds none (nothing was stranded, another turn has since superseded it, or the daemon
|
|
65
|
-
* restarted), which is what tells a client to fall back to saying something itself.
|
|
66
|
-
*
|
|
67
|
-
* Separate from `run` because it is a different act. `run` says something new; this repeats something already
|
|
68
|
-
* said, and the difference has to survive onto the wire or it cannot survive into the transcript: a repeat
|
|
69
|
-
* sent as a new turn is a new user message, and four presses against one spent allowance then read back, to
|
|
70
|
-
* the model as much as to the reader, as four things the user said and nobody answered. */
|
|
62
|
+
// NOT_FOUND when nothing is held (superseded, or the daemon restarted): the client should fall back to `run`.
|
|
71
63
|
resume: oc
|
|
72
64
|
.route({
|
|
73
65
|
method: "POST",
|
|
@@ -78,9 +70,7 @@ export const agentContract = {
|
|
|
78
70
|
})
|
|
79
71
|
.input(ResumeTurnSchema)
|
|
80
72
|
.output(StartedTurnSchema),
|
|
81
|
-
//
|
|
82
|
-
// forget the provider session. CONFLICT while a turn is running, a restore cannot overwrite files an
|
|
83
|
-
// agent is editing. NOT_FOUND when that message has no checkpoint to go back to.
|
|
73
|
+
// CONFLICT while a turn is running; NOT_FOUND when the message has no checkpoint.
|
|
84
74
|
rewind: oc
|
|
85
75
|
.route({
|
|
86
76
|
method: "POST",
|
|
@@ -91,8 +81,6 @@ export const agentContract = {
|
|
|
91
81
|
})
|
|
92
82
|
.input(RewindTurnSchema)
|
|
93
83
|
.output(RewindResultSchema),
|
|
94
|
-
// The provider's slash commands as last published by one of its turns, so a conversation's `/` popover is
|
|
95
|
-
// populated before it has run one. The live `commands` frame stays authoritative for a running turn.
|
|
96
84
|
commands: oc
|
|
97
85
|
.route({
|
|
98
86
|
method: "GET",
|
|
@@ -103,9 +91,6 @@ export const agentContract = {
|
|
|
103
91
|
})
|
|
104
92
|
.input(AgentCommandsQuerySchema)
|
|
105
93
|
.output(AgentCommandsSchema),
|
|
106
|
-
// The last refusal per provider, as reported by whichever turn was refused (ProviderRefusalSchema). Read
|
|
107
|
-
// alongside the account listings by the surfaces that draw plan limits: the snapshot on an account row says
|
|
108
|
-
// how full its pools were when last polled, and this says whether one of them has since said no.
|
|
109
94
|
refusals: oc
|
|
110
95
|
.route({
|
|
111
96
|
method: "GET",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
-
import { AgentTranscriptSchema } from "../events.js";
|
|
2
|
+
import { AgentTranscriptSchema } from "../events/transcript.js";
|
|
3
3
|
import {
|
|
4
4
|
AgentArchiveSchema,
|
|
5
5
|
AgentAutoLandSchema,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
AgentPlaceSchema,
|
|
12
12
|
AgentRenameSchema,
|
|
13
13
|
AgentResumeAfterLimitSchema,
|
|
14
|
+
AgentMoveAfterLimitSchema,
|
|
14
15
|
AgentResumeAfterOutageSchema,
|
|
15
16
|
AgentsArchivedSchema,
|
|
16
17
|
AgentSearchQuerySchema,
|
|
@@ -25,30 +26,9 @@ import { AgentChangesSchema, AgentHistorySchema } from "../schemas/git.js";
|
|
|
25
26
|
import { FileDiffSchema } from "../schemas/history.js";
|
|
26
27
|
import { OkSchema } from "../schemas/shared.js";
|
|
27
28
|
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
// (AgentChanges), each file flagged `landed` or not, deliberately not the working tree's staged/unstaged
|
|
32
|
-
// shape: a worktree the user never checks out has no index they could stage into. `land` merges the worktree
|
|
33
|
-
// branches into the main tree (per-repo, conflicts reported, nothing lost on failure); `discard` removes
|
|
34
|
-
// worktrees + branches + registry entry. Those branch actions reject workspace conversations explicitly. An
|
|
35
|
-
// unknown {id} is NOT_FOUND; land/discard while the turn runs is CONFLICT.
|
|
36
|
-
// `rename` sets the user-chosen display title, legal mid-turn (it touches no worktree state).
|
|
37
|
-
// `seen`/`seenAll` stamp the read marker behind the cards' unread badge (AgentSummarySchema.seenAt), also
|
|
38
|
-
// legal mid-turn, and like `rename` they never bump `updatedAt` (reading is not activity).
|
|
39
|
-
//
|
|
40
|
-
// ARCHIVE is the non-destructive counterpart to discard, and the one the board leans on: for an isolated
|
|
41
|
-
// conversation, `archive` commits whatever the worktree still holds onto agent/<id> and drops the CHECKOUT;
|
|
42
|
-
// for a workspace conversation it has no git teardown. Both keep the entry and transcript. `list` stops carrying it and
|
|
43
|
-
// `archived` does; `unarchive` puts it back, and either way the next turn re-attaches a worktree from the
|
|
44
|
-
// surviving branch. Archiving a running agent is CONFLICT, same as land/discard.
|
|
45
|
-
//
|
|
46
|
-
// PURGE empties the archive, and it is `discard` applied to every agent already in there: worktree remnants,
|
|
47
|
-
// branches and entries all go. Deliberately the whole archive and not a list of ids, the archive is the pile
|
|
48
|
-
// of agents the user has already decided are over, so "clean it up" is one act with one confirmation, and a
|
|
49
|
-
// per-id purge would be `discard`, which already exists. Never touches a running agent (a turn un-archives its
|
|
50
|
-
// own agent, so there should be none) and answers with what it actually deleted: a teardown that fails on one
|
|
51
|
-
// agent's repo leaves that one behind rather than taking the batch down with it.
|
|
29
|
+
// Every registered conversation-agent (AgentSummarySchema); an unknown {id} is NOT_FOUND across this whole family.
|
|
30
|
+
// `archive` is the non-destructive counterpart to `discard` (worktree committed, entry kept); `purge` is `discard`
|
|
31
|
+
// applied to every already-archived agent.
|
|
52
32
|
export const agentsContract = {
|
|
53
33
|
list: oc
|
|
54
34
|
.route({
|
|
@@ -68,10 +48,7 @@ export const agentsContract = {
|
|
|
68
48
|
"The same shape as the live fleet, for the conversations somebody has decided are finished. Their work is kept, and any one of them can be brought back.",
|
|
69
49
|
})
|
|
70
50
|
.output(AgentsListSchema),
|
|
71
|
-
//
|
|
72
|
-
// the board hides by design (the Finished lane windows to a handful, archived agents are off the roster
|
|
73
|
-
// entirely), and a filter that reports "no matches" while the agent sits one click away is a lie. The
|
|
74
|
-
// never-carded conversations that are neither are `sessions.list`'s query, which matches by the same rule.
|
|
51
|
+
// Never-carded conversations (neither live nor archived) are `sessions.list`'s query, matching by the same rule.
|
|
75
52
|
search: oc
|
|
76
53
|
.route({
|
|
77
54
|
method: "GET",
|
|
@@ -101,12 +78,8 @@ export const agentsContract = {
|
|
|
101
78
|
})
|
|
102
79
|
.input(AgentTranscriptQuerySchema)
|
|
103
80
|
.output(AgentTranscriptSchema),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
* provider session is FORGOTTEN in the same breath, rewind-style, so the next real turn opens a fresh
|
|
107
|
-
* runtime session seeded from the record, where the placed line reads as the agent's own words, because
|
|
108
|
-
* the handoff renders every assistant row identically. A running turn is CONFLICT: the illusion can only be
|
|
109
|
-
* established between turns, and a concurrent turn would resume the very session this exists to retire. */
|
|
81
|
+
// Also forgets the provider session, rewind-style, so the next fresh session reads the placed line as the agent's
|
|
82
|
+
// own.
|
|
110
83
|
place: oc
|
|
111
84
|
.route({
|
|
112
85
|
method: "POST",
|
|
@@ -127,9 +100,6 @@ export const agentsContract = {
|
|
|
127
100
|
})
|
|
128
101
|
.input(AgentRenameSchema)
|
|
129
102
|
.output(AgentSummarySchema),
|
|
130
|
-
// This agent's own land-at-completion posture, an override of the sandbox-wide `autoLand` setting; null
|
|
131
|
-
// clears it back to "inherit". Legal mid-turn on purpose: the setting is read at turn COMPLETION, so
|
|
132
|
-
// flipping it while the agent works is exactly "hold THIS turn's work for review", the press that matters.
|
|
133
103
|
autoLand: oc
|
|
134
104
|
.route({
|
|
135
105
|
method: "POST",
|
|
@@ -140,13 +110,7 @@ export const agentsContract = {
|
|
|
140
110
|
})
|
|
141
111
|
.input(AgentAutoLandSchema)
|
|
142
112
|
.output(AgentSummarySchema),
|
|
143
|
-
|
|
144
|
-
* setting; null clears it back to "inherit". The chat's offer at the moment a turn dies writes this and
|
|
145
|
-
* never the global: the press happens inside one conversation and means "finish this piece of work", so
|
|
146
|
-
* its honest scope is that conversation. Sandbox > Agent owns the default for everything else.
|
|
147
|
-
*
|
|
148
|
-
* Legal mid-turn, and unlike autoLand it is legal for a WORKSPACE conversation too, an outage kills a
|
|
149
|
-
* main-tree chat exactly as readily as an isolated one, and there is no branch involved either way. */
|
|
113
|
+
// Legal for a workspace conversation too (unlike autoLand): an outage kills a main-tree chat just as readily.
|
|
150
114
|
resumeAfterOutage: oc
|
|
151
115
|
.route({
|
|
152
116
|
method: "POST",
|
|
@@ -157,13 +121,7 @@ export const agentsContract = {
|
|
|
157
121
|
})
|
|
158
122
|
.input(AgentResumeAfterOutageSchema)
|
|
159
123
|
.output(AgentSummarySchema),
|
|
160
|
-
|
|
161
|
-
* above; null clears it back to "inherit". Offered on the CARD as well as in the chat, which is the one
|
|
162
|
-
* placement difference worth stating: an outage is over in minutes and is met by whoever is in the room,
|
|
163
|
-
* while a limit reopens hours later, so the person deciding is usually looking at a board rather than at a
|
|
164
|
-
* transcript.
|
|
165
|
-
*
|
|
166
|
-
* Legal mid-turn, and for a workspace conversation, for the same two reasons its neighbour is. */
|
|
124
|
+
// Also offered on the card, not just chat: a limit reopens hours later, so the decider is usually at a board.
|
|
167
125
|
resumeAfterLimit: oc
|
|
168
126
|
.route({
|
|
169
127
|
method: "POST",
|
|
@@ -174,6 +132,17 @@ export const agentsContract = {
|
|
|
174
132
|
})
|
|
175
133
|
.input(AgentResumeAfterLimitSchema)
|
|
176
134
|
.output(AgentSummarySchema),
|
|
135
|
+
// Moves the held turn the moment the refusal lands, not on the next attempt.
|
|
136
|
+
moveAfterLimit: oc
|
|
137
|
+
.route({
|
|
138
|
+
method: "POST",
|
|
139
|
+
path: "/agents/{id}/move-after-limit",
|
|
140
|
+
summary: "Whether this conversation moves to another account when its allowance is spent",
|
|
141
|
+
description:
|
|
142
|
+
"Overrides the sandbox-wide setting for one conversation; clear it to follow the default again. A move spends a second account of the same provider on this conversation's behalf, so it is off unless asked for.",
|
|
143
|
+
})
|
|
144
|
+
.input(AgentMoveAfterLimitSchema)
|
|
145
|
+
.output(AgentSummarySchema),
|
|
177
146
|
seen: oc
|
|
178
147
|
.route({
|
|
179
148
|
method: "POST",
|
|
@@ -184,17 +153,7 @@ export const agentsContract = {
|
|
|
184
153
|
})
|
|
185
154
|
.input(AgentIdSchema)
|
|
186
155
|
.output(AgentSummarySchema),
|
|
187
|
-
|
|
188
|
-
* standing arrangement an agent can enter into on the user's behalf without being asked again.
|
|
189
|
-
*
|
|
190
|
-
* ALL OF THEM, NOT ONE. The id of an individual watch is on the card, but the press a person makes about a
|
|
191
|
-
* card means "stop this conversation waking itself up", and picking watches off a submenu one at a time is a
|
|
192
|
-
* chore invented by the data shape rather than wanted by anybody. A conversation that should go on watching
|
|
193
|
-
* one thing and not another can be told so in the chat, which is where the watches were armed.
|
|
194
|
-
*
|
|
195
|
-
* No wake fires for what this disarms, which is the whole point: a watch left armed keeps a hosted machine
|
|
196
|
-
* awake and eventually starts a turn nobody is expecting. Nothing else about the conversation moves, so the
|
|
197
|
-
* card it hands back differs only by having lost its watches. */
|
|
156
|
+
// A finer-grained ask (watch this, not that) goes through the chat, not a per-watch id here.
|
|
198
157
|
stopWatching: oc
|
|
199
158
|
.route({
|
|
200
159
|
method: "POST",
|
|
@@ -223,11 +182,8 @@ export const agentsContract = {
|
|
|
223
182
|
})
|
|
224
183
|
.input(AgentIdSchema)
|
|
225
184
|
.output(AgentChangesSchema),
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
// per repo and answers nothing until then. Reading one of these files is the SAME call as reading a
|
|
229
|
-
// reviewable one (`fileDiff` below): the question "what did this conversation do to this file" has one
|
|
230
|
-
// answer whether or not you have since committed it.
|
|
185
|
+
// Costs a `git log` per repo: ask only once `diff` reports something absorbed. Reading a file here reuses
|
|
186
|
+
// `fileDiff`.
|
|
231
187
|
history: oc
|
|
232
188
|
.route({
|
|
233
189
|
method: "GET",
|
|
@@ -257,9 +213,7 @@ export const agentsContract = {
|
|
|
257
213
|
})
|
|
258
214
|
.input(AgentLandSchema)
|
|
259
215
|
.output(LandResultSchema),
|
|
260
|
-
//
|
|
261
|
-
// maintainer). Stamps AgentSummarySchema.landRequested with the caller's identity and re-frames the fleet,
|
|
262
|
-
// so every maintainer's board carries the request; the land or discard that answers it clears the stamp.
|
|
216
|
+
// Stamps `AgentSummarySchema.landRequested` with the caller's identity.
|
|
263
217
|
requestLand: oc
|
|
264
218
|
.route({
|
|
265
219
|
method: "POST",
|
|
@@ -8,14 +8,10 @@ import {
|
|
|
8
8
|
AutomationSchema,
|
|
9
9
|
AutomationsListSchema,
|
|
10
10
|
} from "../schemas/automations.js";
|
|
11
|
-
import { OkSchema } from "../schemas/shared.js";
|
|
11
|
+
import { DoorTokenSchema, OkSchema } from "../schemas/shared.js";
|
|
12
12
|
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
// next poll); `setEnabled` changes only the switch, so a list-row action never has to reconstruct the record.
|
|
16
|
-
// `remove` deletes.
|
|
17
|
-
// The `pending*` routes are the owner's approval queue: a `requireApproval` automation holds each fire here
|
|
18
|
-
// instead of waking; `approve` runs the held wake, `reject` drops it.
|
|
13
|
+
// Automations manifest (scheduled agent wake-ups); `pending*` is the owner's approval queue for wakes a
|
|
14
|
+
// `requireApproval` automation holds instead of firing directly.
|
|
19
15
|
export const automationsContract = {
|
|
20
16
|
list: oc
|
|
21
17
|
.route({
|
|
@@ -25,10 +21,6 @@ export const automationsContract = {
|
|
|
25
21
|
description: "Every automation with its recent runs and when it fires next.",
|
|
26
22
|
})
|
|
27
23
|
.output(AutomationsListSchema),
|
|
28
|
-
/* WHAT CAN WAKE AN AGENT HERE, and what to start from, the daemon's own sources and templates merged with
|
|
29
|
-
* every installed extension's. The composer's entire vocabulary, so that adding a trigger to an area is a
|
|
30
|
-
* change to that area and to nothing else. `upsert` below validates against the same merge, which is what
|
|
31
|
-
* keeps the surface and the daemon from disagreeing about what is allowed. */
|
|
32
24
|
catalog: oc
|
|
33
25
|
.route({
|
|
34
26
|
method: "GET",
|
|
@@ -65,25 +57,17 @@ export const automationsContract = {
|
|
|
65
57
|
})
|
|
66
58
|
.input(AutomationIdParamSchema)
|
|
67
59
|
.output(OkSchema),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
* listener's prompt is a brief about handling the events riding with it, and by hand there are none, so the
|
|
80
|
-
* button could only ever produce an agent told to handle events, handed none, asking where they went. Worse,
|
|
81
|
-
* that pointless run took the automation's turn: a real mention arriving while it ran had to wait behind it.
|
|
82
|
-
* Refused here rather than hidden in the UI alone, because the honest answer to "how do I test this" is to
|
|
83
|
-
* send the bot a message, which costs nothing and tests the whole path.
|
|
84
|
-
*
|
|
85
|
-
* Acks immediately with the turn detached, like /fire and `approve`: the guard alone may take a minute, and
|
|
86
|
-
* the run history (with the session that makes it openable) is where the outcome lands. */
|
|
60
|
+
rotateToken: oc
|
|
61
|
+
.route({
|
|
62
|
+
method: "POST",
|
|
63
|
+
path: "/automations/{id}/rotate-token",
|
|
64
|
+
summary: "Rotate an automation's webhook token or intake key",
|
|
65
|
+
description:
|
|
66
|
+
"Mints a new credential for the door this automation opens and retires the old one at once. Every caller has to be handed the new URL; that is the point. Refused for an automation with no door.",
|
|
67
|
+
})
|
|
68
|
+
.input(AutomationIdParamSchema)
|
|
69
|
+
.output(DoorTokenSchema),
|
|
70
|
+
// Skips only the approval gate, since pressing this button is the owner's approval.
|
|
87
71
|
run: oc
|
|
88
72
|
.route({
|
|
89
73
|
method: "POST",
|