@hearsay-tools/squawk 0.0.0-stage → 0.17.0-dev.5682
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/LICENSE +22 -0
- package/README.md +1846 -2
- package/dist/activity/demand.d.ts +21 -0
- package/dist/activity/demand.js +49 -0
- package/dist/activity/demand.js.map +1 -0
- package/dist/activity/publisher.d.ts +48 -0
- package/dist/activity/publisher.js +175 -0
- package/dist/activity/publisher.js.map +1 -0
- package/dist/activity/read-model.d.ts +50 -0
- package/dist/activity/read-model.js +143 -0
- package/dist/activity/read-model.js.map +1 -0
- package/dist/activity/requests.d.ts +27 -0
- package/dist/activity/requests.js +81 -0
- package/dist/activity/requests.js.map +1 -0
- package/dist/activity/text.d.ts +4 -0
- package/dist/activity/text.js +13 -0
- package/dist/activity/text.js.map +1 -0
- package/dist/activity/tool-activity.d.ts +87 -0
- package/dist/activity/tool-activity.js +250 -0
- package/dist/activity/tool-activity.js.map +1 -0
- package/dist/activity/wait.d.ts +19 -0
- package/dist/activity/wait.js +91 -0
- package/dist/activity/wait.js.map +1 -0
- package/dist/agent-config/account-identity.d.ts +28 -0
- package/dist/agent-config/account-identity.js +132 -0
- package/dist/agent-config/account-identity.js.map +1 -0
- package/dist/agent-config/catalog.d.ts +70 -0
- package/dist/agent-config/catalog.js +384 -0
- package/dist/agent-config/catalog.js.map +1 -0
- package/dist/agent-config/files.d.ts +42 -0
- package/dist/agent-config/files.js +115 -0
- package/dist/agent-config/files.js.map +1 -0
- package/dist/agent-config/model-settings/claude.d.ts +2 -0
- package/dist/agent-config/model-settings/claude.js +11 -0
- package/dist/agent-config/model-settings/claude.js.map +1 -0
- package/dist/agent-config/model-settings/codex.d.ts +2 -0
- package/dist/agent-config/model-settings/codex.js +16 -0
- package/dist/agent-config/model-settings/codex.js.map +1 -0
- package/dist/agent-config/model-settings/opencode.d.ts +2 -0
- package/dist/agent-config/model-settings/opencode.js +8 -0
- package/dist/agent-config/model-settings/opencode.js.map +1 -0
- package/dist/agent-config/model-settings/pi.d.ts +2 -0
- package/dist/agent-config/model-settings/pi.js +38 -0
- package/dist/agent-config/model-settings/pi.js.map +1 -0
- package/dist/agent-config/model-settings/shared.d.ts +12 -0
- package/dist/agent-config/model-settings/shared.js +100 -0
- package/dist/agent-config/model-settings/shared.js.map +1 -0
- package/dist/agent-config/model-settings/types.d.ts +9 -0
- package/dist/agent-config/model-settings/types.js +2 -0
- package/dist/agent-config/model-settings/types.js.map +1 -0
- package/dist/agent-config/models.d.ts +9 -0
- package/dist/agent-config/models.js +40 -0
- package/dist/agent-config/models.js.map +1 -0
- package/dist/agent-config/seed.d.ts +15 -0
- package/dist/agent-config/seed.js +94 -0
- package/dist/agent-config/seed.js.map +1 -0
- package/dist/agent-config/service.d.ts +44 -0
- package/dist/agent-config/service.js +73 -0
- package/dist/agent-config/service.js.map +1 -0
- package/dist/agent-config/validate.d.ts +18 -0
- package/dist/agent-config/validate.js +82 -0
- package/dist/agent-config/validate.js.map +1 -0
- package/dist/application-update/bin-recovery.d.ts +5 -0
- package/dist/application-update/bin-recovery.js +96 -0
- package/dist/application-update/bin-recovery.js.map +1 -0
- package/dist/application-update/discovery.d.ts +23 -0
- package/dist/application-update/discovery.js +131 -0
- package/dist/application-update/discovery.js.map +1 -0
- package/dist/application-update/helper.d.ts +58 -0
- package/dist/application-update/helper.js +363 -0
- package/dist/application-update/helper.js.map +1 -0
- package/dist/application-update/launcher.d.ts +12 -0
- package/dist/application-update/launcher.js +61 -0
- package/dist/application-update/launcher.js.map +1 -0
- package/dist/application-update/lock.d.ts +4 -0
- package/dist/application-update/lock.js +70 -0
- package/dist/application-update/lock.js.map +1 -0
- package/dist/application-update/npm-process.d.ts +17 -0
- package/dist/application-update/npm-process.js +156 -0
- package/dist/application-update/npm-process.js.map +1 -0
- package/dist/application-update/runtime-layout.d.ts +20 -0
- package/dist/application-update/runtime-layout.js +91 -0
- package/dist/application-update/runtime-layout.js.map +1 -0
- package/dist/application-update/scoped-recovery.d.ts +32 -0
- package/dist/application-update/scoped-recovery.js +210 -0
- package/dist/application-update/scoped-recovery.js.map +1 -0
- package/dist/application-update/service.d.ts +86 -0
- package/dist/application-update/service.js +523 -0
- package/dist/application-update/service.js.map +1 -0
- package/dist/archive-on-merge-setting.d.ts +15 -0
- package/dist/archive-on-merge-setting.js +15 -0
- package/dist/archive-on-merge-setting.js.map +1 -0
- package/dist/artifacts/cli.d.ts +1 -0
- package/dist/artifacts/cli.js +54 -0
- package/dist/artifacts/cli.js.map +1 -0
- package/dist/artifacts/lifecycle.d.ts +4 -0
- package/dist/artifacts/lifecycle.js +42 -0
- package/dist/artifacts/lifecycle.js.map +1 -0
- package/dist/artifacts/reports-index.d.ts +46 -0
- package/dist/artifacts/reports-index.js +279 -0
- package/dist/artifacts/reports-index.js.map +1 -0
- package/dist/artifacts/reports-watch.d.ts +43 -0
- package/dist/artifacts/reports-watch.js +129 -0
- package/dist/artifacts/reports-watch.js.map +1 -0
- package/dist/artifacts/resolve.d.ts +18 -0
- package/dist/artifacts/resolve.js +129 -0
- package/dist/artifacts/resolve.js.map +1 -0
- package/dist/artifacts/store.d.ts +40 -0
- package/dist/artifacts/store.js +513 -0
- package/dist/artifacts/store.js.map +1 -0
- package/dist/automations/automation-cli.d.ts +61 -0
- package/dist/automations/automation-cli.js +519 -0
- package/dist/automations/automation-cli.js.map +1 -0
- package/dist/automations/builtin-skill.d.ts +7 -0
- package/dist/automations/builtin-skill.js +14 -0
- package/dist/automations/builtin-skill.js.map +1 -0
- package/dist/automations/coordinator.d.ts +53 -0
- package/dist/automations/coordinator.js +136 -0
- package/dist/automations/coordinator.js.map +1 -0
- package/dist/automations/github-baseline.d.ts +3 -0
- package/dist/automations/github-baseline.js +17 -0
- package/dist/automations/github-baseline.js.map +1 -0
- package/dist/automations/github-poller.d.ts +93 -0
- package/dist/automations/github-poller.js +303 -0
- package/dist/automations/github-poller.js.map +1 -0
- package/dist/automations/project-files.d.ts +6 -0
- package/dist/automations/project-files.js +43 -0
- package/dist/automations/project-files.js.map +1 -0
- package/dist/automations/prompts.d.ts +12 -0
- package/dist/automations/prompts.js +162 -0
- package/dist/automations/prompts.js.map +1 -0
- package/dist/automations/schedule-runner.d.ts +153 -0
- package/dist/automations/schedule-runner.js +529 -0
- package/dist/automations/schedule-runner.js.map +1 -0
- package/dist/automations/scheduler.d.ts +95 -0
- package/dist/automations/scheduler.js +462 -0
- package/dist/automations/scheduler.js.map +1 -0
- package/dist/automations/service.d.ts +793 -0
- package/dist/automations/service.js +444 -0
- package/dist/automations/service.js.map +1 -0
- package/dist/automations/store.d.ts +168 -0
- package/dist/automations/store.js +805 -0
- package/dist/automations/store.js.map +1 -0
- package/dist/automations/task-template.d.ts +59 -0
- package/dist/automations/task-template.js +285 -0
- package/dist/automations/task-template.js.map +1 -0
- package/dist/automations/tool-adapter.d.ts +6 -0
- package/dist/automations/tool-adapter.js +115 -0
- package/dist/automations/tool-adapter.js.map +1 -0
- package/dist/automations/types.d.ts +1 -0
- package/dist/automations/types.js +2 -0
- package/dist/automations/types.js.map +1 -0
- package/dist/autosave-cleanup.d.ts +26 -0
- package/dist/autosave-cleanup.js +87 -0
- package/dist/autosave-cleanup.js.map +1 -0
- package/dist/autosave-git.d.ts +23 -0
- package/dist/autosave-git.js +211 -0
- package/dist/autosave-git.js.map +1 -0
- package/dist/autosave-group.d.ts +8 -0
- package/dist/autosave-group.js +61 -0
- package/dist/autosave-group.js.map +1 -0
- package/dist/autosave-holders.d.ts +34 -0
- package/dist/autosave-holders.js +228 -0
- package/dist/autosave-holders.js.map +1 -0
- package/dist/autosave-windows.d.ts +25 -0
- package/dist/autosave-windows.js +170 -0
- package/dist/autosave-windows.js.map +1 -0
- package/dist/cez.d.ts +2 -0
- package/dist/cez.js +3 -0
- package/dist/cez.js.map +1 -0
- package/dist/cezarion.d.ts +2 -0
- package/dist/cezarion.js +3 -0
- package/dist/cezarion.js.map +1 -0
- package/dist/ci-wait/client.d.ts +28 -0
- package/dist/ci-wait/client.js +123 -0
- package/dist/ci-wait/client.js.map +1 -0
- package/dist/ci-wait/controller.d.ts +824 -0
- package/dist/ci-wait/controller.js +305 -0
- package/dist/ci-wait/controller.js.map +1 -0
- package/dist/ci-wait/errors.d.ts +35 -0
- package/dist/ci-wait/errors.js +273 -0
- package/dist/ci-wait/errors.js.map +1 -0
- package/dist/ci-wait/github.d.ts +105 -0
- package/dist/ci-wait/github.js +324 -0
- package/dist/ci-wait/github.js.map +1 -0
- package/dist/ci-wait/injection.d.ts +3 -0
- package/dist/ci-wait/injection.js +13 -0
- package/dist/ci-wait/injection.js.map +1 -0
- package/dist/ci-wait/mcp.d.ts +3 -0
- package/dist/ci-wait/mcp.js +30 -0
- package/dist/ci-wait/mcp.js.map +1 -0
- package/dist/ci-wait/merge-progress.d.ts +84 -0
- package/dist/ci-wait/merge-progress.js +50 -0
- package/dist/ci-wait/merge-progress.js.map +1 -0
- package/dist/ci-wait/progress.d.ts +56 -0
- package/dist/ci-wait/progress.js +100 -0
- package/dist/ci-wait/progress.js.map +1 -0
- package/dist/ci-wait/resources.d.ts +9 -0
- package/dist/ci-wait/resources.js +46 -0
- package/dist/ci-wait/resources.js.map +1 -0
- package/dist/ci-wait/supervisor.d.ts +47 -0
- package/dist/ci-wait/supervisor.js +334 -0
- package/dist/ci-wait/supervisor.js.map +1 -0
- package/dist/ci-wait/text.d.ts +2 -0
- package/dist/ci-wait/text.js +5 -0
- package/dist/ci-wait/text.js.map +1 -0
- package/dist/ci-wait/tools.d.ts +845 -0
- package/dist/ci-wait/tools.js +232 -0
- package/dist/ci-wait/tools.js.map +1 -0
- package/dist/cli-dispatch.d.ts +33 -0
- package/dist/cli-dispatch.js +239 -0
- package/dist/cli-dispatch.js.map +1 -0
- package/dist/config.d.ts +117 -0
- package/dist/config.js +343 -0
- package/dist/config.js.map +1 -0
- package/dist/contract/active-provider.d.ts +12 -0
- package/dist/contract/activity.d.ts +1478 -0
- package/dist/contract/agent-config.d.ts +160 -0
- package/dist/contract/agent-profiles.d.ts +369 -0
- package/dist/contract/application-update.d.ts +32 -0
- package/dist/contract/artifacts.d.ts +100 -0
- package/dist/contract/ask-schema.d.ts +50 -0
- package/dist/contract/ask.d.ts +11 -0
- package/dist/contract/attachments.d.ts +35 -0
- package/dist/contract/attention.d.ts +99 -0
- package/dist/contract/automation-requests.d.ts +314 -0
- package/dist/contract/automation-schedule.d.ts +89 -0
- package/dist/contract/automation-storage.d.ts +518 -0
- package/dist/contract/automations.d.ts +1560 -0
- package/dist/contract/ci-wait.d.ts +281 -0
- package/dist/contract/config-requests.d.ts +36 -0
- package/dist/contract/control-locations.d.ts +10 -0
- package/dist/contract/conversations.d.ts +415 -0
- package/dist/contract/defined.d.ts +8 -0
- package/dist/contract/delegation.d.ts +2168 -0
- package/dist/contract/discovery.d.ts +228 -0
- package/dist/contract/effort.d.ts +18 -0
- package/dist/contract/events.d.ts +324 -0
- package/dist/contract/github-requests.d.ts +26 -0
- package/dist/contract/github.d.ts +732 -0
- package/dist/contract/handoff.d.ts +43 -0
- package/dist/contract/health.d.ts +128 -0
- package/dist/contract/home-recovery.d.ts +71 -0
- package/dist/contract/image-path.d.ts +6 -0
- package/dist/contract/index.d.ts +68 -0
- package/dist/contract/index.js +6709 -0
- package/dist/contract/live-coordination.d.ts +164 -0
- package/dist/contract/live-limits.d.ts +8 -0
- package/dist/contract/live.d.ts +123 -0
- package/dist/contract/pending-ask.d.ts +58 -0
- package/dist/contract/per-runner-optional-strings.d.ts +10 -0
- package/dist/contract/permissions.d.ts +54 -0
- package/dist/contract/preview.d.ts +568 -0
- package/dist/contract/project-limits.d.ts +35 -0
- package/dist/contract/projects.d.ts +716 -0
- package/dist/contract/provider-requests.d.ts +77 -0
- package/dist/contract/query-requests.d.ts +52 -0
- package/dist/contract/repo-requests.d.ts +12 -0
- package/dist/contract/repo.d.ts +515 -0
- package/dist/contract/report-title.d.ts +3 -0
- package/dist/contract/reports.d.ts +101 -0
- package/dist/contract/run-labels.d.ts +8 -0
- package/dist/contract/run-limits.d.ts +8 -0
- package/dist/contract/run-predicates.d.ts +87 -0
- package/dist/contract/run-requests.d.ts +33 -0
- package/dist/contract/run-search.d.ts +193 -0
- package/dist/contract/runs.d.ts +7108 -0
- package/dist/contract/scheduled-tasks.d.ts +188 -0
- package/dist/contract/self-update.d.ts +255 -0
- package/dist/contract/skill-sources.d.ts +125 -0
- package/dist/contract/skills.d.ts +56 -0
- package/dist/contract/task-options.d.ts +18 -0
- package/dist/contract/team-skill-ref.d.ts +10 -0
- package/dist/contract/tool-display.d.ts +25 -0
- package/dist/contract/ui-state-requests.d.ts +60 -0
- package/dist/contract/version.d.ts +3 -0
- package/dist/contract/voice.d.ts +213 -0
- package/dist/contract/waits.d.ts +1996 -0
- package/dist/contract/workflow-file.d.ts +37 -0
- package/dist/contract/workflow-requests.d.ts +7 -0
- package/dist/contract/workflows.d.ts +250 -0
- package/dist/contract/workspace-events.d.ts +410 -0
- package/dist/contract/workspace.d.ts +631 -0
- package/dist/contract/zoned-time.d.ts +26 -0
- package/dist/core/agent-env.d.ts +34 -0
- package/dist/core/agent-env.js +411 -0
- package/dist/core/agent-env.js.map +1 -0
- package/dist/core/agent-model-policy.d.ts +11 -0
- package/dist/core/agent-model-policy.js +38 -0
- package/dist/core/agent-model-policy.js.map +1 -0
- package/dist/core/agent-profiles.d.ts +50 -0
- package/dist/core/agent-profiles.js +105 -0
- package/dist/core/agent-profiles.js.map +1 -0
- package/dist/core/agent-runner.d.ts +425 -0
- package/dist/core/agent-runner.js +98 -0
- package/dist/core/agent-runner.js.map +1 -0
- package/dist/core/ask.d.ts +26 -0
- package/dist/core/ask.js +35 -0
- package/dist/core/ask.js.map +1 -0
- package/dist/core/backend-detect.d.ts +18 -0
- package/dist/core/backend-detect.js +216 -0
- package/dist/core/backend-detect.js.map +1 -0
- package/dist/core/claude-cli-runner.d.ts +85 -0
- package/dist/core/claude-cli-runner.js +899 -0
- package/dist/core/claude-cli-runner.js.map +1 -0
- package/dist/core/claude-executable.d.ts +2 -0
- package/dist/core/claude-executable.js +15 -0
- package/dist/core/claude-executable.js.map +1 -0
- package/dist/core/claude-model-catalog.d.ts +16 -0
- package/dist/core/claude-model-catalog.js +198 -0
- package/dist/core/claude-model-catalog.js.map +1 -0
- package/dist/core/claude-stream.d.ts +38 -0
- package/dist/core/claude-stream.js +77 -0
- package/dist/core/claude-stream.js.map +1 -0
- package/dist/core/claude-ui-mapper.d.ts +88 -0
- package/dist/core/claude-ui-mapper.js +851 -0
- package/dist/core/claude-ui-mapper.js.map +1 -0
- package/dist/core/codex-app-server-runner.d.ts +76 -0
- package/dist/core/codex-app-server-runner.js +1271 -0
- package/dist/core/codex-app-server-runner.js.map +1 -0
- package/dist/core/codex-app-server-transport.d.ts +52 -0
- package/dist/core/codex-app-server-transport.js +200 -0
- package/dist/core/codex-app-server-transport.js.map +1 -0
- package/dist/core/codex-approvals.d.ts +12 -0
- package/dist/core/codex-approvals.js +180 -0
- package/dist/core/codex-approvals.js.map +1 -0
- package/dist/core/codex-hook-mapper.d.ts +15 -0
- package/dist/core/codex-hook-mapper.js +73 -0
- package/dist/core/codex-hook-mapper.js.map +1 -0
- package/dist/core/codex-model-catalog.d.ts +10 -0
- package/dist/core/codex-model-catalog.js +110 -0
- package/dist/core/codex-model-catalog.js.map +1 -0
- package/dist/core/codex-native-frames.d.ts +35 -0
- package/dist/core/codex-native-frames.js +80 -0
- package/dist/core/codex-native-frames.js.map +1 -0
- package/dist/core/codex-permissions.d.ts +6 -0
- package/dist/core/codex-permissions.js +27 -0
- package/dist/core/codex-permissions.js.map +1 -0
- package/dist/core/codex-stream-error.d.ts +2 -0
- package/dist/core/codex-stream-error.js +12 -0
- package/dist/core/codex-stream-error.js.map +1 -0
- package/dist/core/codex-turn-outcome.d.ts +10 -0
- package/dist/core/codex-turn-outcome.js +35 -0
- package/dist/core/codex-turn-outcome.js.map +1 -0
- package/dist/core/codex-ui-mapper-state.d.ts +84 -0
- package/dist/core/codex-ui-mapper-state.js +8 -0
- package/dist/core/codex-ui-mapper-state.js.map +1 -0
- package/dist/core/codex-ui-mapper.d.ts +44 -0
- package/dist/core/codex-ui-mapper.js +799 -0
- package/dist/core/codex-ui-mapper.js.map +1 -0
- package/dist/core/cursor-cli-flags.d.ts +19 -0
- package/dist/core/cursor-cli-flags.js +47 -0
- package/dist/core/cursor-cli-flags.js.map +1 -0
- package/dist/core/cursor-config-options.d.ts +18 -0
- package/dist/core/cursor-config-options.js +31 -0
- package/dist/core/cursor-config-options.js.map +1 -0
- package/dist/core/cursor-model-catalog.d.ts +50 -0
- package/dist/core/cursor-model-catalog.js +306 -0
- package/dist/core/cursor-model-catalog.js.map +1 -0
- package/dist/core/cursor-print-capabilities.d.ts +14 -0
- package/dist/core/cursor-print-capabilities.js +169 -0
- package/dist/core/cursor-print-capabilities.js.map +1 -0
- package/dist/core/cursor-print-process.d.ts +31 -0
- package/dist/core/cursor-print-process.js +117 -0
- package/dist/core/cursor-print-process.js.map +1 -0
- package/dist/core/cursor-print-runner.d.ts +43 -0
- package/dist/core/cursor-print-runner.js +574 -0
- package/dist/core/cursor-print-runner.js.map +1 -0
- package/dist/core/cursor-print-tool-catalog.d.ts +3 -0
- package/dist/core/cursor-print-tool-catalog.js +13 -0
- package/dist/core/cursor-print-tool-catalog.js.map +1 -0
- package/dist/core/cursor-print-ui-mapper.d.ts +47 -0
- package/dist/core/cursor-print-ui-mapper.js +574 -0
- package/dist/core/cursor-print-ui-mapper.js.map +1 -0
- package/dist/core/cursor-provider-error.d.ts +9 -0
- package/dist/core/cursor-provider-error.js +15 -0
- package/dist/core/cursor-provider-error.js.map +1 -0
- package/dist/core/cursor-runner.d.ts +46 -0
- package/dist/core/cursor-runner.js +144 -0
- package/dist/core/cursor-runner.js.map +1 -0
- package/dist/core/defined.d.ts +1 -0
- package/dist/core/defined.js +2 -0
- package/dist/core/defined.js.map +1 -0
- package/dist/core/disclaim-spawn.d.ts +11 -0
- package/dist/core/disclaim-spawn.js +60 -0
- package/dist/core/disclaim-spawn.js.map +1 -0
- package/dist/core/edit-write-key.d.ts +2 -0
- package/dist/core/edit-write-key.js +6 -0
- package/dist/core/edit-write-key.js.map +1 -0
- package/dist/core/hook-items.d.ts +14 -0
- package/dist/core/hook-items.js +13 -0
- package/dist/core/hook-items.js.map +1 -0
- package/dist/core/host-model-catalog.d.ts +7 -0
- package/dist/core/host-model-catalog.js +21 -0
- package/dist/core/host-model-catalog.js.map +1 -0
- package/dist/core/input-submissions.d.ts +14 -0
- package/dist/core/input-submissions.js +26 -0
- package/dist/core/input-submissions.js.map +1 -0
- package/dist/core/managed-session.d.ts +6 -0
- package/dist/core/managed-session.js +116 -0
- package/dist/core/managed-session.js.map +1 -0
- package/dist/core/model-discovery-options.d.ts +8 -0
- package/dist/core/model-discovery-options.js +2 -0
- package/dist/core/model-discovery-options.js.map +1 -0
- package/dist/core/model-identity.d.ts +108 -0
- package/dist/core/model-identity.js +137 -0
- package/dist/core/model-identity.js.map +1 -0
- package/dist/core/model-presets.d.ts +10 -0
- package/dist/core/model-presets.js +77 -0
- package/dist/core/model-presets.js.map +1 -0
- package/dist/core/model-probe-teardown.d.ts +4 -0
- package/dist/core/model-probe-teardown.js +20 -0
- package/dist/core/model-probe-teardown.js.map +1 -0
- package/dist/core/ndjson.d.ts +6 -0
- package/dist/core/ndjson.js +23 -0
- package/dist/core/ndjson.js.map +1 -0
- package/dist/core/omp-model-catalog.d.ts +39 -0
- package/dist/core/omp-model-catalog.js +183 -0
- package/dist/core/omp-model-catalog.js.map +1 -0
- package/dist/core/omp-runner.d.ts +86 -0
- package/dist/core/omp-runner.js +818 -0
- package/dist/core/omp-runner.js.map +1 -0
- package/dist/core/omp-subagent-rows.d.ts +21 -0
- package/dist/core/omp-subagent-rows.js +99 -0
- package/dist/core/omp-subagent-rows.js.map +1 -0
- package/dist/core/omp-ui-mapper.d.ts +112 -0
- package/dist/core/omp-ui-mapper.js +807 -0
- package/dist/core/omp-ui-mapper.js.map +1 -0
- package/dist/core/opencode-model-catalog.d.ts +27 -0
- package/dist/core/opencode-model-catalog.js +189 -0
- package/dist/core/opencode-model-catalog.js.map +1 -0
- package/dist/core/opencode-permissions.d.ts +52 -0
- package/dist/core/opencode-permissions.js +101 -0
- package/dist/core/opencode-permissions.js.map +1 -0
- package/dist/core/opencode-runtime-config.d.ts +9 -0
- package/dist/core/opencode-runtime-config.js +26 -0
- package/dist/core/opencode-runtime-config.js.map +1 -0
- package/dist/core/opencode-server-runner.d.ts +75 -0
- package/dist/core/opencode-server-runner.js +1690 -0
- package/dist/core/opencode-server-runner.js.map +1 -0
- package/dist/core/opencode-session-error.d.ts +19 -0
- package/dist/core/opencode-session-error.js +42 -0
- package/dist/core/opencode-session-error.js.map +1 -0
- package/dist/core/opencode-task-scope.d.ts +9 -0
- package/dist/core/opencode-task-scope.js +19 -0
- package/dist/core/opencode-task-scope.js.map +1 -0
- package/dist/core/opencode-ui-mapper-state.d.ts +82 -0
- package/dist/core/opencode-ui-mapper-state.js +7 -0
- package/dist/core/opencode-ui-mapper-state.js.map +1 -0
- package/dist/core/opencode-ui-mapper.d.ts +59 -0
- package/dist/core/opencode-ui-mapper.js +724 -0
- package/dist/core/opencode-ui-mapper.js.map +1 -0
- package/dist/core/opencode-usage.d.ts +32 -0
- package/dist/core/opencode-usage.js +105 -0
- package/dist/core/opencode-usage.js.map +1 -0
- package/dist/core/pi-model-catalog.d.ts +34 -0
- package/dist/core/pi-model-catalog.js +247 -0
- package/dist/core/pi-model-catalog.js.map +1 -0
- package/dist/core/pi-rpc-turn.d.ts +179 -0
- package/dist/core/pi-rpc-turn.js +370 -0
- package/dist/core/pi-rpc-turn.js.map +1 -0
- package/dist/core/pi-rpc-wire.d.ts +31 -0
- package/dist/core/pi-rpc-wire.js +88 -0
- package/dist/core/pi-rpc-wire.js.map +1 -0
- package/dist/core/pi-runner.d.ts +58 -0
- package/dist/core/pi-runner.js +587 -0
- package/dist/core/pi-runner.js.map +1 -0
- package/dist/core/pi-ui-mapper.d.ts +52 -0
- package/dist/core/pi-ui-mapper.js +408 -0
- package/dist/core/pi-ui-mapper.js.map +1 -0
- package/dist/core/process-usage.d.ts +74 -0
- package/dist/core/process-usage.js +219 -0
- package/dist/core/process-usage.js.map +1 -0
- package/dist/core/product-env.d.ts +21 -0
- package/dist/core/product-env.js +38 -0
- package/dist/core/product-env.js.map +1 -0
- package/dist/core/provider-auth.d.ts +168 -0
- package/dist/core/provider-auth.js +661 -0
- package/dist/core/provider-auth.js.map +1 -0
- package/dist/core/provider-availability.d.ts +3 -0
- package/dist/core/provider-availability.js +14 -0
- package/dist/core/provider-availability.js.map +1 -0
- package/dist/core/runner-factory.d.ts +11 -0
- package/dist/core/runner-factory.js +36 -0
- package/dist/core/runner-factory.js.map +1 -0
- package/dist/core/runner-facts.d.ts +135 -0
- package/dist/core/runner-facts.js +59 -0
- package/dist/core/runner-facts.js.map +1 -0
- package/dist/core/runner-model-catalog.d.ts +34 -0
- package/dist/core/runner-model-catalog.js +109 -0
- package/dist/core/runner-model-catalog.js.map +1 -0
- package/dist/core/runner-runtime.d.ts +40 -0
- package/dist/core/runner-runtime.js +88 -0
- package/dist/core/runner-runtime.js.map +1 -0
- package/dist/core/runner-stderr.d.ts +2 -0
- package/dist/core/runner-stderr.js +20 -0
- package/dist/core/runner-stderr.js.map +1 -0
- package/dist/core/runner-tool-grants.d.ts +19 -0
- package/dist/core/runner-tool-grants.js +54 -0
- package/dist/core/runner-tool-grants.js.map +1 -0
- package/dist/core/secret-redaction.d.ts +20 -0
- package/dist/core/secret-redaction.js +95 -0
- package/dist/core/secret-redaction.js.map +1 -0
- package/dist/core/session-process.d.ts +43 -0
- package/dist/core/session-process.js +363 -0
- package/dist/core/session-process.js.map +1 -0
- package/dist/core/shell-env.d.ts +17 -0
- package/dist/core/shell-env.js +51 -0
- package/dist/core/shell-env.js.map +1 -0
- package/dist/core/ui-events.d.ts +356 -0
- package/dist/core/ui-events.js +13 -0
- package/dist/core/ui-events.js.map +1 -0
- package/dist/core/usage-limit.d.ts +42 -0
- package/dist/core/usage-limit.js +152 -0
- package/dist/core/usage-limit.js.map +1 -0
- package/dist/core/usage.d.ts +11 -0
- package/dist/core/usage.js +15 -0
- package/dist/core/usage.js.map +1 -0
- package/dist/core/v1-text-coalescer.d.ts +36 -0
- package/dist/core/v1-text-coalescer.js +72 -0
- package/dist/core/v1-text-coalescer.js.map +1 -0
- package/dist/data-gitignore.d.ts +6 -0
- package/dist/data-gitignore.js +80 -0
- package/dist/data-gitignore.js.map +1 -0
- package/dist/delegation/capacity.d.ts +15 -0
- package/dist/delegation/capacity.js +30 -0
- package/dist/delegation/capacity.js.map +1 -0
- package/dist/delegation/cli.d.ts +5 -0
- package/dist/delegation/cli.js +572 -0
- package/dist/delegation/cli.js.map +1 -0
- package/dist/delegation/context.d.ts +40 -0
- package/dist/delegation/context.js +398 -0
- package/dist/delegation/context.js.map +1 -0
- package/dist/delegation/conversation-send.d.ts +64 -0
- package/dist/delegation/conversation-send.js +74 -0
- package/dist/delegation/conversation-send.js.map +1 -0
- package/dist/delegation/conversations.d.ts +2186 -0
- package/dist/delegation/conversations.js +285 -0
- package/dist/delegation/conversations.js.map +1 -0
- package/dist/delegation/credentials.d.ts +21 -0
- package/dist/delegation/credentials.js +66 -0
- package/dist/delegation/credentials.js.map +1 -0
- package/dist/delegation/destroy-observation.d.ts +42 -0
- package/dist/delegation/destroy-observation.js +115 -0
- package/dist/delegation/destroy-observation.js.map +1 -0
- package/dist/delegation/effort.d.ts +1 -0
- package/dist/delegation/effort.js +11 -0
- package/dist/delegation/effort.js.map +1 -0
- package/dist/delegation/execution-identity.d.ts +257 -0
- package/dist/delegation/execution-identity.js +253 -0
- package/dist/delegation/execution-identity.js.map +1 -0
- package/dist/delegation/execution-settings.d.ts +11 -0
- package/dist/delegation/execution-settings.js +65 -0
- package/dist/delegation/execution-settings.js.map +1 -0
- package/dist/delegation/idle-test-app.d.ts +4 -0
- package/dist/delegation/idle-test-app.js +186 -0
- package/dist/delegation/idle-test-app.js.map +1 -0
- package/dist/delegation/input.d.ts +12 -0
- package/dist/delegation/input.js +50 -0
- package/dist/delegation/input.js.map +1 -0
- package/dist/delegation/park-notice.d.ts +45 -0
- package/dist/delegation/park-notice.js +81 -0
- package/dist/delegation/park-notice.js.map +1 -0
- package/dist/delegation/policy.d.ts +27 -0
- package/dist/delegation/policy.js +110 -0
- package/dist/delegation/policy.js.map +1 -0
- package/dist/delegation/process-liveness.d.ts +98 -0
- package/dist/delegation/process-liveness.js +213 -0
- package/dist/delegation/process-liveness.js.map +1 -0
- package/dist/delegation/provision.d.ts +36 -0
- package/dist/delegation/provision.js +218 -0
- package/dist/delegation/provision.js.map +1 -0
- package/dist/delegation/questions.d.ts +24 -0
- package/dist/delegation/questions.js +56 -0
- package/dist/delegation/questions.js.map +1 -0
- package/dist/delegation/readiness.d.ts +13 -0
- package/dist/delegation/readiness.js +19 -0
- package/dist/delegation/readiness.js.map +1 -0
- package/dist/delegation/results.d.ts +13 -0
- package/dist/delegation/results.js +153 -0
- package/dist/delegation/results.js.map +1 -0
- package/dist/delegation/retry-backoff.d.ts +31 -0
- package/dist/delegation/retry-backoff.js +26 -0
- package/dist/delegation/retry-backoff.js.map +1 -0
- package/dist/delegation/routes.d.ts +1017 -0
- package/dist/delegation/routes.js +85 -0
- package/dist/delegation/routes.js.map +1 -0
- package/dist/delegation/scratch-cleanup.d.ts +33 -0
- package/dist/delegation/scratch-cleanup.js +155 -0
- package/dist/delegation/scratch-cleanup.js.map +1 -0
- package/dist/delegation/service.d.ts +264 -0
- package/dist/delegation/service.js +807 -0
- package/dist/delegation/service.js.map +1 -0
- package/dist/delegation/task-discovery.d.ts +6 -0
- package/dist/delegation/task-discovery.js +27 -0
- package/dist/delegation/task-discovery.js.map +1 -0
- package/dist/delegation/transport.d.ts +995 -0
- package/dist/delegation/transport.js +22 -0
- package/dist/delegation/transport.js.map +1 -0
- package/dist/delegation/wait.d.ts +7 -0
- package/dist/delegation/wait.js +44 -0
- package/dist/delegation/wait.js.map +1 -0
- package/dist/delegation/windows-test-app.d.ts +5 -0
- package/dist/delegation/windows-test-app.js +64 -0
- package/dist/delegation/windows-test-app.js.map +1 -0
- package/dist/delegation/windows-workspace-identity.d.ts +3 -0
- package/dist/delegation/windows-workspace-identity.js +23 -0
- package/dist/delegation/windows-workspace-identity.js.map +1 -0
- package/dist/delegation/worker-cleanup.d.ts +53 -0
- package/dist/delegation/worker-cleanup.js +330 -0
- package/dist/delegation/worker-cleanup.js.map +1 -0
- package/dist/delegation/workspace.d.ts +40 -0
- package/dist/delegation/workspace.js +592 -0
- package/dist/delegation/workspace.js.map +1 -0
- package/dist/detached-process.d.ts +134 -0
- package/dist/detached-process.js +460 -0
- package/dist/detached-process.js.map +1 -0
- package/dist/discovery/catalog.d.ts +16 -0
- package/dist/discovery/catalog.js +31 -0
- package/dist/discovery/catalog.js.map +1 -0
- package/dist/discovery/cli.d.ts +8 -0
- package/dist/discovery/cli.js +122 -0
- package/dist/discovery/cli.js.map +1 -0
- package/dist/git-command.d.ts +7 -0
- package/dist/git-command.js +8 -0
- package/dist/git-command.js.map +1 -0
- package/dist/git-diff-base.d.ts +41 -0
- package/dist/git-diff-base.js +116 -0
- package/dist/git-diff-base.js.map +1 -0
- package/dist/git-index-copy.d.ts +4 -0
- package/dist/git-index-copy.js +10 -0
- package/dist/git-index-copy.js.map +1 -0
- package/dist/git-private-index.d.ts +11 -0
- package/dist/git-private-index.js +51 -0
- package/dist/git-private-index.js.map +1 -0
- package/dist/git-refs.d.ts +11 -0
- package/dist/git-refs.js +14 -0
- package/dist/git-refs.js.map +1 -0
- package/dist/git-worktree-lock-helper.d.ts +7 -0
- package/dist/git-worktree-lock-helper.js +178 -0
- package/dist/git-worktree-lock-helper.js.map +1 -0
- package/dist/git-worktree-lock.d.ts +17 -0
- package/dist/git-worktree-lock.js +90 -0
- package/dist/git-worktree-lock.js.map +1 -0
- package/dist/git-worktree-release.d.ts +20 -0
- package/dist/git-worktree-release.js +27 -0
- package/dist/git-worktree-release.js.map +1 -0
- package/dist/git-worktree.d.ts +148 -0
- package/dist/git-worktree.js +858 -0
- package/dist/git-worktree.js.map +1 -0
- package/dist/handoff.d.ts +72 -0
- package/dist/handoff.js +213 -0
- package/dist/handoff.js.map +1 -0
- package/dist/headless-run.d.ts +48 -0
- package/dist/headless-run.js +158 -0
- package/dist/headless-run.js.map +1 -0
- package/dist/home/boundary.d.ts +5 -0
- package/dist/home/boundary.js +76 -0
- package/dist/home/boundary.js.map +1 -0
- package/dist/home/changes.d.ts +3 -0
- package/dist/home/changes.js +11 -0
- package/dist/home/changes.js.map +1 -0
- package/dist/home/command.d.ts +9 -0
- package/dist/home/command.js +37 -0
- package/dist/home/command.js.map +1 -0
- package/dist/home/deprecation.d.ts +9 -0
- package/dist/home/deprecation.js +17 -0
- package/dist/home/deprecation.js.map +1 -0
- package/dist/home/display.d.ts +4 -0
- package/dist/home/display.js +11 -0
- package/dist/home/display.js.map +1 -0
- package/dist/home/entry-authorization.d.ts +17 -0
- package/dist/home/entry-authorization.js +39 -0
- package/dist/home/entry-authorization.js.map +1 -0
- package/dist/home/entry.d.ts +16 -0
- package/dist/home/entry.js +96 -0
- package/dist/home/entry.js.map +1 -0
- package/dist/home/file-location.d.ts +14 -0
- package/dist/home/file-location.js +24 -0
- package/dist/home/file-location.js.map +1 -0
- package/dist/home/home.d.ts +42 -0
- package/dist/home/home.js +70 -0
- package/dist/home/home.js.map +1 -0
- package/dist/home/identity.d.ts +22 -0
- package/dist/home/identity.js +25 -0
- package/dist/home/identity.js.map +1 -0
- package/dist/home/install-marker.d.ts +27 -0
- package/dist/home/install-marker.js +78 -0
- package/dist/home/install-marker.js.map +1 -0
- package/dist/home/kind-roots.d.ts +10 -0
- package/dist/home/kind-roots.js +36 -0
- package/dist/home/kind-roots.js.map +1 -0
- package/dist/home/leases.d.ts +14 -0
- package/dist/home/leases.js +55 -0
- package/dist/home/leases.js.map +1 -0
- package/dist/home/legacy-account-paths.d.ts +4 -0
- package/dist/home/legacy-account-paths.js +41 -0
- package/dist/home/legacy-account-paths.js.map +1 -0
- package/dist/home/legacy-merge.d.ts +3 -0
- package/dist/home/legacy-merge.js +45 -0
- package/dist/home/legacy-merge.js.map +1 -0
- package/dist/home/legacy-recovery.d.ts +5 -0
- package/dist/home/legacy-recovery.js +154 -0
- package/dist/home/legacy-recovery.js.map +1 -0
- package/dist/home/legacy-source.d.ts +15 -0
- package/dist/home/legacy-source.js +57 -0
- package/dist/home/legacy-source.js.map +1 -0
- package/dist/home/migrate.d.ts +19 -0
- package/dist/home/migrate.js +322 -0
- package/dist/home/migrate.js.map +1 -0
- package/dist/home/migration-account-source.d.ts +2 -0
- package/dist/home/migration-account-source.js +17 -0
- package/dist/home/migration-account-source.js.map +1 -0
- package/dist/home/migration-accounts.d.ts +23 -0
- package/dist/home/migration-accounts.js +174 -0
- package/dist/home/migration-accounts.js.map +1 -0
- package/dist/home/migration-boot.d.ts +23 -0
- package/dist/home/migration-boot.js +84 -0
- package/dist/home/migration-boot.js.map +1 -0
- package/dist/home/migration-claim.d.ts +4 -0
- package/dist/home/migration-claim.js +69 -0
- package/dist/home/migration-claim.js.map +1 -0
- package/dist/home/migration-cli.d.ts +3 -0
- package/dist/home/migration-cli.js +64 -0
- package/dist/home/migration-cli.js.map +1 -0
- package/dist/home/migration-files.d.ts +14 -0
- package/dist/home/migration-files.js +192 -0
- package/dist/home/migration-files.js.map +1 -0
- package/dist/home/migration-guard.d.ts +2 -0
- package/dist/home/migration-guard.js +20 -0
- package/dist/home/migration-guard.js.map +1 -0
- package/dist/home/migration-plan.d.ts +20 -0
- package/dist/home/migration-plan.js +71 -0
- package/dist/home/migration-plan.js.map +1 -0
- package/dist/home/migration-record.d.ts +79 -0
- package/dist/home/migration-record.js +39 -0
- package/dist/home/migration-record.js.map +1 -0
- package/dist/home/private-files.d.ts +13 -0
- package/dist/home/private-files.js +113 -0
- package/dist/home/private-files.js.map +1 -0
- package/dist/home/process-identity.d.ts +2 -0
- package/dist/home/process-identity.js +8 -0
- package/dist/home/process-identity.js.map +1 -0
- package/dist/home/protected-roots.d.ts +25 -0
- package/dist/home/protected-roots.js +91 -0
- package/dist/home/protected-roots.js.map +1 -0
- package/dist/home/recovery-watch.d.ts +3 -0
- package/dist/home/recovery-watch.js +75 -0
- package/dist/home/recovery-watch.js.map +1 -0
- package/dist/home/recovery.d.ts +10 -0
- package/dist/home/recovery.js +94 -0
- package/dist/home/recovery.js.map +1 -0
- package/dist/home/registry-content.d.ts +2 -0
- package/dist/home/registry-content.js +17 -0
- package/dist/home/registry-content.js.map +1 -0
- package/dist/home/reset-detection.d.ts +5 -0
- package/dist/home/reset-detection.js +22 -0
- package/dist/home/reset-detection.js.map +1 -0
- package/dist/home/resolve.d.ts +10 -0
- package/dist/home/resolve.js +28 -0
- package/dist/home/resolve.js.map +1 -0
- package/dist/home/store.d.ts +48 -0
- package/dist/home/store.js +324 -0
- package/dist/home/store.js.map +1 -0
- package/dist/home/switch.d.ts +2 -0
- package/dist/home/switch.js +3 -0
- package/dist/home/switch.js.map +1 -0
- package/dist/home/version-log.d.ts +48 -0
- package/dist/home/version-log.js +216 -0
- package/dist/home/version-log.js.map +1 -0
- package/dist/home/write-lock.d.ts +6 -0
- package/dist/home/write-lock.js +96 -0
- package/dist/home/write-lock.js.map +1 -0
- package/dist/hsq.d.ts +2 -0
- package/dist/hsq.js +3 -0
- package/dist/hsq.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -0
- package/dist/install-as-command.d.ts +32 -0
- package/dist/install-as-command.js +55 -0
- package/dist/install-as-command.js.map +1 -0
- package/dist/jobs/cli.d.ts +2 -0
- package/dist/jobs/cli.js +53 -0
- package/dist/jobs/cli.js.map +1 -0
- package/dist/jobs/command.d.ts +9 -0
- package/dist/jobs/command.js +19 -0
- package/dist/jobs/command.js.map +1 -0
- package/dist/jobs/job.d.ts +77 -0
- package/dist/jobs/job.js +252 -0
- package/dist/jobs/job.js.map +1 -0
- package/dist/merge-observations.d.ts +13 -0
- package/dist/merge-observations.js +55 -0
- package/dist/merge-observations.js.map +1 -0
- package/dist/merged-streams.d.ts +13 -0
- package/dist/merged-streams.js +33 -0
- package/dist/merged-streams.js.map +1 -0
- package/dist/open-url.d.ts +2 -0
- package/dist/open-url.js +10 -0
- package/dist/open-url.js.map +1 -0
- package/dist/pack-check.d.ts +17 -0
- package/dist/pack-check.js +27 -0
- package/dist/pack-check.js.map +1 -0
- package/dist/paths.d.ts +118 -0
- package/dist/paths.js +192 -0
- package/dist/paths.js.map +1 -0
- package/dist/planner.d.ts +30 -0
- package/dist/planner.js +270 -0
- package/dist/planner.js.map +1 -0
- package/dist/preview/agent-address.d.ts +34 -0
- package/dist/preview/agent-address.js +52 -0
- package/dist/preview/agent-address.js.map +1 -0
- package/dist/preview/agent-marker.d.ts +17 -0
- package/dist/preview/agent-marker.js +71 -0
- package/dist/preview/agent-marker.js.map +1 -0
- package/dist/preview/browser-launch.d.ts +28 -0
- package/dist/preview/browser-launch.js +64 -0
- package/dist/preview/browser-launch.js.map +1 -0
- package/dist/preview/cdp-proxy.d.ts +54 -0
- package/dist/preview/cdp-proxy.js +152 -0
- package/dist/preview/cdp-proxy.js.map +1 -0
- package/dist/preview/cdp.d.ts +49 -0
- package/dist/preview/cdp.js +167 -0
- package/dist/preview/cdp.js.map +1 -0
- package/dist/preview/chromium-launch-progress.d.ts +10 -0
- package/dist/preview/chromium-launch-progress.js +48 -0
- package/dist/preview/chromium-launch-progress.js.map +1 -0
- package/dist/preview/chromium.d.ts +91 -0
- package/dist/preview/chromium.js +500 -0
- package/dist/preview/chromium.js.map +1 -0
- package/dist/preview/density.d.ts +17 -0
- package/dist/preview/density.js +62 -0
- package/dist/preview/density.js.map +1 -0
- package/dist/preview/dev-server.d.ts +68 -0
- package/dist/preview/dev-server.js +318 -0
- package/dist/preview/dev-server.js.map +1 -0
- package/dist/preview/host.d.ts +215 -0
- package/dist/preview/host.js +954 -0
- package/dist/preview/host.js.map +1 -0
- package/dist/preview/registration.d.ts +68 -0
- package/dist/preview/registration.js +111 -0
- package/dist/preview/registration.js.map +1 -0
- package/dist/preview/run-tools.d.ts +9 -0
- package/dist/preview/run-tools.js +72 -0
- package/dist/preview/run-tools.js.map +1 -0
- package/dist/preview/session.d.ts +139 -0
- package/dist/preview/session.js +479 -0
- package/dist/preview/session.js.map +1 -0
- package/dist/preview/url.d.ts +6 -0
- package/dist/preview/url.js +17 -0
- package/dist/preview/url.js.map +1 -0
- package/dist/process-wait/exit-file.d.ts +29 -0
- package/dist/process-wait/exit-file.js +67 -0
- package/dist/process-wait/exit-file.js.map +1 -0
- package/dist/process-wait/supervisor.d.ts +30 -0
- package/dist/process-wait/supervisor.js +71 -0
- package/dist/process-wait/supervisor.js.map +1 -0
- package/dist/project-commands.d.ts +14 -0
- package/dist/project-commands.js +91 -0
- package/dist/project-commands.js.map +1 -0
- package/dist/project-migration/answer.d.ts +23 -0
- package/dist/project-migration/answer.js +37 -0
- package/dist/project-migration/answer.js.map +1 -0
- package/dist/project-migration/auto.d.ts +73 -0
- package/dist/project-migration/auto.js +161 -0
- package/dist/project-migration/auto.js.map +1 -0
- package/dist/project-migration/cli.d.ts +18 -0
- package/dist/project-migration/cli.js +57 -0
- package/dist/project-migration/cli.js.map +1 -0
- package/dist/project-migration/containment.d.ts +52 -0
- package/dist/project-migration/containment.js +200 -0
- package/dist/project-migration/containment.js.map +1 -0
- package/dist/project-migration/durable.d.ts +25 -0
- package/dist/project-migration/durable.js +69 -0
- package/dist/project-migration/durable.js.map +1 -0
- package/dist/project-migration/engine.d.ts +47 -0
- package/dist/project-migration/engine.js +103 -0
- package/dist/project-migration/engine.js.map +1 -0
- package/dist/project-migration/fresh.d.ts +4 -0
- package/dist/project-migration/fresh.js +25 -0
- package/dist/project-migration/fresh.js.map +1 -0
- package/dist/project-migration/journal.d.ts +139 -0
- package/dist/project-migration/journal.js +69 -0
- package/dist/project-migration/journal.js.map +1 -0
- package/dist/project-migration/live.d.ts +48 -0
- package/dist/project-migration/live.js +148 -0
- package/dist/project-migration/live.js.map +1 -0
- package/dist/project-migration/offline.d.ts +25 -0
- package/dist/project-migration/offline.js +54 -0
- package/dist/project-migration/offline.js.map +1 -0
- package/dist/project-migration/plan.d.ts +91 -0
- package/dist/project-migration/plan.js +466 -0
- package/dist/project-migration/plan.js.map +1 -0
- package/dist/project-migration/recovery.d.ts +28 -0
- package/dist/project-migration/recovery.js +78 -0
- package/dist/project-migration/recovery.js.map +1 -0
- package/dist/project-migration/steps.d.ts +18 -0
- package/dist/project-migration/steps.js +312 -0
- package/dist/project-migration/steps.js.map +1 -0
- package/dist/project-paths.d.ts +61 -0
- package/dist/project-paths.js +185 -0
- package/dist/project-paths.js.map +1 -0
- package/dist/release/compatibility.d.ts +12 -0
- package/dist/release/compatibility.js +62 -0
- package/dist/release/compatibility.js.map +1 -0
- package/dist/release/manifests.d.ts +112 -0
- package/dist/release/manifests.js +104 -0
- package/dist/release/manifests.js.map +1 -0
- package/dist/release/publication.d.ts +3 -0
- package/dist/release/publication.js +34 -0
- package/dist/release/publication.js.map +1 -0
- package/dist/release/snapshot.d.ts +67 -0
- package/dist/release/snapshot.js +97 -0
- package/dist/release/snapshot.js.map +1 -0
- package/dist/release/stable.d.ts +38 -0
- package/dist/release/stable.js +55 -0
- package/dist/release/stable.js.map +1 -0
- package/dist/remote-settings-cli.d.ts +24 -0
- package/dist/remote-settings-cli.js +156 -0
- package/dist/remote-settings-cli.js.map +1 -0
- package/dist/remote-settings.d.ts +41 -0
- package/dist/remote-settings.js +110 -0
- package/dist/remote-settings.js.map +1 -0
- package/dist/runs/agent-tmpdir-removal.d.ts +15 -0
- package/dist/runs/agent-tmpdir-removal.js +60 -0
- package/dist/runs/agent-tmpdir-removal.js.map +1 -0
- package/dist/runs/agent-tmpdir.d.ts +119 -0
- package/dist/runs/agent-tmpdir.js +855 -0
- package/dist/runs/agent-tmpdir.js.map +1 -0
- package/dist/runs/archive-family.d.ts +33 -0
- package/dist/runs/archive-family.js +90 -0
- package/dist/runs/archive-family.js.map +1 -0
- package/dist/runs/arm-repo-handle.d.ts +10 -0
- package/dist/runs/arm-repo-handle.js +45 -0
- package/dist/runs/arm-repo-handle.js.map +1 -0
- package/dist/runs/auto-name.d.ts +77 -0
- package/dist/runs/auto-name.js +179 -0
- package/dist/runs/auto-name.js.map +1 -0
- package/dist/runs/claim-families.d.ts +37 -0
- package/dist/runs/claim-families.js +101 -0
- package/dist/runs/claim-families.js.map +1 -0
- package/dist/runs/client-request.d.ts +11 -0
- package/dist/runs/client-request.js +26 -0
- package/dist/runs/client-request.js.map +1 -0
- package/dist/runs/cold-reads.d.ts +40 -0
- package/dist/runs/cold-reads.js +56 -0
- package/dist/runs/cold-reads.js.map +1 -0
- package/dist/runs/conversation-identity.d.ts +19 -0
- package/dist/runs/conversation-identity.js +31 -0
- package/dist/runs/conversation-identity.js.map +1 -0
- package/dist/runs/delegation-state.d.ts +409 -0
- package/dist/runs/delegation-state.js +22 -0
- package/dist/runs/delegation-state.js.map +1 -0
- package/dist/runs/event-history-agent-context.d.ts +15 -0
- package/dist/runs/event-history-agent-context.js +119 -0
- package/dist/runs/event-history-agent-context.js.map +1 -0
- package/dist/runs/event-history-context.d.ts +15 -0
- package/dist/runs/event-history-context.js +109 -0
- package/dist/runs/event-history-context.js.map +1 -0
- package/dist/runs/event-history.d.ts +53 -0
- package/dist/runs/event-history.js +563 -0
- package/dist/runs/event-history.js.map +1 -0
- package/dist/runs/exit-events.d.ts +27 -0
- package/dist/runs/exit-events.js +46 -0
- package/dist/runs/exit-events.js.map +1 -0
- package/dist/runs/history-compressor.d.ts +29 -0
- package/dist/runs/history-compressor.js +116 -0
- package/dist/runs/history-compressor.js.map +1 -0
- package/dist/runs/history-file.d.ts +36 -0
- package/dist/runs/history-file.js +464 -0
- package/dist/runs/history-file.js.map +1 -0
- package/dist/runs/history-stream.d.ts +2 -0
- package/dist/runs/history-stream.js +62 -0
- package/dist/runs/history-stream.js.map +1 -0
- package/dist/runs/legacy-index.d.ts +49 -0
- package/dist/runs/legacy-index.js +156 -0
- package/dist/runs/legacy-index.js.map +1 -0
- package/dist/runs/legacy-run-rows.d.ts +12 -0
- package/dist/runs/legacy-run-rows.js +33 -0
- package/dist/runs/legacy-run-rows.js.map +1 -0
- package/dist/runs/legacy-waits.d.ts +64 -0
- package/dist/runs/legacy-waits.js +335 -0
- package/dist/runs/legacy-waits.js.map +1 -0
- package/dist/runs/live-item-snapshots.d.ts +15 -0
- package/dist/runs/live-item-snapshots.js +95 -0
- package/dist/runs/live-item-snapshots.js.map +1 -0
- package/dist/runs/loaded-run-exits.d.ts +6 -0
- package/dist/runs/loaded-run-exits.js +32 -0
- package/dist/runs/loaded-run-exits.js.map +1 -0
- package/dist/runs/loaded-run-healing.d.ts +3 -0
- package/dist/runs/loaded-run-healing.js +17 -0
- package/dist/runs/loaded-run-healing.js.map +1 -0
- package/dist/runs/outcome-commit.d.ts +119 -0
- package/dist/runs/outcome-commit.js +155 -0
- package/dist/runs/outcome-commit.js.map +1 -0
- package/dist/runs/owned-run-create.d.ts +33 -0
- package/dist/runs/owned-run-create.js +98 -0
- package/dist/runs/owned-run-create.js.map +1 -0
- package/dist/runs/project-run-connection.d.ts +76 -0
- package/dist/runs/project-run-connection.js +287 -0
- package/dist/runs/project-run-connection.js.map +1 -0
- package/dist/runs/project-run-sources.d.ts +21 -0
- package/dist/runs/project-run-sources.js +86 -0
- package/dist/runs/project-run-sources.js.map +1 -0
- package/dist/runs/pull-requests.d.ts +14 -0
- package/dist/runs/pull-requests.js +96 -0
- package/dist/runs/pull-requests.js.map +1 -0
- package/dist/runs/raw-record.d.ts +40 -0
- package/dist/runs/raw-record.js +133 -0
- package/dist/runs/raw-record.js.map +1 -0
- package/dist/runs/record-write-rules.d.ts +129 -0
- package/dist/runs/record-write-rules.js +326 -0
- package/dist/runs/record-write-rules.js.map +1 -0
- package/dist/runs/report-rows.d.ts +36 -0
- package/dist/runs/report-rows.js +102 -0
- package/dist/runs/report-rows.js.map +1 -0
- package/dist/runs/retention.d.ts +91 -0
- package/dist/runs/retention.js +193 -0
- package/dist/runs/retention.js.map +1 -0
- package/dist/runs/review-gate.d.ts +18 -0
- package/dist/runs/review-gate.js +22 -0
- package/dist/runs/review-gate.js.map +1 -0
- package/dist/runs/run-claims.d.ts +30 -0
- package/dist/runs/run-claims.js +52 -0
- package/dist/runs/run-claims.js.map +1 -0
- package/dist/runs/run-database-peer-page.d.ts +12 -0
- package/dist/runs/run-database-peer-page.js +25 -0
- package/dist/runs/run-database-peer-page.js.map +1 -0
- package/dist/runs/run-database-row.d.ts +39 -0
- package/dist/runs/run-database-row.js +83 -0
- package/dist/runs/run-database-row.js.map +1 -0
- package/dist/runs/run-database-version.d.ts +14 -0
- package/dist/runs/run-database-version.js +19 -0
- package/dist/runs/run-database-version.js.map +1 -0
- package/dist/runs/run-database.d.ts +389 -0
- package/dist/runs/run-database.js +957 -0
- package/dist/runs/run-database.js.map +1 -0
- package/dist/runs/run-exits.d.ts +4510 -0
- package/dist/runs/run-exits.js +191 -0
- package/dist/runs/run-exits.js.map +1 -0
- package/dist/runs/run-index.d.ts +36 -0
- package/dist/runs/run-index.js +262 -0
- package/dist/runs/run-index.js.map +1 -0
- package/dist/runs/run-references.d.ts +61 -0
- package/dist/runs/run-references.js +421 -0
- package/dist/runs/run-references.js.map +1 -0
- package/dist/runs/run-row.d.ts +14 -0
- package/dist/runs/run-row.js +56 -0
- package/dist/runs/run-row.js.map +1 -0
- package/dist/runs/run-summary-page.d.ts +36 -0
- package/dist/runs/run-summary-page.js +46 -0
- package/dist/runs/run-summary-page.js.map +1 -0
- package/dist/runs/run-title.d.ts +8 -0
- package/dist/runs/run-title.js +28 -0
- package/dist/runs/run-title.js.map +1 -0
- package/dist/runs/store-open-error.d.ts +24 -0
- package/dist/runs/store-open-error.js +62 -0
- package/dist/runs/store-open-error.js.map +1 -0
- package/dist/runs/store.d.ts +3974 -0
- package/dist/runs/store.js +3516 -0
- package/dist/runs/store.js.map +1 -0
- package/dist/runs/task-markers.d.ts +29 -0
- package/dist/runs/task-markers.js +78 -0
- package/dist/runs/task-markers.js.map +1 -0
- package/dist/runs/task-refs.d.ts +39 -0
- package/dist/runs/task-refs.js +107 -0
- package/dist/runs/task-refs.js.map +1 -0
- package/dist/runs/transcript-facts-fold.d.ts +64 -0
- package/dist/runs/transcript-facts-fold.js +109 -0
- package/dist/runs/transcript-facts-fold.js.map +1 -0
- package/dist/runs/transcript-facts-load.d.ts +11 -0
- package/dist/runs/transcript-facts-load.js +66 -0
- package/dist/runs/transcript-facts-load.js.map +1 -0
- package/dist/runs/transcript-facts-queue.d.ts +30 -0
- package/dist/runs/transcript-facts-queue.js +227 -0
- package/dist/runs/transcript-facts-queue.js.map +1 -0
- package/dist/runs/transcript-facts-worker.d.ts +15 -0
- package/dist/runs/transcript-facts-worker.js +26 -0
- package/dist/runs/transcript-facts-worker.js.map +1 -0
- package/dist/runs/transcript-facts.d.ts +40 -0
- package/dist/runs/transcript-facts.js +193 -0
- package/dist/runs/transcript-facts.js.map +1 -0
- package/dist/runs/ui-event-sink.d.ts +59 -0
- package/dist/runs/ui-event-sink.js +197 -0
- package/dist/runs/ui-event-sink.js.map +1 -0
- package/dist/runs/wait-capacity.d.ts +8 -0
- package/dist/runs/wait-capacity.js +28 -0
- package/dist/runs/wait-capacity.js.map +1 -0
- package/dist/runs/wait-phases.d.ts +4 -0
- package/dist/runs/wait-phases.js +11 -0
- package/dist/runs/wait-phases.js.map +1 -0
- package/dist/runs/wait-registration-write.d.ts +5 -0
- package/dist/runs/wait-registration-write.js +35 -0
- package/dist/runs/wait-registration-write.js.map +1 -0
- package/dist/runs/webhook.d.ts +193 -0
- package/dist/runs/webhook.js +362 -0
- package/dist/runs/webhook.js.map +1 -0
- package/dist/runs/worker-deletion-proof.d.ts +13 -0
- package/dist/runs/worker-deletion-proof.js +13 -0
- package/dist/runs/worker-deletion-proof.js.map +1 -0
- package/dist/runs/worker-execution.d.ts +22 -0
- package/dist/runs/worker-execution.js +30 -0
- package/dist/runs/worker-execution.js.map +1 -0
- package/dist/runs/worker-resource-holders.d.ts +17 -0
- package/dist/runs/worker-resource-holders.js +34 -0
- package/dist/runs/worker-resource-holders.js.map +1 -0
- package/dist/runs/worker-result-commit.d.ts +26 -0
- package/dist/runs/worker-result-commit.js +121 -0
- package/dist/runs/worker-result-commit.js.map +1 -0
- package/dist/self-update/checkouts.d.ts +46 -0
- package/dist/self-update/checkouts.js +284 -0
- package/dist/self-update/checkouts.js.map +1 -0
- package/dist/self-update/cli.d.ts +19 -0
- package/dist/self-update/cli.js +243 -0
- package/dist/self-update/cli.js.map +1 -0
- package/dist/self-update/installer.d.ts +24 -0
- package/dist/self-update/installer.js +139 -0
- package/dist/self-update/installer.js.map +1 -0
- package/dist/self-update/launcher.d.ts +30 -0
- package/dist/self-update/launcher.js +172 -0
- package/dist/self-update/launcher.js.map +1 -0
- package/dist/self-update/layout.d.ts +108 -0
- package/dist/self-update/layout.js +276 -0
- package/dist/self-update/layout.js.map +1 -0
- package/dist/self-update/pulls.d.ts +30 -0
- package/dist/self-update/pulls.js +128 -0
- package/dist/self-update/pulls.js.map +1 -0
- package/dist/self-update/registry.d.ts +37 -0
- package/dist/self-update/registry.js +86 -0
- package/dist/self-update/registry.js.map +1 -0
- package/dist/self-update/restart.d.ts +25 -0
- package/dist/self-update/restart.js +79 -0
- package/dist/self-update/restart.js.map +1 -0
- package/dist/self-update/semver.d.ts +19 -0
- package/dist/self-update/semver.js +79 -0
- package/dist/self-update/semver.js.map +1 -0
- package/dist/self-update/service.d.ts +115 -0
- package/dist/self-update/service.js +332 -0
- package/dist/self-update/service.js.map +1 -0
- package/dist/self-update/supervisor.d.ts +10 -0
- package/dist/self-update/supervisor.js +52 -0
- package/dist/self-update/supervisor.js.map +1 -0
- package/dist/serve-boot.d.ts +60 -0
- package/dist/serve-boot.js +142 -0
- package/dist/serve-boot.js.map +1 -0
- package/dist/serve-command.d.ts +71 -0
- package/dist/serve-command.js +168 -0
- package/dist/serve-command.js.map +1 -0
- package/dist/serve-listener.d.ts +12 -0
- package/dist/serve-listener.js +52 -0
- package/dist/serve-listener.js.map +1 -0
- package/dist/server/activity-project-topic.d.ts +44 -0
- package/dist/server/activity-project-topic.js +137 -0
- package/dist/server/activity-project-topic.js.map +1 -0
- package/dist/server/activity-routes.d.ts +317 -0
- package/dist/server/activity-routes.js +117 -0
- package/dist/server/activity-routes.js.map +1 -0
- package/dist/server/activity-sources.d.ts +26 -0
- package/dist/server/activity-sources.js +45 -0
- package/dist/server/activity-sources.js.map +1 -0
- package/dist/server/activity-topic.d.ts +33 -0
- package/dist/server/activity-topic.js +48 -0
- package/dist/server/activity-topic.js.map +1 -0
- package/dist/server/app-type.d.ts +6 -0
- package/dist/server/app-type.js +2 -0
- package/dist/server/app-type.js.map +1 -0
- package/dist/server/archive-on-merge.d.ts +45 -0
- package/dist/server/archive-on-merge.js +242 -0
- package/dist/server/archive-on-merge.js.map +1 -0
- package/dist/server/automation-log-retry.d.ts +27 -0
- package/dist/server/automation-log-retry.js +88 -0
- package/dist/server/automation-log-retry.js.map +1 -0
- package/dist/server/capabilities.d.ts +69 -0
- package/dist/server/capabilities.js +111 -0
- package/dist/server/capabilities.js.map +1 -0
- package/dist/server/checkout-progress.d.ts +10 -0
- package/dist/server/checkout-progress.js +27 -0
- package/dist/server/checkout-progress.js.map +1 -0
- package/dist/server/checkout.d.ts +153 -0
- package/dist/server/checkout.js +323 -0
- package/dist/server/checkout.js.map +1 -0
- package/dist/server/cockpit-ownership.d.ts +112 -0
- package/dist/server/cockpit-ownership.js +420 -0
- package/dist/server/cockpit-ownership.js.map +1 -0
- package/dist/server/cold-repo-handles.d.ts +17 -0
- package/dist/server/cold-repo-handles.js +82 -0
- package/dist/server/cold-repo-handles.js.map +1 -0
- package/dist/server/completion-actions.d.ts +37 -0
- package/dist/server/completion-actions.js +261 -0
- package/dist/server/completion-actions.js.map +1 -0
- package/dist/server/config-merge.d.ts +11 -0
- package/dist/server/config-merge.js +74 -0
- package/dist/server/config-merge.js.map +1 -0
- package/dist/server/create-project.d.ts +71 -0
- package/dist/server/create-project.js +467 -0
- package/dist/server/create-project.js.map +1 -0
- package/dist/server/forge/draft-pr.d.ts +8 -0
- package/dist/server/forge/draft-pr.js +123 -0
- package/dist/server/forge/draft-pr.js.map +1 -0
- package/dist/server/forge/github-filters.d.ts +22 -0
- package/dist/server/forge/github-filters.js +128 -0
- package/dist/server/forge/github-filters.js.map +1 -0
- package/dist/server/forge/github-merge-requirements.d.ts +18 -0
- package/dist/server/forge/github-merge-requirements.js +148 -0
- package/dist/server/forge/github-merge-requirements.js.map +1 -0
- package/dist/server/forge/github-merge-state.d.ts +27 -0
- package/dist/server/forge/github-merge-state.js +248 -0
- package/dist/server/forge/github-merge-state.js.map +1 -0
- package/dist/server/forge/github-timeline.d.ts +117 -0
- package/dist/server/forge/github-timeline.js +273 -0
- package/dist/server/forge/github-timeline.js.map +1 -0
- package/dist/server/forge/github.d.ts +393 -0
- package/dist/server/forge/github.js +2881 -0
- package/dist/server/forge/github.js.map +1 -0
- package/dist/server/forge/index.d.ts +47 -0
- package/dist/server/forge/index.js +81 -0
- package/dist/server/forge/index.js.map +1 -0
- package/dist/server/forge/repo-handle-discovery.d.ts +16 -0
- package/dist/server/forge/repo-handle-discovery.js +2 -0
- package/dist/server/forge/repo-handle-discovery.js.map +1 -0
- package/dist/server/forge/types.d.ts +278 -0
- package/dist/server/forge/types.js +2 -0
- package/dist/server/forge/types.js.map +1 -0
- package/dist/server/fs-browse.d.ts +82 -0
- package/dist/server/fs-browse.js +217 -0
- package/dist/server/fs-browse.js.map +1 -0
- package/dist/server/git-changes.d.ts +205 -0
- package/dist/server/git-changes.js +531 -0
- package/dist/server/git-changes.js.map +1 -0
- package/dist/server/git.d.ts +52 -0
- package/dist/server/git.js +174 -0
- package/dist/server/git.js.map +1 -0
- package/dist/server/home-recovery-routes.d.ts +171 -0
- package/dist/server/home-recovery-routes.js +56 -0
- package/dist/server/home-recovery-routes.js.map +1 -0
- package/dist/server/launch-key.d.ts +5 -0
- package/dist/server/launch-key.js +35 -0
- package/dist/server/launch-key.js.map +1 -0
- package/dist/server/live-routes.d.ts +73 -0
- package/dist/server/live-routes.js +161 -0
- package/dist/server/live-routes.js.map +1 -0
- package/dist/server/open-in-app.d.ts +57 -0
- package/dist/server/open-in-app.js +178 -0
- package/dist/server/open-in-app.js.map +1 -0
- package/dist/server/open-in-targets.d.ts +53 -0
- package/dist/server/open-in-targets.js +112 -0
- package/dist/server/open-in-targets.js.map +1 -0
- package/dist/server/open-in-terminal.d.ts +73 -0
- package/dist/server/open-in-terminal.js +160 -0
- package/dist/server/open-in-terminal.js.map +1 -0
- package/dist/server/preview-cdp-socket.d.ts +21 -0
- package/dist/server/preview-cdp-socket.js +112 -0
- package/dist/server/preview-cdp-socket.js.map +1 -0
- package/dist/server/preview-socket.d.ts +36 -0
- package/dist/server/preview-socket.js +142 -0
- package/dist/server/preview-socket.js.map +1 -0
- package/dist/server/preview-sockets.d.ts +14 -0
- package/dist/server/preview-sockets.js +18 -0
- package/dist/server/preview-sockets.js.map +1 -0
- package/dist/server/project-context.d.ts +218 -0
- package/dist/server/project-context.js +525 -0
- package/dist/server/project-context.js.map +1 -0
- package/dist/server/project-run-files.d.ts +13 -0
- package/dist/server/project-run-files.js +52 -0
- package/dist/server/project-run-files.js.map +1 -0
- package/dist/server/provider-action-gate.d.ts +5 -0
- package/dist/server/provider-action-gate.js +28 -0
- package/dist/server/provider-action-gate.js.map +1 -0
- package/dist/server/provider-auth-runtime.d.ts +34 -0
- package/dist/server/provider-auth-runtime.js +118 -0
- package/dist/server/provider-auth-runtime.js.map +1 -0
- package/dist/server/repo-branch-forge.d.ts +61 -0
- package/dist/server/repo-branch-forge.js +158 -0
- package/dist/server/repo-branch-forge.js.map +1 -0
- package/dist/server/repo-branch-sweep.d.ts +21 -0
- package/dist/server/repo-branch-sweep.js +64 -0
- package/dist/server/repo-branch-sweep.js.map +1 -0
- package/dist/server/repo-branches.d.ts +103 -0
- package/dist/server/repo-branches.js +804 -0
- package/dist/server/repo-branches.js.map +1 -0
- package/dist/server/repo-pull.d.ts +18 -0
- package/dist/server/repo-pull.js +97 -0
- package/dist/server/repo-pull.js.map +1 -0
- package/dist/server/reports-api.d.ts +90 -0
- package/dist/server/reports-api.js +21 -0
- package/dist/server/reports-api.js.map +1 -0
- package/dist/server/reports-topic.d.ts +5 -0
- package/dist/server/reports-topic.js +37 -0
- package/dist/server/reports-topic.js.map +1 -0
- package/dist/server/run-checkout.d.ts +56 -0
- package/dist/server/run-checkout.js +141 -0
- package/dist/server/run-checkout.js.map +1 -0
- package/dist/server/run-event-feed.d.ts +20 -0
- package/dist/server/run-event-feed.js +203 -0
- package/dist/server/run-event-feed.js.map +1 -0
- package/dist/server/self-update-routes.d.ts +308 -0
- package/dist/server/self-update-routes.js +80 -0
- package/dist/server/self-update-routes.js.map +1 -0
- package/dist/server/server-deps.d.ts +40 -0
- package/dist/server/server-deps.js +132 -0
- package/dist/server/server-deps.js.map +1 -0
- package/dist/server/server.d.ts +35332 -0
- package/dist/server/server.js +5046 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/skill-sources.d.ts +264 -0
- package/dist/server/skill-sources.js +130 -0
- package/dist/server/skill-sources.js.map +1 -0
- package/dist/server/start-run-options.d.ts +84 -0
- package/dist/server/start-run-options.js +114 -0
- package/dist/server/start-run-options.js.map +1 -0
- package/dist/server/static-ui.d.ts +49 -0
- package/dist/server/static-ui.js +99 -0
- package/dist/server/static-ui.js.map +1 -0
- package/dist/server/upgrade-router.d.ts +23 -0
- package/dist/server/upgrade-router.js +53 -0
- package/dist/server/upgrade-router.js.map +1 -0
- package/dist/server/validators.d.ts +80 -0
- package/dist/server/validators.js +85 -0
- package/dist/server/validators.js.map +1 -0
- package/dist/server/workflow-files.d.ts +9 -0
- package/dist/server/workflow-files.js +27 -0
- package/dist/server/workflow-files.js.map +1 -0
- package/dist/server/workspace-config-patch.d.ts +11 -0
- package/dist/server/workspace-config-patch.js +75 -0
- package/dist/server/workspace-config-patch.js.map +1 -0
- package/dist/server/workspace-live-routes.d.ts +222 -0
- package/dist/server/workspace-live-routes.js +8 -0
- package/dist/server/workspace-live-routes.js.map +1 -0
- package/dist/server/workspace-projects.d.ts +51 -0
- package/dist/server/workspace-projects.js +161 -0
- package/dist/server/workspace-projects.js.map +1 -0
- package/dist/server/workspace-run-feed.d.ts +66 -0
- package/dist/server/workspace-run-feed.js +171 -0
- package/dist/server/workspace-run-feed.js.map +1 -0
- package/dist/server/ws.d.ts +80 -0
- package/dist/server/ws.js +280 -0
- package/dist/server/ws.js.map +1 -0
- package/dist/server/wsl.d.ts +25 -0
- package/dist/server/wsl.js +92 -0
- package/dist/server/wsl.js.map +1 -0
- package/dist/server-command.d.ts +53 -0
- package/dist/server-command.js +180 -0
- package/dist/server-command.js.map +1 -0
- package/dist/server-install/engine.d.ts +51 -0
- package/dist/server-install/engine.js +358 -0
- package/dist/server-install/engine.js.map +1 -0
- package/dist/server-install/group-migrate.d.ts +26 -0
- package/dist/server-install/group-migrate.js +241 -0
- package/dist/server-install/group-migrate.js.map +1 -0
- package/dist/server-install/migrate-cli.d.ts +12 -0
- package/dist/server-install/migrate-cli.js +44 -0
- package/dist/server-install/migrate-cli.js.map +1 -0
- package/dist/server-install/migrate-journal.d.ts +15 -0
- package/dist/server-install/migrate-journal.js +48 -0
- package/dist/server-install/migrate-journal.js.map +1 -0
- package/dist/server-install/migration-report.d.ts +3 -0
- package/dist/server-install/migration-report.js +21 -0
- package/dist/server-install/migration-report.js.map +1 -0
- package/dist/server-install/npx-cache.d.ts +34 -0
- package/dist/server-install/npx-cache.js +142 -0
- package/dist/server-install/npx-cache.js.map +1 -0
- package/dist/server-install/platforms/macosx-launchd-files.d.ts +11 -0
- package/dist/server-install/platforms/macosx-launchd-files.js +60 -0
- package/dist/server-install/platforms/macosx-launchd-files.js.map +1 -0
- package/dist/server-install/platforms/macosx-migration.d.ts +17 -0
- package/dist/server-install/platforms/macosx-migration.js +239 -0
- package/dist/server-install/platforms/macosx-migration.js.map +1 -0
- package/dist/server-install/platforms/macosx-ngrok.d.ts +12 -0
- package/dist/server-install/platforms/macosx-ngrok.js +490 -0
- package/dist/server-install/platforms/macosx-ngrok.js.map +1 -0
- package/dist/server-install/platforms/service-env.d.ts +4 -0
- package/dist/server-install/platforms/service-env.js +17 -0
- package/dist/server-install/platforms/service-env.js.map +1 -0
- package/dist/server-install/platforms/ubuntu-vps-files.d.ts +18 -0
- package/dist/server-install/platforms/ubuntu-vps-files.js +43 -0
- package/dist/server-install/platforms/ubuntu-vps-files.js.map +1 -0
- package/dist/server-install/platforms/ubuntu-vps-migration.d.ts +26 -0
- package/dist/server-install/platforms/ubuntu-vps-migration.js +391 -0
- package/dist/server-install/platforms/ubuntu-vps-migration.js.map +1 -0
- package/dist/server-install/platforms/ubuntu-vps-names.d.ts +30 -0
- package/dist/server-install/platforms/ubuntu-vps-names.js +50 -0
- package/dist/server-install/platforms/ubuntu-vps-names.js.map +1 -0
- package/dist/server-install/platforms/ubuntu-vps-redeploy.d.ts +42 -0
- package/dist/server-install/platforms/ubuntu-vps-redeploy.js +127 -0
- package/dist/server-install/platforms/ubuntu-vps-redeploy.js.map +1 -0
- package/dist/server-install/platforms/ubuntu-vps.d.ts +57 -0
- package/dist/server-install/platforms/ubuntu-vps.js +945 -0
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -0
- package/dist/server-install/state.d.ts +51 -0
- package/dist/server-install/state.js +178 -0
- package/dist/server-install/state.js.map +1 -0
- package/dist/server-install/steps.d.ts +108 -0
- package/dist/server-install/steps.js +348 -0
- package/dist/server-install/steps.js.map +1 -0
- package/dist/server-install/strategies.d.ts +6 -0
- package/dist/server-install/strategies.js +24 -0
- package/dist/server-install/strategies.js.map +1 -0
- package/dist/server-install/types.d.ts +316 -0
- package/dist/server-install/types.js +118 -0
- package/dist/server-install/types.js.map +1 -0
- package/dist/server-install/ui.d.ts +36 -0
- package/dist/server-install/ui.js +131 -0
- package/dist/server-install/ui.js.map +1 -0
- package/dist/session-context.d.ts +66 -0
- package/dist/session-context.js +266 -0
- package/dist/session-context.js.map +1 -0
- package/dist/skills-provision.d.ts +64 -0
- package/dist/skills-provision.js +325 -0
- package/dist/skills-provision.js.map +1 -0
- package/dist/skills-remote.d.ts +144 -0
- package/dist/skills-remote.js +847 -0
- package/dist/skills-remote.js.map +1 -0
- package/dist/skills.d.ts +81 -0
- package/dist/skills.js +288 -0
- package/dist/skills.js.map +1 -0
- package/dist/subcommands.d.ts +12 -0
- package/dist/subcommands.js +59 -0
- package/dist/subcommands.js.map +1 -0
- package/dist/task-cli/cli.d.ts +39 -0
- package/dist/task-cli/cli.js +773 -0
- package/dist/task-cli/cli.js.map +1 -0
- package/dist/task-cli/discovery.d.ts +32 -0
- package/dist/task-cli/discovery.js +133 -0
- package/dist/task-cli/discovery.js.map +1 -0
- package/dist/task-cli/hint.d.ts +20 -0
- package/dist/task-cli/hint.js +15 -0
- package/dist/task-cli/hint.js.map +1 -0
- package/dist/task-cli/http.d.ts +42 -0
- package/dist/task-cli/http.js +110 -0
- package/dist/task-cli/http.js.map +1 -0
- package/dist/task-cli/projections.d.ts +68 -0
- package/dist/task-cli/projections.js +76 -0
- package/dist/task-cli/projections.js.map +1 -0
- package/dist/task-cli/watch.d.ts +119 -0
- package/dist/task-cli/watch.js +494 -0
- package/dist/task-cli/watch.js.map +1 -0
- package/dist/ui-state.d.ts +41 -0
- package/dist/ui-state.js +93 -0
- package/dist/ui-state.js.map +1 -0
- package/dist/update-check.d.ts +2 -0
- package/dist/update-check.js +28 -0
- package/dist/update-check.js.map +1 -0
- package/dist/use-command-notice.d.ts +1 -0
- package/dist/use-command-notice.js +6 -0
- package/dist/use-command-notice.js.map +1 -0
- package/dist/voice/decide.d.ts +35 -0
- package/dist/voice/decide.js +329 -0
- package/dist/voice/decide.js.map +1 -0
- package/dist/voice/decision-log.d.ts +48 -0
- package/dist/voice/decision-log.js +117 -0
- package/dist/voice/decision-log.js.map +1 -0
- package/dist/voice/engine.d.ts +119 -0
- package/dist/voice/engine.js +61 -0
- package/dist/voice/engine.js.map +1 -0
- package/dist/voice/fake-engine.d.ts +10 -0
- package/dist/voice/fake-engine.js +192 -0
- package/dist/voice/fake-engine.js.map +1 -0
- package/dist/voice/jev-engine.d.ts +17 -0
- package/dist/voice/jev-engine.js +110 -0
- package/dist/voice/jev-engine.js.map +1 -0
- package/dist/voice/pending-ask.d.ts +17 -0
- package/dist/voice/pending-ask.js +51 -0
- package/dist/voice/pending-ask.js.map +1 -0
- package/dist/voice/routes.d.ts +115 -0
- package/dist/voice/routes.js +92 -0
- package/dist/voice/routes.js.map +1 -0
- package/dist/voice/sentence.d.ts +21 -0
- package/dist/voice/sentence.js +61 -0
- package/dist/voice/sentence.js.map +1 -0
- package/dist/voice/thresholds.d.ts +28 -0
- package/dist/voice/thresholds.js +29 -0
- package/dist/voice/thresholds.js.map +1 -0
- package/dist/webhooks/cli.d.ts +18 -0
- package/dist/webhooks/cli.js +127 -0
- package/dist/webhooks/cli.js.map +1 -0
- package/dist/webhooks/prompt.d.ts +5 -0
- package/dist/webhooks/prompt.js +26 -0
- package/dist/webhooks/prompt.js.map +1 -0
- package/dist/workflows/active-run.d.ts +46 -0
- package/dist/workflows/active-run.js +46 -0
- package/dist/workflows/active-run.js.map +1 -0
- package/dist/workflows/attachment-path.d.ts +6 -0
- package/dist/workflows/attachment-path.js +40 -0
- package/dist/workflows/attachment-path.js.map +1 -0
- package/dist/workflows/completion-policy.d.ts +98 -0
- package/dist/workflows/completion-policy.js +77 -0
- package/dist/workflows/completion-policy.js.map +1 -0
- package/dist/workflows/continuation-admission.d.ts +1229 -0
- package/dist/workflows/continuation-admission.js +277 -0
- package/dist/workflows/continuation-admission.js.map +1 -0
- package/dist/workflows/execution-account.d.ts +13 -0
- package/dist/workflows/execution-account.js +18 -0
- package/dist/workflows/execution-account.js.map +1 -0
- package/dist/workflows/grouped-command.d.ts +31 -0
- package/dist/workflows/grouped-command.js +147 -0
- package/dist/workflows/grouped-command.js.map +1 -0
- package/dist/workflows/input-acknowledgement.d.ts +233 -0
- package/dist/workflows/input-acknowledgement.js +41 -0
- package/dist/workflows/input-acknowledgement.js.map +1 -0
- package/dist/workflows/line-order.d.ts +5 -0
- package/dist/workflows/line-order.js +25 -0
- package/dist/workflows/line-order.js.map +1 -0
- package/dist/workflows/load.d.ts +19 -0
- package/dist/workflows/load.js +74 -0
- package/dist/workflows/load.js.map +1 -0
- package/dist/workflows/outcome-batches.d.ts +32 -0
- package/dist/workflows/outcome-batches.js +55 -0
- package/dist/workflows/outcome-batches.js.map +1 -0
- package/dist/workflows/pasted-content.d.ts +60 -0
- package/dist/workflows/pasted-content.js +69 -0
- package/dist/workflows/pasted-content.js.map +1 -0
- package/dist/workflows/question-routing.d.ts +16 -0
- package/dist/workflows/question-routing.js +28 -0
- package/dist/workflows/question-routing.js.map +1 -0
- package/dist/workflows/run/attachment-writer.d.ts +34 -0
- package/dist/workflows/run/attachment-writer.js +98 -0
- package/dist/workflows/run/attachment-writer.js.map +1 -0
- package/dist/workflows/run/auto-resume.d.ts +91 -0
- package/dist/workflows/run/auto-resume.js +247 -0
- package/dist/workflows/run/auto-resume.js.map +1 -0
- package/dist/workflows/run/cezar-tools.d.ts +45 -0
- package/dist/workflows/run/cezar-tools.js +117 -0
- package/dist/workflows/run/cezar-tools.js.map +1 -0
- package/dist/workflows/run/completion-gate.d.ts +77 -0
- package/dist/workflows/run/completion-gate.js +93 -0
- package/dist/workflows/run/completion-gate.js.map +1 -0
- package/dist/workflows/run/compose.d.ts +181 -0
- package/dist/workflows/run/compose.js +413 -0
- package/dist/workflows/run/compose.js.map +1 -0
- package/dist/workflows/run/constants.d.ts +48 -0
- package/dist/workflows/run/constants.js +49 -0
- package/dist/workflows/run/constants.js.map +1 -0
- package/dist/workflows/run/continuation-acceptance.d.ts +70 -0
- package/dist/workflows/run/continuation-acceptance.js +188 -0
- package/dist/workflows/run/continuation-acceptance.js.map +1 -0
- package/dist/workflows/run/continuation-session.d.ts +130 -0
- package/dist/workflows/run/continuation-session.js +597 -0
- package/dist/workflows/run/continuation-session.js.map +1 -0
- package/dist/workflows/run/drop-active.d.ts +4 -0
- package/dist/workflows/run/drop-active.js +11 -0
- package/dist/workflows/run/drop-active.js.map +1 -0
- package/dist/workflows/run/family-reconciler.d.ts +78 -0
- package/dist/workflows/run/family-reconciler.js +308 -0
- package/dist/workflows/run/family-reconciler.js.map +1 -0
- package/dist/workflows/run/human-waits.d.ts +85 -0
- package/dist/workflows/run/human-waits.js +163 -0
- package/dist/workflows/run/human-waits.js.map +1 -0
- package/dist/workflows/run/inbox-claims.d.ts +38 -0
- package/dist/workflows/run/inbox-claims.js +108 -0
- package/dist/workflows/run/inbox-claims.js.map +1 -0
- package/dist/workflows/run/input-batch.d.ts +15 -0
- package/dist/workflows/run/input-batch.js +32 -0
- package/dist/workflows/run/input-batch.js.map +1 -0
- package/dist/workflows/run/input-delivery.d.ts +202 -0
- package/dist/workflows/run/input-delivery.js +818 -0
- package/dist/workflows/run/input-delivery.js.map +1 -0
- package/dist/workflows/run/input-receipts.d.ts +65 -0
- package/dist/workflows/run/input-receipts.js +221 -0
- package/dist/workflows/run/input-receipts.js.map +1 -0
- package/dist/workflows/run/input-timers.d.ts +10 -0
- package/dist/workflows/run/input-timers.js +32 -0
- package/dist/workflows/run/input-timers.js.map +1 -0
- package/dist/workflows/run/launch-context.d.ts +62 -0
- package/dist/workflows/run/launch-context.js +119 -0
- package/dist/workflows/run/launch-context.js.map +1 -0
- package/dist/workflows/run/launch-read-resolver.d.ts +510 -0
- package/dist/workflows/run/launch-read-resolver.js +658 -0
- package/dist/workflows/run/launch-read-resolver.js.map +1 -0
- package/dist/workflows/run/launch-settings.d.ts +10 -0
- package/dist/workflows/run/launch-settings.js +11 -0
- package/dist/workflows/run/launch-settings.js.map +1 -0
- package/dist/workflows/run/live-session-state.d.ts +49 -0
- package/dist/workflows/run/live-session-state.js +83 -0
- package/dist/workflows/run/live-session-state.js.map +1 -0
- package/dist/workflows/run/maintenance-claims.d.ts +47 -0
- package/dist/workflows/run/maintenance-claims.js +83 -0
- package/dist/workflows/run/maintenance-claims.js.map +1 -0
- package/dist/workflows/run/memory-guard.d.ts +25 -0
- package/dist/workflows/run/memory-guard.js +64 -0
- package/dist/workflows/run/memory-guard.js.map +1 -0
- package/dist/workflows/run/opening.d.ts +30 -0
- package/dist/workflows/run/opening.js +6 -0
- package/dist/workflows/run/opening.js.map +1 -0
- package/dist/workflows/run/pending-ask-facts.d.ts +10 -0
- package/dist/workflows/run/pending-ask-facts.js +19 -0
- package/dist/workflows/run/pending-ask-facts.js.map +1 -0
- package/dist/workflows/run/prompts.d.ts +74 -0
- package/dist/workflows/run/prompts.js +140 -0
- package/dist/workflows/run/prompts.js.map +1 -0
- package/dist/workflows/run/queued-input.d.ts +108 -0
- package/dist/workflows/run/queued-input.js +249 -0
- package/dist/workflows/run/queued-input.js.map +1 -0
- package/dist/workflows/run/queued-revival.d.ts +44 -0
- package/dist/workflows/run/queued-revival.js +124 -0
- package/dist/workflows/run/queued-revival.js.map +1 -0
- package/dist/workflows/run/readonly-collections.d.ts +24 -0
- package/dist/workflows/run/readonly-collections.js +33 -0
- package/dist/workflows/run/readonly-collections.js.map +1 -0
- package/dist/workflows/run/repo-root-lease.d.ts +34 -0
- package/dist/workflows/run/repo-root-lease.js +71 -0
- package/dist/workflows/run/repo-root-lease.js.map +1 -0
- package/dist/workflows/run/resolved-wait-input-batch.d.ts +7 -0
- package/dist/workflows/run/resolved-wait-input-batch.js +23 -0
- package/dist/workflows/run/resolved-wait-input-batch.js.map +1 -0
- package/dist/workflows/run/run-cancel.d.ts +36 -0
- package/dist/workflows/run/run-cancel.js +130 -0
- package/dist/workflows/run/run-cancel.js.map +1 -0
- package/dist/workflows/run/run-finish.d.ts +72 -0
- package/dist/workflows/run/run-finish.js +256 -0
- package/dist/workflows/run/run-finish.js.map +1 -0
- package/dist/workflows/run/run-guards.d.ts +15 -0
- package/dist/workflows/run/run-guards.js +39 -0
- package/dist/workflows/run/run-guards.js.map +1 -0
- package/dist/workflows/run/run-line.d.ts +187 -0
- package/dist/workflows/run/run-line.js +438 -0
- package/dist/workflows/run/run-line.js.map +1 -0
- package/dist/workflows/run/run-recovery.d.ts +116 -0
- package/dist/workflows/run/run-recovery.js +422 -0
- package/dist/workflows/run/run-recovery.js.map +1 -0
- package/dist/workflows/run/run-settlement.d.ts +177 -0
- package/dist/workflows/run/run-settlement.js +504 -0
- package/dist/workflows/run/run-settlement.js.map +1 -0
- package/dist/workflows/run/run-skills.d.ts +114 -0
- package/dist/workflows/run/run-skills.js +233 -0
- package/dist/workflows/run/run-skills.js.map +1 -0
- package/dist/workflows/run/run-start.d.ts +64 -0
- package/dist/workflows/run/run-start.js +126 -0
- package/dist/workflows/run/run-start.js.map +1 -0
- package/dist/workflows/run/run-workspace.d.ts +25 -0
- package/dist/workflows/run/run-workspace.js +66 -0
- package/dist/workflows/run/run-workspace.js.map +1 -0
- package/dist/workflows/run/session-events.d.ts +155 -0
- package/dist/workflows/run/session-events.js +282 -0
- package/dist/workflows/run/session-events.js.map +1 -0
- package/dist/workflows/run/step-decisions.d.ts +37 -0
- package/dist/workflows/run/step-decisions.js +43 -0
- package/dist/workflows/run/step-decisions.js.map +1 -0
- package/dist/workflows/run/step-loop.d.ts +143 -0
- package/dist/workflows/run/step-loop.js +488 -0
- package/dist/workflows/run/step-loop.js.map +1 -0
- package/dist/workflows/run/step-session.d.ts +65 -0
- package/dist/workflows/run/step-session.js +280 -0
- package/dist/workflows/run/step-session.js.map +1 -0
- package/dist/workflows/run/steps.d.ts +13 -0
- package/dist/workflows/run/steps.js +14 -0
- package/dist/workflows/run/steps.js.map +1 -0
- package/dist/workflows/run/subagent-waits.d.ts +138 -0
- package/dist/workflows/run/subagent-waits.js +305 -0
- package/dist/workflows/run/subagent-waits.js.map +1 -0
- package/dist/workflows/run/tracked-work.d.ts +12 -0
- package/dist/workflows/run/tracked-work.js +29 -0
- package/dist/workflows/run/tracked-work.js.map +1 -0
- package/dist/workflows/run/turn-bookkeeping.d.ts +67 -0
- package/dist/workflows/run/turn-bookkeeping.js +173 -0
- package/dist/workflows/run/turn-bookkeeping.js.map +1 -0
- package/dist/workflows/run/turn-boundary.d.ts +215 -0
- package/dist/workflows/run/turn-boundary.js +329 -0
- package/dist/workflows/run/turn-boundary.js.map +1 -0
- package/dist/workflows/run/turn-markers.d.ts +62 -0
- package/dist/workflows/run/turn-markers.js +86 -0
- package/dist/workflows/run/turn-markers.js.map +1 -0
- package/dist/workflows/run/turn-nudges.d.ts +104 -0
- package/dist/workflows/run/turn-nudges.js +244 -0
- package/dist/workflows/run/turn-nudges.js.map +1 -0
- package/dist/workflows/run/turn-settler.d.ts +161 -0
- package/dist/workflows/run/turn-settler.js +469 -0
- package/dist/workflows/run/turn-settler.js.map +1 -0
- package/dist/workflows/run/types.d.ts +293 -0
- package/dist/workflows/run/types.js +2 -0
- package/dist/workflows/run/types.js.map +1 -0
- package/dist/workflows/run/usage-accounting.d.ts +49 -0
- package/dist/workflows/run/usage-accounting.js +213 -0
- package/dist/workflows/run/usage-accounting.js.map +1 -0
- package/dist/workflows/run/wait-engine.d.ts +1210 -0
- package/dist/workflows/run/wait-engine.js +456 -0
- package/dist/workflows/run/wait-engine.js.map +1 -0
- package/dist/workflows/run/wait-kinds.d.ts +336 -0
- package/dist/workflows/run/wait-kinds.js +471 -0
- package/dist/workflows/run/wait-kinds.js.map +1 -0
- package/dist/workflows/run/wait-registration-tool.d.ts +3 -0
- package/dist/workflows/run/wait-registration-tool.js +68 -0
- package/dist/workflows/run/wait-registration-tool.js.map +1 -0
- package/dist/workflows/run/wait-registration.d.ts +7 -0
- package/dist/workflows/run/wait-registration.js +39 -0
- package/dist/workflows/run/wait-registration.js.map +1 -0
- package/dist/workflows/run/wait-registry.d.ts +120 -0
- package/dist/workflows/run/wait-registry.js +365 -0
- package/dist/workflows/run/wait-registry.js.map +1 -0
- package/dist/workflows/run/wait-watches.d.ts +13 -0
- package/dist/workflows/run/wait-watches.js +12 -0
- package/dist/workflows/run/wait-watches.js.map +1 -0
- package/dist/workflows/run/wake-admission.d.ts +150 -0
- package/dist/workflows/run/wake-admission.js +397 -0
- package/dist/workflows/run/wake-admission.js.map +1 -0
- package/dist/workflows/run/wake-ledger.d.ts +61 -0
- package/dist/workflows/run/wake-ledger.js +78 -0
- package/dist/workflows/run/wake-ledger.js.map +1 -0
- package/dist/workflows/run/wake-retries.d.ts +31 -0
- package/dist/workflows/run/wake-retries.js +93 -0
- package/dist/workflows/run/wake-retries.js.map +1 -0
- package/dist/workflows/run/worker-executions.d.ts +54 -0
- package/dist/workflows/run/worker-executions.js +149 -0
- package/dist/workflows/run/worker-executions.js.map +1 -0
- package/dist/workflows/run/worker-orphans.d.ts +91 -0
- package/dist/workflows/run/worker-orphans.js +275 -0
- package/dist/workflows/run/worker-orphans.js.map +1 -0
- package/dist/workflows/run/worker-questions.d.ts +169 -0
- package/dist/workflows/run/worker-questions.js +464 -0
- package/dist/workflows/run/worker-questions.js.map +1 -0
- package/dist/workflows/run/workflow-position.d.ts +7 -0
- package/dist/workflows/run/workflow-position.js +9 -0
- package/dist/workflows/run/workflow-position.js.map +1 -0
- package/dist/workflows/run/worktree-autosave.d.ts +48 -0
- package/dist/workflows/run/worktree-autosave.js +175 -0
- package/dist/workflows/run/worktree-autosave.js.map +1 -0
- package/dist/workflows/run-scheduling.d.ts +38 -0
- package/dist/workflows/run-scheduling.js +76 -0
- package/dist/workflows/run-scheduling.js.map +1 -0
- package/dist/workflows/run-states.d.ts +73 -0
- package/dist/workflows/run-states.js +233 -0
- package/dist/workflows/run-states.js.map +1 -0
- package/dist/workflows/run.d.ts +275 -0
- package/dist/workflows/run.js +626 -0
- package/dist/workflows/run.js.map +1 -0
- package/dist/workflows/turn-end.d.ts +119 -0
- package/dist/workflows/turn-end.js +74 -0
- package/dist/workflows/turn-end.js.map +1 -0
- package/dist/workflows/types.d.ts +83 -0
- package/dist/workflows/types.js +192 -0
- package/dist/workflows/types.js.map +1 -0
- package/dist/workflows/wait-scope.d.ts +75 -0
- package/dist/workflows/wait-scope.js +115 -0
- package/dist/workflows/wait-scope.js.map +1 -0
- package/dist/workflows/waits.d.ts +58 -0
- package/dist/workflows/waits.js +89 -0
- package/dist/workflows/waits.js.map +1 -0
- package/dist/workspace/agent-accounts.d.ts +135 -0
- package/dist/workspace/agent-accounts.js +353 -0
- package/dist/workspace/agent-accounts.js.map +1 -0
- package/dist/workspace/agent-profiles.d.ts +125 -0
- package/dist/workspace/agent-profiles.js +190 -0
- package/dist/workspace/agent-profiles.js.map +1 -0
- package/dist/workspace/backup-cli.d.ts +9 -0
- package/dist/workspace/backup-cli.js +147 -0
- package/dist/workspace/backup-cli.js.map +1 -0
- package/dist/workspace/backups.d.ts +36 -0
- package/dist/workspace/backups.js +249 -0
- package/dist/workspace/backups.js.map +1 -0
- package/dist/workspace/config.d.ts +179 -0
- package/dist/workspace/config.js +396 -0
- package/dist/workspace/config.js.map +1 -0
- package/dist/workspace/migrations.d.ts +37 -0
- package/dist/workspace/migrations.js +149 -0
- package/dist/workspace/migrations.js.map +1 -0
- package/dist/workspace/projects-cli.d.ts +27 -0
- package/dist/workspace/projects-cli.js +175 -0
- package/dist/workspace/projects-cli.js.map +1 -0
- package/dist/workspace/projects.d.ts +131 -0
- package/dist/workspace/projects.js +274 -0
- package/dist/workspace/projects.js.map +1 -0
- package/dist/workspace/root-probe-cache.d.ts +10 -0
- package/dist/workspace/root-probe-cache.js +43 -0
- package/dist/workspace/root-probe-cache.js.map +1 -0
- package/dist/workspace/semaphore.d.ts +147 -0
- package/dist/workspace/semaphore.js +196 -0
- package/dist/workspace/semaphore.js.map +1 -0
- package/dist/workspace/ui-state.d.ts +17 -0
- package/dist/workspace/ui-state.js +59 -0
- package/dist/workspace/ui-state.js.map +1 -0
- package/dist/workspace/webhooks.d.ts +40 -0
- package/dist/workspace/webhooks.js +146 -0
- package/dist/workspace/webhooks.js.map +1 -0
- package/dist/worktree-manifest.d.ts +165 -0
- package/dist/worktree-manifest.js +535 -0
- package/dist/worktree-manifest.js.map +1 -0
- package/dist/worktree-setup.d.ts +88 -0
- package/dist/worktree-setup.js +170 -0
- package/dist/worktree-setup.js.map +1 -0
- package/package.json +80 -4
- package/scripts/benchmark-family-reconcile.ts +119 -0
- package/scripts/benchmark-home.ts +32 -0
- package/scripts/benchmark-project-probes.mjs +158 -0
- package/scripts/benchmark-run-store-fixture.ts +432 -0
- package/scripts/benchmark-run-store.ts +767 -0
- package/scripts/benchmark-stuck-destroys.ts +144 -0
- package/scripts/benchmark-workspace-events.ts +339 -0
- package/scripts/check-pack.mjs +48 -0
- package/scripts/inline-contract.mjs +165 -0
- package/scripts/install-as-command.mjs +125 -0
- package/scripts/measure-transcript-facts-health.mjs +103 -0
- package/scripts/measure-transcript-facts-lag.mjs +69 -0
- package/scripts/mock-autonomous.mjs +13 -0
- package/scripts/mock-ci-tool.mjs +159 -0
- package/scripts/mock-claude-model-refusal.mjs +76 -0
- package/scripts/mock-claude-subagents.mjs +54 -0
- package/scripts/mock-claude.mjs +800 -0
- package/scripts/mock-codex-app-server.mjs +767 -0
- package/scripts/mock-codex-coalesce-steer.mjs +59 -0
- package/scripts/mock-codex-reverse-steer.mjs +143 -0
- package/scripts/mock-codex-subagents.mjs +52 -0
- package/scripts/mock-controls.d.mts +11 -0
- package/scripts/mock-controls.mjs +13 -0
- package/scripts/mock-cursor-hang-stdin-late.mjs +35 -0
- package/scripts/mock-cursor-hang-stdin.mjs +30 -0
- package/scripts/mock-cursor-print.mjs +237 -0
- package/scripts/mock-deferred-turn-start.mjs +16 -0
- package/scripts/mock-delivery-control.d.mts +23 -0
- package/scripts/mock-delivery-control.mjs +80 -0
- package/scripts/mock-env-record.mjs +11 -0
- package/scripts/mock-failure-control.d.mts +13 -0
- package/scripts/mock-failure-control.mjs +68 -0
- package/scripts/mock-lifecycle.mjs +51 -0
- package/scripts/mock-multi-pr.mjs +10 -0
- package/scripts/mock-nudge.mjs +43 -0
- package/scripts/mock-omp-rpc.mjs +536 -0
- package/scripts/mock-opencode-serve.mjs +1000 -0
- package/scripts/mock-pi-rpc.mjs +421 -0
- package/scripts/mock-publish.mjs +13 -0
- package/scripts/mock-runner-crash.mjs +64 -0
- package/scripts/mock-scenario.d.mts +71 -0
- package/scripts/mock-scenario.mjs +295 -0
- package/scripts/mock-session-context.d.mts +5 -0
- package/scripts/mock-session-context.mjs +56 -0
- package/scripts/mock-silent-tail.mjs +93 -0
- package/scripts/mock-turn-messages.mjs +5 -0
- package/scripts/mock-wire-evidence.config.mjs +12 -0
- package/scripts/mock-wire-recorder.mjs +66 -0
- package/scripts/mock-wire-tools.mjs +7 -0
- package/scripts/omp-ci-wait.mjs +29 -0
- package/scripts/opencode-task-scope.d.mts +18 -0
- package/scripts/opencode-task-scope.mjs +59 -0
- package/scripts/parity-rows.ts +160 -0
- package/scripts/pi-ci-wait.mjs +17 -0
- package/scripts/pi-default-tools.mjs +22 -0
- package/scripts/pi-project-skills.mjs +59 -0
- package/scripts/pi-retry-degraded-service.mjs +16 -0
- package/scripts/probe-cursor-print.mjs +699 -0
- package/scripts/probe-session-env.ts +8 -0
- package/scripts/product-env.mjs +6 -0
- package/scripts/product-identity.mjs +12 -0
- package/scripts/record-mock-wires.mjs +16 -0
- package/scripts/seed-archive-profile.ts +53 -0
- package/scripts/sync-readme.mjs +20 -0
- package/scripts/test-process-usage.mjs +47 -0
- package/scripts/transcript-facts-fixture.mjs +53 -0
- package/scripts/transcript-facts-timing.mjs +42 -0
- package/scripts/voice-replay.ts +50 -0
- package/scripts/windows-workspace-identity.cs +208 -0
- package/scripts/windows-workspace-identity.ps1 +10 -0
- package/web/dist/assets/activity-motion-0wHCeUs7.css +1 -0
- package/web/dist/assets/activity-motion-SGth5vR4.js +2 -0
- package/web/dist/assets/activity-route-D8otXwOA.js +1 -0
- package/web/dist/assets/agent-accounts-6EuZhy-N.js +18 -0
- package/web/dist/assets/alert-dialog-vFjLgfK4.js +1 -0
- package/web/dist/assets/app-window-CSHwDX9N.js +1 -0
- package/web/dist/assets/arrow-right-Dh_Lx3um.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/button-BEK7XKhS.js +3 -0
- package/web/dist/assets/centered-state-CPgI8cCO.js +1 -0
- package/web/dist/assets/cez-idle-BT0U4GN_.js +1 -0
- package/web/dist/assets/chunk-BO2N2NFS-DE6qKn3r.js +131 -0
- package/web/dist/assets/commit-diff-panel-DzyWgn1Z.js +1 -0
- package/web/dist/assets/control-locations-CexZsd3M.js +1 -0
- package/web/dist/assets/core-BCsw8oQw.js +12 -0
- package/web/dist/assets/createLucideIcon-BHp8sXmF.js +1 -0
- package/web/dist/assets/css-BsVw1vtW.js +1 -0
- package/web/dist/assets/design-icons-DmYTv2r1.js +1 -0
- package/web/dist/assets/diff-DBDiZl58.js +3 -0
- package/web/dist/assets/diff-controls-DXyB0aDl.js +1 -0
- package/web/dist/assets/diff-view-DiKAwVMH.js +11 -0
- package/web/dist/assets/diff-woXpYk--.js +1 -0
- package/web/dist/assets/dropdown-menu-DYflHa4m.js +1 -0
- package/web/dist/assets/engine-javascript-FQvzRocB.js +141 -0
- package/web/dist/assets/es2015-BO600Xfi.js +41 -0
- package/web/dist/assets/eye-B8okNWXU.js +1 -0
- package/web/dist/assets/file-preview-DTSRkmMo.js +2 -0
- package/web/dist/assets/git-toolbar-U4s46kUd.js +1 -0
- package/web/dist/assets/github-UaBp2yRF.js +1 -0
- package/web/dist/assets/github-sidebar-model-czjLsgVJ.js +1 -0
- package/web/dist/assets/global-activity-route-B2N2Nz0H.js +1 -0
- package/web/dist/assets/go-rLFTqkRN.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
- package/web/dist/assets/hourglass-B0lPAJvT.js +1 -0
- package/web/dist/assets/html-BY76lXLH.js +1 -0
- package/web/dist/assets/image-preview-XPCPclpG.js +1 -0
- package/web/dist/assets/index-B18AqW0Z.css +1 -0
- package/web/dist/assets/index-xj-3O89_.js +14 -0
- package/web/dist/assets/index.global-D3Ga_D3Y.js +1 -0
- package/web/dist/assets/info-DA1x_4bz.js +1 -0
- package/web/dist/assets/javascript-BgS3c2Ky.js +1 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/web/dist/assets/json-qhed-kSA.js +1 -0
- package/web/dist/assets/jsonc-CYpm1nAK.js +1 -0
- package/web/dist/assets/jsx-Bz0zcwM4.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/live-protocol-BDY7JJpT.js +64 -0
- package/web/dist/assets/live-refetch-C-Ony2Yr.js +1 -0
- package/web/dist/assets/live-worker-BWdeGzQX.ts +34 -0
- package/web/dist/assets/loader-circle-CZkGEdoI.js +1 -0
- package/web/dist/assets/markdown-BBDDg-4t.js +1 -0
- package/web/dist/assets/markdown-BYOwaDjH.js +1 -0
- package/web/dist/assets/markdown-UdZ_toya.js +6 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/mermaid.min-3O9YjB2l.js +1 -0
- package/web/dist/assets/message-square-B-MD-8rD.js +1 -0
- package/web/dist/assets/nav-row-styles-BE99gD3_.js +1 -0
- package/web/dist/assets/popover-CpULuQSm.js +1 -0
- package/web/dist/assets/poppins-devanagari-400-normal-CJDn6rn8.woff2 +0 -0
- package/web/dist/assets/poppins-devanagari-400-normal-CqVvlrh5.woff +0 -0
- package/web/dist/assets/poppins-devanagari-500-normal-BIdkeU1p.woff2 +0 -0
- package/web/dist/assets/poppins-devanagari-500-normal-DMPDjHtT.woff +0 -0
- package/web/dist/assets/poppins-devanagari-600-normal-ClASKHrr.woff +0 -0
- package/web/dist/assets/poppins-devanagari-600-normal-STEjXBNN.woff2 +0 -0
- package/web/dist/assets/poppins-latin-400-normal-BOb3E3N0.woff +0 -0
- package/web/dist/assets/poppins-latin-400-normal-cpxAROuN.woff2 +0 -0
- package/web/dist/assets/poppins-latin-500-normal-C8OXljZJ.woff2 +0 -0
- package/web/dist/assets/poppins-latin-500-normal-DGXqpDMm.woff +0 -0
- package/web/dist/assets/poppins-latin-600-normal-BJdTmd5m.woff +0 -0
- package/web/dist/assets/poppins-latin-600-normal-zEkxB9Mr.woff2 +0 -0
- package/web/dist/assets/poppins-latin-ext-400-normal-DaBSavcJ.woff +0 -0
- package/web/dist/assets/poppins-latin-ext-400-normal-by3JarPu.woff2 +0 -0
- package/web/dist/assets/poppins-latin-ext-500-normal-CK-6C4Hw.woff2 +0 -0
- package/web/dist/assets/poppins-latin-ext-500-normal-CgAe2rWW.woff +0 -0
- package/web/dist/assets/poppins-latin-ext-600-normal-CAhIAdZj.woff2 +0 -0
- package/web/dist/assets/poppins-latin-ext-600-normal-Df5ffKXP.woff +0 -0
- package/web/dist/assets/preview-pane-connected-CgRK7GzB.js +3 -0
- package/web/dist/assets/project-router-CimAoN1H.js +1 -0
- package/web/dist/assets/project-scope-context-DMpvJqIm.js +4 -0
- package/web/dist/assets/python-gzcpVVnB.js +1 -0
- package/web/dist/assets/queries-BIOp8jLx.js +1 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/repo-git-DVXNOJDT.css +1 -0
- package/web/dist/assets/repo-git-XkyTfP9G.js +1 -0
- package/web/dist/assets/report-reader-CZjYS5Aw.js +1 -0
- package/web/dist/assets/report-title-D4Mbu2Er.js +1 -0
- package/web/dist/assets/reports-B7QAzibP.css +1 -0
- package/web/dist/assets/reports-D_2sFE1y.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-header-BwPDVPpg.js +2 -0
- package/web/dist/assets/run-header-CC7VUTg9.css +1 -0
- package/web/dist/assets/rust-Cfkwpbl8.js +1 -0
- package/web/dist/assets/shellscript-CLZ0U2zV.js +1 -0
- package/web/dist/assets/skill-empty-hint-YDmkqgo-.js +1 -0
- package/web/dist/assets/skills-BkXe4p4q.js +1 -0
- package/web/dist/assets/skills-DFBiAuJG.js +1 -0
- package/web/dist/assets/skills-workflows-C21NystW.css +1 -0
- package/web/dist/assets/sortable.esm-zp_qkYGV.js +5 -0
- package/web/dist/assets/sql-BsFa4tDR.js +1 -0
- package/web/dist/assets/tab-link-BIweqlIZ.js +1 -0
- package/web/dist/assets/task-changes-USNHNm_T.js +1 -0
- package/web/dist/assets/task-commits-kHqlOJe_.js +1 -0
- package/web/dist/assets/task-files-wTWwLR39.js +1 -0
- package/web/dist/assets/task-github-item-GzaQjkF1.js +1 -0
- package/web/dist/assets/task-thread-BZX863UN.js +9 -0
- package/web/dist/assets/task-thread-DtQ6uGfQ.css +1 -0
- package/web/dist/assets/textarea-FAUkHz1K.js +1 -0
- package/web/dist/assets/thread-state-CBzx2hmX.js +4 -0
- package/web/dist/assets/toaster-pthKGWiE.js +1 -0
- package/web/dist/assets/toml-CcmNWLt0.js +1 -0
- package/web/dist/assets/tsx-udAQXfEw.js +1 -0
- package/web/dist/assets/typescript-bsJCZSQ-.js +1 -0
- package/web/dist/assets/use-hand-to-agent-state-Bav9eT3b.js +1 -0
- package/web/dist/assets/use-hand-to-agent-state-C7esPJ-N.css +1 -0
- package/web/dist/assets/useInfiniteQuery-CQI4BO4C.js +1 -0
- package/web/dist/assets/useQuery-Bkq-x4Id.js +1 -0
- package/web/dist/assets/workflows-D871Gx--.js +7 -0
- package/web/dist/assets/ws-DspW9wBH.js +1 -0
- package/web/dist/assets/yaml-rwi0_p6S.js +1 -0
- package/web/dist/assets/zoomable-image-DNc6ORaF.js +1 -0
- package/web/dist/cezarion-lockup-dark.svg +9 -0
- package/web/dist/cezarion-lockup-light.svg +9 -0
- package/web/dist/cezarion-mark-dark.svg +4 -0
- package/web/dist/cezarion-mark-light.svg +4 -0
- package/web/dist/index.html +90 -0
- package/web/dist/live-worker.js +4 -0
|
@@ -0,0 +1,1271 @@
|
|
|
1
|
+
import { productEnv } from './product-env.js';
|
|
2
|
+
import { uiAskQuestions } from './ask.js';
|
|
3
|
+
import { summarizeRunnerStderr } from './runner-stderr.js';
|
|
4
|
+
import { randomUUID } from 'node:crypto';
|
|
5
|
+
import { parseEffort } from '../contract/index.js';
|
|
6
|
+
import { prependSystemPrompt, trackChildExit, } from './agent-runner.js';
|
|
7
|
+
import { RUNNER_FACTS } from './runner-facts.js';
|
|
8
|
+
import { codexToolGrantFields } from './runner-tool-grants.js';
|
|
9
|
+
import { signalSession } from './session-process.js';
|
|
10
|
+
import { afterExitDrain, AUTO_END_DELAY_MS, DEFAULT_RUN_TIMEOUT_MS, exitDrainBudget, KILL_GRACE_MS, } from './runner-runtime.js';
|
|
11
|
+
import { parseAskRequest } from './ask.js';
|
|
12
|
+
import { readNdjson } from './ndjson.js';
|
|
13
|
+
import { drainsAfterClose, isServerRequest, isStaleTurnOutcome, parseNativeLine, sessionExitEvent, sessionStderrIsUnexpected, startupCrashOwnsFailure, stringField, turnIdOf } from './codex-native-frames.js';
|
|
14
|
+
import { V1TextCoalescer } from './v1-text-coalescer.js';
|
|
15
|
+
import { InputSubmissions } from './input-submissions.js';
|
|
16
|
+
import { codexStreamError } from './codex-stream-error.js';
|
|
17
|
+
import { codexTurnOutcome } from './codex-turn-outcome.js';
|
|
18
|
+
import { codexNetworkIsRestricted, codexPermissionOverrides } from './codex-permissions.js';
|
|
19
|
+
import { codexApproval, isCodexApprovalRequest } from './codex-approvals.js';
|
|
20
|
+
import { cezarToolEnvNames } from '../ci-wait/tools.js';
|
|
21
|
+
import { CodexAppServerRpc, CodexRpcResponseError, codexSpawnError, endCodexAppServer, resolveCodexExecutable, spawnCodexAppServer, waitForCodexAppServerExit, } from './codex-app-server-transport.js';
|
|
22
|
+
import { codexSessionStarted, createCodexUiState, mapCodexNotification, } from './codex-ui-mapper.js';
|
|
23
|
+
// One startup budget, including handshake ACKs and the first main-thread turn.
|
|
24
|
+
// This is not a model-turn or human-question lifetime limit.
|
|
25
|
+
const STARTUP_TIMEOUT_MS = 60_000;
|
|
26
|
+
// A retry episode gets one budget, regardless of error/warning frequency.
|
|
27
|
+
const STREAM_RETRY_TIMEOUT_MS = 60_000;
|
|
28
|
+
/**
|
|
29
|
+
* `AgentRunner` over `codex app-server` — the same JSONL transport the VS Code
|
|
30
|
+
* extension and desktop app use (JSON-RPC 2.0, newline-delimited, over
|
|
31
|
+
* stdin/stdout). One long-lived process per session gives Codex the same
|
|
32
|
+
* multi-turn shape as the Claude runner: `turn/start` for a new turn,
|
|
33
|
+
* `turn/steer` for a mid-turn follow-up, `turn/interrupt` to cancel, and
|
|
34
|
+
* `thread/resume` to reopen a stored thread for "Continue".
|
|
35
|
+
*
|
|
36
|
+
* Auth = the host's logged-in ChatGPT/Codex session (or CODEX_API_KEY). The
|
|
37
|
+
* agent inherits managed permissions; confirmed unmanaged sessions keep cezar's
|
|
38
|
+
* full-access default. Approval policy always belongs to the app-server.
|
|
39
|
+
* Codex has no per-tool allowlist, so
|
|
40
|
+
* `spec.toolGrant` is ignored. `CEZ_CODEX_NETWORK=0` requires a confirmed
|
|
41
|
+
* network restriction without replacing managed filesystem rules.
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* What the codex app-server receives from each `AgentRunSpec` field (#284).
|
|
45
|
+
* Tool access does not cross this wire: managed permissions belong to Codex;
|
|
46
|
+
* unmanaged sessions use cezar's sandbox choice. The app-server has no per-tool
|
|
47
|
+
* allowlist, so `toolGrant` is declared dropped rather than mapped (spec
|
|
48
|
+
* 2026-07-17-permission-modes). Held against the recorded JSON-RPC by the harness parity matrix.
|
|
49
|
+
*/
|
|
50
|
+
export const CODEX_SPEC_SUPPORT = {
|
|
51
|
+
cezarTools: { honored: true, via: 'thread/start and thread/resume dotted mcp_servers config with env_vars and default_tools_approval_mode approve' },
|
|
52
|
+
systemPrompt: { honored: true, via: 'prepended to the opening turn/start input through prependSystemPrompt' },
|
|
53
|
+
userPrompt: { honored: true, via: 'turn/start input text' },
|
|
54
|
+
images: { honored: false, reason: 'the adapter sends text input items only; image blocks are dropped' },
|
|
55
|
+
cwd: { honored: true, via: 'spawn cwd, and the thread/start / thread/resume cwd' },
|
|
56
|
+
toolGrant: { honored: false, reason: 'no per-tool allowlist on the app-server, so no command-prefix restriction either; managed permissions and approval policy belong to Codex' },
|
|
57
|
+
restrictCrossSessionMessaging: { honored: true, via: 'thread/start and thread/resume config features.agent_message_board=false; multi-agent tools reach only the session\'s own agents and stay as configured (hearsay-tools/cezarion#2279)' },
|
|
58
|
+
additionalDirectories: { honored: false, reason: 'no extra-root mapping; managed filesystem permissions belong to Codex' },
|
|
59
|
+
env: { honored: true, via: 'merged over the child env through buildCodexAppServerEnv' },
|
|
60
|
+
model: { honored: true, via: 'thread/start and thread/resume model' },
|
|
61
|
+
effort: { honored: true, via: 'turn/start effort, canonical level' },
|
|
62
|
+
timeoutMs: { honored: true, via: 'wall-clock kill switch on the child process' },
|
|
63
|
+
sessionId: { honored: true, via: 'thread/resume threadId when resume is set; a fresh thread/start mints its own thread id' },
|
|
64
|
+
resume: { honored: true, via: 'thread/resume in place of thread/start' },
|
|
65
|
+
resumeFallbackSystemPrompt: { honored: false, reason: 'thread/resume fails a missing thread; the adapter does not open a replacement thread' },
|
|
66
|
+
};
|
|
67
|
+
export class CodexAppServerRunner {
|
|
68
|
+
backend = 'codex';
|
|
69
|
+
specSupport = CODEX_SPEC_SUPPORT;
|
|
70
|
+
systemPromptOnResume = RUNNER_FACTS.codex.systemPromptOnResume;
|
|
71
|
+
facts = RUNNER_FACTS.codex;
|
|
72
|
+
inputDelivery = RUNNER_FACTS.codex.inputDelivery;
|
|
73
|
+
bin;
|
|
74
|
+
timeoutMs;
|
|
75
|
+
lastSession = null;
|
|
76
|
+
constructor(opts = {}) {
|
|
77
|
+
this.bin = resolveCodexExecutable(opts.bin);
|
|
78
|
+
this.timeoutMs = opts.timeoutMs ?? DEFAULT_RUN_TIMEOUT_MS;
|
|
79
|
+
}
|
|
80
|
+
run(spec, onEvent) {
|
|
81
|
+
return this.startSession(spec, onEvent, { autoEndAfterFirstTurn: true }).result;
|
|
82
|
+
}
|
|
83
|
+
async interrupt() {
|
|
84
|
+
this.lastSession?.interrupt();
|
|
85
|
+
}
|
|
86
|
+
startSession(spec, onEvent, opts = {}) {
|
|
87
|
+
const session = new CodexSession(this.bin, this.timeoutMs, spec, onEvent, opts);
|
|
88
|
+
this.lastSession = session;
|
|
89
|
+
return session;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/** One live `codex app-server` process driving a single thread. */
|
|
93
|
+
class CodexSession {
|
|
94
|
+
bin;
|
|
95
|
+
spec;
|
|
96
|
+
onEvent;
|
|
97
|
+
opts;
|
|
98
|
+
result;
|
|
99
|
+
child;
|
|
100
|
+
rpc;
|
|
101
|
+
stdinOpen = true;
|
|
102
|
+
threadId;
|
|
103
|
+
activeTurnId;
|
|
104
|
+
streamRetryTimer;
|
|
105
|
+
streamRetryError;
|
|
106
|
+
agentInputReady = false;
|
|
107
|
+
/** Accepted agent input not yet seen as a consumed userMessage item (#505). */
|
|
108
|
+
submissions = new InputSubmissions();
|
|
109
|
+
inFlightSubmissionId;
|
|
110
|
+
refusedBeforeStartup = false;
|
|
111
|
+
humanPromptsPending = 0;
|
|
112
|
+
refusedForHuman = false;
|
|
113
|
+
/** Human sendMessage client ids still inside startOrSteerTurn (#486). */
|
|
114
|
+
humanSteerIds = new Set();
|
|
115
|
+
/** RPC id → human client id; cleared synchronously when that response is dispatched. */
|
|
116
|
+
humanPromptByRpc = new Map();
|
|
117
|
+
/** Human turn/start RPC ids — release on their response even before turn/started. */
|
|
118
|
+
humanStartRpcs = new Set();
|
|
119
|
+
/** Hint on the next turn/started after a human turn/start was accepted without a live turn. */
|
|
120
|
+
humanReadyOnTurnStart = false;
|
|
121
|
+
releasedHuman = new Set();
|
|
122
|
+
/** Human client ids already echoed as an in-turn userMessage (read-in-turn). */
|
|
123
|
+
echoedHuman = new Set();
|
|
124
|
+
/** Human steers admitted in-turn and not yet echoed; restarted on turn end (#486). */
|
|
125
|
+
unreadHumanSteers = new Map();
|
|
126
|
+
/** Submissions that opened a turn via turn/start rather than steering one. */
|
|
127
|
+
turnStartSubmissions = new Set();
|
|
128
|
+
/** Recent main-thread turn outcomes (true = completed without error), for a late turn/start response. */
|
|
129
|
+
completedTurns = new Map();
|
|
130
|
+
turnCompletions = 0;
|
|
131
|
+
agentSubmissionPending = false;
|
|
132
|
+
turnBoundaryVersion = 0;
|
|
133
|
+
pendingUserInput;
|
|
134
|
+
pendingApprovals = new Map();
|
|
135
|
+
toolCalls = [];
|
|
136
|
+
textChunks = [];
|
|
137
|
+
/** Streamed agentMessage deltas buffered per item — v1 `text` is emitted
|
|
138
|
+
* once per completed item (claude parity: one event per complete block),
|
|
139
|
+
* never per delta, so the persisted transcript and the headless CLI get
|
|
140
|
+
* whole paragraphs. Streaming display rides protocol v2's `item.delta`. */
|
|
141
|
+
textCoalescer = new V1TextCoalescer((text) => {
|
|
142
|
+
this.textChunks.push(text);
|
|
143
|
+
this.emit({ type: 'text', text });
|
|
144
|
+
});
|
|
145
|
+
tokensUsed = 0;
|
|
146
|
+
ready;
|
|
147
|
+
startupPhase = 'initialize';
|
|
148
|
+
openingAcknowledged = false;
|
|
149
|
+
firstTurnStarted = false;
|
|
150
|
+
startupComplete = false;
|
|
151
|
+
startupTimer;
|
|
152
|
+
stopKillTimer;
|
|
153
|
+
hardStopStarted = false;
|
|
154
|
+
failure;
|
|
155
|
+
autoEndTimer;
|
|
156
|
+
eofTermTimer;
|
|
157
|
+
eofKillTimer;
|
|
158
|
+
spawnFailed = null;
|
|
159
|
+
timedOut = false;
|
|
160
|
+
/** Explicit teardown or automatic cleanup with positive live evidence. */
|
|
161
|
+
terminatedByCezar = false;
|
|
162
|
+
explicitEnd = false;
|
|
163
|
+
automaticCleanupStarted = false;
|
|
164
|
+
/** Native termination, independent of signal delivery (`child.killed`). */
|
|
165
|
+
hasExited;
|
|
166
|
+
/** Protocol v2 emission — additive alongside v1 (`onEvent` keeps flowing
|
|
167
|
+
* byte-identical); the channel is `opts.onUiEvent` (RunManager wiring
|
|
168
|
+
* lands in R2 step 2.1). */
|
|
169
|
+
uiState = createCodexUiState();
|
|
170
|
+
constructor(bin, timeoutMs, spec, onEvent, opts) {
|
|
171
|
+
this.bin = bin;
|
|
172
|
+
this.spec = spec;
|
|
173
|
+
this.onEvent = onEvent;
|
|
174
|
+
this.opts = opts;
|
|
175
|
+
try {
|
|
176
|
+
this.child = spawnCodexAppServer(bin, spec.cwd, spec.env, { session: true });
|
|
177
|
+
this.rpc = new CodexAppServerRpc(this.child, (error) => {
|
|
178
|
+
if (!this.hardStopStarted && !this.hasExited())
|
|
179
|
+
this.fail(error);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
catch (err) {
|
|
183
|
+
throw codexSpawnError(err, bin);
|
|
184
|
+
}
|
|
185
|
+
const hasExited = trackChildExit(this.child);
|
|
186
|
+
this.hasExited = hasExited;
|
|
187
|
+
// Observe termination BEFORE bootstrap. Pending RPCs cannot own the only
|
|
188
|
+
// path to discovering that their process has already gone (#493).
|
|
189
|
+
const exited = waitForCodexAppServerExit(this.child);
|
|
190
|
+
// After real process exit, allow buffered output to drain before closing pipes
|
|
191
|
+
// a descendant may have inherited. This drain never proves termination.
|
|
192
|
+
let cancelDrain;
|
|
193
|
+
this.child.on('error', (err) => {
|
|
194
|
+
if (this.child.pid === undefined) {
|
|
195
|
+
this.spawnFailed = codexSpawnError(err, bin);
|
|
196
|
+
this.closeInput(this.spawnFailed.message);
|
|
197
|
+
this.child.stdout.destroy();
|
|
198
|
+
}
|
|
199
|
+
else if (this.stdinOpen) {
|
|
200
|
+
this.fail(new Error(`codex app-server process error while waiting for ${this.startupPhase}`));
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
this.child.once('exit', (code, signal) => {
|
|
204
|
+
if (this.stdinOpen && !this.startupComplete) {
|
|
205
|
+
this.failure ??= new Error(`Codex startup exited (${signal ?? code ?? 'unknown'}) while waiting for ${this.startupPhase}`);
|
|
206
|
+
}
|
|
207
|
+
// Do not discard final buffered text on a healthy exit. Revoke RPCs
|
|
208
|
+
// immediately, then bound pipe draining ONLY after physical termination.
|
|
209
|
+
this.expireApprovals('codex app-server exited', false);
|
|
210
|
+
this.rpc.close('codex app-server exited');
|
|
211
|
+
cancelDrain = afterExitDrain(() => this.child.stdout.destroy(), exitDrainBudget(code));
|
|
212
|
+
if (this.stopKillTimer)
|
|
213
|
+
clearTimeout(this.stopKillTimer);
|
|
214
|
+
});
|
|
215
|
+
const stderrChunks = [];
|
|
216
|
+
this.child.stderr.setEncoding('utf8');
|
|
217
|
+
this.child.stderr.on('data', (chunk) => stderrChunks.push(chunk));
|
|
218
|
+
// Whole-session timeouts remain optional; startup is always bounded.
|
|
219
|
+
const limitMs = spec.timeoutMs ?? timeoutMs;
|
|
220
|
+
let deadline;
|
|
221
|
+
if (limitMs > 0) {
|
|
222
|
+
deadline = setTimeout(() => {
|
|
223
|
+
this.timedOut = true;
|
|
224
|
+
this.interrupt();
|
|
225
|
+
}, limitMs);
|
|
226
|
+
deadline.unref?.();
|
|
227
|
+
}
|
|
228
|
+
this.startupTimer = setTimeout(() => {
|
|
229
|
+
this.fail(new Error(`Codex startup timed out after 60s while waiting for ${this.startupPhase}`), 'timed out after 60s');
|
|
230
|
+
}, STARTUP_TIMEOUT_MS);
|
|
231
|
+
this.startupTimer.unref?.();
|
|
232
|
+
this.ready = this.bootstrap();
|
|
233
|
+
const reader = this.readNativeOutput();
|
|
234
|
+
this.result = this.finishSession(hasExited, exited, reader, deadline, () => cancelDrain?.(), stderrChunks, limitMs, spec);
|
|
235
|
+
}
|
|
236
|
+
/** Wait out the child, then map its exit onto the v1 result. Both awaits stay here, so
|
|
237
|
+
* the cleanup and the result mapping run in the same continuation as the second await. */
|
|
238
|
+
async finishSession(hasExited, exited, reader, deadline, cancelDrain, stderrChunks, limitMs, spec) {
|
|
239
|
+
let exitCode;
|
|
240
|
+
try {
|
|
241
|
+
try {
|
|
242
|
+
await Promise.all([this.ready, reader]);
|
|
243
|
+
}
|
|
244
|
+
catch (err) {
|
|
245
|
+
if (this.stdinOpen && !hasExited())
|
|
246
|
+
this.fail(err instanceof Error ? err : new Error(String(err)));
|
|
247
|
+
}
|
|
248
|
+
// RPC cancellation is not a receipt for process termination. Keep the
|
|
249
|
+
// TERM→KILL watchdog alive until this independently owned promise settles.
|
|
250
|
+
exitCode = await exited;
|
|
251
|
+
await reader;
|
|
252
|
+
}
|
|
253
|
+
finally {
|
|
254
|
+
if (deadline)
|
|
255
|
+
clearTimeout(deadline);
|
|
256
|
+
cancelDrain();
|
|
257
|
+
this.releaseSession();
|
|
258
|
+
}
|
|
259
|
+
return this.resultFromExit(exitCode, stderrChunks.join(''), limitMs, spec);
|
|
260
|
+
}
|
|
261
|
+
releaseSession() {
|
|
262
|
+
if (this.stopKillTimer)
|
|
263
|
+
clearTimeout(this.stopKillTimer);
|
|
264
|
+
if (this.eofTermTimer)
|
|
265
|
+
clearTimeout(this.eofTermTimer);
|
|
266
|
+
if (this.eofKillTimer)
|
|
267
|
+
clearTimeout(this.eofKillTimer);
|
|
268
|
+
this.closeInput('codex app-server exited');
|
|
269
|
+
this.child.stdin.destroy();
|
|
270
|
+
this.child.stderr.destroy();
|
|
271
|
+
}
|
|
272
|
+
resultFromExit(exitCode, stderr, limitMs, spec) {
|
|
273
|
+
if (this.spawnFailed)
|
|
274
|
+
throw this.spawnFailed;
|
|
275
|
+
// Preserve diagnostics even when an RPC/startup failure already owns the error.
|
|
276
|
+
if (stderr.trim() && (this.failure || sessionStderrIsUnexpected(exitCode, this.timedOut, this.terminatedByCezar))) {
|
|
277
|
+
this.emit({ type: 'note', message: `codex app-server stderr:\n${stderr}` });
|
|
278
|
+
}
|
|
279
|
+
// Before the first prompt ACK, process/pipe closure can own the failure
|
|
280
|
+
// before the ordinary crash branch. Keep its phase context and expose
|
|
281
|
+
// the drained terminal exception on the same v1 error seam as later exits.
|
|
282
|
+
if (this.failure)
|
|
283
|
+
this.throwOwnedFailure(stderr, exitCode, this.startupComplete, this.timedOut, this.terminatedByCezar);
|
|
284
|
+
return this.resultFromCleanExit(exitCode, stderr, limitMs, spec);
|
|
285
|
+
}
|
|
286
|
+
throwOwnedFailure(stderr, exitCode, startupComplete, timedOut, terminatedByCezar) {
|
|
287
|
+
if (!startupCrashOwnsFailure({ startupComplete, timedOut, terminatedByCezar }, stderr, exitCode))
|
|
288
|
+
throw this.failure;
|
|
289
|
+
const detail = summarizeRunnerStderr(stderr);
|
|
290
|
+
const message = `codex app-server exited with code ${exitCode}${detail ? ` — ${detail}` : ''} (${this.failure.message})`;
|
|
291
|
+
this.emit({ type: 'error', message });
|
|
292
|
+
throw new Error(message);
|
|
293
|
+
}
|
|
294
|
+
resultFromCleanExit(exitCode, stderr, limitMs, spec) {
|
|
295
|
+
// Timeout/interrupt can end the read loop mid-item — recover buffered prose.
|
|
296
|
+
this.textCoalescer.flush();
|
|
297
|
+
const base = {
|
|
298
|
+
text: this.textChunks.join('\n').trim(), toolCalls: this.toolCalls,
|
|
299
|
+
tokensUsed: this.tokensUsed, sessionId: this.threadId ?? spec.sessionId,
|
|
300
|
+
};
|
|
301
|
+
const settled = sessionExitEvent({
|
|
302
|
+
timedOut: this.timedOut, terminatedByCezar: this.terminatedByCezar, exitCode, signalCode: this.child.signalCode,
|
|
303
|
+
limitMs, stderrSummary: summarizeRunnerStderr(stderr),
|
|
304
|
+
});
|
|
305
|
+
if (settled && 'failure' in settled) {
|
|
306
|
+
this.emit({ type: 'error', message: settled.failure });
|
|
307
|
+
throw new Error(settled.failure);
|
|
308
|
+
}
|
|
309
|
+
if (settled)
|
|
310
|
+
this.emit({ type: settled.event, message: settled.message });
|
|
311
|
+
this.emit({ type: 'done' });
|
|
312
|
+
return base;
|
|
313
|
+
}
|
|
314
|
+
get open() {
|
|
315
|
+
return this.stdinOpen && this.rpc.open && !this.hasExited();
|
|
316
|
+
}
|
|
317
|
+
get pid() {
|
|
318
|
+
return this.child.pid;
|
|
319
|
+
}
|
|
320
|
+
sendAgentMessage(content, inputIds = []) {
|
|
321
|
+
// #505: a running turn is steered with turn/steer; only an unanswered native ask
|
|
322
|
+
// or an in-flight submission refuses.
|
|
323
|
+
// Until the thread and its first turn exist there is nothing to steer or start;
|
|
324
|
+
// a refusal here earns one readiness hint when startup completes.
|
|
325
|
+
if (this.open && !this.startupComplete) {
|
|
326
|
+
this.refusedBeforeStartup = true;
|
|
327
|
+
return false;
|
|
328
|
+
}
|
|
329
|
+
// A human prompt still on its way to the wire goes first (#505 local review).
|
|
330
|
+
if (this.open && this.humanPromptsPending > 0) {
|
|
331
|
+
this.refusedForHuman = true;
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
if (!this.open || this.pendingUserInput || this.pendingApprovals.size || this.agentSubmissionPending)
|
|
335
|
+
return false;
|
|
336
|
+
this.agentInputReady = false;
|
|
337
|
+
this.agentSubmissionPending = true;
|
|
338
|
+
if (this.autoEndTimer)
|
|
339
|
+
clearTimeout(this.autoEndTimer);
|
|
340
|
+
this.autoEndTimer = undefined;
|
|
341
|
+
const submissionId = randomUUID();
|
|
342
|
+
this.submissions.accept(submissionId, inputIds, '');
|
|
343
|
+
this.inFlightSubmissionId = submissionId;
|
|
344
|
+
// Reserve synchronously; only the matching RPC result acknowledges delivery.
|
|
345
|
+
return this.startOrSteerTurn(textOf(content), submissionId).catch((err) => {
|
|
346
|
+
this.submissions.consume(submissionId); // never accepted: the caller keeps ownership
|
|
347
|
+
if (this.stdinOpen)
|
|
348
|
+
this.emit({ type: 'error', message: `codex: agent input failed: ${String(err)}` });
|
|
349
|
+
throw err;
|
|
350
|
+
}).finally(() => {
|
|
351
|
+
this.agentSubmissionPending = false;
|
|
352
|
+
if (this.inFlightSubmissionId === submissionId)
|
|
353
|
+
this.inFlightSubmissionId = undefined;
|
|
354
|
+
if (this.stdinOpen && this.agentInputReady && !this.pendingUserInput && !this.pendingApprovals.size) {
|
|
355
|
+
this.opts.onAgentInputReady?.();
|
|
356
|
+
this.scheduleAutoEnd();
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
scheduleAutoEnd() {
|
|
361
|
+
if (!this.opts.autoEndAfterFirstTurn || !this.open || this.autoEndTimer || this.agentSubmissionPending || this.pendingApprovals.size)
|
|
362
|
+
return;
|
|
363
|
+
this.autoEndTimer = setTimeout(() => {
|
|
364
|
+
this.autoEndTimer = undefined;
|
|
365
|
+
if (this.opts.shouldAutoEnd?.() !== false)
|
|
366
|
+
this.end();
|
|
367
|
+
}, AUTO_END_DELAY_MS);
|
|
368
|
+
this.autoEndTimer.unref?.();
|
|
369
|
+
}
|
|
370
|
+
sendMessage(content) {
|
|
371
|
+
this.agentInputReady = false;
|
|
372
|
+
if (!this.open || this.pendingApprovals.size)
|
|
373
|
+
return false;
|
|
374
|
+
if (this.autoEndTimer) {
|
|
375
|
+
clearTimeout(this.autoEndTimer);
|
|
376
|
+
this.autoEndTimer = undefined;
|
|
377
|
+
}
|
|
378
|
+
const text = textOf(content);
|
|
379
|
+
if (!text)
|
|
380
|
+
return true;
|
|
381
|
+
if (this.pendingUserInput) {
|
|
382
|
+
const pending = this.pendingUserInput;
|
|
383
|
+
this.pendingUserInput = undefined;
|
|
384
|
+
this.rpc.respond({ id: pending.rpcId, result: { answers: userInputAnswers(pending.questions, text) } });
|
|
385
|
+
return this.open;
|
|
386
|
+
}
|
|
387
|
+
// Wait for the thread to exist, then steer the live turn or start a new one. Agent input
|
|
388
|
+
// waits until this prompt's request settles, so it can never overtake it.
|
|
389
|
+
const clientUserMessageId = randomUUID();
|
|
390
|
+
this.humanSteerIds.add(clientUserMessageId);
|
|
391
|
+
this.humanPromptsPending += 1;
|
|
392
|
+
void this.ready
|
|
393
|
+
.then(() => this.startOrSteerTurn(text, clientUserMessageId))
|
|
394
|
+
.catch((err) => {
|
|
395
|
+
if (this.stdinOpen) {
|
|
396
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
397
|
+
this.emit({ type: 'note', message: `codex: turn failed: ${message}` });
|
|
398
|
+
}
|
|
399
|
+
})
|
|
400
|
+
.finally(() => this.finishHumanSteer(clientUserMessageId));
|
|
401
|
+
return true;
|
|
402
|
+
}
|
|
403
|
+
trackHumanRpc(id, clientUserMessageId, kind = 'steer') {
|
|
404
|
+
if (!this.humanSteerIds.has(clientUserMessageId))
|
|
405
|
+
return;
|
|
406
|
+
this.humanPromptByRpc.set(id, clientUserMessageId);
|
|
407
|
+
if (kind === 'start')
|
|
408
|
+
this.humanStartRpcs.add(id);
|
|
409
|
+
}
|
|
410
|
+
releaseHumanPrompt(clientUserMessageId, notify = true) {
|
|
411
|
+
for (const [rpc, id] of this.humanPromptByRpc)
|
|
412
|
+
if (id === clientUserMessageId) {
|
|
413
|
+
this.humanPromptByRpc.delete(rpc);
|
|
414
|
+
this.humanStartRpcs.delete(rpc);
|
|
415
|
+
}
|
|
416
|
+
if (this.releasedHuman.has(clientUserMessageId))
|
|
417
|
+
return;
|
|
418
|
+
this.releasedHuman.add(clientUserMessageId);
|
|
419
|
+
this.humanPromptsPending = Math.max(0, this.humanPromptsPending - 1);
|
|
420
|
+
if (notify)
|
|
421
|
+
this.notifyHumanInputDrained();
|
|
422
|
+
}
|
|
423
|
+
/** Drop bookkeeping once this id is no longer waiting for an echo or a restart. */
|
|
424
|
+
finishHumanSteer(clientUserMessageId) {
|
|
425
|
+
if (this.unreadHumanSteers.has(clientUserMessageId))
|
|
426
|
+
return;
|
|
427
|
+
this.humanSteerIds.delete(clientUserMessageId);
|
|
428
|
+
this.releaseHumanPrompt(clientUserMessageId);
|
|
429
|
+
this.releasedHuman.delete(clientUserMessageId);
|
|
430
|
+
this.echoedHuman.delete(clientUserMessageId);
|
|
431
|
+
}
|
|
432
|
+
/** turn/steer admitted this id into a live turn; keep holding until echo or turn end. */
|
|
433
|
+
holdUnreadHumanSteer(clientUserMessageId, text) {
|
|
434
|
+
this.unreadHumanSteers.set(clientUserMessageId, text);
|
|
435
|
+
}
|
|
436
|
+
/** Read-in-turn: the userMessage echo is the read. Do not restart this id. */
|
|
437
|
+
noteHumanEcho(clientId) {
|
|
438
|
+
if (!this.humanSteerIds.has(clientId))
|
|
439
|
+
return;
|
|
440
|
+
this.echoedHuman.add(clientId);
|
|
441
|
+
const heldUnread = this.unreadHumanSteers.delete(clientId);
|
|
442
|
+
this.releaseHumanPrompt(clientId);
|
|
443
|
+
if (heldUnread)
|
|
444
|
+
this.finishHumanSteer(clientId);
|
|
445
|
+
}
|
|
446
|
+
/** Admitted but never echoed: start a turn under the same clientUserMessageId. */
|
|
447
|
+
restartUnreadHumanSteers() {
|
|
448
|
+
if (this.unreadHumanSteers.size === 0)
|
|
449
|
+
return;
|
|
450
|
+
const pending = [...this.unreadHumanSteers];
|
|
451
|
+
this.unreadHumanSteers.clear();
|
|
452
|
+
if (this.autoEndTimer) {
|
|
453
|
+
clearTimeout(this.autoEndTimer);
|
|
454
|
+
this.autoEndTimer = undefined;
|
|
455
|
+
}
|
|
456
|
+
for (const [id, text] of pending) {
|
|
457
|
+
if (!this.open || this.echoedHuman.has(id)) {
|
|
458
|
+
this.finishHumanSteer(id);
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
void this.startOrSteerTurn(text, id)
|
|
462
|
+
.catch((err) => {
|
|
463
|
+
if (this.stdinOpen) {
|
|
464
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
465
|
+
this.emit({ type: 'note', message: `codex: turn failed: ${message}` });
|
|
466
|
+
}
|
|
467
|
+
})
|
|
468
|
+
.finally(() => this.finishHumanSteer(id));
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
notifyHumanInputDrained() {
|
|
472
|
+
// A just-accepted turn/start may not have `activeTurnId` yet; run.ts ignores
|
|
473
|
+
// settle once turn.started clears atTurnBoundary. Do not block on activeTurnId.
|
|
474
|
+
if (this.humanPromptsPending > 0 || this.humanReadyOnTurnStart || !this.open || this.pendingUserInput || this.pendingApprovals.size || this.agentSubmissionPending)
|
|
475
|
+
return;
|
|
476
|
+
if (this.refusedForHuman)
|
|
477
|
+
this.refusedForHuman = false;
|
|
478
|
+
this.opts.onAgentInputReady?.();
|
|
479
|
+
}
|
|
480
|
+
discardQueuedMessages() { }
|
|
481
|
+
holdsHumanInput() { return this.humanPromptsPending > 0 || this.humanReadyOnTurnStart; }
|
|
482
|
+
heldHumanInputCount() { return this.humanPromptsPending + (this.humanReadyOnTurnStart ? 1 : 0); }
|
|
483
|
+
end(explicit = true) {
|
|
484
|
+
if (explicit && !this.hasExited()) {
|
|
485
|
+
this.explicitEnd = true;
|
|
486
|
+
this.terminatedByCezar ||= this.automaticCleanupStarted;
|
|
487
|
+
}
|
|
488
|
+
if (!this.stdinOpen)
|
|
489
|
+
return;
|
|
490
|
+
this.closeInput('session ended');
|
|
491
|
+
try {
|
|
492
|
+
endCodexAppServer(this.child, (term, kill) => {
|
|
493
|
+
this.eofTermTimer = term;
|
|
494
|
+
this.eofKillTimer = kill;
|
|
495
|
+
}, (state) => {
|
|
496
|
+
this.automaticCleanupStarted = true;
|
|
497
|
+
this.terminatedByCezar ||= this.explicitEnd || state === 'live';
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
catch { /* already gone */ }
|
|
501
|
+
}
|
|
502
|
+
interrupt() {
|
|
503
|
+
if (this.hardStopStarted || this.hasExited())
|
|
504
|
+
return;
|
|
505
|
+
this.hardStopStarted = true;
|
|
506
|
+
if (!this.automaticCleanupStarted) {
|
|
507
|
+
if (this.eofTermTimer)
|
|
508
|
+
clearTimeout(this.eofTermTimer);
|
|
509
|
+
if (this.eofKillTimer)
|
|
510
|
+
clearTimeout(this.eofKillTimer);
|
|
511
|
+
}
|
|
512
|
+
if (this.stdinOpen && this.threadId && this.activeTurnId) {
|
|
513
|
+
void this.rpc.request('turn/interrupt', { threadId: this.threadId, turnId: this.activeTurnId }).catch(() => undefined);
|
|
514
|
+
}
|
|
515
|
+
this.closeInput('codex session stopped');
|
|
516
|
+
this.terminatedByCezar = true;
|
|
517
|
+
signalSession(this.child, 'SIGTERM');
|
|
518
|
+
this.stopKillTimer = setTimeout(() => {
|
|
519
|
+
if (!this.hasExited())
|
|
520
|
+
signalSession(this.child, 'SIGKILL');
|
|
521
|
+
}, KILL_GRACE_MS);
|
|
522
|
+
this.stopKillTimer.unref?.();
|
|
523
|
+
}
|
|
524
|
+
closeInput(reason) {
|
|
525
|
+
this.clearStreamRetry();
|
|
526
|
+
this.stdinOpen = false;
|
|
527
|
+
// Respond while stdin is still writable, before rpc.close or EOF/TERM.
|
|
528
|
+
this.expireApprovals(reason);
|
|
529
|
+
this.humanReadyOnTurnStart = false;
|
|
530
|
+
for (const id of [...this.unreadHumanSteers.keys()]) {
|
|
531
|
+
this.unreadHumanSteers.delete(id);
|
|
532
|
+
this.finishHumanSteer(id);
|
|
533
|
+
}
|
|
534
|
+
this.rejectPendingUserInput(reason);
|
|
535
|
+
this.agentInputReady = false;
|
|
536
|
+
if (this.startupTimer)
|
|
537
|
+
clearTimeout(this.startupTimer);
|
|
538
|
+
if (this.autoEndTimer)
|
|
539
|
+
clearTimeout(this.autoEndTimer);
|
|
540
|
+
this.rpc.close(reason);
|
|
541
|
+
}
|
|
542
|
+
fail(error, diagnostic = 'failed') {
|
|
543
|
+
if (!this.stdinOpen)
|
|
544
|
+
return;
|
|
545
|
+
this.failure ??= error;
|
|
546
|
+
// Stage-only diagnostics never include prompt/config/env or raw stderr.
|
|
547
|
+
const message = this.startupComplete ? 'Codex app-server failed; closing app-server'
|
|
548
|
+
: `Codex startup ${diagnostic} while waiting for ${this.startupPhase}; closing app-server`;
|
|
549
|
+
try {
|
|
550
|
+
this.emit({ type: 'note', message });
|
|
551
|
+
}
|
|
552
|
+
catch { /* A failing diagnostic sink cannot release a still-live process. */ }
|
|
553
|
+
this.interrupt();
|
|
554
|
+
}
|
|
555
|
+
assertOpen() {
|
|
556
|
+
if (!this.open)
|
|
557
|
+
throw new Error('codex session closed');
|
|
558
|
+
}
|
|
559
|
+
startupWaitingFor(phase) {
|
|
560
|
+
this.assertOpen();
|
|
561
|
+
this.startupPhase = phase;
|
|
562
|
+
this.emit({ type: 'note', message: `Codex startup: waiting for ${phase}` });
|
|
563
|
+
}
|
|
564
|
+
checkStartupComplete() {
|
|
565
|
+
if (!this.openingAcknowledged || !this.firstTurnStarted || !this.stdinOpen)
|
|
566
|
+
return;
|
|
567
|
+
if (this.startupComplete)
|
|
568
|
+
return;
|
|
569
|
+
this.startupComplete = true;
|
|
570
|
+
if (this.startupTimer)
|
|
571
|
+
clearTimeout(this.startupTimer);
|
|
572
|
+
// Input refused during startup can now steer the opening turn (#505).
|
|
573
|
+
if (this.refusedBeforeStartup)
|
|
574
|
+
queueMicrotask(() => {
|
|
575
|
+
this.refusedBeforeStartup = false;
|
|
576
|
+
if (this.open && !this.pendingUserInput && !this.pendingApprovals.size && !this.agentSubmissionPending)
|
|
577
|
+
this.opts.onAgentInputReady?.();
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
// ---- protocol -----------------------------------------------------------
|
|
581
|
+
async bootstrap() {
|
|
582
|
+
this.startupWaitingFor('initialize');
|
|
583
|
+
await this.rpc.initialize();
|
|
584
|
+
this.assertOpen();
|
|
585
|
+
this.startupWaitingFor('configRequirements/read');
|
|
586
|
+
// Read through the same authenticated app-server as the thread. Do not
|
|
587
|
+
// guess policy from a local config file: enterprise requirements may be remote.
|
|
588
|
+
let requirements;
|
|
589
|
+
try {
|
|
590
|
+
requirements = await this.rpc.request('configRequirements/read', {});
|
|
591
|
+
}
|
|
592
|
+
catch (error) {
|
|
593
|
+
if (!(error instanceof CodexRpcResponseError))
|
|
594
|
+
throw error;
|
|
595
|
+
this.emit({ type: 'note', message: 'Codex requirements unavailable; using Codex permission defaults' });
|
|
596
|
+
}
|
|
597
|
+
this.assertOpen();
|
|
598
|
+
const restrictNetwork = productEnv('CODEX_NETWORK') === '0';
|
|
599
|
+
const overrides = {
|
|
600
|
+
model: this.spec.model,
|
|
601
|
+
cwd: this.spec.cwd,
|
|
602
|
+
...codexToolGrantFields(this.spec.toolGrant),
|
|
603
|
+
...codexPermissionOverrides(requirements, restrictNetwork),
|
|
604
|
+
// Start and resume accept dotted config overrides; no global config write. Governed sessions
|
|
605
|
+
// keep multi-agent and lose only the cross-thread message board (hearsay-tools/cezarion#2279).
|
|
606
|
+
...((restrictNetwork || this.spec.restrictCrossSessionMessaging || this.spec.cezarTools) ? { config: {
|
|
607
|
+
...(restrictNetwork ? { 'sandbox_workspace_write.network_access': false } : {}),
|
|
608
|
+
...(this.spec.restrictCrossSessionMessaging ? { 'features.agent_message_board': false } : {}),
|
|
609
|
+
// hearsay-tools/cezarion#1294: Codex asks before every MCP tool call unless the
|
|
610
|
+
// server's mode is `approve`, and cezar's own tools must never wait on that.
|
|
611
|
+
// approval_policy stays the user's (#381); older Codex ignores the unknown key.
|
|
612
|
+
...(this.spec.cezarTools ? { [`mcp_servers.${this.spec.cezarTools.name}`]: { command: this.spec.cezarTools.command, args: this.spec.cezarTools.args, env_vars: cezarToolEnvNames(this.spec.env ?? {}), default_tools_approval_mode: 'approve' } } : {}),
|
|
613
|
+
} } : {}),
|
|
614
|
+
};
|
|
615
|
+
let threadResponse;
|
|
616
|
+
if (this.spec.resume && this.spec.sessionId) {
|
|
617
|
+
this.startupWaitingFor('thread/resume');
|
|
618
|
+
threadResponse = await this.rpc.request('thread/resume', { threadId: this.spec.sessionId, ...clean(overrides) });
|
|
619
|
+
this.assertOpen();
|
|
620
|
+
this.threadId = this.spec.sessionId;
|
|
621
|
+
}
|
|
622
|
+
else {
|
|
623
|
+
this.startupWaitingFor('thread/start');
|
|
624
|
+
threadResponse = await this.rpc.request('thread/start', clean(overrides));
|
|
625
|
+
this.assertOpen();
|
|
626
|
+
this.threadId = threadIdOf(threadResponse) ?? this.spec.sessionId;
|
|
627
|
+
}
|
|
628
|
+
// Named managed profiles may ignore legacy sandbox settings. Do not silently
|
|
629
|
+
// run with network enabled, or replace their filesystem rules to disable it.
|
|
630
|
+
if (restrictNetwork && !codexNetworkIsRestricted(threadResponse)) {
|
|
631
|
+
throw new Error('CEZ_CODEX_NETWORK=0 requires a network-restricted Codex permission policy; the thread did not confirm one');
|
|
632
|
+
}
|
|
633
|
+
if (this.threadId) {
|
|
634
|
+
this.emit({ type: 'session', sessionId: this.threadId });
|
|
635
|
+
// The result path (thread/start response, or thread/resume which sends
|
|
636
|
+
// no thread/started notification) — deduplicated inside the mapper.
|
|
637
|
+
const threadId = this.threadId;
|
|
638
|
+
this.emitUi((state) => codexSessionStarted(threadId, state));
|
|
639
|
+
}
|
|
640
|
+
// Seed the first turn. The system prompt (skill body + handoff contract)
|
|
641
|
+
// has no dedicated app-server field, so it rides along as a leading block
|
|
642
|
+
// of the opening message.
|
|
643
|
+
const first = prependSystemPrompt(this.spec.systemPrompt, this.spec.userPrompt);
|
|
644
|
+
this.startupWaitingFor('turn/start');
|
|
645
|
+
await this.startOrSteerTurn(first);
|
|
646
|
+
this.assertOpen();
|
|
647
|
+
this.openingAcknowledged = true;
|
|
648
|
+
this.checkStartupComplete();
|
|
649
|
+
if (!this.startupComplete)
|
|
650
|
+
this.startupWaitingFor('first main-thread turn');
|
|
651
|
+
}
|
|
652
|
+
async startOrSteerTurn(text, clientUserMessageId) {
|
|
653
|
+
this.assertOpen();
|
|
654
|
+
if (!this.threadId)
|
|
655
|
+
throw new Error('codex app-server did not return a thread id');
|
|
656
|
+
this.agentInputReady = false;
|
|
657
|
+
const input = [{ type: 'text', text, text_elements: [] }];
|
|
658
|
+
// Echoed as the consumed userMessage item's `clientId` (#505).
|
|
659
|
+
const ids = clientUserMessageId ? { clientUserMessageId } : {};
|
|
660
|
+
const humanId = clientUserMessageId && this.humanSteerIds.has(clientUserMessageId) ? clientUserMessageId : undefined;
|
|
661
|
+
if (this.activeTurnId) {
|
|
662
|
+
if (await this.steerLiveTurn(input, ids, clientUserMessageId, humanId, text))
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
await this.startTurn(input, ids, clientUserMessageId, humanId);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
/** The steer and, when it falls through, the turn/start request run in one continuation.
|
|
670
|
+
* True when the steer settled the input. */
|
|
671
|
+
async steerLiveTurn(input, ids, clientUserMessageId, humanId, text) {
|
|
672
|
+
const boundary = this.turnBoundaryVersion;
|
|
673
|
+
const onSteerId = humanId ? (id) => this.trackHumanRpc(id, humanId, 'steer') : undefined;
|
|
674
|
+
let settled = false;
|
|
675
|
+
try {
|
|
676
|
+
await this.rpc.request('turn/steer', { threadId: this.threadId, input, expectedTurnId: this.activeTurnId, ...ids }, onSteerId);
|
|
677
|
+
settled = this.steerWasRead(clientUserMessageId, humanId, text, boundary);
|
|
678
|
+
}
|
|
679
|
+
catch (err) {
|
|
680
|
+
settled = this.steerRefusalSettled(err, clientUserMessageId, humanId, boundary);
|
|
681
|
+
}
|
|
682
|
+
if (!settled)
|
|
683
|
+
await this.startTurn(input, ids, clientUserMessageId, humanId);
|
|
684
|
+
return true;
|
|
685
|
+
}
|
|
686
|
+
/** Accepted, but the turn completed before the model read it: nothing will read it now,
|
|
687
|
+
* so start a turn with it under the same client id (#505). Human steers get the same
|
|
688
|
+
* restart so a coalesced steer+completed chunk cannot drop them (#486). Skip when the
|
|
689
|
+
* turn already echoed this client id — it was read in-turn. */
|
|
690
|
+
steerWasRead(clientUserMessageId, humanId, text, boundary) {
|
|
691
|
+
const echoed = clientUserMessageId !== undefined && this.echoedHuman.has(clientUserMessageId);
|
|
692
|
+
const stranded = clientUserMessageId !== undefined && this.turnBoundaryVersion !== boundary && !this.activeTurnId && !echoed
|
|
693
|
+
&& (this.submissions.has(clientUserMessageId) || this.humanSteerIds.has(clientUserMessageId));
|
|
694
|
+
if (stranded)
|
|
695
|
+
return false;
|
|
696
|
+
// Admission is not a read: keep a human steer held until echo or turn end.
|
|
697
|
+
if (humanId && this.activeTurnId && !echoed)
|
|
698
|
+
this.holdUnreadHumanSteer(humanId, text);
|
|
699
|
+
else if (humanId)
|
|
700
|
+
this.releaseHumanPrompt(humanId);
|
|
701
|
+
return true;
|
|
702
|
+
}
|
|
703
|
+
/** Only a definitive refusal falls back: the server answered with an error AND the turn
|
|
704
|
+
* ended meanwhile. A timeout or closed transport is ambiguous — the steer may have
|
|
705
|
+
* landed — so it rejects without a retry (#505). */
|
|
706
|
+
steerRefusalSettled(err, clientUserMessageId, humanId, boundary) {
|
|
707
|
+
if (!(err instanceof CodexRpcResponseError) || this.turnBoundaryVersion === boundary || this.activeTurnId)
|
|
708
|
+
throw err;
|
|
709
|
+
if (clientUserMessageId && this.echoedHuman.has(clientUserMessageId)) {
|
|
710
|
+
if (humanId)
|
|
711
|
+
this.releaseHumanPrompt(humanId);
|
|
712
|
+
return true;
|
|
713
|
+
}
|
|
714
|
+
return false;
|
|
715
|
+
}
|
|
716
|
+
async startTurn(input, ids, clientUserMessageId, humanId) {
|
|
717
|
+
// Ask the app-server for reasoning summaries; without this the model runs
|
|
718
|
+
// with its default (no summary), so the reasoning thread stays empty even
|
|
719
|
+
// though the mapper and UI can render it. The override persists for this
|
|
720
|
+
// turn and every subsequent turn, so seeding it on turn/start is enough.
|
|
721
|
+
const boundaryVersion = this.turnBoundaryVersion;
|
|
722
|
+
const completionsBefore = this.turnCompletions;
|
|
723
|
+
const onStartId = humanId ? (id) => this.trackHumanRpc(id, humanId, 'start') : undefined;
|
|
724
|
+
const res = await this.rpc.request('turn/start', {
|
|
725
|
+
threadId: this.threadId,
|
|
726
|
+
input,
|
|
727
|
+
...ids,
|
|
728
|
+
...codexTurnStartExtras(this.spec),
|
|
729
|
+
}, humanId && !this.activeTurnId ? onStartId : undefined);
|
|
730
|
+
if (clientUserMessageId)
|
|
731
|
+
this.recordStartedSubmission(clientUserMessageId, res, completionsBefore);
|
|
732
|
+
if (this.turnBoundaryVersion === boundaryVersion)
|
|
733
|
+
this.activeTurnId = turnIdOf(res) ?? this.activeTurnId;
|
|
734
|
+
}
|
|
735
|
+
/** This turn's own input: its completion proves the model processed it (#505). A response
|
|
736
|
+
* can arrive after that turn already completed; settle it from the recorded outcome. */
|
|
737
|
+
recordStartedSubmission(clientUserMessageId, res, completionsBefore) {
|
|
738
|
+
const startedTurn = turnIdOf(res);
|
|
739
|
+
const outcome = startedTurn && this.turnCompletions > completionsBefore ? this.completedTurns.get(startedTurn) : undefined;
|
|
740
|
+
if (outcome === undefined) {
|
|
741
|
+
this.turnStartSubmissions.add(clientUserMessageId);
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
const settled = this.submissions.consume(clientUserMessageId);
|
|
745
|
+
if (settled.length && outcome)
|
|
746
|
+
this.opts.onAgentInputConsumed?.(settled);
|
|
747
|
+
else if (settled.length)
|
|
748
|
+
this.emit({ type: 'input-unconsumed', inputIds: settled });
|
|
749
|
+
}
|
|
750
|
+
/** Native stdout reader. Every stage runs inside this one try, so a stage
|
|
751
|
+
* throw ends the read the same way a transport failure does. */
|
|
752
|
+
async readNativeOutput() {
|
|
753
|
+
try {
|
|
754
|
+
for await (const line of readNdjson(this.child.stdout))
|
|
755
|
+
this.routeNativeLine(line);
|
|
756
|
+
this.settleNativeEof();
|
|
757
|
+
}
|
|
758
|
+
catch {
|
|
759
|
+
if (this.stdinOpen && !this.hasExited()) {
|
|
760
|
+
this.fail(new Error(`codex app-server output failed while waiting for ${this.startupPhase}`));
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
routeNativeLine(line) {
|
|
765
|
+
const msg = parseNativeLine(line);
|
|
766
|
+
if (msg === undefined)
|
|
767
|
+
return;
|
|
768
|
+
// A method+id is a server REQUEST, even if its method happens to name
|
|
769
|
+
// a lifecycle notification. It must never reach the notification mapper.
|
|
770
|
+
if (isServerRequest(msg)) {
|
|
771
|
+
if (this.open)
|
|
772
|
+
this.dispatch(msg);
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
if (!this.admitsNotification(msg))
|
|
776
|
+
return;
|
|
777
|
+
this.opts.onActivity?.();
|
|
778
|
+
this.emitUi((state) => mapCodexNotification(msg, state));
|
|
779
|
+
this.dispatch(msg);
|
|
780
|
+
}
|
|
781
|
+
/** Lifecycle eligibility, then the current-turn filters, in that order. */
|
|
782
|
+
admitsNotification(msg) {
|
|
783
|
+
if (!this.open && !drainsAfterClose(msg, () => this.stdinOpen && this.hasExited()))
|
|
784
|
+
return false;
|
|
785
|
+
// Child turns do not reach either channel.
|
|
786
|
+
if (this.isForeignTurnLifecycle(msg))
|
|
787
|
+
return false;
|
|
788
|
+
// The UI mapper must not retire a live approval on an older turn's tail.
|
|
789
|
+
if (isStaleTurnOutcome(msg, this.activeTurnId))
|
|
790
|
+
return false;
|
|
791
|
+
// Stale/child retry errors must neither fail nor warn on this turn.
|
|
792
|
+
return msg.method !== 'error' || this.isCurrentTurn((msg.params ?? {}));
|
|
793
|
+
}
|
|
794
|
+
/** Clean EOF while the process lives: a startup failure, or automatic cleanup. */
|
|
795
|
+
settleNativeEof() {
|
|
796
|
+
if (!this.stdinOpen || this.hasExited())
|
|
797
|
+
return;
|
|
798
|
+
if (!this.startupComplete)
|
|
799
|
+
this.fail(new Error(`Codex startup stdout closed while waiting for ${this.startupPhase}`));
|
|
800
|
+
else
|
|
801
|
+
this.end(false);
|
|
802
|
+
}
|
|
803
|
+
dispatch(msg) {
|
|
804
|
+
if (typeof msg.method === 'string' && (typeof msg.id === 'number' || typeof msg.id === 'string')) {
|
|
805
|
+
if (msg.method === 'item/tool/requestUserInput')
|
|
806
|
+
this.handleUserInputRequest(msg.id, msg.params ?? {});
|
|
807
|
+
else if (isCodexApprovalRequest(msg.method, msg.params))
|
|
808
|
+
this.handleApprovalRequest(msg.method, msg.id, msg.params);
|
|
809
|
+
else
|
|
810
|
+
this.rpc.respond({ id: msg.id, error: { code: -32601, message: `unsupported server request: ${msg.method}` } });
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
const humanClient = typeof msg.id === 'number' ? this.humanPromptByRpc.get(msg.id) : undefined;
|
|
814
|
+
if (this.rpc.dispatchResponse(msg)) {
|
|
815
|
+
// #486: settle human-prompt bookkeeping in RPC dispatch order, before the next line.
|
|
816
|
+
// Do not release a human steer whose turn already ended with no successor — the
|
|
817
|
+
// await continuation may still restart it, or release once it decides not to.
|
|
818
|
+
if (humanClient) {
|
|
819
|
+
const startRpc = typeof msg.id === 'number' && this.humanStartRpcs.has(msg.id);
|
|
820
|
+
if (typeof msg.id === 'number') {
|
|
821
|
+
this.humanPromptByRpc.delete(msg.id);
|
|
822
|
+
this.humanStartRpcs.delete(msg.id);
|
|
823
|
+
}
|
|
824
|
+
// A turn/steer result is admission, not a read (#486 review). Keep holding
|
|
825
|
+
// until the userMessage echo or the turn ends. turn/start still releases:
|
|
826
|
+
// the follow-up/idle prompt was accepted (or failed). Defer the ready hint
|
|
827
|
+
// until turn/started so run.ts does not settle the previous DONE/idle
|
|
828
|
+
// boundary before the follow-up turn exists.
|
|
829
|
+
if (startRpc) {
|
|
830
|
+
const startError = msg.error !== undefined;
|
|
831
|
+
const deferHint = !this.activeTurnId && !startError;
|
|
832
|
+
if (deferHint)
|
|
833
|
+
this.humanReadyOnTurnStart = true;
|
|
834
|
+
else if (startError)
|
|
835
|
+
this.humanReadyOnTurnStart = false;
|
|
836
|
+
this.releaseHumanPrompt(humanClient, !deferHint);
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
if (typeof msg.method === 'string')
|
|
842
|
+
this.handleNotification(msg.method, msg.params ?? {});
|
|
843
|
+
}
|
|
844
|
+
handleApprovalRequest(method, rpcId, params) {
|
|
845
|
+
const duplicate = [...this.pendingApprovals.entries()].find(([, pending]) => pending.rpcId === rpcId);
|
|
846
|
+
const approval = codexApproval(method, rpcId, params, this.spec.cezarTools?.name);
|
|
847
|
+
const routing = params;
|
|
848
|
+
if (!approval || !this.activeTurnId || routing?.threadId !== this.threadId || approval.turnId !== this.activeTurnId ||
|
|
849
|
+
duplicate) {
|
|
850
|
+
this.rpc.respond({ id: rpcId, error: { code: -32602, message: 'malformed, stale or unsupported approval routing' } });
|
|
851
|
+
// One native id cannot identify two requests. Its error settles the wire;
|
|
852
|
+
// revoke the old UI capability so it cannot produce a second response.
|
|
853
|
+
if (duplicate)
|
|
854
|
+
this.expireApproval(duplicate[0], 'duplicate native request id', false);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
this.clearStreamRetry();
|
|
858
|
+
this.agentInputReady = false;
|
|
859
|
+
if (this.autoEndTimer)
|
|
860
|
+
clearTimeout(this.autoEndTimer);
|
|
861
|
+
this.autoEndTimer = undefined;
|
|
862
|
+
this.pendingApprovals.set(approval.event.requestId, approval);
|
|
863
|
+
try {
|
|
864
|
+
if (!this.opts.onUiEvent)
|
|
865
|
+
throw new Error('approval UI unavailable');
|
|
866
|
+
this.opts.onUiEvent(approval.event);
|
|
867
|
+
}
|
|
868
|
+
catch {
|
|
869
|
+
// A missing/throwing consumer cannot leave a native RPC waiting forever.
|
|
870
|
+
this.expireApproval(approval.event.requestId, 'approval UI unavailable');
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
respondPermission(requestId, optionId) {
|
|
874
|
+
const approval = this.pendingApprovals.get(requestId);
|
|
875
|
+
const response = approval?.responses.get(optionId);
|
|
876
|
+
if (!this.open || !approval || !response || approval.turnId !== this.activeTurnId)
|
|
877
|
+
return false;
|
|
878
|
+
this.pendingApprovals.delete(requestId);
|
|
879
|
+
this.rpc.respond({ id: approval.rpcId, result: response });
|
|
880
|
+
this.emitPermissionResolved(requestId, this.open ? { optionId } : { reason: 'approval response transport failed' });
|
|
881
|
+
return this.open;
|
|
882
|
+
}
|
|
883
|
+
emitPermissionResolved(requestId, resolution) {
|
|
884
|
+
try {
|
|
885
|
+
this.opts.onUiEvent?.({ type: 'permission.resolved', requestId, ...resolution });
|
|
886
|
+
}
|
|
887
|
+
catch { /* A failed consumer must not strand other pending RPCs. */ }
|
|
888
|
+
}
|
|
889
|
+
expireApproval(requestId, reason, respond = true) {
|
|
890
|
+
const approval = this.pendingApprovals.get(requestId);
|
|
891
|
+
if (!approval)
|
|
892
|
+
return;
|
|
893
|
+
this.pendingApprovals.delete(requestId);
|
|
894
|
+
if (respond)
|
|
895
|
+
this.rpc.respond({ id: approval.rpcId, error: { code: -32000, message: reason } });
|
|
896
|
+
this.emitPermissionResolved(requestId, { reason });
|
|
897
|
+
}
|
|
898
|
+
expireApprovals(reason, respond = true) {
|
|
899
|
+
for (const requestId of this.pendingApprovals.keys())
|
|
900
|
+
this.expireApproval(requestId, reason, respond);
|
|
901
|
+
}
|
|
902
|
+
handleUserInputRequest(rpcId, params) {
|
|
903
|
+
const questions = codexAskQuestions(params.questions);
|
|
904
|
+
if (!questions) {
|
|
905
|
+
this.rpc.respond({ id: rpcId, error: { code: -32602, message: 'unsupported or malformed requestUserInput payload' } });
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
908
|
+
if (this.isCurrentTurn(params))
|
|
909
|
+
this.clearStreamRetry();
|
|
910
|
+
if (this.pendingUserInput)
|
|
911
|
+
this.rejectPendingUserInput('superseded by a newer requestUserInput');
|
|
912
|
+
this.pendingUserInput = { rpcId, questions };
|
|
913
|
+
this.opts.onUiEvent?.({ type: 'ask.requested', requestId: `codex-${String(rpcId)}`, questions: uiAskQuestions(questions) });
|
|
914
|
+
}
|
|
915
|
+
rejectPendingUserInput(message) {
|
|
916
|
+
const pending = this.pendingUserInput;
|
|
917
|
+
if (!pending)
|
|
918
|
+
return;
|
|
919
|
+
this.pendingUserInput = undefined;
|
|
920
|
+
this.rpc.respond({ id: pending.rpcId, error: { code: -32000, message } });
|
|
921
|
+
}
|
|
922
|
+
/** True when a turn notification belongs to a sub-agent CHILD thread rather than this run's
|
|
923
|
+
* own main thread — its lifecycle must not start or end the parent turn (#600). The app-server
|
|
924
|
+
* multiplexes every thread over one connection, so a spawned skill's child `turn/completed`
|
|
925
|
+
* would otherwise emit a `turn-end` and park the actively-working run under "Needs you".
|
|
926
|
+
* Fail-open: an absent `threadId` (the single-thread wire shape) or our own id counts as ours. */
|
|
927
|
+
isForeignThreadTurn(params) {
|
|
928
|
+
const eventThreadId = stringField(params, 'threadId');
|
|
929
|
+
return !!eventThreadId && !!this.threadId && eventThreadId !== this.threadId;
|
|
930
|
+
}
|
|
931
|
+
/** A `turn/started|completed|failed` notification for a sub-agent child thread — dropped
|
|
932
|
+
* before either channel processes it (#600). Only turn lifecycle is filtered; child item
|
|
933
|
+
* events still map, so nested sub-agent activity keeps rendering. */
|
|
934
|
+
isForeignTurnLifecycle(msg) {
|
|
935
|
+
const method = typeof msg.method === 'string' ? msg.method : undefined;
|
|
936
|
+
if (!method || !TURN_LIFECYCLE_METHODS.has(method))
|
|
937
|
+
return false;
|
|
938
|
+
return this.isForeignThreadTurn((msg.params ?? {}));
|
|
939
|
+
}
|
|
940
|
+
isCurrentTurn(params) {
|
|
941
|
+
const turnId = turnIdOf(params);
|
|
942
|
+
return !!this.activeTurnId && !this.isForeignThreadTurn(params)
|
|
943
|
+
&& (!turnId || turnId === this.activeTurnId);
|
|
944
|
+
}
|
|
945
|
+
clearStreamRetry() {
|
|
946
|
+
if (this.streamRetryTimer)
|
|
947
|
+
clearTimeout(this.streamRetryTimer);
|
|
948
|
+
this.streamRetryTimer = undefined;
|
|
949
|
+
this.streamRetryError = undefined;
|
|
950
|
+
}
|
|
951
|
+
handleStreamError(params) {
|
|
952
|
+
const message = codexStreamError(params);
|
|
953
|
+
if (!message || !this.isCurrentTurn(params))
|
|
954
|
+
return;
|
|
955
|
+
if (params.willRetry === false) {
|
|
956
|
+
this.fail(new Error(message));
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
this.emit({ type: 'note', message });
|
|
960
|
+
if (params.willRetry !== true)
|
|
961
|
+
return;
|
|
962
|
+
this.streamRetryError = message;
|
|
963
|
+
if (this.streamRetryTimer)
|
|
964
|
+
return;
|
|
965
|
+
this.streamRetryTimer = setTimeout(() => {
|
|
966
|
+
const lastError = this.streamRetryError;
|
|
967
|
+
if (!this.open || !lastError)
|
|
968
|
+
return;
|
|
969
|
+
this.emitUi(state => mapCodexNotification({ method: 'turn/completed', params: {
|
|
970
|
+
turn: { id: this.activeTurnId, status: 'failed', error: { message: lastError } },
|
|
971
|
+
} }, state));
|
|
972
|
+
this.fail(new Error(`Codex stream made no progress for 60s: ${lastError}`));
|
|
973
|
+
}, STREAM_RETRY_TIMEOUT_MS);
|
|
974
|
+
this.streamRetryTimer.unref?.();
|
|
975
|
+
}
|
|
976
|
+
handleNotification(method, params) {
|
|
977
|
+
if (this.streamRetryTimer && this.isCurrentTurn(params) && isStreamProgress(method, params)) {
|
|
978
|
+
this.clearStreamRetry();
|
|
979
|
+
}
|
|
980
|
+
if (method === 'serverRequest/resolved')
|
|
981
|
+
this.noteServerRequestResolved(params);
|
|
982
|
+
else if (method === 'error')
|
|
983
|
+
this.handleStreamError(params);
|
|
984
|
+
else if (method === 'warning' && typeof params.message === 'string' && params.message.trim())
|
|
985
|
+
this.emit({ type: 'note', message: params.message.trim() });
|
|
986
|
+
else if (method === 'turn/started')
|
|
987
|
+
this.noteTurnStarted(params);
|
|
988
|
+
else if (method === 'item/agentMessage/delta')
|
|
989
|
+
this.noteAgentDelta(params);
|
|
990
|
+
else if (method === 'item/started')
|
|
991
|
+
this.noteItemStarted(params);
|
|
992
|
+
else if (method === 'item/completed')
|
|
993
|
+
this.noteItemCompleted(params);
|
|
994
|
+
else if (method === 'thread/tokenUsage/updated') {
|
|
995
|
+
const total = tokenTotal(params);
|
|
996
|
+
if (total > 0) {
|
|
997
|
+
this.tokensUsed = total;
|
|
998
|
+
this.emit({ type: 'token-usage', tokensUsed: total });
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
else if (method === 'turn/completed' || method === 'turn/failed')
|
|
1002
|
+
this.noteTurnEnded(method, params);
|
|
1003
|
+
}
|
|
1004
|
+
noteServerRequestResolved(params) {
|
|
1005
|
+
if (params.threadId !== this.threadId)
|
|
1006
|
+
return;
|
|
1007
|
+
for (const [requestId, approval] of this.pendingApprovals) {
|
|
1008
|
+
if (approval.rpcId === params.requestId)
|
|
1009
|
+
this.expireApproval(requestId, 'resolved by Codex', false);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
noteTurnStarted(params) {
|
|
1013
|
+
if (!this.isForeignThreadTurn(params))
|
|
1014
|
+
this.turnBoundaryVersion += 1;
|
|
1015
|
+
if (this.isForeignThreadTurn(params))
|
|
1016
|
+
return; // sub-agent child thread — not our turn (#600)
|
|
1017
|
+
if (this.threadId && turnIdOf(params)) {
|
|
1018
|
+
this.firstTurnStarted = true;
|
|
1019
|
+
this.checkStartupComplete();
|
|
1020
|
+
}
|
|
1021
|
+
if (turnIdOf(params) !== this.activeTurnId) {
|
|
1022
|
+
this.clearStreamRetry();
|
|
1023
|
+
this.expireApprovals('a new turn started');
|
|
1024
|
+
}
|
|
1025
|
+
this.activeTurnId = turnIdOf(params) ?? this.activeTurnId;
|
|
1026
|
+
if (this.humanReadyOnTurnStart) {
|
|
1027
|
+
this.humanReadyOnTurnStart = false;
|
|
1028
|
+
// emitUi already ran (clears atTurnBoundary); hint now that the hold dropped.
|
|
1029
|
+
this.notifyHumanInputDrained();
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
noteAgentDelta(params) {
|
|
1033
|
+
// Child text belongs only to v2; buffering it here would pollute the
|
|
1034
|
+
// parent's marker parse when the coalescer flushes at turn-end (#149).
|
|
1035
|
+
if (this.isForeignThreadTurn(params))
|
|
1036
|
+
return;
|
|
1037
|
+
const delta = typeof params.delta === 'string' ? params.delta : '';
|
|
1038
|
+
if (delta)
|
|
1039
|
+
this.textCoalescer.append(stringField(params, 'itemId'), delta);
|
|
1040
|
+
}
|
|
1041
|
+
noteItemStarted(params) {
|
|
1042
|
+
const item = params.item ?? {};
|
|
1043
|
+
const type = stringField(item, 'type');
|
|
1044
|
+
if (type === 'userMessage' && !this.isForeignThreadTurn(params)) {
|
|
1045
|
+
// The model received this input now; `clientId` names our submission (#505).
|
|
1046
|
+
const clientId = stringField(item, 'clientId');
|
|
1047
|
+
if (clientId)
|
|
1048
|
+
this.noteHumanEcho(clientId);
|
|
1049
|
+
const ids = clientId ? this.submissions.consume(clientId) : [];
|
|
1050
|
+
if (ids.length)
|
|
1051
|
+
this.opts.onAgentInputConsumed?.(ids);
|
|
1052
|
+
}
|
|
1053
|
+
// Only tool-like items become tool events; message/reasoning stream as text.
|
|
1054
|
+
if (!type || NON_TOOL_ITEMS.has(type))
|
|
1055
|
+
return;
|
|
1056
|
+
const id = stringField(item, 'id') ?? `item-${this.rpc.allocateId()}`;
|
|
1057
|
+
this.toolCalls.push({ id, name: type, input: item });
|
|
1058
|
+
this.emit({ type: 'tool-call', id, tool: type, input: item });
|
|
1059
|
+
}
|
|
1060
|
+
noteItemCompleted(params) {
|
|
1061
|
+
const item = params.item ?? {};
|
|
1062
|
+
const type = stringField(item, 'type');
|
|
1063
|
+
const id = stringField(item, 'id') ?? '';
|
|
1064
|
+
if (type === 'agentMessage') {
|
|
1065
|
+
if (this.isForeignThreadTurn(params))
|
|
1066
|
+
return;
|
|
1067
|
+
// One v1 `text` per finished message — the snapshot's full text when
|
|
1068
|
+
// present (also covers turns that send no deltas), else the deltas.
|
|
1069
|
+
this.textCoalescer.complete(id || undefined, typeof item.text === 'string' ? item.text : undefined);
|
|
1070
|
+
}
|
|
1071
|
+
else if (type && !NON_TOOL_ITEMS.has(type) && id) {
|
|
1072
|
+
this.emit({
|
|
1073
|
+
type: 'tool-result',
|
|
1074
|
+
toolCallId: id,
|
|
1075
|
+
result: safeStringify(item),
|
|
1076
|
+
isError: /error|failed/i.test(stringField(item, 'status') ?? ''),
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
noteTurnEnded(method, params) {
|
|
1081
|
+
if (this.isForeignThreadTurn(params))
|
|
1082
|
+
return; // don't end the parent turn on a child turn (#600)
|
|
1083
|
+
if (this.activeTurnId && turnIdOf(params) && turnIdOf(params) !== this.activeTurnId)
|
|
1084
|
+
return;
|
|
1085
|
+
if (this.isCurrentTurn(params))
|
|
1086
|
+
this.clearStreamRetry();
|
|
1087
|
+
this.expireApprovals('turn ended');
|
|
1088
|
+
this.turnBoundaryVersion += 1;
|
|
1089
|
+
this.pendingUserInput = undefined;
|
|
1090
|
+
this.activeTurnId = undefined;
|
|
1091
|
+
// An interrupted/failed item never sees item/completed — surface its
|
|
1092
|
+
// partial prose before the turn boundary (run.ts reads markers there).
|
|
1093
|
+
this.textCoalescer.flush();
|
|
1094
|
+
const outcome = codexTurnOutcome(method, params);
|
|
1095
|
+
const completedId = turnIdOf(params);
|
|
1096
|
+
if (completedId) {
|
|
1097
|
+
this.completedTurns.set(completedId, outcome.error === undefined);
|
|
1098
|
+
if (this.completedTurns.size > 32)
|
|
1099
|
+
this.completedTurns.delete(this.completedTurns.keys().next().value);
|
|
1100
|
+
}
|
|
1101
|
+
this.turnCompletions += 1;
|
|
1102
|
+
this.emitTurnEnd(outcome.error);
|
|
1103
|
+
}
|
|
1104
|
+
emitTurnEnd(error) {
|
|
1105
|
+
if (error !== undefined && !this.terminatedByCezar)
|
|
1106
|
+
this.emit({ type: 'error', message: error });
|
|
1107
|
+
this.agentInputReady = this.open;
|
|
1108
|
+
// A completed turn processed its own input; a failed one may never have reached the
|
|
1109
|
+
// model, so its input stays pending and is reported unconsumed below.
|
|
1110
|
+
const started = error === undefined ? [...this.turnStartSubmissions].flatMap(id => this.submissions.consume(id)) : [];
|
|
1111
|
+
this.turnStartSubmissions.clear();
|
|
1112
|
+
if (started.length)
|
|
1113
|
+
this.opts.onAgentInputConsumed?.(started);
|
|
1114
|
+
// An in-flight steer is owned by its RPC outcome, not by this boundary.
|
|
1115
|
+
const inFlight = this.inFlightSubmissionId ? this.submissions.consume(this.inFlightSubmissionId) : [];
|
|
1116
|
+
const unconsumedInputIds = this.submissions.takeUnconsumed();
|
|
1117
|
+
if (this.inFlightSubmissionId && inFlight.length)
|
|
1118
|
+
this.submissions.accept(this.inFlightSubmissionId, inFlight, '');
|
|
1119
|
+
this.emit(unconsumedInputIds.length ? { type: 'turn-end', unconsumedInputIds } : { type: 'turn-end' });
|
|
1120
|
+
if (this.unreadHumanSteers.size)
|
|
1121
|
+
this.restartUnreadHumanSteers();
|
|
1122
|
+
else
|
|
1123
|
+
this.scheduleAutoEnd();
|
|
1124
|
+
}
|
|
1125
|
+
emit(event) {
|
|
1126
|
+
this.onEvent?.(event);
|
|
1127
|
+
}
|
|
1128
|
+
/** The mapper never throws, but a defect in it must still never disturb
|
|
1129
|
+
* the v1 stream — hence the belt-and-braces try. */
|
|
1130
|
+
emitUi(map) {
|
|
1131
|
+
try {
|
|
1132
|
+
const mapped = map(this.uiState);
|
|
1133
|
+
this.uiState = mapped.state;
|
|
1134
|
+
if (this.opts.onUiEvent) {
|
|
1135
|
+
for (const event of mapped.events)
|
|
1136
|
+
this.opts.onUiEvent(event);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
catch {
|
|
1140
|
+
// v2 mapping is best-effort; v1 consumers stay unaffected.
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
// ---- helpers --------------------------------------------------------------
|
|
1145
|
+
/** Only model/tool output proves recovery; bookkeeping, user input and retry
|
|
1146
|
+
* chatter do not. Unknown notifications are deliberately not heartbeats. */
|
|
1147
|
+
function isStreamProgress(method, params) {
|
|
1148
|
+
if (STREAM_PROGRESS_DELTAS.has(method)) {
|
|
1149
|
+
return typeof params.delta === 'string' && params.delta.length > 0;
|
|
1150
|
+
}
|
|
1151
|
+
if (method !== 'item/started' && method !== 'item/completed')
|
|
1152
|
+
return false;
|
|
1153
|
+
const item = params.item;
|
|
1154
|
+
if (!item || typeof item !== 'object' || Array.isArray(item))
|
|
1155
|
+
return false;
|
|
1156
|
+
const record = item;
|
|
1157
|
+
return !!stringField(record, 'id') && !!stringField(record, 'type') && record.type !== 'userMessage';
|
|
1158
|
+
}
|
|
1159
|
+
const STREAM_PROGRESS_DELTAS = new Set([
|
|
1160
|
+
'item/agentMessage/delta', 'item/reasoning/textDelta', 'item/reasoning/summaryDelta',
|
|
1161
|
+
'item/reasoning/summaryTextDelta', 'item/commandExecution/outputDelta',
|
|
1162
|
+
]);
|
|
1163
|
+
function codexAskQuestions(value) {
|
|
1164
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > 4)
|
|
1165
|
+
return null;
|
|
1166
|
+
const questions = [];
|
|
1167
|
+
for (const raw of value) {
|
|
1168
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
1169
|
+
return null;
|
|
1170
|
+
const question = raw;
|
|
1171
|
+
if (question.isSecret === true)
|
|
1172
|
+
return null;
|
|
1173
|
+
const id = stringField(question, 'id');
|
|
1174
|
+
const header = stringField(question, 'header');
|
|
1175
|
+
const prompt = stringField(question, 'question');
|
|
1176
|
+
if (!id || !header || !prompt || !Array.isArray(question.options))
|
|
1177
|
+
return null;
|
|
1178
|
+
const options = question.options.map((option) => {
|
|
1179
|
+
if (!option || typeof option !== 'object' || Array.isArray(option))
|
|
1180
|
+
return null;
|
|
1181
|
+
const record = option;
|
|
1182
|
+
const label = stringField(record, 'label');
|
|
1183
|
+
const description = stringField(record, 'description');
|
|
1184
|
+
return label ? { label, ...(description ? { description } : {}) } : null;
|
|
1185
|
+
}).filter((option) => option !== null);
|
|
1186
|
+
questions.push({ id, header, question: prompt, options, multiSelect: false });
|
|
1187
|
+
}
|
|
1188
|
+
return parseAskRequest({ questions })?.questions ?? null;
|
|
1189
|
+
}
|
|
1190
|
+
function userInputAnswers(questions, text) {
|
|
1191
|
+
const lines = text.split(/\r?\n/);
|
|
1192
|
+
const hasStructuredAnswer = questions.some((question) => lines.some((line) => line.startsWith(`${question.header}:`)));
|
|
1193
|
+
const answers = {};
|
|
1194
|
+
for (const [index, question] of questions.entries()) {
|
|
1195
|
+
const prefix = `${question.header}:`;
|
|
1196
|
+
const matching = lines.find((line) => line.startsWith(prefix));
|
|
1197
|
+
const raw = matching?.slice(prefix.length).trim() ?? (!hasStructuredAnswer && index === 0 ? text.trim() : '');
|
|
1198
|
+
answers[question.id ?? String(index)] = {
|
|
1199
|
+
answers: raw === '' ? [] : raw.split(',').map((answer) => answer.trim()).filter(Boolean),
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
return answers;
|
|
1203
|
+
}
|
|
1204
|
+
/** ThreadItem `type`s that are conversation text, not tool activity. */
|
|
1205
|
+
const NON_TOOL_ITEMS = new Set(['agentMessage', 'userMessage', 'reasoning', 'plan']);
|
|
1206
|
+
/** Turn-lifecycle notification methods — the only frames whose child-thread copies must be
|
|
1207
|
+
* dropped so a sub-agent turn can't be mistaken for the parent's (#600). */
|
|
1208
|
+
const TURN_LIFECYCLE_METHODS = new Set(['turn/started', 'turn/completed', 'turn/failed']);
|
|
1209
|
+
const REASONING_SUMMARIES = new Set(['auto', 'concise', 'detailed', 'none']);
|
|
1210
|
+
/**
|
|
1211
|
+
* The reasoning-summary override sent on `turn/start` (TurnStartParams.summary).
|
|
1212
|
+
* Defaults to `auto` so reasoning is visible out of the box — without it the
|
|
1213
|
+
* app-server runs with its own default (no summary) and the reasoning thread
|
|
1214
|
+
* stays empty even when the model reasons. `CEZ_CODEX_REASONING` overrides the
|
|
1215
|
+
* default (`auto`/`concise`/`detailed`, or `none` to opt out); an unrecognized
|
|
1216
|
+
* value falls back to `auto`.
|
|
1217
|
+
*/
|
|
1218
|
+
export function reasoningSummary(env = process.env) {
|
|
1219
|
+
const raw = productEnv('CODEX_REASONING', env)?.trim().toLowerCase();
|
|
1220
|
+
if (!raw)
|
|
1221
|
+
return 'auto';
|
|
1222
|
+
return REASONING_SUMMARIES.has(raw) ? raw : 'auto';
|
|
1223
|
+
}
|
|
1224
|
+
/**
|
|
1225
|
+
* Fields sent on `turn/start` besides thread/input. `summary` is the existing
|
|
1226
|
+
* `CEZ_CODEX_REASONING` knob (out of scope for #45). `effort` is the per-run
|
|
1227
|
+
* pin — omitted when unset so the app-server keeps its default.
|
|
1228
|
+
*/
|
|
1229
|
+
export function codexTurnStartExtras(spec, env = process.env) {
|
|
1230
|
+
const effort = parseEffort(spec.effort);
|
|
1231
|
+
return {
|
|
1232
|
+
summary: reasoningSummary(env),
|
|
1233
|
+
...(effort ? { effort } : {}),
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
function textOf(content) {
|
|
1237
|
+
return content
|
|
1238
|
+
.filter((b) => b.type === 'text')
|
|
1239
|
+
.map((b) => b.text)
|
|
1240
|
+
.join('\n')
|
|
1241
|
+
.trim();
|
|
1242
|
+
}
|
|
1243
|
+
/** Drop undefined values so we never send `"model": null` to the server. */
|
|
1244
|
+
function clean(obj) {
|
|
1245
|
+
const out = {};
|
|
1246
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
1247
|
+
if (v !== undefined && v !== null)
|
|
1248
|
+
out[k] = v;
|
|
1249
|
+
}
|
|
1250
|
+
return out;
|
|
1251
|
+
}
|
|
1252
|
+
function threadIdOf(res) {
|
|
1253
|
+
const thread = res.thread;
|
|
1254
|
+
return typeof thread?.id === 'string' ? thread.id : stringField(res, 'threadId');
|
|
1255
|
+
}
|
|
1256
|
+
/** Cumulative tokens from a `thread/tokenUsage/updated` notification:
|
|
1257
|
+
* `params.tokenUsage.total.totalTokens`. */
|
|
1258
|
+
function tokenTotal(params) {
|
|
1259
|
+
const usage = params.tokenUsage;
|
|
1260
|
+
const total = usage?.total?.totalTokens;
|
|
1261
|
+
return typeof total === 'number' ? total : 0;
|
|
1262
|
+
}
|
|
1263
|
+
function safeStringify(value) {
|
|
1264
|
+
try {
|
|
1265
|
+
return JSON.stringify(value);
|
|
1266
|
+
}
|
|
1267
|
+
catch {
|
|
1268
|
+
return String(value);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
//# sourceMappingURL=codex-app-server-runner.js.map
|