@intentic/sandbox-contract 1.248.0 → 1.249.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.map +1 -1
- 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 +423 -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/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 +90 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +10 -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 +6 -9
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +16 -5
- 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 +4 -15
- 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} +19 -40
- package/src/models/model-order.ts +163 -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 +98 -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 +175 -600
- 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 +62 -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-order.js → models/model-order.js} +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
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { NeedsActionSchema } from "../policy/needs-action.js";
|
|
3
|
+
|
|
4
|
+
// The runner link's edges: the /system/runners/connect handshake, boot env, and turn placement (procedures live in
|
|
5
|
+
// contracts/runner.contract.ts). A runner is a sandbox image in runner mode, no browser owner or tunnel, that dials its
|
|
6
|
+
// parent over one outbound socket authenticating in its first frame.
|
|
7
|
+
|
|
8
|
+
// Boot env for a runner container: who to dial, and the single-use pairing token to enroll with.
|
|
9
|
+
export const RUNNER_PARENT_URL_ENV = "RUNNER_PARENT_URL";
|
|
10
|
+
export const RUNNER_PAIR_TOKEN_ENV = "RUNNER_PAIR_TOKEN";
|
|
11
|
+
|
|
12
|
+
// First frame on /system/runners/connect: plain JSON, not oRPC, since a socket must prove whose it is before a typed
|
|
13
|
+
// link exists. Token rides the frame, never the URL.
|
|
14
|
+
export const RunnerHelloSchema = z.object({
|
|
15
|
+
type: z.literal("runner-hello"),
|
|
16
|
+
// The runner's durable token, redeemed once from the pairing over /system/runners/enroll.
|
|
17
|
+
token: z.string(),
|
|
18
|
+
// The daemon build the runner runs, so an old image is visible rather than mysteriously wrong.
|
|
19
|
+
version: z.string(),
|
|
20
|
+
// Compared against what the parent runs to report parity (outdated → rebuild action); an outdated runner still runs
|
|
21
|
+
// turns rather than being refused.
|
|
22
|
+
image: z.string(),
|
|
23
|
+
channel: z.string().optional(),
|
|
24
|
+
overlayHash: z.string().optional(),
|
|
25
|
+
// Runner's declared settings-only sandbox.toml (definition.ts), diffed against the parent's to itemize drift;
|
|
26
|
+
// absent on an old image.
|
|
27
|
+
definitionToml: z.string().optional(),
|
|
28
|
+
});
|
|
29
|
+
export type RunnerHello = z.infer<typeof RunnerHelloSchema>;
|
|
30
|
+
|
|
31
|
+
// The URL a runner dials, given its parent's public URL. One builder, so `ic`, the Fly provisioner and the
|
|
32
|
+
// daemon route cannot disagree about where the door is (hostConnectUrl's rule).
|
|
33
|
+
/* HOW OFTEN THE PARENT PINGS A CONNECTED RUNNER, read by both sides of the socket: the parent's hub pings on
|
|
34
|
+
* it (runners/runner-peer.ts) and the runner presumes the link dead after a few of them pass in silence
|
|
35
|
+
* (peer-dial.ts's peerLinkSilenceMs). One number, because the two sides disagreeing about it is a runner either
|
|
36
|
+
* dropped while healthy or believed alive for as long as its socket happens to stay open. */
|
|
37
|
+
export const RUNNER_HEARTBEAT_MS = 30_000;
|
|
38
|
+
|
|
39
|
+
export const runnerConnectUrl = (parentUrl: string): string => `${parentUrl.replace(/^http/, "ws").replace(/\/$/, "")}/system/runners/connect`;
|
|
40
|
+
|
|
41
|
+
// Where a runner redeems its pairing for a durable token, once, over plain HTTPS.
|
|
42
|
+
export const runnerEnrollUrl = (parentUrl: string): string => `${parentUrl.replace(/\/$/, "")}/system/runners/enroll`;
|
|
43
|
+
|
|
44
|
+
// The parent's git door for one repo: stock git fetch/push against its smart-HTTP git dirs, authenticated by the
|
|
45
|
+
// runner's own token as bearer.
|
|
46
|
+
export const runnerGitUrl = (parentUrl: string, repo: string): string =>
|
|
47
|
+
`${parentUrl.replace(/\/$/, "")}/system/runners/git/${encodeURIComponent(repo)}`;
|
|
48
|
+
|
|
49
|
+
// Where a runner's push lands; never refs/heads/agent/<id> directly since git refuses updating a checked-out ref. The
|
|
50
|
+
// parent advances that branch by hard-resetting its mirror worktree to this ref.
|
|
51
|
+
export const runnerIncomingRef = (conversationId: string): string => `refs/runner-incoming/${conversationId}`;
|
|
52
|
+
|
|
53
|
+
// Container name for a runner on its host machine; the `ic`-prefix (runner.rs SLUG_PREFIX) must match exactly, or
|
|
54
|
+
// updates target a container that doesn't exist.
|
|
55
|
+
export const runnerSlug = (name: string): string => `runner-${name}`;
|
|
56
|
+
|
|
57
|
+
// Credential doors: a runner's turns spend the origin sandbox's model providers, never accounts of its own. The parent
|
|
58
|
+
// answers with the least that travels (a minted token or a route); refresh tokens never leave it.
|
|
59
|
+
export const runnerCredentialsUrl = (parentUrl: string): string => `${parentUrl.replace(/\/$/, "")}/system/runners/credentials`;
|
|
60
|
+
export const runnerCredentialRefreshUrl = (parentUrl: string): string => `${parentUrl.replace(/\/$/, "")}/system/runners/credentials/refresh`;
|
|
61
|
+
|
|
62
|
+
// Re-serves the parent's model translator to runners: subscription-routed turns dial this authenticated proxy instead
|
|
63
|
+
// of syncing auth files, and the parent forwards to its own loopback translator.
|
|
64
|
+
export const runnerTranslatorPath = "/system/runners/translator";
|
|
65
|
+
export const runnerTranslatorUrl = (parentUrl: string): string => `${parentUrl.replace(/\/$/, "")}${runnerTranslatorPath}`;
|
|
66
|
+
|
|
67
|
+
export const RunnerCredentialRequestSchema = z.object({
|
|
68
|
+
// Provider as the turn names it (absent = claude); an open vocabulary, including endpoint/<id>.
|
|
69
|
+
agent: z.string().optional(),
|
|
70
|
+
account: z.string().optional(),
|
|
71
|
+
model: z.string().optional(),
|
|
72
|
+
});
|
|
73
|
+
export type RunnerCredentialRequest = z.infer<typeof RunnerCredentialRequestSchema>;
|
|
74
|
+
|
|
75
|
+
// What travels back, by kind:
|
|
76
|
+
// oauth: a native-Claude access token minted for this turn; `account` set for a stored account, absent for the
|
|
77
|
+
// container-env fallback
|
|
78
|
+
// parent-translator: runs against the parent's translator through the proxy; the runner supplies its own token as
|
|
79
|
+
// bearer
|
|
80
|
+
// endpoint: a foreign endpoint capability the runner dials directly, with its own bearer
|
|
81
|
+
// A refusal uses the same codes as local resolution, so a remote refusal reads like a local one.
|
|
82
|
+
export const RunnerCredentialSchema = z.union([
|
|
83
|
+
z.object({ ok: z.literal(true), kind: z.literal("oauth"), accessToken: z.string(), account: z.string().optional() }),
|
|
84
|
+
z.object({ ok: z.literal(true), kind: z.literal("parent-translator"), model: z.string(), trial: z.boolean().optional() }),
|
|
85
|
+
z.object({
|
|
86
|
+
ok: z.literal(true),
|
|
87
|
+
kind: z.literal("endpoint"),
|
|
88
|
+
baseUrl: z.string(),
|
|
89
|
+
authToken: z.string(),
|
|
90
|
+
model: z.string(),
|
|
91
|
+
trial: z.boolean().optional(),
|
|
92
|
+
}),
|
|
93
|
+
z.object({
|
|
94
|
+
ok: z.literal(false),
|
|
95
|
+
code: z.enum(["subscription-required", "claude-reauth", "trial-unavailable"]).optional(),
|
|
96
|
+
message: z.string(),
|
|
97
|
+
}),
|
|
98
|
+
]);
|
|
99
|
+
export type RunnerCredential = z.infer<typeof RunnerCredentialSchema>;
|
|
100
|
+
|
|
101
|
+
export const RunnerCredentialRefreshRequestSchema = z.object({
|
|
102
|
+
account: z.string().min(1),
|
|
103
|
+
// Token the harness was refused with; rotation supersedes exactly that one, never a token already rotated.
|
|
104
|
+
rejected: z.string().min(1),
|
|
105
|
+
});
|
|
106
|
+
export type RunnerCredentialRefreshRequest = z.infer<typeof RunnerCredentialRefreshRequestSchema>;
|
|
107
|
+
|
|
108
|
+
// Absent `accessToken` means the parent couldn't re-mint (a revoked account); the harness gives up as it would locally.
|
|
109
|
+
export const RunnerCredentialRefreshSchema = z.object({ accessToken: z.string().optional() });
|
|
110
|
+
export type RunnerCredentialRefresh = z.infer<typeof RunnerCredentialRefreshSchema>;
|
|
111
|
+
|
|
112
|
+
// What a runner is, hardware-wise: what the placement picker shows and a future scheduler would weigh.
|
|
113
|
+
export const RunnerFactsSchema = z.object({
|
|
114
|
+
cpus: z.number().int().positive(),
|
|
115
|
+
memoryMb: z.number().int().positive(),
|
|
116
|
+
freeDiskMb: z.number().int().nonnegative(),
|
|
117
|
+
// 0..1 over the last minute; a coarse busy signal for a picker, not a metrics feed.
|
|
118
|
+
load: z.number().nonnegative(),
|
|
119
|
+
});
|
|
120
|
+
export type RunnerFacts = z.infer<typeof RunnerFactsSchema>;
|
|
121
|
+
|
|
122
|
+
// Whether a runner matches this sandbox's image, channel and approved overlay: `current`, `outdated` (gets an update
|
|
123
|
+
// button), or `unknown` (never connected, or a parent that can't name its own image). Reported, never enforced.
|
|
124
|
+
export const RunnerParitySchema = z.enum(["current", "outdated", "unknown"]);
|
|
125
|
+
export type RunnerParity = z.infer<typeof RunnerParitySchema>;
|
|
126
|
+
|
|
127
|
+
// One runner as the owner's list shows it: enrolled state plus whatever the hub currently knows — HostSummary's shape,
|
|
128
|
+
// retold with parity instead of platform/scopes.
|
|
129
|
+
export const RunnerSummarySchema = z.object({
|
|
130
|
+
id: z.string(),
|
|
131
|
+
// The connected device that requested it (Devices view); absent for one started by hand on a machine.
|
|
132
|
+
host: z.string().optional(),
|
|
133
|
+
online: z.boolean(),
|
|
134
|
+
version: z.string().optional(),
|
|
135
|
+
image: z.string().optional(),
|
|
136
|
+
channel: z.string().optional(),
|
|
137
|
+
overlayHash: z.string().optional(),
|
|
138
|
+
facts: RunnerFactsSchema.optional(),
|
|
139
|
+
lastSeen: z.number().optional(),
|
|
140
|
+
// Computed once by the daemon (runners/runner-parity.ts), so every surface shows the same badge.
|
|
141
|
+
parity: RunnerParitySchema,
|
|
142
|
+
// Where the runner's environment differs from this sandbox's, one line per difference; absent if never reported,
|
|
143
|
+
// empty if they agree. A Setting line is fixable live; an overlay line needs a rebuild.
|
|
144
|
+
drift: z.array(NeedsActionSchema).optional(),
|
|
145
|
+
});
|
|
146
|
+
export type RunnerSummary = z.infer<typeof RunnerSummarySchema>;
|
|
147
|
+
|
|
148
|
+
// A workspace sync, narrated line by line as it happens (first contact clones whole repos). `op`: `pull` brings the
|
|
149
|
+
// runner's checkout current before a turn, `push` returns the branch after; `repos` is the parent's own record, since
|
|
150
|
+
// the runner's mirror could be stale.
|
|
151
|
+
export const RunnerSyncSchema = z.object({
|
|
152
|
+
op: z.enum(["pull", "push"]),
|
|
153
|
+
conversationId: z.string().min(1),
|
|
154
|
+
branch: z.string().min(1),
|
|
155
|
+
repos: z.array(
|
|
156
|
+
z.object({
|
|
157
|
+
repo: z.string().min(1),
|
|
158
|
+
// "" for the workspace root itself; every other repo sits at its root-relative dir.
|
|
159
|
+
dir: z.string(),
|
|
160
|
+
mainBranch: z.string().min(1),
|
|
161
|
+
}),
|
|
162
|
+
),
|
|
163
|
+
});
|
|
164
|
+
export type RunnerSync = z.infer<typeof RunnerSyncSchema>;
|
|
165
|
+
|
|
166
|
+
export const RunnerSyncLineSchema = z.union([
|
|
167
|
+
z.object({ kind: z.literal("line"), text: z.string() }),
|
|
168
|
+
z.object({ kind: z.literal("done"), ok: z.boolean(), detail: z.string().optional() }),
|
|
169
|
+
]);
|
|
170
|
+
export type RunnerSyncLine = z.infer<typeof RunnerSyncLineSchema>;
|
|
171
|
+
|
|
172
|
+
// One dispatched turn, not AgentTurnSchema: that's the browser's request full of fields the parent resolves first. This
|
|
173
|
+
// is the residue after resolution, plus attachments inline, since the runner has no route to the parent's attachment
|
|
174
|
+
// store.
|
|
175
|
+
export const RunnerTurnSchema = z.object({
|
|
176
|
+
conversationId: z.string().min(1),
|
|
177
|
+
branch: z.string().min(1),
|
|
178
|
+
prompt: z.string(),
|
|
179
|
+
provider: z.string(),
|
|
180
|
+
harness: z.string(),
|
|
181
|
+
model: z.string().optional(),
|
|
182
|
+
effort: z.string().optional(),
|
|
183
|
+
thinking: z.boolean().optional(),
|
|
184
|
+
fast: z.boolean().optional(),
|
|
185
|
+
// Which origin-sandbox account pays; credentials resolve against the parent, naming an account there.
|
|
186
|
+
account: z.string().optional(),
|
|
187
|
+
sessionId: z.string().optional(),
|
|
188
|
+
// Base64 since frames are JSON and attachment count is capped; `path` is the workspace-relative path the prompt
|
|
189
|
+
// already names.
|
|
190
|
+
attachments: z.array(z.object({ path: z.string().min(1), bytesBase64: z.string() })).optional(),
|
|
191
|
+
});
|
|
192
|
+
export type RunnerTurn = z.infer<typeof RunnerTurnSchema>;
|
|
193
|
+
|
|
194
|
+
// Where a conversation runs, fixed on its first turn like `isolated` placement: later turns follow the registry, not
|
|
195
|
+
// the sender. `runner` implies isolation since a remote conversation is branch-anchored; absent means local.
|
|
196
|
+
export const AgentPlacementSchema = z.union([z.object({ kind: z.literal("local") }), z.object({ kind: z.literal("runner"), id: z.string().min(1) })]);
|
|
197
|
+
export type AgentPlacement = z.infer<typeof AgentPlacementSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// The /system/terminal WebSocket wire protocol, shared by the daemon and browser terminal so the two can't drift. Plain
|
|
2
|
+
// types, not zod, since this is a per-keystroke hot path nothing validates. Pane bytes travel as raw binary frames (so
|
|
3
|
+
// a split UTF-8 char decodes whole); everything else is JSON.
|
|
4
|
+
|
|
5
|
+
// `ping` is the client's 30s keepalive against tunnel idle-reaping; `pong` answers it, so silence beyond the interval
|
|
6
|
+
// means half-open.
|
|
7
|
+
export type TerminalClientMessage =
|
|
8
|
+
| { readonly type: "input"; readonly data: string }
|
|
9
|
+
| { readonly type: "resize"; readonly cols: number; readonly rows: number }
|
|
10
|
+
| { readonly type: "ping" };
|
|
11
|
+
|
|
12
|
+
// `exit` is terminal (no reconnect) when the tmux client ends; `reason` is tmux's own words, if any, for the dead pane.
|
|
13
|
+
export type TerminalServerMessage = { readonly type: "exit"; readonly code: number; readonly reason?: string } | { readonly type: "pong" };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Zod-free half of the browser connector's wire: URL builders, pairing code format, message names. Split from
|
|
2
|
+
// webext-protocol.ts since a content script only needs two constants and importing the barrel pulls in all of zod. No
|
|
3
|
+
// imports allowed here, ever.
|
|
4
|
+
|
|
5
|
+
// URL the extension dials, from the sandbox's public URL; carries no credential, the token rides the hello frame.
|
|
6
|
+
export const webextConnectUrl = (sandboxUrl: string): string => `${sandboxUrl.replace(/^http/, "ws").replace(/\/$/, "")}/system/webext/connect`;
|
|
7
|
+
|
|
8
|
+
// Where the extension POSTs a site's session when the owner connects it, bearer-authenticated. A separate door from the
|
|
9
|
+
// socket, since the socket's answers land in the agent's context and cookies must never reach a model.
|
|
10
|
+
export const webextSessionUrl = (sandboxUrl: string): string => `${sandboxUrl.replace(/\/$/, "")}/system/webext/session`;
|
|
11
|
+
|
|
12
|
+
// The reverse direction: lends a sandbox account's session to this browser for a step only it can do (passkey, 2FA,
|
|
13
|
+
// SSO). Separate from webextSessionUrl since the two have distinct refusals; cookies return on this request, never as
|
|
14
|
+
// an MCP result.
|
|
15
|
+
export const webextLendUrl = (sandboxUrl: string): string => `${sandboxUrl.replace(/\/$/, "")}/system/webext/lend`;
|
|
16
|
+
|
|
17
|
+
// One pasteable code, not two fields: base64url of {url, token}, since a popup gets one paste, not two boxes. `token`
|
|
18
|
+
// is single-use and expires in ten minutes; the prefix versions the format.
|
|
19
|
+
const PAIRING_PREFIX = "ixb1_";
|
|
20
|
+
|
|
21
|
+
const base64url = (value: string): string => btoa(value).replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
|
|
22
|
+
|
|
23
|
+
export const webextPairingCode = (pairing: { readonly url: string; readonly token: string }): string =>
|
|
24
|
+
`${PAIRING_PREFIX}${base64url(JSON.stringify({ url: pairing.url, token: pairing.token }))}`;
|
|
25
|
+
|
|
26
|
+
// The extension's side; undefined for anything not one of ours, so a bad paste is reported rather than attempted.
|
|
27
|
+
export const parseWebextPairingCode = (code: string): { readonly url: string; readonly token: string } | undefined => {
|
|
28
|
+
const trimmed = code.trim();
|
|
29
|
+
if (!trimmed.startsWith(PAIRING_PREFIX)) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const decoded = JSON.parse(atob(trimmed.slice(PAIRING_PREFIX.length).replaceAll("-", "+").replaceAll("_", "/"))) as {
|
|
34
|
+
url?: unknown;
|
|
35
|
+
token?: unknown;
|
|
36
|
+
};
|
|
37
|
+
// Checked here (http(s) URL, non-empty token) rather than left to the WebSocket constructor to throw.
|
|
38
|
+
if (typeof decoded.url !== "string" || typeof decoded.token !== "string" || decoded.token === "" || !/^https?:\/\//.test(decoded.url)) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
return { url: decoded.url, token: decoded.token };
|
|
42
|
+
} catch {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Window message the sandbox's page posts for its content script to pick up, not chrome.runtime.sendMessage, which
|
|
48
|
+
// would need the extension's store id baked into the web app.
|
|
49
|
+
export const WEBEXT_PAIR_MESSAGE = "intentic:webext:pair";
|
|
50
|
+
export const WEBEXT_PAIRED_MESSAGE = "intentic:webext:paired";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// Handshake on /system/webext/connect, the one message on that socket that isn't oRPC, same two-phase shape as
|
|
4
|
+
// host-protocol.ts. A separate protocol from host's, since the extension has no shell or filesystem, only tabs and
|
|
5
|
+
// origins the person granted one at a time.
|
|
6
|
+
|
|
7
|
+
/* HOW OFTEN THIS DOOR PINGS A CONNECTED BROWSER, read by both sides of the socket: the daemon's hub pings on
|
|
8
|
+
* it (webext/webext-peer.ts) and the extension presumes a link dead after a few of them pass in silence
|
|
9
|
+
* (peer-dial.ts's peerLinkSilenceMs). Tighter than the machine door's and the number is not a taste: an MV3
|
|
10
|
+
* service worker is killed after 30 seconds of inactivity and WebSocket traffic is what counts as activity, so
|
|
11
|
+
* a heartbeat at or above Chrome's own limit would race the browser into shutting the extension down between
|
|
12
|
+
* beats. One number, because the two sides disagreeing about it is either a browser dropped while healthy or
|
|
13
|
+
* one believed alive for as long as its socket happens to stay open. */
|
|
14
|
+
export const WEBEXT_HEARTBEAT_MS = 20_000;
|
|
15
|
+
|
|
16
|
+
export const WebExtHelloSchema = z.object({
|
|
17
|
+
type: z.literal("hello"),
|
|
18
|
+
// Enrollment token, in the first frame, never the URL: a WebSocket has no headers, and `?token=` would leak into
|
|
19
|
+
// proxy logs.
|
|
20
|
+
token: z.string(),
|
|
21
|
+
// Extension build per connection, so an outdated one is visible rather than mysteriously missing a tool.
|
|
22
|
+
version: z.string(),
|
|
23
|
+
});
|
|
24
|
+
export type WebExtHello = z.infer<typeof WebExtHelloSchema>;
|
package/src/schemas/activity.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Activity audit log schemas (historyRoot/activity.jsonl).
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { AgentOriginSchema } from "./agent.js";
|
|
4
|
-
// One provider-agnostic event per agent↔provider interaction, appended by the daemon
|
|
5
|
-
//
|
|
6
|
-
// is the first source; other cli providers reuse the same shape.
|
|
4
|
+
// One provider-agnostic event per agent↔provider interaction, appended only by the daemon; the log lives outside /work,
|
|
5
|
+
// so an agent can't read or rewrite its own trail.
|
|
7
6
|
|
|
8
7
|
export const ActivityEventSchema = z.object({
|
|
9
8
|
id: z.string().describe("The entry's own id."),
|
|
@@ -11,21 +10,17 @@ export const ActivityEventSchema = z.object({
|
|
|
11
10
|
at: z.number().describe("When it happened, in milliseconds. Also what you page by."),
|
|
12
11
|
// "discord", …; absent on provider-less system events (a cron automation.run).
|
|
13
12
|
provider: z.string().optional().describe("Which outside service, when one was involved. Absent for the sandbox's own events."),
|
|
14
|
-
// Which provider account handled
|
|
15
|
-
//
|
|
13
|
+
// Which provider account handled it; attribution key for per-account usage, absent on provider-less or
|
|
14
|
+
// default-account turns.
|
|
16
15
|
account: z
|
|
17
16
|
.string()
|
|
18
17
|
.optional()
|
|
19
18
|
.describe("Which account handled it. Absent for the sandbox's own events and for work run on a provider's default."),
|
|
20
19
|
direction: z.enum(["in", "out", "system"]).describe("Whether something arrived, something went out, or the sandbox did it to itself."),
|
|
21
|
-
// in: message.received
|
|
22
|
-
// out: message.send
|
|
23
|
-
// system: gateway.login_failed
|
|
24
|
-
//
|
|
25
|
-
// | rule.blocked_push | rule.held_work | rule.continued_turn (a rule DID something, see RuleSchema.
|
|
26
|
-
// Only the three outcomes a person would otherwise have no explanation for: a push that did not
|
|
27
|
-
// go, work that did not arrive, a turn that did not end. A rule that ran and passed says nothing,
|
|
28
|
-
// because a feed that logs every green check is one the eye learns to skip.)
|
|
20
|
+
// in: message.received, voice_utterance.received, voice_transcript.received
|
|
21
|
+
// out: message.send, reaction.add, messages.read, api.call (unclassified endpoint)
|
|
22
|
+
// system: gateway.login_failed, dispatch.failed, voice.session_started, voice.session_ended, automation.run,
|
|
23
|
+
// turn.started, turn.plan, turn.error, turn.completed, rule.blocked_push, rule.held_work, rule.continued_turn
|
|
29
24
|
type: z
|
|
30
25
|
.string()
|
|
31
26
|
.describe(
|
|
@@ -34,42 +29,41 @@ export const ActivityEventSchema = z.object({
|
|
|
34
29
|
channelId: z.string().optional().describe("Which channel or thread it happened in."),
|
|
35
30
|
// Inbound author display name.
|
|
36
31
|
author: z.string().optional().describe("Who sent it, for something that arrived."),
|
|
32
|
+
// Distinct from `author` (the relayed sender) and `account` (who served it); absent for an unasked wake.
|
|
33
|
+
actor: z
|
|
34
|
+
.string()
|
|
35
|
+
.optional()
|
|
36
|
+
.describe("Who asked for the turn, as the sandbox verified it: a member's email, or token:<label> for a program's control token. Absent for a wake nothing asked for."),
|
|
37
37
|
// Full message text (inbound) or sent payload content (outbound).
|
|
38
38
|
content: z.string().optional().describe("The message, in full, whichever direction it went."),
|
|
39
|
-
//
|
|
39
|
+
// HTTP method and endpoint path of an outgoing call; credentials ride headers, never the URL.
|
|
40
40
|
method: z.string().optional().describe("The verb of an outgoing call."),
|
|
41
41
|
endpoint: z.string().optional().describe("The address of an outgoing call. Credentials travel in headers, so they are never here."),
|
|
42
42
|
// The agent turn that made/handled it, the join key between an inbound wake and its outbound calls.
|
|
43
43
|
sessionId: z.string().optional().describe("The provider session behind it."),
|
|
44
|
-
|
|
45
|
-
* and read as five rows they say one thing five times, so the feed groups on this instead. It cannot be
|
|
46
|
-
* sessionId: the runtime does not mint one until the stream's first frame, which is AFTER turn.started, so
|
|
47
|
-
* the very event carrying the prompt is the one that could never be joined. Minted by the turn itself. */
|
|
44
|
+
// Ties one turn's events together; not sessionId, minted only after turn.started, too late for that event.
|
|
48
45
|
turnId: z
|
|
49
46
|
.string()
|
|
50
47
|
.optional()
|
|
51
48
|
.describe(
|
|
52
49
|
"Ties one turn's entries together. A turn writes several, and read as separate rows they say one thing several times, so a feed groups on this.",
|
|
53
50
|
),
|
|
54
|
-
//
|
|
55
|
-
// retires mid-conversation, so this, not sessionId, is what "the same agent" means across a feed.
|
|
51
|
+
// Outlives sessionId, retired by a provider switch; this is what "same agent" means across a feed.
|
|
56
52
|
conversationId: z
|
|
57
53
|
.string()
|
|
58
54
|
.optional()
|
|
59
55
|
.describe(
|
|
60
56
|
"Which conversation. This, rather than the provider session, is what the same agent means across a feed, because a session is retired whenever the model changes.",
|
|
61
57
|
),
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
// later. Absent on the first event of a fresh conversation, the auto-namer has not run yet.
|
|
58
|
+
// Denormalized title at write time, since the registry entry is prunable/renameable; absent before the auto-namer
|
|
59
|
+
// runs.
|
|
65
60
|
title: z
|
|
66
61
|
.string()
|
|
67
62
|
.optional()
|
|
68
63
|
.describe(
|
|
69
64
|
"What that conversation was called at the time. Copied in rather than looked up, because an audit entry must still read as words years later, after the conversation has been renamed or pruned.",
|
|
70
65
|
),
|
|
71
|
-
//
|
|
72
|
-
// called me" attribution, and how a turn is filed under Discord rather than under the runtime that served it.
|
|
66
|
+
// Files a turn under what caused it (e.g. Discord), not under the runtime that served it.
|
|
73
67
|
origin: AgentOriginSchema.optional().describe(
|
|
74
68
|
"What woke the conversation from outside, when something did. It is how a turn gets filed under the chat service that caused it rather than under the model that served it.",
|
|
75
69
|
),
|
|
@@ -91,10 +85,8 @@ export const ActivityQuerySchema = z.object({
|
|
|
91
85
|
});
|
|
92
86
|
export type ActivityQuery = z.infer<typeof ActivityQuerySchema>;
|
|
93
87
|
export const ActivityListSchema = z.object({ events: z.array(ActivityEventSchema).describe("The audit entries, newest first.") });
|
|
94
|
-
// Live connection health, probed per
|
|
95
|
-
//
|
|
96
|
-
// connection that should be up but isn't; pairing = the socket is up but the credential is a ceremony nobody
|
|
97
|
-
// has finished, which no amount of waiting fixes), lastError from the newest system-error event in the log.
|
|
88
|
+
// Live connection health, probed per capability, not stored; `gateway` from the client pool, `lastError` from the
|
|
89
|
+
// newest system-error event in the log.
|
|
98
90
|
export const ActivityConnectionSchema = z.object({
|
|
99
91
|
capabilityId: z.string().describe("Which connection."),
|
|
100
92
|
provider: z.string().describe("Which service it is."),
|