@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/schemas/agents.ts
CHANGED
|
@@ -2,55 +2,22 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { AgentHarnessSchema, AgentOriginSchema, AgentProviderSchema, ForkedFromSchema } from "./agent.js";
|
|
4
4
|
import { LoopStateSchema } from "./loops.js";
|
|
5
|
-
// A
|
|
6
|
-
//
|
|
7
|
-
// surface shows both through the same status/activity/cost lifecycle.
|
|
5
|
+
// A fleet agent is any conversation with a registry entry, keyed by conversationId. Isolated ones own a git worktree
|
|
6
|
+
// (branch agent/<id>); workspace conversations have none, but both share one status/activity/cost lifecycle.
|
|
8
7
|
|
|
9
|
-
// idle/running/awaiting
|
|
10
|
-
// landed
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
* instant: /agent/stop aborts the provider and then waits for the turn's generator to unwind (worktree and
|
|
23
|
-
* registry cleanup), which is seconds of real time. For that whole window the runtime half still said
|
|
24
|
-
* `running`, so every surface kept its spinner turning on a turn the user had already killed, and then the
|
|
25
|
-
* card jumped to a settled state out of nowhere. `stopping` is what the daemon knows the instant the abort
|
|
26
|
-
* lands, published immediately so the press has a visible result; `stopped` is where the turn comes to rest.
|
|
27
|
-
*
|
|
28
|
-
* `dismissing` IS THAT SAME WINDOW FOR THE OTHER ENDING A PERSON CHOOSES, waving away the question the turn was
|
|
29
|
-
* parked on, and it is a status of its own for one reason: the two endings come to rest in different places.
|
|
30
|
-
* A Stop leaves half-written work somebody has to pick up, so its card settles in Attention; a dismissal is
|
|
31
|
-
* "I am done with this", so its card settles in Finished. Published as one value, the unwind could not say
|
|
32
|
-
* which, so every surface had to park the card where it already was and move it once the turn had ACTUALLY
|
|
33
|
-
* finished, seconds later, and the daemon papered over the dismissal half by suppressing the broadcast that
|
|
34
|
-
* would have filed it under Active in the meantime — a bet on nothing else broadcasting inside that window,
|
|
35
|
-
* which a second agent's frame lost routinely. Said apart, the destination is known at the press: each card
|
|
36
|
-
* moves once, immediately, to the lane it is going to end up in, and no surface has to guess or suppress.
|
|
37
|
-
*
|
|
38
|
-
* `stopped` is deliberately its own value rather than `interrupted` or `error`. Not `error`, which is what a
|
|
39
|
-
* stopped turn used to report (every provider adapter surfaces the abort's unwind as an error frame), a card
|
|
40
|
-
* accusing the user's own deliberate press of being a failure. Not `interrupted` either: that one means the
|
|
41
|
-
* daemon died under the turn, and a boot pass may re-run it, which is precisely what must never happen to a
|
|
42
|
-
* turn a person chose to end. */
|
|
43
|
-
/* `resuming` is the same argument as `stopping`, made about the other end of a turn's life: the turn was killed
|
|
44
|
-
* by something the daemon is ALREADY undoing (a rotated credential being re-minted, a provider outage being
|
|
45
|
-
* waited out, turn-resume.ts), so it has stopped without having ended. The gap is real time, a few seconds for
|
|
46
|
-
* a re-mint, minutes for an outage's backoff, and for that whole window the turn reported the resting `idle`,
|
|
47
|
-
* which the board reads as finished. So a 401 that nobody caused and nobody has to fix filed the card under
|
|
48
|
-
* Finished and then pulled it back into Active a moment later, which is the fleet contradicting itself in front
|
|
49
|
-
* of the user about work that never stopped being in progress.
|
|
50
|
-
*
|
|
51
|
-
* Never persisted (see PersistedAgentStatusSchema): what is coming back is remembered in the daemon's memory
|
|
52
|
-
* alone, and a daemon that dies mid-wait takes the resume with it, so the card falls back to the ending its
|
|
53
|
-
* killed turn actually wrote and reads as finished, which by then is true. Nothing is left to bring it back. */
|
|
8
|
+
// idle/running/awaiting: turn lifecycle (awaiting = paused on a plan or question)
|
|
9
|
+
// ready/landed/conflict: land-flow outcomes (ready = clean completion held on the branch, auto-land off)
|
|
10
|
+
// error: terminal turn failure
|
|
11
|
+
// interrupted: the daemon died under the turn (crash, OOM, rebuild); without it such a turn rehydrates as idle and its
|
|
12
|
+
// parked question disappears
|
|
13
|
+
// stopping/stopped: the two halves of a user's Stop, since a hard-cancel is not instant (`stopping` the moment the
|
|
14
|
+
// abort lands, `stopped` once the turn's generator has unwound)
|
|
15
|
+
// dismissing: the same window for waving away a parked question; settles in Finished rather than Attention, since
|
|
16
|
+
// nothing is left half-done
|
|
17
|
+
// `stopped` is its own value, never `error` (a deliberate stop is not a failure) or `interrupted` (which allows an
|
|
18
|
+
// automatic re-run)
|
|
19
|
+
// resuming: the turn was killed by something the daemon is already undoing (a credential re-mint, an outage backoff);
|
|
20
|
+
// never persisted, since a daemon restart forgets the resume and the turn's own last-written ending becomes true again
|
|
54
21
|
export const AgentStatusSchema = z.enum([
|
|
55
22
|
"idle",
|
|
56
23
|
"running",
|
|
@@ -59,6 +26,7 @@ export const AgentStatusSchema = z.enum([
|
|
|
59
26
|
"dismissing",
|
|
60
27
|
"stopped",
|
|
61
28
|
"resuming",
|
|
29
|
+
"landing",
|
|
62
30
|
"ready",
|
|
63
31
|
"landed",
|
|
64
32
|
"conflict",
|
|
@@ -78,48 +46,25 @@ export const AgentAttentionSchema = z.object({
|
|
|
78
46
|
plan: z.boolean().describe("It has proposed a plan and is waiting for a yes."),
|
|
79
47
|
question: z.boolean().describe("It has asked you something."),
|
|
80
48
|
permission: z.boolean().describe("It wants to use a tool it needs permission for."),
|
|
81
|
-
// A
|
|
82
|
-
//
|
|
83
|
-
service: z
|
|
84
|
-
.boolean()
|
|
85
|
-
.describe("It wants to spend money on a paid service and is waiting for approval. The one pause where waiting costs it the whole call."),
|
|
86
|
-
// A missing capability parked on the owner's setup (capabilities/capability-offer.ts), the agent is
|
|
87
|
-
// waiting for something to be connected, so the lane can say "setup needed" rather than a generic pause.
|
|
49
|
+
// A missing capability (capabilities/capability-offer.ts); lets the lane say "setup needed" rather than a generic
|
|
50
|
+
// pause.
|
|
88
51
|
capability: z.boolean().describe("It needs something connected that is not connected yet."),
|
|
89
|
-
// A gated credential parked on a
|
|
90
|
-
//
|
|
91
|
-
// for whoever is looking at it, this one waits for the specific people the gate names.
|
|
52
|
+
// A gated credential parked on a named person's click; the one pause the board's reader may not be able to clear
|
|
53
|
+
// themselves.
|
|
92
54
|
credential: z
|
|
93
55
|
.boolean()
|
|
94
56
|
.describe("It is waiting for a named person to release a credential. The one pause that may not be yours to clear, whatever your role."),
|
|
95
57
|
conflict: z.boolean().describe("Its work cannot be merged without somebody resolving a clash."),
|
|
96
58
|
});
|
|
97
59
|
export type AgentAttention = z.infer<typeof AgentAttentionSchema>;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
* there, waiting, and the board can say so because the pause is live. This is the opposite shape and the reason
|
|
102
|
-
* it is a field of its own: the turn is over, nobody is waiting, and the work stopped short anyway. That card
|
|
103
|
-
* reads `idle` beside a hundred others that finished what they were asked, which is how a session with three of
|
|
104
|
-
* seven steps still open goes back onto the board looking exactly like a session that is done.
|
|
105
|
-
*
|
|
106
|
-
* DERIVED, NEVER DECLARED, and that is the whole design constraint. Nothing here asks a model anything or asks
|
|
107
|
-
* an agent to report on itself: both readings are taken from frames the daemon already receives on every
|
|
108
|
-
* harness, once, at the finish that flushes the turn's tokens and tool counts. An agent cannot flatter this
|
|
109
|
-
* field, and a harness that never learned about it still fills it.
|
|
110
|
-
*
|
|
111
|
-
* Absent for the ordinary card, which is most of them: a turn that ends with its list clear and its check green
|
|
112
|
-
* has nothing to say here, and neither has one that kept no list and stood under no check. */
|
|
60
|
+
// What the last turn left open, measured at the moment it ended, unlike AgentAttentionSchema's live parked waits.
|
|
61
|
+
// Derived from finish frames every harness sends, never self-reported; absent for a turn that closed its list and
|
|
62
|
+
// passed its checks.
|
|
113
63
|
export const UnfinishedWorkSchema = z.object({
|
|
114
|
-
//
|
|
115
|
-
// and NOT `updatedAt`: a card touched since (a land, a rename) has moved without the work moving.
|
|
64
|
+
// Epoch ms the turn ended; not `updatedAt`, which moves on a land or rename without the work moving.
|
|
116
65
|
at: z.number().describe("When the turn that left this ended, in milliseconds."),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
* in-progress item if there is one, else the first still pending.
|
|
120
|
-
*
|
|
121
|
-
* It is the agent's own account of the job, so a count here is not an inference about what it meant: it is
|
|
122
|
-
* the list it wrote, with items on it nobody crossed off. Absent when the conversation kept no list. */
|
|
66
|
+
// The agent's own checklist as of that turn's last word on it; `open`/`total` count items, `next` is the
|
|
67
|
+
// in-progress or first pending one.
|
|
123
68
|
steps: z
|
|
124
69
|
.object({
|
|
125
70
|
open: z.number().describe("Items on it that were never completed."),
|
|
@@ -128,91 +73,56 @@ export const UnfinishedWorkSchema = z.object({
|
|
|
128
73
|
})
|
|
129
74
|
.optional()
|
|
130
75
|
.describe("The agent's own checklist where that turn left it. Absent for a conversation that kept no list."),
|
|
131
|
-
//
|
|
132
|
-
// turn gets two rounds to repair what a check reports and can then end regardless, so this is the workspace's
|
|
133
|
-
// own gate saying the work is not done, in a place nothing but the land used to read.
|
|
76
|
+
// Name of the `turn.ending` check still red when the turn ended, after its two repair rounds ran out.
|
|
134
77
|
check: z.string().optional().describe("The end-of-turn check that was still failing when the turn ended, by name."),
|
|
135
78
|
});
|
|
136
79
|
export type UnfinishedWork = z.infer<typeof UnfinishedWorkSchema>;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
*
|
|
140
|
-
* ONE SHAPE, TWO CARRIERS, and that is the reason it is a schema of its own rather than three fields written
|
|
141
|
-
* out twice. The same sentence reaches the Changes panel down two roads, the fleet roster, which is live and
|
|
142
|
-
* drops archived agents, and the review, which is a rescan and outlives the card (OriginAgent), so the panel
|
|
143
|
-
* takes whichever answers first and must not care which one did. Two hand-kept copies of these three fields
|
|
144
|
-
* would be two things to keep in step, and the one that drifted would be the one nobody was looking at.
|
|
145
|
-
*
|
|
146
|
-
* THE PARTS STAY APART. A subject is one bounded line everywhere it is stored and shown; the notes are
|
|
147
|
-
* sentences for the people who read a release. Flattening them into one string would produce a run-on subject
|
|
148
|
-
* in the commit box and a truncated note in the changelog, so they are joined only at the moment of the fill,
|
|
149
|
-
* where they become a commit message with its trailers and nowhere before it. */
|
|
80
|
+
// A landing's commit message: subject plus the two trailer sentences a changelog repo gets. One schema, not three
|
|
81
|
+
// duplicated fields, since both the live roster and the review carrier must read the same shape and can't disagree.
|
|
150
82
|
export const LandedMessageSchema = z.object({
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
*
|
|
154
|
-
* A title names the ASK, and it is written once, from the opening prompt, a second into the first turn. A
|
|
155
|
-
* conversation that opens "audit the review panel" and then spends four turns fixing what the audit found
|
|
156
|
-
* still answers to "Review panel · audit", a good name for the session and a wrong subject for the
|
|
157
|
-
* commit. This is read off the code instead, so it describes the change the user is about to record. */
|
|
83
|
+
// Written from the landed diff, not the opening prompt: a session that drifts from its title still needs an
|
|
84
|
+
// accurate subject.
|
|
158
85
|
subject: z
|
|
159
86
|
.string()
|
|
160
87
|
.describe(
|
|
161
88
|
"One line saying what the merged work did, read off the code rather than off the opening request. A conversation that asks for an audit and then spends four turns fixing what it found needs a subject about the fixes.",
|
|
162
89
|
),
|
|
163
|
-
|
|
164
|
-
* a repo that keeps a changelog (SandboxSettings.changelogRepos).
|
|
165
|
-
*
|
|
166
|
-
* Usually absent, and that is the design: most landings change nothing a user would notice, and the model
|
|
167
|
-
* is told to omit the note for those rather than to invent one. */
|
|
90
|
+
// Usually absent by design: the model omits it rather than inventing a note for an unremarkable change.
|
|
168
91
|
note: z
|
|
169
92
|
.string()
|
|
170
93
|
.optional()
|
|
171
94
|
.describe(
|
|
172
95
|
"The same change said to somebody who uses the product, for a repository that keeps a changelog. Usually absent, because most changes are not ones a user would notice.",
|
|
173
96
|
),
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
* update rather than after. Nearly always absent: the model is told a breaking note is for removals only,
|
|
177
|
-
* and to omit it when in doubt, except when the landing shrinks a wire-contract lock, where the sentence
|
|
178
|
-
* is REQUIRED and mechanically guaranteed (the daemon's git/contract-shrink.ts) rather than judged. */
|
|
97
|
+
// Nearly always absent (removals only); required and mechanically guaranteed when a landing shrinks a wire-contract
|
|
98
|
+
// lock.
|
|
179
99
|
breaking: z
|
|
180
100
|
.string()
|
|
181
101
|
.optional()
|
|
182
102
|
.describe("What this change takes away, for anything already relying on it. Nearly always absent: it is for removals, not for additions."),
|
|
183
103
|
});
|
|
184
104
|
export type LandedMessage = z.infer<typeof LandedMessageSchema>;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
* skipped , not asked at all: it refused within the last few minutes and the walk stepped over it, with the
|
|
191
|
-
* reason it gave back then. Skipping is the memo working, and it reads as such.
|
|
192
|
-
* The steps arrive in the order they were spent, so the list IS the timeline. */
|
|
105
|
+
// One model's turn in the drafting walk (agent/role-model.ts tries connected models in order), in spend order:
|
|
106
|
+
// asking: in flight, `ms` absent
|
|
107
|
+
// answered: wrote the sentence, in `ms`
|
|
108
|
+
// refused: failed or declined, in `ms`, with `reason`
|
|
109
|
+
// skipped: not asked, since it refused recently and the walk stepped over it
|
|
193
110
|
export const LandedMessageStepSchema = z.object({
|
|
194
111
|
provider: z.string().min(1).describe("Which provider was asked."),
|
|
195
112
|
model: z.string().min(1).describe("Which of its models."),
|
|
196
113
|
status: z
|
|
197
114
|
.enum(["asking", "answered", "refused", "skipped"])
|
|
198
115
|
.describe("How this one went. Skipped means it was not asked at all, because it refused a few minutes ago and the walk stepped over it."),
|
|
199
|
-
//
|
|
200
|
-
//
|
|
116
|
+
// Epoch ms it started; client-measures an in-flight step's ticking display. Absent for `skipped`, which cost no
|
|
117
|
+
// time.
|
|
201
118
|
at: z.number().optional().describe("When it started being asked, in milliseconds. Absent for one that was skipped, which cost no time."),
|
|
202
119
|
ms: z.number().optional().describe("How long it took. Absent while it is still being asked."),
|
|
203
120
|
reason: z.string().optional().describe("Why it refused, in its own words."),
|
|
204
121
|
});
|
|
205
122
|
export type LandedMessageStep = z.infer<typeof LandedMessageStepSchema>;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
* `outcome` is absent while the draft is RUNNING, which is what "a sentence is on its way" now means, the
|
|
210
|
-
* boolean flag this replaces could say only that, and nothing else this schema carries. Ended, it is:
|
|
211
|
-
* written, the sentence is on the card (`landedMessage`) and in the box; the steps say who wrote it.
|
|
212
|
-
* failed , nothing usable came back. The steps carry each model's own words; `reason` is the one-line
|
|
213
|
-
* account for the surfaces with a single line to spend (an answer that was itself a refusal
|
|
214
|
-
* sentence, or the whole chain spent).
|
|
215
|
-
* An empty `steps` with no outcome is the moment before the first model is asked, the diff is being read. */
|
|
123
|
+
// Full account of one landing's commit message being drafted: started, which models were asked, how each went, and how
|
|
124
|
+
// it ended. `outcome` absent means still running; `written` puts the sentence on the card, `failed` carries a one-line
|
|
125
|
+
// `reason`.
|
|
216
126
|
export const LandedMessageDraftSchema = z.object({
|
|
217
127
|
startedAt: z.number().describe("When the drafting began, in milliseconds."),
|
|
218
128
|
steps: z
|
|
@@ -229,83 +139,43 @@ export const LandedMessageDraftSchema = z.object({
|
|
|
229
139
|
});
|
|
230
140
|
export type LandedMessageDraft = z.infer<typeof LandedMessageDraftSchema>;
|
|
231
141
|
export const AgentSummarySchema = z.object({
|
|
232
|
-
// The conversationId.
|
|
233
142
|
id: z.string().describe("The conversation id, which is how every other call addresses it."),
|
|
234
143
|
sessionId: z.string().optional().describe("The provider session behind the last turn. It is retired whenever the model or account changes."),
|
|
235
|
-
// First prompt, sanitized to one bounded line.
|
|
236
144
|
title: z.string().optional().describe("What to call it: the first prompt cut to one line, unless somebody renamed it."),
|
|
237
145
|
status: AgentStatusSchema.describe(
|
|
238
|
-
"What it is doing. Stopping and stopped are the two halves of somebody pressing stop, because a cancel is not instant; dismissing is the same window for a question waved away, which ends the turn too but owes the user nothing; resuming means the sandbox is already putting right whatever killed the turn.",
|
|
146
|
+
"What it is doing. Stopping and stopped are the two halves of somebody pressing stop, because a cancel is not instant; dismissing is the same window for a question waved away, which ends the turn too but owes the user nothing; resuming means the sandbox is already putting right whatever killed the turn; landing means its work is being carried into the workspace right now, and nothing may act on its branch until that settles.",
|
|
239
147
|
),
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
* switched off, a spent allowance, a model the endpoint has never heard of) reached every surface as a grey
|
|
243
|
-
* "error" and a link into the transcript, so the one place the reason existed was the dead conversation
|
|
244
|
-
* itself, which is exactly where an unattended run, started from a fan-out nobody is watching, is least
|
|
245
|
-
* likely to be read. Absent unless the last turn ended in failure, and cleared the moment it runs again. */
|
|
148
|
+
// Sentence the last turn died on; carried since `error` status alone isn't an answer, especially for an unwatched
|
|
149
|
+
// run.
|
|
246
150
|
failure: z
|
|
247
151
|
.string()
|
|
248
152
|
.optional()
|
|
249
153
|
.describe(
|
|
250
154
|
"Why the last turn failed, in the words it died on. Absent unless it did, and cleared the moment it runs again. Carried here because the word error on its own is not an answer, least of all for a run nobody was watching.",
|
|
251
155
|
),
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
* difference and could not.
|
|
255
|
-
*
|
|
256
|
-
* The chat has always had it, and the gap between the two surfaces is the whole reason this exists. A chat
|
|
257
|
-
* reads `rate_limit` and renders a muted notice with a countdown and a press; the board read `status:
|
|
258
|
-
* "error"` and rendered a red crash line with "View error" on it, because the code never reached the
|
|
259
|
-
* summary. So one spent allowance looked exactly like a harness that died mid-run, on the surface where
|
|
260
|
-
* most people meet it, and the state the product knows most about (it knows when it ends) was the one
|
|
261
|
-
* drawn with the least. */
|
|
156
|
+
// The error frame's own code, so the board can distinguish e.g. a rate limit from a crash the way chat already
|
|
157
|
+
// does.
|
|
262
158
|
failureCode: z
|
|
263
159
|
.string()
|
|
264
160
|
.optional()
|
|
265
161
|
.describe(
|
|
266
162
|
"Which kind of failure it was, as the turn's own error frame coded it. Absent for a failure nothing could classify, which reads as the plain red line it is.",
|
|
267
163
|
),
|
|
268
|
-
|
|
269
|
-
* fact this failure has and no other failure here does, and the reason it is not a failure at all so much
|
|
270
|
-
* as a wait: nothing is broken, nobody has anything to fix, and the thing that changes the outcome is a
|
|
271
|
-
* clock. A card that cannot say the hour has to spend its line saying "Error" instead, which is how an
|
|
272
|
-
* 18-hour-old refusal went on reporting a wall that had reopened before breakfast.
|
|
273
|
-
*
|
|
274
|
-
* Absent means the instant is genuinely unknown, which for Grok (no published quota) and Cursor (not routed
|
|
275
|
-
* through the translator) is the honest answer and stays one. Never invent one: a countdown to a guess is
|
|
276
|
-
* worse than no countdown, because the reader plans around it. */
|
|
164
|
+
// Epoch seconds the spent allowance reopens; absent means genuinely unknown (Grok, Cursor) — never guess one.
|
|
277
165
|
limitResetsAt: z.number().optional().describe("When the spent allowance reopens, in epoch seconds. Absent when the provider publishes no instant."),
|
|
278
|
-
/* THE DAEMON IS STILL HOLDING THAT EXACT TURN, so the way on is one press that RE-RUNS it rather than a new
|
|
279
|
-
* message saying "carry on" (turn-resume.ts's pendingLimit has the whole argument, and the transcript full
|
|
280
|
-
* of the word "Continue" that made it). On the summary because the board is where somebody with four
|
|
281
|
-
* stranded agents is standing, and until now the press existed only inside each chat. */
|
|
282
166
|
limitHeld: z.boolean().optional().describe("Whether the refused turn is held whole, so sending again re-runs it instead of appending to it."),
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
* pressing anything.
|
|
286
|
-
*
|
|
287
|
-
* IT IS THE ONE THING THAT MOVES A STRANDED CARD OUT OF THE ATTENTION LANE, and the only reason it needs to
|
|
288
|
-
* be on the wire at all. "Does this session need me?" is the question that lane answers, and for a spent
|
|
289
|
-
* allowance the honest answer is yes: the window reopening does not send the turn, a person does. Unless
|
|
290
|
-
* this is set, in which case a machine does, and demanding a press for work already booked is the same
|
|
291
|
-
* false alarm as demanding one for a turn that is running.
|
|
292
|
-
*
|
|
293
|
-
* A BOOLEAN THE DAEMON ALREADY DECIDED rather than a posture the client re-folds. The effective posture is
|
|
294
|
-
* two levels deep (this conversation's override, else the sandbox setting), and the lane machine is a leaf
|
|
295
|
-
* with no store to ask: threading a settings read through every caller of `laneOf` would put the answer in
|
|
296
|
-
* five places and let them disagree. The daemon resolves it once, where the failure happened. */
|
|
167
|
+
// Whether the daemon has already booked a retry at the reset; the one thing that keeps a stranded card out of the
|
|
168
|
+
// Attention lane.
|
|
297
169
|
limitScheduled: z.boolean().optional().describe("Whether the held turn is already booked to go again at the reset, so nobody has to press anything."),
|
|
170
|
+
// Account a booked move is sending the held turn to; set alongside `limitScheduled`, cleared by the move's own
|
|
171
|
+
// turn.
|
|
172
|
+
limitMoving: z.string().optional().describe("The account the held turn is being moved to by the owner's policy, while that move is booked."),
|
|
298
173
|
provider: AgentProviderSchema.describe("Which model provider it runs on."),
|
|
299
174
|
harness: AgentHarnessSchema.describe("Which agentic loop it runs on."),
|
|
300
|
-
//
|
|
301
|
-
// with the conversation, so a card can say where the work is happening without asking anything.
|
|
175
|
+
// Latched with the conversation, so the card can say where work runs without asking anything else.
|
|
302
176
|
runner: z.string().optional().describe("The runner this conversation runs on. Absent means this sandbox."),
|
|
303
|
-
//
|
|
304
|
-
//
|
|
305
|
-
// client opening it seeds its composer from them, rather than from whatever that browser last picked in some
|
|
306
|
-
// other tab. Absent for an agent whose turns predate the record (model has always been kept; the rest are
|
|
307
|
-
// newer). `fast` is what was REQUESTED, not what was served, the served answer belongs to a turn and rides
|
|
308
|
-
// its `fast_mode` frame, while this is the composer's memory of the user's own choice.
|
|
177
|
+
// Per-conversation, so opening it restores its own choices rather than another tab's; `fast` here is what was asked
|
|
178
|
+
// for, not what was served.
|
|
309
179
|
model: z
|
|
310
180
|
.string()
|
|
311
181
|
.optional()
|
|
@@ -315,17 +185,13 @@ export const AgentSummarySchema = z.object({
|
|
|
315
185
|
effort: z.string().optional().describe("How hard that turn was told to think."),
|
|
316
186
|
thinking: z.boolean().optional().describe("Whether that turn showed its reasoning."),
|
|
317
187
|
fast: z.boolean().optional().describe("Whether that turn asked for higher speed. What was asked for, not what was served."),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
* input a draft cannot contain (prompt-complexity.ts `afterHardTurn`). The JUDGEMENT, never what ran, for
|
|
321
|
-
* the reason the store states: what ran is a fact about configuration, the next turn is asking about the
|
|
322
|
-
* difficulty of the work. Absent ⇒ nothing judged yet. */
|
|
188
|
+
// The judge's verdict on the last turn, not what actually ran: seeds tomorrow's composer preview, absent means
|
|
189
|
+
// nothing judged yet.
|
|
323
190
|
tier: z
|
|
324
191
|
.enum(["fast", "standard"])
|
|
325
192
|
.optional()
|
|
326
193
|
.describe("How hard its last turn looked to the complexity judge. What the next turn's preview needs, not what actually ran."),
|
|
327
|
-
//
|
|
328
|
-
// shape as `fast` above: what was asked for, restored into the composer on open, sent back on every turn.
|
|
194
|
+
// Standing per-conversation choice, restored into the composer on open and sent back every turn, like `fast` above.
|
|
329
195
|
tierHold: z
|
|
330
196
|
.boolean()
|
|
331
197
|
.optional()
|
|
@@ -333,45 +199,25 @@ export const AgentSummarySchema = z.object({
|
|
|
333
199
|
account: z.string().optional().describe("Which connected account paid for it."),
|
|
334
200
|
// The worktree branch (agent/<id>); absent for a non-isolated (main-tree) conversation.
|
|
335
201
|
branch: z.string().optional().describe("The branch its private copy works on. Absent for a conversation that works directly in the shared tree."),
|
|
336
|
-
//
|
|
337
|
-
//
|
|
338
|
-
// the global toggle meaningful: an agent that never expressed an opinion follows the sandbox wherever it
|
|
339
|
-
// is pointed next. Written by `agents.autoLand`; the UI shows the EFFECTIVE value (this ?? the setting).
|
|
202
|
+
// Per-agent override of the sandbox-wide `autoLand`; absent means inherit, the common case that keeps the toggle
|
|
203
|
+
// meaningful.
|
|
340
204
|
autoLand: z
|
|
341
205
|
.boolean()
|
|
342
206
|
.optional()
|
|
343
207
|
.describe(
|
|
344
208
|
"This conversation's own answer to whether its work merges automatically. Absent means it follows the sandbox-wide setting, which is the common case.",
|
|
345
209
|
),
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
*
|
|
349
|
-
* The press that writes this is offered INSIDE one conversation, at the moment that conversation's turn
|
|
350
|
-
* died, and what a person means by it is "finish THIS piece of work". It used to write the sandbox-wide
|
|
351
|
-
* setting, so one impatient click at 2 a.m. quietly armed every agent on the board, a scope
|
|
352
|
-
* nothing on screen had asked about. So the chat's offer writes this, the settings toggle writes the
|
|
353
|
-
* default, and the two stay honestly different things.
|
|
354
|
-
*
|
|
355
|
-
* ABSENT ⇒ inherit the sandbox setting, which is what keeps that default meaningful: a conversation that
|
|
356
|
-
* never expressed an opinion follows the sandbox wherever it is pointed next. Written by
|
|
357
|
-
* `agents.resumeAfterOutage`; every surface shows the EFFECTIVE value (this ?? the setting). */
|
|
210
|
+
// Per-conversation override, written by the in-chat retry press (not the settings toggle) so one late-night click
|
|
211
|
+
// can't arm every agent; absent inherits the sandbox setting.
|
|
358
212
|
resumeAfterOutage: z.boolean().optional(),
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
*
|
|
362
|
-
* IT IS THE ONE RESUME WITH A KNOWN HOUR, which is what makes it worth automating and what makes it
|
|
363
|
-
* different from its neighbour. An outage resume guesses (a backoff, a bounded number of attempts, no idea
|
|
364
|
-
* when the provider returns); this one waits for an instant the provider published and fires once, at it.
|
|
365
|
-
*
|
|
366
|
-
* OFF unless somebody says otherwise, and that default is load-bearing rather than cautious. Every other
|
|
367
|
-
* blocker here clears at no cost to the user, while this one clears into a window they may have been
|
|
368
|
-
* saving: spending it the second it reopens is not a decision to make on anybody's behalf. What arming it
|
|
369
|
-
* buys is the case nothing else can reach, a turn that hit the wall at 2am on a board nobody is watching,
|
|
370
|
-
* where the alternative is a card that waited eight hours for a press that was always going to come. */
|
|
213
|
+
// Off by default, unlike its neighbors: firing the moment a spent allowance reopens spends a window the user may be
|
|
214
|
+
// saving.
|
|
371
215
|
resumeAfterLimit: z.boolean().optional(),
|
|
372
|
-
//
|
|
373
|
-
//
|
|
374
|
-
|
|
216
|
+
// Per-conversation override for moving a held turn to another account with room the moment it's refused; absent
|
|
217
|
+
// inherits.
|
|
218
|
+
moveAfterLimit: z.boolean().optional(),
|
|
219
|
+
// A collaborator's ask to land (collaborators can't merge themselves); cleared by whichever merge or discard
|
|
220
|
+
// answers it.
|
|
375
221
|
landRequested: z
|
|
376
222
|
.object({
|
|
377
223
|
email: z.string().describe("Who asked."),
|
|
@@ -382,23 +228,22 @@ export const AgentSummarySchema = z.object({
|
|
|
382
228
|
.describe(
|
|
383
229
|
"A collaborator has asked a maintainer to merge this work. Cleared by whichever merge or discard answers it. Absent means nobody is waiting.",
|
|
384
230
|
),
|
|
385
|
-
//
|
|
386
|
-
// AgentOriginSchema), the card's provenance line. Absent ⇒ the user started it.
|
|
231
|
+
// The card's provenance line when an outside message opened the conversation; absent means a person started it.
|
|
387
232
|
origin: AgentOriginSchema.optional().describe(
|
|
388
233
|
"Where the conversation came from when nobody typed it: a chat mention, a visitor's message, a webhook. Absent means a person started it.",
|
|
389
234
|
),
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
235
|
+
// The other provenance line: who asked for the first turn directly (vs `origin`, which names the automation);
|
|
236
|
+
// latched, never rewritten by a later turn.
|
|
237
|
+
startedBy: z
|
|
238
|
+
.string()
|
|
239
|
+
.optional()
|
|
240
|
+
.describe("Who asked for the first turn, as the sandbox verified it: a member's email, or token:<label> for a program's control token. Absent when nothing was verified (a wake, a loopback caller)."),
|
|
241
|
+
// Recorded once on the fork's first turn and never cleared; rides the summary so the link survives closing and
|
|
242
|
+
// reopening either tab.
|
|
397
243
|
forkedFrom: ForkedFromSchema.optional().describe(
|
|
398
244
|
"The conversation this one was cut from. Recorded once and never cleared: it is the relationship, not a pending state.",
|
|
399
245
|
),
|
|
400
|
-
//
|
|
401
|
-
// daemon-internal (agents.diff already reports against them).
|
|
246
|
+
// Root repo's short base sha; per-repo bases stay daemon-internal.
|
|
402
247
|
base: z.string().optional().describe("The commit its private copy started from, shortened."),
|
|
403
248
|
costUsd: z.number().optional().describe("What it has cost so far, in dollars. A subagent's spend is its own and is not folded in here."),
|
|
404
249
|
inputTokens: z.number().optional().describe("Tokens sent."),
|
|
@@ -406,46 +251,20 @@ export const AgentSummarySchema = z.object({
|
|
|
406
251
|
contextTokens: z.number().optional().describe("How much of the window the conversation currently fills."),
|
|
407
252
|
contextWindow: z.number().optional().describe("How large that window is."),
|
|
408
253
|
activity: AgentActivitySchema.optional().describe("What it is doing at this moment."),
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
*
|
|
412
|
-
* This used to be one boolean ("a model is writing"), and a boolean is exactly one fact short of every
|
|
413
|
-
* question the wait raises: WHICH model, for how long, what refused and in what words, what finally
|
|
414
|
-
* answered. All of that was known in the daemon and thrown away at the door, a first-pinned model that
|
|
415
|
-
* burned 58 seconds refusing on every landing had to be caught by watching CLI processes by hand, because
|
|
416
|
-
* nothing on any screen could have shown it.
|
|
417
|
-
*
|
|
418
|
-
* Runtime only: nothing about it is persisted, so a daemon restart forgets it. That is correct rather than
|
|
419
|
-
* lossy, a restart also killed the draft it would have been describing. */
|
|
254
|
+
// The whole drafting story (which models, how long, what refused), replacing a boolean that hid all of it;
|
|
255
|
+
// runtime-only, forgotten on restart like the draft itself.
|
|
420
256
|
landedMessageDraft: LandedMessageDraftSchema.optional().describe(
|
|
421
257
|
"The whole story of this merge's commit message being written: which models were asked, how long each took, what refused and in what words. Forgotten on restart, which is right, because a restart also killed the drafting it describes.",
|
|
422
258
|
),
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
*
|
|
426
|
-
* IT RIDES THE ROSTER because the roster is the channel that is already live for it. The review carries the
|
|
427
|
-
* same fact (OriginAgent.subject) and has to, for an archived agent whose lines are still in the tree, but
|
|
428
|
-
* the review is a workspace-wide rescan, coalesced daemon-side and refetched only when something asks, and
|
|
429
|
-
* this sentence arrives ALONE, seconds after the work it describes, with nothing else moving. Every link in
|
|
430
|
-
* that chain has to hold for a message that exists to become a message the user can see, and when one of
|
|
431
|
-
* them doesn't, the box stays empty with nothing to say why, while the flag above, which travels on THIS
|
|
432
|
-
* frame, has already told them a sentence was coming.
|
|
433
|
-
*
|
|
434
|
-
* So the fact goes where the promise went. Same push, same instant: the frame that ends `landedMessageDraft`
|
|
435
|
-
* is the frame that carries the answer, which is also what makes "your commit message is ready" honest.
|
|
436
|
-
*
|
|
437
|
-
* Absent for every agent that has not landed, and for a landing nothing could be written about. Replaced
|
|
438
|
-
* wholesale by the next land, the claim grows and so does the sentence about it. */
|
|
259
|
+
// The finished sentence, on the same push that ends `landedMessageDraft` above so the promise and the answer arrive
|
|
260
|
+
// together; absent until then, replaced wholesale by the next land.
|
|
439
261
|
landedMessage: LandedMessageSchema.optional().describe(
|
|
440
262
|
"What this conversation's merged work is called, once the drafting above has finished. It arrives on the same push that ends the draft, so the promise and the answer travel together.",
|
|
441
263
|
),
|
|
442
|
-
// Present while a turn runs: its start, ms since epoch.
|
|
443
264
|
startedAt: z.number().optional().describe("When the running turn started, in milliseconds. Absent when none is running."),
|
|
444
265
|
updatedAt: z.number().describe("When it last did something, in milliseconds. Reading it does not count."),
|
|
445
|
-
//
|
|
446
|
-
//
|
|
447
|
-
// purpose: read state is a fact about the WORK, not about one browser profile, so clearing site data or
|
|
448
|
-
// picking up the phone must not resurrect every badge.
|
|
266
|
+
// Daemon-side, not browser-side: read state is a fact about the work, so clearing site data or switching devices
|
|
267
|
+
// can't resurrect a badge.
|
|
449
268
|
seenAt: z
|
|
450
269
|
.number()
|
|
451
270
|
.optional()
|
|
@@ -453,27 +272,16 @@ export const AgentSummarySchema = z.object({
|
|
|
453
272
|
"When somebody last opened it, in milliseconds. Newer activity than this is what makes it unread. Kept by the sandbox rather than by a browser, so clearing site data or picking up a phone does not resurrect every badge.",
|
|
454
273
|
),
|
|
455
274
|
attention: AgentAttentionSchema.describe("Which kinds of waiting-for-you it is doing."),
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
* shapes: attention is a turn parked and waiting, this is a turn gone with the job half done. */
|
|
275
|
+
// Beside `attention` since a reader asks both at a glance, but opposite in shape: a turn gone, not one still parked
|
|
276
|
+
// and waiting.
|
|
459
277
|
unfinished: UnfinishedWorkSchema.optional().describe(
|
|
460
278
|
"What its last turn left open: steps it never completed, a check still failing. Absent for a turn that finished what it started.",
|
|
461
279
|
),
|
|
462
280
|
// Completed turns and lifetime tool calls, the card's msgs/tools counters.
|
|
463
281
|
turns: z.number().optional().describe("Turns it has finished."),
|
|
464
282
|
toolUses: z.number().optional().describe("Tools it has used, over its whole life."),
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
*
|
|
468
|
-
* THE TWO HALVES COME FROM DIFFERENT PLACES, and have to: `running` is read off the live subagent registry,
|
|
469
|
-
* which sweeps a child five minutes after it reports and remembers nothing across a restart, while `total`
|
|
470
|
-
* is counted onto the agent's own entry as each child is born. Deriving both from the live registry is what
|
|
471
|
-
* used to take the count off a card while the agent that earned it was still on the board.
|
|
472
|
-
*
|
|
473
|
-
* It earns a place on a card because a fleet card is the answer to "what is this agent up to", and an agent
|
|
474
|
-
* running five children looked exactly like an agent running none: the work was real, the spend was real, and
|
|
475
|
-
* the board said nothing. The tokens are NOT folded into the parent's cost, a child's spend is its own, and
|
|
476
|
-
* the Subagents area is where it is attributed. */
|
|
283
|
+
// `running` reads the live subagent registry (swept after five minutes), `total` counts on the agent's own entry; a
|
|
284
|
+
// child's spend is its own, never folded into the parent's cost.
|
|
477
285
|
subagents: z
|
|
478
286
|
.object({
|
|
479
287
|
running: z.number().describe("Subagents working right now."),
|
|
@@ -483,8 +291,8 @@ export const AgentSummarySchema = z.object({
|
|
|
483
291
|
.describe(
|
|
484
292
|
"Subagents and child agents this one delegated to. Absent means it never has, which is most conversations. Their spend is their own and is not folded into this conversation's cost.",
|
|
485
293
|
),
|
|
486
|
-
//
|
|
487
|
-
//
|
|
294
|
+
// Cumulative output across every repo (base → branch tip), refreshed on each land; independent of what has actually
|
|
295
|
+
// landed.
|
|
488
296
|
diff: z
|
|
489
297
|
.object({
|
|
490
298
|
files: z.number().describe("Files touched."),
|
|
@@ -493,21 +301,8 @@ export const AgentSummarySchema = z.object({
|
|
|
493
301
|
})
|
|
494
302
|
.optional()
|
|
495
303
|
.describe("Everything it has written, measured from where it started. Independent of how much has been merged."),
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
* A land applies its delta to the main tree as uncommitted changes, so the user can discard it there like
|
|
499
|
-
* any other change, and every other reading on this card is measured between commits and cannot see that
|
|
500
|
-
* happen (landed-presence.ts). Left unsaid, the card goes on wearing a landed chip and the session menu
|
|
501
|
-
* goes on saying "Already in your workspace" over a tree that no longer holds it, and the next land
|
|
502
|
-
* carries only the NEW delta, dropping turn 2 onto a tree missing turn 1.
|
|
503
|
-
*
|
|
504
|
-
* `present` counts the landed paths still there: dirty, or committed into history, a commit is the
|
|
505
|
-
* strongest form of still-there, which is why this cannot be folded into the Changes panel's own
|
|
506
|
-
* attribution, where a commit is what ENDS the agent's claim (origins.ts).
|
|
507
|
-
*
|
|
508
|
-
* Absent is the steady state and the quiet one: an agent that never landed and an agent whose work is
|
|
509
|
-
* exactly where it left it both say nothing. Its PRESENCE is the signal, which is what keeps the board
|
|
510
|
-
* from spending a line per card on the ordinary case. */
|
|
304
|
+
// How much of what this agent landed is still in the working tree, since a discard after landing is invisible to
|
|
305
|
+
// commit-based readings; absent is the steady state and carries no line.
|
|
511
306
|
landedPresence: z
|
|
512
307
|
.object({
|
|
513
308
|
landed: z.number().describe("Paths this conversation merged in."),
|
|
@@ -517,15 +312,8 @@ export const AgentSummarySchema = z.object({
|
|
|
517
312
|
.describe(
|
|
518
313
|
"Present only when some of what it merged has since been thrown away. Absent is the steady state: its presence is the signal, so an ordinary card spends no line on it.",
|
|
519
314
|
),
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
* PROJECTED onto the card rather than fetched beside it, and that is the whole reason a loop needed no
|
|
523
|
-
* surface of its own: a looping agent is an agent, so the board's status, spend, unread badge and Stop
|
|
524
|
-
* button already describe it, and one extra line is the difference between a card that says `running` for
|
|
525
|
-
* forty minutes and one that says what it is running towards. A second query joined client-side would have
|
|
526
|
-
* paid for the same line with a poll that can disagree with the roster.
|
|
527
|
-
*
|
|
528
|
-
* Absent ⇒ an ordinary conversation, which is nearly all of them. */
|
|
315
|
+
// The loop driving this conversation, projected here rather than fetched separately, since a looping agent's status
|
|
316
|
+
// and spend are already the card's own.
|
|
529
317
|
loop: z
|
|
530
318
|
.object({
|
|
531
319
|
state: LoopStateSchema.describe("How the loop is going."),
|
|
@@ -535,23 +323,8 @@ export const AgentSummarySchema = z.object({
|
|
|
535
323
|
})
|
|
536
324
|
.optional()
|
|
537
325
|
.describe("The loop driving this conversation, if one is. Absent for an ordinary conversation, which is nearly all of them."),
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
* Projected for the same reason the loop above is, and it answers a question only the board can be asked. A
|
|
541
|
-
* run of four `fresh` steps IS four conversations, so it arrives on the board as four unrelated cards that
|
|
542
|
-
* started a few minutes apart, the work reads as four people who happen to be busy rather than as one job
|
|
543
|
-
* with a shape. Naming the run on each card is what makes them one block, and `runId` is what lets the board
|
|
544
|
-
* order them together and link every one of them at the run's own graph.
|
|
545
|
-
*
|
|
546
|
-
* POSITION IS A FACT ABOUT THE STEP, not a running total: `index`/`total` are its place in the workflow's own
|
|
547
|
-
* step order, so a card is published once when its step starts and never has to be rewritten because a
|
|
548
|
-
* sibling advanced. How the run as a whole is going is the run page's job, and how THIS step is going is
|
|
549
|
-
* already the card's status and the loop line above.
|
|
550
|
-
*
|
|
551
|
-
* `step` moves within one conversation when steps are chained with `continue`, they share it, which is the
|
|
552
|
-
* point of chaining, so this says which one is on it NOW.
|
|
553
|
-
*
|
|
554
|
-
* Absent ⇒ an ordinary conversation. */
|
|
326
|
+
// Which workflow run and step this conversation is; projected so a multi-step run reads as one job, not unrelated
|
|
327
|
+
// cards started minutes apart.
|
|
555
328
|
workflow: z
|
|
556
329
|
.object({
|
|
557
330
|
runId: z.string().describe("The run this belongs to, which is how a board groups its steps together."),
|
|
@@ -564,29 +337,9 @@ export const AgentSummarySchema = z.object({
|
|
|
564
337
|
.describe(
|
|
565
338
|
"The workflow run this conversation is a step of. Without it, a four-step run reads as four unrelated conversations that happen to have started together.",
|
|
566
339
|
),
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
* IT IS THE ONE PROMISE THE BOARD USED TO KEEP SILENTLY. An agent that arms a watch ends its turn: nothing
|
|
571
|
-
* is running, nothing is owed to the user, so every surface filed it under finished and drew the resting
|
|
572
|
-
* `idle`. Then, some hours later, the daemon's check exits 0 and that same conversation starts working
|
|
573
|
-
* again, on its own, in front of somebody who had been told it was done. The wake is the feature; the card
|
|
574
|
-
* saying nothing about it beforehand is what made it read as the sandbox acting unasked.
|
|
575
|
-
*
|
|
576
|
-
* It also has a bill attached, which no other projection here does. An armed watch keeps a hosted machine
|
|
577
|
-
* awake (system/idle-stop.ts counts them, deliberately: stopping the box is how a watch silently never
|
|
578
|
-
* fires), so an invisible watch is invisible compute. A user looking at a board of finished agents,
|
|
579
|
-
* wondering why the machine will not go quiet, could not have found the answer anywhere.
|
|
580
|
-
*
|
|
581
|
-
* WHAT IS ON THE WIRE IS WHAT A CARD CAN ACT ON, and nothing else. The note (the agent's own line on what
|
|
582
|
-
* it is waiting for), the cadence, and the deadline, which is what turns "waiting" into a countdown with an
|
|
583
|
-
* end. Deliberately NOT the check command: it is shell text the reader cannot run, judge or fix from a
|
|
584
|
-
* board, and it is the one field that could carry a secret reference into a surface that is read over
|
|
585
|
-
* shoulders. Deliberately NOT the check COUNT either, which would move every interval and buy a whole
|
|
586
|
-
* roster broadcast to advance a number nobody is reading.
|
|
587
|
-
*
|
|
588
|
-
* Absent ⇒ nothing armed, which is nearly every conversation. Empty is never sent: the daemon clears the
|
|
589
|
-
* projection instead, so the field's PRESENCE is the signal. */
|
|
340
|
+
// Outside conditions a conversation is parked on; a finished-looking card can restart itself when one fires, and an
|
|
341
|
+
// armed watch keeps a hosted machine (and its bill) awake. The check command itself never rides the wire, since it
|
|
342
|
+
// may hold a secret.
|
|
590
343
|
watches: z
|
|
591
344
|
.array(
|
|
592
345
|
z.object({
|
|
@@ -600,10 +353,8 @@ export const AgentSummarySchema = z.object({
|
|
|
600
353
|
.describe(
|
|
601
354
|
"Outside conditions this conversation is parked on, each of which will wake it. Absent means none, which is nearly every conversation: an armed watch is why a finished-looking agent starts working by itself, and why a hosted machine will not go idle.",
|
|
602
355
|
),
|
|
603
|
-
//
|
|
604
|
-
//
|
|
605
|
-
// on the board. Archived agents are excluded from the roster the fleet renders; `agents.archived` lists
|
|
606
|
-
// them, `agents.unarchive` brings one back, and the next turn re-attaches its worktree from the branch.
|
|
356
|
+
// Epoch ms it was archived; nothing is lost (branch, transcript, counters stay), and unarchiving re-attaches a
|
|
357
|
+
// fresh worktree from the branch.
|
|
607
358
|
archivedAt: z
|
|
608
359
|
.number()
|
|
609
360
|
.optional()
|
|
@@ -612,20 +363,14 @@ export const AgentSummarySchema = z.object({
|
|
|
612
363
|
),
|
|
613
364
|
});
|
|
614
365
|
export type AgentSummary = z.infer<typeof AgentSummarySchema>;
|
|
615
|
-
// One armed
|
|
616
|
-
// than declared beside it, so the shape the daemon publishes and the shape the wire promises cannot drift.
|
|
366
|
+
// One armed watch as a card carries it; derived from AgentSummarySchema.watches so the two shapes can't drift apart.
|
|
617
367
|
export type AgentWatch = NonNullable<AgentSummary["watches"]>[number];
|
|
618
|
-
// AgentsListSchema
|
|
619
|
-
//
|
|
368
|
+
// AgentsListSchema is declared later, after AutomationApprovalSchema, since the fleet list carries held wakes and zod
|
|
369
|
+
// needs that type declared first.
|
|
620
370
|
export const AgentIdSchema = z.object({ id: z.string().min(1).describe("Which conversation.") });
|
|
621
371
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
* beginning. Both are optional: a tab opening a chat sends neither and gets the tail.
|
|
625
|
-
*
|
|
626
|
-
* A cursor is never an error. It can be stale by the time it arrives — a rewind truncated the record under it,
|
|
627
|
-
* a fork re-cut it, the tab slept through both — and the daemon clamps rather than refusing, because failing
|
|
628
|
-
* to open a conversation is a worse answer than opening it at the end. */
|
|
372
|
+
// Pages a transcript: a read returns its most recent turns and where they start (`from`); handing that back as `before`
|
|
373
|
+
// asks for the page above. A stale cursor (a rewind, a fork) is clamped, never refused.
|
|
629
374
|
export const AgentTranscriptQuerySchema = AgentIdSchema.extend({
|
|
630
375
|
before: z.coerce
|
|
631
376
|
.number()
|
|
@@ -634,8 +379,7 @@ export const AgentTranscriptQuerySchema = AgentIdSchema.extend({
|
|
|
634
379
|
.describe("Return the messages before this position in the record: the `from` of the page below. Absent asks for the most recent turns."),
|
|
635
380
|
turns: z.coerce.number().int().min(1).max(200).optional().describe("How many of the user's turns to return, newest first. Absent takes the daemon's default."),
|
|
636
381
|
});
|
|
637
|
-
//
|
|
638
|
-
// right now (the lane header's "Clear"); unarchive always names its ids (a restore, or a bulk archive's undo).
|
|
382
|
+
// Absent `ids` archives every archivable finished agent (the lane's "Clear"); unarchive always names its own ids.
|
|
639
383
|
export const AgentArchiveSchema = z.object({
|
|
640
384
|
ids: z
|
|
641
385
|
.array(z.string().min(1))
|
|
@@ -644,13 +388,9 @@ export const AgentArchiveSchema = z.object({
|
|
|
644
388
|
.describe("Which conversations to put away. Leave it out for every finished one that can be archived right now."),
|
|
645
389
|
});
|
|
646
390
|
export const AgentIdsSchema = z.object({ ids: z.array(z.string().min(1)).min(1).max(500).describe("Which conversations.") });
|
|
647
|
-
// What actually
|
|
648
|
-
//
|
|
649
|
-
//
|
|
650
|
-
// Whole summaries rather than ids because the receiving side has to SHOW them (the archive list, and the agent
|
|
651
|
-
// detail page addressed by id); the ids "Undo" needs come off them for free.
|
|
652
|
-
// The agents an archive/unarchive actually moved, plus the registry revision that applied the move, the
|
|
653
|
-
// browser holds its optimistic add/remove of exactly these ids until it sees a roster at or past `rev`.
|
|
391
|
+
// What actually moved, not the roster afterward: two archives finishing at once would otherwise let a slower snapshot
|
|
392
|
+
// resurrect what a faster one just filed away. Whole summaries, since the receiving surfaces (archive list, detail
|
|
393
|
+
// page) have to show them, not just their ids.
|
|
654
394
|
export const AgentsMovedSchema = z.object({
|
|
655
395
|
moved: z
|
|
656
396
|
.array(AgentSummarySchema)
|
|
@@ -664,11 +404,8 @@ export const AgentsMovedSchema = z.object({
|
|
|
664
404
|
),
|
|
665
405
|
});
|
|
666
406
|
export type AgentsMoved = z.infer<typeof AgentsMovedSchema>;
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
* from the workspace, a checkout is locked. Those agents stay on the board, so the answer carries them and the
|
|
670
|
-
* sentence each failed with, otherwise the only true thing the caller could say about an archive that moved
|
|
671
|
-
* nothing was "there was nothing to archive": to a user looking straight at the card it refused. */
|
|
407
|
+
// Also reports what a release could not do (a deleted repo, a locked checkout); those agents stay on the board with the
|
|
408
|
+
// reason they failed, rather than the caller reading silence as "nothing to archive".
|
|
672
409
|
export const AgentsArchivedSchema = AgentsMovedSchema.extend({
|
|
673
410
|
failed: z
|
|
674
411
|
.array(
|
|
@@ -680,10 +417,8 @@ export const AgentsArchivedSchema = AgentsMovedSchema.extend({
|
|
|
680
417
|
.describe("The conversations this press could not put away, each with the reason, so the board can say it instead of reporting silence."),
|
|
681
418
|
});
|
|
682
419
|
export type AgentsArchived = z.infer<typeof AgentsArchivedSchema>;
|
|
683
|
-
//
|
|
684
|
-
//
|
|
685
|
-
// and count them. No revision either: archived agents are already off the broadcast roster (see `list`), so a
|
|
686
|
-
// purge changes nothing the board's pending-move machinery has to hold a card against.
|
|
420
|
+
// Ids, not summaries: a purged agent no longer exists anywhere, so there's nothing to show. No revision either, since
|
|
421
|
+
// archived agents are already off the broadcast roster.
|
|
687
422
|
export const AgentsRemovedSchema = z.object({
|
|
688
423
|
removed: z
|
|
689
424
|
.array(z.string())
|
|
@@ -692,26 +427,9 @@ export const AgentsRemovedSchema = z.object({
|
|
|
692
427
|
),
|
|
693
428
|
});
|
|
694
429
|
export type AgentsRemoved = z.infer<typeof AgentsRemovedSchema>;
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
* an agent ANSWERED is half of what a chat is remembered by, the name it found, the file it named, the number
|
|
699
|
-
* it reported, and a filter that could not reach it sent people back to opening chats one at a time.
|
|
700
|
-
*
|
|
701
|
-
* What stays out is everything that is not speech: extended thinking, tool calls and their output, and the
|
|
702
|
-
* daemon's own protocol (preambles, attachment notes). That is the line the old user-only rule was really
|
|
703
|
-
* drawing, tool output alone names nearly every identifier in the workspace, so matching it returns most of
|
|
704
|
-
* the board and the filter stops filtering. Prose is a fraction of a transcript and reads like a sentence
|
|
705
|
-
* someone wrote, which is why it can be searched when a diff dump cannot.
|
|
706
|
-
*
|
|
707
|
-
* The card TITLE is the first prompt (sanitized), so a title match and a prompt match are one rule, not two.
|
|
708
|
-
*
|
|
709
|
-
* Two chars minimum: below that every agent matches and the scan is pure cost.
|
|
710
|
-
*
|
|
711
|
-
* `caseSensitive` is the field's Aa switch, the same name and the same default as the workspace search's, so
|
|
712
|
-
* one word means one thing across the daemon's search routes. Off is case-INSENSITIVE rather than smart case:
|
|
713
|
-
* a filter that quietly changed rule when a capital was typed would make the switch beside it a lie.
|
|
714
|
-
*/
|
|
430
|
+
// Searches only speech, both sides of the conversation, never thinking, tool output or protocol text, which would
|
|
431
|
+
// otherwise match nearly the whole board. Two-char minimum; `caseSensitive` off means case-insensitive, matching
|
|
432
|
+
// workspace search's own switch.
|
|
715
433
|
export const AgentSearchQuerySchema = z.object({
|
|
716
434
|
query: z
|
|
717
435
|
.string()
|
|
@@ -722,14 +440,8 @@ export const AgentSearchQuerySchema = z.object({
|
|
|
722
440
|
),
|
|
723
441
|
caseSensitive: z.stringbool().optional().describe("Whether capitals matter."),
|
|
724
442
|
});
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
*
|
|
728
|
-
* `speaker` rides WITH the text rather than beside it because the two are never separately true, every line is
|
|
729
|
-
* someone's, and because the words alone stopped being self-identifying the moment agent prose became
|
|
730
|
-
* matchable: "landAgent lives in laneDrop.ts" under a card reads as something the user typed until the row
|
|
731
|
-
* says otherwise.
|
|
732
|
-
*/
|
|
443
|
+
// Why a row survived the filter: the matched line, windowed, and who said it. `speaker` rides with the text since agent
|
|
444
|
+
// prose alone can read as something the user typed.
|
|
733
445
|
export const SpeakerSchema = z.enum(["user", "agent"]);
|
|
734
446
|
export type Speaker = z.infer<typeof SpeakerSchema>;
|
|
735
447
|
export const MatchSnippetSchema = z.object({
|
|
@@ -739,8 +451,7 @@ export const MatchSnippetSchema = z.object({
|
|
|
739
451
|
),
|
|
740
452
|
});
|
|
741
453
|
export type MatchSnippet = z.infer<typeof MatchSnippetSchema>;
|
|
742
|
-
// One matching agent
|
|
743
|
-
// already shows, repeating it underneath is noise where evidence was wanted.
|
|
454
|
+
// One matching agent and its evidence; `snippet` is absent for a title match, which the card already shows.
|
|
744
455
|
export const AgentMatchSchema = z.object({
|
|
745
456
|
id: z.string().describe("Which conversation matched."),
|
|
746
457
|
snippet: MatchSnippetSchema.optional().describe(
|
|
@@ -748,8 +459,7 @@ export const AgentMatchSchema = z.object({
|
|
|
748
459
|
),
|
|
749
460
|
});
|
|
750
461
|
export type AgentMatch = z.infer<typeof AgentMatchSchema>;
|
|
751
|
-
//
|
|
752
|
-
// less than the whole fleet rather than implying it saw all of it.
|
|
462
|
+
// How many agents were actually read, so the board can say a search saw less than the whole fleet.
|
|
753
463
|
export const AgentSearchResultSchema = z.object({
|
|
754
464
|
matches: z.array(AgentMatchSchema).describe("What matched, from the live fleet and the archive together."),
|
|
755
465
|
scanned: z
|
|
@@ -764,15 +474,13 @@ export const AgentSearchResultSchema = z.object({
|
|
|
764
474
|
),
|
|
765
475
|
});
|
|
766
476
|
export type AgentSearchResult = z.infer<typeof AgentSearchResultSchema>;
|
|
767
|
-
//
|
|
477
|
+
// The user-chosen display title, bounded like sanitizeTitle's own cap.
|
|
768
478
|
export const AgentRenameSchema = z.object({
|
|
769
479
|
id: z.string().min(1).describe("Which conversation."),
|
|
770
480
|
title: z.string().trim().min(1).max(80).describe("What to call it from now on."),
|
|
771
481
|
});
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
* (runtime-history's MESSAGE_CHAR_CAP), a placed line longer than that would reach the agent truncated, which
|
|
775
|
-
* silently breaks "it thinks these are its own words". Better to refuse at the door with a reason. */
|
|
482
|
+
// Bounded just above the handoff's per-message render cap, so a line too long to carry whole doesn't reach the agent
|
|
483
|
+
// truncated.
|
|
776
484
|
export const AgentPlaceSchema = z.object({
|
|
777
485
|
id: z.string().min(1).describe("Which conversation."),
|
|
778
486
|
text: z
|
|
@@ -784,9 +492,8 @@ export const AgentPlaceSchema = z.object({
|
|
|
784
492
|
"The words to put in the agent's mouth. Bounded just above what the next turn can carry whole, because a line too long to be handed over intact would reach the agent truncated and quietly break the very thing this is for.",
|
|
785
493
|
),
|
|
786
494
|
});
|
|
787
|
-
//
|
|
788
|
-
//
|
|
789
|
-
// so agents don't accumulate frozen overrides that quietly stop following the global toggle.
|
|
495
|
+
// `null` clears the override back to inheriting the sandbox setting, so an agent doesn't hold a frozen copy that stops
|
|
496
|
+
// following it.
|
|
790
497
|
export const AgentAutoLandSchema = z.object({
|
|
791
498
|
id: z.string().min(1).describe("Which conversation."),
|
|
792
499
|
autoLand: z
|
|
@@ -796,10 +503,7 @@ export const AgentAutoLandSchema = z.object({
|
|
|
796
503
|
"Whether its work merges automatically when a turn finishes. Null clears the override and goes back to following the sandbox-wide setting, so a conversation does not sit holding a frozen copy of a default it has quietly stopped following.",
|
|
797
504
|
),
|
|
798
505
|
});
|
|
799
|
-
//
|
|
800
|
-
// back to "inherit the sandbox setting", sent whenever the user toggles back to what the global already says,
|
|
801
|
-
// on the same reasoning as autoLand's null: an agent holding a frozen copy of a default has quietly stopped
|
|
802
|
-
// following it, and nothing on screen would say so.
|
|
506
|
+
// Same `null`-clears-the-override shape as autoLand, for this conversation's own outage-resume posture.
|
|
803
507
|
export const AgentResumeAfterOutageSchema = z.object({
|
|
804
508
|
id: z.string().min(1).describe("Which conversation."),
|
|
805
509
|
resumeAfterOutage: z
|
|
@@ -807,9 +511,7 @@ export const AgentResumeAfterOutageSchema = z.object({
|
|
|
807
511
|
.nullable()
|
|
808
512
|
.describe("Whether it retries by itself when the model provider was what failed. Null clears the override back to the sandbox-wide setting."),
|
|
809
513
|
});
|
|
810
|
-
//
|
|
811
|
-
// blocker that comes back on a clock. Written by the card's own offer at the moment a limit strands a turn,
|
|
812
|
-
// which is where somebody looking at a stranded card actually is; the settings toggle writes the default.
|
|
514
|
+
// Same three-state override, for the limit blocker; written by the card's own offer when a limit strands a turn.
|
|
813
515
|
export const AgentResumeAfterLimitSchema = z.object({
|
|
814
516
|
id: z.string().min(1).describe("Which conversation."),
|
|
815
517
|
resumeAfterLimit: z
|
|
@@ -819,18 +521,25 @@ export const AgentResumeAfterLimitSchema = z.object({
|
|
|
819
521
|
"Whether the turn a spent allowance refused is sent again by itself once the window reopens. Null clears the override back to the sandbox-wide setting.",
|
|
820
522
|
),
|
|
821
523
|
});
|
|
524
|
+
// Same three-state override, for moving a held turn to another account with room.
|
|
525
|
+
export const AgentMoveAfterLimitSchema = z.object({
|
|
526
|
+
id: z.string().min(1).describe("Which conversation."),
|
|
527
|
+
moveAfterLimit: z
|
|
528
|
+
.boolean()
|
|
529
|
+
.nullable()
|
|
530
|
+
.describe(
|
|
531
|
+
"Whether the turn a spent allowance refused is moved to another connected account of the same provider that has room, as soon as the refusal lands. Null clears the override back to the sandbox-wide setting.",
|
|
532
|
+
),
|
|
533
|
+
});
|
|
822
534
|
export const AgentFileDiffQuerySchema = z.object({
|
|
823
535
|
id: z.string().min(1).describe("Which conversation."),
|
|
824
536
|
repo: z.string().min(1).describe("Which repository."),
|
|
825
537
|
path: z.string().min(1).describe("Which file, relative to that repository."),
|
|
826
538
|
});
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
* yours is at risk; the agent's delta is simply written against an older file.
|
|
832
|
-
* `binary` , git cannot three-way merge the file at all, so no automatic resolution exists.
|
|
833
|
-
* The old report named only the first, which is the rarest of the three. */
|
|
539
|
+
// Why a path would not land:
|
|
540
|
+
// workspace: your own uncommitted edits are on that path
|
|
541
|
+
// diverged: the main tree's committed content moved under the agent since it branched; nothing of yours is at risk
|
|
542
|
+
// binary: git cannot three-way merge the file at all
|
|
834
543
|
export const LandConflictReasonSchema = z.enum(["workspace", "diverged", "binary"]);
|
|
835
544
|
export type LandConflictReason = z.infer<typeof LandConflictReasonSchema>;
|
|
836
545
|
export const LandConflictPathSchema = z.object({
|
|
@@ -839,11 +548,8 @@ export const LandConflictPathSchema = z.object({
|
|
|
839
548
|
"Why it would not merge, and the three have nothing in common but the symptom. Your own uncommitted edits on that path, where yours is the copy at risk. The shared tree having moved under the conversation since it started, where nothing of yours is at risk. Or a file git cannot merge at all, where no automatic answer exists.",
|
|
840
549
|
),
|
|
841
550
|
});
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
* four real conflicts into a wall of fourteen. `clean` counts what passed in that repo but stays on the branch
|
|
845
|
-
* with the rest of the composition. An empty `paths` with `clean: 0` is the repo-unavailable case: the main
|
|
846
|
-
* checkout is gone, and no path-level account exists. */
|
|
551
|
+
// `paths` are files that genuinely failed to apply, not the whole delta; empty `paths` with `clean: 0` means the repo
|
|
552
|
+
// itself was unreachable.
|
|
847
553
|
export const LandConflictSchema = z.object({
|
|
848
554
|
repo: z.string().describe("Which repository."),
|
|
849
555
|
paths: z
|
|
@@ -856,10 +562,7 @@ export const LandConflictSchema = z.object({
|
|
|
856
562
|
.describe(
|
|
857
563
|
"How many files in this repository passed but remain held with the refused composition. Zero alongside an empty list means the repository could not be reached at all.",
|
|
858
564
|
),
|
|
859
|
-
// The branch
|
|
860
|
-
// daemon can see it: an isolated turn's worktree is mounted over the agent's whole view, so the resolution
|
|
861
|
-
// errand could otherwise only tell it to go and read the name off `git worktree list`. Absent on a detached
|
|
862
|
-
// HEAD or a vanished checkout, where there is no name to give.
|
|
565
|
+
// The branch to rebase onto; carried since an isolated turn's worktree hides it from the agent's own view.
|
|
863
566
|
mainBranch: z
|
|
864
567
|
.string()
|
|
865
568
|
.optional()
|
|
@@ -868,10 +571,9 @@ export const LandConflictSchema = z.object({
|
|
|
868
571
|
),
|
|
869
572
|
});
|
|
870
573
|
export type LandConflict = z.infer<typeof LandConflictSchema>;
|
|
871
|
-
// Land's outcome for the whole
|
|
872
|
-
//
|
|
873
|
-
//
|
|
874
|
-
// the paths written into the workspace carrying conflict markers, which the user finishes by hand.
|
|
574
|
+
// Land's outcome for the whole composed change: the ordinary mode preflights every repo, all-or-nothing, so a refusal
|
|
575
|
+
// leaves the tree untouched. `resolving` only appears for a `merge` land, whose conflict markers the user finishes by
|
|
576
|
+
// hand.
|
|
875
577
|
export const LandResultSchema = z.object({
|
|
876
578
|
landed: z.boolean().describe("Whether the entire composed change was applied."),
|
|
877
579
|
conflicts: z.array(LandConflictSchema).optional().describe("What stopped the whole composed change, grouped per repository."),
|
|
@@ -884,8 +586,8 @@ export const LandResultSchema = z.object({
|
|
|
884
586
|
)
|
|
885
587
|
.optional()
|
|
886
588
|
.describe("Files left half-merged when you asked to carry the whole composition with its conflicts marked for resolution."),
|
|
887
|
-
// A `measure` outcome with
|
|
888
|
-
//
|
|
589
|
+
// A `measure` outcome with work still on the branch; `landed: false` alone can't say that, since alone it means
|
|
590
|
+
// refusal.
|
|
889
591
|
held: z
|
|
890
592
|
.boolean()
|
|
891
593
|
.optional()
|
|
@@ -894,41 +596,21 @@ export const LandResultSchema = z.object({
|
|
|
894
596
|
),
|
|
895
597
|
});
|
|
896
598
|
export type LandResult = z.infer<typeof LandResultSchema>;
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
* auto-land-off mode: everything a land does EXCEPT touching the main trees, the provenance commit onto
|
|
902
|
-
* agent/<id>, the cumulative diffstat, and the bookkeeping for work that reached main by another road, so a
|
|
903
|
-
* held agent's card stays current while its composed delta waits for a deliberate Land. */
|
|
599
|
+
// check: safe default, preflights every repo and applies only if all of it does, so a refusal leaves the tree
|
|
600
|
+
// byte-identical
|
|
601
|
+
// merge: opt-in escape hatch; three-way applies the whole composition, leaving conflict markers to resolve in place
|
|
602
|
+
// measure: does everything but touch the main trees, so a held agent's card stays current while its delta waits
|
|
904
603
|
export const LandModeSchema = z.enum(["check", "merge", "measure"]);
|
|
905
604
|
export type LandMode = z.infer<typeof LandModeSchema>;
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
* cumulative , the agent's WHOLE output, from where its branch left the main line. What the review lists
|
|
911
|
-
* (landed work stays inspectable), and what "Land again" applies.
|
|
912
|
-
*
|
|
913
|
-
* A CUMULATIVE LAND IS NOT A DOUBLE APPLICATION. It is the way back when a land's work was discarded from the
|
|
914
|
-
* workspace: the outstanding span is empty then, every sha says the work landed, because it did, so only a
|
|
915
|
-
* reading from the base can still see the part that is missing. Paths the tree already holds drop out of it
|
|
916
|
-
* per file, by the same reverse probe that keeps work which reached main by another road out of a conflict
|
|
917
|
-
* report (land.ts, classifyDelta), so what actually applies is exactly what is gone. */
|
|
605
|
+
// outstanding: only what hasn't landed yet, from the last landed tip (the default; what a second land applies)
|
|
606
|
+
// cumulative: the agent's whole output from where its branch left main; what the review lists and what "Land again"
|
|
607
|
+
// applies. Not a double application: it's the way back when landed work was discarded from the tree, since paths
|
|
608
|
+
// already there drop out per file.
|
|
918
609
|
export const AgentSpanSchema = z.enum(["cumulative", "outstanding"]);
|
|
919
610
|
export type AgentSpan = z.infer<typeof AgentSpanSchema>;
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
* A land snapshots the agent's checkout, so mid-turn it can catch work half-done: one leg of a rename, three
|
|
924
|
-
* files of a five-file change. The guard exists for that, and it stays the default. What makes the override
|
|
925
|
-
* defensible rather than reckless is that neither half of the damage is permanent, a land arrives as
|
|
926
|
-
* UNCOMMITTED changes the user reviews before committing, and the rest of the turn lands on top of it at
|
|
927
|
-
* completion like any other incremental land. So a premature land is a mess the user can see and one the next
|
|
928
|
-
* land repairs, which is a thing to warn about; it is not a thing to forbid.
|
|
929
|
-
*
|
|
930
|
-
* It does NOT cover a turn PARKED on a question or a permission card, nothing is being written there, so that
|
|
931
|
-
* land needs no override and takes none (agents.routes.ts). This flag means "yes, mid-write, I know". */
|
|
611
|
+
// Overrides the guard against landing mid-turn; safe since a land arrives as uncommitted changes the user reviews, and
|
|
612
|
+
// the rest of the turn lands on top of it later. Doesn't apply to a turn parked on a question, which needs no override
|
|
613
|
+
// at all.
|
|
932
614
|
export const AgentLandSchema = z.object({
|
|
933
615
|
id: z.string().min(1).describe("Which conversation's work to merge."),
|
|
934
616
|
mode: LandModeSchema.optional().describe(
|