@hearsay-tools/squawk 0.18.0 → 0.19.0-pr4418.8633
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 +57 -1436
- package/dist/activity/publisher.d.ts +6 -4
- package/dist/activity/publisher.js +7 -8
- package/dist/activity/publisher.js.map +1 -1
- package/dist/activity/read-model.d.ts +6 -2
- package/dist/activity/read-model.js +23 -21
- package/dist/activity/read-model.js.map +1 -1
- package/dist/activity/requests.d.ts +8 -2
- package/dist/activity/requests.js +3 -3
- package/dist/activity/requests.js.map +1 -1
- package/dist/activity/tool-activity.d.ts +6 -8
- package/dist/activity/tool-activity.js +10 -6
- package/dist/activity/tool-activity.js.map +1 -1
- package/dist/activity/wait.d.ts +5 -11
- package/dist/activity/wait.js +12 -8
- package/dist/activity/wait.js.map +1 -1
- package/dist/agent-config/catalog.d.ts +6 -62
- package/dist/agent-config/catalog.js +20 -376
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/files.js.map +1 -1
- package/dist/agent-config/model-settings/shared.d.ts +2 -3
- package/dist/agent-config/model-settings/shared.js +2 -2
- package/dist/agent-config/model-settings/shared.js.map +1 -1
- package/dist/agent-config/models.d.ts +8 -5
- package/dist/agent-config/models.js +8 -27
- package/dist/agent-config/models.js.map +1 -1
- package/dist/agent-config/seed.d.ts +2 -2
- package/dist/agent-config/seed.js +7 -12
- package/dist/agent-config/seed.js.map +1 -1
- package/dist/agent-config/service.d.ts +8 -4
- package/dist/agent-config/service.js +12 -6
- package/dist/agent-config/service.js.map +1 -1
- package/dist/agent-config/validate.d.ts +1 -1
- package/dist/artifacts/cli.d.ts +2 -0
- package/dist/artifacts/cli.js +4 -3
- package/dist/artifacts/cli.js.map +1 -1
- package/dist/artifacts/removal-slot.d.ts +3 -0
- package/dist/artifacts/removal-slot.js +7 -0
- package/dist/artifacts/removal-slot.js.map +1 -0
- package/dist/artifacts/reports-index.d.ts +16 -6
- package/dist/artifacts/reports-index.js +38 -35
- package/dist/artifacts/reports-index.js.map +1 -1
- package/dist/artifacts/reports-watch.js +2 -3
- package/dist/artifacts/reports-watch.js.map +1 -1
- package/dist/artifacts/resolve.js +1 -2
- package/dist/artifacts/resolve.js.map +1 -1
- package/dist/artifacts/store.d.ts +1 -1
- package/dist/artifacts/store.js +4 -2
- package/dist/artifacts/store.js.map +1 -1
- package/dist/automations/agent-tools.d.ts +2 -0
- package/dist/automations/agent-tools.js +24 -0
- package/dist/automations/agent-tools.js.map +1 -0
- package/dist/automations/automation-cli.d.ts +2 -0
- package/dist/automations/automation-cli.js +15 -7
- package/dist/automations/automation-cli.js.map +1 -1
- package/dist/automations/coordinator.js +1 -2
- package/dist/automations/coordinator.js.map +1 -1
- package/dist/automations/enabled.d.ts +2 -0
- package/dist/automations/enabled.js +6 -0
- package/dist/automations/enabled.js.map +1 -0
- package/dist/automations/github-baseline.js +2 -0
- package/dist/automations/github-baseline.js.map +1 -1
- package/dist/automations/github-poller.d.ts +3 -0
- package/dist/automations/github-poller.js +6 -6
- package/dist/automations/github-poller.js.map +1 -1
- package/dist/automations/github-repository.d.ts +22 -0
- package/dist/automations/github-repository.js +46 -0
- package/dist/automations/github-repository.js.map +1 -0
- package/dist/automations/prompts.d.ts +1 -4
- package/dist/automations/prompts.js +23 -63
- package/dist/automations/prompts.js.map +1 -1
- package/dist/automations/schedule-runner.js +6 -7
- package/dist/automations/schedule-runner.js.map +1 -1
- package/dist/automations/scheduler.d.ts +5 -4
- package/dist/automations/scheduler.js +59 -14
- package/dist/automations/scheduler.js.map +1 -1
- package/dist/automations/service.d.ts +41 -16
- package/dist/automations/service.js +14 -9
- package/dist/automations/service.js.map +1 -1
- package/dist/automations/store.d.ts +2 -0
- package/dist/automations/store.js +42 -5
- package/dist/automations/store.js.map +1 -1
- package/dist/automations/task-template.js +18 -13
- package/dist/automations/task-template.js.map +1 -1
- package/dist/automations/tool-adapter.d.ts +6 -1
- package/dist/automations/tool-adapter.js +104 -10
- package/dist/automations/tool-adapter.js.map +1 -1
- package/dist/automations/tool-catalog.d.ts +119 -0
- package/dist/automations/tool-catalog.js +48 -0
- package/dist/automations/tool-catalog.js.map +1 -0
- package/dist/automations/tool-client.d.ts +9 -0
- package/dist/automations/tool-client.js +19 -0
- package/dist/automations/tool-client.js.map +1 -0
- package/dist/automations/tool-env.d.ts +1 -0
- package/dist/automations/tool-env.js +3 -0
- package/dist/automations/tool-env.js.map +1 -0
- package/dist/automations/tool-errors.d.ts +9 -0
- package/dist/automations/tool-errors.js +34 -0
- package/dist/automations/tool-errors.js.map +1 -0
- package/dist/automations/tool-github.d.ts +9 -0
- package/dist/automations/tool-github.js +9 -0
- package/dist/automations/tool-github.js.map +1 -0
- package/dist/automations/tool-session.d.ts +5 -0
- package/dist/automations/tool-session.js +19 -0
- package/dist/automations/tool-session.js.map +1 -0
- package/dist/automations/tool-timeout.d.ts +2 -0
- package/dist/automations/tool-timeout.js +22 -0
- package/dist/automations/tool-timeout.js.map +1 -0
- package/dist/automations/tools.d.ts +325 -0
- package/dist/automations/tools.js +30 -0
- package/dist/automations/tools.js.map +1 -0
- package/dist/autosave-cleanup.d.ts +4 -2
- package/dist/autosave-cleanup.js +32 -9
- package/dist/autosave-cleanup.js.map +1 -1
- package/dist/autosave-commit.d.ts +52 -0
- package/dist/autosave-commit.js +408 -0
- package/dist/autosave-commit.js.map +1 -0
- package/dist/autosave-git.d.ts +16 -9
- package/dist/autosave-git.js +144 -50
- package/dist/autosave-git.js.map +1 -1
- package/dist/autosave-holders.d.ts +3 -1
- package/dist/autosave-holders.js +7 -4
- package/dist/autosave-holders.js.map +1 -1
- package/dist/autosave-removal-slots.d.ts +6 -0
- package/dist/autosave-removal-slots.js +13 -0
- package/dist/autosave-removal-slots.js.map +1 -0
- package/dist/boot.d.ts +36 -0
- package/dist/boot.js +81 -0
- package/dist/boot.js.map +1 -0
- package/dist/built-in-cli-commands.d.ts +6 -0
- package/dist/built-in-cli-commands.js +156 -0
- package/dist/built-in-cli-commands.js.map +1 -0
- package/dist/built-in-launch-parts.d.ts +14 -0
- package/dist/built-in-launch-parts.js +54 -0
- package/dist/built-in-launch-parts.js.map +1 -0
- package/dist/built-in-run-slots.d.ts +12 -0
- package/dist/built-in-run-slots.js +28 -0
- package/dist/built-in-run-slots.js.map +1 -0
- package/dist/built-in-tool-definitions.d.ts +2 -0
- package/dist/built-in-tool-definitions.js +29 -0
- package/dist/built-in-tool-definitions.js.map +1 -0
- package/dist/built-in-tools.d.ts +3 -0
- package/dist/built-in-tools.js +11 -0
- package/dist/built-in-tools.js.map +1 -0
- package/dist/built-in-wait-kinds.d.ts +4 -0
- package/dist/built-in-wait-kinds.js +14 -0
- package/dist/built-in-wait-kinds.js.map +1 -0
- package/dist/ci-wait/client.d.ts +80 -20
- package/dist/ci-wait/client.js +44 -40
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +74 -722
- package/dist/ci-wait/controller.js +62 -178
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/errors.d.ts +11 -15
- package/dist/ci-wait/errors.js +32 -81
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/github.d.ts +52 -36
- package/dist/ci-wait/github.js +97 -83
- package/dist/ci-wait/github.js.map +1 -1
- package/dist/ci-wait/mcp.d.ts +1 -1
- package/dist/ci-wait/mcp.js +8 -6
- package/dist/ci-wait/mcp.js.map +1 -1
- package/dist/ci-wait/pr-wait-kind.d.ts +66 -0
- package/dist/ci-wait/pr-wait-kind.js +121 -0
- package/dist/ci-wait/pr-wait-kind.js.map +1 -0
- package/dist/ci-wait/progress.d.ts +2 -28
- package/dist/ci-wait/progress.js +3 -42
- package/dist/ci-wait/progress.js.map +1 -1
- package/dist/ci-wait/queued-checks.d.ts +15 -0
- package/dist/ci-wait/queued-checks.js +44 -0
- package/dist/ci-wait/queued-checks.js.map +1 -0
- package/dist/ci-wait/resource-pool.d.ts +17 -0
- package/dist/ci-wait/resource-pool.js +50 -0
- package/dist/ci-wait/resource-pool.js.map +1 -0
- package/dist/ci-wait/resources.d.ts +5 -8
- package/dist/ci-wait/resources.js +8 -42
- package/dist/ci-wait/resources.js.map +1 -1
- package/dist/ci-wait/supervisor.d.ts +5 -12
- package/dist/ci-wait/supervisor.js +147 -76
- package/dist/ci-wait/supervisor.js.map +1 -1
- package/dist/ci-wait/tool-catalog.d.ts +260 -0
- package/dist/ci-wait/tool-catalog.js +77 -0
- package/dist/ci-wait/tool-catalog.js.map +1 -0
- package/dist/ci-wait/tool-definition.d.ts +21 -0
- package/dist/ci-wait/tool-definition.js +9 -0
- package/dist/ci-wait/tool-definition.js.map +1 -0
- package/dist/ci-wait/tool-names.d.ts +3 -0
- package/dist/ci-wait/tool-names.js +13 -0
- package/dist/ci-wait/tool-names.js.map +1 -0
- package/dist/ci-wait/tool-registry.d.ts +68 -0
- package/dist/ci-wait/tool-registry.js +34 -0
- package/dist/ci-wait/tool-registry.js.map +1 -0
- package/dist/ci-wait/tools.d.ts +334 -632
- package/dist/ci-wait/tools.js +28 -191
- package/dist/ci-wait/tools.js.map +1 -1
- package/dist/cli-dispatch.d.ts +9 -10
- package/dist/cli-dispatch.js +100 -142
- package/dist/cli-dispatch.js.map +1 -1
- package/dist/config.d.ts +6 -43
- package/dist/config.js +52 -65
- package/dist/config.js.map +1 -1
- package/dist/contract/activity.d.ts +71 -56
- package/dist/contract/agent-config.d.ts +2 -16
- package/dist/contract/agent-input.d.ts +56 -0
- package/dist/contract/agent-profiles.d.ts +33 -201
- package/dist/contract/agent-tools.d.ts +51 -0
- package/dist/contract/ask-schema.d.ts +4 -2
- package/dist/contract/attachments.d.ts +2 -2
- package/dist/contract/attention.d.ts +9 -1
- package/dist/contract/automation-requests.d.ts +18 -54
- package/dist/contract/automation-schedule.d.ts +9 -0
- package/dist/contract/automation-storage.d.ts +22 -48
- package/dist/contract/automation-tool.d.ts +293 -0
- package/dist/contract/automations.d.ts +76 -159
- package/dist/contract/ci-wait.d.ts +25 -0
- package/dist/contract/config-requests.d.ts +6 -16
- package/dist/contract/control-locations.d.ts +1 -1
- package/dist/contract/conversations.d.ts +31 -2
- package/dist/contract/create-run-input.d.ts +62 -0
- package/dist/contract/delegation.d.ts +376 -152
- package/dist/contract/discovery.d.ts +29 -96
- package/dist/contract/events.d.ts +7 -6
- package/dist/contract/github.d.ts +0 -18
- package/dist/contract/handoff.d.ts +2 -2
- package/dist/contract/health.d.ts +74 -64
- package/dist/contract/index.d.ts +14 -5
- package/dist/contract/index.js +3798 -3398
- package/dist/contract/live-coordination.d.ts +30 -12
- package/dist/contract/live.d.ts +29 -0
- package/dist/contract/model-choices.d.ts +40 -0
- package/dist/contract/own-lookup.d.ts +5 -0
- package/dist/contract/per-runner-optional-strings.d.ts +3 -9
- package/dist/contract/projects.d.ts +1 -9
- package/dist/contract/provider-requests.d.ts +12 -46
- package/dist/contract/query-requests.d.ts +5 -8
- package/dist/contract/queued-messages.d.ts +35 -0
- package/dist/contract/reference-status.d.ts +19 -0
- package/dist/contract/repo-info.d.ts +12 -0
- package/dist/contract/repo.d.ts +3 -2
- package/dist/contract/run-predicates.d.ts +47 -3
- package/dist/contract/run-requests.d.ts +1 -9
- package/dist/contract/run-search.d.ts +18 -20
- package/dist/contract/run-status.d.ts +33 -0
- package/dist/contract/runner-install.d.ts +41 -0
- package/dist/contract/runner-skills.d.ts +59 -0
- package/dist/contract/runner.d.ts +14 -0
- package/dist/contract/runners.d.ts +150 -0
- package/dist/contract/runs.d.ts +609 -321
- package/dist/contract/scheduled-tasks.d.ts +3 -3
- package/dist/contract/session-context.d.ts +140 -0
- package/dist/contract/skills.d.ts +1 -33
- package/dist/contract/task-options.d.ts +1 -1
- package/dist/contract/tool-display.d.ts +8 -2
- package/dist/contract/ui-state-requests.d.ts +0 -4
- package/dist/contract/usage-limit-hold.d.ts +22 -0
- package/dist/contract/utf8.d.ts +2 -0
- package/dist/contract/wait-limits.d.ts +25 -0
- package/dist/contract/wait-tools.d.ts +669 -0
- package/dist/contract/waiting-on.d.ts +46 -0
- package/dist/contract/waits.d.ts +150 -515
- package/dist/contract/worker-outcome.d.ts +24 -0
- package/dist/contract/workflow-file.d.ts +4 -8
- package/dist/contract/workflow-requests.d.ts +1 -0
- package/dist/contract/workflows.d.ts +29 -52
- package/dist/contract/workspace-events.d.ts +28 -32
- package/dist/contract/workspace.d.ts +56 -179
- package/dist/core/acp/events.d.ts +63 -0
- package/dist/core/acp/events.js +344 -0
- package/dist/core/acp/events.js.map +1 -0
- package/dist/core/acp/protocol.d.ts +86 -0
- package/dist/core/acp/protocol.js +14 -0
- package/dist/core/acp/protocol.js.map +1 -0
- package/dist/core/acp/session.d.ts +101 -0
- package/dist/core/acp/session.js +322 -0
- package/dist/core/acp/session.js.map +1 -0
- package/dist/core/acp/transport.d.ts +38 -0
- package/dist/core/acp/transport.js +144 -0
- package/dist/core/acp/transport.js.map +1 -0
- package/dist/core/acp/usage.d.ts +3 -0
- package/dist/core/acp/usage.js +12 -0
- package/dist/core/acp/usage.js.map +1 -0
- package/dist/core/agent-config-notes.d.ts +5 -0
- package/dist/core/agent-config-notes.js +6 -0
- package/dist/core/agent-config-notes.js.map +1 -0
- package/dist/core/agent-env.d.ts +5 -2
- package/dist/core/agent-env.js +11 -29
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-profiles.d.ts +16 -33
- package/dist/core/agent-profiles.js +30 -80
- package/dist/core/agent-profiles.js.map +1 -1
- package/dist/core/agent-runner-values.d.ts +68 -0
- package/dist/core/agent-runner-values.js +111 -0
- package/dist/core/agent-runner-values.js.map +1 -0
- package/dist/core/agent-runner.d.ts +59 -71
- package/dist/core/agent-runner.js +3 -93
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/backend-detect.d.ts +17 -4
- package/dist/core/backend-detect.js +86 -153
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/browser-sign-in-error.d.ts +6 -0
- package/dist/core/browser-sign-in-error.js +18 -0
- package/dist/core/browser-sign-in-error.js.map +1 -0
- package/dist/core/cli-registry.d.ts +57 -0
- package/dist/core/cli-registry.js +22 -0
- package/dist/core/cli-registry.js.map +1 -0
- package/dist/core/github-request-limits.d.ts +9 -0
- package/dist/core/github-request-limits.js +13 -0
- package/dist/core/github-request-limits.js.map +1 -0
- package/dist/core/host-model-catalog.d.ts +2 -2
- package/dist/core/host-model-catalog.js +7 -16
- package/dist/core/host-model-catalog.js.map +1 -1
- package/dist/core/host-path.d.ts +5 -0
- package/dist/core/host-path.js +9 -0
- package/dist/core/host-path.js.map +1 -0
- package/dist/core/host-skill-catalog.d.ts +7 -0
- package/dist/core/host-skill-catalog.js +12 -0
- package/dist/core/host-skill-catalog.js.map +1 -0
- package/dist/core/json-guards.d.ts +3 -0
- package/dist/core/json-guards.js +8 -0
- package/dist/core/json-guards.js.map +1 -0
- package/dist/core/launch-registry.d.ts +50 -0
- package/dist/core/launch-registry.js +60 -0
- package/dist/core/launch-registry.js.map +1 -0
- package/dist/core/login-output.d.ts +5 -0
- package/dist/core/login-output.js +14 -0
- package/dist/core/login-output.js.map +1 -0
- package/dist/core/managed-cli-source.d.ts +23 -0
- package/dist/core/managed-cli-source.js +2 -0
- package/dist/core/managed-cli-source.js.map +1 -0
- package/dist/core/managed-session.d.ts +5 -0
- package/dist/core/managed-session.js +45 -3
- package/dist/core/managed-session.js.map +1 -1
- package/dist/core/mock-prompts.d.ts +63 -0
- package/dist/core/mock-prompts.js +64 -0
- package/dist/core/mock-prompts.js.map +1 -0
- package/dist/core/model-identity.d.ts +15 -20
- package/dist/core/model-identity.js +21 -31
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +3 -8
- package/dist/core/model-presets.js +16 -38
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/model-probe-spawn.d.ts +8 -0
- package/dist/core/model-probe-spawn.js +7 -0
- package/dist/core/model-probe-spawn.js.map +1 -0
- package/dist/core/model-probe-teardown.js +1 -1
- package/dist/core/model-probe-teardown.js.map +1 -1
- package/dist/core/native-mock.d.ts +6 -0
- package/dist/core/native-mock.js +26 -0
- package/dist/core/native-mock.js.map +1 -0
- package/dist/core/os-cgroup.d.ts +43 -0
- package/dist/core/os-cgroup.js +220 -0
- package/dist/core/os-cgroup.js.map +1 -0
- package/dist/core/os-win-job.d.ts +30 -0
- package/dist/core/os-win-job.js +80 -0
- package/dist/core/os-win-job.js.map +1 -0
- package/dist/core/own-lookup.d.ts +1 -0
- package/dist/core/own-lookup.js +2 -0
- package/dist/core/own-lookup.js.map +1 -0
- package/dist/core/pi-rpc-turn.d.ts +26 -11
- package/dist/core/pi-rpc-turn.js +49 -24
- package/dist/core/pi-rpc-turn.js.map +1 -1
- package/dist/core/pi-rpc-wire.d.ts +9 -4
- package/dist/core/pi-rpc-wire.js +29 -8
- package/dist/core/pi-rpc-wire.js.map +1 -1
- package/dist/core/process-ownership.d.ts +12 -0
- package/dist/core/process-ownership.js +33 -0
- package/dist/core/process-ownership.js.map +1 -0
- package/dist/core/process-stat.d.ts +51 -0
- package/dist/core/process-stat.js +141 -0
- package/dist/core/process-stat.js.map +1 -0
- package/dist/core/process-usage.d.ts +6 -1
- package/dist/core/process-usage.js +9 -3
- package/dist/core/process-usage.js.map +1 -1
- package/dist/core/product-env.d.ts +2 -6
- package/dist/core/product-env.js +3 -10
- package/dist/core/product-env.js.map +1 -1
- package/dist/core/project-agents-file.d.ts +6 -0
- package/dist/core/project-agents-file.js +18 -0
- package/dist/core/project-agents-file.js.map +1 -0
- package/dist/core/provider-auth.d.ts +10 -4
- package/dist/core/provider-auth.js +59 -220
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/provider-availability.d.ts +3 -1
- package/dist/core/provider-availability.js +1 -0
- package/dist/core/provider-availability.js.map +1 -1
- package/dist/core/provider-error.d.ts +21 -0
- package/dist/core/provider-error.js +32 -0
- package/dist/core/provider-error.js.map +1 -0
- package/dist/core/registry.d.ts +39 -0
- package/dist/core/registry.js +96 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/runner-cli.d.ts +10 -0
- package/dist/core/runner-cli.js +34 -0
- package/dist/core/runner-cli.js.map +1 -0
- package/dist/core/runner-config-files.d.ts +60 -0
- package/dist/core/runner-config-files.js +14 -0
- package/dist/core/runner-config-files.js.map +1 -0
- package/dist/core/runner-definition.d.ts +353 -0
- package/dist/core/runner-definition.js +5 -0
- package/dist/core/runner-definition.js.map +1 -0
- package/dist/core/runner-facts.d.ts +77 -111
- package/dist/core/runner-facts.js +32 -52
- package/dist/core/runner-facts.js.map +1 -1
- package/dist/core/runner-fields.d.ts +26 -0
- package/dist/core/runner-fields.js +52 -0
- package/dist/core/runner-fields.js.map +1 -0
- package/dist/core/runner-id-schema.d.ts +15 -0
- package/dist/core/runner-id-schema.js +30 -0
- package/dist/core/runner-id-schema.js.map +1 -0
- package/dist/core/runner-ids.d.ts +9 -0
- package/dist/core/runner-ids.js +10 -0
- package/dist/core/runner-ids.js.map +1 -0
- package/dist/core/runner-model-catalog.d.ts +11 -9
- package/dist/core/runner-model-catalog.js +46 -51
- package/dist/core/runner-model-catalog.js.map +1 -1
- package/dist/core/runner-model-settings.d.ts +10 -0
- package/dist/core/runner-model-settings.js +3 -0
- package/dist/core/runner-model-settings.js.map +1 -0
- package/dist/core/runner-registry.d.ts +60 -0
- package/dist/core/runner-registry.js +115 -0
- package/dist/core/runner-registry.js.map +1 -0
- package/dist/core/runner-runtime.d.ts +9 -0
- package/dist/core/runner-runtime.js +8 -1
- package/dist/core/runner-runtime.js.map +1 -1
- package/dist/core/runner-skill-catalog.d.ts +28 -0
- package/dist/core/runner-skill-catalog.js +91 -0
- package/dist/core/runner-skill-catalog.js.map +1 -0
- package/dist/core/runner-skill-reference.d.ts +26 -0
- package/dist/core/runner-skill-reference.js +43 -0
- package/dist/core/runner-skill-reference.js.map +1 -0
- package/dist/core/runner-tool-grants.d.ts +1 -1
- package/dist/core/runner-tool-grants.js +1 -1
- package/dist/core/runner-tool-grants.js.map +1 -1
- package/dist/core/secret-redaction.d.ts +2 -0
- package/dist/core/secret-redaction.js +11 -3
- package/dist/core/secret-redaction.js.map +1 -1
- package/dist/core/session-containment.d.ts +78 -0
- package/dist/core/session-containment.js +247 -0
- package/dist/core/session-containment.js.map +1 -0
- package/dist/core/session-descendants.d.ts +15 -0
- package/dist/core/session-descendants.js +95 -0
- package/dist/core/session-descendants.js.map +1 -0
- package/dist/core/session-process.d.ts +23 -7
- package/dist/core/session-process.js +158 -28
- package/dist/core/session-process.js.map +1 -1
- package/dist/core/skill-path-scope.d.ts +4 -0
- package/dist/core/skill-path-scope.js +28 -0
- package/dist/core/skill-path-scope.js.map +1 -0
- package/dist/core/skill-probe.d.ts +21 -0
- package/dist/core/skill-probe.js +105 -0
- package/dist/core/skill-probe.js.map +1 -0
- package/dist/core/skill-trigger.d.ts +14 -0
- package/dist/core/skill-trigger.js +38 -0
- package/dist/core/skill-trigger.js.map +1 -0
- package/dist/core/structured-output.d.ts +9 -0
- package/dist/core/structured-output.js +64 -0
- package/dist/core/structured-output.js.map +1 -0
- package/dist/core/ui-events.d.ts +15 -4
- package/dist/core/ui-events.js.map +1 -1
- package/dist/core/usage-limit.d.ts +3 -2
- package/dist/core/usage-limit.js +16 -2
- package/dist/core/usage-limit.js.map +1 -1
- package/dist/core/v1-text-coalescer.d.ts +1 -1
- package/dist/core/v1-text-coalescer.js +1 -1
- package/dist/core/v1-text-coalescer.js.map +1 -1
- package/dist/data-gitignore.js +3 -6
- package/dist/data-gitignore.js.map +1 -1
- package/dist/delegation/capacity.d.ts +16 -1
- package/dist/delegation/capacity.js +36 -12
- package/dist/delegation/capacity.js.map +1 -1
- package/dist/delegation/cli.d.ts +4 -0
- package/dist/delegation/cli.js +63 -44
- package/dist/delegation/cli.js.map +1 -1
- package/dist/delegation/context.d.ts +40 -5
- package/dist/delegation/context.js +101 -85
- package/dist/delegation/context.js.map +1 -1
- package/dist/delegation/conversation-send.d.ts +9 -13
- package/dist/delegation/conversation-send.js +31 -17
- package/dist/delegation/conversation-send.js.map +1 -1
- package/dist/delegation/conversations.d.ts +41 -2129
- package/dist/delegation/conversations.js +108 -113
- package/dist/delegation/conversations.js.map +1 -1
- package/dist/delegation/execution-identity.d.ts +83 -67
- package/dist/delegation/execution-identity.js +244 -67
- package/dist/delegation/execution-identity.js.map +1 -1
- package/dist/delegation/execution-settings.d.ts +1 -2
- package/dist/delegation/execution-settings.js.map +1 -1
- package/dist/delegation/family-end.d.ts +16 -0
- package/dist/delegation/family-end.js +114 -0
- package/dist/delegation/family-end.js.map +1 -0
- package/dist/delegation/identity-file-store.d.ts +1 -1
- package/dist/delegation/input.js.map +1 -1
- package/dist/delegation/owned-workspace-release.d.ts +8 -0
- package/dist/delegation/owned-workspace-release.js +9 -0
- package/dist/delegation/owned-workspace-release.js.map +1 -0
- package/dist/delegation/park-notice.d.ts +44 -10
- package/dist/delegation/park-notice.js +53 -17
- package/dist/delegation/park-notice.js.map +1 -1
- package/dist/delegation/policy.d.ts +26 -8
- package/dist/delegation/policy.js +60 -37
- package/dist/delegation/policy.js.map +1 -1
- package/dist/delegation/private-record-file.d.ts +7 -0
- package/dist/delegation/private-record-file.js +55 -0
- package/dist/delegation/private-record-file.js.map +1 -0
- package/dist/delegation/process-liveness.d.ts +9 -76
- package/dist/delegation/process-liveness.js +6 -145
- package/dist/delegation/process-liveness.js.map +1 -1
- package/dist/delegation/provision.d.ts +6 -4
- package/dist/delegation/provision.js +76 -46
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/questions.d.ts +16 -1
- package/dist/delegation/questions.js +31 -0
- package/dist/delegation/questions.js.map +1 -1
- package/dist/delegation/readiness.d.ts +4 -2
- package/dist/delegation/readiness.js +9 -7
- package/dist/delegation/readiness.js.map +1 -1
- package/dist/delegation/receipt-cache.d.ts +9 -0
- package/dist/delegation/receipt-cache.js +26 -0
- package/dist/delegation/receipt-cache.js.map +1 -0
- package/dist/delegation/removal-slot.d.ts +4 -0
- package/dist/delegation/removal-slot.js +20 -0
- package/dist/delegation/removal-slot.js.map +1 -0
- package/dist/delegation/results.d.ts +10 -2
- package/dist/delegation/results.js +40 -22
- package/dist/delegation/results.js.map +1 -1
- package/dist/delegation/retry-backoff.d.ts +7 -1
- package/dist/delegation/retry-backoff.js +6 -0
- package/dist/delegation/retry-backoff.js.map +1 -1
- package/dist/delegation/routes.d.ts +149 -29
- package/dist/delegation/routes.js +6 -6
- package/dist/delegation/routes.js.map +1 -1
- package/dist/delegation/scratch-cleanup.d.ts +1 -1
- package/dist/delegation/scratch-cleanup.js +18 -18
- package/dist/delegation/scratch-cleanup.js.map +1 -1
- package/dist/delegation/service.d.ts +50 -19
- package/dist/delegation/service.js +326 -182
- package/dist/delegation/service.js.map +1 -1
- package/dist/delegation/shared-workspace.d.ts +25 -0
- package/dist/delegation/shared-workspace.js +100 -0
- package/dist/delegation/shared-workspace.js.map +1 -0
- package/dist/delegation/task-discovery.js +9 -5
- package/dist/delegation/task-discovery.js.map +1 -1
- package/dist/delegation/transport.d.ts +141 -21
- package/dist/delegation/wait-kinds.d.ts +8 -0
- package/dist/delegation/wait-kinds.js +317 -0
- package/dist/delegation/wait-kinds.js.map +1 -0
- package/dist/delegation/windows-identity-store.d.ts +1 -1
- package/dist/delegation/windows-identity-store.js +1 -1
- package/dist/delegation/windows-identity-store.js.map +1 -1
- package/dist/delegation/worker-cleanup.d.ts +46 -11
- package/dist/delegation/worker-cleanup.js +260 -102
- package/dist/delegation/worker-cleanup.js.map +1 -1
- package/dist/delegation/worker-deletion-proof.d.ts +13 -0
- package/dist/delegation/worker-deletion-proof.js.map +1 -0
- package/dist/delegation/worker-executions.d.ts +72 -0
- package/dist/delegation/worker-executions.js +252 -0
- package/dist/delegation/worker-executions.js.map +1 -0
- package/dist/delegation/worker-resource-holders.d.ts +20 -0
- package/dist/delegation/worker-resource-holders.js +18 -0
- package/dist/delegation/worker-resource-holders.js.map +1 -0
- package/dist/delegation/workspace-git.d.ts +16 -0
- package/dist/delegation/workspace-git.js +61 -0
- package/dist/delegation/workspace-git.js.map +1 -0
- package/dist/delegation/workspace-kinds.d.ts +75 -0
- package/dist/delegation/workspace-kinds.js +122 -0
- package/dist/delegation/workspace-kinds.js.map +1 -0
- package/dist/delegation/workspace-record.d.ts +69 -0
- package/dist/delegation/workspace-record.js +124 -0
- package/dist/delegation/workspace-record.js.map +1 -0
- package/dist/delegation/workspace-removal.d.ts +28 -0
- package/dist/delegation/workspace-removal.js +376 -0
- package/dist/delegation/workspace-removal.js.map +1 -0
- package/dist/delegation/workspace-state.d.ts +65 -0
- package/dist/delegation/workspace-state.js +270 -0
- package/dist/delegation/workspace-state.js.map +1 -0
- package/dist/delegation/workspace-work.d.ts +35 -0
- package/dist/delegation/workspace-work.js +75 -0
- package/dist/delegation/workspace-work.js.map +1 -0
- package/dist/delegation/workspace.d.ts +5 -32
- package/dist/delegation/workspace.js +13 -417
- package/dist/delegation/workspace.js.map +1 -1
- package/dist/delegation/worktree-teardown.d.ts +8 -0
- package/dist/delegation/worktree-teardown.js +36 -0
- package/dist/delegation/worktree-teardown.js.map +1 -0
- package/dist/detached-process.d.ts +4 -43
- package/dist/detached-process.js +4 -210
- package/dist/detached-process.js.map +1 -1
- package/dist/discovery/catalog.d.ts +2 -9
- package/dist/discovery/catalog.js +1 -18
- package/dist/discovery/catalog.js.map +1 -1
- package/dist/discovery/choices.d.ts +10 -0
- package/dist/discovery/choices.js +21 -0
- package/dist/discovery/choices.js.map +1 -0
- package/dist/discovery/cli.d.ts +2 -0
- package/dist/discovery/cli.js +7 -2
- package/dist/discovery/cli.js.map +1 -1
- package/dist/features/jobs/cli.d.ts +4 -0
- package/dist/features/jobs/cli.js +79 -0
- package/dist/features/jobs/cli.js.map +1 -0
- package/dist/features/jobs/command.d.ts +9 -0
- package/dist/features/jobs/command.js +19 -0
- package/dist/features/jobs/command.js.map +1 -0
- package/dist/features/jobs/index.d.ts +11 -0
- package/dist/features/jobs/index.js +20 -0
- package/dist/features/jobs/index.js.map +1 -0
- package/dist/features/jobs/job.d.ts +107 -0
- package/dist/features/jobs/job.js +388 -0
- package/dist/features/jobs/job.js.map +1 -0
- package/dist/features/jobs/removal-slot.d.ts +14 -0
- package/dist/features/jobs/removal-slot.js +50 -0
- package/dist/features/jobs/removal-slot.js.map +1 -0
- package/dist/features/mcp/cli.d.ts +14 -0
- package/dist/features/mcp/cli.js +87 -0
- package/dist/features/mcp/cli.js.map +1 -0
- package/dist/features/mcp/index.d.ts +9 -0
- package/dist/features/mcp/index.js +13 -0
- package/dist/features/mcp/index.js.map +1 -0
- package/dist/features/mcp/stdio.d.ts +10 -0
- package/dist/features/mcp/stdio.js +41 -0
- package/dist/features/mcp/stdio.js.map +1 -0
- package/dist/features/mcp/tools.d.ts +19 -0
- package/dist/features/mcp/tools.js +476 -0
- package/dist/features/mcp/tools.js.map +1 -0
- package/dist/git-command.d.ts +43 -2
- package/dist/git-command.js +57 -4
- package/dist/git-command.js.map +1 -1
- package/dist/git-diff-base.d.ts +1 -1
- package/dist/git-private-index.js +1 -2
- package/dist/git-private-index.js.map +1 -1
- package/dist/git-refs.d.ts +1 -1
- package/dist/git-refs.js +1 -1
- package/dist/git-worktree-lock-helper.d.ts +23 -0
- package/dist/git-worktree-lock-helper.js +152 -30
- package/dist/git-worktree-lock-helper.js.map +1 -1
- package/dist/git-worktree-lock.d.ts +21 -4
- package/dist/git-worktree-lock.js +23 -14
- package/dist/git-worktree-lock.js.map +1 -1
- package/dist/git-worktree-release.d.ts +5 -9
- package/dist/git-worktree-release.js +5 -10
- package/dist/git-worktree-release.js.map +1 -1
- package/dist/git-worktree.d.ts +22 -55
- package/dist/git-worktree.js +225 -405
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +6 -6
- package/dist/handoff.js +18 -17
- package/dist/handoff.js.map +1 -1
- package/dist/headless-run.d.ts +4 -1
- package/dist/headless-run.js +27 -12
- package/dist/headless-run.js.map +1 -1
- package/dist/home/backup-args.d.ts +22 -0
- package/dist/home/backup-args.js +38 -0
- package/dist/home/backup-args.js.map +1 -0
- package/dist/home/boundary.js +4 -4
- package/dist/home/boundary.js.map +1 -1
- package/dist/home/command.d.ts +4 -4
- package/dist/home/command.js +9 -15
- package/dist/home/command.js.map +1 -1
- package/dist/home/deprecation.d.ts +2 -4
- package/dist/home/deprecation.js +2 -3
- package/dist/home/deprecation.js.map +1 -1
- package/dist/home/entry.d.ts +2 -4
- package/dist/home/entry.js +12 -12
- package/dist/home/entry.js.map +1 -1
- package/dist/home/home.d.ts +3 -4
- package/dist/home/home.js +5 -10
- package/dist/home/home.js.map +1 -1
- package/dist/home/identity.d.ts +5 -10
- package/dist/home/identity.js +3 -7
- package/dist/home/identity.js.map +1 -1
- package/dist/home/install-marker.js +6 -7
- package/dist/home/install-marker.js.map +1 -1
- package/dist/home/leases.js +1 -1
- package/dist/home/leases.js.map +1 -1
- package/dist/home/legacy-account-paths.js +0 -3
- package/dist/home/legacy-account-paths.js.map +1 -1
- package/dist/home/legacy-recovery.d.ts +2 -2
- package/dist/home/legacy-recovery.js +4 -9
- package/dist/home/legacy-recovery.js.map +1 -1
- package/dist/home/legacy-source.d.ts +2 -3
- package/dist/home/legacy-source.js +3 -6
- package/dist/home/legacy-source.js.map +1 -1
- package/dist/home/migrate.d.ts +1 -1
- package/dist/home/migrate.js +32 -19
- package/dist/home/migrate.js.map +1 -1
- package/dist/home/migration-accounts.d.ts +0 -2
- package/dist/home/migration-accounts.js +2 -11
- package/dist/home/migration-accounts.js.map +1 -1
- package/dist/home/migration-boot.d.ts +1 -2
- package/dist/home/migration-boot.js +5 -9
- package/dist/home/migration-boot.js.map +1 -1
- package/dist/home/migration-claim.js +1 -1
- package/dist/home/migration-claim.js.map +1 -1
- package/dist/home/migration-cli.js +4 -3
- package/dist/home/migration-cli.js.map +1 -1
- package/dist/home/migration-guard.js +1 -2
- package/dist/home/migration-guard.js.map +1 -1
- package/dist/home/migration-plan.d.ts +1 -1
- package/dist/home/migration-plan.js +5 -6
- package/dist/home/migration-plan.js.map +1 -1
- package/dist/home/private-files.js +3 -4
- package/dist/home/private-files.js.map +1 -1
- package/dist/home/process-identity.js +1 -1
- package/dist/home/process-identity.js.map +1 -1
- package/dist/home/protected-roots.d.ts +1 -1
- package/dist/home/protected-roots.js +3 -4
- package/dist/home/protected-roots.js.map +1 -1
- package/dist/home/recovery-watch.d.ts +1 -1
- package/dist/home/recovery-watch.js +3 -4
- package/dist/home/recovery-watch.js.map +1 -1
- package/dist/home/recovery.d.ts +3 -4
- package/dist/home/recovery.js +7 -9
- package/dist/home/recovery.js.map +1 -1
- package/dist/home/resolve.js +1 -2
- package/dist/home/resolve.js.map +1 -1
- package/dist/home/store.js +2 -2
- package/dist/home/store.js.map +1 -1
- package/dist/home/write-lock.js +1 -1
- package/dist/home/write-lock.js.map +1 -1
- package/dist/index.js +45 -30
- package/dist/index.js.map +1 -1
- package/dist/install-as-command.d.ts +1 -1
- package/dist/legacy-runs.d.ts +57 -0
- package/dist/legacy-runs.js +135 -0
- package/dist/legacy-runs.js.map +1 -0
- package/dist/managed-install/cli-archive.d.ts +4 -0
- package/dist/managed-install/cli-archive.js +89 -0
- package/dist/managed-install/cli-archive.js.map +1 -0
- package/dist/managed-install/cli-installation.d.ts +26 -0
- package/dist/managed-install/cli-installation.js +119 -0
- package/dist/managed-install/cli-installation.js.map +1 -0
- package/dist/managed-install/cli-manifest.d.ts +33 -0
- package/dist/managed-install/cli-manifest.js +57 -0
- package/dist/managed-install/cli-manifest.js.map +1 -0
- package/dist/managed-install/cli-storage.d.ts +45 -0
- package/dist/managed-install/cli-storage.js +212 -0
- package/dist/managed-install/cli-storage.js.map +1 -0
- package/dist/managed-install/launcher.d.ts +16 -0
- package/dist/managed-install/launcher.js +139 -0
- package/dist/managed-install/launcher.js.map +1 -0
- package/dist/managed-install/layout.d.ts +34 -0
- package/dist/managed-install/layout.js +43 -0
- package/dist/managed-install/layout.js.map +1 -0
- package/dist/managed-install/runtime-home.d.ts +8 -0
- package/dist/managed-install/runtime-home.js +14 -0
- package/dist/managed-install/runtime-home.js.map +1 -0
- package/dist/pack-check.d.ts +13 -1
- package/dist/pack-check.js +40 -1
- package/dist/pack-check.js.map +1 -1
- package/dist/paths.d.ts +16 -21
- package/dist/paths.js +38 -57
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +3 -10
- package/dist/planner.js +24 -78
- package/dist/planner.js.map +1 -1
- package/dist/plugin/acp.d.ts +15 -0
- package/dist/plugin/acp.js +12 -0
- package/dist/plugin/acp.js.map +1 -0
- package/dist/plugin/api.d.ts +46 -0
- package/dist/plugin/api.js +155 -0
- package/dist/plugin/api.js.map +1 -0
- package/dist/plugin/bundled-features.d.ts +11 -0
- package/dist/plugin/bundled-features.js +37 -0
- package/dist/plugin/bundled-features.js.map +1 -0
- package/dist/plugin/bundled-runners.d.ts +28 -0
- package/dist/plugin/bundled-runners.js +57 -0
- package/dist/plugin/bundled-runners.js.map +1 -0
- package/dist/plugin/cli.d.ts +5 -0
- package/dist/plugin/cli.js +55 -0
- package/dist/plugin/cli.js.map +1 -0
- package/dist/plugin/index.d.ts +14 -0
- package/dist/plugin/index.js +2 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/loader.d.ts +81 -0
- package/dist/plugin/loader.js +187 -0
- package/dist/plugin/loader.js.map +1 -0
- package/dist/plugin/managed-cli.d.ts +8 -0
- package/dist/plugin/managed-cli.js +9 -0
- package/dist/plugin/managed-cli.js.map +1 -0
- package/dist/plugin/model-settings.d.ts +8 -0
- package/dist/plugin/model-settings.js +8 -0
- package/dist/plugin/model-settings.js.map +1 -0
- package/dist/plugin/pi-rpc.d.ts +8 -0
- package/dist/plugin/pi-rpc.js +8 -0
- package/dist/plugin/pi-rpc.js.map +1 -0
- package/dist/plugin/resolve-hook.d.ts +21 -0
- package/dist/plugin/resolve-hook.js +53 -0
- package/dist/plugin/resolve-hook.js.map +1 -0
- package/dist/plugin/runner-kit.d.ts +41 -0
- package/dist/plugin/runner-kit.js +23 -0
- package/dist/plugin/runner-kit.js.map +1 -0
- package/dist/plugin/runtime.d.ts +38 -0
- package/dist/plugin/runtime.js +39 -0
- package/dist/plugin/runtime.js.map +1 -0
- package/dist/preview/agent-address.d.ts +1 -1
- package/dist/preview/agent-address.js +3 -3
- package/dist/preview/agent-address.js.map +1 -1
- package/dist/preview/agent-marker.js +11 -8
- package/dist/preview/agent-marker.js.map +1 -1
- package/dist/preview/agent-tools.d.ts +2 -0
- package/dist/preview/agent-tools.js +18 -0
- package/dist/preview/agent-tools.js.map +1 -0
- package/dist/preview/browser-launch.d.ts +2 -1
- package/dist/preview/browser-launch.js +16 -9
- package/dist/preview/browser-launch.js.map +1 -1
- package/dist/preview/cdp-proxy.d.ts +2 -2
- package/dist/preview/cdp-proxy.js +6 -7
- package/dist/preview/cdp-proxy.js.map +1 -1
- package/dist/preview/cdp.d.ts +4 -2
- package/dist/preview/cdp.js +43 -4
- package/dist/preview/cdp.js.map +1 -1
- package/dist/preview/chromium.d.ts +9 -5
- package/dist/preview/chromium.js +45 -14
- package/dist/preview/chromium.js.map +1 -1
- package/dist/preview/dev-server.d.ts +5 -2
- package/dist/preview/dev-server.js +84 -20
- package/dist/preview/dev-server.js.map +1 -1
- package/dist/preview/host.d.ts +17 -10
- package/dist/preview/host.js +31 -24
- package/dist/preview/host.js.map +1 -1
- package/dist/preview/registration.d.ts +1 -1
- package/dist/preview/registration.js +6 -6
- package/dist/preview/registration.js.map +1 -1
- package/dist/preview/run-tools.d.ts +3 -2
- package/dist/preview/run-tools.js +9 -8
- package/dist/preview/run-tools.js.map +1 -1
- package/dist/preview/session.js +13 -7
- package/dist/preview/session.js.map +1 -1
- package/dist/preview/tool-catalog.d.ts +146 -0
- package/dist/preview/tool-catalog.js +14 -0
- package/dist/preview/tool-catalog.js.map +1 -0
- package/dist/preview/tool-client.d.ts +8 -0
- package/dist/preview/tool-client.js +16 -0
- package/dist/preview/tool-client.js.map +1 -0
- package/dist/preview/tool-env.d.ts +2 -0
- package/dist/preview/tool-env.js +4 -0
- package/dist/preview/tool-env.js.map +1 -0
- package/dist/preview/tool-errors.d.ts +7 -0
- package/dist/preview/tool-errors.js +36 -0
- package/dist/preview/tool-errors.js.map +1 -0
- package/dist/preview/tool-session.d.ts +6 -0
- package/dist/preview/tool-session.js +9 -0
- package/dist/preview/tool-session.js.map +1 -0
- package/dist/preview/tools.d.ts +57 -0
- package/dist/preview/tools.js +18 -0
- package/dist/preview/tools.js.map +1 -0
- package/dist/process-wait/exit-file.d.ts +14 -9
- package/dist/process-wait/exit-file.js +23 -10
- package/dist/process-wait/exit-file.js.map +1 -1
- package/dist/process-wait/job-exit-file.d.ts +15 -0
- package/dist/process-wait/job-exit-file.js +49 -0
- package/dist/process-wait/job-exit-file.js.map +1 -0
- package/dist/process-wait/supervisor.d.ts +2 -2
- package/dist/process-wait/supervisor.js +12 -9
- package/dist/process-wait/supervisor.js.map +1 -1
- package/dist/project-commands.d.ts +1 -1
- package/dist/project-commands.js +4 -19
- package/dist/project-commands.js.map +1 -1
- package/dist/project-fence.d.ts +63 -0
- package/dist/project-fence.js +145 -0
- package/dist/project-fence.js.map +1 -0
- package/dist/project-migration/answer.d.ts +2 -0
- package/dist/project-migration/answer.js +7 -5
- package/dist/project-migration/answer.js.map +1 -1
- package/dist/project-migration/auto.d.ts +17 -14
- package/dist/project-migration/auto.js +72 -50
- package/dist/project-migration/auto.js.map +1 -1
- package/dist/project-migration/cli.js +3 -2
- package/dist/project-migration/cli.js.map +1 -1
- package/dist/project-migration/containment.d.ts +1 -1
- package/dist/project-migration/containment.js +7 -7
- package/dist/project-migration/containment.js.map +1 -1
- package/dist/project-migration/engine.d.ts +13 -1
- package/dist/project-migration/engine.js +19 -2
- package/dist/project-migration/engine.js.map +1 -1
- package/dist/project-migration/fresh.d.ts +1 -1
- package/dist/project-migration/fresh.js +2 -3
- package/dist/project-migration/fresh.js.map +1 -1
- package/dist/project-migration/journal.d.ts +8 -2
- package/dist/project-migration/journal.js +9 -2
- package/dist/project-migration/journal.js.map +1 -1
- package/dist/project-migration/live.d.ts +30 -5
- package/dist/project-migration/live.js +107 -8
- package/dist/project-migration/live.js.map +1 -1
- package/dist/project-migration/offline.d.ts +6 -4
- package/dist/project-migration/offline.js +8 -6
- package/dist/project-migration/offline.js.map +1 -1
- package/dist/project-migration/pending.d.ts +10 -0
- package/dist/project-migration/pending.js +57 -0
- package/dist/project-migration/pending.js.map +1 -0
- package/dist/project-migration/plan.d.ts +31 -2
- package/dist/project-migration/plan.js +154 -41
- package/dist/project-migration/plan.js.map +1 -1
- package/dist/project-migration/steps.js +63 -5
- package/dist/project-migration/steps.js.map +1 -1
- package/dist/project-paths.d.ts +10 -9
- package/dist/project-paths.js +24 -17
- package/dist/project-paths.js.map +1 -1
- package/dist/release/compatibility.d.ts +2 -2
- package/dist/release/compatibility.js +4 -4
- package/dist/release/compatibility.js.map +1 -1
- package/dist/release/manifests.d.ts +8 -18
- package/dist/release/manifests.js +14 -42
- package/dist/release/manifests.js.map +1 -1
- package/dist/release/publication.js +2 -2
- package/dist/release/publication.js.map +1 -1
- package/dist/release/snapshot.d.ts +3 -3
- package/dist/release/snapshot.js +3 -3
- package/dist/release/stable.d.ts +21 -2
- package/dist/release/stable.js +27 -2
- package/dist/release/stable.js.map +1 -1
- package/dist/remote-settings-cli.d.ts +5 -3
- package/dist/remote-settings-cli.js +10 -8
- package/dist/remote-settings-cli.js.map +1 -1
- package/dist/remote-settings.d.ts +1 -1
- package/dist/runners/antigravity/account-home.d.ts +3 -0
- package/dist/runners/antigravity/account-home.js +45 -0
- package/dist/runners/antigravity/account-home.js.map +1 -0
- package/dist/runners/antigravity/accounts.d.ts +14 -0
- package/dist/runners/antigravity/accounts.js +6 -0
- package/dist/runners/antigravity/accounts.js.map +1 -0
- package/dist/runners/antigravity/antigravity-model-catalog.d.ts +9 -0
- package/dist/runners/antigravity/antigravity-model-catalog.js +79 -0
- package/dist/runners/antigravity/antigravity-model-catalog.js.map +1 -0
- package/dist/runners/antigravity/antigravity-runner.d.ts +48 -0
- package/dist/runners/antigravity/antigravity-runner.js +29 -0
- package/dist/runners/antigravity/antigravity-runner.js.map +1 -0
- package/dist/runners/antigravity/antigravity-session.d.ts +115 -0
- package/dist/runners/antigravity/antigravity-session.js +702 -0
- package/dist/runners/antigravity/antigravity-session.js.map +1 -0
- package/dist/runners/antigravity/antigravity-skill-catalog.d.ts +9 -0
- package/dist/runners/antigravity/antigravity-skill-catalog.js +174 -0
- package/dist/runners/antigravity/antigravity-skill-catalog.js.map +1 -0
- package/dist/runners/antigravity/antigravity-ui-mapper.d.ts +17 -0
- package/dist/runners/antigravity/antigravity-ui-mapper.js +76 -0
- package/dist/runners/antigravity/antigravity-ui-mapper.js.map +1 -0
- package/dist/runners/antigravity/ask-question.d.ts +9 -0
- package/dist/runners/antigravity/ask-question.js +37 -0
- package/dist/runners/antigravity/ask-question.js.map +1 -0
- package/dist/runners/antigravity/browser-sign-in.d.ts +10 -0
- package/dist/runners/antigravity/browser-sign-in.js +127 -0
- package/dist/runners/antigravity/browser-sign-in.js.map +1 -0
- package/dist/runners/antigravity/cli.d.ts +23 -0
- package/dist/runners/antigravity/cli.js +31 -0
- package/dist/runners/antigravity/cli.js.map +1 -0
- package/dist/runners/antigravity/client-files.d.ts +5 -0
- package/dist/runners/antigravity/client-files.js +20 -0
- package/dist/runners/antigravity/client-files.js.map +1 -0
- package/dist/runners/antigravity/config-files.d.ts +2 -0
- package/dist/runners/antigravity/config-files.js +8 -0
- package/dist/runners/antigravity/config-files.js.map +1 -0
- package/dist/runners/antigravity/definition.d.ts +1 -0
- package/dist/runners/antigravity/definition.js +31 -0
- package/dist/runners/antigravity/definition.js.map +1 -0
- package/dist/runners/antigravity/detection.d.ts +14 -0
- package/dist/runners/antigravity/detection.js +12 -0
- package/dist/runners/antigravity/detection.js.map +1 -0
- package/dist/runners/antigravity/display.d.ts +11 -0
- package/dist/runners/antigravity/display.js +7 -0
- package/dist/runners/antigravity/display.js.map +1 -0
- package/dist/runners/antigravity/env.d.ts +3 -0
- package/dist/runners/antigravity/env.js +2 -0
- package/dist/runners/antigravity/env.js.map +1 -0
- package/dist/runners/antigravity/executable.d.ts +45 -0
- package/dist/runners/antigravity/executable.js +183 -0
- package/dist/runners/antigravity/executable.js.map +1 -0
- package/dist/runners/antigravity/extra-tools.d.ts +1 -0
- package/dist/runners/antigravity/extra-tools.js +2 -0
- package/dist/runners/antigravity/extra-tools.js.map +1 -0
- package/dist/runners/antigravity/facts.d.ts +26 -0
- package/dist/runners/antigravity/facts.js +25 -0
- package/dist/runners/antigravity/facts.js.map +1 -0
- package/dist/runners/antigravity/http-mcp.d.ts +14 -0
- package/dist/runners/antigravity/http-mcp.js +82 -0
- package/dist/runners/antigravity/http-mcp.js.map +1 -0
- package/dist/runners/antigravity/index.d.ts +6 -0
- package/dist/runners/antigravity/index.js +9 -0
- package/dist/runners/antigravity/index.js.map +1 -0
- package/dist/runners/antigravity/launch-args.d.ts +4 -0
- package/dist/runners/antigravity/launch-args.js +7 -0
- package/dist/runners/antigravity/launch-args.js.map +1 -0
- package/dist/runners/antigravity/login-probe.d.ts +9 -0
- package/dist/runners/antigravity/login-probe.js +55 -0
- package/dist/runners/antigravity/login-probe.js.map +1 -0
- package/dist/runners/antigravity/login.d.ts +5 -0
- package/dist/runners/antigravity/login.js +5 -0
- package/dist/runners/antigravity/login.js.map +1 -0
- package/dist/runners/antigravity/mcp-name.d.ts +2 -0
- package/dist/runners/antigravity/mcp-name.js +3 -0
- package/dist/runners/antigravity/mcp-name.js.map +1 -0
- package/dist/runners/antigravity/mock.d.ts +155 -0
- package/dist/runners/antigravity/mock.js +35 -0
- package/dist/runners/antigravity/mock.js.map +1 -0
- package/dist/runners/antigravity/model-settings.d.ts +2 -0
- package/dist/runners/antigravity/model-settings.js +4 -0
- package/dist/runners/antigravity/model-settings.js.map +1 -0
- package/dist/runners/antigravity/models.d.ts +5 -0
- package/dist/runners/antigravity/models.js +15 -0
- package/dist/runners/antigravity/models.js.map +1 -0
- package/dist/runners/antigravity/native-diagnostics.d.ts +4 -0
- package/dist/runners/antigravity/native-diagnostics.js +59 -0
- package/dist/runners/antigravity/native-diagnostics.js.map +1 -0
- package/dist/runners/antigravity/permissions.d.ts +4 -0
- package/dist/runners/antigravity/permissions.js +42 -0
- package/dist/runners/antigravity/permissions.js.map +1 -0
- package/dist/runners/antigravity/probe-process.d.ts +27 -0
- package/dist/runners/antigravity/probe-process.js +84 -0
- package/dist/runners/antigravity/probe-process.js.map +1 -0
- package/dist/runners/antigravity/runtime-env.d.ts +8 -0
- package/dist/runners/antigravity/runtime-env.js +30 -0
- package/dist/runners/antigravity/runtime-env.js.map +1 -0
- package/dist/runners/antigravity/spec-support.d.ts +2 -0
- package/dist/runners/antigravity/spec-support.js +23 -0
- package/dist/runners/antigravity/spec-support.js.map +1 -0
- package/dist/runners/antigravity/subagent-tracker.d.ts +50 -0
- package/dist/runners/antigravity/subagent-tracker.js +152 -0
- package/dist/runners/antigravity/subagent-tracker.js.map +1 -0
- package/dist/runners/antigravity/subagent-transcript.d.ts +41 -0
- package/dist/runners/antigravity/subagent-transcript.js +185 -0
- package/dist/runners/antigravity/subagent-transcript.js.map +1 -0
- package/dist/runners/antigravity/tool-normalization.d.ts +15 -0
- package/dist/runners/antigravity/tool-normalization.js +104 -0
- package/dist/runners/antigravity/tool-normalization.js.map +1 -0
- package/dist/runners/antigravity/tool-transcript.d.ts +85 -0
- package/dist/runners/antigravity/tool-transcript.js +274 -0
- package/dist/runners/antigravity/tool-transcript.js.map +1 -0
- package/dist/runners/antigravity/transcript-tailer.d.ts +56 -0
- package/dist/runners/antigravity/transcript-tailer.js +175 -0
- package/dist/runners/antigravity/transcript-tailer.js.map +1 -0
- package/dist/runners/antigravity/usage.d.ts +2 -0
- package/dist/runners/antigravity/usage.js +14 -0
- package/dist/runners/antigravity/usage.js.map +1 -0
- package/dist/runners/antigravity/wire-updates.d.ts +14 -0
- package/dist/runners/antigravity/wire-updates.js +50 -0
- package/dist/runners/antigravity/wire-updates.js.map +1 -0
- package/dist/runners/claude/accounts.d.ts +11 -0
- package/dist/runners/claude/accounts.js +10 -0
- package/dist/runners/claude/accounts.js.map +1 -0
- package/dist/runners/claude/claude-cli-runner.d.ts +89 -0
- package/dist/runners/claude/claude-cli-runner.js +895 -0
- package/dist/runners/claude/claude-cli-runner.js.map +1 -0
- package/dist/runners/claude/claude-executable.js +9 -0
- package/dist/runners/claude/claude-executable.js.map +1 -0
- package/dist/runners/claude/claude-forked-command.d.ts +36 -0
- package/dist/runners/claude/claude-forked-command.js +65 -0
- package/dist/runners/claude/claude-forked-command.js.map +1 -0
- package/dist/runners/claude/claude-model-catalog.d.ts +16 -0
- package/dist/runners/claude/claude-model-catalog.js +196 -0
- package/dist/runners/claude/claude-model-catalog.js.map +1 -0
- package/dist/runners/claude/claude-partial-messages.d.ts +32 -0
- package/dist/runners/claude/claude-partial-messages.js +129 -0
- package/dist/runners/claude/claude-partial-messages.js.map +1 -0
- package/dist/runners/claude/claude-setting-sources.d.ts +2 -0
- package/dist/runners/claude/claude-setting-sources.js +7 -0
- package/dist/runners/claude/claude-setting-sources.js.map +1 -0
- package/dist/runners/claude/claude-skill-catalog.d.ts +3 -0
- package/dist/runners/claude/claude-skill-catalog.js +30 -0
- package/dist/runners/claude/claude-skill-catalog.js.map +1 -0
- package/dist/runners/claude/claude-stream.d.ts +39 -0
- package/dist/runners/claude/claude-stream.js +108 -0
- package/dist/runners/claude/claude-stream.js.map +1 -0
- package/dist/runners/claude/claude-ui-mapper.d.ts +90 -0
- package/dist/runners/claude/claude-ui-mapper.js +878 -0
- package/dist/runners/claude/claude-ui-mapper.js.map +1 -0
- package/dist/runners/claude/cli.d.ts +15 -0
- package/dist/runners/claude/cli.js +8 -0
- package/dist/runners/claude/cli.js.map +1 -0
- package/dist/runners/claude/config-files.d.ts +10 -0
- package/dist/runners/claude/config-files.js +122 -0
- package/dist/runners/claude/config-files.js.map +1 -0
- package/dist/runners/claude/definition.d.ts +2 -0
- package/dist/runners/claude/definition.js +42 -0
- package/dist/runners/claude/definition.js.map +1 -0
- package/dist/runners/claude/detection.d.ts +12 -0
- package/dist/runners/claude/detection.js +17 -0
- package/dist/runners/claude/detection.js.map +1 -0
- package/dist/runners/claude/display.d.ts +12 -0
- package/dist/runners/claude/display.js +13 -0
- package/dist/runners/claude/display.js.map +1 -0
- package/dist/runners/claude/env.d.ts +4 -0
- package/dist/runners/claude/env.js +3 -0
- package/dist/runners/claude/env.js.map +1 -0
- package/dist/runners/claude/extra-tools.d.ts +3 -0
- package/dist/runners/claude/extra-tools.js +4 -0
- package/dist/runners/claude/extra-tools.js.map +1 -0
- package/dist/runners/claude/facts.d.ts +28 -0
- package/dist/runners/claude/facts.js +25 -0
- package/dist/runners/claude/facts.js.map +1 -0
- package/dist/runners/claude/index.d.ts +6 -0
- package/dist/runners/claude/index.js +9 -0
- package/dist/runners/claude/index.js.map +1 -0
- package/dist/runners/claude/login-probe.d.ts +4 -0
- package/dist/runners/claude/login-probe.js +16 -0
- package/dist/runners/claude/login-probe.js.map +1 -0
- package/dist/runners/claude/login.d.ts +7 -0
- package/dist/runners/claude/login.js +8 -0
- package/dist/runners/claude/login.js.map +1 -0
- package/dist/runners/claude/mock.d.ts +99 -0
- package/dist/runners/claude/mock.js +78 -0
- package/dist/runners/claude/mock.js.map +1 -0
- package/dist/runners/claude/model-settings.d.ts +2 -0
- package/dist/runners/claude/model-settings.js +11 -0
- package/dist/runners/claude/model-settings.js.map +1 -0
- package/dist/runners/claude/models.d.ts +3 -0
- package/dist/runners/claude/models.js +23 -0
- package/dist/runners/claude/models.js.map +1 -0
- package/dist/runners/claude/spec-support.d.ts +8 -0
- package/dist/runners/claude/spec-support.js +30 -0
- package/dist/runners/claude/spec-support.js.map +1 -0
- package/dist/runners/codex/accounts.d.ts +11 -0
- package/dist/runners/codex/accounts.js +8 -0
- package/dist/runners/codex/accounts.js.map +1 -0
- package/dist/runners/codex/cli.d.ts +15 -0
- package/dist/runners/codex/cli.js +8 -0
- package/dist/runners/codex/cli.js.map +1 -0
- package/dist/runners/codex/codex-app-server-runner.d.ts +62 -0
- package/dist/runners/codex/codex-app-server-runner.js +1230 -0
- package/dist/runners/codex/codex-app-server-runner.js.map +1 -0
- package/dist/runners/codex/codex-app-server-transport.d.ts +55 -0
- package/dist/runners/codex/codex-app-server-transport.js +198 -0
- package/dist/runners/codex/codex-app-server-transport.js.map +1 -0
- package/dist/runners/codex/codex-approvals.d.ts +12 -0
- package/dist/runners/codex/codex-approvals.js +180 -0
- package/dist/runners/codex/codex-approvals.js.map +1 -0
- package/dist/runners/codex/codex-hook-mapper.d.ts +15 -0
- package/dist/runners/codex/codex-hook-mapper.js +72 -0
- package/dist/runners/codex/codex-hook-mapper.js.map +1 -0
- package/dist/runners/codex/codex-model-catalog.d.ts +10 -0
- package/dist/runners/codex/codex-model-catalog.js +110 -0
- package/dist/runners/codex/codex-model-catalog.js.map +1 -0
- package/dist/runners/codex/codex-native-frames.d.ts +35 -0
- package/dist/runners/codex/codex-native-frames.js +80 -0
- package/dist/runners/codex/codex-native-frames.js.map +1 -0
- package/dist/runners/codex/codex-permissions.d.ts +13 -0
- package/dist/runners/codex/codex-permissions.js +34 -0
- package/dist/runners/codex/codex-permissions.js.map +1 -0
- package/dist/runners/codex/codex-skill-catalog.d.ts +3 -0
- package/dist/runners/codex/codex-skill-catalog.js +36 -0
- package/dist/runners/codex/codex-skill-catalog.js.map +1 -0
- package/dist/runners/codex/codex-stream-error.js.map +1 -0
- package/dist/runners/codex/codex-thread-config.d.ts +18 -0
- package/dist/runners/codex/codex-thread-config.js +30 -0
- package/dist/runners/codex/codex-thread-config.js.map +1 -0
- package/dist/runners/codex/codex-turn-config.d.ts +19 -0
- package/dist/runners/codex/codex-turn-config.js +30 -0
- package/dist/runners/codex/codex-turn-config.js.map +1 -0
- package/dist/runners/codex/codex-turn-outcome.d.ts +10 -0
- package/dist/runners/codex/codex-turn-outcome.js +35 -0
- package/dist/runners/codex/codex-turn-outcome.js.map +1 -0
- package/dist/runners/codex/codex-ui-mapper-state.d.ts +84 -0
- package/dist/runners/codex/codex-ui-mapper-state.js.map +1 -0
- package/dist/runners/codex/codex-ui-mapper.d.ts +44 -0
- package/dist/runners/codex/codex-ui-mapper.js +799 -0
- package/dist/runners/codex/codex-ui-mapper.js.map +1 -0
- package/dist/runners/codex/config-files.d.ts +10 -0
- package/dist/runners/codex/config-files.js +71 -0
- package/dist/runners/codex/config-files.js.map +1 -0
- package/dist/runners/codex/definition.d.ts +2 -0
- package/dist/runners/codex/definition.js +42 -0
- package/dist/runners/codex/definition.js.map +1 -0
- package/dist/runners/codex/detection.d.ts +8 -0
- package/dist/runners/codex/detection.js +14 -0
- package/dist/runners/codex/detection.js.map +1 -0
- package/dist/runners/codex/display.d.ts +12 -0
- package/dist/runners/codex/display.js +13 -0
- package/dist/runners/codex/display.js.map +1 -0
- package/dist/runners/codex/env.d.ts +4 -0
- package/dist/runners/codex/env.js +3 -0
- package/dist/runners/codex/env.js.map +1 -0
- package/dist/runners/codex/extra-tools.d.ts +3 -0
- package/dist/runners/codex/extra-tools.js +4 -0
- package/dist/runners/codex/extra-tools.js.map +1 -0
- package/dist/runners/codex/facts.d.ts +28 -0
- package/dist/runners/codex/facts.js +28 -0
- package/dist/runners/codex/facts.js.map +1 -0
- package/dist/runners/codex/index.d.ts +6 -0
- package/dist/runners/codex/index.js +9 -0
- package/dist/runners/codex/index.js.map +1 -0
- package/dist/runners/codex/login-probe.d.ts +4 -0
- package/dist/runners/codex/login-probe.js +30 -0
- package/dist/runners/codex/login-probe.js.map +1 -0
- package/dist/runners/codex/login.d.ts +7 -0
- package/dist/runners/codex/login.js +8 -0
- package/dist/runners/codex/login.js.map +1 -0
- package/dist/runners/codex/mock.d.ts +97 -0
- package/dist/runners/codex/mock.js +61 -0
- package/dist/runners/codex/mock.js.map +1 -0
- package/dist/runners/codex/model-settings.d.ts +2 -0
- package/dist/runners/codex/model-settings.js +16 -0
- package/dist/runners/codex/model-settings.js.map +1 -0
- package/dist/runners/codex/models.d.ts +3 -0
- package/dist/runners/codex/models.js +11 -0
- package/dist/runners/codex/models.js.map +1 -0
- package/dist/runners/codex/spec-support.d.ts +9 -0
- package/dist/runners/codex/spec-support.js +31 -0
- package/dist/runners/codex/spec-support.js.map +1 -0
- package/dist/runners/omp/accounts.d.ts +11 -0
- package/dist/runners/omp/accounts.js +11 -0
- package/dist/runners/omp/accounts.js.map +1 -0
- package/dist/runners/omp/agent-dir.d.ts +13 -0
- package/dist/runners/omp/agent-dir.js +33 -0
- package/dist/runners/omp/agent-dir.js.map +1 -0
- package/dist/runners/omp/cli.d.ts +13 -0
- package/dist/runners/omp/cli.js +9 -0
- package/dist/runners/omp/cli.js.map +1 -0
- package/dist/runners/omp/config-files.d.ts +10 -0
- package/dist/runners/omp/config-files.js +98 -0
- package/dist/runners/omp/config-files.js.map +1 -0
- package/dist/runners/omp/definition.d.ts +2 -0
- package/dist/runners/omp/definition.js +41 -0
- package/dist/runners/omp/definition.js.map +1 -0
- package/dist/runners/omp/detection.d.ts +8 -0
- package/dist/runners/omp/detection.js +12 -0
- package/dist/runners/omp/detection.js.map +1 -0
- package/dist/runners/omp/display.d.ts +11 -0
- package/dist/runners/omp/display.js +12 -0
- package/dist/runners/omp/display.js.map +1 -0
- package/dist/runners/omp/env.d.ts +4 -0
- package/dist/runners/omp/env.js +17 -0
- package/dist/runners/omp/env.js.map +1 -0
- package/dist/runners/omp/extra-tools.d.ts +3 -0
- package/dist/runners/omp/extra-tools.js +6 -0
- package/dist/runners/omp/extra-tools.js.map +1 -0
- package/dist/runners/omp/facts.d.ts +28 -0
- package/dist/runners/omp/facts.js +26 -0
- package/dist/runners/omp/facts.js.map +1 -0
- package/dist/runners/omp/index.d.ts +6 -0
- package/dist/runners/omp/index.js +9 -0
- package/dist/runners/omp/index.js.map +1 -0
- package/dist/runners/omp/login-probe.d.ts +13 -0
- package/dist/runners/omp/login-probe.js +25 -0
- package/dist/runners/omp/login-probe.js.map +1 -0
- package/dist/runners/omp/login.d.ts +8 -0
- package/dist/runners/omp/login.js +12 -0
- package/dist/runners/omp/login.js.map +1 -0
- package/dist/runners/omp/mock.d.ts +101 -0
- package/dist/runners/omp/mock.js +58 -0
- package/dist/runners/omp/mock.js.map +1 -0
- package/dist/runners/omp/models.d.ts +3 -0
- package/dist/runners/omp/models.js +11 -0
- package/dist/runners/omp/models.js.map +1 -0
- package/dist/runners/omp/omp-ci-wait.mjs +27 -0
- package/dist/runners/omp/omp-model-catalog.d.ts +35 -0
- package/dist/runners/omp/omp-model-catalog.js +176 -0
- package/dist/runners/omp/omp-model-catalog.js.map +1 -0
- package/dist/runners/omp/omp-runner.d.ts +92 -0
- package/dist/runners/omp/omp-runner.js +809 -0
- package/dist/runners/omp/omp-runner.js.map +1 -0
- package/dist/runners/omp/omp-skill-catalog.d.ts +3 -0
- package/dist/runners/omp/omp-skill-catalog.js +23 -0
- package/dist/runners/omp/omp-skill-catalog.js.map +1 -0
- package/dist/runners/omp/omp-subagent-rows.d.ts +21 -0
- package/dist/runners/omp/omp-subagent-rows.js +100 -0
- package/dist/runners/omp/omp-subagent-rows.js.map +1 -0
- package/dist/runners/omp/omp-ui-mapper.d.ts +112 -0
- package/dist/runners/omp/omp-ui-mapper.js +826 -0
- package/dist/runners/omp/omp-ui-mapper.js.map +1 -0
- package/dist/runners/omp/spec-support.d.ts +9 -0
- package/dist/runners/omp/spec-support.js +35 -0
- package/dist/runners/omp/spec-support.js.map +1 -0
- package/dist/runners/opencode/accounts.d.ts +11 -0
- package/dist/runners/opencode/accounts.js +10 -0
- package/dist/runners/opencode/accounts.js.map +1 -0
- package/dist/runners/opencode/cli.d.ts +16 -0
- package/dist/runners/opencode/cli.js +8 -0
- package/dist/runners/opencode/cli.js.map +1 -0
- package/dist/runners/opencode/config-files.d.ts +10 -0
- package/dist/runners/opencode/config-files.js +70 -0
- package/dist/runners/opencode/config-files.js.map +1 -0
- package/dist/runners/opencode/definition.d.ts +2 -0
- package/dist/runners/opencode/definition.js +42 -0
- package/dist/runners/opencode/definition.js.map +1 -0
- package/dist/runners/opencode/detection.d.ts +8 -0
- package/dist/runners/opencode/detection.js +12 -0
- package/dist/runners/opencode/detection.js.map +1 -0
- package/dist/runners/opencode/display.d.ts +11 -0
- package/dist/runners/opencode/display.js +12 -0
- package/dist/runners/opencode/display.js.map +1 -0
- package/dist/runners/opencode/env.d.ts +4 -0
- package/dist/runners/opencode/env.js +4 -0
- package/dist/runners/opencode/env.js.map +1 -0
- package/dist/runners/opencode/extra-tools.d.ts +3 -0
- package/dist/runners/opencode/extra-tools.js +4 -0
- package/dist/runners/opencode/extra-tools.js.map +1 -0
- package/dist/runners/opencode/facts.d.ts +28 -0
- package/dist/runners/opencode/facts.js +25 -0
- package/dist/runners/opencode/facts.js.map +1 -0
- package/dist/runners/opencode/index.d.ts +6 -0
- package/dist/runners/opencode/index.js +9 -0
- package/dist/runners/opencode/index.js.map +1 -0
- package/dist/runners/opencode/login-probe.d.ts +4 -0
- package/dist/runners/opencode/login-probe.js +31 -0
- package/dist/runners/opencode/login-probe.js.map +1 -0
- package/dist/runners/opencode/login.d.ts +7 -0
- package/dist/runners/opencode/login.js +8 -0
- package/dist/runners/opencode/login.js.map +1 -0
- package/dist/runners/opencode/mock.d.ts +111 -0
- package/dist/runners/opencode/mock.js +65 -0
- package/dist/runners/opencode/mock.js.map +1 -0
- package/dist/runners/opencode/model-settings.d.ts +2 -0
- package/dist/runners/opencode/model-settings.js +8 -0
- package/dist/runners/opencode/model-settings.js.map +1 -0
- package/dist/runners/opencode/models.d.ts +3 -0
- package/dist/runners/opencode/models.js +10 -0
- package/dist/runners/opencode/models.js.map +1 -0
- package/dist/runners/opencode/opencode-http.d.ts +3 -0
- package/dist/runners/opencode/opencode-http.js +32 -0
- package/dist/runners/opencode/opencode-http.js.map +1 -0
- package/dist/runners/opencode/opencode-minimal.d.ts +42 -0
- package/dist/runners/opencode/opencode-minimal.js +57 -0
- package/dist/runners/opencode/opencode-minimal.js.map +1 -0
- package/dist/runners/opencode/opencode-model-catalog.d.ts +26 -0
- package/dist/runners/opencode/opencode-model-catalog.js +188 -0
- package/dist/runners/opencode/opencode-model-catalog.js.map +1 -0
- package/dist/runners/opencode/opencode-permissions.d.ts +51 -0
- package/dist/runners/opencode/opencode-permissions.js +101 -0
- package/dist/runners/opencode/opencode-permissions.js.map +1 -0
- package/dist/runners/opencode/opencode-questions.d.ts +3 -0
- package/dist/runners/opencode/opencode-questions.js +66 -0
- package/dist/runners/opencode/opencode-questions.js.map +1 -0
- package/dist/runners/opencode/opencode-runtime-config.d.ts +12 -0
- package/dist/runners/opencode/opencode-runtime-config.js +37 -0
- package/dist/runners/opencode/opencode-runtime-config.js.map +1 -0
- package/dist/runners/opencode/opencode-server-runner.d.ts +78 -0
- package/dist/runners/opencode/opencode-server-runner.js +1623 -0
- package/dist/runners/opencode/opencode-server-runner.js.map +1 -0
- package/dist/runners/opencode/opencode-session-error.d.ts +28 -0
- package/dist/runners/opencode/opencode-session-error.js +87 -0
- package/dist/runners/opencode/opencode-session-error.js.map +1 -0
- package/dist/runners/opencode/opencode-skill-catalog.d.ts +3 -0
- package/dist/runners/opencode/opencode-skill-catalog.js +36 -0
- package/dist/runners/opencode/opencode-skill-catalog.js.map +1 -0
- package/dist/runners/opencode/opencode-task-scope.js +19 -0
- package/dist/runners/opencode/opencode-task-scope.js.map +1 -0
- package/dist/runners/opencode/opencode-task-scope.mjs +59 -0
- package/dist/runners/opencode/opencode-ui-mapper-state.d.ts +82 -0
- package/dist/runners/opencode/opencode-ui-mapper-state.js.map +1 -0
- package/dist/runners/opencode/opencode-ui-mapper.d.ts +23 -0
- package/dist/runners/opencode/opencode-ui-mapper.js +760 -0
- package/dist/runners/opencode/opencode-ui-mapper.js.map +1 -0
- package/dist/runners/opencode/opencode-usage.d.ts +32 -0
- package/dist/runners/opencode/opencode-usage.js.map +1 -0
- package/dist/runners/opencode/spec-support.d.ts +9 -0
- package/dist/runners/opencode/spec-support.js +31 -0
- package/dist/runners/opencode/spec-support.js.map +1 -0
- package/dist/runners/pi/accounts.d.ts +11 -0
- package/dist/runners/pi/accounts.js +8 -0
- package/dist/runners/pi/accounts.js.map +1 -0
- package/dist/runners/pi/cli.d.ts +13 -0
- package/dist/runners/pi/cli.js +8 -0
- package/dist/runners/pi/cli.js.map +1 -0
- package/dist/runners/pi/config-files.d.ts +10 -0
- package/dist/runners/pi/config-files.js +73 -0
- package/dist/runners/pi/config-files.js.map +1 -0
- package/dist/runners/pi/definition.d.ts +2 -0
- package/dist/runners/pi/definition.js +42 -0
- package/dist/runners/pi/definition.js.map +1 -0
- package/dist/runners/pi/detection.d.ts +8 -0
- package/dist/runners/pi/detection.js +13 -0
- package/dist/runners/pi/detection.js.map +1 -0
- package/dist/runners/pi/display.d.ts +12 -0
- package/dist/runners/pi/display.js +13 -0
- package/dist/runners/pi/display.js.map +1 -0
- package/dist/runners/pi/env.d.ts +4 -0
- package/dist/runners/pi/env.js +15 -0
- package/dist/runners/pi/env.js.map +1 -0
- package/dist/runners/pi/extensions/pi-ci-wait.mjs +10 -0
- package/dist/runners/pi/extensions/pi-default-tools.mjs +22 -0
- package/dist/runners/pi/extensions/pi-retry-degraded-service.mjs +26 -0
- package/dist/runners/pi/extensions/pi-runaway-reply-guard.mjs +34 -0
- package/dist/runners/pi/extra-tools.d.ts +3 -0
- package/dist/runners/pi/extra-tools.js +7 -0
- package/dist/runners/pi/extra-tools.js.map +1 -0
- package/dist/runners/pi/facts.d.ts +28 -0
- package/dist/runners/pi/facts.js +24 -0
- package/dist/runners/pi/facts.js.map +1 -0
- package/dist/runners/pi/index.d.ts +6 -0
- package/dist/runners/pi/index.js +9 -0
- package/dist/runners/pi/index.js.map +1 -0
- package/dist/runners/pi/login-probe.d.ts +4 -0
- package/dist/runners/pi/login-probe.js +17 -0
- package/dist/runners/pi/login-probe.js.map +1 -0
- package/dist/runners/pi/login.d.ts +7 -0
- package/dist/runners/pi/login.js +8 -0
- package/dist/runners/pi/login.js.map +1 -0
- package/dist/runners/pi/mock.d.ts +86 -0
- package/dist/runners/pi/mock.js +53 -0
- package/dist/runners/pi/mock.js.map +1 -0
- package/dist/runners/pi/model-settings.d.ts +2 -0
- package/dist/runners/pi/model-settings.js +38 -0
- package/dist/runners/pi/model-settings.js.map +1 -0
- package/dist/runners/pi/models.d.ts +3 -0
- package/dist/runners/pi/models.js +17 -0
- package/dist/runners/pi/models.js.map +1 -0
- package/dist/runners/pi/pi-args.d.ts +5 -0
- package/dist/runners/pi/pi-args.js +10 -0
- package/dist/runners/pi/pi-args.js.map +1 -0
- package/dist/runners/pi/pi-model-catalog.d.ts +30 -0
- package/dist/runners/pi/pi-model-catalog.js +242 -0
- package/dist/runners/pi/pi-model-catalog.js.map +1 -0
- package/dist/runners/pi/pi-runner.d.ts +53 -0
- package/dist/runners/pi/pi-runner.js +599 -0
- package/dist/runners/pi/pi-runner.js.map +1 -0
- package/dist/runners/pi/pi-skill-catalog.d.ts +3 -0
- package/dist/runners/pi/pi-skill-catalog.js +34 -0
- package/dist/runners/pi/pi-skill-catalog.js.map +1 -0
- package/dist/runners/pi/pi-ui-mapper.d.ts +46 -0
- package/dist/runners/pi/pi-ui-mapper.js +414 -0
- package/dist/runners/pi/pi-ui-mapper.js.map +1 -0
- package/dist/runners/pi/runaway-reply.d.ts +25 -0
- package/dist/runners/pi/runaway-reply.js +55 -0
- package/dist/runners/pi/runaway-reply.js.map +1 -0
- package/dist/runners/pi/spec-support.d.ts +21 -0
- package/dist/runners/pi/spec-support.js +44 -0
- package/dist/runners/pi/spec-support.js.map +1 -0
- package/dist/runs/agent-tmpdir.d.ts +6 -2
- package/dist/runs/agent-tmpdir.js +57 -8
- package/dist/runs/agent-tmpdir.js.map +1 -1
- package/dist/runs/archive-family.js +2 -2
- package/dist/runs/archive-family.js.map +1 -1
- package/dist/runs/arm-repo-handle.d.ts +18 -3
- package/dist/runs/arm-repo-handle.js +2 -3
- package/dist/runs/arm-repo-handle.js.map +1 -1
- package/dist/runs/auto-name.d.ts +7 -2
- package/dist/runs/auto-name.js +12 -7
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/automation-runs.d.ts +26 -0
- package/dist/runs/automation-runs.js +70 -0
- package/dist/runs/automation-runs.js.map +1 -0
- package/dist/runs/branch-owners.d.ts +30 -0
- package/dist/runs/branch-owners.js +81 -0
- package/dist/runs/branch-owners.js.map +1 -0
- package/dist/runs/claim-families.d.ts +1 -1
- package/dist/runs/claim-families.js +1 -1
- package/dist/runs/cold-reads.d.ts +1 -1
- package/dist/runs/cold-reads.js +1 -1
- package/dist/runs/conversation-archive.d.ts +48 -0
- package/dist/runs/conversation-archive.js +110 -0
- package/dist/runs/conversation-archive.js.map +1 -0
- package/dist/runs/conversation-compaction.d.ts +35 -0
- package/dist/runs/conversation-compaction.js +110 -0
- package/dist/runs/conversation-compaction.js.map +1 -0
- package/dist/runs/conversation-identity.d.ts +2 -1
- package/dist/runs/conversation-identity.js +4 -4
- package/dist/runs/conversation-identity.js.map +1 -1
- package/dist/runs/conversation-ledger.d.ts +60 -0
- package/dist/runs/conversation-ledger.js +64 -0
- package/dist/runs/conversation-ledger.js.map +1 -0
- package/dist/runs/conversation-members.d.ts +26 -0
- package/dist/runs/conversation-members.js +63 -0
- package/dist/runs/conversation-members.js.map +1 -0
- package/dist/runs/delegation-state.d.ts +37 -3
- package/dist/runs/delegation-state.js +6 -0
- package/dist/runs/delegation-state.js.map +1 -1
- package/dist/runs/event-log.d.ts +79 -0
- package/dist/runs/event-log.js +188 -0
- package/dist/runs/event-log.js.map +1 -0
- package/dist/runs/exit-events.d.ts +5 -0
- package/dist/runs/exit-events.js +1 -7
- package/dist/runs/exit-events.js.map +1 -1
- package/dist/runs/guarded-json-sql.d.ts +8 -0
- package/dist/runs/guarded-json-sql.js +11 -0
- package/dist/runs/guarded-json-sql.js.map +1 -0
- package/dist/runs/history-file.js +8 -6
- package/dist/runs/history-file.js.map +1 -1
- package/dist/runs/legacy-index.d.ts +2 -2
- package/dist/runs/legacy-index.js +4 -5
- package/dist/runs/legacy-index.js.map +1 -1
- package/dist/runs/legacy-run-rows.d.ts +51 -1
- package/dist/runs/legacy-run-rows.js +186 -2
- package/dist/runs/legacy-run-rows.js.map +1 -1
- package/dist/runs/legacy-waits.js +2 -2
- package/dist/runs/legacy-waits.js.map +1 -1
- package/dist/runs/lifecycle-registry.d.ts +16 -0
- package/dist/runs/lifecycle-registry.js +30 -0
- package/dist/runs/lifecycle-registry.js.map +1 -0
- package/dist/runs/lifecycle.d.ts +82 -0
- package/dist/runs/lifecycle.js +64 -0
- package/dist/runs/lifecycle.js.map +1 -0
- package/dist/runs/live-tasks.d.ts +10 -0
- package/dist/runs/live-tasks.js +33 -0
- package/dist/runs/live-tasks.js.map +1 -0
- package/dist/runs/loaded-run-exits.d.ts +29 -2
- package/dist/runs/loaded-run-exits.js +50 -2
- package/dist/runs/loaded-run-exits.js.map +1 -1
- package/dist/runs/loaded-run-healing.js +1 -1
- package/dist/runs/loaded-run-healing.js.map +1 -1
- package/dist/runs/outcome-commit.d.ts +27 -3
- package/dist/runs/outcome-commit.js +26 -7
- package/dist/runs/outcome-commit.js.map +1 -1
- package/dist/runs/owned-run-create.d.ts +6 -3
- package/dist/runs/owned-run-create.js +46 -16
- package/dist/runs/owned-run-create.js.map +1 -1
- package/dist/runs/ports.d.ts +295 -0
- package/dist/runs/ports.js +2 -0
- package/dist/runs/ports.js.map +1 -0
- package/dist/runs/project-run-connection.d.ts +6 -1
- package/dist/runs/project-run-connection.js +46 -5
- package/dist/runs/project-run-connection.js.map +1 -1
- package/dist/runs/project-run-sources.d.ts +2 -2
- package/dist/runs/project-run-sources.js +5 -5
- package/dist/runs/project-run-sources.js.map +1 -1
- package/dist/runs/record-write-rules.d.ts +16 -4
- package/dist/runs/record-write-rules.js +48 -17
- package/dist/runs/record-write-rules.js.map +1 -1
- package/dist/runs/removal-slots.d.ts +78 -0
- package/dist/runs/removal-slots.js +92 -0
- package/dist/runs/removal-slots.js.map +1 -0
- package/dist/runs/retention.d.ts +46 -22
- package/dist/runs/retention.js +87 -60
- package/dist/runs/retention.js.map +1 -1
- package/dist/runs/run-archive.d.ts +1276 -0
- package/dist/runs/run-archive.js +382 -0
- package/dist/runs/run-archive.js.map +1 -0
- package/dist/runs/run-claims-topic.d.ts +136 -0
- package/dist/runs/run-claims-topic.js +291 -0
- package/dist/runs/run-claims-topic.js.map +1 -0
- package/dist/runs/run-claims.d.ts +1 -1
- package/dist/runs/run-claims.js +2 -2
- package/dist/runs/run-claims.js.map +1 -1
- package/dist/runs/run-cold-reads.d.ts +98 -0
- package/dist/runs/run-cold-reads.js +199 -0
- package/dist/runs/run-cold-reads.js.map +1 -0
- package/dist/runs/run-database-migrations.d.ts +8 -0
- package/dist/runs/run-database-migrations.js +236 -0
- package/dist/runs/run-database-migrations.js.map +1 -0
- package/dist/runs/run-database-peer-page.js +3 -4
- package/dist/runs/run-database-peer-page.js.map +1 -1
- package/dist/runs/run-database-row.js +5 -0
- package/dist/runs/run-database-row.js.map +1 -1
- package/dist/runs/run-database-version.d.ts +6 -3
- package/dist/runs/run-database-version.js +17 -3
- package/dist/runs/run-database-version.js.map +1 -1
- package/dist/runs/run-database.d.ts +28 -3
- package/dist/runs/run-database.js +104 -246
- package/dist/runs/run-database.js.map +1 -1
- package/dist/runs/run-decode.d.ts +3274 -0
- package/dist/runs/run-decode.js +132 -0
- package/dist/runs/run-decode.js.map +1 -0
- package/dist/runs/run-derived-rows.d.ts +25 -0
- package/dist/runs/run-derived-rows.js +46 -0
- package/dist/runs/run-derived-rows.js.map +1 -0
- package/dist/runs/run-exits.d.ts +1913 -46
- package/dist/runs/run-exits.js +35 -10
- package/dist/runs/run-exits.js.map +1 -1
- package/dist/runs/run-index-cache.d.ts +10 -0
- package/dist/runs/run-index-cache.js +45 -0
- package/dist/runs/run-index-cache.js.map +1 -0
- package/dist/runs/run-index-rows.d.ts +35 -0
- package/dist/runs/run-index-rows.js +51 -0
- package/dist/runs/run-index-rows.js.map +1 -0
- package/dist/runs/run-index.d.ts +5 -11
- package/dist/runs/run-index.js +43 -81
- package/dist/runs/run-index.js.map +1 -1
- package/dist/runs/run-indexes.d.ts +7 -0
- package/dist/runs/run-indexes.js +8 -0
- package/dist/runs/run-indexes.js.map +1 -0
- package/dist/runs/run-persistence.d.ts +156 -0
- package/dist/runs/run-persistence.js +410 -0
- package/dist/runs/run-persistence.js.map +1 -0
- package/dist/runs/run-pins.d.ts +38 -0
- package/dist/runs/run-pins.js +45 -0
- package/dist/runs/run-pins.js.map +1 -0
- package/dist/runs/run-queries.d.ts +198 -0
- package/dist/runs/run-queries.js +530 -0
- package/dist/runs/run-queries.js.map +1 -0
- package/dist/runs/run-read-flags.d.ts +58 -0
- package/dist/runs/run-read-flags.js +87 -0
- package/dist/runs/run-read-flags.js.map +1 -0
- package/dist/runs/run-redaction.d.ts +21 -0
- package/dist/runs/run-redaction.js +47 -0
- package/dist/runs/run-redaction.js.map +1 -0
- package/dist/runs/run-references.d.ts +14 -4
- package/dist/runs/run-references.js +84 -18
- package/dist/runs/run-references.js.map +1 -1
- package/dist/runs/run-repo-scope.d.ts +42 -0
- package/dist/runs/run-repo-scope.js +110 -0
- package/dist/runs/run-repo-scope.js.map +1 -0
- package/dist/runs/run-retention.d.ts +85 -0
- package/dist/runs/run-retention.js +240 -0
- package/dist/runs/run-retention.js.map +1 -0
- package/dist/runs/run-row.d.ts +23 -0
- package/dist/runs/run-row.js +49 -4
- package/dist/runs/run-row.js.map +1 -1
- package/dist/runs/run-summary-page.js +2 -0
- package/dist/runs/run-summary-page.js.map +1 -1
- package/dist/runs/shared-hosts.d.ts +17 -0
- package/dist/runs/shared-hosts.js +30 -0
- package/dist/runs/shared-hosts.js.map +1 -0
- package/dist/runs/store-open-error.js +7 -8
- package/dist/runs/store-open-error.js.map +1 -1
- package/dist/runs/store-open.d.ts +54 -0
- package/dist/runs/store-open.js +104 -0
- package/dist/runs/store-open.js.map +1 -0
- package/dist/runs/store.d.ts +74 -3729
- package/dist/runs/store.js +295 -2952
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/supervised.d.ts +22 -0
- package/dist/runs/supervised.js +28 -0
- package/dist/runs/supervised.js.map +1 -0
- package/dist/runs/task-rights.d.ts +87 -0
- package/dist/runs/task-rights.js +153 -0
- package/dist/runs/task-rights.js.map +1 -0
- package/dist/runs/transcript-facts-fold.d.ts +1 -1
- package/dist/runs/transcript-facts-fold.js +1 -1
- package/dist/runs/transcript-facts-fold.js.map +1 -1
- package/dist/runs/transcript-facts-load.js +1 -1
- package/dist/runs/transcript-facts-load.js.map +1 -1
- package/dist/runs/transcript-facts-queue.d.ts +5 -1
- package/dist/runs/transcript-facts-queue.js +48 -9
- package/dist/runs/transcript-facts-queue.js.map +1 -1
- package/dist/runs/transcript-facts-topic.d.ts +45 -0
- package/dist/runs/transcript-facts-topic.js +101 -0
- package/dist/runs/transcript-facts-topic.js.map +1 -0
- package/dist/runs/transcript-facts.js +1 -2
- package/dist/runs/transcript-facts.js.map +1 -1
- package/dist/runs/wait-capacity.js.map +1 -1
- package/dist/runs/wait-helpers.d.ts +28 -0
- package/dist/runs/wait-helpers.js +34 -0
- package/dist/runs/wait-helpers.js.map +1 -0
- package/dist/runs/wait-phases.d.ts +9 -1
- package/dist/runs/wait-phases.js +17 -2
- package/dist/runs/wait-phases.js.map +1 -1
- package/dist/runs/wait-registration-write.js.map +1 -1
- package/dist/runs/webhook.d.ts +24 -14
- package/dist/runs/webhook.js +29 -44
- package/dist/runs/webhook.js.map +1 -1
- package/dist/runs/worker-execution.d.ts +24 -1
- package/dist/runs/worker-execution.js +66 -7
- package/dist/runs/worker-execution.js.map +1 -1
- package/dist/runs/worker-executions-registry.d.ts +33 -0
- package/dist/runs/worker-executions-registry.js +18 -0
- package/dist/runs/worker-executions-registry.js.map +1 -0
- package/dist/runs/worker-result-commit.js +1 -1
- package/dist/runs/worker-results.d.ts +38 -0
- package/dist/runs/worker-results.js +87 -0
- package/dist/runs/worker-results.js.map +1 -0
- package/dist/serve-boot.d.ts +12 -25
- package/dist/serve-boot.js +9 -52
- package/dist/serve-boot.js.map +1 -1
- package/dist/serve-command.d.ts +9 -9
- package/dist/serve-command.js +47 -41
- package/dist/serve-command.js.map +1 -1
- package/dist/serve-listener.d.ts +2 -2
- package/dist/serve-listener.js +2 -2
- package/dist/serve-stop.d.ts +40 -0
- package/dist/serve-stop.js +41 -0
- package/dist/serve-stop.js.map +1 -0
- package/dist/server/accept-negotiation.d.ts +17 -0
- package/dist/server/accept-negotiation.js +53 -0
- package/dist/server/accept-negotiation.js.map +1 -0
- package/dist/server/activity-routes.d.ts +45 -30
- package/dist/server/activity-routes.js +6 -9
- package/dist/server/activity-routes.js.map +1 -1
- package/dist/server/activity-sources.d.ts +2 -2
- package/dist/server/activity-sources.js +4 -4
- package/dist/server/activity-sources.js.map +1 -1
- package/dist/server/agent-profile-id.d.ts +8 -0
- package/dist/server/agent-profile-id.js +14 -0
- package/dist/server/agent-profile-id.js.map +1 -0
- package/dist/server/archive-on-merge.js +16 -11
- package/dist/server/archive-on-merge.js.map +1 -1
- package/dist/server/automations-routes.d.ts +1435 -0
- package/dist/server/automations-routes.js +192 -0
- package/dist/server/automations-routes.js.map +1 -0
- package/dist/server/backend-checks.d.ts +29 -0
- package/dist/server/backend-checks.js +53 -0
- package/dist/server/backend-checks.js.map +1 -0
- package/dist/server/bounded-read-cache.d.ts +10 -0
- package/dist/server/bounded-read-cache.js +54 -0
- package/dist/server/bounded-read-cache.js.map +1 -0
- package/dist/server/brand-file-routes.d.ts +7 -0
- package/dist/server/brand-file-routes.js +19 -0
- package/dist/server/brand-file-routes.js.map +1 -0
- package/dist/server/capabilities.d.ts +4 -7
- package/dist/server/capabilities.js +2 -5
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/checkout.js +7 -6
- package/dist/server/checkout.js.map +1 -1
- package/dist/server/cockpit-ownership.d.ts +2 -59
- package/dist/server/cockpit-ownership.js +4 -143
- package/dist/server/cockpit-ownership.js.map +1 -1
- package/dist/server/completion-actions.js +8 -8
- package/dist/server/completion-actions.js.map +1 -1
- package/dist/server/config-merge.js +7 -6
- package/dist/server/config-merge.js.map +1 -1
- package/dist/server/create-project.js +10 -10
- package/dist/server/create-project.js.map +1 -1
- package/dist/server/forge/draft-pr.d.ts +1 -1
- package/dist/server/forge/draft-pr.js +45 -30
- package/dist/server/forge/draft-pr.js.map +1 -1
- package/dist/server/forge/github-checks.d.ts +31 -0
- package/dist/server/forge/github-checks.js +155 -0
- package/dist/server/forge/github-checks.js.map +1 -0
- package/dist/server/forge/github-cli.d.ts +14 -0
- package/dist/server/forge/github-cli.js +25 -0
- package/dist/server/forge/github-cli.js.map +1 -0
- package/dist/server/forge/github-comments.d.ts +25 -0
- package/dist/server/forge/github-comments.js +486 -0
- package/dist/server/forge/github-comments.js.map +1 -0
- package/dist/server/forge/github-filters.js +2 -3
- package/dist/server/forge/github-filters.js.map +1 -1
- package/dist/server/forge/github-list.d.ts +77 -0
- package/dist/server/forge/github-list.js +541 -0
- package/dist/server/forge/github-list.js.map +1 -0
- package/dist/server/forge/github-merge-state.d.ts +1 -1
- package/dist/server/forge/github-merge-state.js +4 -9
- package/dist/server/forge/github-merge-state.js.map +1 -1
- package/dist/server/forge/github-merged-pr-chunk.d.ts +5 -0
- package/dist/server/forge/github-merged-pr-chunk.js +45 -0
- package/dist/server/forge/github-merged-pr-chunk.js.map +1 -0
- package/dist/server/forge/github-mutations.d.ts +19 -0
- package/dist/server/forge/github-mutations.js +295 -0
- package/dist/server/forge/github-mutations.js.map +1 -0
- package/dist/server/forge/github-pr-diff.d.ts +10 -0
- package/dist/server/forge/github-pr-diff.js +126 -0
- package/dist/server/forge/github-pr-diff.js.map +1 -0
- package/dist/server/forge/github-ref-status-derive.d.ts +54 -0
- package/dist/server/forge/github-ref-status-derive.js +202 -0
- package/dist/server/forge/github-ref-status-derive.js.map +1 -0
- package/dist/server/forge/github-ref-status-query.d.ts +5 -0
- package/dist/server/forge/github-ref-status-query.js +11 -0
- package/dist/server/forge/github-ref-status-query.js.map +1 -0
- package/dist/server/forge/github-ref-status.d.ts +23 -0
- package/dist/server/forge/github-ref-status.js +224 -0
- package/dist/server/forge/github-ref-status.js.map +1 -0
- package/dist/server/forge/github-repo-handle.d.ts +43 -0
- package/dist/server/forge/github-repo-handle.js +161 -0
- package/dist/server/forge/github-repo-handle.js.map +1 -0
- package/dist/server/forge/github-request-gate.d.ts +64 -0
- package/dist/server/forge/github-request-gate.js +152 -0
- package/dist/server/forge/github-request-gate.js.map +1 -0
- package/dist/server/forge/github-reviewer-ref.d.ts +11 -0
- package/dist/server/forge/github-reviewer-ref.js +17 -0
- package/dist/server/forge/github-reviewer-ref.js.map +1 -0
- package/dist/server/forge/github-shared.d.ts +119 -0
- package/dist/server/forge/github-shared.js +225 -0
- package/dist/server/forge/github-shared.js.map +1 -0
- package/dist/server/forge/github.d.ts +15 -386
- package/dist/server/forge/github.js +29 -2789
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/types.d.ts +3 -3
- package/dist/server/fs-browse.d.ts +1 -1
- package/dist/server/fs-browse.js +3 -5
- package/dist/server/fs-browse.js.map +1 -1
- package/dist/server/git-changes.d.ts +19 -1
- package/dist/server/git-changes.js +23 -18
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/git-dir-stamp.d.ts +35 -0
- package/dist/server/git-dir-stamp.js +158 -0
- package/dist/server/git-dir-stamp.js.map +1 -0
- package/dist/server/git.d.ts +7 -1
- package/dist/server/git.js +72 -10
- package/dist/server/git.js.map +1 -1
- package/dist/server/github-routes.d.ts +733 -0
- package/dist/server/github-routes.js +140 -0
- package/dist/server/github-routes.js.map +1 -0
- package/dist/server/health-cache.d.ts +39 -0
- package/dist/server/health-cache.js +66 -0
- package/dist/server/health-cache.js.map +1 -0
- package/dist/server/home-recovery-routes.d.ts +2 -3
- package/dist/server/home-recovery-routes.js +12 -12
- package/dist/server/home-recovery-routes.js.map +1 -1
- package/dist/server/host-authority.d.ts +20 -0
- package/dist/server/host-authority.js +46 -0
- package/dist/server/host-authority.js.map +1 -0
- package/dist/server/live-routes.d.ts +13 -6
- package/dist/server/live-routes.js +1 -0
- package/dist/server/live-routes.js.map +1 -1
- package/dist/server/models-routes.d.ts +60 -0
- package/dist/server/models-routes.js +24 -0
- package/dist/server/models-routes.js.map +1 -0
- package/dist/server/open-in-app.d.ts +5 -3
- package/dist/server/open-in-app.js +14 -18
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/open-in-targets.d.ts +6 -6
- package/dist/server/open-in-targets.js +20 -26
- package/dist/server/open-in-targets.js.map +1 -1
- package/dist/server/open-in-terminal.d.ts +3 -3
- package/dist/server/open-in-terminal.js +3 -3
- package/dist/server/preview-cdp-socket.js +1 -1
- package/dist/server/preview-cdp-socket.js.map +1 -1
- package/dist/server/preview-socket.js +1 -1
- package/dist/server/preview-socket.js.map +1 -1
- package/dist/server/probe-writable-dir.d.ts +5 -0
- package/dist/server/probe-writable-dir.js +25 -0
- package/dist/server/probe-writable-dir.js.map +1 -0
- package/dist/server/project-context.d.ts +40 -26
- package/dist/server/project-context.js +75 -78
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/project-run-files.d.ts +4 -2
- package/dist/server/project-run-files.js +4 -4
- package/dist/server/project-run-files.js.map +1 -1
- package/dist/server/project-settings-routes.d.ts +985 -0
- package/dist/server/project-settings-routes.js +346 -0
- package/dist/server/project-settings-routes.js.map +1 -0
- package/dist/server/projects-routes.d.ts +833 -0
- package/dist/server/projects-routes.js +423 -0
- package/dist/server/projects-routes.js.map +1 -0
- package/dist/server/provider-action-gate.d.ts +22 -3
- package/dist/server/provider-action-gate.js +40 -14
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/provider-auth-runtime.d.ts +2 -1
- package/dist/server/provider-auth-runtime.js +11 -8
- package/dist/server/provider-auth-runtime.js.map +1 -1
- package/dist/server/provider-sign-in-routes.d.ts +231 -0
- package/dist/server/provider-sign-in-routes.js +61 -0
- package/dist/server/provider-sign-in-routes.js.map +1 -0
- package/dist/server/provider-sign-ins.d.ts +12 -0
- package/dist/server/provider-sign-ins.js +61 -0
- package/dist/server/provider-sign-ins.js.map +1 -0
- package/dist/server/providers-routes.d.ts +666 -0
- package/dist/server/providers-routes.js +373 -0
- package/dist/server/providers-routes.js.map +1 -0
- package/dist/server/repo-branch-forge.js +38 -10
- package/dist/server/repo-branch-forge.js.map +1 -1
- package/dist/server/repo-branch-sweep.d.ts +23 -1
- package/dist/server/repo-branch-sweep.js +9 -1
- package/dist/server/repo-branch-sweep.js.map +1 -1
- package/dist/server/repo-branches.d.ts +18 -3
- package/dist/server/repo-branches.js +119 -53
- package/dist/server/repo-branches.js.map +1 -1
- package/dist/server/repo-pull.js +3 -6
- package/dist/server/repo-pull.js.map +1 -1
- package/dist/server/repo-read-cache.d.ts +22 -0
- package/dist/server/repo-read-cache.js +51 -0
- package/dist/server/repo-read-cache.js.map +1 -0
- package/dist/server/repo-routes.d.ts +509 -0
- package/dist/server/repo-routes.js +243 -0
- package/dist/server/repo-routes.js.map +1 -0
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/reports-api.js +4 -3
- package/dist/server/reports-api.js.map +1 -1
- package/dist/server/reports-topic.d.ts +1 -1
- package/dist/server/reports-topic.js +2 -1
- package/dist/server/reports-topic.js.map +1 -1
- package/dist/server/run-accounts.d.ts +47 -0
- package/dist/server/run-accounts.js +89 -0
- package/dist/server/run-accounts.js.map +1 -0
- package/dist/server/run-checkout.d.ts +9 -2
- package/dist/server/run-checkout.js +50 -18
- package/dist/server/run-checkout.js.map +1 -1
- package/dist/server/run-event-feed.d.ts +7 -1
- package/dist/server/run-event-feed.js +87 -30
- package/dist/server/run-event-feed.js.map +1 -1
- package/dist/server/run-relationships.d.ts +19 -0
- package/dist/server/run-relationships.js +47 -0
- package/dist/server/run-relationships.js.map +1 -0
- package/dist/server/runner-install-routes.d.ts +106 -0
- package/dist/server/runner-install-routes.js +52 -0
- package/dist/server/runner-install-routes.js.map +1 -0
- package/dist/server/runner-skills.d.ts +13 -0
- package/dist/server/runner-skills.js +21 -0
- package/dist/server/runner-skills.js.map +1 -0
- package/dist/server/runners-routes.d.ts +156 -0
- package/dist/server/runners-routes.js +29 -0
- package/dist/server/runners-routes.js.map +1 -0
- package/dist/server/runs-routes.d.ts +13066 -0
- package/dist/server/runs-routes.js +834 -0
- package/dist/server/runs-routes.js.map +1 -0
- package/dist/server/server-deps.d.ts +8 -5
- package/dist/server/server-deps.js +25 -12
- package/dist/server/server-deps.js.map +1 -1
- package/dist/server/server-types.d.ts +40 -0
- package/dist/server/server-types.js +34 -0
- package/dist/server/server-types.js.map +1 -0
- package/dist/server/server.d.ts +7566 -6067
- package/dist/server/server.js +220 -4493
- package/dist/server/server.js.map +1 -1
- package/dist/server/session-context-routes.d.ts +108 -0
- package/dist/server/session-context-routes.js +26 -0
- package/dist/server/session-context-routes.js.map +1 -0
- package/dist/server/start-run-options.d.ts +15 -8
- package/dist/server/start-run-options.js +17 -7
- package/dist/server/start-run-options.js.map +1 -1
- package/dist/server/start-server.d.ts +6 -0
- package/dist/server/start-server.js +345 -0
- package/dist/server/start-server.js.map +1 -0
- package/dist/server/static-assets.d.ts +5 -0
- package/dist/server/static-assets.js +109 -0
- package/dist/server/static-assets.js.map +1 -0
- package/dist/server/static-ui.d.ts +1 -1
- package/dist/server/static-ui.js +8 -6
- package/dist/server/static-ui.js.map +1 -1
- package/dist/server/validators.d.ts +6 -3
- package/dist/server/validators.js +22 -13
- package/dist/server/validators.js.map +1 -1
- package/dist/server/web-app-manifest.d.ts +23 -0
- package/dist/server/web-app-manifest.js +27 -0
- package/dist/server/web-app-manifest.js.map +1 -0
- package/dist/server/workspace-config-patch.js +3 -3
- package/dist/server/workspace-config-patch.js.map +1 -1
- package/dist/server/workspace-live-routes.d.ts +7 -0
- package/dist/server/workspace-projects.d.ts +3 -8
- package/dist/server/workspace-projects.js +5 -17
- package/dist/server/workspace-projects.js.map +1 -1
- package/dist/server/workspace-routes.d.ts +713 -0
- package/dist/server/workspace-routes.js +262 -0
- package/dist/server/workspace-routes.js.map +1 -0
- package/dist/server/workspace-run-feed.d.ts +15 -5
- package/dist/server/workspace-run-feed.js +14 -11
- package/dist/server/workspace-run-feed.js.map +1 -1
- package/dist/server/worktree-size-cache.d.ts +3 -0
- package/dist/server/worktree-size-cache.js +8 -0
- package/dist/server/worktree-size-cache.js.map +1 -0
- package/dist/server/ws.js +22 -9
- package/dist/server/ws.js.map +1 -1
- package/dist/server/wsl.js +1 -1
- package/dist/server-command.js +1 -2
- package/dist/server-command.js.map +1 -1
- package/dist/server-install/engine.d.ts +2 -2
- package/dist/server-install/engine.js +4 -5
- package/dist/server-install/engine.js.map +1 -1
- package/dist/server-install/group-migrate.js +35 -24
- package/dist/server-install/group-migrate.js.map +1 -1
- package/dist/server-install/migrate-journal.d.ts +1 -0
- package/dist/server-install/migrate-journal.js +4 -4
- package/dist/server-install/migrate-journal.js.map +1 -1
- package/dist/server-install/npx-cache.d.ts +1 -1
- package/dist/server-install/npx-cache.js +4 -5
- package/dist/server-install/npx-cache.js.map +1 -1
- package/dist/server-install/platforms/macosx-migration.d.ts +2 -2
- package/dist/server-install/platforms/macosx-migration.js +3 -7
- package/dist/server-install/platforms/macosx-migration.js.map +1 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +6 -8
- package/dist/server-install/platforms/macosx-ngrok.js +64 -67
- package/dist/server-install/platforms/macosx-ngrok.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps-migration.d.ts +6 -6
- package/dist/server-install/platforms/ubuntu-vps-migration.js +22 -39
- package/dist/server-install/platforms/ubuntu-vps-migration.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps-names.d.ts +13 -11
- package/dist/server-install/platforms/ubuntu-vps-names.js +15 -17
- package/dist/server-install/platforms/ubuntu-vps-names.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps-redeploy.d.ts +1 -1
- package/dist/server-install/platforms/ubuntu-vps-redeploy.js +2 -3
- package/dist/server-install/platforms/ubuntu-vps-redeploy.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +9 -13
- package/dist/server-install/platforms/ubuntu-vps.js +95 -99
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/server-install/state.js +2 -3
- package/dist/server-install/state.js.map +1 -1
- package/dist/server-install/steps.js +29 -24
- package/dist/server-install/steps.js.map +1 -1
- package/dist/server-install/types.d.ts +9 -6
- package/dist/server-install/types.js +10 -7
- package/dist/server-install/types.js.map +1 -1
- package/dist/session-context-file.d.ts +11 -0
- package/dist/session-context-file.js +173 -0
- package/dist/session-context-file.js.map +1 -0
- package/dist/session-context.d.ts +61 -4
- package/dist/session-context.js +268 -36
- package/dist/session-context.js.map +1 -1
- package/dist/skills.d.ts +0 -69
- package/dist/skills.js +0 -205
- package/dist/skills.js.map +1 -1
- package/dist/subcommands.d.ts +8 -10
- package/dist/subcommands.js +23 -54
- package/dist/subcommands.js.map +1 -1
- package/dist/task-branch-head.d.ts +7 -0
- package/dist/task-branch-head.js +32 -0
- package/dist/task-branch-head.js.map +1 -0
- package/dist/task-cli/cli.js +64 -211
- package/dist/task-cli/cli.js.map +1 -1
- package/dist/task-cli/discovery.d.ts +22 -1
- package/dist/task-cli/discovery.js +79 -29
- package/dist/task-cli/discovery.js.map +1 -1
- package/dist/task-cli/http.d.ts +15 -16
- package/dist/task-cli/http.js +17 -7
- package/dist/task-cli/http.js.map +1 -1
- package/dist/task-cli/operations.d.ts +156 -0
- package/dist/task-cli/operations.js +388 -0
- package/dist/task-cli/operations.js.map +1 -0
- package/dist/task-cli/projections.d.ts +4 -2
- package/dist/task-cli/projections.js +2 -2
- package/dist/task-cli/projections.js.map +1 -1
- package/dist/task-cli/watch.d.ts +31 -8
- package/dist/task-cli/watch.js +159 -91
- package/dist/task-cli/watch.js.map +1 -1
- package/dist/ui-state.d.ts +11 -10
- package/dist/ui-state.js +36 -11
- package/dist/ui-state.js.map +1 -1
- package/dist/update-check.d.ts +1 -1
- package/dist/update-check.js +3 -4
- package/dist/update-check.js.map +1 -1
- package/dist/webhooks/cli.d.ts +2 -0
- package/dist/webhooks/cli.js +5 -2
- package/dist/webhooks/cli.js.map +1 -1
- package/dist/worker-scope/cgroup.d.ts +7 -0
- package/dist/worker-scope/cgroup.js +17 -0
- package/dist/worker-scope/cgroup.js.map +1 -0
- package/dist/worker-scope/groups.d.ts +15 -0
- package/dist/worker-scope/groups.js +45 -0
- package/dist/worker-scope/groups.js.map +1 -0
- package/dist/worker-scope/job.d.ts +7 -0
- package/dist/worker-scope/job.js +10 -0
- package/dist/worker-scope/job.js.map +1 -0
- package/dist/worker-scope/scope.d.ts +38 -0
- package/dist/worker-scope/scope.js +20 -0
- package/dist/worker-scope/scope.js.map +1 -0
- package/dist/worker-scope/worker-scopes.d.ts +75 -0
- package/dist/worker-scope/worker-scopes.js +254 -0
- package/dist/worker-scope/worker-scopes.js.map +1 -0
- package/dist/workflows/active-run.d.ts +2 -2
- package/dist/workflows/active-run.js +2 -2
- package/dist/workflows/attachment-path.d.ts +2 -0
- package/dist/workflows/attachment-path.js +23 -1
- package/dist/workflows/attachment-path.js.map +1 -1
- package/dist/workflows/completion-policy.d.ts +11 -3
- package/dist/workflows/completion-policy.js +13 -3
- package/dist/workflows/completion-policy.js.map +1 -1
- package/dist/workflows/continuation-admission.d.ts +183 -41
- package/dist/workflows/continuation-admission.js +77 -42
- package/dist/workflows/continuation-admission.js.map +1 -1
- package/dist/workflows/execution-account.d.ts +2 -3
- package/dist/workflows/execution-account.js +6 -4
- package/dist/workflows/execution-account.js.map +1 -1
- package/dist/workflows/grouped-command.d.ts +3 -0
- package/dist/workflows/grouped-command.js +42 -6
- package/dist/workflows/grouped-command.js.map +1 -1
- package/dist/workflows/input-acknowledgement.d.ts +23 -3
- package/dist/workflows/input-acknowledgement.js.map +1 -1
- package/dist/workflows/load.js +15 -0
- package/dist/workflows/load.js.map +1 -1
- package/dist/workflows/outcome-batches.d.ts +5 -4
- package/dist/workflows/outcome-batches.js +4 -3
- package/dist/workflows/outcome-batches.js.map +1 -1
- package/dist/workflows/question-routing.d.ts +3 -1
- package/dist/workflows/question-routing.js +9 -3
- package/dist/workflows/question-routing.js.map +1 -1
- package/dist/workflows/run/attachment-writer.d.ts +5 -4
- package/dist/workflows/run/attachment-writer.js +12 -9
- package/dist/workflows/run/attachment-writer.js.map +1 -1
- package/dist/workflows/run/auto-resume.d.ts +38 -16
- package/dist/workflows/run/auto-resume.js +106 -68
- package/dist/workflows/run/auto-resume.js.map +1 -1
- package/dist/workflows/run/completion-gate.d.ts +4 -0
- package/dist/workflows/run/completion-gate.js +20 -16
- package/dist/workflows/run/completion-gate.js.map +1 -1
- package/dist/workflows/run/compose.d.ts +27 -21
- package/dist/workflows/run/compose.js +55 -46
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/constants.d.ts +2 -2
- package/dist/workflows/run/constants.js +2 -2
- package/dist/workflows/run/constants.js.map +1 -1
- package/dist/workflows/run/continuation-acceptance.d.ts +14 -11
- package/dist/workflows/run/continuation-acceptance.js +113 -36
- package/dist/workflows/run/continuation-acceptance.js.map +1 -1
- package/dist/workflows/run/continuation-session.d.ts +10 -12
- package/dist/workflows/run/continuation-session.js +110 -154
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/cut-off-work.d.ts +41 -0
- package/dist/workflows/run/cut-off-work.js +96 -0
- package/dist/workflows/run/cut-off-work.js.map +1 -0
- package/dist/workflows/run/done-accepted.d.ts +42 -0
- package/dist/workflows/run/done-accepted.js +142 -0
- package/dist/workflows/run/done-accepted.js.map +1 -0
- package/dist/workflows/run/family-reconciler.d.ts +26 -12
- package/dist/workflows/run/family-reconciler.js +76 -59
- package/dist/workflows/run/family-reconciler.js.map +1 -1
- package/dist/workflows/run/human-waits.d.ts +32 -12
- package/dist/workflows/run/human-waits.js +77 -31
- package/dist/workflows/run/human-waits.js.map +1 -1
- package/dist/workflows/run/inbox-claims.d.ts +3 -2
- package/dist/workflows/run/inbox-claims.js +8 -17
- package/dist/workflows/run/inbox-claims.js.map +1 -1
- package/dist/workflows/run/input-batch.d.ts +4 -2
- package/dist/workflows/run/input-batch.js +7 -6
- package/dist/workflows/run/input-batch.js.map +1 -1
- package/dist/workflows/run/input-delivery.d.ts +81 -12
- package/dist/workflows/run/input-delivery.js +275 -117
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/input-receipts.d.ts +15 -7
- package/dist/workflows/run/input-receipts.js +21 -20
- package/dist/workflows/run/input-receipts.js.map +1 -1
- package/dist/workflows/run/input-timers.js +3 -2
- package/dist/workflows/run/input-timers.js.map +1 -1
- package/dist/workflows/run/launch-context.d.ts +7 -14
- package/dist/workflows/run/launch-context.js +17 -41
- package/dist/workflows/run/launch-context.js.map +1 -1
- package/dist/workflows/run/launch-read-resolver.d.ts +107 -54
- package/dist/workflows/run/launch-read-resolver.js +138 -79
- package/dist/workflows/run/launch-read-resolver.js.map +1 -1
- package/dist/workflows/run/launch-settings.d.ts +2 -2
- package/dist/workflows/run/launch-settings.js.map +1 -1
- package/dist/workflows/run/live-session-state.d.ts +8 -0
- package/dist/workflows/run/live-session-state.js +9 -0
- package/dist/workflows/run/live-session-state.js.map +1 -1
- package/dist/workflows/run/liveness-timers.d.ts +105 -0
- package/dist/workflows/run/liveness-timers.js +134 -0
- package/dist/workflows/run/liveness-timers.js.map +1 -0
- package/dist/workflows/run/maintenance-claims.d.ts +15 -1
- package/dist/workflows/run/maintenance-claims.js +57 -10
- package/dist/workflows/run/maintenance-claims.js.map +1 -1
- package/dist/workflows/run/memory-guard.d.ts +6 -6
- package/dist/workflows/run/memory-guard.js +10 -10
- package/dist/workflows/run/memory-guard.js.map +1 -1
- package/dist/workflows/run/native-skill-input-queue.d.ts +59 -0
- package/dist/workflows/run/native-skill-input-queue.js +157 -0
- package/dist/workflows/run/native-skill-input-queue.js.map +1 -0
- package/dist/workflows/run/opening.d.ts +2 -2
- package/dist/workflows/run/pending-ask-facts.d.ts +2 -2
- package/dist/workflows/run/pending-ask-facts.js.map +1 -1
- package/dist/workflows/run/prompts.d.ts +3 -42
- package/dist/workflows/run/prompts.js +18 -88
- package/dist/workflows/run/prompts.js.map +1 -1
- package/dist/workflows/run/queued-input.d.ts +12 -10
- package/dist/workflows/run/queued-input.js +28 -17
- package/dist/workflows/run/queued-input.js.map +1 -1
- package/dist/workflows/run/queued-revival.d.ts +5 -4
- package/dist/workflows/run/queued-revival.js +38 -18
- package/dist/workflows/run/queued-revival.js.map +1 -1
- package/dist/workflows/run/run-cancel.d.ts +12 -2
- package/dist/workflows/run/run-cancel.js +43 -21
- package/dist/workflows/run/run-cancel.js.map +1 -1
- package/dist/workflows/run/run-finish.d.ts +16 -11
- package/dist/workflows/run/run-finish.js +52 -28
- package/dist/workflows/run/run-finish.js.map +1 -1
- package/dist/workflows/run/run-guards.d.ts +8 -7
- package/dist/workflows/run/run-guards.js.map +1 -1
- package/dist/workflows/run/run-line.d.ts +11 -10
- package/dist/workflows/run/run-line.js +32 -22
- package/dist/workflows/run/run-line.js.map +1 -1
- package/dist/workflows/run/run-memory.d.ts +65 -0
- package/dist/workflows/run/run-memory.js +84 -0
- package/dist/workflows/run/run-memory.js.map +1 -0
- package/dist/workflows/run/run-recovery.d.ts +6 -4
- package/dist/workflows/run/run-recovery.js +48 -33
- package/dist/workflows/run/run-recovery.js.map +1 -1
- package/dist/workflows/run/run-settlement.d.ts +29 -12
- package/dist/workflows/run/run-settlement.js +120 -59
- package/dist/workflows/run/run-settlement.js.map +1 -1
- package/dist/workflows/run/run-skills.d.ts +23 -105
- package/dist/workflows/run/run-skills.js +83 -210
- package/dist/workflows/run/run-skills.js.map +1 -1
- package/dist/workflows/run/run-start.d.ts +5 -4
- package/dist/workflows/run/run-start.js +1 -1
- package/dist/workflows/run/run-start.js.map +1 -1
- package/dist/workflows/run/run-workspace.d.ts +11 -7
- package/dist/workflows/run/run-workspace.js +25 -21
- package/dist/workflows/run/run-workspace.js.map +1 -1
- package/dist/workflows/run/session-events.d.ts +40 -22
- package/dist/workflows/run/session-events.js +57 -38
- package/dist/workflows/run/session-events.js.map +1 -1
- package/dist/workflows/run/squawk-tools.d.ts +43 -0
- package/dist/workflows/run/squawk-tools.js +113 -0
- package/dist/workflows/run/squawk-tools.js.map +1 -0
- package/dist/workflows/run/step-decisions.js +4 -3
- package/dist/workflows/run/step-decisions.js.map +1 -1
- package/dist/workflows/run/step-loop.d.ts +13 -7
- package/dist/workflows/run/step-loop.js +81 -47
- package/dist/workflows/run/step-loop.js.map +1 -1
- package/dist/workflows/run/step-session.d.ts +7 -5
- package/dist/workflows/run/step-session.js +70 -55
- package/dist/workflows/run/step-session.js.map +1 -1
- package/dist/workflows/run/steps.d.ts +1 -1
- package/dist/workflows/run/subagent-waits.d.ts +22 -12
- package/dist/workflows/run/subagent-waits.js +60 -43
- package/dist/workflows/run/subagent-waits.js.map +1 -1
- package/dist/workflows/run/turn-bookkeeping.d.ts +7 -7
- package/dist/workflows/run/turn-bookkeeping.js +13 -13
- package/dist/workflows/run/turn-bookkeeping.js.map +1 -1
- package/dist/workflows/run/turn-boundary.d.ts +25 -9
- package/dist/workflows/run/turn-boundary.js +14 -23
- package/dist/workflows/run/turn-boundary.js.map +1 -1
- package/dist/workflows/run/turn-markers.d.ts +3 -6
- package/dist/workflows/run/turn-markers.js +0 -11
- package/dist/workflows/run/turn-markers.js.map +1 -1
- package/dist/workflows/run/turn-nudges.d.ts +68 -22
- package/dist/workflows/run/turn-nudges.js +144 -30
- package/dist/workflows/run/turn-nudges.js.map +1 -1
- package/dist/workflows/run/turn-settler.d.ts +72 -12
- package/dist/workflows/run/turn-settler.js +165 -58
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/types.d.ts +19 -15
- package/dist/workflows/run/usage-accounting.d.ts +4 -4
- package/dist/workflows/run/usage-accounting.js +15 -11
- package/dist/workflows/run/usage-accounting.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +143 -48
- package/dist/workflows/run/wait-engine.js +134 -195
- package/dist/workflows/run/wait-engine.js.map +1 -1
- package/dist/workflows/run/wait-input-descriptors.d.ts +3 -0
- package/dist/workflows/run/wait-input-descriptors.js +40 -0
- package/dist/workflows/run/wait-input-descriptors.js.map +1 -0
- package/dist/workflows/run/wait-kind-registry.d.ts +151 -0
- package/dist/workflows/run/wait-kind-registry.js +40 -0
- package/dist/workflows/run/wait-kind-registry.js.map +1 -0
- package/dist/workflows/run/wait-kinds.d.ts +545 -130
- package/dist/workflows/run/wait-kinds.js +160 -205
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/dist/workflows/run/wait-registration-tool.d.ts +3 -3
- package/dist/workflows/run/wait-registration-tool.js +6 -5
- package/dist/workflows/run/wait-registration-tool.js.map +1 -1
- package/dist/workflows/run/wait-registration.d.ts +10 -2
- package/dist/workflows/run/wait-registration.js +18 -10
- package/dist/workflows/run/wait-registration.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +34 -35
- package/dist/workflows/run/wait-registry.js +122 -160
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/run/wake-admission.d.ts +19 -6
- package/dist/workflows/run/wake-admission.js +49 -15
- package/dist/workflows/run/wake-admission.js.map +1 -1
- package/dist/workflows/run/wake-ledger.d.ts +12 -5
- package/dist/workflows/run/wake-ledger.js +19 -9
- package/dist/workflows/run/wake-ledger.js.map +1 -1
- package/dist/workflows/run/wake-retries.d.ts +10 -8
- package/dist/workflows/run/wake-retries.js +26 -47
- package/dist/workflows/run/wake-retries.js.map +1 -1
- package/dist/workflows/run/worker-executions.d.ts +18 -5
- package/dist/workflows/run/worker-executions.js +52 -20
- package/dist/workflows/run/worker-executions.js.map +1 -1
- package/dist/workflows/run/worker-orphans.d.ts +19 -37
- package/dist/workflows/run/worker-orphans.js +78 -130
- package/dist/workflows/run/worker-orphans.js.map +1 -1
- package/dist/workflows/run/worker-questions.d.ts +36 -23
- package/dist/workflows/run/worker-questions.js +140 -84
- package/dist/workflows/run/worker-questions.js.map +1 -1
- package/dist/workflows/run/worker-workspace-port.d.ts +35 -0
- package/dist/workflows/run/worker-workspace-port.js +7 -0
- package/dist/workflows/run/worker-workspace-port.js.map +1 -0
- package/dist/workflows/run/workflow-position.d.ts +9 -6
- package/dist/workflows/run/workflow-position.js +1 -0
- package/dist/workflows/run/workflow-position.js.map +1 -1
- package/dist/workflows/run/worktree-autosave.d.ts +4 -3
- package/dist/workflows/run/worktree-autosave.js +9 -8
- package/dist/workflows/run/worktree-autosave.js.map +1 -1
- package/dist/workflows/run-scheduling.d.ts +24 -12
- package/dist/workflows/run-scheduling.js +84 -15
- package/dist/workflows/run-scheduling.js.map +1 -1
- package/dist/workflows/run-states.d.ts +2 -9
- package/dist/workflows/run-states.js +54 -60
- package/dist/workflows/run-states.js.map +1 -1
- package/dist/workflows/run.d.ts +57 -25
- package/dist/workflows/run.js +95 -44
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/step-kind-ids.d.ts +9 -0
- package/dist/workflows/step-kind-ids.js +10 -0
- package/dist/workflows/step-kind-ids.js.map +1 -0
- package/dist/workflows/step-kind-registry.d.ts +45 -0
- package/dist/workflows/step-kind-registry.js +48 -0
- package/dist/workflows/step-kind-registry.js.map +1 -0
- package/dist/workflows/turn-end.d.ts +17 -8
- package/dist/workflows/turn-end.js +11 -3
- package/dist/workflows/turn-end.js.map +1 -1
- package/dist/workflows/types.d.ts +7 -8
- package/dist/workflows/types.js +6 -19
- package/dist/workflows/types.js.map +1 -1
- package/dist/workflows/wait-kind-ids.d.ts +11 -0
- package/dist/workflows/wait-kind-ids.js +34 -0
- package/dist/workflows/wait-kind-ids.js.map +1 -0
- package/dist/workflows/wait-scope.d.ts +9 -10
- package/dist/workflows/wait-scope.js +20 -18
- package/dist/workflows/wait-scope.js.map +1 -1
- package/dist/workflows/waits.d.ts +12 -19
- package/dist/workflows/waits.js +21 -32
- package/dist/workflows/waits.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +18 -45
- package/dist/workspace/agent-accounts.js +115 -55
- package/dist/workspace/agent-accounts.js.map +1 -1
- package/dist/workspace/agent-profiles.d.ts +6 -40
- package/dist/workspace/agent-profiles.js +7 -76
- package/dist/workspace/agent-profiles.js.map +1 -1
- package/dist/workspace/backup-cli.d.ts +1 -1
- package/dist/workspace/backup-cli.js +14 -17
- package/dist/workspace/backup-cli.js.map +1 -1
- package/dist/workspace/backups.d.ts +1 -18
- package/dist/workspace/backups.js +9 -42
- package/dist/workspace/backups.js.map +1 -1
- package/dist/workspace/config.d.ts +19 -24
- package/dist/workspace/config.js +50 -35
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/migrations.js +2 -3
- package/dist/workspace/migrations.js.map +1 -1
- package/dist/workspace/projects-cli.d.ts +10 -8
- package/dist/workspace/projects-cli.js +21 -45
- package/dist/workspace/projects-cli.js.map +1 -1
- package/dist/workspace/projects.d.ts +4 -7
- package/dist/workspace/projects.js +13 -12
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/registry-entry.d.ts +4 -0
- package/dist/workspace/registry-entry.js +11 -0
- package/dist/workspace/registry-entry.js.map +1 -0
- package/dist/workspace/semaphore.js +1 -1
- package/dist/workspace/ui-state.js +1 -1
- package/dist/workspace/ui-state.js.map +1 -1
- package/dist/worktree-manifest.d.ts +14 -14
- package/dist/worktree-manifest.js +22 -25
- package/dist/worktree-manifest.js.map +1 -1
- package/dist/worktree-paths.d.ts +3 -0
- package/dist/worktree-paths.js +52 -0
- package/dist/worktree-paths.js.map +1 -0
- package/dist/worktree-setup.d.ts +12 -1
- package/dist/worktree-setup.js +14 -5
- package/dist/worktree-setup.js.map +1 -1
- package/dist/worktree-skill-cleanup.d.ts +11 -0
- package/dist/worktree-skill-cleanup.js +53 -0
- package/dist/worktree-skill-cleanup.js.map +1 -0
- package/package.json +15 -6
- package/scripts/benchmark-automation-lookups.ts +97 -0
- package/scripts/benchmark-conversation-lookup.ts +105 -0
- package/scripts/benchmark-family-reconcile.ts +8 -7
- package/scripts/benchmark-home.ts +3 -3
- package/scripts/benchmark-project-probes.mjs +1 -1
- package/scripts/benchmark-project.ts +41 -0
- package/scripts/benchmark-run-store.ts +10 -9
- package/scripts/benchmark-runtime.ts +30 -0
- package/scripts/benchmark-store-fixture.ts +43 -0
- package/scripts/benchmark-stuck-destroys.ts +25 -42
- package/scripts/benchmark-worker-lifecycle.ts +156 -0
- package/scripts/benchmark-workspace-events.ts +10 -9
- package/scripts/benchmark-worktree-retention.ts +133 -0
- package/scripts/check-pack.mjs +11 -2
- package/scripts/copy-runner-assets.d.mts +2 -0
- package/scripts/copy-runner-assets.mjs +69 -0
- package/scripts/inline-contract.mjs +63 -5
- package/scripts/measure-transcript-facts-health.mjs +93 -15
- package/scripts/measure-transcript-facts-lag.mjs +16 -7
- package/scripts/mock-acp-login.mjs +20 -0
- package/scripts/mock-acp-sessions.mjs +30 -0
- package/scripts/mock-acp.mjs +589 -0
- package/scripts/mock-antigravity-auth.mjs +62 -0
- package/scripts/mock-ask-answer.d.mts +2 -0
- package/scripts/mock-ask-answer.mjs +19 -0
- package/scripts/mock-autonomous.mjs +8 -1
- package/scripts/mock-ci-tool.mjs +79 -34
- package/scripts/mock-claude-subagents.mjs +1 -1
- package/scripts/mock-claude.mjs +56 -25
- package/scripts/mock-codex-app-server.mjs +69 -23
- package/scripts/mock-codex-subagents.mjs +1 -1
- package/scripts/mock-deferred-turn-start.mjs +1 -1
- package/scripts/mock-fixture-runner.mjs +184 -0
- package/scripts/mock-lifecycle.d.mts +2 -0
- package/scripts/mock-lifecycle.mjs +6 -2
- package/scripts/mock-nudge.mjs +6 -4
- package/scripts/mock-omp-rpc.mjs +52 -19
- package/scripts/mock-opencode-questions.d.mts +14 -0
- package/scripts/mock-opencode-questions.mjs +89 -0
- package/scripts/mock-opencode-serve.mjs +68 -89
- package/scripts/mock-pi-rpc.mjs +39 -16
- package/scripts/mock-provider-failures.mjs +51 -0
- package/scripts/mock-scenario.d.mts +6 -2
- package/scripts/mock-scenario.mjs +58 -23
- package/scripts/mock-silent-tail.mjs +2 -10
- package/scripts/mock-skill-data/antigravity.mjs +66 -0
- package/scripts/mock-skill-data/claude.mjs +83 -0
- package/scripts/mock-skill-data/codex.mjs +73 -0
- package/scripts/mock-skill-data/omp.mjs +59 -0
- package/scripts/mock-skill-data/opencode.mjs +82 -0
- package/scripts/mock-skill-data/pi.mjs +64 -0
- package/scripts/mock-skill-data.mjs +13 -0
- package/scripts/mock-skill-fixtures.d.mts +11 -0
- package/scripts/mock-skill-fixtures.mjs +62 -0
- package/scripts/mock-skill-list-data.d.mts +1 -0
- package/scripts/mock-skill-list-data.mjs +4 -0
- package/scripts/mock-skill-list.d.mts +1 -0
- package/scripts/mock-skill-list.mjs +14 -0
- package/scripts/mock-skill-trigger-data.mjs +4 -0
- package/scripts/mock-skill-trigger.mjs +34 -0
- package/scripts/mock-wire-evidence.config.mjs +10 -0
- package/scripts/mock-wire-tools.mjs +7 -1
- package/scripts/parity-rows.ts +9 -3
- package/scripts/profile-lint-compare.ts +101 -0
- package/scripts/profile-lint.ts +234 -0
- package/scripts/record-wait-oracle.ts +68 -0
- package/scripts/seed-archive-profile.ts +4 -2
- package/scripts/transcript-facts-fixture.mjs +1 -1
- package/scripts/transcript-facts-timing.mjs +165 -9
- package/scripts/windows-worker-job.cs +221 -0
- package/scripts/windows-worker-job.ps1 +41 -0
- package/web/dist/app-icon.png +0 -0
- package/web/dist/assets/accounts-section-COizLyTO.js +1 -0
- package/web/dist/assets/activity-motion-DcKVM8fM.css +1 -0
- package/web/dist/assets/activity-motion-DfI5xoMG.js +2 -0
- package/web/dist/assets/activity-route-BQs2vBeo.js +1 -0
- package/web/dist/assets/agent-config-section-BwBo-HRw.js +7 -0
- package/web/dist/assets/agent-defaults-section-h-Gjb_gh.js +1 -0
- package/web/dist/assets/agents-settings-path-7X6_cvUg.js +1 -0
- package/web/dist/assets/appearance-Bcl2amXv.js +1 -0
- package/web/dist/assets/archive-on-merge-field-Bm8miJjt.js +1 -0
- package/web/dist/assets/attention-8bNiiAFt.js +1 -0
- package/web/dist/assets/automation-format-DB34jUyF.js +1 -0
- package/web/dist/assets/automations-route-CutF-cGn.css +1 -0
- package/web/dist/assets/automations-route-rSezHxBp.js +2 -0
- package/web/dist/assets/badge-DQ3U69Ht.js +1 -0
- package/web/dist/assets/bot-TkDIw4y-.js +1 -0
- package/web/dist/assets/bundle-mjs-rHxsej31.js +1 -0
- package/web/dist/assets/button-B7MKxYjT.js +1 -0
- package/web/dist/assets/centered-state-V15AR_qo.js +1 -0
- package/web/dist/assets/cez-idle-CdswdDRd.js +1 -0
- package/web/dist/assets/change-counts-CW7O8g5Y.js +1 -0
- package/web/dist/assets/check-OP-CVgZG.js +1 -0
- package/web/dist/assets/chevron-down-CHGyCDBH.js +1 -0
- package/web/dist/assets/chevron-right-BENZ-1ZN.js +1 -0
- package/web/dist/assets/chunk-BO2N2NFS-DQrpGzb-.js +131 -0
- package/web/dist/assets/chunk-KS7C4IRE-Cg8l-LDN.js +3 -0
- package/web/dist/assets/circle-x-7nTlobAF.js +1 -0
- package/web/dist/assets/code-editor-B4baSOhz.js +4 -0
- package/web/dist/assets/collapsible-BEV4FO-1.js +1 -0
- package/web/dist/assets/command-KdW7aO0N.js +1 -0
- package/web/dist/assets/commit-list-DtEqtn9o.js +1 -0
- package/web/dist/assets/core-DzoyrHjB.js +12 -0
- package/web/dist/assets/design-icons-CzEoMH9c.js +1 -0
- package/web/dist/assets/dialog-B531GGAo.js +1 -0
- package/web/dist/assets/diff-BK789dS0.js +3 -0
- package/web/dist/assets/diff-controls-BFqQNxRu.js +1 -0
- package/web/dist/assets/diff-view-BEgQ7jZV.js +11 -0
- package/web/dist/assets/dist-BAoXdNsT.js +1 -0
- package/web/dist/assets/dist-BW234Kg5.js +1 -0
- package/web/dist/assets/dist-C5mlVBmd.js +1 -0
- package/web/dist/assets/dist-Czz3Y5qH.js +1 -0
- package/web/dist/assets/dist-DXO3xwbC.js +1 -0
- package/web/dist/assets/dist-Da4ckcJG.js +1 -0
- package/web/dist/assets/dropdown-menu-4e2iKSMT.js +1 -0
- package/web/dist/assets/es2015-CQth82uv.js +41 -0
- package/web/dist/assets/external-link-BE6y205O.js +1 -0
- package/web/dist/assets/file-preview-CDWTFZ4P.js +2 -0
- package/web/dist/assets/folder-browser-BfclRPcX.js +1 -0
- package/web/dist/assets/folder-o-AvL3y3.js +1 -0
- package/web/dist/assets/format-BU7D3IfE.js +1 -0
- package/web/dist/assets/git-toolbar-Pugtjt-9.js +1 -0
- package/web/dist/assets/github-CvpaGHe6.js +1 -0
- package/web/dist/assets/global-activity-route-Di_ICsRI.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-Cx8MiNVZ.js +1 -0
- package/web/dist/assets/highlighter-DvLzHjjY.js +3 -0
- package/web/dist/assets/hourglass-CikYdGGQ.js +1 -0
- package/web/dist/assets/image-preview-Dx2w5oIn.js +1 -0
- package/web/dist/assets/index-CGjknHnV.css +1 -0
- package/web/dist/assets/index-CJFT0IZP.js +21 -0
- package/web/dist/assets/label-DEH7fJN4.js +1 -0
- package/web/dist/assets/lib-DrPFkMXk.js +1 -0
- package/web/dist/assets/live-protocol-DMhTnCmf.js +64 -0
- package/web/dist/assets/live-reads-BJ9eDISf.js +1 -0
- package/web/dist/assets/live-refetch-VoLPvzhe.js +1 -0
- package/web/dist/assets/live-worker-DBw-5jVE.ts +36 -0
- package/web/dist/assets/loader-circle-CPBhhDbB.js +1 -0
- package/web/dist/assets/markdown-Dv0r75AX.js +4 -0
- package/web/dist/assets/mermaid-GHXKKRXX-lTc_AjAC.js +1 -0
- package/web/dist/assets/moon-CRE9nU5R.js +1 -0
- package/web/dist/assets/nav-row-styles-DqKjMToI.js +1 -0
- package/web/dist/assets/notifications-section-DCiqPl3M.js +1 -0
- package/web/dist/assets/open-in-menu-HM5l7Bwk.js +1 -0
- package/web/dist/assets/own-lookup-DS54wXvD.js +1 -0
- package/web/dist/assets/play-CmVAj_fu.js +1 -0
- package/web/dist/assets/plus-CxRU2X8C.js +1 -0
- package/web/dist/assets/popover-BPgUYFyu.js +1 -0
- package/web/dist/assets/preload-helper-Czpn1I53.js +1 -0
- package/web/dist/assets/preview-pane-connected-WV9oolnn.js +3 -0
- package/web/dist/assets/project-location-CfJLc6aJ.js +1 -0
- package/web/dist/assets/project-order-AcHI4Dcl.js +1 -0
- package/web/dist/assets/project-rail-sortable-BmVI4_-T.js +1 -0
- package/web/dist/assets/project-router-Bii3ofOk.js +1 -0
- package/web/dist/assets/project-scope-context-BdqKyBHa.js +4 -0
- package/web/dist/assets/projects-section-D2cACaaG.js +1 -0
- package/web/dist/assets/prompt-templates-section-toLPd5u2.js +1 -0
- package/web/dist/assets/queries-C7VNk-nW.js +1 -0
- package/web/dist/assets/reference-chip-rylFalfg.js +1 -0
- package/web/dist/assets/remote-settings-notice-N9vtBTIK.js +1 -0
- package/web/dist/assets/repo-git-DJym0aRY.js +1 -0
- package/web/dist/assets/report-reader-CjskGtxS.js +1 -0
- package/web/dist/assets/reports-B-G9HA48.js +1 -0
- package/web/dist/assets/reports-CNFNb36Z.css +1 -0
- package/web/dist/assets/resources-section-B88h1y0Q.js +1 -0
- package/web/dist/assets/run-header-B-olCSdg.js +2 -0
- package/web/dist/assets/run-header-Ccnr9k0X.css +1 -0
- package/web/dist/assets/save-cue-Cd3ZAPBS.js +1 -0
- package/web/dist/assets/saved-draft-BwzBc-_Y.js +1 -0
- package/web/dist/assets/select-BaydzE-I.js +1 -0
- package/web/dist/assets/session-context-section-BJKRXbss.js +119 -0
- package/web/dist/assets/settings-agent-picker-6xZMIC_D.js +1 -0
- package/web/dist/assets/settings-field-DP9sYv5a.js +1 -0
- package/web/dist/assets/settings-select-CCIMGnyA.js +1 -0
- package/web/dist/assets/settings-shell-BkTgs1S9.js +1 -0
- package/web/dist/assets/settings-shell-iSd4xMWS.css +1 -0
- package/web/dist/assets/sidebar-section-B57HIEgv.js +1 -0
- package/web/dist/assets/skills-pBrfwrKF.js +1 -0
- package/web/dist/assets/skills-pM_PouEs.js +1 -0
- package/web/dist/assets/smartphone-Lr8Ug2z_.js +1 -0
- package/web/dist/assets/sortable.esm-CAVTYaA3.js +5 -0
- package/web/dist/assets/square-terminal-B6RYYieR.js +1 -0
- package/web/dist/assets/status-dot-BRzVlF2X.js +1 -0
- package/web/dist/assets/switch-SP8pw5uU.js +1 -0
- package/web/dist/assets/tab-link-B1CULYRs.js +1 -0
- package/web/dist/assets/task-changes-CXldTh93.js +1 -0
- package/web/dist/assets/task-commits-BZ3B_GPB.js +1 -0
- package/web/dist/assets/task-files-BSfmCkJc.js +1 -0
- package/web/dist/assets/task-github-item-v2bygvdO.js +1 -0
- package/web/dist/assets/task-groups-BbnYlkYj.js +1 -0
- package/web/dist/assets/task-thread-BPWnJ7Qx.js +9 -0
- package/web/dist/assets/task-thread-DzADOhZd.css +1 -0
- package/web/dist/assets/tasks-table-Cx7AM7lZ.js +1 -0
- package/web/dist/assets/textarea-vJt9undk.js +1 -0
- package/web/dist/assets/thread-state-R0MTvwlo.js +4 -0
- package/web/dist/assets/toaster-Bo5vCbz-.js +1 -0
- package/web/dist/assets/use-hand-to-agent-state-B6h6kcQg.css +1 -0
- package/web/dist/assets/use-hand-to-agent-state-BckHuhr8.js +1 -0
- package/web/dist/assets/useInfiniteQuery--iQKfpUQ.js +1 -0
- package/web/dist/assets/useQuery-BSyhc3l3.js +1 -0
- package/web/dist/assets/utils-DSMR_WLb.js +1 -0
- package/web/dist/assets/workflows-BBc2PFDB.js +7 -0
- package/web/dist/assets/workflows-C6suai0L.css +1 -0
- package/web/dist/assets/workspace-tools-CiTG-ArW.js +1 -0
- package/web/dist/assets/worktrees-section-C07tNayi.js +4 -0
- package/web/dist/assets/zoomable-image-CIQl1Wpe.js +1 -0
- package/web/dist/index.html +68 -32
- package/web/dist/live-worker.js +2 -2
- package/dist/agent-config/account-identity.d.ts +0 -28
- package/dist/agent-config/account-identity.js +0 -132
- package/dist/agent-config/account-identity.js.map +0 -1
- package/dist/agent-config/model-settings/claude.d.ts +0 -2
- package/dist/agent-config/model-settings/claude.js +0 -11
- package/dist/agent-config/model-settings/claude.js.map +0 -1
- package/dist/agent-config/model-settings/codex.d.ts +0 -2
- package/dist/agent-config/model-settings/codex.js +0 -16
- package/dist/agent-config/model-settings/codex.js.map +0 -1
- package/dist/agent-config/model-settings/opencode.d.ts +0 -2
- package/dist/agent-config/model-settings/opencode.js +0 -8
- package/dist/agent-config/model-settings/opencode.js.map +0 -1
- package/dist/agent-config/model-settings/pi.d.ts +0 -2
- package/dist/agent-config/model-settings/pi.js +0 -38
- package/dist/agent-config/model-settings/pi.js.map +0 -1
- package/dist/agent-config/model-settings/types.d.ts +0 -9
- package/dist/agent-config/model-settings/types.js +0 -2
- package/dist/agent-config/model-settings/types.js.map +0 -1
- package/dist/application-update/bin-recovery.d.ts +0 -5
- package/dist/application-update/bin-recovery.js +0 -96
- package/dist/application-update/bin-recovery.js.map +0 -1
- package/dist/application-update/discovery.d.ts +0 -23
- package/dist/application-update/discovery.js +0 -139
- package/dist/application-update/discovery.js.map +0 -1
- package/dist/application-update/helper.d.ts +0 -58
- package/dist/application-update/helper.js +0 -363
- package/dist/application-update/helper.js.map +0 -1
- package/dist/application-update/launcher.d.ts +0 -12
- package/dist/application-update/launcher.js +0 -61
- package/dist/application-update/launcher.js.map +0 -1
- package/dist/application-update/lock.d.ts +0 -4
- package/dist/application-update/lock.js +0 -70
- package/dist/application-update/lock.js.map +0 -1
- package/dist/application-update/npm-process.d.ts +0 -17
- package/dist/application-update/npm-process.js +0 -156
- package/dist/application-update/npm-process.js.map +0 -1
- package/dist/application-update/runtime-layout.d.ts +0 -20
- package/dist/application-update/runtime-layout.js +0 -91
- package/dist/application-update/runtime-layout.js.map +0 -1
- package/dist/application-update/scoped-recovery.d.ts +0 -32
- package/dist/application-update/scoped-recovery.js +0 -210
- package/dist/application-update/scoped-recovery.js.map +0 -1
- package/dist/application-update/service.d.ts +0 -86
- package/dist/application-update/service.js +0 -523
- package/dist/application-update/service.js.map +0 -1
- package/dist/automations/builtin-skill.d.ts +0 -7
- package/dist/automations/builtin-skill.js +0 -14
- package/dist/automations/builtin-skill.js.map +0 -1
- package/dist/ci-wait/injection.d.ts +0 -3
- package/dist/ci-wait/injection.js +0 -13
- package/dist/ci-wait/injection.js.map +0 -1
- package/dist/contract/application-update.d.ts +0 -32
- package/dist/contract/self-update.d.ts +0 -255
- package/dist/contract/skill-sources.d.ts +0 -125
- package/dist/contract/team-skill-ref.d.ts +0 -10
- package/dist/contract/voice.d.ts +0 -213
- package/dist/core/claude-cli-runner.d.ts +0 -85
- package/dist/core/claude-cli-runner.js +0 -899
- package/dist/core/claude-cli-runner.js.map +0 -1
- package/dist/core/claude-executable.js +0 -15
- package/dist/core/claude-executable.js.map +0 -1
- package/dist/core/claude-model-catalog.d.ts +0 -16
- package/dist/core/claude-model-catalog.js +0 -198
- package/dist/core/claude-model-catalog.js.map +0 -1
- package/dist/core/claude-stream.d.ts +0 -38
- package/dist/core/claude-stream.js +0 -77
- package/dist/core/claude-stream.js.map +0 -1
- package/dist/core/claude-ui-mapper.d.ts +0 -88
- package/dist/core/claude-ui-mapper.js +0 -851
- package/dist/core/claude-ui-mapper.js.map +0 -1
- package/dist/core/codex-app-server-runner.d.ts +0 -76
- package/dist/core/codex-app-server-runner.js +0 -1271
- package/dist/core/codex-app-server-runner.js.map +0 -1
- package/dist/core/codex-app-server-transport.d.ts +0 -52
- package/dist/core/codex-app-server-transport.js +0 -200
- package/dist/core/codex-app-server-transport.js.map +0 -1
- package/dist/core/codex-approvals.d.ts +0 -12
- package/dist/core/codex-approvals.js +0 -180
- package/dist/core/codex-approvals.js.map +0 -1
- package/dist/core/codex-hook-mapper.d.ts +0 -15
- package/dist/core/codex-hook-mapper.js +0 -73
- package/dist/core/codex-hook-mapper.js.map +0 -1
- package/dist/core/codex-model-catalog.d.ts +0 -10
- package/dist/core/codex-model-catalog.js +0 -110
- package/dist/core/codex-model-catalog.js.map +0 -1
- package/dist/core/codex-native-frames.d.ts +0 -35
- package/dist/core/codex-native-frames.js +0 -80
- package/dist/core/codex-native-frames.js.map +0 -1
- package/dist/core/codex-permissions.d.ts +0 -6
- package/dist/core/codex-permissions.js +0 -27
- package/dist/core/codex-permissions.js.map +0 -1
- package/dist/core/codex-stream-error.js.map +0 -1
- package/dist/core/codex-turn-outcome.d.ts +0 -10
- package/dist/core/codex-turn-outcome.js +0 -35
- package/dist/core/codex-turn-outcome.js.map +0 -1
- package/dist/core/codex-ui-mapper-state.d.ts +0 -84
- package/dist/core/codex-ui-mapper-state.js.map +0 -1
- package/dist/core/codex-ui-mapper.d.ts +0 -44
- package/dist/core/codex-ui-mapper.js +0 -799
- package/dist/core/codex-ui-mapper.js.map +0 -1
- package/dist/core/cursor-cli-flags.d.ts +0 -19
- package/dist/core/cursor-cli-flags.js +0 -47
- package/dist/core/cursor-cli-flags.js.map +0 -1
- package/dist/core/cursor-config-options.d.ts +0 -18
- package/dist/core/cursor-config-options.js +0 -31
- package/dist/core/cursor-config-options.js.map +0 -1
- package/dist/core/cursor-model-catalog.d.ts +0 -50
- package/dist/core/cursor-model-catalog.js +0 -306
- package/dist/core/cursor-model-catalog.js.map +0 -1
- package/dist/core/cursor-print-capabilities.d.ts +0 -14
- package/dist/core/cursor-print-capabilities.js +0 -169
- package/dist/core/cursor-print-capabilities.js.map +0 -1
- package/dist/core/cursor-print-process.d.ts +0 -31
- package/dist/core/cursor-print-process.js +0 -117
- package/dist/core/cursor-print-process.js.map +0 -1
- package/dist/core/cursor-print-runner.d.ts +0 -43
- package/dist/core/cursor-print-runner.js +0 -574
- package/dist/core/cursor-print-runner.js.map +0 -1
- package/dist/core/cursor-print-tool-catalog.d.ts +0 -3
- package/dist/core/cursor-print-tool-catalog.js +0 -13
- package/dist/core/cursor-print-tool-catalog.js.map +0 -1
- package/dist/core/cursor-print-ui-mapper.d.ts +0 -47
- package/dist/core/cursor-print-ui-mapper.js +0 -574
- package/dist/core/cursor-print-ui-mapper.js.map +0 -1
- package/dist/core/cursor-provider-error.d.ts +0 -9
- package/dist/core/cursor-provider-error.js +0 -15
- package/dist/core/cursor-provider-error.js.map +0 -1
- package/dist/core/cursor-runner.d.ts +0 -46
- package/dist/core/cursor-runner.js +0 -144
- package/dist/core/cursor-runner.js.map +0 -1
- package/dist/core/disclaim-spawn.d.ts +0 -11
- package/dist/core/disclaim-spawn.js +0 -60
- package/dist/core/disclaim-spawn.js.map +0 -1
- package/dist/core/omp-model-catalog.d.ts +0 -39
- package/dist/core/omp-model-catalog.js +0 -183
- package/dist/core/omp-model-catalog.js.map +0 -1
- package/dist/core/omp-runner.d.ts +0 -86
- package/dist/core/omp-runner.js +0 -818
- package/dist/core/omp-runner.js.map +0 -1
- package/dist/core/omp-subagent-rows.d.ts +0 -21
- package/dist/core/omp-subagent-rows.js +0 -99
- package/dist/core/omp-subagent-rows.js.map +0 -1
- package/dist/core/omp-ui-mapper.d.ts +0 -112
- package/dist/core/omp-ui-mapper.js +0 -807
- package/dist/core/omp-ui-mapper.js.map +0 -1
- package/dist/core/opencode-model-catalog.d.ts +0 -27
- package/dist/core/opencode-model-catalog.js +0 -189
- package/dist/core/opencode-model-catalog.js.map +0 -1
- package/dist/core/opencode-permissions.d.ts +0 -52
- package/dist/core/opencode-permissions.js +0 -101
- package/dist/core/opencode-permissions.js.map +0 -1
- package/dist/core/opencode-runtime-config.d.ts +0 -9
- package/dist/core/opencode-runtime-config.js +0 -26
- package/dist/core/opencode-runtime-config.js.map +0 -1
- package/dist/core/opencode-server-runner.d.ts +0 -75
- package/dist/core/opencode-server-runner.js +0 -1690
- package/dist/core/opencode-server-runner.js.map +0 -1
- package/dist/core/opencode-session-error.d.ts +0 -19
- package/dist/core/opencode-session-error.js +0 -42
- package/dist/core/opencode-session-error.js.map +0 -1
- package/dist/core/opencode-task-scope.js +0 -19
- package/dist/core/opencode-task-scope.js.map +0 -1
- package/dist/core/opencode-ui-mapper-state.d.ts +0 -82
- package/dist/core/opencode-ui-mapper-state.js.map +0 -1
- package/dist/core/opencode-ui-mapper.d.ts +0 -59
- package/dist/core/opencode-ui-mapper.js +0 -724
- package/dist/core/opencode-ui-mapper.js.map +0 -1
- package/dist/core/opencode-usage.d.ts +0 -32
- package/dist/core/opencode-usage.js.map +0 -1
- package/dist/core/pi-model-catalog.d.ts +0 -34
- package/dist/core/pi-model-catalog.js +0 -247
- package/dist/core/pi-model-catalog.js.map +0 -1
- package/dist/core/pi-runner.d.ts +0 -58
- package/dist/core/pi-runner.js +0 -587
- package/dist/core/pi-runner.js.map +0 -1
- package/dist/core/pi-ui-mapper.d.ts +0 -52
- package/dist/core/pi-ui-mapper.js +0 -408
- package/dist/core/pi-ui-mapper.js.map +0 -1
- package/dist/core/runner-factory.d.ts +0 -11
- package/dist/core/runner-factory.js +0 -36
- package/dist/core/runner-factory.js.map +0 -1
- package/dist/delegation/destroy-observation.d.ts +0 -42
- package/dist/delegation/destroy-observation.js +0 -115
- package/dist/delegation/destroy-observation.js.map +0 -1
- package/dist/delegation/idle-test-app.d.ts +0 -4
- package/dist/delegation/idle-test-app.js +0 -186
- package/dist/delegation/idle-test-app.js.map +0 -1
- package/dist/delegation/windows-test-app.d.ts +0 -5
- package/dist/delegation/windows-test-app.js +0 -64
- package/dist/delegation/windows-test-app.js.map +0 -1
- package/dist/home/display.d.ts +0 -4
- package/dist/home/display.js +0 -11
- package/dist/home/display.js.map +0 -1
- package/dist/home/switch.d.ts +0 -2
- package/dist/home/switch.js +0 -3
- package/dist/home/switch.js.map +0 -1
- package/dist/jobs/cli.d.ts +0 -2
- package/dist/jobs/cli.js +0 -53
- package/dist/jobs/cli.js.map +0 -1
- package/dist/jobs/command.d.ts +0 -9
- package/dist/jobs/command.js +0 -19
- package/dist/jobs/command.js.map +0 -1
- package/dist/jobs/job.d.ts +0 -77
- package/dist/jobs/job.js +0 -252
- package/dist/jobs/job.js.map +0 -1
- package/dist/runs/worker-deletion-proof.d.ts +0 -13
- package/dist/runs/worker-deletion-proof.js.map +0 -1
- package/dist/runs/worker-resource-holders.d.ts +0 -17
- package/dist/runs/worker-resource-holders.js +0 -34
- package/dist/runs/worker-resource-holders.js.map +0 -1
- package/dist/self-update/checkouts.d.ts +0 -46
- package/dist/self-update/checkouts.js +0 -284
- package/dist/self-update/checkouts.js.map +0 -1
- package/dist/self-update/cli.d.ts +0 -19
- package/dist/self-update/cli.js +0 -243
- package/dist/self-update/cli.js.map +0 -1
- package/dist/self-update/installer.d.ts +0 -24
- package/dist/self-update/installer.js +0 -139
- package/dist/self-update/installer.js.map +0 -1
- package/dist/self-update/launcher.d.ts +0 -30
- package/dist/self-update/launcher.js +0 -172
- package/dist/self-update/launcher.js.map +0 -1
- package/dist/self-update/layout.d.ts +0 -108
- package/dist/self-update/layout.js +0 -276
- package/dist/self-update/layout.js.map +0 -1
- package/dist/self-update/pulls.d.ts +0 -30
- package/dist/self-update/pulls.js +0 -128
- package/dist/self-update/pulls.js.map +0 -1
- package/dist/self-update/registry.d.ts +0 -37
- package/dist/self-update/registry.js +0 -86
- package/dist/self-update/registry.js.map +0 -1
- package/dist/self-update/restart.d.ts +0 -25
- package/dist/self-update/restart.js +0 -79
- package/dist/self-update/restart.js.map +0 -1
- package/dist/self-update/semver.d.ts +0 -19
- package/dist/self-update/semver.js +0 -79
- package/dist/self-update/semver.js.map +0 -1
- package/dist/self-update/service.d.ts +0 -115
- package/dist/self-update/service.js +0 -332
- package/dist/self-update/service.js.map +0 -1
- package/dist/self-update/supervisor.d.ts +0 -10
- package/dist/self-update/supervisor.js +0 -52
- package/dist/self-update/supervisor.js.map +0 -1
- package/dist/server/launch-key.d.ts +0 -5
- package/dist/server/launch-key.js +0 -35
- package/dist/server/launch-key.js.map +0 -1
- package/dist/server/self-update-routes.d.ts +0 -308
- package/dist/server/self-update-routes.js +0 -80
- package/dist/server/self-update-routes.js.map +0 -1
- package/dist/server/skill-sources.d.ts +0 -264
- package/dist/server/skill-sources.js +0 -130
- package/dist/server/skill-sources.js.map +0 -1
- package/dist/skills-provision.d.ts +0 -64
- package/dist/skills-provision.js +0 -325
- package/dist/skills-provision.js.map +0 -1
- package/dist/skills-remote.d.ts +0 -144
- package/dist/skills-remote.js +0 -847
- package/dist/skills-remote.js.map +0 -1
- package/dist/voice/decide.d.ts +0 -35
- package/dist/voice/decide.js +0 -329
- package/dist/voice/decide.js.map +0 -1
- package/dist/voice/decision-log.d.ts +0 -48
- package/dist/voice/decision-log.js +0 -117
- package/dist/voice/decision-log.js.map +0 -1
- package/dist/voice/engine.d.ts +0 -119
- package/dist/voice/engine.js +0 -61
- package/dist/voice/engine.js.map +0 -1
- package/dist/voice/fake-engine.d.ts +0 -10
- package/dist/voice/fake-engine.js +0 -192
- package/dist/voice/fake-engine.js.map +0 -1
- package/dist/voice/jev-engine.d.ts +0 -17
- package/dist/voice/jev-engine.js +0 -110
- package/dist/voice/jev-engine.js.map +0 -1
- package/dist/voice/pending-ask.d.ts +0 -17
- package/dist/voice/pending-ask.js +0 -51
- package/dist/voice/pending-ask.js.map +0 -1
- package/dist/voice/routes.d.ts +0 -115
- package/dist/voice/routes.js +0 -92
- package/dist/voice/routes.js.map +0 -1
- package/dist/voice/sentence.d.ts +0 -21
- package/dist/voice/sentence.js +0 -61
- package/dist/voice/sentence.js.map +0 -1
- package/dist/voice/thresholds.d.ts +0 -28
- package/dist/voice/thresholds.js +0 -29
- package/dist/voice/thresholds.js.map +0 -1
- package/dist/workflows/run/cezar-tools.d.ts +0 -45
- package/dist/workflows/run/cezar-tools.js +0 -117
- package/dist/workflows/run/cezar-tools.js.map +0 -1
- package/scripts/mock-cursor-hang-stdin-late.mjs +0 -35
- package/scripts/mock-cursor-hang-stdin.mjs +0 -30
- package/scripts/mock-cursor-print.mjs +0 -237
- package/scripts/omp-ci-wait.mjs +0 -29
- package/scripts/opencode-task-scope.d.mts +0 -18
- package/scripts/opencode-task-scope.mjs +0 -59
- package/scripts/pi-ci-wait.mjs +0 -17
- package/scripts/pi-default-tools.mjs +0 -22
- package/scripts/pi-retry-degraded-service.mjs +0 -16
- package/scripts/probe-cursor-print.mjs +0 -699
- package/scripts/voice-replay.ts +0 -50
- package/web/dist/assets/activity-motion-0wHCeUs7.css +0 -1
- package/web/dist/assets/activity-motion-hhx0e841.js +0 -2
- package/web/dist/assets/activity-route-De0BnSrc.js +0 -1
- package/web/dist/assets/agent-accounts-BCg-578Q.js +0 -18
- package/web/dist/assets/alert-dialog-Dj464rjk.js +0 -1
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +0 -1
- package/web/dist/assets/button-CHUAMTHK.js +0 -3
- package/web/dist/assets/centered-state-DGyy0SuA.js +0 -1
- package/web/dist/assets/cez-idle-BT0U4GN_.js +0 -1
- package/web/dist/assets/chunk-BO2N2NFS-DE6qKn3r.js +0 -131
- package/web/dist/assets/commit-diff-panel-DYtYc_dH.js +0 -1
- package/web/dist/assets/control-locations-CA9TMupq.js +0 -1
- package/web/dist/assets/core-BCsw8oQw.js +0 -12
- package/web/dist/assets/design-icons-DmYTv2r1.js +0 -1
- package/web/dist/assets/diff-controls-BR2uqhwG.js +0 -1
- package/web/dist/assets/diff-tVGVhYyc.js +0 -3
- package/web/dist/assets/diff-view-CNM3u77o.js +0 -11
- package/web/dist/assets/dropdown-menu-DhrBcVgr.js +0 -1
- package/web/dist/assets/es2015-D345RR4o.js +0 -41
- package/web/dist/assets/file-preview-C1eTdJLJ.js +0 -2
- package/web/dist/assets/git-toolbar-Dwz8p8GW.js +0 -1
- package/web/dist/assets/github-BSezqH6f.js +0 -1
- package/web/dist/assets/github-sidebar-model-Ct0DltOv.js +0 -1
- package/web/dist/assets/global-activity-route-BZiYz-B0.js +0 -1
- package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +0 -1
- package/web/dist/assets/hourglass-B0lPAJvT.js +0 -1
- package/web/dist/assets/image-preview-Cq1vDiEo.js +0 -1
- package/web/dist/assets/index-B18AqW0Z.css +0 -1
- package/web/dist/assets/index-D489J7QW.js +0 -14
- package/web/dist/assets/lib-BxQXEXDF.js +0 -1
- package/web/dist/assets/live-protocol-BDY7JJpT.js +0 -64
- package/web/dist/assets/live-refetch-C0kQc3-z.js +0 -1
- package/web/dist/assets/live-worker-BWdeGzQX.ts +0 -34
- package/web/dist/assets/loader-circle-CZkGEdoI.js +0 -1
- package/web/dist/assets/markdown-D7DUNWcJ.js +0 -6
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +0 -1
- package/web/dist/assets/nav-row-styles-BZUUavOF.js +0 -1
- package/web/dist/assets/popover-DRcRI46x.js +0 -1
- package/web/dist/assets/preview-pane-connected-DGkEs_L3.js +0 -3
- package/web/dist/assets/project-router-1m_VlC22.js +0 -1
- package/web/dist/assets/project-scope-context-CaUqlAd7.js +0 -4
- package/web/dist/assets/queries-DYfIpJ-d.js +0 -1
- package/web/dist/assets/repo-git-CU1S5P-y.js +0 -1
- package/web/dist/assets/report-reader-DlZol2Ux.js +0 -1
- package/web/dist/assets/reports-B7QAzibP.css +0 -1
- package/web/dist/assets/reports-DIGGjk7C.js +0 -1
- package/web/dist/assets/run-header-CC7VUTg9.css +0 -1
- package/web/dist/assets/run-header-DPjiPKRe.js +0 -2
- package/web/dist/assets/skill-empty-hint-YDmkqgo-.js +0 -1
- package/web/dist/assets/skills-BMwanop_.js +0 -1
- package/web/dist/assets/skills-DFBiAuJG.js +0 -1
- package/web/dist/assets/skills-workflows-C21NystW.css +0 -1
- package/web/dist/assets/sortable.esm-zp_qkYGV.js +0 -5
- package/web/dist/assets/tab-link-DCUifQ46.js +0 -1
- package/web/dist/assets/task-changes-BZXWvQN3.js +0 -1
- package/web/dist/assets/task-commits-ByI9MSfc.js +0 -1
- package/web/dist/assets/task-files-LJbenpiH.js +0 -1
- package/web/dist/assets/task-github-item-B0CU9lGR.js +0 -1
- package/web/dist/assets/task-thread-CXCN__1a.js +0 -9
- package/web/dist/assets/task-thread-DtQ6uGfQ.css +0 -1
- package/web/dist/assets/textarea-DlVUfdWG.js +0 -1
- package/web/dist/assets/thread-state-BLaCzqeX.js +0 -4
- package/web/dist/assets/toaster-B1MyeHiE.js +0 -1
- package/web/dist/assets/use-hand-to-agent-state-BkmKad8x.js +0 -1
- package/web/dist/assets/use-hand-to-agent-state-C7esPJ-N.css +0 -1
- package/web/dist/assets/useInfiniteQuery-qEY8OhKb.js +0 -1
- package/web/dist/assets/useQuery-DOJQOEBO.js +0 -1
- package/web/dist/assets/workflows-Dbxb-d-6.js +0 -7
- package/web/dist/assets/ws-DvGmrP4z.js +0 -1
- package/web/dist/assets/zoomable-image-5pOUaPEg.js +0 -1
- /package/dist/{runs → delegation}/worker-deletion-proof.js +0 -0
- /package/dist/{core → runners/claude}/claude-executable.d.ts +0 -0
- /package/dist/{core → runners/codex}/codex-stream-error.d.ts +0 -0
- /package/dist/{core → runners/codex}/codex-stream-error.js +0 -0
- /package/dist/{core → runners/codex}/codex-ui-mapper-state.js +0 -0
- /package/dist/{core → runners/opencode}/opencode-task-scope.d.ts +0 -0
- /package/dist/{core → runners/opencode}/opencode-ui-mapper-state.js +0 -0
- /package/dist/{core → runners/opencode}/opencode-usage.js +0 -0
- /package/{scripts → dist/runners/pi/extensions}/pi-project-skills.mjs +0 -0
|
@@ -0,0 +1,1623 @@
|
|
|
1
|
+
import { opencodeHttp, wrapOpenCodeSpawnError as wrapSpawnError } from './opencode-http.js';
|
|
2
|
+
import { AUTO_END_DELAY_MS, DEFAULT_RUNNER_TIMINGS, InputSubmissions, SessionEndedBeforeAcknowledgement, V1TextCoalescer, boundOutputDrainAfterExit, formatModelIdentity, isAbortError, isSignalTerminationExit, markGracefulEnd, nativeMockPath, openingInput, parseModelIdentity, prependSystemPrompt, signalSession, skillOf, spawnSessionLeader, summarizeRunnerStderr, trackChildExit, uiAskQuestions, validSkillMessage } from '@hearsay-tools/squawk/plugin/runtime';
|
|
3
|
+
import { productEnv } from '@hearsay-tools/squawk/plugin';
|
|
4
|
+
import { opencodeSkillWarning, sessionErrorDetail, sessionErrorText } from './opencode-session-error.js';
|
|
5
|
+
import { finished } from 'node:stream/promises';
|
|
6
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
7
|
+
import { randomUUID } from 'node:crypto';
|
|
8
|
+
import { parseEffort } from '@hearsay-tools/squawk/plugin/runtime';
|
|
9
|
+
import { request as httpRequest } from 'node:http';
|
|
10
|
+
import { OPENCODE_FACTS } from './facts.js';
|
|
11
|
+
import { OPENCODE_MOCK } from './mock.js';
|
|
12
|
+
import { OPENCODE_SPEC_SUPPORT } from './spec-support.js';
|
|
13
|
+
import { OPENCODE_MINIMAL_PROMPT_TOOLS, OPENCODE_MINIMAL_SESSION_PERMISSION, opencodeServeLaunch, opencodeSessionBody } from './opencode-minimal.js';
|
|
14
|
+
import { toSquawkQuestions, questionAnswers } from './opencode-questions.js';
|
|
15
|
+
import { isOpencodeDefaultAsk, opencodePermissionAskSchema, opencodePermissionBridge, opencodeUserPermissionRules, } from './opencode-permissions.js';
|
|
16
|
+
import { createOpencodeUiState, mapOpencodeEvent, opencodeSessionStarted, opencodeTurnStarted, } from './opencode-ui-mapper.js';
|
|
17
|
+
const SERVER_START_TIMEOUT_MS = 30_000;
|
|
18
|
+
/**
|
|
19
|
+
* Pause before the one retry of a server that exited before listening (#872).
|
|
20
|
+
* opencode 1.18.33, started within ~2 s of SIGTERM to the previous server on
|
|
21
|
+
* the same DB, printed `ServeError` and exited; the next start succeeded. The
|
|
22
|
+
* failing start can die well inside that window, so the pause alone spans it;
|
|
23
|
+
* it is only ever paid by a start that already failed.
|
|
24
|
+
*/
|
|
25
|
+
export const SERVE_START_RETRY_DELAY_MS = 2_000;
|
|
26
|
+
/** The URL wait saw the process exit before it printed a URL. */
|
|
27
|
+
class ServeExitedBeforeListening extends Error {
|
|
28
|
+
constructor() {
|
|
29
|
+
super('opencode serve exited before it started listening');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Grace between the teardown SIGTERM and the SIGKILL that follows it. */
|
|
33
|
+
export const KILL_GRACE_MS = 4_000;
|
|
34
|
+
/**
|
|
35
|
+
* `AgentRunner` over `opencode serve` — a headless HTTP server (the same one
|
|
36
|
+
* the opencode TUI talks to) with an SSE event stream. One server per session,
|
|
37
|
+
* bound to the run's `cwd` (worktree), gives OpenCode the same multi-turn shape
|
|
38
|
+
* as the Claude runner: each `sendMessage` posts another prompt to the same
|
|
39
|
+
* session (history is kept server-side), and `session/abort` cancels.
|
|
40
|
+
* Continue and restart recovery GET /session/{id} and prompt that session; a 404
|
|
41
|
+
* falls back to one fresh session with the full system prompt.
|
|
42
|
+
*
|
|
43
|
+
* Auth = the host's opencode config/logins. OpenCode's own permission config
|
|
44
|
+
* governs tools: Squawk answers OpenCode's built-in default asks once and routes
|
|
45
|
+
* asks the user configured to the cockpit (hearsay-tools/cezarion#1266); this
|
|
46
|
+
* adapter does not map `spec.toolGrant`. Governed delegation adds only a
|
|
47
|
+
* supported session-level task deny rule.
|
|
48
|
+
* `spec.model` is `provider/model`.
|
|
49
|
+
*/
|
|
50
|
+
/** How long an idle session may sit on steered input before it counts as a lost wake. */
|
|
51
|
+
export const OPENCODE_LOST_WAKE_GRACE_MS = 2_000;
|
|
52
|
+
export class OpencodeServerRunner {
|
|
53
|
+
backend = 'opencode';
|
|
54
|
+
specSupport = OPENCODE_SPEC_SUPPORT;
|
|
55
|
+
systemPromptOnResume = OPENCODE_FACTS.systemPromptOnResume;
|
|
56
|
+
facts = OPENCODE_FACTS;
|
|
57
|
+
inputDelivery = OPENCODE_FACTS.inputDelivery;
|
|
58
|
+
bin;
|
|
59
|
+
timeoutMs;
|
|
60
|
+
serverStartTimeoutMs;
|
|
61
|
+
lastSession = null;
|
|
62
|
+
constructor(opts = {}) {
|
|
63
|
+
this.bin = opts.bin ?? productEnv('OPENCODE_BIN') ?? (productEnv('DRY_RUN') === '1'
|
|
64
|
+
? nativeMockPath(OPENCODE_MOCK) : 'opencode');
|
|
65
|
+
this.timeoutMs = opts.timeoutMs;
|
|
66
|
+
this.serverStartTimeoutMs = opts.serverStartTimeoutMs ?? SERVER_START_TIMEOUT_MS;
|
|
67
|
+
}
|
|
68
|
+
run(spec, onEvent) {
|
|
69
|
+
return this.startSession(spec, onEvent, { autoEndAfterFirstTurn: true }).result;
|
|
70
|
+
}
|
|
71
|
+
async interrupt() {
|
|
72
|
+
this.lastSession?.interrupt();
|
|
73
|
+
}
|
|
74
|
+
startSession(spec, onEvent, opts = {}) {
|
|
75
|
+
const session = new OpencodeSession(this.bin, this.timeoutMs ?? spec.timings?.runTimeoutMs ?? DEFAULT_RUNNER_TIMINGS.runTimeoutMs, this.serverStartTimeoutMs, spec, onEvent, opts);
|
|
76
|
+
this.lastSession = session;
|
|
77
|
+
return session;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/** One live `opencode serve` process driving a single session. */
|
|
81
|
+
class OpencodeSession {
|
|
82
|
+
bin;
|
|
83
|
+
serverStartTimeoutMs;
|
|
84
|
+
spec;
|
|
85
|
+
onEvent;
|
|
86
|
+
opts;
|
|
87
|
+
result;
|
|
88
|
+
/** The live server process. A start retry replaces it (#872), so every
|
|
89
|
+
* liveness, pid, signal and stderr read goes through this field. */
|
|
90
|
+
serve;
|
|
91
|
+
/** The first start, once the retry spawned for it ALSO exited before
|
|
92
|
+
* listening on its own (#872) — the one case that names both attempts. */
|
|
93
|
+
failedStart;
|
|
94
|
+
/** The retry's own spawn threw synchronously (EAGAIN, EMFILE…), so no second
|
|
95
|
+
* process exists and the first start's exit alone would misname the failure. */
|
|
96
|
+
retrySpawnError;
|
|
97
|
+
/** Aborted by teardown; cancels a pending start retry. */
|
|
98
|
+
startRetry = new AbortController();
|
|
99
|
+
serverOpen = true;
|
|
100
|
+
exitFailure;
|
|
101
|
+
baseUrl;
|
|
102
|
+
sessionId;
|
|
103
|
+
ready;
|
|
104
|
+
sse = new AbortController();
|
|
105
|
+
toolCalls = [];
|
|
106
|
+
textChunks = [];
|
|
107
|
+
/** Per text-part cursor so only newly-appended text is buffered (deltas). */
|
|
108
|
+
textSeen = new Map();
|
|
109
|
+
/** Streamed part deltas buffered per part — v1 `text` is emitted once per
|
|
110
|
+
* finished part (claude parity: one event per complete block), never per
|
|
111
|
+
* delta, so the persisted transcript and the headless CLI get whole
|
|
112
|
+
* paragraphs. Streaming display rides protocol v2's `item.delta`. */
|
|
113
|
+
textCoalescer = new V1TextCoalescer((text) => {
|
|
114
|
+
this.textChunks.push(text);
|
|
115
|
+
this.emit({ type: 'text', text });
|
|
116
|
+
});
|
|
117
|
+
toolsSeen = new Set();
|
|
118
|
+
/** messageID → role. Parts carry no role; only assistant parts are surfaced
|
|
119
|
+
* (the user's own message also streams as parts over the same SSE feed). */
|
|
120
|
+
msgRole = new Map();
|
|
121
|
+
/** Accepted agent prompts, the user message carrying each, and prompts that
|
|
122
|
+
* opened their turn (read when that turn goes idle) (#505). */
|
|
123
|
+
submissions = new InputSubmissions();
|
|
124
|
+
userMessageSubmission = new Map();
|
|
125
|
+
turnOpeners = new Set();
|
|
126
|
+
refusedBeforeOpening = false;
|
|
127
|
+
turnErrored = false;
|
|
128
|
+
lostWakeTimer;
|
|
129
|
+
/** Steered input an idle left unanswered: the server may still start a follow-on run for it.
|
|
130
|
+
* Settles when that run starts, or when the lost-wake grace or a teardown ends the wait. */
|
|
131
|
+
followOn;
|
|
132
|
+
followOnResolve = () => { };
|
|
133
|
+
refusedForFollowOn = false;
|
|
134
|
+
tokensUsed = 0;
|
|
135
|
+
/** OpenCode reports a cumulative cost for each message, not the session. */
|
|
136
|
+
costByMessage = new Map();
|
|
137
|
+
/** A prompt was posted and its `session.idle` has not arrived yet. */
|
|
138
|
+
turnActive = false;
|
|
139
|
+
agentInputReady = false;
|
|
140
|
+
agentRequest;
|
|
141
|
+
/** The agent request `end()` aborted: that abort is the session's close (hearsay-tools/squawk#3508). */
|
|
142
|
+
endedAgentRequest;
|
|
143
|
+
/** Human prompts scheduled behind the active turn, through their HTTP ack. */
|
|
144
|
+
pendingPromptRequests = 0;
|
|
145
|
+
/** A provider error must not abort its own independently arriving receipt. */
|
|
146
|
+
agentAcknowledgement;
|
|
147
|
+
providerErrorPending;
|
|
148
|
+
/** `finishTurn` ran for the current turn — repeats and stray idles no-op. */
|
|
149
|
+
turnEnded = false;
|
|
150
|
+
/** Monotonic identity used to reject async work completed by an older turn. */
|
|
151
|
+
turnSerial = 0;
|
|
152
|
+
/** Settles when the open turn finishes; re-armed at each turn start. The
|
|
153
|
+
* gate `prompt` waits on so turns never overlap (see there). */
|
|
154
|
+
turnFinished = Promise.resolve();
|
|
155
|
+
turnFinishedResolve = () => { };
|
|
156
|
+
/** Protocol v2 emission — additive alongside v1 (`onEvent` keeps flowing
|
|
157
|
+
* byte-identical); the channel is `opts.onUiEvent` (RunManager wiring
|
|
158
|
+
* lands in R2 step 2.1). Both streams take their turn-end from the wire
|
|
159
|
+
* `session.idle` (v1 since #4 — see `finishTurn`). */
|
|
160
|
+
uiState = createOpencodeUiState();
|
|
161
|
+
/** Question tool parts are snapshots. Once capture starts for an identity,
|
|
162
|
+
* every later state snapshot for that same part/call is already handled. */
|
|
163
|
+
handledQuestionParts = new Set();
|
|
164
|
+
pendingQuestion;
|
|
165
|
+
questionCapture;
|
|
166
|
+
questionReply;
|
|
167
|
+
/** User text submitted while a question reply POST is unsettled. It is not
|
|
168
|
+
* another answer; deliver it as ordinary prompts only after reply success. */
|
|
169
|
+
queuedQuestionMessages = [];
|
|
170
|
+
/** Bumped by `discardQueuedMessages` so a `prompt()` waiter that captured
|
|
171
|
+
* the previous generation returns instead of posting after idle. */
|
|
172
|
+
queuedPromptGeneration = 0;
|
|
173
|
+
/** Human prompts of the current generation, held from `sendMessage` until they post (#486). */
|
|
174
|
+
humanPromptWaiters = 0;
|
|
175
|
+
/** Native ask id → its live state, entered on receipt (hearsay-tools/cezarion#1266). Any
|
|
176
|
+
* entry holds agent input and auto-end, like a pending question, until OpenCode settles it. */
|
|
177
|
+
pendingPermissions = new Map();
|
|
178
|
+
/** Native ask ids already taken. Outlives retirement, so a duplicated frame is handled once. */
|
|
179
|
+
handledPermissionIds = new Set();
|
|
180
|
+
/** Asks are classified one at a time, in arrival order, after the one config read. */
|
|
181
|
+
permissionQueue = Promise.resolve();
|
|
182
|
+
permissionRules;
|
|
183
|
+
answeredDefaultAsk = false;
|
|
184
|
+
autoEndTimer;
|
|
185
|
+
/** Set by `endWhenQuiet`: the session takes no more input and ends once no late ask is pending. */
|
|
186
|
+
closingAfterDone = false;
|
|
187
|
+
timedOut = false;
|
|
188
|
+
openingPromptFailed = false;
|
|
189
|
+
constructor(bin, timeoutMs, serverStartTimeoutMs, spec, onEvent, opts) {
|
|
190
|
+
this.bin = bin;
|
|
191
|
+
this.serverStartTimeoutMs = serverStartTimeoutMs;
|
|
192
|
+
this.spec = spec;
|
|
193
|
+
this.onEvent = onEvent;
|
|
194
|
+
this.opts = opts;
|
|
195
|
+
this.serve = this.spawnServe();
|
|
196
|
+
// The server prints its URL on stdout once listening.
|
|
197
|
+
const urlReady = this.startServer();
|
|
198
|
+
const limitMs = spec.timeoutMs ?? timeoutMs;
|
|
199
|
+
let deadline;
|
|
200
|
+
if (limitMs > 0) {
|
|
201
|
+
deadline = setTimeout(() => {
|
|
202
|
+
this.timedOut = true;
|
|
203
|
+
this.interrupt();
|
|
204
|
+
}, limitMs);
|
|
205
|
+
deadline.unref?.();
|
|
206
|
+
}
|
|
207
|
+
this.ready = (async () => {
|
|
208
|
+
this.baseUrl = await urlReady;
|
|
209
|
+
await this.bootstrap();
|
|
210
|
+
})();
|
|
211
|
+
this.result = this.finishSession(deadline, limitMs);
|
|
212
|
+
}
|
|
213
|
+
/** Wait out the child, then map its exit onto the v1 result. */
|
|
214
|
+
async finishSession(deadline, limitMs) {
|
|
215
|
+
try {
|
|
216
|
+
await this.ready;
|
|
217
|
+
// Live for the whole session; the SSE loop runs until end()/interrupt.
|
|
218
|
+
await this.serve.exited;
|
|
219
|
+
}
|
|
220
|
+
catch (err) {
|
|
221
|
+
if (!this.timedOut && !this.openingPromptFailed) {
|
|
222
|
+
this.exitFailure = `opencode: ${err instanceof Error ? err.message : String(err)}`;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
finally {
|
|
226
|
+
if (deadline)
|
|
227
|
+
clearTimeout(deadline);
|
|
228
|
+
if (this.autoEndTimer)
|
|
229
|
+
clearTimeout(this.autoEndTimer);
|
|
230
|
+
this.sse.abort();
|
|
231
|
+
this.serverOpen = false;
|
|
232
|
+
this.clearLostWakeTimer();
|
|
233
|
+
this.agentRequest?.abort();
|
|
234
|
+
this.expirePermissions('session ended');
|
|
235
|
+
this.terminate();
|
|
236
|
+
}
|
|
237
|
+
const serve = this.serve;
|
|
238
|
+
await serve.exited;
|
|
239
|
+
await serve.outputDrained;
|
|
240
|
+
if (serve.spawnFailed) {
|
|
241
|
+
this.emit({ type: 'error', message: serve.spawnFailed.message });
|
|
242
|
+
throw serve.spawnFailed;
|
|
243
|
+
}
|
|
244
|
+
this.reportServeFailure(serve);
|
|
245
|
+
return this.resultFromCleanExit(limitMs);
|
|
246
|
+
}
|
|
247
|
+
reportServeFailure(serve) {
|
|
248
|
+
// SSE closure can precede the process exit event. Choose one authoritative
|
|
249
|
+
// error after settlement, before the synthetic turn-end, retaining the code.
|
|
250
|
+
const code = serve.child.exitCode;
|
|
251
|
+
const signal = serve.child.signalCode;
|
|
252
|
+
const crashed = (signal !== null && !serve.signalled)
|
|
253
|
+
|| (code !== null && code !== 0 && !(serve.signalled && isSignalTerminationExit(code)));
|
|
254
|
+
if (this.timedOut || (!crashed && !this.exitFailure))
|
|
255
|
+
return;
|
|
256
|
+
const stderr = serve.stderrChunks.join('');
|
|
257
|
+
const detail = summarizeRunnerStderr(stderr);
|
|
258
|
+
if (this.retrySpawnError) {
|
|
259
|
+
if (stderr.trim())
|
|
260
|
+
this.emit({ type: 'note', message: `opencode serve stderr:\n${stderr}` });
|
|
261
|
+
this.emit({ type: 'error', message: `opencode serve exited before listening (${describeEarlyExit(serve)}) and its retry could not start: ${this.retrySpawnError.message}` });
|
|
262
|
+
}
|
|
263
|
+
else if (this.failedStart) {
|
|
264
|
+
// #872: the retry failed too — one error naming both attempts.
|
|
265
|
+
const attempts = [this.failedStart, serve];
|
|
266
|
+
const notes = attempts.map((attempt, i) => {
|
|
267
|
+
const text = attempt.stderrChunks.join('');
|
|
268
|
+
return text.trim() ? `opencode serve stderr (attempt ${i + 1}):\n${text}` : '';
|
|
269
|
+
}).filter(Boolean);
|
|
270
|
+
if (notes.length)
|
|
271
|
+
this.emit({ type: 'note', message: notes.join('\n') });
|
|
272
|
+
const described = attempts.map((attempt, i) => `attempt ${i + 1}: ${describeEarlyExit(attempt)}`);
|
|
273
|
+
this.emit({ type: 'error', message: `opencode serve exited before listening on both attempts — ${described.join('; ')}` });
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
if (stderr.trim())
|
|
277
|
+
this.emit({ type: 'note', message: `opencode serve stderr:\n${stderr}` });
|
|
278
|
+
this.emit({ type: 'error', message: crashed ? `opencode serve exited with ${describeExit(serve)}${detail ? ` — ${detail}` : ''}` : this.exitFailure });
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
resultFromCleanExit(limitMs) {
|
|
282
|
+
// Timeout/interrupt can cut the SSE feed before its `session.idle` —
|
|
283
|
+
// close the turn (idempotent) so consumers still see the v1 boundary,
|
|
284
|
+
// and recover prose buffered mid-part.
|
|
285
|
+
this.finishTurn();
|
|
286
|
+
this.textCoalescer.flush();
|
|
287
|
+
// Chunks are whole blocks now (one per finished part), so newline-join
|
|
288
|
+
// like the other runners, not the old delta concatenation.
|
|
289
|
+
const base = {
|
|
290
|
+
text: this.textChunks.join('\n').trim(), toolCalls: this.toolCalls,
|
|
291
|
+
tokensUsed: this.tokensUsed, sessionId: this.sessionId ?? this.spec.sessionId,
|
|
292
|
+
};
|
|
293
|
+
if (this.timedOut) {
|
|
294
|
+
const mins = Math.round((limitMs / 60_000) * 10) / 10;
|
|
295
|
+
this.emit({ type: 'error', message: `opencode timed out after ${mins}m and was killed` });
|
|
296
|
+
}
|
|
297
|
+
this.emit({ type: 'done' });
|
|
298
|
+
return base;
|
|
299
|
+
}
|
|
300
|
+
get open() {
|
|
301
|
+
return this.serverOpen && !this.closingAfterDone;
|
|
302
|
+
}
|
|
303
|
+
get closingQuietly() { return this.serverOpen && this.closingAfterDone; }
|
|
304
|
+
get pid() {
|
|
305
|
+
return this.serve.child.pid;
|
|
306
|
+
}
|
|
307
|
+
skillCommand;
|
|
308
|
+
refusesSkill(content) {
|
|
309
|
+
return !validSkillMessage(content) || Boolean(skillOf(content) && (!this.sessionId || this.turnActive || this.pendingPromptRequests || this.skillCommand));
|
|
310
|
+
}
|
|
311
|
+
sendAgentMessage(content, inputIds = []) {
|
|
312
|
+
if (this.refusesSkill(content))
|
|
313
|
+
return false;
|
|
314
|
+
// #505: a busy session is steered with prompt_async; only a pending native question or
|
|
315
|
+
// permission ask, a queued human prompt or an in-flight agent POST refuses.
|
|
316
|
+
// Nothing may run ahead of the task: refuse until the opening prompt has started,
|
|
317
|
+
// then hint once so the refused input steers the opening turn.
|
|
318
|
+
if (this.serverOpen && this.turnSerial === 0) {
|
|
319
|
+
this.refusedBeforeOpening = true;
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
if (!this.open || !this.sessionId || this.pendingQuestion || this.questionReply || this.pendingPermissions.size > 0 ||
|
|
323
|
+
this.pendingPromptRequests > 0 || this.agentRequest)
|
|
324
|
+
return false;
|
|
325
|
+
// A prompt posted before a due follow-on run would have that run's idle close its turn, and
|
|
326
|
+
// its own run would then surface nothing (PR #1291 CI): it waits for that run, as for a turn.
|
|
327
|
+
if (this.followOn) {
|
|
328
|
+
this.refusedForFollowOn = true;
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
this.agentInputReady = false;
|
|
332
|
+
const request = new AbortController();
|
|
333
|
+
this.agentRequest = request;
|
|
334
|
+
const text = textOf(content);
|
|
335
|
+
const submissionId = randomUUID();
|
|
336
|
+
const steering = this.turnActive;
|
|
337
|
+
this.submissions.accept(submissionId, inputIds, text);
|
|
338
|
+
if (!steering && inputIds.length)
|
|
339
|
+
this.turnOpeners.add(submissionId);
|
|
340
|
+
const post = steering ? this.steerPrompt(text, request.signal) : this.prompt(text, 'agent', request.signal, this.queuedPromptGeneration, skillOf(content));
|
|
341
|
+
const acknowledgement = post.catch((err) => {
|
|
342
|
+
this.submissions.consume(submissionId);
|
|
343
|
+
this.turnOpeners.delete(submissionId);
|
|
344
|
+
throw this.endedAgentRequest === request && isAbortError(err) ? new SessionEndedBeforeAcknowledgement() : err;
|
|
345
|
+
}).finally(() => {
|
|
346
|
+
if (this.agentRequest === request)
|
|
347
|
+
this.agentRequest = undefined;
|
|
348
|
+
if (this.serverOpen && !this.providerErrorPending && !this.turnActive && !this.pendingQuestion && !this.questionReply &&
|
|
349
|
+
this.pendingPermissions.size === 0) {
|
|
350
|
+
this.agentInputReady = true;
|
|
351
|
+
this.opts.onAgentInputReady?.();
|
|
352
|
+
this.scheduleAutoEnd();
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
this.agentAcknowledgement = acknowledgement;
|
|
356
|
+
return acknowledgement;
|
|
357
|
+
}
|
|
358
|
+
sendMessage(content) {
|
|
359
|
+
if (this.refusesSkill(content))
|
|
360
|
+
return false;
|
|
361
|
+
this.agentInputReady = false;
|
|
362
|
+
if (!this.open)
|
|
363
|
+
return false;
|
|
364
|
+
this.cancelAutoEnd();
|
|
365
|
+
const text = textOf(content);
|
|
366
|
+
if (!text && !skillOf(content))
|
|
367
|
+
return true;
|
|
368
|
+
if (this.questionReply) {
|
|
369
|
+
this.queuedQuestionMessages.push(text);
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
if (this.pendingQuestion) {
|
|
373
|
+
const pending = this.pendingQuestion;
|
|
374
|
+
const reply = this.replyQuestion(pending, text);
|
|
375
|
+
this.questionReply = reply;
|
|
376
|
+
const clearReply = () => {
|
|
377
|
+
if (this.questionReply === reply)
|
|
378
|
+
this.questionReply = undefined;
|
|
379
|
+
this.notifyAgentInputReady();
|
|
380
|
+
};
|
|
381
|
+
void reply.then(clearReply, clearReply);
|
|
382
|
+
return true;
|
|
383
|
+
}
|
|
384
|
+
// `prompt` already emitted the note and closed the turn before rethrowing,
|
|
385
|
+
// and a rejected `ready` already failed the session on the result path —
|
|
386
|
+
// there is nothing left to report here.
|
|
387
|
+
this.deliverPrompt(text, skillOf(content));
|
|
388
|
+
return true;
|
|
389
|
+
}
|
|
390
|
+
discardQueuedMessages() {
|
|
391
|
+
this.queuedPromptGeneration += 1;
|
|
392
|
+
this.queuedQuestionMessages.length = 0;
|
|
393
|
+
this.humanPromptWaiters = 0; // #486: must read false immediately, not when waiters resume
|
|
394
|
+
}
|
|
395
|
+
holdsHumanInput() {
|
|
396
|
+
return this.humanPromptWaiters > 0 || this.queuedQuestionMessages.length > 0;
|
|
397
|
+
}
|
|
398
|
+
heldHumanInputCount() {
|
|
399
|
+
return this.humanPromptWaiters + this.queuedQuestionMessages.length;
|
|
400
|
+
}
|
|
401
|
+
deliverPrompt(text, skill) {
|
|
402
|
+
this.pendingPromptRequests += 1;
|
|
403
|
+
// Held from admission, not from `ready`; a start that fails releases it (hearsay-tools/cezarion#2991).
|
|
404
|
+
const generation = this.queuedPromptGeneration;
|
|
405
|
+
this.humanPromptWaiters += 1;
|
|
406
|
+
let posting = false;
|
|
407
|
+
void this.ready.then(() => { posting = true; return this.prompt(text, 'human', undefined, generation, skill); }).then(() => {
|
|
408
|
+
this.pendingPromptRequests -= 1;
|
|
409
|
+
this.notifyAgentInputReady();
|
|
410
|
+
}, () => {
|
|
411
|
+
if (!posting && generation === this.queuedPromptGeneration)
|
|
412
|
+
this.humanPromptWaiters = Math.max(0, this.humanPromptWaiters - 1);
|
|
413
|
+
this.pendingPromptRequests -= 1;
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
notifyAgentInputReady() {
|
|
417
|
+
if (this.serverOpen && this.turnEnded && !this.turnActive && !this.pendingQuestion &&
|
|
418
|
+
!this.questionReply && this.pendingPermissions.size === 0 && this.pendingPromptRequests === 0) {
|
|
419
|
+
this.agentInputReady = true;
|
|
420
|
+
this.opts.onAgentInputReady?.();
|
|
421
|
+
}
|
|
422
|
+
else if (this.serverOpen && this.turnActive && !this.pendingQuestion && !this.questionReply &&
|
|
423
|
+
this.pendingPermissions.size === 0 && this.pendingPromptRequests === 0 && !this.agentRequest) {
|
|
424
|
+
// A reply or prompt acknowledgement cleared the last barrier mid-turn: held agent
|
|
425
|
+
// input can steer the running turn now, not after it (#505 local review).
|
|
426
|
+
this.opts.onAgentInputReady?.();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
cancelAutoEnd() {
|
|
430
|
+
if (!this.autoEndTimer)
|
|
431
|
+
return;
|
|
432
|
+
clearTimeout(this.autoEndTimer);
|
|
433
|
+
this.autoEndTimer = undefined;
|
|
434
|
+
}
|
|
435
|
+
scheduleAutoEnd() {
|
|
436
|
+
if (!(this.opts.autoEndAfterFirstTurn || this.closingAfterDone) || !this.serverOpen || this.autoEndTimer || this.agentRequest ||
|
|
437
|
+
this.pendingPermissions.size)
|
|
438
|
+
return;
|
|
439
|
+
this.autoEndTimer = setTimeout(() => {
|
|
440
|
+
this.autoEndTimer = undefined;
|
|
441
|
+
if (this.closingAfterDone || this.opts.shouldAutoEnd?.() !== false)
|
|
442
|
+
this.end();
|
|
443
|
+
}, AUTO_END_DELAY_MS);
|
|
444
|
+
this.autoEndTimer.unref?.();
|
|
445
|
+
}
|
|
446
|
+
/** A main-session `permission.asked` can follow the idle (`handlePermissionAsked`), so a done
|
|
447
|
+
* waits `AUTO_END_DELAY_MS` for one; its ask holds the close until the run it reopened ends. */
|
|
448
|
+
endWhenQuiet() {
|
|
449
|
+
if (!this.serverOpen || this.closingAfterDone)
|
|
450
|
+
return;
|
|
451
|
+
this.closingAfterDone = true;
|
|
452
|
+
this.agentInputReady = false;
|
|
453
|
+
if (this.turnActive)
|
|
454
|
+
return;
|
|
455
|
+
this.scheduleAutoEnd();
|
|
456
|
+
}
|
|
457
|
+
end() {
|
|
458
|
+
if (!this.serverOpen)
|
|
459
|
+
return;
|
|
460
|
+
this.serverOpen = false;
|
|
461
|
+
this.settleSkillCommand(new SessionEndedBeforeAcknowledgement());
|
|
462
|
+
this.clearLostWakeTimer();
|
|
463
|
+
this.endedAgentRequest = this.agentRequest;
|
|
464
|
+
this.agentRequest?.abort();
|
|
465
|
+
this.expirePermissions('session ended');
|
|
466
|
+
this.sse.abort();
|
|
467
|
+
markGracefulEnd(this.serve.child);
|
|
468
|
+
this.terminate();
|
|
469
|
+
}
|
|
470
|
+
interrupt() {
|
|
471
|
+
this.serverOpen = false;
|
|
472
|
+
this.settleSkillCommand(new SessionEndedBeforeAcknowledgement());
|
|
473
|
+
this.clearLostWakeTimer();
|
|
474
|
+
this.agentRequest?.abort();
|
|
475
|
+
this.expirePermissions('session ended');
|
|
476
|
+
if (this.baseUrl && this.sessionId) {
|
|
477
|
+
void this.http('POST', `/session/${this.sessionId}/abort`, undefined).catch(() => undefined);
|
|
478
|
+
}
|
|
479
|
+
this.sse.abort();
|
|
480
|
+
this.terminate();
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* The one place either signal is sent: SIGTERM now, SIGKILL once the grace
|
|
484
|
+
* window elapses.
|
|
485
|
+
*
|
|
486
|
+
* Both steps gate on `hasExited()`, never on `child.killed` — the latter
|
|
487
|
+
* flips the moment SIGTERM is *delivered*, so the old nested
|
|
488
|
+
* `exitCode == null && !killed` guard disarmed the escalation for exactly the
|
|
489
|
+
* server it was written for: one that installs its own SIGTERM handler stayed
|
|
490
|
+
* alive with `killed = true` and `exitCode === null`, outliving the whole
|
|
491
|
+
* window (#858, the same defect #844 fixed for the other two backends). Every
|
|
492
|
+
* caller here is followed by `await serve.exited`, so a server that survived
|
|
493
|
+
* SIGTERM did not just leak — it hung the session's result forever.
|
|
494
|
+
*
|
|
495
|
+
* One teardown per session: all three call sites can run for the same session
|
|
496
|
+
* (`interrupt()` on the deadline, then the result promise's `finally`), and
|
|
497
|
+
* once SIGTERM is out with SIGKILL armed there is nothing a second pass adds.
|
|
498
|
+
* The old `!child.killed` test deduplicated this as a side effect of being
|
|
499
|
+
* wrong; `signalled` keeps that property on purpose. It lives on the process,
|
|
500
|
+
* not the session: only the live one is ever signalled, and a start retry
|
|
501
|
+
* (#872) replaces it only after the first exited unsignalled.
|
|
502
|
+
*
|
|
503
|
+
* Teardown also cancels a pending start retry, so no second server spawns
|
|
504
|
+
* after `end()`, `interrupt()` or the deadline.
|
|
505
|
+
*/
|
|
506
|
+
terminate() {
|
|
507
|
+
this.startRetry.abort();
|
|
508
|
+
const serve = this.serve;
|
|
509
|
+
if (serve.signalled || serve.hasExited())
|
|
510
|
+
return;
|
|
511
|
+
serve.signalled = true;
|
|
512
|
+
signalSession(serve.child, 'SIGTERM');
|
|
513
|
+
setTimeout(() => {
|
|
514
|
+
if (serve.hasExited())
|
|
515
|
+
return;
|
|
516
|
+
signalSession(serve.child, 'SIGKILL');
|
|
517
|
+
}, KILL_GRACE_MS).unref?.();
|
|
518
|
+
}
|
|
519
|
+
// ---- server lifecycle ---------------------------------------------------
|
|
520
|
+
/** Spawn one `opencode serve` on a random high port and wire its lifecycle.
|
|
521
|
+
* A synchronous spawn throw is wrapped; an async spawn error is latched on
|
|
522
|
+
* the process record. */
|
|
523
|
+
spawnServe() {
|
|
524
|
+
// Random high port; the actual bound URL is read back from stdout.
|
|
525
|
+
const port = 40000 + Math.floor(Math.random() * 20000);
|
|
526
|
+
let child;
|
|
527
|
+
try {
|
|
528
|
+
const launch = opencodeServeLaunch(this.spec, port);
|
|
529
|
+
child = spawnSessionLeader(this.bin, launch.args, { cwd: this.spec.cwd, timings: this.spec.timings, scope: this.spec.scope, env: launch.env });
|
|
530
|
+
}
|
|
531
|
+
catch (err) {
|
|
532
|
+
throw wrapSpawnError(err, this.bin);
|
|
533
|
+
}
|
|
534
|
+
const hasExited = trackChildExit(child);
|
|
535
|
+
boundOutputDrainAfterExit(child);
|
|
536
|
+
// `exit` settles process liveness, not its pipes. The shared post-exit drain
|
|
537
|
+
// bound prevents an inherited descendant pipe from retaining this session.
|
|
538
|
+
const outputDrained = Promise.all([child.stdout, child.stderr].map(stream => finished(stream, { cleanup: true }).catch(() => undefined)));
|
|
539
|
+
const exited = new Promise((resolve) => {
|
|
540
|
+
child.once('exit', () => { this.settleSkillCommand(new SessionEndedBeforeAcknowledgement()); resolve(); });
|
|
541
|
+
child.once('close', () => resolve());
|
|
542
|
+
});
|
|
543
|
+
const serve = {
|
|
544
|
+
child, hasExited, exited, outputDrained, port,
|
|
545
|
+
stderrChunks: [], spawnFailed: null, signalled: false,
|
|
546
|
+
};
|
|
547
|
+
child.on('error', (err) => {
|
|
548
|
+
serve.spawnFailed = wrapSpawnError(err, this.bin);
|
|
549
|
+
});
|
|
550
|
+
child.stderr.setEncoding('utf8');
|
|
551
|
+
child.stderr.on('data', (chunk) => serve.stderrChunks.push(chunk));
|
|
552
|
+
return serve;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Wait for the server URL, retrying once — after `SERVE_START_RETRY_DELAY_MS`,
|
|
556
|
+
* on a fresh port — when the process exited before it printed one (#872).
|
|
557
|
+
* Never retried: a spawn error (the process never ran), the no-URL timeout
|
|
558
|
+
* (it falls back to the requested port), and a session already torn down.
|
|
559
|
+
*/
|
|
560
|
+
async startServer() {
|
|
561
|
+
try {
|
|
562
|
+
return await this.waitForServerUrl(this.serve);
|
|
563
|
+
}
|
|
564
|
+
catch (err) {
|
|
565
|
+
const first = this.serve;
|
|
566
|
+
if (!(err instanceof ServeExitedBeforeListening))
|
|
567
|
+
throw err;
|
|
568
|
+
// Settle the process first: an ENOENT `error` and late stderr both land
|
|
569
|
+
// around `exit`, and the retry decision and its note need them.
|
|
570
|
+
await first.exited;
|
|
571
|
+
await first.outputDrained;
|
|
572
|
+
if (first.spawnFailed || first.child.pid === undefined || !this.serverOpen || this.timedOut)
|
|
573
|
+
throw err;
|
|
574
|
+
const detail = summarizeRunnerStderr(first.stderrChunks.join(''));
|
|
575
|
+
this.emit({
|
|
576
|
+
type: 'note',
|
|
577
|
+
message: `opencode serve exited before listening (${describeExit(first)}); retrying once${detail ? ` — ${detail}` : ''}`,
|
|
578
|
+
});
|
|
579
|
+
try {
|
|
580
|
+
await delay(SERVE_START_RETRY_DELAY_MS, undefined, { signal: this.startRetry.signal });
|
|
581
|
+
}
|
|
582
|
+
catch {
|
|
583
|
+
// Torn down during the pause: report the first start's failure as before.
|
|
584
|
+
throw err;
|
|
585
|
+
}
|
|
586
|
+
if (this.startRetry.signal.aborted || !this.serverOpen || this.timedOut)
|
|
587
|
+
throw err;
|
|
588
|
+
let next;
|
|
589
|
+
try {
|
|
590
|
+
next = this.spawnServe();
|
|
591
|
+
}
|
|
592
|
+
catch (spawnErr) {
|
|
593
|
+
this.retrySpawnError = spawnErr instanceof Error ? spawnErr : new Error(String(spawnErr));
|
|
594
|
+
throw spawnErr;
|
|
595
|
+
}
|
|
596
|
+
this.serve = next;
|
|
597
|
+
if (next.child.pid !== undefined)
|
|
598
|
+
this.opts.onPidChange?.(next.child.pid);
|
|
599
|
+
try {
|
|
600
|
+
return await this.waitForServerUrl(next);
|
|
601
|
+
}
|
|
602
|
+
catch (retryErr) {
|
|
603
|
+
// Only an unprompted second early exit names both attempts; a retry
|
|
604
|
+
// torn down by the session reports through the ordinary paths.
|
|
605
|
+
if (retryErr instanceof ServeExitedBeforeListening && !next.signalled)
|
|
606
|
+
this.failedStart = first;
|
|
607
|
+
throw retryErr;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
waitForServerUrl(serve) {
|
|
612
|
+
const { child } = serve;
|
|
613
|
+
return new Promise((resolve, reject) => {
|
|
614
|
+
let buffer = '';
|
|
615
|
+
const timer = setTimeout(() => {
|
|
616
|
+
cleanup();
|
|
617
|
+
// Nothing parsed — try the port we asked for.
|
|
618
|
+
resolve(`http://127.0.0.1:${serve.port}`);
|
|
619
|
+
}, this.serverStartTimeoutMs);
|
|
620
|
+
timer.unref?.();
|
|
621
|
+
const onData = (chunk) => {
|
|
622
|
+
buffer += chunk;
|
|
623
|
+
const m = /https?:\/\/[\d.]+:\d+/.exec(buffer);
|
|
624
|
+
if (m) {
|
|
625
|
+
cleanup();
|
|
626
|
+
resolve(m[0]);
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
const onExit = () => { cleanup(); reject(new ServeExitedBeforeListening()); };
|
|
630
|
+
// A failed spawn emits `error` and `close`, never `exit` (hearsay-tools/cezarion#895).
|
|
631
|
+
const onError = () => { if (child.pid === undefined)
|
|
632
|
+
onExit(); };
|
|
633
|
+
const cleanup = () => {
|
|
634
|
+
clearTimeout(timer);
|
|
635
|
+
child.stdout.off('data', onData);
|
|
636
|
+
child.off('exit', onExit);
|
|
637
|
+
child.off('error', onError);
|
|
638
|
+
};
|
|
639
|
+
child.stdout.setEncoding('utf8');
|
|
640
|
+
child.stdout.on('data', onData);
|
|
641
|
+
child.once('exit', onExit);
|
|
642
|
+
child.on('error', onError);
|
|
643
|
+
if (serve.spawnFailed)
|
|
644
|
+
onError();
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
/** 404 → `'missing'`. Any other non-OK status fails bootstrap (no fallback). */
|
|
648
|
+
async tryGetSession(id) {
|
|
649
|
+
if (!this.baseUrl)
|
|
650
|
+
throw new Error('opencode server not ready');
|
|
651
|
+
const res = await fetch(`${this.baseUrl}/session/${encodeURIComponent(id)}`, { method: 'GET' });
|
|
652
|
+
if (res.status === 404)
|
|
653
|
+
return 'missing';
|
|
654
|
+
if (!res.ok) {
|
|
655
|
+
const detail = await res.text().catch(() => '');
|
|
656
|
+
throw new Error(`GET /session/${id} → ${res.status} ${detail.slice(0, 200)}`);
|
|
657
|
+
}
|
|
658
|
+
const text = await res.text();
|
|
659
|
+
if (!text)
|
|
660
|
+
return { id };
|
|
661
|
+
try {
|
|
662
|
+
const parsed = JSON.parse(text);
|
|
663
|
+
return isRecord(parsed) ? parsed : { id };
|
|
664
|
+
}
|
|
665
|
+
catch {
|
|
666
|
+
return { id };
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
attachSession(id, resumed) {
|
|
670
|
+
this.sessionId = id;
|
|
671
|
+
this.emit({ type: 'session', sessionId: id, resumed });
|
|
672
|
+
this.emitUi((state) => opencodeSessionStarted(id, state));
|
|
673
|
+
}
|
|
674
|
+
async bootstrap() {
|
|
675
|
+
const requested = this.spec.resume ? this.spec.sessionId : undefined;
|
|
676
|
+
let resumed = false;
|
|
677
|
+
if (requested) {
|
|
678
|
+
const existing = await this.tryGetSession(requested);
|
|
679
|
+
if (existing === 'missing') {
|
|
680
|
+
this.emit({
|
|
681
|
+
type: 'note',
|
|
682
|
+
message: `OpenCode session ${requested} no longer exists; the continuation runs in a fresh session without the earlier conversation.`,
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
else {
|
|
686
|
+
// OpenCode appends permission rules and has no remove: an older `task` deny stays (hearsay-tools/cezarion#2279).
|
|
687
|
+
if (this.spec.minimal)
|
|
688
|
+
await this.http('PATCH', `/session/${requested}`, { permission: OPENCODE_MINIMAL_SESSION_PERMISSION });
|
|
689
|
+
this.attachSession(stringField(existing, 'id') ?? requested, true);
|
|
690
|
+
resumed = true;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
if (!resumed) {
|
|
694
|
+
const created = await this.http('POST', '/session', opencodeSessionBody(this.spec));
|
|
695
|
+
const sessionId = stringField(created, 'id');
|
|
696
|
+
if (!sessionId)
|
|
697
|
+
throw new Error('opencode did not return a session id');
|
|
698
|
+
this.attachSession(sessionId, false);
|
|
699
|
+
}
|
|
700
|
+
// The SSE subscription must be LIVE before the first prompt posts —
|
|
701
|
+
// events the server emits while the POST is in flight would otherwise be
|
|
702
|
+
// lost (a race this await closes; the bundled mock made it visible).
|
|
703
|
+
await this.consumeEvents();
|
|
704
|
+
// A lost session can use the fallback system prompt supplied by its caller.
|
|
705
|
+
const opening = openingInput(this.spec, resumed);
|
|
706
|
+
const systemPrompt = !resumed && requested
|
|
707
|
+
? (this.spec.resumeFallbackSystemPrompt ?? this.spec.systemPrompt)
|
|
708
|
+
: this.spec.systemPrompt;
|
|
709
|
+
const first = prependSystemPrompt(systemPrompt, opening.userPrompt);
|
|
710
|
+
await this.prompt(first, 'opening', undefined, this.queuedPromptGeneration, opening.skill);
|
|
711
|
+
if (this.refusedBeforeOpening)
|
|
712
|
+
queueMicrotask(() => {
|
|
713
|
+
this.refusedBeforeOpening = false;
|
|
714
|
+
if (this.serverOpen && !this.pendingQuestion && !this.questionReply && this.pendingPermissions.size === 0 && !this.agentRequest) {
|
|
715
|
+
this.opts.onAgentInputReady?.();
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
async prompt(text, origin = 'human', signal, generation = this.queuedPromptGeneration, skill) {
|
|
720
|
+
// One turn at a time. `prompt_async` acknowledges before the turn runs,
|
|
721
|
+
// so `ready` no longer serializes prompts the way the long-poll did — a
|
|
722
|
+
// follow-up posted mid-turn would share the turnActive/turnEnded pair
|
|
723
|
+
// with the running turn and let that turn's idle close this one. Waiters
|
|
724
|
+
// resume in FIFO order; a teardown (`finishTurn` runs on every exit
|
|
725
|
+
// path) releases them into the `serverOpen` check below.
|
|
726
|
+
while (this.turnActive || this.followOn)
|
|
727
|
+
await (this.turnActive ? this.turnFinished : this.followOn);
|
|
728
|
+
if (origin === 'human' && generation === this.queuedPromptGeneration)
|
|
729
|
+
this.humanPromptWaiters = Math.max(0, this.humanPromptWaiters - 1);
|
|
730
|
+
if (generation !== this.queuedPromptGeneration)
|
|
731
|
+
return;
|
|
732
|
+
if (this.closingAfterDone) {
|
|
733
|
+
if (origin === 'human')
|
|
734
|
+
this.emit({ type: 'note', message: 'opencode: message not delivered: the session closed after the agent\'s done. Send it again with Continue.' });
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
// A queued prompt may have started waiting before the preceding idle armed
|
|
738
|
+
// auto-end. Cancel at actual delivery time, not only at sendMessage time.
|
|
739
|
+
this.cancelAutoEnd();
|
|
740
|
+
if (!this.sessionId || !this.serverOpen)
|
|
741
|
+
return;
|
|
742
|
+
this.openTurn();
|
|
743
|
+
// Turn boundary, v1 and v2 alike — the prompt POST is the turn start
|
|
744
|
+
// (§7.1); the end comes from the SSE `session.idle`, never from the HTTP
|
|
745
|
+
// response below. `POST /session/:id/message` long-polled the whole turn,
|
|
746
|
+
// and undici's default 300s headers timeout ended it as `prompt failed:
|
|
747
|
+
// fetch failed` (#4, upstream #897); `prompt_async` returns immediately.
|
|
748
|
+
this.emitUi(opencodeTurnStarted);
|
|
749
|
+
if (skill) {
|
|
750
|
+
await this.command(skill, text, signal);
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
const body = this.promptBody(text);
|
|
754
|
+
try {
|
|
755
|
+
await this.http('POST', `/session/${this.sessionId}/prompt_async`, body, signal);
|
|
756
|
+
}
|
|
757
|
+
catch (err) {
|
|
758
|
+
this.reportPromptFailure(origin, err);
|
|
759
|
+
throw err;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
/** The command response long-polls the whole turn. SSE user text acknowledges expansion.
|
|
763
|
+
* Read HTTP errors, but a disconnected request (including fetch's 300s limit) leaves SSE in charge. */
|
|
764
|
+
command(skill, context, signal) {
|
|
765
|
+
const controller = new AbortController();
|
|
766
|
+
let resolve;
|
|
767
|
+
let reject;
|
|
768
|
+
const acknowledged = new Promise((yes, no) => { resolve = yes; reject = no; });
|
|
769
|
+
const command = { controller, resolve, reject };
|
|
770
|
+
const abort = () => { reject(new SessionEndedBeforeAcknowledgement()); controller.abort(); };
|
|
771
|
+
signal?.addEventListener('abort', abort, { once: true });
|
|
772
|
+
void acknowledged.finally(() => signal?.removeEventListener('abort', abort)).catch(() => undefined);
|
|
773
|
+
this.skillCommand = command;
|
|
774
|
+
const body = {
|
|
775
|
+
command: skill.id,
|
|
776
|
+
arguments: [skill.args, context].filter(Boolean).join('\n\n'),
|
|
777
|
+
...(this.spec.model ? { model: this.spec.model } : {}),
|
|
778
|
+
...(parseEffort(this.spec.effort) ? { variant: parseEffort(this.spec.effort) } : {}),
|
|
779
|
+
};
|
|
780
|
+
void fetch(`${this.baseUrl}/session/${this.sessionId}/command`, {
|
|
781
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
782
|
+
body: JSON.stringify(body), signal: controller.signal,
|
|
783
|
+
}).then(async (response) => {
|
|
784
|
+
if (!response.ok && this.skillCommand === command) {
|
|
785
|
+
const detail = await response.text().catch(() => '');
|
|
786
|
+
if (this.skillCommand !== command)
|
|
787
|
+
return;
|
|
788
|
+
this.turnErrored = true;
|
|
789
|
+
const message = `opencode: command failed: HTTP ${response.status} ${detail.slice(0, 200)}`;
|
|
790
|
+
command.reject(new Error(message));
|
|
791
|
+
this.emit({ type: 'error', message });
|
|
792
|
+
this.emitUi(state => mapOpencodeEvent({ type: 'session.error', properties: { sessionID: this.sessionId, error: { message } } }, state));
|
|
793
|
+
this.finishTurn();
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
await response.body?.cancel();
|
|
797
|
+
}
|
|
798
|
+
}).catch(() => { });
|
|
799
|
+
return acknowledged;
|
|
800
|
+
}
|
|
801
|
+
reportPromptFailure(origin, err) {
|
|
802
|
+
// No turn started server-side, so no `session.idle` will ever close it —
|
|
803
|
+
// surface the failure and end the turn here instead of parking the run.
|
|
804
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
805
|
+
if (origin === 'agent' && this.providerErrorPending) {
|
|
806
|
+
// Latch the initiating provider failure before rejection reaches the
|
|
807
|
+
// manager's ACK handler (including grace expiry and explicit abort).
|
|
808
|
+
this.providerErrorPending.reported = true;
|
|
809
|
+
if (this.serverOpen)
|
|
810
|
+
this.emit({ type: 'error', message: this.providerErrorPending.message });
|
|
811
|
+
}
|
|
812
|
+
else if (origin === 'agent') {
|
|
813
|
+
// Fatal BEFORE the synthetic boundary: the rejected submission stays
|
|
814
|
+
// queued and must not drain more input or settle DONE.
|
|
815
|
+
if (this.serverOpen) {
|
|
816
|
+
this.emit({ type: 'error', message: `opencode: agent input failed: ${message}` });
|
|
817
|
+
this.interrupt();
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
else if (origin === 'opening') {
|
|
821
|
+
this.emit({ type: 'note', message: `opencode: prompt failed: ${message}` });
|
|
822
|
+
// A dropped ACK can be the first sign of a process crash. Retain HTTP
|
|
823
|
+
// rejection details, but let settlement choose one error before turn-end.
|
|
824
|
+
this.openingPromptFailed = true;
|
|
825
|
+
this.exitFailure = `opencode: ${message}`;
|
|
826
|
+
this.interrupt();
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
829
|
+
this.emit({ type: 'note', message: `opencode: prompt failed: ${message}` });
|
|
830
|
+
}
|
|
831
|
+
if (!this.providerErrorPending && origin !== 'opening')
|
|
832
|
+
this.finishTurn();
|
|
833
|
+
// Bootstrap still rejects; its result path reports the latched opening
|
|
834
|
+
// failure. Human follow-ups keep their nonfatal note and turn boundary.
|
|
835
|
+
}
|
|
836
|
+
promptBody(text) {
|
|
837
|
+
const body = { parts: [{ type: 'text', text }] };
|
|
838
|
+
// `spec.model` arrives already normalised to canonical `provider/model`
|
|
839
|
+
// (the run wiring's fail-loud gate). Split it with the shared parser — the
|
|
840
|
+
// one every runner uses — into opencode's `{ providerID, modelID }`.
|
|
841
|
+
const id = parseModelIdentity(this.spec.model);
|
|
842
|
+
if (id)
|
|
843
|
+
body.model = { providerID: id.provider, modelID: id.model };
|
|
844
|
+
const effort = parseEffort(this.spec.effort);
|
|
845
|
+
if (effort)
|
|
846
|
+
body.variant = effort;
|
|
847
|
+
if (this.spec.minimal)
|
|
848
|
+
body.tools = OPENCODE_MINIMAL_PROMPT_TOOLS;
|
|
849
|
+
return body;
|
|
850
|
+
}
|
|
851
|
+
/** Busy agent input: the running prompt loop rereads it between steps (1.18.32 probe).
|
|
852
|
+
* No new turn opens; the running turn's idle ends it (#505). */
|
|
853
|
+
async steerPrompt(text, signal) {
|
|
854
|
+
try {
|
|
855
|
+
await this.http('POST', `/session/${this.sessionId}/prompt_async`, this.promptBody(text), signal);
|
|
856
|
+
}
|
|
857
|
+
catch (err) {
|
|
858
|
+
if (this.serverOpen) {
|
|
859
|
+
this.emit({ type: 'error', message: `opencode: agent input failed: ${err instanceof Error ? err.message : String(err)}` });
|
|
860
|
+
this.interrupt();
|
|
861
|
+
}
|
|
862
|
+
throw err;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
/** The single v1 turn-end: from the session's own `session.idle`, the
|
|
866
|
+
* prompt-POST failure path, or the teardown safety net — whichever comes
|
|
867
|
+
* first; the guards make every later call a no-op. */
|
|
868
|
+
/** Turn bookkeeping for a prompt POST, or for a server run that started on its own
|
|
869
|
+
* to answer steered input (#505). */
|
|
870
|
+
openTurn() {
|
|
871
|
+
this.clearLostWakeTimer();
|
|
872
|
+
this.turnActive = true;
|
|
873
|
+
this.agentInputReady = false;
|
|
874
|
+
this.turnEnded = false;
|
|
875
|
+
this.turnSerial += 1;
|
|
876
|
+
this.turnFinished = new Promise((resolve) => {
|
|
877
|
+
this.turnFinishedResolve = resolve;
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
clearLostWakeTimer() {
|
|
881
|
+
if (this.lostWakeTimer)
|
|
882
|
+
clearTimeout(this.lostWakeTimer);
|
|
883
|
+
this.lostWakeTimer = undefined;
|
|
884
|
+
this.settleFollowOn();
|
|
885
|
+
}
|
|
886
|
+
/** The follow-on wait is over. Input it refused is offered again unless a turn took over. */
|
|
887
|
+
settleFollowOn() {
|
|
888
|
+
if (!this.followOn)
|
|
889
|
+
return;
|
|
890
|
+
this.followOn = undefined;
|
|
891
|
+
this.followOnResolve();
|
|
892
|
+
if (!this.refusedForFollowOn)
|
|
893
|
+
return;
|
|
894
|
+
this.refusedForFollowOn = false;
|
|
895
|
+
if (this.turnActive)
|
|
896
|
+
return;
|
|
897
|
+
queueMicrotask(() => this.notifyAgentInputReady());
|
|
898
|
+
}
|
|
899
|
+
settleSkillCommand(error) {
|
|
900
|
+
const command = this.skillCommand;
|
|
901
|
+
this.skillCommand = undefined;
|
|
902
|
+
if (error)
|
|
903
|
+
command?.reject(error);
|
|
904
|
+
else
|
|
905
|
+
command?.resolve();
|
|
906
|
+
command?.controller.abort();
|
|
907
|
+
}
|
|
908
|
+
finishTurn() {
|
|
909
|
+
if (!this.turnActive || this.turnEnded)
|
|
910
|
+
return;
|
|
911
|
+
this.turnEnded = true;
|
|
912
|
+
this.turnActive = false;
|
|
913
|
+
const wasSkill = this.skillCommand !== undefined;
|
|
914
|
+
this.settleSkillCommand();
|
|
915
|
+
if (wasSkill && this.uiState.currentTurnId !== null)
|
|
916
|
+
this.emitUi(state => mapOpencodeEvent({ type: 'session.idle', properties: { sessionID: this.sessionId } }, state));
|
|
917
|
+
this.questionCapture = undefined;
|
|
918
|
+
// SSE idle can beat the independent reply HTTP response. The active reply
|
|
919
|
+
// owns pending-question cleanup; without one, the pending ask is stale.
|
|
920
|
+
if (!this.questionReply)
|
|
921
|
+
this.pendingQuestion = undefined;
|
|
922
|
+
// OpenCode settles its own pending permission requests when the run stops.
|
|
923
|
+
this.expirePermissions('turn ended');
|
|
924
|
+
this.turnFinishedResolve();
|
|
925
|
+
// A part that never saw `time.end` (abort, server quirk) still surfaces
|
|
926
|
+
// its prose before the turn boundary (run.ts reads markers there).
|
|
927
|
+
this.textCoalescer.flush();
|
|
928
|
+
this.agentInputReady = true;
|
|
929
|
+
// A prompt that opened this turn was processed by it; steered input the turn never
|
|
930
|
+
// answered (no assistant message named it as parentID) is a lost wake (#505).
|
|
931
|
+
// A turn that failed may never have reached the model: its opener stays pending, so a
|
|
932
|
+
// closing session returns it to the queue (#505 review).
|
|
933
|
+
const opened = this.turnErrored ? [] : [...this.turnOpeners].flatMap(id => this.submissions.consume(id));
|
|
934
|
+
this.turnOpeners.clear();
|
|
935
|
+
this.turnErrored = false;
|
|
936
|
+
if (opened.length)
|
|
937
|
+
this.opts.onAgentInputConsumed?.(opened);
|
|
938
|
+
this.emit({ type: 'turn-end' });
|
|
939
|
+
// Steered input the server holds is read by a follow-on run, or stranded by the
|
|
940
|
+
// upstream lost wake (anomalyco/opencode#46842). Only a quiet grace window tells
|
|
941
|
+
// them apart; then report it so Squawk submits it as a new prompt.
|
|
942
|
+
if (this.submissions.pending > 0) {
|
|
943
|
+
this.clearLostWakeTimer();
|
|
944
|
+
this.followOn = new Promise((resolve) => { this.followOnResolve = resolve; });
|
|
945
|
+
this.lostWakeTimer = setTimeout(() => {
|
|
946
|
+
this.lostWakeTimer = undefined;
|
|
947
|
+
if (!this.serverOpen || this.turnActive) {
|
|
948
|
+
this.settleFollowOn();
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
951
|
+
const inputIds = this.submissions.takeUnconsumed();
|
|
952
|
+
this.userMessageSubmission.clear();
|
|
953
|
+
if (inputIds.length)
|
|
954
|
+
this.emit({ type: 'input-unconsumed', inputIds });
|
|
955
|
+
this.settleFollowOn();
|
|
956
|
+
}, OPENCODE_LOST_WAKE_GRACE_MS);
|
|
957
|
+
this.lostWakeTimer.unref?.();
|
|
958
|
+
}
|
|
959
|
+
if (!this.questionReply)
|
|
960
|
+
this.scheduleAutoEnd();
|
|
961
|
+
}
|
|
962
|
+
// ---- SSE stream ---------------------------------------------------------
|
|
963
|
+
/** Resolves once the SSE stream is CONNECTED (headers in) — the frames are
|
|
964
|
+
* then drained in the background. Callers await the connection so no
|
|
965
|
+
* event emitted after this resolves can be missed.
|
|
966
|
+
*
|
|
967
|
+
* Speaks node:http, not fetch: undici's default Agent cuts a response
|
|
968
|
+
* body idle for 300s, which would sever a quiet turn's bus mid-run (#4) —
|
|
969
|
+
* node's own client has no idle timeout. (`process.getBuiltinModule`
|
|
970
|
+
* cannot fix that: undici is bundled into node but not exposed as a
|
|
971
|
+
* built-in, so there is no no-timeout dispatcher to hand fetch without
|
|
972
|
+
* taking undici as a real dependency.)
|
|
973
|
+
*
|
|
974
|
+
* A connection that cannot be established throws, failing `bootstrap`:
|
|
975
|
+
* with `prompt_async` this stream is the only source of turn-ends, so a
|
|
976
|
+
* session that cannot hear it is dead on arrival, not degraded. */
|
|
977
|
+
async consumeEvents() {
|
|
978
|
+
if (!this.baseUrl)
|
|
979
|
+
return;
|
|
980
|
+
let res;
|
|
981
|
+
try {
|
|
982
|
+
res = await new Promise((resolve, reject) => {
|
|
983
|
+
const req = httpRequest(`${this.baseUrl}/event`, { headers: { accept: 'text/event-stream' }, signal: this.sse.signal }, resolve);
|
|
984
|
+
req.on('error', reject);
|
|
985
|
+
req.end();
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
catch (err) {
|
|
989
|
+
if (this.sse.signal.aborted)
|
|
990
|
+
return; // torn down during bootstrap — not a failure
|
|
991
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
992
|
+
throw new Error(`event stream failed to connect: ${message}`);
|
|
993
|
+
}
|
|
994
|
+
// node:http hands over EVERY response, error statuses included — a proxy's
|
|
995
|
+
// 401 or a non-SSE 500 body is not an event bus, however well it parses.
|
|
996
|
+
const status = res.statusCode ?? 0;
|
|
997
|
+
if (status < 200 || status >= 300) {
|
|
998
|
+
res.resume(); // discard the body so the socket is released
|
|
999
|
+
throw new Error(`event stream failed to connect: HTTP ${status}`);
|
|
1000
|
+
}
|
|
1001
|
+
void this.readEvents(res);
|
|
1002
|
+
}
|
|
1003
|
+
async readEvents(res) {
|
|
1004
|
+
// StringDecoder under the hood — multi-byte characters split across
|
|
1005
|
+
// chunks arrive whole, like the TextDecoder streaming mode did.
|
|
1006
|
+
res.setEncoding('utf8');
|
|
1007
|
+
let buffer = '';
|
|
1008
|
+
try {
|
|
1009
|
+
for await (const chunk of res) {
|
|
1010
|
+
this.opts.onActivity?.(); // Includes SSE heartbeat comments.
|
|
1011
|
+
buffer += chunk;
|
|
1012
|
+
let sep;
|
|
1013
|
+
while ((sep = buffer.indexOf('\n\n')) >= 0) {
|
|
1014
|
+
const frame = buffer.slice(0, sep);
|
|
1015
|
+
buffer = buffer.slice(sep + 2);
|
|
1016
|
+
await this.handleFrame(frame);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
catch {
|
|
1021
|
+
// aborted — normal on end()/interrupt
|
|
1022
|
+
}
|
|
1023
|
+
finally {
|
|
1024
|
+
// `session.idle` rides this stream and nothing else — a feed that dies
|
|
1025
|
+
// while the server is still up would otherwise park the current turn
|
|
1026
|
+
// forever and leave every later prompt unanswerable. An `error`, not a
|
|
1027
|
+
// note: the turn's remaining output is lost, so the step must record a
|
|
1028
|
+
// failure (run.ts classifies from v1 `error` only), never pass as an
|
|
1029
|
+
// empty success. Then close the turn (flushing what did arrive) and end
|
|
1030
|
+
// the session; "Continue" GETs this session id on the next server.
|
|
1031
|
+
if (this.serverOpen && !this.sse.signal.aborted) {
|
|
1032
|
+
this.exitFailure = 'opencode: event stream closed unexpectedly';
|
|
1033
|
+
this.end();
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
async handleFrame(frame) {
|
|
1038
|
+
const dataLines = frame
|
|
1039
|
+
.split('\n')
|
|
1040
|
+
.filter((l) => l.startsWith('data:'))
|
|
1041
|
+
.map((l) => l.slice(5).trim());
|
|
1042
|
+
if (dataLines.length === 0)
|
|
1043
|
+
return;
|
|
1044
|
+
let evt;
|
|
1045
|
+
try {
|
|
1046
|
+
evt = JSON.parse(dataLines.join('\n'));
|
|
1047
|
+
}
|
|
1048
|
+
catch {
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
this.emitUi((state) => mapOpencodeEvent(evt, state));
|
|
1052
|
+
const sid = stringField(evt.properties ?? {}, 'sessionID');
|
|
1053
|
+
if (evt.type === 'session.error' && !opencodeSkillWarning(evt.properties ?? {}) && (sid === undefined || sid === this.sessionId) && this.agentRequest) {
|
|
1054
|
+
// HTTP and SSE are independent sockets: the error can overtake a positive
|
|
1055
|
+
// prompt ACK. Let that exact request settle before v1 makes RunManager
|
|
1056
|
+
// interrupt it. Keep later SSE idle frames behind the same barrier.
|
|
1057
|
+
// Reuse the teardown grace as a hard bound: a wedged ACK cannot keep a
|
|
1058
|
+
// failed turn alive indefinitely. Explicit end/interrupt still abort now.
|
|
1059
|
+
const failure = { message: this.sessionErrorMessage(evt.properties?.error), reported: false };
|
|
1060
|
+
this.providerErrorPending = failure;
|
|
1061
|
+
const request = this.agentRequest;
|
|
1062
|
+
// A command has no separate HTTP ACK: the error can be its first SSE frame.
|
|
1063
|
+
this.skillCommand?.reject(new Error(failure.message));
|
|
1064
|
+
const timer = setTimeout(() => request.abort(), KILL_GRACE_MS);
|
|
1065
|
+
try {
|
|
1066
|
+
await this.agentAcknowledgement?.catch(() => undefined);
|
|
1067
|
+
if (this.serverOpen && !failure.reported)
|
|
1068
|
+
this.handleEvent(evt);
|
|
1069
|
+
}
|
|
1070
|
+
finally {
|
|
1071
|
+
clearTimeout(timer);
|
|
1072
|
+
this.providerErrorPending = undefined;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
else {
|
|
1076
|
+
this.handleEvent(evt);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
/** #53 — a forwarded session error must never read like a missing
|
|
1080
|
+
* executable: a bare upstream `Not Found` used to surface as
|
|
1081
|
+
* `opencode: Not Found`, indistinguishable from the spawn failure whose
|
|
1082
|
+
* PATH/installation guidance lives in `wrapSpawnError`. Name the selected
|
|
1083
|
+
* provider/model — only the runner knows it — and keep any structured
|
|
1084
|
+
* upstream status or code, so a provider outage is recognizable as one. */
|
|
1085
|
+
sessionErrorMessage(error) {
|
|
1086
|
+
const id = parseModelIdentity(this.spec.model);
|
|
1087
|
+
const context = id ? `provider ${formatModelIdentity(id)}` : 'provider';
|
|
1088
|
+
const detail = sessionErrorDetail(error);
|
|
1089
|
+
const suffix = detail ? ` (${detail})` : '';
|
|
1090
|
+
return `opencode: ${context} request failed: ${sessionErrorText(error)}${suffix}`;
|
|
1091
|
+
}
|
|
1092
|
+
handleEvent(evt) {
|
|
1093
|
+
const type = evt.type ?? '';
|
|
1094
|
+
const props = evt.properties ?? {};
|
|
1095
|
+
if (type === 'message.updated' || type === 'message.created' || type === 'message.completed') {
|
|
1096
|
+
this.handleMessageEvent(props);
|
|
1097
|
+
}
|
|
1098
|
+
else if (type === 'message.part.updated' || type === 'message.part.created') {
|
|
1099
|
+
this.handlePart(props.part ?? props);
|
|
1100
|
+
}
|
|
1101
|
+
else if (type === 'permission.asked') {
|
|
1102
|
+
this.handlePermissionAsked(props);
|
|
1103
|
+
}
|
|
1104
|
+
else if (type === 'permission.replied') {
|
|
1105
|
+
this.handlePermissionReplied(props);
|
|
1106
|
+
}
|
|
1107
|
+
else if (type === 'session.idle') {
|
|
1108
|
+
// THE turn-end signal. The SSE bus is server-wide, so a child session's
|
|
1109
|
+
// (sub-agent's) idle must not close the main turn; an idle with no
|
|
1110
|
+
// sessionID is treated as ours, like the v2 mapper does.
|
|
1111
|
+
const sid = stringField(props, 'sessionID');
|
|
1112
|
+
if (sid === undefined || sid === this.sessionId)
|
|
1113
|
+
this.finishTurn();
|
|
1114
|
+
}
|
|
1115
|
+
else if (type === 'session.error') {
|
|
1116
|
+
this.handleSessionError(props);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
handleMessageEvent(props) {
|
|
1120
|
+
const info = props.info ?? props;
|
|
1121
|
+
const mid = stringField(info, 'id');
|
|
1122
|
+
const role = stringField(info, 'role');
|
|
1123
|
+
if (mid && role)
|
|
1124
|
+
this.msgRole.set(mid, role);
|
|
1125
|
+
// The model answers a steered user message: it has read it (#505).
|
|
1126
|
+
const parent = role === 'assistant' ? stringField(info, 'parentID') : undefined;
|
|
1127
|
+
const submission = parent ? this.userMessageSubmission.get(parent) : undefined;
|
|
1128
|
+
if (parent && submission) {
|
|
1129
|
+
this.userMessageSubmission.delete(parent);
|
|
1130
|
+
// After an idle, the server started a new run for steered input: a new turn.
|
|
1131
|
+
if (!this.turnActive && this.serverOpen) {
|
|
1132
|
+
this.openTurn();
|
|
1133
|
+
this.emitUi(opencodeTurnStarted);
|
|
1134
|
+
}
|
|
1135
|
+
const ids = this.submissions.consume(submission);
|
|
1136
|
+
if (ids.length)
|
|
1137
|
+
this.opts.onAgentInputConsumed?.(ids);
|
|
1138
|
+
}
|
|
1139
|
+
this.absorbUsage(info);
|
|
1140
|
+
}
|
|
1141
|
+
handlePermissionReplied(props) {
|
|
1142
|
+
// OpenCode settled the request, in any phase: our own reply, another client's, or its own.
|
|
1143
|
+
const nativeId = stringField(props, 'requestID');
|
|
1144
|
+
const pending = nativeId === undefined ? undefined : this.pendingPermissions.get(nativeId);
|
|
1145
|
+
// OpenCode publishes this before it answers the reply route, so a human reply in flight
|
|
1146
|
+
// that it echoes is that human's answer.
|
|
1147
|
+
if (!pending)
|
|
1148
|
+
return;
|
|
1149
|
+
const answered = pending.phase === 'answering' && pending.answer?.reply === stringField(props, 'reply');
|
|
1150
|
+
this.settlePermission(pending, answered ? { optionId: pending.answer.optionId } : { reason: 'resolved by OpenCode' });
|
|
1151
|
+
}
|
|
1152
|
+
handleSessionError(props) {
|
|
1153
|
+
const warning = opencodeSkillWarning(props);
|
|
1154
|
+
if (warning) {
|
|
1155
|
+
this.emit({ type: 'note', message: warning });
|
|
1156
|
+
return;
|
|
1157
|
+
}
|
|
1158
|
+
// The wire's failure signal, now that the prompt POST returns
|
|
1159
|
+
// before the turn runs: forward it to v1, whose `error` events are what
|
|
1160
|
+
// run.ts records failed steps from — dropped, the terminal idle would
|
|
1161
|
+
// file a provider/auth failure as a successful step. The idle that
|
|
1162
|
+
// follows still closes the turn.
|
|
1163
|
+
const sid = stringField(props, 'sessionID');
|
|
1164
|
+
if (sid === undefined || sid === this.sessionId) {
|
|
1165
|
+
this.turnErrored = true;
|
|
1166
|
+
this.emit({ type: 'error', message: this.sessionErrorMessage(props.error) });
|
|
1167
|
+
if (this.skillCommand)
|
|
1168
|
+
this.finishTurn();
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
handlePart(part) {
|
|
1172
|
+
if (!this.partBelongsToUs(part))
|
|
1173
|
+
return;
|
|
1174
|
+
const messageID = stringField(part, 'messageID');
|
|
1175
|
+
const kind = stringField(part, 'type');
|
|
1176
|
+
const id = stringField(part, 'id') ?? messageID ?? '';
|
|
1177
|
+
if (kind === 'text') {
|
|
1178
|
+
const full = stringField(part, 'text') ?? '';
|
|
1179
|
+
const seen = this.textSeen.get(id) ?? 0;
|
|
1180
|
+
if (full.length > seen) {
|
|
1181
|
+
this.textSeen.set(id, full.length);
|
|
1182
|
+
this.textCoalescer.append(id, full.slice(seen));
|
|
1183
|
+
}
|
|
1184
|
+
// `time.end` marks the part finished (same signal the v2 mapper uses) —
|
|
1185
|
+
// emit the whole block once, preferring the snapshot's full text.
|
|
1186
|
+
const time = part.time;
|
|
1187
|
+
if (time && typeof time === 'object' && typeof time.end === 'number') {
|
|
1188
|
+
this.textCoalescer.complete(id, full);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
else if (kind === 'tool') {
|
|
1192
|
+
this.handleToolPart(part, id, messageID);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
partBelongsToUs(part) {
|
|
1196
|
+
// The SSE bus carries every session on the server — drop parts that
|
|
1197
|
+
// belong to another one (a sub-agent's stream is surfaced by v2 only).
|
|
1198
|
+
const partSession = stringField(part, 'sessionID');
|
|
1199
|
+
if (partSession !== undefined && this.sessionId !== undefined && partSession !== this.sessionId)
|
|
1200
|
+
return false;
|
|
1201
|
+
// Only surface parts of assistant messages — the user's own message streams
|
|
1202
|
+
// over the same feed. Role is known early (the message.updated event
|
|
1203
|
+
// precedes its parts); an unknown role means "not assistant yet" → skip.
|
|
1204
|
+
const messageID = stringField(part, 'messageID');
|
|
1205
|
+
if (messageID && this.msgRole.get(messageID) !== 'assistant') {
|
|
1206
|
+
// A user message carrying submitted agent text: remember which submission it is.
|
|
1207
|
+
if (this.msgRole.get(messageID) === 'user' && stringField(part, 'type') === 'text' && !this.userMessageSubmission.has(messageID)) {
|
|
1208
|
+
this.skillCommand?.resolve();
|
|
1209
|
+
const submission = this.submissions.findByText(stringField(part, 'text') ?? '');
|
|
1210
|
+
if (submission && ![...this.userMessageSubmission.values()].includes(submission))
|
|
1211
|
+
this.userMessageSubmission.set(messageID, submission);
|
|
1212
|
+
}
|
|
1213
|
+
return false;
|
|
1214
|
+
}
|
|
1215
|
+
return true;
|
|
1216
|
+
}
|
|
1217
|
+
handleToolPart(part, id, messageID) {
|
|
1218
|
+
const state = part.state ?? {};
|
|
1219
|
+
const status = stringField(state, 'status');
|
|
1220
|
+
const name = stringField(part, 'tool') ?? stringField(part, 'name') ?? 'tool';
|
|
1221
|
+
this.maybeCaptureQuestion(part, state, status, name, messageID);
|
|
1222
|
+
const callId = id || `${name}-${this.toolsSeen.size}`;
|
|
1223
|
+
if (!this.toolsSeen.has(callId)) {
|
|
1224
|
+
this.toolsSeen.add(callId);
|
|
1225
|
+
this.toolCalls.push({ id: callId, name, input: state.input ?? state });
|
|
1226
|
+
this.emit({ type: 'tool-call', id: callId, tool: name, input: state.input ?? state });
|
|
1227
|
+
}
|
|
1228
|
+
if (status === 'completed' || status === 'error') {
|
|
1229
|
+
this.emit({ type: 'tool-result', toolCallId: callId, result: safeStringify(state.output ?? state.result ?? state), isError: status === 'error' });
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
maybeCaptureQuestion(part, state, status, name, messageID) {
|
|
1233
|
+
const questionPartId = stringField(part, 'id') ?? stringField(part, 'callID') ?? messageID;
|
|
1234
|
+
const questionInput = state.input ?? state;
|
|
1235
|
+
const questionReady = name === 'question' && (toSquawkQuestions(questionInput) !== null || status !== 'pending');
|
|
1236
|
+
if (!questionReady || !this.turnActive || this.pendingQuestion !== undefined || this.questionCapture !== undefined || this.questionReply !== undefined || (questionPartId !== undefined && this.handledQuestionParts.has(questionPartId)))
|
|
1237
|
+
return;
|
|
1238
|
+
if (questionPartId)
|
|
1239
|
+
this.handledQuestionParts.add(questionPartId);
|
|
1240
|
+
const capture = this.captureQuestion(questionInput);
|
|
1241
|
+
this.questionCapture = capture;
|
|
1242
|
+
const clearCapture = () => { if (this.questionCapture === capture)
|
|
1243
|
+
this.questionCapture = undefined; };
|
|
1244
|
+
void capture.then(clearCapture, clearCapture);
|
|
1245
|
+
}
|
|
1246
|
+
/** Pull cumulative tokens/cost out of an assistant message info object. */
|
|
1247
|
+
absorbUsage(info) {
|
|
1248
|
+
if (!info)
|
|
1249
|
+
return;
|
|
1250
|
+
const tokens = info.tokens;
|
|
1251
|
+
if (tokens) {
|
|
1252
|
+
const input = numField(tokens, 'input');
|
|
1253
|
+
const output = numField(tokens, 'output');
|
|
1254
|
+
const reasoning = numField(tokens, 'reasoning');
|
|
1255
|
+
const total = input + output + reasoning;
|
|
1256
|
+
if (total > this.tokensUsed) {
|
|
1257
|
+
this.tokensUsed = total;
|
|
1258
|
+
this.emit({ type: 'token-usage', tokensUsed: this.tokensUsed });
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
const messageId = stringField(info, 'id');
|
|
1262
|
+
const cost = info.cost;
|
|
1263
|
+
if (messageId && info.role === 'assistant' &&
|
|
1264
|
+
(info.sessionID === undefined || info.sessionID === this.sessionId) &&
|
|
1265
|
+
typeof cost === 'number' && Number.isFinite(cost) && cost >= 0) {
|
|
1266
|
+
const previous = this.costByMessage.get(messageId);
|
|
1267
|
+
if (previous === undefined || cost > previous) {
|
|
1268
|
+
this.emit({ type: 'cost', usd: cost - (previous ?? 0) });
|
|
1269
|
+
this.costByMessage.set(messageId, cost);
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
async captureQuestion(input) {
|
|
1274
|
+
const questions = toSquawkQuestions(input);
|
|
1275
|
+
const turnSerial = this.turnSerial;
|
|
1276
|
+
let requestId;
|
|
1277
|
+
for (let attempt = 0; attempt < 8; attempt += 1) {
|
|
1278
|
+
if (!this.turnActive || this.turnSerial !== turnSerial)
|
|
1279
|
+
return;
|
|
1280
|
+
requestId = await this.pendingQuestionId().catch(() => undefined);
|
|
1281
|
+
if (requestId)
|
|
1282
|
+
break;
|
|
1283
|
+
if (attempt < 7)
|
|
1284
|
+
await sleep(150);
|
|
1285
|
+
}
|
|
1286
|
+
if (!this.turnActive || this.turnSerial !== turnSerial)
|
|
1287
|
+
return;
|
|
1288
|
+
if (!questions) {
|
|
1289
|
+
if (!requestId) {
|
|
1290
|
+
this.emit({
|
|
1291
|
+
type: 'error',
|
|
1292
|
+
message: 'opencode: unsupported native question could not be rejected: no pending question id',
|
|
1293
|
+
});
|
|
1294
|
+
this.finishTurn();
|
|
1295
|
+
this.end();
|
|
1296
|
+
return;
|
|
1297
|
+
}
|
|
1298
|
+
try {
|
|
1299
|
+
await this.http('POST', `/question/${encodeURIComponent(requestId)}/reject`, undefined);
|
|
1300
|
+
this.emit({ type: 'note', message: 'opencode: unsupported native question rejected' });
|
|
1301
|
+
}
|
|
1302
|
+
catch (err) {
|
|
1303
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
1304
|
+
this.emit({
|
|
1305
|
+
type: 'error',
|
|
1306
|
+
message: `opencode: unsupported native question rejection failed: ${message}`,
|
|
1307
|
+
});
|
|
1308
|
+
this.finishTurn();
|
|
1309
|
+
this.end();
|
|
1310
|
+
}
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
const pending = {
|
|
1314
|
+
requestId,
|
|
1315
|
+
askRequestId: requestId ?? `opencode-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
1316
|
+
questions,
|
|
1317
|
+
};
|
|
1318
|
+
this.pendingQuestion = pending;
|
|
1319
|
+
this.emitQuestion(pending);
|
|
1320
|
+
}
|
|
1321
|
+
emitQuestion(pending) {
|
|
1322
|
+
this.emitUi((state) => ({
|
|
1323
|
+
state,
|
|
1324
|
+
events: [
|
|
1325
|
+
{
|
|
1326
|
+
type: 'ask.requested',
|
|
1327
|
+
requestId: pending.askRequestId,
|
|
1328
|
+
questions: uiAskQuestions(pending.questions),
|
|
1329
|
+
},
|
|
1330
|
+
],
|
|
1331
|
+
}));
|
|
1332
|
+
}
|
|
1333
|
+
async pendingQuestionId() {
|
|
1334
|
+
const value = await this.http('GET', '/question', undefined);
|
|
1335
|
+
if (!Array.isArray(value))
|
|
1336
|
+
return undefined;
|
|
1337
|
+
for (const entry of value) {
|
|
1338
|
+
if (!isRecord(entry) || stringField(entry, 'sessionID') !== this.sessionId)
|
|
1339
|
+
continue;
|
|
1340
|
+
const id = stringField(entry, 'id');
|
|
1341
|
+
if (id)
|
|
1342
|
+
return id;
|
|
1343
|
+
}
|
|
1344
|
+
return undefined;
|
|
1345
|
+
}
|
|
1346
|
+
async replyQuestion(pending, text) {
|
|
1347
|
+
try {
|
|
1348
|
+
const requestId = pending.requestId ?? (await this.pendingQuestionId());
|
|
1349
|
+
if (!requestId)
|
|
1350
|
+
throw new Error('no pending question id');
|
|
1351
|
+
pending.requestId = requestId;
|
|
1352
|
+
await this.http('POST', `/question/${encodeURIComponent(requestId)}/reply`, {
|
|
1353
|
+
answers: questionAnswers(pending.questions, text),
|
|
1354
|
+
});
|
|
1355
|
+
if (this.pendingQuestion === pending)
|
|
1356
|
+
this.pendingQuestion = undefined;
|
|
1357
|
+
const queued = this.queuedQuestionMessages.splice(0);
|
|
1358
|
+
for (const message of queued)
|
|
1359
|
+
this.deliverPrompt(message);
|
|
1360
|
+
if (queued.length === 0 && this.turnEnded)
|
|
1361
|
+
this.scheduleAutoEnd();
|
|
1362
|
+
}
|
|
1363
|
+
catch (err) {
|
|
1364
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
1365
|
+
this.emit({ type: 'note', message: `opencode: question reply failed: ${message}` });
|
|
1366
|
+
if (this.pendingQuestion === pending)
|
|
1367
|
+
this.emitQuestion(pending);
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
// ---- permissions (hearsay-tools/cezarion#1266) --------------------------
|
|
1371
|
+
/** Any session on this private server may ask, child sessions included. The ask holds agent
|
|
1372
|
+
* input and auto-end from receipt until OpenCode settles it, the turn ends or the session does. */
|
|
1373
|
+
handlePermissionAsked(props) {
|
|
1374
|
+
if (!this.serverOpen)
|
|
1375
|
+
return;
|
|
1376
|
+
const parsed = opencodePermissionAskSchema.safeParse(props);
|
|
1377
|
+
const nativeId = parsed.success ? parsed.data.id : typeof props.id === 'string' && props.id ? props.id : undefined;
|
|
1378
|
+
if (nativeId === undefined) {
|
|
1379
|
+
// OpenCode blocks the asking tool until a reply names this request: fail closed.
|
|
1380
|
+
this.emit({ type: 'error', message: 'opencode: unsupported permission request could not be rejected: no request id' });
|
|
1381
|
+
this.finishTurn();
|
|
1382
|
+
this.end();
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
if (this.handledPermissionIds.has(nativeId))
|
|
1386
|
+
return;
|
|
1387
|
+
this.handledPermissionIds.add(nativeId);
|
|
1388
|
+
// OpenCode asks only from inside a running session loop, so a main-session ask after the idle
|
|
1389
|
+
// means the server started a run: reopen the turn, as a steered follow-on run does. That run's
|
|
1390
|
+
// own idle closes it. A child session's ask leaves the main turn alone.
|
|
1391
|
+
if (!this.turnActive && this.sessionId !== undefined && stringField(props, 'sessionID') === this.sessionId) {
|
|
1392
|
+
this.openTurn();
|
|
1393
|
+
this.emitUi(opencodeTurnStarted);
|
|
1394
|
+
}
|
|
1395
|
+
const pending = parsed.success
|
|
1396
|
+
? { nativeId, ask: parsed.data, phase: 'classifying' }
|
|
1397
|
+
: { nativeId, phase: 'rejecting' };
|
|
1398
|
+
this.pendingPermissions.set(nativeId, pending);
|
|
1399
|
+
this.agentInputReady = false;
|
|
1400
|
+
this.cancelAutoEnd();
|
|
1401
|
+
if (!parsed.success) {
|
|
1402
|
+
this.emit({ type: 'note', message: 'opencode: rejected an OpenCode permission request it could not read' });
|
|
1403
|
+
void this.rejectPermission(pending, 'cezar could not read this permission request');
|
|
1404
|
+
return;
|
|
1405
|
+
}
|
|
1406
|
+
this.permissionQueue = this.permissionQueue.then(() => this.answerPermission(pending)).catch(() => undefined);
|
|
1407
|
+
}
|
|
1408
|
+
/** Still the ask OpenCode is waiting on: not settled, expired or torn down since an await. */
|
|
1409
|
+
permissionLive(pending) {
|
|
1410
|
+
return this.serverOpen && this.pendingPermissions.get(pending.nativeId) === pending;
|
|
1411
|
+
}
|
|
1412
|
+
async answerPermission(pending) {
|
|
1413
|
+
const rules = await this.userPermissionRules();
|
|
1414
|
+
if (!this.permissionLive(pending))
|
|
1415
|
+
return;
|
|
1416
|
+
if (isOpencodeDefaultAsk(pending.ask, rules)) {
|
|
1417
|
+
pending.phase = 'auto-replying';
|
|
1418
|
+
try {
|
|
1419
|
+
// Never `always`: that can persist an approval beyond this run.
|
|
1420
|
+
await this.replyPermission(pending.nativeId, { reply: 'once' });
|
|
1421
|
+
}
|
|
1422
|
+
catch {
|
|
1423
|
+
// OpenCode is still waiting: a failed automatic reply asks the human instead.
|
|
1424
|
+
if (this.permissionLive(pending))
|
|
1425
|
+
this.bridgePermission(pending);
|
|
1426
|
+
return;
|
|
1427
|
+
}
|
|
1428
|
+
if (this.serverOpen && !this.answeredDefaultAsk) {
|
|
1429
|
+
this.answeredDefaultAsk = true;
|
|
1430
|
+
this.emit({
|
|
1431
|
+
type: 'note',
|
|
1432
|
+
message: "opencode: answered OpenCode's built-in permission asks (outside-worktree reads, .env reads, repeated-call guard) with allow-once; your own OpenCode permission rules still ask",
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
this.settlePermission(pending);
|
|
1436
|
+
return;
|
|
1437
|
+
}
|
|
1438
|
+
this.bridgePermission(pending);
|
|
1439
|
+
}
|
|
1440
|
+
/** One lazy `GET /config` per session. An unreadable config is unknown provenance: every ask goes to the cockpit. */
|
|
1441
|
+
userPermissionRules() {
|
|
1442
|
+
this.permissionRules ??= this.readConfig().then(opencodeUserPermissionRules, () => undefined).then((rules) => {
|
|
1443
|
+
if (!rules)
|
|
1444
|
+
this.emit({ type: 'note', message: 'opencode: could not read the OpenCode config, so every permission prompt goes to the cockpit' });
|
|
1445
|
+
return rules;
|
|
1446
|
+
});
|
|
1447
|
+
return this.permissionRules;
|
|
1448
|
+
}
|
|
1449
|
+
/** Unlike `http`, an empty or unparsable body is a failure, never an empty config. */
|
|
1450
|
+
async readConfig() {
|
|
1451
|
+
if (!this.baseUrl)
|
|
1452
|
+
throw new Error('opencode server not ready');
|
|
1453
|
+
const res = await fetch(`${this.baseUrl}/config`, { method: 'GET' });
|
|
1454
|
+
if (!res.ok)
|
|
1455
|
+
throw new Error(`GET /config → ${res.status}`);
|
|
1456
|
+
return JSON.parse(await res.text());
|
|
1457
|
+
}
|
|
1458
|
+
bridgePermission(pending) {
|
|
1459
|
+
if (!this.opts.onUiEvent) {
|
|
1460
|
+
const message = 'no permission UI is attached to this session';
|
|
1461
|
+
this.emit({ type: 'note', message: `opencode: rejected the OpenCode ${pending.ask.permission} permission prompt: ${message}` });
|
|
1462
|
+
void this.rejectPermission(pending, message);
|
|
1463
|
+
return;
|
|
1464
|
+
}
|
|
1465
|
+
if (!this.showPermissionCard(pending))
|
|
1466
|
+
void this.rejectPermission(pending, 'permission UI unavailable');
|
|
1467
|
+
}
|
|
1468
|
+
/** Emits a fresh cockpit card, with new ids, for the ask. False when the UI threw: that card is resolved again. */
|
|
1469
|
+
showPermissionCard(pending) {
|
|
1470
|
+
const bridge = opencodePermissionBridge(pending.ask);
|
|
1471
|
+
pending.bridge = bridge;
|
|
1472
|
+
pending.phase = 'card';
|
|
1473
|
+
pending.answer = undefined;
|
|
1474
|
+
try {
|
|
1475
|
+
this.opts.onUiEvent(bridge.event);
|
|
1476
|
+
return true;
|
|
1477
|
+
}
|
|
1478
|
+
catch {
|
|
1479
|
+
// A throwing consumer cannot leave OpenCode waiting on a card nobody sees.
|
|
1480
|
+
pending.bridge = undefined;
|
|
1481
|
+
this.emitPermissionResolved(bridge.event.requestId, { reason: 'permission UI unavailable' });
|
|
1482
|
+
return false;
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
/** A reject OpenCode never receives leaves the asking tool blocked: fail closed. */
|
|
1486
|
+
async rejectPermission(pending, message) {
|
|
1487
|
+
pending.phase = 'rejecting';
|
|
1488
|
+
try {
|
|
1489
|
+
await this.replyPermission(pending.nativeId, { reply: 'reject', message });
|
|
1490
|
+
}
|
|
1491
|
+
catch (err) {
|
|
1492
|
+
if (!this.permissionLive(pending))
|
|
1493
|
+
return;
|
|
1494
|
+
this.emit({ type: 'error', message: `opencode: permission rejection failed: ${err instanceof Error ? err.message : String(err)}` });
|
|
1495
|
+
this.finishTurn();
|
|
1496
|
+
this.end();
|
|
1497
|
+
return;
|
|
1498
|
+
}
|
|
1499
|
+
this.settlePermission(pending);
|
|
1500
|
+
}
|
|
1501
|
+
/** The card and the input barrier stay until OpenCode accepts the reply; a failed reply shows a fresh card. */
|
|
1502
|
+
respondPermission(requestId, optionId) {
|
|
1503
|
+
if (!this.serverOpen)
|
|
1504
|
+
return false;
|
|
1505
|
+
const pending = [...this.pendingPermissions.values()].find((entry) => entry.bridge?.event.requestId === requestId);
|
|
1506
|
+
const reply = pending?.bridge?.replies.get(optionId);
|
|
1507
|
+
if (!pending || pending.phase !== 'card' || !reply)
|
|
1508
|
+
return false;
|
|
1509
|
+
const bridge = pending.bridge;
|
|
1510
|
+
pending.phase = 'answering';
|
|
1511
|
+
pending.answer = { optionId, reply };
|
|
1512
|
+
void this.replyPermission(pending.nativeId, { reply }).then(() => {
|
|
1513
|
+
if (this.permissionLive(pending) && pending.bridge === bridge)
|
|
1514
|
+
this.settlePermission(pending, { optionId });
|
|
1515
|
+
}, (err) => {
|
|
1516
|
+
if (!this.permissionLive(pending) || pending.bridge !== bridge)
|
|
1517
|
+
return;
|
|
1518
|
+
this.emit({ type: 'note', message: `opencode: permission reply failed: ${err instanceof Error ? err.message : String(err)}` });
|
|
1519
|
+
// The fresh card first, so the run's pending set never empties and it stays parked.
|
|
1520
|
+
const shown = this.showPermissionCard(pending);
|
|
1521
|
+
this.emitPermissionResolved(bridge.event.requestId, { reason: 'permission reply failed' });
|
|
1522
|
+
if (!shown)
|
|
1523
|
+
void this.rejectPermission(pending, 'permission UI unavailable');
|
|
1524
|
+
});
|
|
1525
|
+
return true;
|
|
1526
|
+
}
|
|
1527
|
+
async replyPermission(nativeId, body) {
|
|
1528
|
+
await this.http('POST', `/permission/${encodeURIComponent(nativeId)}/reply`, body);
|
|
1529
|
+
}
|
|
1530
|
+
/** OpenCode no longer waits on the ask: retire it, resolve its card, and release the barrier. */
|
|
1531
|
+
settlePermission(pending, resolution = {}) {
|
|
1532
|
+
if (this.pendingPermissions.get(pending.nativeId) !== pending)
|
|
1533
|
+
return;
|
|
1534
|
+
this.pendingPermissions.delete(pending.nativeId);
|
|
1535
|
+
if (pending.bridge)
|
|
1536
|
+
this.emitPermissionResolved(pending.bridge.event.requestId, resolution);
|
|
1537
|
+
if (this.pendingPermissions.size)
|
|
1538
|
+
return;
|
|
1539
|
+
this.notifyAgentInputReady();
|
|
1540
|
+
// A card that arrived after the turn ended cancelled its auto-end: re-arm it.
|
|
1541
|
+
if (this.turnEnded && !this.turnActive && !this.questionReply)
|
|
1542
|
+
this.scheduleAutoEnd();
|
|
1543
|
+
}
|
|
1544
|
+
/** Retires every ask without HTTP: OpenCode settles its own request on idle or abort. The
|
|
1545
|
+
* caller owns what follows (turn end or teardown), so the barrier release is not run here. */
|
|
1546
|
+
expirePermissions(reason) {
|
|
1547
|
+
for (const pending of [...this.pendingPermissions.values()]) {
|
|
1548
|
+
this.pendingPermissions.delete(pending.nativeId);
|
|
1549
|
+
if (pending.bridge)
|
|
1550
|
+
this.emitPermissionResolved(pending.bridge.event.requestId, { reason });
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
emitPermissionResolved(requestId, resolution) {
|
|
1554
|
+
try {
|
|
1555
|
+
this.opts.onUiEvent?.({ type: 'permission.resolved', requestId, ...resolution });
|
|
1556
|
+
}
|
|
1557
|
+
catch { /* A failed consumer must not strand other pending requests. */ }
|
|
1558
|
+
}
|
|
1559
|
+
// ---- http ---------------------------------------------------------------
|
|
1560
|
+
http(method, path, body, signal) {
|
|
1561
|
+
return opencodeHttp(this.baseUrl, method, path, body, signal);
|
|
1562
|
+
}
|
|
1563
|
+
emit(event) {
|
|
1564
|
+
this.onEvent?.(event);
|
|
1565
|
+
}
|
|
1566
|
+
/** The mapper never throws, but a defect in it must still never disturb
|
|
1567
|
+
* the v1 stream — hence the belt-and-braces try. */
|
|
1568
|
+
emitUi(map) {
|
|
1569
|
+
try {
|
|
1570
|
+
const mapped = map(this.uiState);
|
|
1571
|
+
this.uiState = mapped.state;
|
|
1572
|
+
if (this.opts.onUiEvent) {
|
|
1573
|
+
for (const event of mapped.events)
|
|
1574
|
+
this.opts.onUiEvent(event);
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
catch {
|
|
1578
|
+
// v2 mapping is best-effort; v1 consumers stay unaffected.
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
function textOf(content) {
|
|
1583
|
+
return content
|
|
1584
|
+
.filter((b) => b.type === 'text')
|
|
1585
|
+
.map((b) => b.text)
|
|
1586
|
+
.join('\n')
|
|
1587
|
+
.trim();
|
|
1588
|
+
}
|
|
1589
|
+
function isRecord(value) {
|
|
1590
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
1591
|
+
}
|
|
1592
|
+
function sleep(ms) {
|
|
1593
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1594
|
+
}
|
|
1595
|
+
function stringField(obj, key) {
|
|
1596
|
+
const v = obj[key];
|
|
1597
|
+
return typeof v === 'string' ? v : undefined;
|
|
1598
|
+
}
|
|
1599
|
+
function numField(obj, key) {
|
|
1600
|
+
const v = obj[key];
|
|
1601
|
+
return typeof v === 'number' ? v : 0;
|
|
1602
|
+
}
|
|
1603
|
+
function safeStringify(value) {
|
|
1604
|
+
if (typeof value === 'string')
|
|
1605
|
+
return value;
|
|
1606
|
+
try {
|
|
1607
|
+
return JSON.stringify(value);
|
|
1608
|
+
}
|
|
1609
|
+
catch {
|
|
1610
|
+
return String(value);
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
/** `code N` or `signal S` for a server process that exited. */
|
|
1614
|
+
function describeExit(serve) {
|
|
1615
|
+
const { exitCode, signalCode } = serve.child;
|
|
1616
|
+
return exitCode !== null ? `code ${exitCode}` : `signal ${signalCode}`;
|
|
1617
|
+
}
|
|
1618
|
+
/** `code N — <stderr summary>` for one start that exited before listening. */
|
|
1619
|
+
function describeEarlyExit(serve) {
|
|
1620
|
+
const detail = summarizeRunnerStderr(serve.stderrChunks.join(''));
|
|
1621
|
+
return `${describeExit(serve)}${detail ? ` — ${detail}` : ''}`;
|
|
1622
|
+
}
|
|
1623
|
+
//# sourceMappingURL=opencode-server-runner.js.map
|