@intentic/sandbox-contract 1.247.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 +13 -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 +39 -4
- package/dist/contracts/personas.contract.d.ts.map +1 -1
- package/dist/contracts/personas.contract.js +10 -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 +6 -80
- 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 +10 -10
- 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 +464 -447
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -47
- 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} +2 -4
- package/dist/models/model-pins.d.ts.map +1 -0
- package/dist/models/model-pins.js +22 -0
- package/dist/models/model-pins.js.map +1 -0
- package/dist/{model-roles.d.ts → models/model-roles.d.ts} +25 -30
- package/dist/models/model-roles.d.ts.map +1 -0
- package/dist/{model-roles.js → models/model-roles.js} +30 -27
- 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 +17 -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 +49 -4
- package/dist/schemas/personas.d.ts.map +1 -1
- package/dist/schemas/personas.js +32 -5
- 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 +7 -5
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +18 -8
- 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 -5
- package/dist/state/workspace-state.d.ts.map +1 -0
- package/dist/{workspace-state.js → state/workspace-state.js} +25 -1
- 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 +22 -30
- 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 -88
- 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/models/model-pins.test.ts +87 -0
- 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 +145 -249
- 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 +85 -168
- 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 +177 -597
- 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 -173
- 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 +0 -45
- 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/schemas/context.d.ts +0 -30
- package/dist/schemas/context.d.ts.map +0 -1
- package/dist/schemas/context.js +0 -34
- package/dist/schemas/context.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.test.ts +0 -202
- package/src/model-pins.ts +0 -183
- package/src/model-roles.ts +0 -224
- 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/schemas/context.ts +0 -87
- 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 -1096
- /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/{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,202 @@
|
|
|
1
|
+
// The title a chat tab, fleet card and agent detail header show until a model names the conversation. Reads the prompt
|
|
2
|
+
// as prose first, stripping openers, quotes and fences, and cuts on a sentence or word boundary rather than truncating
|
|
3
|
+
// at a fixed length. Browser and daemon both call this so a prompt titles the same regardless of where it enters.
|
|
4
|
+
|
|
5
|
+
// Storage cap mirroring agents-registry MAX_TITLE_LENGTH and the rename input's maxlength.
|
|
6
|
+
const MAX_LENGTH = 80;
|
|
7
|
+
// Below this length a sentence-shaped cut is more likely an abbreviation (`e.g.`) than a real sentence.
|
|
8
|
+
const MIN_SENTENCE = 12;
|
|
9
|
+
// A word-boundary cut before this point strands a fragment; cutting mid-word beats a near-empty title.
|
|
10
|
+
const MIN_WORD_CUT = MAX_LENGTH * 0.6;
|
|
11
|
+
|
|
12
|
+
// Fence and quote markers; a fence toggles open/closed, so an unterminated one swallows the rest of the prompt.
|
|
13
|
+
const FENCE = /^\s*(?:```|~~~)/;
|
|
14
|
+
const QUOTE = /^\s*>/;
|
|
15
|
+
|
|
16
|
+
// Ways an ask opens without starting; stripped repeatedly, so `Hey, can you please …` unwinds one layer per pass.
|
|
17
|
+
const OPENERS: readonly RegExp[] = [
|
|
18
|
+
/^(?:hey|hi|hello|yo|ok|okay|so|well|also|btw|now|next|then)\b[\s,.:;!—–-]*/i,
|
|
19
|
+
/^(?:please|pls)\b[\s,.:;!—–-]*/i,
|
|
20
|
+
/^(?:can|could|would|will)\s+(?:you|u|we)\b\s*(?:please|pls)?[\s,.:;!—–-]*/i,
|
|
21
|
+
/^i(?:'d|\s+would)?\s+(?:want|need|like)\s+(?:you\s+)?to\b[\s,.:;!—–-]*/i,
|
|
22
|
+
/^(?:let'?s|lets)\b[\s,.:;!—–-]*/i,
|
|
23
|
+
/^we\s+(?:need|have|ought)\s+to\b[\s,.:;!—–-]*/i,
|
|
24
|
+
/^(?:quick\s+(?:one|question|q)|one\s+more\s+thing)\b[\s,.:;!—–-]*/i,
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
// Terminal punctuation followed by a break; keeps `v1.2` and `foo.ts` intact while still ending `Why is it red?`.
|
|
28
|
+
const SENTENCE_END = /[.!?](?=\s|$)/;
|
|
29
|
+
|
|
30
|
+
// Matches a first sentence reporting past work (`We just landed…`); that is scene-setting, not the ask.
|
|
31
|
+
const NARRATION =
|
|
32
|
+
/^(?:(?:recently|previously|earlier|today|yesterday|lately)[\s,]+)?(?:we|i)(?:'ve|'d|'m|'re)?(?:\s+(?:have|had|am|are|was|were|been|just|recently|already|earlier|previously|also|finally|now|currently|still))*\s+(?!(?:need|feed|speed|shed|heed|breed|bleed|embed|proceed|exceed|succeed)\b)(?:\w+ed|\w{3,}ing|built|wrote|rewrote|made|found|saw|thought|began|got|kept|put|set|sent|split|ran|did|redid|went|came|gave|held|hit|cut|let|read|understood|broke|chose|became|brought|spent|meant|lost|forgot|rebuilt|told|taught|stood|drew|grew|knew|threw|took|left|felt|hid)\b/i;
|
|
33
|
+
|
|
34
|
+
// Curated imperative verbs coding asks lead with, not full grammar: English underdetermines verb/noun forms.
|
|
35
|
+
const IMPERATIVE =
|
|
36
|
+
/^(?:add|fix|make|implement|create|build|write|rewrite|refactor|rename|remove|delete|drop|update|change|convert|migrate|move|extract|split|merge|rebase|revert|restore|wire|connect|integrate|support|handle|improve|clean|simplify|redesign|rework|rethink|investigate|analyze|analyse|debug|find|figure|check|verify|test|run|try|document|describe|explain|propose|design|draft|prepare|stop|prevent|ensure|allow|enable|disable|introduce|replace|swap|optimize|optimise|reduce|bump|upgrade|deploy|ship|release|adjust|tweak|polish|finish|complete|continue|extend|unify|dedupe|deduplicate|cache|persist|expose|hide|show|render|port|automate|wrap|inline|audit|review|profile|measure|instrument|validate|parse|generate|turn|look|think|come|consider|help|start|use|keep|avoid|teach|harden|tighten|localize|localise|translate)\b/i;
|
|
37
|
+
|
|
38
|
+
// An unmistakable ask: an instruction verb, or a question mark.
|
|
39
|
+
const isAsk = (sentence: string): boolean => sentence.endsWith("?") || IMPERATIVE.test(sentence);
|
|
40
|
+
|
|
41
|
+
const collapse = (text: string): string =>
|
|
42
|
+
text
|
|
43
|
+
.replaceAll(/[\p{Cc}\p{Cf}]+/gu, " ")
|
|
44
|
+
.replaceAll(/\s+/g, " ")
|
|
45
|
+
.trim();
|
|
46
|
+
|
|
47
|
+
// Prompt lines minus fenced code blocks and quoted lines; those are evidence attached to the ask, not the ask itself.
|
|
48
|
+
const proseLines = (prompt: string): string[] => {
|
|
49
|
+
const lines: string[] = [];
|
|
50
|
+
let fenced = false;
|
|
51
|
+
for (const line of prompt.split(/\r?\n/)) {
|
|
52
|
+
if (FENCE.test(line)) {
|
|
53
|
+
fenced = !fenced;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (!fenced && !QUOTE.test(line)) {
|
|
57
|
+
lines.push(line);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return lines;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Strips openers only when a multi-word remnant is left; a one-word remnant (`Hi there`) or an empty one means the line
|
|
64
|
+
// was pure greeting, so the original line stands or the caller reads on.
|
|
65
|
+
const withoutOpener = (line: string): string => {
|
|
66
|
+
let text = line;
|
|
67
|
+
for (let pass = 0; pass < OPENERS.length; pass++) {
|
|
68
|
+
const stripped = OPENERS.reduce((current, opener) => current.replace(opener, ""), text);
|
|
69
|
+
if (stripped === text) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
text = stripped;
|
|
73
|
+
}
|
|
74
|
+
const remnant = text.trim();
|
|
75
|
+
if (text === line || remnant === "") {
|
|
76
|
+
return text;
|
|
77
|
+
}
|
|
78
|
+
return remnant.includes(" ") ? text : line;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// A URL's last meaningful path segment, or the host when there is no path; a purely numeric last segment keeps the
|
|
82
|
+
// segment before it (`merge_requests/42`).
|
|
83
|
+
const shortUrl = (token: string): string => {
|
|
84
|
+
let url: URL;
|
|
85
|
+
try {
|
|
86
|
+
url = new URL(token);
|
|
87
|
+
} catch {
|
|
88
|
+
return token;
|
|
89
|
+
}
|
|
90
|
+
const segments = url.pathname.split("/").filter((segment) => segment !== "");
|
|
91
|
+
const last = segments.at(-1);
|
|
92
|
+
if (last === undefined) {
|
|
93
|
+
return url.hostname.replace(/^www\./, "");
|
|
94
|
+
}
|
|
95
|
+
const previous = segments.at(-2);
|
|
96
|
+
return /^\d+$/.test(last) && previous !== undefined ? `${previous}/${last}` : last;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// A path's basename once the path is deep enough that the leading segments are just scaffolding.
|
|
100
|
+
const shortPath = (token: string): string => {
|
|
101
|
+
const segments = token.replace(/^@/, "").split("/");
|
|
102
|
+
return segments.length > 2 ? (segments.findLast((segment) => segment !== "") ?? token) : token;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// Sets trailing punctuation aside across shortening a URL or path token and reattaches it after.
|
|
106
|
+
const shortReference = (token: string): string => {
|
|
107
|
+
const match = /^(.*?)([\s,.;:!?)\]]*)$/s.exec(token);
|
|
108
|
+
const core = match?.[1] ?? token;
|
|
109
|
+
const tail = match?.[2] ?? "";
|
|
110
|
+
if (/^https?:\/\//i.test(core)) {
|
|
111
|
+
return `${shortUrl(core)}${tail}`;
|
|
112
|
+
}
|
|
113
|
+
if (core.includes("/")) {
|
|
114
|
+
return `${shortPath(core)}${tail}`;
|
|
115
|
+
}
|
|
116
|
+
return token;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const collapseReferences = (text: string): string => text.split(" ").map(shortReference).join(" ");
|
|
120
|
+
|
|
121
|
+
const firstSentence = (text: string): string => {
|
|
122
|
+
const end = text.search(SENTENCE_END);
|
|
123
|
+
if (end < MIN_SENTENCE) {
|
|
124
|
+
return text;
|
|
125
|
+
}
|
|
126
|
+
// Keep `?`/`!`; drop a trailing `.` as noise on a title.
|
|
127
|
+
const terminator = text[end];
|
|
128
|
+
return terminator === "." ? text.slice(0, end) : text.slice(0, end + 1);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// Splits text into sentences with the same terminator rule as firstSentence; no abbreviation guard, since a fragment
|
|
132
|
+
// split at `e.g.` never starts with an imperative.
|
|
133
|
+
const sentencesOf = (text: string): string[] => {
|
|
134
|
+
const parts: string[] = [];
|
|
135
|
+
let rest = text;
|
|
136
|
+
while (rest !== "") {
|
|
137
|
+
const end = rest.search(SENTENCE_END);
|
|
138
|
+
if (end === -1) {
|
|
139
|
+
parts.push(rest);
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
parts.push(rest[end] === "." ? rest.slice(0, end) : rest.slice(0, end + 1));
|
|
143
|
+
rest = rest.slice(end + 1).trimStart();
|
|
144
|
+
}
|
|
145
|
+
return parts;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
// Cuts to MAX_LENGTH including the ellipsis: AgentTurnSchema.title enforces this as a hard cap, so appending `…` after
|
|
149
|
+
// truncating can exceed it. Falls back to a mid-word cut when no word boundary falls within MIN_WORD_CUT of the end.
|
|
150
|
+
const clamped = (text: string): string => {
|
|
151
|
+
if (text.length <= MAX_LENGTH) {
|
|
152
|
+
return text;
|
|
153
|
+
}
|
|
154
|
+
const cut = text.slice(0, MAX_LENGTH - 1);
|
|
155
|
+
const boundary = cut.lastIndexOf(" ");
|
|
156
|
+
const kept = boundary >= MIN_WORD_CUT ? cut.slice(0, boundary) : cut;
|
|
157
|
+
return `${kept.replace(/[\s,;:—–-]+$/, "")}…`;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// Capitalizes only when the first word is plain lowercase prose; an identifier, path or abbreviation keeps its casing.
|
|
161
|
+
const capitalized = (text: string): string => {
|
|
162
|
+
const [first = ""] = text.split(" ", 1);
|
|
163
|
+
if (!/^[a-z]/.test(first) || /[A-Z/.\\]/.test(first)) {
|
|
164
|
+
return text;
|
|
165
|
+
}
|
|
166
|
+
return `${text[0]?.toUpperCase() ?? ""}${text.slice(1)}`;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// Splits a plan's markdown into its heading and body; the heading is the one line naming the whole job rather than a
|
|
170
|
+
// step, so both browser and daemon title from it.
|
|
171
|
+
export const planParts = (text: string): { title?: string; body: string } => {
|
|
172
|
+
const match = /^\s*#{1,6}\s+(.+)/.exec(text);
|
|
173
|
+
if (match === null) {
|
|
174
|
+
return { body: text };
|
|
175
|
+
}
|
|
176
|
+
return { title: match[1]!.trim(), body: text.slice(match.index + match[0].length).trimStart() };
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// Derives a conversation's title from its opening prompt; never empty for a non-empty prompt, since a pure paste titles
|
|
180
|
+
// as its own first line.
|
|
181
|
+
export const deriveTitle = (prompt: string): string => {
|
|
182
|
+
const prose = proseLines(prompt)
|
|
183
|
+
.map(collapse)
|
|
184
|
+
.filter((line) => line !== "");
|
|
185
|
+
// Prose lines, openers stripped, letters required; first is the default title, rest matter only if narration.
|
|
186
|
+
const lines = prose.map(withoutOpener).filter((line) => /\p{L}/u.test(line));
|
|
187
|
+
const primary = lines[0];
|
|
188
|
+
if (primary !== undefined) {
|
|
189
|
+
// A narration head is scene-setting; look further for an unmistakable ask, else keep the narration.
|
|
190
|
+
const head = firstSentence(primary);
|
|
191
|
+
const ask = NARRATION.test(head)
|
|
192
|
+
? lines
|
|
193
|
+
.flatMap(sentencesOf)
|
|
194
|
+
.map(withoutOpener)
|
|
195
|
+
.find((sentence) => sentence !== head && isAsk(sentence))
|
|
196
|
+
: undefined;
|
|
197
|
+
return capitalized(clamped(firstSentence(collapseReferences(ask ?? primary))));
|
|
198
|
+
}
|
|
199
|
+
// Nothing had letters (code, quote or greeting only); title as the first raw line rather than leaving it blank.
|
|
200
|
+
const fallback = prose[0] ?? collapse(prompt.replaceAll(/^\s*(?:```|~~~).*$/gm, ""));
|
|
201
|
+
return clamped(collapseReferences(fallback === "" ? collapse(prompt) : fallback));
|
|
202
|
+
};
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { STATE_DIR } from "@intentic/constants";
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
|
-
import type { AgentEvent
|
|
3
|
+
import type { AgentEvent } from "../events/agent-events.js";
|
|
4
|
+
import type { TranscriptPatch, TranscriptRow } from "../events/transcript.js";
|
|
4
5
|
import { applyTranscriptPatch, foldTurn, TranscriptFold, userRow } from "./transcript-fold.js";
|
|
5
6
|
|
|
6
|
-
//
|
|
7
|
+
// Epoch ms stamped on the opening user row's sentAt.
|
|
7
8
|
const SENT_AT = 1_767_225_600_000;
|
|
8
9
|
const openingOf = (prompt: string): TranscriptRow[] => [userRow(prompt, SENT_AT, [])];
|
|
9
10
|
const foldOf = (prompt: string, events: readonly AgentEvent[]): TranscriptRow[] => foldTurn(openingOf(prompt), events);
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
* asserted here is what a chat shows live, what it shows reopened, and what the record holds: one set of rules,
|
|
13
|
-
* one set of tests. */
|
|
12
|
+
// The one fold every window and the stored record draw from; pins what a live, reopened and stored chat all show.
|
|
14
13
|
describe("foldTurn", () => {
|
|
15
|
-
/* The live bubble boundary: `text_end` retires the block that WROTE something, so the calls it introduced
|
|
16
|
-
* land in a fresh bubble under it, and the prose that reports them joins that same bubble. This is Claude
|
|
17
|
-
* Code's interleaving: says what it's about to do → the cards → what it found. */
|
|
18
14
|
it("retires a prose bubble at text_end so the calls it introduced land beneath it", () => {
|
|
19
15
|
const events: AgentEvent[] = [
|
|
20
16
|
{ kind: "delta", text: "I'll look" },
|
|
@@ -31,8 +27,6 @@ describe("foldTurn", () => {
|
|
|
31
27
|
]);
|
|
32
28
|
});
|
|
33
29
|
|
|
34
|
-
/* THE USER SPOKE MID-TURN, and the rows hold it where the turn took it. It closes the open bubble: what the
|
|
35
|
-
* agent says next is its answer to these words and belongs below them. */
|
|
36
30
|
it("writes a mid-turn steer down as a user row, with the answer to it beneath", () => {
|
|
37
31
|
const events: AgentEvent[] = [
|
|
38
32
|
{ kind: "delta", text: "on it" },
|
|
@@ -46,8 +40,6 @@ describe("foldTurn", () => {
|
|
|
46
40
|
]);
|
|
47
41
|
});
|
|
48
42
|
|
|
49
|
-
// A text_end on a bubble holding only cards is not a boundary: retiring there would split a card away from
|
|
50
|
-
// the prose that reports it, a shape the live stream never draws.
|
|
51
43
|
it("does not retire a bubble that has written no prose", () => {
|
|
52
44
|
const events: AgentEvent[] = [
|
|
53
45
|
{ kind: "tool_call", id: "t1", name: "Read", category: "read", status: "completed" },
|
|
@@ -71,17 +63,11 @@ describe("foldTurn", () => {
|
|
|
71
63
|
]);
|
|
72
64
|
});
|
|
73
65
|
|
|
74
|
-
// A card the turn died mid-call keeps `in_progress`: that is what happened, and claiming a completion it
|
|
75
|
-
// never reported would be the one thing a transcript must not invent.
|
|
76
66
|
it("leaves an unanswered call in progress", () => {
|
|
77
67
|
const events: AgentEvent[] = [{ kind: "tool_call", id: "t1", name: "Bash", category: "execute", status: "in_progress" }];
|
|
78
68
|
expect(foldOf("run", events).at(-1)?.tools?.[0]?.status).toBe("in_progress");
|
|
79
69
|
});
|
|
80
70
|
|
|
81
|
-
/* A DELEGATION: its calls and its thinking nest under the Agent card that spawned them, so a delegation
|
|
82
|
-
* reads as one unit rather than a leaf card. Its PROSE stays off the card: that card has nowhere to render
|
|
83
|
-
* prose, and the child's report already arrives as the card's own result content. The child's live state
|
|
84
|
-
* (the `subagent` frames) rides the same card. */
|
|
85
71
|
it("nests a subagent's calls, thinking and live state under the card that spawned them", () => {
|
|
86
72
|
const events: AgentEvent[] = [
|
|
87
73
|
{ kind: "delta", text: "delegating" },
|
|
@@ -106,8 +92,6 @@ describe("foldTurn", () => {
|
|
|
106
92
|
]);
|
|
107
93
|
});
|
|
108
94
|
|
|
109
|
-
// Its Agent card is not in this stream (a malformed log, or one level of a deeper spawn read on its own), so
|
|
110
|
-
// there is nothing to hang the child off, which is exactly what keeps a nested level out of the level above.
|
|
111
95
|
it("drops a subagent's frames when the card that spawned them is absent", () => {
|
|
112
96
|
const events: AgentEvent[] = [
|
|
113
97
|
{ kind: "delta", text: "delegating" },
|
|
@@ -116,9 +100,6 @@ describe("foldTurn", () => {
|
|
|
116
100
|
expect(foldOf("delegate", events).slice(1)).toEqual([{ role: "assistant", text: "delegating" }]);
|
|
117
101
|
});
|
|
118
102
|
|
|
119
|
-
// One subagent's own side of the same log: what the Subagents area renders while it runs. Read at the
|
|
120
|
-
// child's level its prose IS top-level, the parent's frames are not its business, and the parent's cards
|
|
121
|
-
// stay out: read at a subagent's own level a card is not that stream's.
|
|
122
103
|
it("reads one subagent's stream as a transcript of its own", () => {
|
|
123
104
|
const questions = [{ question: "Which?", header: "Pick", multiSelect: false, options: [{ label: "A", description: "a" }] }];
|
|
124
105
|
const events: AgentEvent[] = [
|
|
@@ -172,8 +153,6 @@ describe("foldTurn", () => {
|
|
|
172
153
|
]);
|
|
173
154
|
});
|
|
174
155
|
|
|
175
|
-
// End-of-turn accounting lands on the bubble the answer ended in, and closes the turn: a steered
|
|
176
|
-
// conversation's stream can carry several turns, and the next opens a fresh bubble below.
|
|
177
156
|
it("attaches the turn's usage to its last bubble and closes it", () => {
|
|
178
157
|
const events: AgentEvent[] = [
|
|
179
158
|
{ kind: "delta", text: "done" },
|
|
@@ -186,16 +165,11 @@ describe("foldTurn", () => {
|
|
|
186
165
|
]);
|
|
187
166
|
});
|
|
188
167
|
|
|
189
|
-
// Frames that are not transcript (init, the settle) carry no bubble of their own, so a turn that only
|
|
190
|
-
// emitted those folds to the prompt alone rather than an empty reply.
|
|
191
168
|
it("yields nothing but the prompt for a turn that said nothing", () => {
|
|
192
169
|
const events: AgentEvent[] = [{ kind: "init", model: "claude-opus-4" }, { kind: "done" }];
|
|
193
170
|
expect(foldOf("hi", events)).toEqual([{ role: "user", text: "hi", sentAt: SENT_AT }]);
|
|
194
171
|
});
|
|
195
172
|
|
|
196
|
-
/* A REFUSED TURN SAYS SO. The provider's answer to this one is an error frame and no prose at all, so folding
|
|
197
|
-
* only the two speakers left a question with no reply under it. The daemon's clause about what comes next
|
|
198
|
-
* rides the same line, so the reopened chat and the live one read the same. */
|
|
199
173
|
it("keeps what went wrong, as the notice line the turn ended on", () => {
|
|
200
174
|
const refusal = "Your organization has disabled Claude subscription access for Claude Code";
|
|
201
175
|
const events: AgentEvent[] = [{ kind: "delta", text: "I'll take a look" }, { kind: "error", message: refusal }, { kind: "done" }];
|
|
@@ -226,9 +200,6 @@ describe("foldTurn", () => {
|
|
|
226
200
|
});
|
|
227
201
|
});
|
|
228
202
|
|
|
229
|
-
/* AND SO DOES A TURN THAT RAN CHEAPER THAN THE MODEL ASKED FOR. Scrolling back a week later, "was THIS
|
|
230
|
-
* answer the cheap one" is the question, and only a row per routed turn can answer it. The offer rides
|
|
231
|
-
* along so the reopened line keeps its one press. A verdict that moved nothing writes nothing. */
|
|
232
203
|
it("writes down a turn that ran on a cheaper model, and nothing for a verdict that moved nothing", () => {
|
|
233
204
|
const routed: AgentEvent[] = [
|
|
234
205
|
{ kind: "tier", tier: "fast", score: 0.1, rules: ["easy-words"], model: "claude-haiku-4-5", routed: true },
|
|
@@ -246,7 +217,6 @@ describe("foldTurn", () => {
|
|
|
246
217
|
expect(foldOf("go", held).map((message) => message.role)).toEqual(["user", "assistant"]);
|
|
247
218
|
});
|
|
248
219
|
|
|
249
|
-
// What happened to the turn outside the model's words: a rebase, a landing, a compaction, each one line.
|
|
250
220
|
it("writes the turn's own events down as notices", () => {
|
|
251
221
|
const events: AgentEvent[] = [
|
|
252
222
|
{ kind: "worktree", branch: "agent/x", base: "abc1234", sync: { commits: 2, blocked: [] } },
|
|
@@ -269,7 +239,6 @@ describe("foldTurn", () => {
|
|
|
269
239
|
);
|
|
270
240
|
});
|
|
271
241
|
|
|
272
|
-
// The checkpoint and the daemon's notes land on the turn's own user row, where a reader finds them.
|
|
273
242
|
it("stamps the checkpoint and the preamble's notes on the turn's user row", () => {
|
|
274
243
|
const events: AgentEvent[] = [
|
|
275
244
|
{ kind: "checkpoint", id: "snap-1", index: 4 },
|
|
@@ -287,9 +256,6 @@ describe("foldTurn", () => {
|
|
|
287
256
|
});
|
|
288
257
|
});
|
|
289
258
|
|
|
290
|
-
/* THE CARD THE TURN PARKED ON, and the answer that released it. The card takes the open bubble and closes it,
|
|
291
|
-
* so the ask tool's own call (which trails its card) lands in the row beneath, with what the agent said once
|
|
292
|
-
* answered. The reply settles the card's status by the one derivation (card-status.ts). */
|
|
293
259
|
it("records the question a turn asked, with the picks that answered it, and closes the bubble on the card", () => {
|
|
294
260
|
const questions = [
|
|
295
261
|
{
|
|
@@ -318,9 +284,6 @@ describe("foldTurn", () => {
|
|
|
318
284
|
]);
|
|
319
285
|
});
|
|
320
286
|
|
|
321
|
-
// A card raised under prose that is still open joins that prose, the one row; the answer's continuation
|
|
322
|
-
// opens the next. A plan whose text IS the adjacent retired prose takes that row over instead of drawing
|
|
323
|
-
// the same markdown twice.
|
|
324
287
|
it("keeps the prose that led up to a card in the card's own row, and folds a repeated plan into its prose", () => {
|
|
325
288
|
const document = { path: "docs/plan.md", title: "Plan", markdown: "# Plan\n\n1. do it" };
|
|
326
289
|
const events: AgentEvent[] = [
|
|
@@ -343,10 +306,6 @@ describe("foldTurn", () => {
|
|
|
343
306
|
]);
|
|
344
307
|
});
|
|
345
308
|
|
|
346
|
-
/* A card nobody answered is nobody's decision: when the turn ends under it, it freezes as `cancelled`, with
|
|
347
|
-
* everything it was raised with intact — including the judge's sentence, which is what the user was actually
|
|
348
|
-
* reading when the turn died. (The sentence arrives ON the card now rather than as a later frame patched
|
|
349
|
-
* into it: it is the reason the card exists, so there was no card before it existed.) */
|
|
350
309
|
it("freezes a card nobody answered as cancelled when the turn ends, keeping what it was raised with", () => {
|
|
351
310
|
const events: AgentEvent[] = [
|
|
352
311
|
{ kind: "permission", requestId: "perm1", toolName: "Bash", title: "Claude wants to run pnpm test", explain: "Runs the test suite." },
|
|
@@ -366,35 +325,6 @@ describe("foldTurn", () => {
|
|
|
366
325
|
]);
|
|
367
326
|
});
|
|
368
327
|
|
|
369
|
-
// An offer's whole life is on its card: the click, the run showing itself living, and how the spend ended.
|
|
370
|
-
it("keeps an offer's decision, its stream and its receipt on the card that offered it", () => {
|
|
371
|
-
const offer = { slug: "research", name: "Research", publisher: "acme", description: "d", creditsPerRun: 3, request: "{}" };
|
|
372
|
-
const events: AgentEvent[] = [
|
|
373
|
-
{ kind: "service_offer", requestId: "s1", offer },
|
|
374
|
-
{ kind: "resolved", requestId: "s1", reply: { kind: "service_offer", requestId: "s1", approve: true } },
|
|
375
|
-
{ kind: "service_event", requestId: "s1", event: { event: "status", text: "searching" } },
|
|
376
|
-
{ kind: "service_receipt", requestId: "s1", outcome: "ok", credits: 3, remaining: 7 },
|
|
377
|
-
{ kind: "delta", text: "Found it." },
|
|
378
|
-
];
|
|
379
|
-
expect(foldOf("research", events).slice(1)).toEqual([
|
|
380
|
-
{
|
|
381
|
-
role: "assistant",
|
|
382
|
-
text: "",
|
|
383
|
-
serviceOffer: {
|
|
384
|
-
requestId: "s1",
|
|
385
|
-
offer,
|
|
386
|
-
status: "approved",
|
|
387
|
-
events: [{ event: "status", text: "searching" }],
|
|
388
|
-
receipt: { outcome: "ok", credits: 3, remaining: 7 },
|
|
389
|
-
},
|
|
390
|
-
},
|
|
391
|
-
{ role: "assistant", text: "Found it." },
|
|
392
|
-
]);
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
/* A GATED CREDENTIAL's card keeps WHO released it, not merely that something was approved: the approver is
|
|
396
|
-
* the whole point of the gate, and the reply cannot carry them (it is the daemon that verified the
|
|
397
|
-
* identity), so the receipt frame is the only place that name ever appears. */
|
|
398
328
|
it("keeps who released a gated credential on the card that asked for it", () => {
|
|
399
329
|
const offer = {
|
|
400
330
|
subject: "DATABASE_URL",
|
|
@@ -421,9 +351,6 @@ describe("foldTurn", () => {
|
|
|
421
351
|
]);
|
|
422
352
|
});
|
|
423
353
|
|
|
424
|
-
/* A release nobody answered is nobody's refusal. The deadline passing freezes the card `cancelled` and
|
|
425
|
-
* writes NO receipt, because "refused" would name a decision a person never made — the same split the
|
|
426
|
-
* gate's two refusal sentences make to the agent. */
|
|
427
354
|
it("freezes an unanswered release as nobody's decision, with no receipt", () => {
|
|
428
355
|
const offer = {
|
|
429
356
|
subject: "reddit",
|
|
@@ -439,7 +366,6 @@ describe("foldTurn", () => {
|
|
|
439
366
|
]);
|
|
440
367
|
});
|
|
441
368
|
|
|
442
|
-
// A turn the user stopped says so, after freezing whatever it was parked on.
|
|
443
369
|
it("writes a stop down after cancelling what the turn was waiting on", () => {
|
|
444
370
|
const events: AgentEvent[] = [
|
|
445
371
|
{ kind: "delta", text: "half" },
|
|
@@ -452,8 +378,7 @@ describe("foldTurn", () => {
|
|
|
452
378
|
});
|
|
453
379
|
});
|
|
454
380
|
|
|
455
|
-
|
|
456
|
-
* rows the fold holds, exactly, or the two drift and the reopened chat disagrees with the live one. */
|
|
381
|
+
// Patches applied to a window's rows must reproduce the fold's own rows exactly, or live and reopened chats drift.
|
|
457
382
|
describe("patches", () => {
|
|
458
383
|
const replay = (
|
|
459
384
|
opening: readonly TranscriptRow[],
|
|
@@ -516,7 +441,6 @@ describe("patches", () => {
|
|
|
516
441
|
]);
|
|
517
442
|
});
|
|
518
443
|
|
|
519
|
-
// A bubble the fold opened and never wrote into is dropped, and it was the last row, so nothing above moves.
|
|
520
444
|
it("drop an empty bubble the turn opened and abandoned", () => {
|
|
521
445
|
const events: AgentEvent[] = [
|
|
522
446
|
{ kind: "todos", items: [] },
|
|
@@ -528,8 +452,6 @@ describe("patches", () => {
|
|
|
528
452
|
expect(folded.map((row) => row.role)).toEqual(["user", "user"]);
|
|
529
453
|
});
|
|
530
454
|
|
|
531
|
-
// A patch carries a COPY: the row the fold keeps mutating afterwards must not reach back into a patch that
|
|
532
|
-
// was already handed out, or a slow reader applies a delta on top of text that already holds it.
|
|
533
455
|
it("carry copies, not the fold's own rows", () => {
|
|
534
456
|
const fold = new TranscriptFold(openingOf("go"));
|
|
535
457
|
const [appended] = fold.apply({ kind: "delta", text: "a" });
|