@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/git.ts
CHANGED
|
@@ -4,44 +4,79 @@ import { LandConflictSchema, LandedMessageSchema } from "./agents.js";
|
|
|
4
4
|
import { CommandRunSchema } from "./ci.js";
|
|
5
5
|
import { RefNameSchema } from "./internal.js";
|
|
6
6
|
import { RepoParamSchema } from "./shared.js";
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.
|
|
7
|
+
|
|
8
|
+
// Which of the working tree's diffs a row is about; a path can be both staged and edited again, so a side is never
|
|
9
|
+
// defaulted.
|
|
10
|
+
// staged: index vs HEAD.
|
|
11
|
+
// unstaged: worktree vs index (untracked ⇒ no before side).
|
|
12
|
+
// conflicted: HEAD vs worktree, markers included (no stage 0 to diff against).
|
|
13
|
+
export const GitDiffSideSchema = z.enum(["staged", "unstaged", "conflicted"]);
|
|
14
|
+
export type GitDiffSide = z.infer<typeof GitDiffSideSchema>;
|
|
15
|
+
|
|
16
|
+
// What a bulk git action applies to, never simply a list of paths (unbounded, unlike a review's rows).
|
|
17
|
+
// paths: exactly these, from a list a browser already drew.
|
|
18
|
+
// scope: a description the daemon resolves against live status, so nothing here can be stale.
|
|
19
|
+
// neither: the whole repository.
|
|
20
|
+
export const GitScopeSchema = z.object({
|
|
21
|
+
side: GitDiffSideSchema.optional().describe(
|
|
22
|
+
"Narrow to one of the three lists a repository's changes split into. Leave it out for all of them, which is the whole repository.",
|
|
23
|
+
),
|
|
24
|
+
// Same attribution as `RepoChanges.origins`; a path list would miss files beyond what's on screen.
|
|
25
|
+
origin: z
|
|
26
|
+
.string()
|
|
27
|
+
.min(1)
|
|
27
28
|
.optional()
|
|
28
|
-
.describe("
|
|
29
|
+
.describe("Narrow to the files one conversation landed. Leave it out for everyone's, including your own edits."),
|
|
29
30
|
});
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
export type GitScope = z.infer<typeof GitScopeSchema>;
|
|
32
|
+
|
|
33
|
+
// Wire bound on an explicit path list, not a git/argv limit; past a few hundred rows, name a scope instead.
|
|
34
|
+
export const MAX_ACTION_PATHS = 1000;
|
|
35
|
+
|
|
36
|
+
const ActionPathsSchema = z
|
|
37
|
+
.array(z.string().min(1))
|
|
38
|
+
.max(MAX_ACTION_PATHS)
|
|
39
|
+
.describe("Exactly these repository-relative paths. For anything bigger than a hand-picked selection, describe a scope instead.");
|
|
40
|
+
|
|
41
|
+
// Two optional fields rather than a union: `{}` (the whole repository) is a meaningful value a discriminated union
|
|
42
|
+
// cannot spell.
|
|
43
|
+
export const GitTargetSchema = z.object({
|
|
44
|
+
paths: ActionPathsSchema.optional(),
|
|
45
|
+
scope: GitScopeSchema.optional().describe(
|
|
46
|
+
"What to act on, described rather than listed, so it covers every matching file in the repository and not just the ones a list could hold.",
|
|
47
|
+
),
|
|
37
48
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
export type GitTarget = z.infer<typeof GitTargetSchema>;
|
|
50
|
+
|
|
51
|
+
// Both together is refused: silently preferring one would make the other a lie.
|
|
52
|
+
const ONE_TARGET = { message: "name paths or a scope, not both" } as const;
|
|
53
|
+
const oneTarget = (target: GitTarget): boolean => target.paths === undefined || target.scope === undefined;
|
|
54
|
+
|
|
55
|
+
// What a commit records; the index already does path selection, so `stage` only says what to add first.
|
|
56
|
+
// absent: commit whatever is already staged.
|
|
57
|
+
// {}: stage everything, then commit.
|
|
58
|
+
// { scope }: stage what the scope names, then commit.
|
|
59
|
+
// { paths }: stage exactly those paths, then commit.
|
|
60
|
+
// Never `commit --only`: a partial commit over a half-staged file would record the worktree while the row showed the
|
|
61
|
+
// index.
|
|
62
|
+
export const CommitSchema = RepoParamSchema.extend({
|
|
63
|
+
message: z.string().min(1).describe("The commit message."),
|
|
64
|
+
stage: GitTargetSchema.refine(oneTarget, ONE_TARGET)
|
|
65
|
+
.optional()
|
|
66
|
+
.describe(
|
|
67
|
+
"What to stage before committing. Leave it out to record the index exactly as it stands; give it an empty object to stage everything first.",
|
|
68
|
+
),
|
|
41
69
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
70
|
+
export const DiscardSchema = RepoParamSchema.extend(GitTargetSchema.shape)
|
|
71
|
+
.describe("What to throw away. Neither paths nor a scope discards every uncommitted change in the repository.")
|
|
72
|
+
.refine(oneTarget, ONE_TARGET);
|
|
73
|
+
// Index-only moves; nothing on disk changes, so neither needs a checkpoint. An empty target means the whole repository
|
|
74
|
+
// (`git add -A`, or the entire index).
|
|
75
|
+
export const GitIndexMoveSchema = RepoParamSchema.extend(GitTargetSchema.shape)
|
|
76
|
+
.describe("What to move across the index. Nothing on disk changes either way.")
|
|
77
|
+
.refine(oneTarget, ONE_TARGET);
|
|
78
|
+
// No separate "set upstream" flag: the daemon runs `push -u` exactly when the branch has none yet, which is never
|
|
79
|
+
// destructive.
|
|
45
80
|
export const PushSchema = RepoParamSchema.extend({
|
|
46
81
|
branch: z
|
|
47
82
|
.string()
|
|
@@ -49,23 +84,15 @@ export const PushSchema = RepoParamSchema.extend({
|
|
|
49
84
|
.optional()
|
|
50
85
|
.describe("Which branch to push. Leave it out for the checked-out one. A branch with no upstream yet gets one set on this push."),
|
|
51
86
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
* somewhere else; nothing about the code has been judged.
|
|
58
|
-
* transport , it never got there: credentials, a host that does not answer, a remote that is not a
|
|
59
|
-
* repository. The same again, and a retry is the only sensible button. */
|
|
87
|
+
// Who said no to a push, read off git's own words (`pushRefusal`); the three answers ask three different things of the
|
|
88
|
+
// owner.
|
|
89
|
+
// hook: this repo's own pre-push hook refused it; the code is known wrong, worth a fix.
|
|
90
|
+
// remote: the server rejected the refs (non-fast-forward, protected branch); pull first or push elsewhere.
|
|
91
|
+
// transport: it never got there (credentials, unreachable host); a retry is the only useful button.
|
|
60
92
|
export const PushRefusalSchema = z.enum(["hook", "remote", "transport"]);
|
|
61
93
|
export type PushRefusal = z.infer<typeof PushRefusalSchema>;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
* suite, minutes of output; it is a terminal to watch and a verdict to poll for exactly as the check is, and
|
|
65
|
-
* NOT a request held open for its duration (the browser's header deadline is seconds, and a push that ran a
|
|
66
|
-
* suite inside its own request reported "failed" over a push that had gone). One shape for both halves of
|
|
67
|
-
* the push flow is what lets the browser render a refused push with the card, the terminal link and the
|
|
68
|
-
* proposed fix it already has for a red check. */
|
|
94
|
+
// A push runs this repo's pre-push hook (minutes of output); it streams like `CommandRunSchema`, never held open on the
|
|
95
|
+
// request, since the browser's header deadline is seconds.
|
|
69
96
|
export const PushRunSchema = CommandRunSchema.extend({
|
|
70
97
|
repo: z.string().describe("The repository this run is about, the same id the routes take."),
|
|
71
98
|
reason: z
|
|
@@ -82,15 +109,6 @@ export const GitFileWriteSchema = RepoParamSchema.extend({
|
|
|
82
109
|
path: z.string().min(1).describe("Where to write, relative to the repository root. Missing folders are created."),
|
|
83
110
|
content: z.string().describe("The file's whole new contents."),
|
|
84
111
|
});
|
|
85
|
-
// Which of the working tree's diffs to open, the same split the Changes panel lists under. A path that is
|
|
86
|
-
// staged AND edited again has genuinely different diffs, so the side is required rather than defaulted: a
|
|
87
|
-
// caller that doesn't say which one it means doesn't know what it is showing.
|
|
88
|
-
// staged ⇒ index vs HEAD (what a bare `git commit` would record)
|
|
89
|
-
// unstaged ⇒ worktree vs index (untracked ⇒ no before side)
|
|
90
|
-
// conflicted ⇒ HEAD vs worktree (what you had vs what the merge left, markers included, an unmerged path
|
|
91
|
-
// has no stage 0, so the index is not a side it can be diffed against)
|
|
92
|
-
export const GitDiffSideSchema = z.enum(["staged", "unstaged", "conflicted"]);
|
|
93
|
-
export type GitDiffSide = z.infer<typeof GitDiffSideSchema>;
|
|
94
112
|
export const GitFileDiffQuerySchema = RepoParamSchema.extend({
|
|
95
113
|
path: z.string().min(1).describe("The file, relative to the repository root."),
|
|
96
114
|
side: GitDiffSideSchema.describe(
|
|
@@ -109,24 +127,20 @@ export const GitFileSchema = z.object({
|
|
|
109
127
|
path: z.string().describe("The path, as asked for."),
|
|
110
128
|
content: z.string().describe("The file's contents as they stand on disk."),
|
|
111
129
|
});
|
|
112
|
-
// CommitResultSchema is declared further down, after the RepoChanges/OriginAgent shapes a commit answers with.
|
|
113
130
|
|
|
114
|
-
// One repo's slice of a workspace-wide
|
|
115
|
-
//
|
|
116
|
-
export const
|
|
117
|
-
repo: z.string().min(1).describe("Which repository.")
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
export type
|
|
121
|
-
// One change to a file
|
|
122
|
-
//
|
|
123
|
-
// undefined for a binary file (git reports "-"/"-") or an untracked file (no HEAD blob to diff against).
|
|
131
|
+
// One repo's slice of a workspace-wide action: git cannot span repositories, so a caller fans out into one of these per
|
|
132
|
+
// repo.
|
|
133
|
+
export const RepoTargetSchema = z
|
|
134
|
+
.object({ repo: z.string().min(1).describe("Which repository.") })
|
|
135
|
+
.extend(GitTargetSchema.shape)
|
|
136
|
+
.refine(oneTarget, ONE_TARGET);
|
|
137
|
+
export type RepoTarget = z.infer<typeof RepoTargetSchema>;
|
|
138
|
+
// One change to a file: an uncommitted working-tree change, an agent worktree's delta vs its base, or a file in a
|
|
139
|
+
// commit. `additions`/`deletions` are numstat counts, absent for binary or untracked files.
|
|
124
140
|
export const GitChangeSchema = z.object({
|
|
125
|
-
//
|
|
141
|
+
// Forward slashes; for a rename this is the new path (`from` holds the old one).
|
|
126
142
|
path: z.string().describe("The path, relative to the repository root. For a rename this is the new one."),
|
|
127
|
-
//
|
|
128
|
-
// and "theirs" at stages 2/3 with NO stage 0, so there is nothing a commit could record for this path and
|
|
129
|
-
// git refuses to commit while one exists. It belongs to neither side, see RepoChanges.conflicted.
|
|
143
|
+
// Git's unmerged state (`U`): stages 2/3 hold "ours"/"theirs", no stage 0 to commit.
|
|
130
144
|
status: z
|
|
131
145
|
.enum(["added", "modified", "deleted", "renamed", "type-changed", "conflicted"])
|
|
132
146
|
.describe("What happened to it. Conflicted is not a kind of edit: nothing can be committed anywhere in the repository while one exists."),
|
|
@@ -136,16 +150,7 @@ export const GitChangeSchema = z.object({
|
|
|
136
150
|
.optional()
|
|
137
151
|
.describe("Lines added. Absent for a binary file, and for an untracked one, which has nothing to compare against."),
|
|
138
152
|
deletions: z.number().optional().describe("Lines removed. Absent for the same reasons additions is."),
|
|
139
|
-
|
|
140
|
-
* that is the whole point of it being on the wire. A review's diffs open on code alone, so the numbers beside
|
|
141
|
-
* them are the code's; working those out needs both whole sides of the file and a TextMate walk over each,
|
|
142
|
-
* which the app used to do per file, as the files were read — so a row arrived showing git's count and
|
|
143
|
-
* changed to this one the moment anything read it, which moved the row under the reader when the list was
|
|
144
|
-
* sorted by size. Shipped with the list, the number a reader sees first is the number it stays.
|
|
145
|
-
*
|
|
146
|
-
* Absent, not zero, when there is nothing to say: a binary file, one side too large to read, a path whose
|
|
147
|
-
* grammar this build does not ship, or a list too long to count whole (see git/code-counts.ts). The caller
|
|
148
|
-
* then shows git's own counts, which for such a file are the only honest reading anyway. */
|
|
153
|
+
// Precomputed once and shipped with the list, so a row's number never changes under the reader as it renders.
|
|
149
154
|
code: z
|
|
150
155
|
.object({ additions: z.number(), deletions: z.number() })
|
|
151
156
|
.optional()
|
|
@@ -154,37 +159,30 @@ export const GitChangeSchema = z.object({
|
|
|
154
159
|
),
|
|
155
160
|
});
|
|
156
161
|
export type GitChange = z.infer<typeof GitChangeSchema>;
|
|
157
|
-
// Where
|
|
158
|
-
//
|
|
159
|
-
// never pushed, a detached HEAD. `ahead` = commits only we have; `behind` = commits only the upstream has,
|
|
160
|
-
// which is meaningful only as of the last fetch, the panel's Fetch button is what refreshes it.
|
|
162
|
+
// Where the checked-out branch stands against its remote; every field can legitimately be absent (no remote, unpushed
|
|
163
|
+
// branch, detached HEAD). `behind` is only as fresh as the last fetch.
|
|
161
164
|
export const GitRemoteStateSchema = z.object({
|
|
162
|
-
// The remote this branch pushes to: its OWN remote when it tracks one, else the first `git remote` lists
|
|
163
|
-
// (where a never-pushed branch would publish). Those differ in a fork, `origin` and `upstream` both
|
|
164
|
-
// configured, and pushing to the wrong one succeeds while leaving `ahead` stuck. Absent ⇒ no remote.
|
|
165
165
|
remote: z
|
|
166
166
|
.string()
|
|
167
167
|
.optional()
|
|
168
168
|
.describe(
|
|
169
169
|
"The remote this branch pushes to. Absent means none is configured. In a fork with two remotes, pushing to the wrong one succeeds and leaves the count stuck, which is why this says which.",
|
|
170
170
|
),
|
|
171
|
-
// The checked-out branch; absent on a detached HEAD or an unborn repo.
|
|
172
171
|
branch: z.string().optional().describe("The checked-out branch. Absent when the repository is on a bare commit, or has no commits yet."),
|
|
173
|
-
//
|
|
172
|
+
// Full ref, e.g. "origin/main".
|
|
174
173
|
upstream: z.string().optional().describe("The branch on the remote this one follows. Absent means the next push will publish it."),
|
|
175
174
|
ahead: z.number().describe("Commits you have that the remote does not."),
|
|
176
175
|
behind: z.number().describe("Commits the remote has that you do not, as of the last fetch. Fetch before trusting it."),
|
|
177
176
|
});
|
|
178
177
|
export type GitRemoteState = z.infer<typeof GitRemoteStateSchema>;
|
|
179
|
-
// One local branch, for the switcher.
|
|
178
|
+
// One local branch, for the switcher.
|
|
180
179
|
export const GitBranchSchema = z.object({
|
|
181
180
|
name: z.string().describe("The branch name."),
|
|
182
181
|
current: z.boolean().describe("Whether this is the one checked out."),
|
|
183
182
|
upstream: z.string().optional().describe("The branch on the remote it follows, if any."),
|
|
184
183
|
ahead: z.number().describe("Commits this branch has that its remote counterpart does not."),
|
|
185
184
|
behind: z.number().describe("Commits its remote counterpart has that it does not."),
|
|
186
|
-
//
|
|
187
|
-
// "no upstream", and the signal that this local branch is safe to delete.
|
|
185
|
+
// Distinct from no upstream: the configured one existed and was deleted remotely.
|
|
188
186
|
gone: z
|
|
189
187
|
.boolean()
|
|
190
188
|
.optional()
|
|
@@ -194,12 +192,8 @@ export const GitBranchSchema = z.object({
|
|
|
194
192
|
at: z.number().describe("When its tip was committed, in milliseconds. Lists are newest first."),
|
|
195
193
|
});
|
|
196
194
|
export type GitBranch = z.infer<typeof GitBranchSchema>;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
* A separate shape from GitBranch rather than the same one with optional fields, because the two genuinely
|
|
200
|
-
* differ: a remote-tracking branch has no upstream of its own and no ahead/behind, and giving it those fields
|
|
201
|
-
* as zeroes would make it look like a synced local branch. `name` is the full `origin/main`; `remote` and
|
|
202
|
-
* `branch` are it split, so a selector can group by remote without re-parsing. */
|
|
195
|
+
// A remote-tracking branch, not GitBranch with optionals: it has no upstream/ahead/behind of its own, and zeros there
|
|
196
|
+
// would look like a synced local branch. `remote`/`branch` are `name` pre-split for grouping.
|
|
203
197
|
export const GitRemoteBranchSchema = z.object({
|
|
204
198
|
name: z.string().describe("The full name, such as origin/main."),
|
|
205
199
|
remote: z.string().describe("Just the remote part, so a picker can group by it without re-parsing."),
|
|
@@ -207,15 +201,14 @@ export const GitRemoteBranchSchema = z.object({
|
|
|
207
201
|
at: z.number().describe("When its tip was committed, in milliseconds, as this repository last saw it."),
|
|
208
202
|
});
|
|
209
203
|
export type GitRemoteBranch = z.infer<typeof GitRemoteBranchSchema>;
|
|
210
|
-
// Locals and remote-tracking branches
|
|
211
|
-
// list would only ever show a half-populated one first.
|
|
204
|
+
// Locals and remote-tracking branches together, so the switcher never draws a half-populated list from two round trips.
|
|
212
205
|
export const GitBranchesSchema = z.object({
|
|
213
206
|
branches: z.array(GitBranchSchema).describe("Branches in this repository."),
|
|
214
207
|
remotes: z
|
|
215
208
|
.array(GitRemoteBranchSchema)
|
|
216
209
|
.describe("Branches on its remotes, as last seen. Sent together with the locals so a switcher never draws a half-filled list."),
|
|
217
210
|
});
|
|
218
|
-
//
|
|
211
|
+
// Creates at `start` (sha or ref; absent means HEAD); `checkout` switches to it immediately.
|
|
219
212
|
export const GitBranchCreateAtSchema = RepoParamSchema.extend({
|
|
220
213
|
name: RefNameSchema.describe("The new branch's name."),
|
|
221
214
|
start: z.string().min(1).optional().describe("Where to start it: a commit or another branch. Leave it out to start from where you are."),
|
|
@@ -229,13 +222,8 @@ export const GitBranchDeleteSchema = RepoParamSchema.extend({
|
|
|
229
222
|
.optional()
|
|
230
223
|
.describe("Delete it even though it holds work that was never merged. The deliberate retry after the first attempt refuses."),
|
|
231
224
|
});
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
*
|
|
235
|
-
* Every verb the daemon runs itself aborts cleanly on failure, so this is never something the UI started. It is
|
|
236
|
-
* what an agent or a user left behind in a terminal, and it is a state git refuses to do almost anything else
|
|
237
|
-
* from, so a surface listing the conflicted files without naming it leaves the reader with no way out.
|
|
238
|
-
* Absent means the worktree is not mid-anything. */
|
|
225
|
+
// A merge/rebase/cherry-pick/revert left stopped on a conflict, never finished or aborted; the daemon's own verbs
|
|
226
|
+
// always abort cleanly, so this is only ever something a person or agent left behind in a terminal.
|
|
239
227
|
export const GitOperationSchema = z.enum(["merge", "rebase", "cherry-pick", "revert"]);
|
|
240
228
|
export type GitOperation = z.infer<typeof GitOperationSchema>;
|
|
241
229
|
export const GitOperationStateSchema = z.object({
|
|
@@ -248,61 +236,47 @@ export type GitOperationState = z.infer<typeof GitOperationStateSchema>;
|
|
|
248
236
|
export const RepoChangesSchema = z.object({
|
|
249
237
|
// The {repo} param the per-repo git routes accept: "root" or a repo id (its root-relative dir).
|
|
250
238
|
repo: z.string(),
|
|
251
|
-
// Absent on an unborn HEAD (
|
|
239
|
+
// Absent on an unborn HEAD (initialized, never committed).
|
|
252
240
|
branch: z.string().optional().describe("The checked-out branch. Absent in a repository that has no commits yet."),
|
|
253
|
-
//
|
|
254
|
-
// they are resolved nothing else in this repo can be committed at all: git refuses outright. Held apart
|
|
255
|
-
// from the two sides rather than listed in them, because "staged or not" is not a question an unmerged path
|
|
256
|
-
// has an answer to. Staging one (`git add`) is exactly how you tell git it is resolved.
|
|
241
|
+
// Staging a conflicted path (`git add`) is how you tell git it is resolved.
|
|
257
242
|
conflicted: z
|
|
258
243
|
.array(GitChangeSchema)
|
|
259
244
|
.describe(
|
|
260
245
|
"Paths a merge or rebase could not finish. First, because nothing anywhere in this repository can be committed until they are resolved. Held apart from the two lists below, because staged or not is not a question one of these has an answer to.",
|
|
261
246
|
),
|
|
262
|
-
|
|
263
|
-
* rather than fetched per repo because it belongs beside `conflicted`: the panel already lists the files,
|
|
264
|
-
* and this is the sentence that says why they are conflicted and what ends it. Absent = not mid-anything,
|
|
265
|
-
* which is every repo almost all of the time. */
|
|
247
|
+
// Absent means not mid-anything, the case for almost every repo.
|
|
266
248
|
operation: GitOperationSchema.optional().describe(
|
|
267
249
|
"What halted, when something did. This is the sentence that explains the conflicts above and names the way out of them.",
|
|
268
250
|
),
|
|
269
|
-
//
|
|
270
|
-
//
|
|
271
|
-
// bare `git commit` would record. `unstaged` is worktree-vs-index plus untracked files. Each side's
|
|
272
|
-
// additions/deletions describe the diff it is listed under, never a conflation of the two.
|
|
251
|
+
// Kept apart because a path can appear on both with different statuses (the classic `MM`); each side's counts
|
|
252
|
+
// describe only its own diff.
|
|
273
253
|
staged: z.array(GitChangeSchema).describe("What a plain commit would record right now."),
|
|
274
254
|
unstaged: z
|
|
275
255
|
.array(GitChangeSchema)
|
|
276
256
|
.describe(
|
|
277
257
|
"Edits on disk that are not staged, plus untracked files. A path can be in both lists at once with different line counts, which is why they are separate.",
|
|
278
258
|
),
|
|
279
|
-
//
|
|
280
|
-
//
|
|
281
|
-
// so past the daemon's per-repo budget the lists arrive truncated and this carries the dropped count, which
|
|
282
|
-
// the panel adds to its badges and states under the group. Absent ⇒ the lists are complete.
|
|
259
|
+
// Per side, not one total: which side loses rows first is the daemon's own choice (staged outranks unstaged) and
|
|
260
|
+
// cannot be derived from the lists, so it is stated.
|
|
283
261
|
truncated: z
|
|
284
|
-
.
|
|
262
|
+
.object({
|
|
263
|
+
staged: z.number().describe("Staged changes not listed above."),
|
|
264
|
+
unstaged: z.number().describe("Unstaged changes not listed above."),
|
|
265
|
+
})
|
|
285
266
|
.optional()
|
|
286
267
|
.describe(
|
|
287
|
-
"How many changes were cut from the two lists above. A freshly cloned monorepo or a mass delete runs to six figures, which no screen can draw, so past a budget the lists arrive short and this says by how much. Absent means they are complete.",
|
|
268
|
+
"How many changes were cut from each of the two lists above. A freshly cloned monorepo or a mass delete runs to six figures, which no screen can draw, so past a budget the lists arrive short and this says by how much on each side. Absent means they are complete.",
|
|
288
269
|
),
|
|
289
|
-
//
|
|
270
|
+
// 0 for `ahead`/`behind` with no remote or no upstream.
|
|
290
271
|
remote: GitRemoteStateSchema.optional().describe("Where this repository stands against its remote."),
|
|
291
|
-
//
|
|
292
|
-
//
|
|
293
|
-
// edited again) and its origin is the same fact for both. Only branch-backed agents whose work passed
|
|
294
|
-
// through land can appear here; workspace conversations, terminal edits and the user's typing are absent
|
|
295
|
-
// (see agents/origins.ts), so the panel badges an attributable agent and says nothing for anyone else.
|
|
296
|
-
// Ids, not titles: the identity for every id named here rides the response once, in `originAgents`.
|
|
272
|
+
// Keyed by path, not on each change, since one path can appear on two sides with the same origin. Ids only; look up
|
|
273
|
+
// identity in `originAgents`.
|
|
297
274
|
origins: z
|
|
298
275
|
.record(z.string(), z.array(z.string()))
|
|
299
276
|
.optional()
|
|
300
277
|
.describe(
|
|
301
278
|
"Which conversation put each path here, newest first, keyed by path. Only work that went through a merge can appear: edits made in the shared tree, in a terminal, or by a person are simply absent rather than guessed at.",
|
|
302
279
|
),
|
|
303
|
-
// Why the repo could not be scanned at all, condensed to git's own one-line reason ("fatal: bad object HEAD").
|
|
304
|
-
// A repo left torn by a canceled or failed upload used to be dropped from the response entirely, so it just
|
|
305
|
-
// vanished from the panel with nothing to act on; it now arrives with empty change lists and this set instead.
|
|
306
280
|
error: z
|
|
307
281
|
.string()
|
|
308
282
|
.optional()
|
|
@@ -311,61 +285,35 @@ export const RepoChangesSchema = z.object({
|
|
|
311
285
|
),
|
|
312
286
|
});
|
|
313
287
|
export type RepoChanges = z.infer<typeof RepoChangesSchema>;
|
|
314
|
-
//
|
|
315
|
-
//
|
|
316
|
-
// agents (AgentsRegistry.list), while a landing outlives the agent that made it: archiving a finished agent
|
|
317
|
-
// does not commit its lines, so the very common case, land, archive the card, review at leisure, is exactly
|
|
318
|
-
// the one a roster lookup cannot answer, and the panel fell back to "Agent 1a2b3c" with a generic icon for it.
|
|
319
|
-
// The daemon reads attribution and identity from the same registry in the same pass, so it is the one place
|
|
320
|
-
// they cannot disagree. Per response, not per repo: one agent commonly lands into several.
|
|
288
|
+
// Display identity for an id in `origins`, carried here rather than looked up in the roster: the roster drops archived
|
|
289
|
+
// agents, but a landing outlives them. Read from the same pass as the attribution, so the two cannot disagree.
|
|
321
290
|
export const OriginAgentSchema = z.object({
|
|
322
|
-
// Absent for an entry that never got a title (a turn that failed before one was derived).
|
|
323
291
|
title: z.string().optional().describe("The conversation's title. Absent for one that never got as far as having a title."),
|
|
324
292
|
provider: AgentProviderSchema.describe("Which model provider it ran on."),
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
* entry left to read, which is the case this whole schema exists for: an archived agent's lines are still
|
|
328
|
-
* in the tree, and the sentence about them has to be too.
|
|
329
|
-
*
|
|
330
|
-
* Absent for a landing nothing was written about, and, for the seconds after a land, for one whose
|
|
331
|
-
* sentence is still being drafted. Those two are told apart by `landedMessageDraft` on the agent's card, and
|
|
332
|
-
* neither has a title-shaped fallback: guessing a subject from the ask is exactly the habit this replaced,
|
|
333
|
-
* so a chip with no message files nothing and simply filters. */
|
|
293
|
+
// Absent means nothing was written, or (see `landedMessageDraft` on the agent's card) it still is; never fall back
|
|
294
|
+
// to guessing a title from the ask.
|
|
334
295
|
landedMessage: LandedMessageSchema.optional().describe(
|
|
335
296
|
"What the merged work did, drafted by the conversation itself. Carried here as well as on its card, because merged lines outlive the card: archiving a finished conversation does not uncommit its work.",
|
|
336
297
|
),
|
|
337
298
|
});
|
|
338
299
|
export type OriginAgent = z.infer<typeof OriginAgentSchema>;
|
|
339
|
-
//
|
|
340
|
-
// when it is out of sync with its remote, or when it failed to scan.
|
|
300
|
+
// Aggregated review set across every repo (root + every discovered repo).
|
|
341
301
|
export const GitChangesSchema = z.object({
|
|
342
302
|
repos: z
|
|
343
303
|
.array(RepoChangesSchema)
|
|
344
304
|
.describe(
|
|
345
305
|
"One entry per repository that has something pending, is out of step with its remote, or could not be read. A clean repository is simply absent.",
|
|
346
306
|
),
|
|
347
|
-
//
|
|
348
|
-
//
|
|
349
|
-
// entry whose landed lines are somehow still uncommitted, and the panel keeps its id-shaped fallback for
|
|
350
|
-
// exactly that, rather than dropping the chip and re-attributing the file to the user.
|
|
307
|
+
// An id can still be missing here (a retired retention-sweep entry); the panel keeps its id-shaped fallback rather
|
|
308
|
+
// than reattributing to the user.
|
|
351
309
|
originAgents: z
|
|
352
310
|
.record(z.string(), OriginAgentSchema)
|
|
353
311
|
.optional()
|
|
354
312
|
.describe(
|
|
355
313
|
"Who each conversation named above is, keyed by id, so a caller need not look them up. Absent when nothing in the review can be attributed.",
|
|
356
314
|
),
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
* A commit is one request that outlives the tab that fired it. Reload the page mid-commit and that tab's
|
|
360
|
-
* "a git action is running" flag went with it: the button re-armed itself over rows the commit was already
|
|
361
|
-
* recording, the panel invited a second click at the exact moment it could do the least good, and the rows
|
|
362
|
-
* then changed under the user a second later with nothing having said why. A second device watching the
|
|
363
|
-
* same workspace never knew at all.
|
|
364
|
-
*
|
|
365
|
-
* So the fact lives where the commit does. Read at RESPONSE time rather than folded into the scan, because
|
|
366
|
-
* the scan is memoized for half a second and this must describe the instant it is sent. Absent ⇒ nothing is
|
|
367
|
-
* committing, which is the overwhelmingly common case and the reason it is optional rather than an empty
|
|
368
|
-
* array on every response. */
|
|
315
|
+
// Sandbox-wide, not per-tab, so a reload or another device still knows a commit is running. Read at response time,
|
|
316
|
+
// not from the memoized scan. Absent means nothing is committing.
|
|
369
317
|
committing: z
|
|
370
318
|
.array(z.string())
|
|
371
319
|
.optional()
|
|
@@ -374,18 +322,8 @@ export const GitChangesSchema = z.object({
|
|
|
374
322
|
),
|
|
375
323
|
});
|
|
376
324
|
export type GitChanges = z.infer<typeof GitChangesSchema>;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
* workspace-wide scan afterwards.
|
|
380
|
-
*
|
|
381
|
-
* That scan is the daemon's most expensive read (a repo walk plus a `git status` per repo, ~11 git spawns each,
|
|
382
|
-
* for every repo including the ones the commit never touched) and the user sat watching the rows they had just
|
|
383
|
-
* committed until it returned. The commit itself is milliseconds of git; the wait was this.
|
|
384
|
-
*
|
|
385
|
-
* `changes` ABSENT means the repo has nothing the panel would show any more, the same inclusion rule the scan
|
|
386
|
-
* applies, decided in the same place, so a repo the scan would have dropped drops here too. `originAgents`
|
|
387
|
-
* covers the ids this repo's `origins` names and only those, on GitChangesSchema's terms; the panel merges it
|
|
388
|
-
* over what it already holds rather than replacing, since the other repos' rows still name their own agents. */
|
|
325
|
+
// Re-read inside the same lock the commit used, so the caller redraws from here instead of a full rescan. `changes`
|
|
326
|
+
// absent follows the scan's own drop rule; merge `originAgents` over what you hold, don't replace it.
|
|
389
327
|
export const CommitResultSchema = z.object({
|
|
390
328
|
committed: z.boolean().describe("Whether a commit was actually recorded."),
|
|
391
329
|
changes: RepoChangesSchema.optional().describe(
|
|
@@ -399,15 +337,8 @@ export const CommitResultSchema = z.object({
|
|
|
399
337
|
),
|
|
400
338
|
});
|
|
401
339
|
export type CommitResult = z.infer<typeof CommitResultSchema>;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
* WorkspacePackage, which is the DEPENDENCY graph's node, that one is pnpm's view of the workspace and carries
|
|
405
|
-
* the grouping axis its diagram colours by; this one is a filesystem fact about where a path lives.
|
|
406
|
-
*
|
|
407
|
-
* Stated HERE, above both readings of it, because there are two trees a review can be of and each groups by its
|
|
408
|
-
* own: the workspace read below (/workspace/modules, the Changes panel) speaks for /work, and every agent's
|
|
409
|
-
* diff carries its own (AgentRepoChanges.modules) because an agent's files live in a worktree /work cannot
|
|
410
|
-
* see. */
|
|
340
|
+
// Repo-relative dir + package name for grouping changed files; distinct from WorkspacePackage (the dependency graph's
|
|
341
|
+
// node), a filesystem fact, not a graph position.
|
|
411
342
|
export const WorkspaceModuleSchema = z.object({
|
|
412
343
|
dir: z.string().describe("Where the package lives, relative to its repository. Empty when the repository is itself one package."),
|
|
413
344
|
name: z.string().describe("The name the package declares for itself."),
|
|
@@ -420,20 +351,11 @@ export const RepoModulesSchema = z.object({
|
|
|
420
351
|
export type RepoModules = z.infer<typeof RepoModulesSchema>;
|
|
421
352
|
export const WorkspaceModulesSchema = z.object({ repos: z.array(RepoModulesSchema).describe("Every repository with the packages inside it.") });
|
|
422
353
|
export type WorkspaceModules = z.infer<typeof WorkspaceModulesSchema>;
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
* difference against main. There is no row (see `absorbed` on the response).
|
|
429
|
-
* · the main working tree has it, uncommitted: the steady state seconds after a land, waiting in the Changes
|
|
430
|
-
* panel. A row, `landed: true`.
|
|
431
|
-
* · neither: never landed, or landed and then discarded. A row, `landed: false`, and this is exactly what
|
|
432
|
-
* "Land now" would apply.
|
|
433
|
-
*
|
|
434
|
-
* Landed work keeps its row on purpose: a clean turn auto-lands within milliseconds, so a list scoped to the
|
|
435
|
-
* outstanding remainder would show an empty panel for work nobody had looked at yet. What retires a row is the
|
|
436
|
-
* user committing it, which is the one act that says they are done reviewing it. */
|
|
354
|
+
// One file an agent touched that still differs from main, plus whether main's working tree already holds it:
|
|
355
|
+
// in main's history: accepted, no longer a difference — no row (see `absorbed`).
|
|
356
|
+
// in main's tree, uncommitted: `landed: true`.
|
|
357
|
+
// neither (never landed, or landed then discarded): `landed: false` — what "Land now" applies to.
|
|
358
|
+
// A landed row stays until committed; that is the only act that retires it.
|
|
437
359
|
export const AgentChangeSchema = GitChangeSchema.extend({
|
|
438
360
|
landed: z
|
|
439
361
|
.boolean()
|
|
@@ -442,21 +364,13 @@ export const AgentChangeSchema = GitChangeSchema.extend({
|
|
|
442
364
|
),
|
|
443
365
|
});
|
|
444
366
|
export type AgentChange = z.infer<typeof AgentChangeSchema>;
|
|
445
|
-
// An agent
|
|
446
|
-
//
|
|
447
|
-
// set. Sharing the working-tree shape would have forced a meaningless empty `staged` on every
|
|
448
|
-
// row and invited the panel to render a staging affordance that cannot work on a worktree the user never checks out.
|
|
367
|
+
// An agent worktree's delta vs its base, deliberately not RepoChanges: no index here, so sharing that shape would force
|
|
368
|
+
// an empty `staged` and a staging affordance that cannot work on a worktree nobody checks out.
|
|
449
369
|
export const AgentRepoChangesSchema = z.object({
|
|
450
370
|
repo: z.string().describe("Which repository."),
|
|
451
371
|
branch: z.string().optional().describe("The branch this conversation's work sits on."),
|
|
452
372
|
changes: z.array(AgentChangeSchema).describe("What it changed there."),
|
|
453
|
-
|
|
454
|
-
* the workspace's Changes panel does. It rides the changes rather than being fetched beside them, because
|
|
455
|
-
* an agent works in a worktree the main tree cannot see: a package the agent has just created exists only
|
|
456
|
-
* there, so the workspace-wide read (/workspace/modules) does not know its name and every one of its files
|
|
457
|
-
*, which for a new package is all of them, fell into the unnamed "loose in this repo" bucket.
|
|
458
|
-
*
|
|
459
|
-
* Same read, same instant, same tree as the rows it groups: that is what stops the two from disagreeing. */
|
|
373
|
+
// Read from the same tree at the same instant as the rows it groups, so the two cannot disagree.
|
|
460
374
|
modules: z
|
|
461
375
|
.array(WorkspaceModuleSchema)
|
|
462
376
|
.describe(
|
|
@@ -464,21 +378,11 @@ export const AgentRepoChangesSchema = z.object({
|
|
|
464
378
|
),
|
|
465
379
|
});
|
|
466
380
|
export type AgentRepoChanges = z.infer<typeof AgentRepoChangesSchema>;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
* reaches by clicking the card's "Resolve conflict". Carrying the report only in the land RESPONSE meant the
|
|
470
|
-
* one path that opens the review already knowing there is a conflict was the one path that could not show it:
|
|
471
|
-
* the panel opened with an empty report, no explanation, and no merge affordance, a dead end at the exact
|
|
472
|
-
* moment the UI had promised something to resolve. It rides the review because that is the surface that
|
|
473
|
-
* resolves it, and it refreshes with it: every land invalidates this query, so the report is never staler
|
|
474
|
-
* than the last attempt. */
|
|
381
|
+
// The review, plus why the last land refused: a conflict is found when the turn ends but resolved later on this
|
|
382
|
+
// surface, so it rides here rather than only in the land response, and refreshes on every land.
|
|
475
383
|
export const AgentChangesSchema = z.object({
|
|
476
384
|
repos: z.array(AgentRepoChangesSchema).describe("One entry per repository the conversation touched."),
|
|
477
|
-
|
|
478
|
-
* agent that has written nothing and an agent whose every file the user committed both answer with no rows,
|
|
479
|
-
* and they are opposite facts: one is "ask it for something", the other is "it is all in your history". A
|
|
480
|
-
* count rather than the rows themselves, because that is the whole of what the surface needs to pick a
|
|
481
|
-
* sentence, and carrying the rows would put the list back where it started. */
|
|
385
|
+
// Disambiguates two opposite reasons for an empty list: nothing written, versus everything already committed.
|
|
482
386
|
absorbed: z
|
|
483
387
|
.number()
|
|
484
388
|
.describe(
|
|
@@ -493,20 +397,8 @@ export const AgentChangesSchema = z.object({
|
|
|
493
397
|
});
|
|
494
398
|
export type AgentChanges = z.infer<typeof AgentChangesSchema>;
|
|
495
399
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
* arrives at an empty panel; the count lets it say WHICH kind of empty, and this says where to go and shows
|
|
499
|
-
* the work, which is what the reader actually came for.
|
|
500
|
-
*
|
|
501
|
-
* Deliberately its OWN read rather than more fields on the review. The review is on the panel's hot path and
|
|
502
|
-
* this is a `git log` per repo that only matters once history has taken something, so it is asked for exactly
|
|
503
|
-
* when there is an answer to have. That also keeps the review's shape honest: its rows are differences against
|
|
504
|
-
* main, and these are not.
|
|
505
|
-
*
|
|
506
|
-
* A COMMIT CARRIES the work, it did not necessarily author it: a path is attributed to the newest commit that
|
|
507
|
-
* left the agent's content there, which is where a reader should be sent to read it now. See the daemon's
|
|
508
|
-
* agents/landed-history.ts for the span this is measured over and for why an unattributable path is counted
|
|
509
|
-
* rather than assigned to a plausible commit. */
|
|
400
|
+
// Own read (a `git log` per repo), not folded into the review, whose rows are differences against main and these are
|
|
401
|
+
// not. A commit CARRIES the work without authoring it: a path is attributed to the newest commit that left it there.
|
|
510
402
|
export const AgentHistoryCommitSchema = z.object({
|
|
511
403
|
sha: z.string().describe("The commit."),
|
|
512
404
|
short: z.string().describe("Its abbreviated hash, which is what a reader recognises it by."),
|
|
@@ -523,19 +415,12 @@ export type AgentHistoryCommit = z.infer<typeof AgentHistoryCommitSchema>;
|
|
|
523
415
|
export const AgentRepoHistorySchema = z.object({
|
|
524
416
|
repo: z.string().describe("Which repository."),
|
|
525
417
|
commits: z.array(AgentHistoryCommitSchema).describe("The commits carrying this conversation's work there, newest first."),
|
|
526
|
-
|
|
527
|
-
* a package the conversation created lives only in its own copy, so the shared tree cannot name it, and
|
|
528
|
-
* without this every file of a brand-new package groups under no package at all. */
|
|
418
|
+
// Same reason as the review's rows: a new package lives only in its own copy and is otherwise ungroupable.
|
|
529
419
|
modules: z.array(WorkspaceModuleSchema).describe("The packages of the tree these files came from, so a review can group them by package."),
|
|
530
420
|
});
|
|
531
421
|
export type AgentRepoHistory = z.infer<typeof AgentRepoHistorySchema>;
|
|
532
422
|
export const AgentHistorySchema = z.object({
|
|
533
423
|
repos: z.array(AgentRepoHistorySchema).describe("One entry per repository holding committed work of this conversation."),
|
|
534
|
-
/* FILES HISTORY HOLDS THAT NO COMMIT HERE ACCOUNTS FOR, reported rather than hidden. Content reaches the
|
|
535
|
-
* main line by roads that do not pass through a commit since the land: a cherry-pick from elsewhere,
|
|
536
|
-
* another conversation landing the same lines, the user typing them by hand before this one landed. Those
|
|
537
|
-
* files are absorbed and unattributable at once, and a surface that quietly dropped them would be claiming
|
|
538
|
-
* the commits it names are the whole story. */
|
|
539
424
|
unaccounted: z
|
|
540
425
|
.number()
|
|
541
426
|
.describe(
|