tumwater 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -13
- package/dist/build-info.json +2 -2
- package/dist/src/agent/agent-args.js +8 -9
- package/dist/src/agent/agent-backend.js +8 -6
- package/dist/src/agent/backend-traits.js +42 -25
- package/dist/src/agent/claude/claude-account.js +71 -204
- package/dist/src/agent/claude/claude-args.js +9 -6
- package/dist/src/agent/claude/claude-backend.js +10 -10
- package/dist/src/agent/claude/claude-env.js +1 -1
- package/dist/src/agent/claude/claude-stream.js +4 -3
- package/dist/src/agent/claude/claude-write-guard.js +49 -0
- package/dist/src/agent/claude/write-guard-hook.js +13 -0
- package/dist/src/agent/codex/codex-account.js +119 -0
- package/dist/src/agent/codex/codex-args.js +181 -0
- package/dist/src/agent/codex/codex-backend.js +279 -0
- package/dist/src/agent/codex/codex-catalog.js +97 -0
- package/dist/src/agent/codex/codex-env.js +18 -0
- package/dist/src/agent/codex/codex-hook-trust.js +246 -0
- package/dist/src/agent/codex/codex-patch-paths.js +36 -0
- package/dist/src/agent/codex/codex-rollout.js +179 -0
- package/dist/src/agent/codex/codex-stream.js +402 -0
- package/dist/src/agent/codex/codex-write-guard.js +86 -0
- package/dist/src/agent/codex/write-guard-hook.js +12 -0
- package/dist/src/agent/image-input.js +29 -24
- package/dist/src/agent/notes-shim.js +11 -12
- package/dist/src/agent/opencode/opencode-args.js +0 -1
- package/dist/src/agent/opencode/opencode-backend.js +12 -9
- package/dist/src/agent/opencode/opencode-catalog.js +55 -29
- package/dist/src/agent/opencode/opencode-config.js +19 -14
- package/dist/src/agent/opencode/opencode-env.js +0 -1
- package/dist/src/agent/opencode/opencode-session-id.js +1 -2
- package/dist/src/agent/opencode/opencode-stream.js +1 -1
- package/dist/src/agent/opencode/write-guard-plugin/index.js +48 -0
- package/dist/src/agent/role-notes-write.js +5 -6
- package/dist/src/agent/run-agent.js +465 -448
- package/dist/src/agent/run-settle.js +214 -0
- package/dist/src/agent/session-ledger.js +86 -16
- package/dist/src/agent/subscription-account.js +220 -0
- package/dist/src/agent/write-guard.js +148 -0
- package/dist/src/backlog/backlog-archive.js +246 -55
- package/dist/src/backlog/backlog-cli-view.js +280 -0
- package/dist/src/backlog/backlog-cli.js +85 -274
- package/dist/src/backlog/backlog-commit.js +4 -5
- package/dist/src/backlog/backlog-eligibility.js +175 -242
- package/dist/src/backlog/backlog-index.js +149 -0
- package/dist/src/backlog/backlog-md.js +54 -6
- package/dist/src/backlog/backlog-parts.js +254 -0
- package/dist/src/backlog/backlog-release.js +117 -0
- package/dist/src/backlog/backlog-render.js +27 -0
- package/dist/src/backlog/backlog-structure.js +99 -156
- package/dist/src/backlog/backlog-write.js +40 -127
- package/dist/src/backlog/backlog.js +21 -6
- package/dist/src/backlog/question-answer.js +21 -15
- package/dist/src/baseline/main-baseline.js +89 -20
- package/dist/src/baseline/main-culprit.js +94 -0
- package/dist/src/baseline/main-guardrails.js +209 -0
- package/dist/src/baseline/main-red.js +139 -32
- package/dist/src/baseline/main-revert.js +133 -0
- package/dist/src/baseline/main-watch.js +184 -0
- package/dist/src/brief/brief-edit.js +9 -11
- package/dist/src/brief/brief.js +31 -51
- package/dist/src/budget/budget.js +30 -20
- package/dist/src/budget/fallback-breaker.js +26 -27
- package/dist/src/build/build-check-detect.js +23 -15
- package/dist/src/build/build-check-events.js +25 -6
- package/dist/src/build/build-check-report.js +49 -9
- package/dist/src/build/build-check-scoped.js +18 -11
- package/dist/src/build/build-check.js +2 -1
- package/dist/src/build/build-info.js +2 -3
- package/dist/src/build/build-stage.js +9 -14
- package/dist/src/build/dep-install.js +1 -2
- package/dist/src/change/change-data.js +123 -31
- package/dist/src/change/change-render.js +46 -5
- package/dist/src/cli/brief-command.js +3 -4
- package/dist/src/cli/cli-args.js +118 -33
- package/dist/src/cli/cli-command-args.js +46 -18
- package/dist/src/cli/cli-editor.js +2 -1
- package/dist/src/cli/cli-flag-specs.js +150 -45
- package/dist/src/cli/cli-init.js +51 -0
- package/dist/src/cli/cli-marker-commands.js +4 -4
- package/dist/src/cli/cli-query-commands.js +308 -590
- package/dist/src/cli/cli-repo-gate.js +11 -1
- package/dist/src/cli/cli-role-command.js +420 -0
- package/dist/src/cli/cli-start-summary.js +160 -0
- package/dist/src/cli/{cli-run.js → cli-start.js} +165 -237
- package/dist/src/cli/completion.js +149 -22
- package/dist/src/cli/config-commands.js +41 -18
- package/dist/src/cli/follow-view.js +75 -0
- package/dist/src/cli/help.js +189 -73
- package/dist/src/cli/log-commands.js +148 -82
- package/dist/src/cli/question-commands.js +205 -10
- package/dist/src/cli.js +106 -43
- package/dist/src/collections.js +26 -10
- package/dist/src/concurrency/check-permit.js +20 -3
- package/dist/src/concurrency/lock.js +17 -13
- package/dist/src/concurrency/provider-lease.js +44 -8
- package/dist/src/concurrency/semaphore.js +102 -26
- package/dist/src/config/config-aliases.js +0 -1
- package/dist/src/config/config-editable-keys.js +13 -1
- package/dist/src/config/config-fallbacks.js +93 -56
- package/dist/src/config/config-field-checks.js +40 -10
- package/dist/src/config/config-keys.js +30 -8
- package/dist/src/config/config-live.js +63 -24
- package/dist/src/config/config-request.js +137 -0
- package/dist/src/config/config-schema.js +31 -24
- package/dist/src/config/config-selector-checks.js +123 -0
- package/dist/src/config/config-validation-agents.js +80 -0
- package/dist/src/config/config-validation-model.js +116 -0
- package/dist/src/config/config-validation.js +141 -199
- package/dist/src/config/config-views.js +127 -53
- package/dist/src/config/config-write-core.js +135 -0
- package/dist/src/config/config-write.js +131 -264
- package/dist/src/config/config.js +48 -38
- package/dist/src/config/model-selector.js +34 -34
- package/dist/src/doctor/doctor-backlog-bugs.js +287 -0
- package/dist/src/doctor/doctor-backlog-plans.js +263 -0
- package/dist/src/doctor/doctor-backlog.js +100 -496
- package/dist/src/doctor/doctor-check-names.js +81 -0
- package/dist/src/doctor/doctor-checks.js +52 -579
- package/dist/src/doctor/doctor-claude-checks.js +145 -0
- package/dist/src/doctor/doctor-codex-checks.js +279 -0
- package/dist/src/doctor/doctor-contention-checks.js +380 -0
- package/dist/src/doctor/doctor-holds.js +82 -66
- package/dist/src/doctor/doctor-install.js +2 -1
- package/dist/src/doctor/doctor-model-checks.js +236 -402
- package/dist/src/doctor/doctor-notify.js +3 -4
- package/dist/src/doctor/doctor-opencode-checks.js +162 -0
- package/dist/src/doctor/doctor-orphans.js +182 -63
- package/dist/src/doctor/doctor-project-checks.js +303 -0
- package/dist/src/doctor/doctor.js +121 -77
- package/dist/src/doctor/image-probe.js +21 -8
- package/dist/src/doctor/outcome.js +3 -2
- package/dist/src/doctor/probe.js +7 -11
- package/dist/src/events/event-format.js +181 -86
- package/dist/src/events/event-labels.js +12 -5
- package/dist/src/events/event-legacy.js +39 -15
- package/dist/src/events/event-read.js +39 -39
- package/dist/src/events/event-tally.js +16 -0
- package/dist/src/events/event-window.js +60 -24
- package/dist/src/events/events.js +30 -13
- package/dist/src/events/notify.js +7 -7
- package/dist/src/failure/failure-cluster.js +12 -12
- package/dist/src/failure/failure-data.js +56 -56
- package/dist/src/failure/failure-render.js +31 -23
- package/dist/src/failure/failure-state-change.js +17 -12
- package/dist/src/failure/time-spend.js +99 -35
- package/dist/src/files/files.js +111 -35
- package/dist/src/files/json-files.js +3 -3
- package/dist/src/files/json-object.js +28 -7
- package/dist/src/files/stat-cache.js +2 -2
- package/dist/src/files/tail.js +1 -1
- package/dist/src/gates/bootstrap-gates.js +4 -5
- package/dist/src/gates/budget-gates.js +177 -84
- package/dist/src/gates/disk-gate.js +1 -1
- package/dist/src/gates/gate-polls.js +108 -58
- package/dist/src/gates/maintenance-quota.js +10 -13
- package/dist/src/gates/pause-gates.js +28 -10
- package/dist/src/gates/readiness.js +7 -3
- package/dist/src/gates/role-cap-gates.js +8 -8
- package/dist/src/gates/startup-gate.js +94 -32
- package/dist/src/gates/streak-gate.js +54 -30
- package/dist/src/git/commit-message.js +77 -46
- package/dist/src/git/git-diff.js +16 -10
- package/dist/src/git/git-run.js +79 -38
- package/dist/src/git/git.js +36 -34
- package/dist/src/git/slot-salvage.js +253 -0
- package/dist/src/git/slots-state.js +6 -6
- package/dist/src/git/worktree-pool.js +132 -38
- package/dist/src/git/worktree-use.js +4 -11
- package/dist/src/git/worktree.js +94 -37
- package/dist/src/gui/gui-admin-endpoints.js +96 -0
- package/dist/src/gui/gui-args.js +79 -8
- package/dist/src/gui/gui-backlog-commands.js +42 -18
- package/dist/src/gui/gui-backlog-endpoints.js +155 -0
- package/dist/src/gui/gui-command.js +8 -13
- package/dist/src/gui/gui-config-commands.js +94 -72
- package/dist/src/gui/gui-endpoint-commands.js +4 -3
- package/dist/src/gui/gui-endpoint-common.js +4 -4
- package/dist/src/gui/gui-endpoints.js +11 -380
- package/dist/src/gui/gui-history-endpoints.js +301 -0
- package/dist/src/gui/gui-operator-commands.js +108 -13
- package/dist/src/gui/gui-prompt-commands.js +11 -14
- package/dist/src/gui/gui-report-endpoints.js +90 -0
- package/dist/src/gui/gui-server.js +11 -4
- package/dist/src/gui/gui-team-commands.js +7 -7
- package/dist/src/gui/http-body.js +1 -1
- package/dist/src/history/history-data.js +122 -234
- package/dist/src/history/history-queued.js +147 -0
- package/dist/src/history/history-render.js +42 -22
- package/dist/src/history/history.js +193 -49
- package/dist/src/inbox/inbox-attachments.js +29 -30
- package/dist/src/inbox/inbox-cancel.js +10 -11
- package/dist/src/inbox/inbox-edit.js +9 -9
- package/dist/src/inbox/inbox-submit.js +18 -18
- package/dist/src/inbox/inbox-top.js +25 -9
- package/dist/src/inbox/inbox.js +42 -43
- package/dist/src/inbox/pending-prompt.js +26 -26
- package/dist/src/inbox/prompt-commands.js +62 -49
- package/dist/src/inbox/prompt-not-before.js +2 -2
- package/dist/src/init/init-templates.js +1 -2
- package/dist/src/init/init.js +28 -23
- package/dist/src/merge/backlog-conflicts.js +215 -35
- package/dist/src/merge/merge-batch.js +14 -8
- package/dist/src/merge/merge-cancel.js +53 -0
- package/dist/src/merge/merge-check-failures.js +44 -22
- package/dist/src/merge/merge-core.js +81 -32
- package/dist/src/merge/merge-diff.js +5 -4
- package/dist/src/merge/merge-drain.js +150 -11
- package/dist/src/merge/merge-git.js +177 -38
- package/dist/src/merge/merge-pipeline.js +15 -3
- package/dist/src/merge/merge-post-review.js +90 -0
- package/dist/src/merge/merge-queue-render.js +49 -11
- package/dist/src/merge/merge-queue.js +31 -15
- package/dist/src/merge/merge-requeue.js +102 -0
- package/dist/src/merge/merge-slot.js +61 -16
- package/dist/src/merge/merge-stack.js +33 -11
- package/dist/src/merge/merge-to-main.js +86 -27
- package/dist/src/merge/merge-top.js +69 -0
- package/dist/src/merge/merge-verify.js +12 -10
- package/dist/src/notes-cli.js +30 -15
- package/dist/src/operator/operator-commands.js +192 -81
- package/dist/src/operator/operator-intent.js +69 -42
- package/dist/src/operator/operator-requests.js +35 -40
- package/dist/src/operator/retire.js +5 -6
- package/dist/src/operator/revert.js +142 -34
- package/dist/src/orchestrator/orchestrator-launch.js +60 -52
- package/dist/src/orchestrator/orchestrator-poll.js +320 -0
- package/dist/src/orchestrator/orchestrator-scheduling.js +68 -369
- package/dist/src/orchestrator/orchestrator.js +128 -369
- package/dist/src/orchestrator/retention.js +42 -8
- package/dist/src/orchestrator/scheduling-admit.js +116 -0
- package/dist/src/orchestrator/scheduling-scope.js +201 -0
- package/dist/src/orchestrator/scheduling-skip.js +185 -0
- package/dist/src/orchestrator/startup-migration-steps.js +8 -7
- package/dist/src/orchestrator/startup-migrations.js +11 -7
- package/dist/src/paths.js +116 -49
- package/dist/src/pi/command-shape.js +12 -1
- package/dist/src/pi/pi-args.js +6 -4
- package/dist/src/pi/pi-backend.js +6 -6
- package/dist/src/pi/pi-bin.js +54 -63
- package/dist/src/pi/pi-listed-models.js +53 -0
- package/dist/src/pi/pi-models.js +63 -30
- package/dist/src/pi/pi-run-result.js +1 -1
- package/dist/src/pi/pi-settings.js +1 -1
- package/dist/src/pi/pi-stream.js +6 -6
- package/dist/src/pi/pi-watchdogs.js +18 -19
- package/dist/src/pi-extension/bounded-output.js +5 -3
- package/dist/src/pi-extension/context-budget.js +2 -2
- package/dist/src/pi-extension/context-shake.js +1 -1
- package/dist/src/pi-extension/context-window.js +0 -1
- package/dist/src/pi-extension/full-output.js +3 -10
- package/dist/src/pi-extension/strip-thinking.js +0 -1
- package/dist/src/pi-extension/trim-system-prompt.js +3 -4
- package/dist/src/pi-extension/write-guard.js +37 -0
- package/dist/src/process/launch-services.js +1 -2
- package/dist/src/process/node-bin.js +16 -0
- package/dist/src/process/process-group.js +8 -18
- package/dist/src/process/process.js +41 -2
- package/dist/src/process/run-marker.js +18 -6
- package/dist/src/process/supervisor.js +22 -21
- package/dist/src/prompt/dialect.js +17 -2
- package/dist/src/prompt/gate-notes.js +203 -0
- package/dist/src/prompt/gate-prompts.js +121 -211
- package/dist/src/prompt/notes-backlog.js +181 -0
- package/dist/src/prompt/principles.js +1 -2
- package/dist/src/prompt/prompt-followup.js +19 -14
- package/dist/src/prompt/prompt.js +129 -204
- package/dist/src/redeploy/redeploy-policy.js +24 -19
- package/dist/src/redeploy/redeploy-probes.js +1 -1
- package/dist/src/redeploy/redeploy.js +2 -3
- package/dist/src/redeploy/redeployer.js +20 -20
- package/dist/src/redeploy/self-reload.js +2 -1
- package/dist/src/report/report-data.js +161 -77
- package/dist/src/report/report-fold.js +129 -52
- package/dist/src/report/report-main-red.js +55 -0
- package/dist/src/report/report-render.js +133 -64
- package/dist/src/report/report-types.js +1 -0
- package/dist/src/report/report.js +26 -9
- package/dist/src/request-timeouts.js +2 -2
- package/dist/src/review/known-flakes.js +100 -1
- package/dist/src/review/post-merge-review.js +106 -0
- package/dist/src/review/protected-edits.js +4 -5
- package/dist/src/review/review-followup.js +8 -8
- package/dist/src/review/review-precheck.js +66 -23
- package/dist/src/review/review-run.js +395 -0
- package/dist/src/review/review-verdict.js +2 -2
- package/dist/src/review/review.js +155 -360
- package/dist/src/review/secret-leaks.js +36 -16
- package/dist/src/review/suite-rerun.js +0 -1
- package/dist/src/roles/legacy-role-migration.js +80 -7
- package/dist/src/roles/role-catalog.js +69 -12
- package/dist/src/roles/role-guidance.js +55 -20
- package/dist/src/roles/role-labels.js +1 -2
- package/dist/src/roles/role-render.js +67 -50
- package/dist/src/roles/role-view.js +59 -47
- package/dist/src/roles/roles.js +31 -31
- package/dist/src/roles/runner-ids.js +97 -0
- package/dist/src/run/acceptance-greps.js +119 -0
- package/dist/src/run/feedback-filings.js +51 -0
- package/dist/src/{tick → run}/qa-coverage.js +9 -27
- package/dist/src/{tick/tick-apply.js → run/run-apply.js} +95 -94
- package/dist/src/run/run-detail-data.js +179 -0
- package/dist/src/run/run-detail-render.js +98 -0
- package/dist/src/run/run-detail.js +168 -0
- package/dist/src/{tick/tick-finalize.js → run/run-finalize.js} +72 -60
- package/dist/src/{tick/tick-outcome.js → run/run-outcome.js} +6 -7
- package/dist/src/{tick/tick-prompt.js → run/run-prompt.js} +108 -73
- package/dist/src/{tick/tick-resume.js → run/run-resume.js} +55 -26
- package/dist/src/{tick/tick-stage.js → run/run-stage.js} +108 -50
- package/dist/src/{tick/tick-timing.js → run/run-timing.js} +43 -41
- package/dist/src/{tick/tick-usage.js → run/run-usage.js} +45 -37
- package/dist/src/{tick/tick-verdict.js → run/run-verdict.js} +91 -56
- package/dist/src/run/selfcheck-digest.js +40 -0
- package/dist/src/run/stage-backlog-checks.js +249 -0
- package/dist/src/run/stage-check.js +172 -0
- package/dist/src/run/stage-path-checks.js +730 -0
- package/dist/src/{loop → runner}/leftover.js +80 -25
- package/dist/src/{loop → runner}/model-fallback.js +12 -12
- package/dist/src/runner/revision.js +202 -0
- package/dist/src/{loop/loop-fallback.js → runner/runner-fallback.js} +8 -8
- package/dist/src/runner/runner-outcome.js +107 -0
- package/dist/src/{loop/loop-pi.js → runner/runner-pi.js} +140 -131
- package/dist/src/{loop/loop-recovery.js → runner/runner-recovery.js} +21 -15
- package/dist/src/{loop/loop-tick.js → runner/runner-run.js} +218 -240
- package/dist/src/{loop/loop-state.js → runner/runner-state-load.js} +61 -114
- package/dist/src/runner/runner-state.js +102 -0
- package/dist/src/{loop/loop.js → runner/runner.js} +123 -120
- package/dist/src/scheduling/backoff.js +38 -38
- package/dist/src/scheduling/claims.js +35 -22
- package/dist/src/scheduling/once-round.js +22 -22
- package/dist/src/scheduling/quiet-hours.js +5 -6
- package/dist/src/scheduling/scheduling.js +74 -64
- package/dist/src/scheduling/work-merged-cache.js +2 -2
- package/dist/src/status/status-budget.js +55 -47
- package/dist/src/status/status-data.js +43 -16
- package/dist/src/status/status-inbox.js +2 -2
- package/dist/src/status/status-install.js +0 -1
- package/dist/src/status/status-polls.js +28 -28
- package/dist/src/status/status-roles.js +39 -13
- package/dist/src/team/error-storm.js +8 -8
- package/dist/src/team/failure-spread.js +2 -2
- package/dist/src/team/orchestrator-info.js +15 -9
- package/dist/src/team/reclaim.js +5 -6
- package/dist/src/team/team-hold.js +7 -7
- package/dist/src/team/team-polls.js +91 -50
- package/dist/src/team/team-state.js +8 -2
- package/dist/src/text/datetime.js +63 -17
- package/dist/src/text/format.js +48 -11
- package/dist/src/text/markdown.js +8 -5
- package/dist/src/text/phrases.js +57 -23
- package/dist/src/text/suggest.js +1 -1
- package/dist/src/text/text.js +67 -13
- package/dist/src/ui/badges.js +65 -37
- package/dist/src/ui/gui/gui-client-backlog.js +292 -0
- package/dist/src/ui/gui/gui-client-boot.js +32 -26
- package/dist/src/ui/gui/gui-client-composer.js +8 -9
- package/dist/src/ui/gui/gui-client-drawer-config.js +212 -0
- package/dist/src/ui/gui/gui-client-drawer.js +126 -285
- package/dist/src/ui/gui/gui-client-feed.js +271 -0
- package/dist/src/ui/gui/gui-client-history.js +434 -67
- package/dist/src/ui/gui/gui-client-labels.js +1 -2
- package/dist/src/ui/gui/gui-client-markdown.js +1 -2
- package/dist/src/ui/gui/gui-client-model.js +27 -36
- package/dist/src/ui/gui/gui-client-operator.js +55 -51
- package/dist/src/ui/gui/gui-client-pending.js +227 -23
- package/dist/src/ui/gui/gui-client-report-chart.js +464 -0
- package/dist/src/ui/gui/gui-client-report.js +87 -427
- package/dist/src/ui/gui/{gui-client-loops.js → gui-client-roles.js} +43 -44
- package/dist/src/ui/gui/gui-client-settings.js +56 -4
- package/dist/src/ui/gui/gui-client-team.js +25 -465
- package/dist/src/ui/gui/gui-client.js +27 -25
- package/dist/src/ui/gui/gui-icons.js +0 -2
- package/dist/src/ui/gui/gui-page.js +9 -7
- package/dist/src/ui/gui/gui-styles.js +34 -34
- package/dist/src/ui/progress-data.js +9 -11
- package/dist/src/ui/{tick-progress-model.js → run-progress-model.js} +31 -31
- package/dist/src/ui/status-model.js +133 -125
- package/dist/src/ui/status-payload.js +136 -49
- package/dist/src/ui/status-render.js +101 -82
- package/dist/src/ui/team-alerts.js +248 -57
- package/dist/src/ui/tone.js +5 -6
- package/dist/src/ui/transcript-run.js +58 -0
- package/dist/src/ui/transcript-tail.js +28 -20
- package/dist/src/ui/transcript.js +63 -23
- package/dist/src/ui/tui/tui-app.js +0 -1
- package/dist/src/ui/tui/tui-backlog.js +51 -14
- package/dist/src/ui/tui/tui-editor-answer.js +27 -31
- package/dist/src/ui/tui/tui-editor-attach.js +3 -5
- package/dist/src/ui/tui/tui-editor-backends.js +132 -0
- package/dist/src/ui/tui/tui-editor-brief.js +10 -12
- package/dist/src/ui/tui/tui-editor-budget.js +35 -31
- package/dist/src/ui/tui/tui-editor-claude-reserve.js +24 -0
- package/dist/src/ui/tui/tui-editor-concurrency.js +24 -0
- package/dist/src/ui/tui/tui-editor-config.js +86 -0
- package/dist/src/ui/tui/tui-editor-entry.js +36 -47
- package/dist/src/ui/tui/tui-editor-fallback.js +31 -0
- package/dist/src/ui/tui/tui-editor-instances.js +37 -0
- package/dist/src/ui/tui/tui-editor-instructions.js +136 -0
- package/dist/src/ui/tui/tui-editor-interval.js +11 -9
- package/dist/src/ui/tui/tui-editor-model.js +29 -0
- package/dist/src/ui/tui/tui-editor-notes.js +3 -5
- package/dist/src/ui/tui/tui-editor-notify.js +25 -0
- package/dist/src/ui/tui/tui-editor-pause.js +48 -59
- package/dist/src/ui/tui/tui-editor-prompt.js +11 -16
- package/dist/src/ui/tui/tui-editor-provider-caps.js +27 -0
- package/dist/src/ui/tui/tui-editor-queued.js +5 -9
- package/dist/src/ui/tui/tui-editor-quiet.js +99 -35
- package/dist/src/ui/tui/tui-editor-retire.js +4 -6
- package/dist/src/ui/tui/tui-editor-role-key.js +76 -0
- package/dist/src/ui/tui/tui-editor-role-model.js +28 -0
- package/dist/src/ui/tui/tui-editor-search.js +45 -33
- package/dist/src/ui/tui/tui-editor-session.js +60 -34
- package/dist/src/ui/tui/tui-editor-slots.js +23 -0
- package/dist/src/ui/tui/tui-editors.js +35 -2
- package/dist/src/ui/tui/tui-frame.js +56 -11
- package/dist/src/ui/tui/tui-history.js +8 -9
- package/dist/src/ui/tui/tui-input.js +13 -11
- package/dist/src/ui/tui/tui-keymap.js +0 -1
- package/dist/src/ui/tui/tui-keys.js +24 -9
- package/dist/src/ui/tui/tui-pane-activity.js +14 -11
- package/dist/src/ui/tui/tui-pane-backlog.js +171 -126
- package/dist/src/ui/tui/tui-pane-brief.js +0 -1
- package/dist/src/ui/tui/tui-pane-ctx.js +2 -2
- package/dist/src/ui/tui/tui-pane-health.js +58 -8
- package/dist/src/ui/tui/tui-pane-history.js +402 -82
- package/dist/src/ui/tui/tui-pane-pending.js +308 -13
- package/dist/src/ui/tui/tui-pane-queued.js +71 -55
- package/dist/src/ui/tui/tui-pane-report.js +46 -14
- package/dist/src/ui/tui/tui-pane-session.js +25 -6
- package/dist/src/ui/tui/tui-pane-transcript.js +111 -37
- package/dist/src/ui/tui/tui-pane.js +80 -23
- package/dist/src/ui/tui/tui-panes.js +100 -30
- package/dist/src/ui/tui/tui.js +14 -14
- package/dist/src/verdict/fix-claim.js +82 -32
- package/dist/src/verdict/no-change.js +4 -4
- package/dist/src/verdict/refusal.js +40 -16
- package/dist/src/verdict/reply-contract.js +42 -31
- package/dist/src/version.js +0 -1
- package/package.json +2 -1
- package/dist/src/loop/revision.js +0 -70
- package/dist/src/roles/loop-ids.js +0 -77
- package/dist/src/tick/stage-check.js +0 -419
- package/dist/src/tick/telemetry-digest.js +0 -25
- package/dist/src/tick/tick-detail-data.js +0 -108
- package/dist/src/tick/tick-detail.js +0 -163
- package/dist/src/ui/gui/gui-client-sound.js +0 -53
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { HOUR_MS, DAY_MS } from "../text/datetime.js";
|
|
1
2
|
/** Self-redeploy for a self-hosting team (see build/build-info.ts for why): when main's build
|
|
2
3
|
* inputs have moved past the running build, verify that main is green, compile it into a staging
|
|
3
|
-
* dir, drain the team (no new
|
|
4
|
+
* dir, drain the team (no new runs; in-flight ones finish or are aborted resumably after
|
|
4
5
|
* RESTART_DRAIN_MAX_MS), swap the compiled tree into dist/, and ask the supervisor
|
|
5
6
|
* (src/process/supervisor.ts) to respawn the harness onto it by exiting RESTART_EXIT_CODE. Every
|
|
6
7
|
* step is non-blocking from the orchestrator's poll: the green check and the compile run in the
|
|
@@ -24,38 +25,42 @@
|
|
|
24
25
|
* BuildStatus.restartBlocked, which the dashboards and doctor render — because a stale build that
|
|
25
26
|
* is about to be replaced and one that never will be look identical otherwise (BUGS.md
|
|
26
27
|
* 2026-09-08). A green, compiled build can still be unable to START here — the environment, not
|
|
27
|
-
* the code, fails `tumwater
|
|
28
|
+
* the code, fails `tumwater start`'s startup gate — so that gate is asked before the team is held
|
|
28
29
|
* and again right before the swap, and a failure refuses the restart with a `restart_refused`
|
|
29
30
|
* event instead of trading a running team for a child that exits on its first line (BUGS.md
|
|
30
|
-
* 2026-09-23). Every
|
|
31
|
+
* 2026-09-23). Every run a restart interrupts resumes on the new build through the same resume
|
|
31
32
|
* machinery a Ctrl+C uses, so a restart loses no work. */
|
|
32
|
-
/** The exit code a supervised `tumwater
|
|
33
|
+
/** The exit code a supervised `tumwater start` child uses to say "rebuilt; respawn me" —
|
|
33
34
|
* EX_TEMPFAIL, distinct from success (0), fail() (1) and a forced Ctrl+C (130). */
|
|
34
35
|
export const RESTART_EXIT_CODE = 75;
|
|
35
|
-
/** The COLD-START drain window: how long a pending restart waits for in-flight ROLE
|
|
36
|
-
* aborting them (they resume on the new build) when the orchestrator has too few completed-
|
|
36
|
+
/** The COLD-START drain window: how long a pending restart waits for in-flight ROLE runs before
|
|
37
|
+
* aborting them (they resume on the new build) when the orchestrator has too few completed-run
|
|
37
38
|
* samples to derive one. Measured across the whole unbroken hold, not per head — see
|
|
38
|
-
* Redeployer.drainSince. Director
|
|
39
|
+
* Redeployer.drainSince. Director runs are exempt: an in-flight human prompt extends the hold
|
|
39
40
|
* without any cap (see poll).
|
|
40
41
|
*
|
|
41
|
-
* The live window tracks the team's real
|
|
42
|
-
* completed work-bearing role
|
|
42
|
+
* The live window tracks the team's real run duration: the orchestrator passes the p75 of recent
|
|
43
|
+
* completed work-bearing role runs (InFlightCounts.roleRunP75Ms) and poll uses it in place of
|
|
43
44
|
* this constant once it has enough samples (BUGS.md 2026-09-18). The hand-set 30 minutes had not
|
|
44
45
|
* been re-derived since an earlier backend; measured p50 was 46 min and p75 82 min, so the drain
|
|
45
|
-
* timed out on 60% of
|
|
46
|
+
* timed out on 60% of runs — paying the full idle cost of waiting plus the interruption cost of
|
|
46
47
|
* not waiting. */
|
|
47
48
|
export const RESTART_DRAIN_MAX_MS = 30 * 60_000;
|
|
48
49
|
/** How often a COMPLETED auto-restart may land — at most once per this window (BUGS.md
|
|
49
50
|
* 2026-09-11): under sustained main churn every stale head would otherwise drive a full
|
|
50
51
|
* hold+drain+swap episode back to back, halting the team for a drain over and over. Bounds
|
|
51
|
-
* frequency across episodes; RESTART_DRAIN_MAX_MS bounds the drain within one.
|
|
52
|
-
|
|
52
|
+
* frequency across episodes; RESTART_DRAIN_MAX_MS bounds the drain within one. Cut from twelve
|
|
53
|
+
* hours to four on 2026-10-20: the last eight drains took a median of about 7 min (2 s to
|
|
54
|
+
* 26 min) and only one aborted runs, so the longer wait cost more than the drains it prevented. */
|
|
55
|
+
export const RESTART_COOLDOWN_MS = 4 * HOUR_MS;
|
|
56
|
+
/** The cooldown in whole hours — the one home of that ms→h division, for the warning text. */
|
|
57
|
+
export const RESTART_COOLDOWN_HOURS = RESTART_COOLDOWN_MS / HOUR_MS;
|
|
53
58
|
/** The cooldown's urgency carve-out (BUGS.md 2026-09-30): when the RUNNING build's own commit
|
|
54
|
-
* carries a red baseline verdict, the deferral is cut to this window instead of the
|
|
55
|
-
* a red running build is not churn but the exact predicament the self-redeploy exists
|
|
56
|
-
* and the rate limit protects against storms, not against a team knowingly executing
|
|
57
|
-
* own tree fails. Still a real delay, so consecutive reds cannot storm: one episode
|
|
58
|
-
* window at most, each swap giving the team a chance to merge on green. */
|
|
59
|
+
* carries a red baseline verdict, the deferral is cut to this window instead of the ordinary
|
|
60
|
+
* cooldown — a red running build is not churn but the exact predicament the self-redeploy exists
|
|
61
|
+
* to end, and the rate limit protects against storms, not against a team knowingly executing
|
|
62
|
+
* code its own tree fails. Still a real delay, so consecutive reds cannot storm: one episode
|
|
63
|
+
* per this window at most, each swap giving the team a chance to merge on green. */
|
|
59
64
|
export const RESTART_URGENT_COOLDOWN_MS = 15 * 60_000;
|
|
60
65
|
/** The urgent carve-out in whole minutes — the one home of that ms→min division, beside the
|
|
61
66
|
* constant it derives from, so the three redeployer.ts warnings that restate the length in
|
|
@@ -66,6 +71,6 @@ export const RESTART_URGENT_COOLDOWN_MIN = RESTART_URGENT_COOLDOWN_MS / 60_000;
|
|
|
66
71
|
* different commit, so the aggregate — hours pinned on a stale build while every rebuild dies —
|
|
67
72
|
* raised no alarm anywhere the operator reads. One warning at this age, then at most one per
|
|
68
73
|
* STALE_ESCALATE_EVERY_MS for as long as the episode lasts. */
|
|
69
|
-
export const STALE_ESCALATE_AFTER_MS = 6 *
|
|
74
|
+
export const STALE_ESCALATE_AFTER_MS = 6 * HOUR_MS;
|
|
70
75
|
/** The sustained-pin warning's repeat cadence: daily, not per poll and not per head. */
|
|
71
|
-
export const STALE_ESCALATE_EVERY_MS =
|
|
76
|
+
export const STALE_ESCALATE_EVERY_MS = DAY_MS;
|
|
@@ -31,7 +31,7 @@ export class PrewarmProbes {
|
|
|
31
31
|
}
|
|
32
32
|
/** Run the deferred head's green check, then its staged compile, once per SHA — the same
|
|
33
33
|
* effects the episode itself runs, so their cost lands inside the dead window instead of
|
|
34
|
-
* stretching it; the
|
|
34
|
+
* stretching it; the restart rate limit keeps protecting against churn, and this keeps it from
|
|
35
35
|
* also idling away verification work a known-stale build owes. */
|
|
36
36
|
prewarm(head, pending) {
|
|
37
37
|
if (pending)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// vocabulary: plain
|
|
2
1
|
import { buildStaleness, distDir, isSelfHosted, readBuildInfo } from "../build/build-info.js";
|
|
3
2
|
import { TUMWATER_SOURCE } from "../events/events.js";
|
|
4
3
|
import { baselineCheckEventLogger } from "../build/build-check-events.js";
|
|
@@ -15,7 +14,7 @@ import { Redeployer, bestEffortLog } from "./redeployer.js";
|
|
|
15
14
|
* production RedeployDeps bound to one repo — the mirror worktree both the green check and the
|
|
16
15
|
* compile run in, the baseline check that reads the live config per call, the staged compile,
|
|
17
16
|
* and the dist swap — plus the completed-restart record's small state file and the
|
|
18
|
-
* createRedeployer composition the run boot (cli/cli-
|
|
17
|
+
* createRedeployer composition the run boot (cli/cli-start.ts) builds. */
|
|
19
18
|
/** The production AutoRestartRecord: one JSON file under .tumwater/state/. A missing or torn
|
|
20
19
|
* file reads as "no completed restart yet" — the same no-data policy as every other state
|
|
21
20
|
* reader. */
|
|
@@ -78,7 +77,7 @@ export function redeployDeps(root, build, log, bootProblem) {
|
|
|
78
77
|
/** The production Redeployer for `root`, or null when the running dist carries no build stamp
|
|
79
78
|
* (compiled with a bare tsc): then provenance is unknown and there is nothing to compare. */
|
|
80
79
|
export async function createRedeployer(root, log,
|
|
81
|
-
/** The successor's startup gate (RedeployDeps.bootProblem) — cli/cli-
|
|
80
|
+
/** The successor's startup gate (RedeployDeps.bootProblem) — cli/cli-start.ts binds
|
|
82
81
|
* runStartupProblem to the invocation's own flags, the ones the supervisor forwards to every
|
|
83
82
|
* generation. */
|
|
84
83
|
bootProblem) {
|
|
@@ -2,7 +2,7 @@ import { TUMWATER_SOURCE } from "../events/events.js";
|
|
|
2
2
|
import { errorMessage, stripTerminalControls } from "../text/text.js";
|
|
3
3
|
import { shortSha } from "../text/format.js";
|
|
4
4
|
import { mainRedPhrase } from "../text/phrases.js";
|
|
5
|
-
import { RESTART_COOLDOWN_MS, RESTART_DRAIN_MAX_MS, RESTART_URGENT_COOLDOWN_MIN, RESTART_URGENT_COOLDOWN_MS, STALE_ESCALATE_AFTER_MS, STALE_ESCALATE_EVERY_MS, } from "./redeploy-policy.js";
|
|
5
|
+
import { RESTART_COOLDOWN_HOURS, RESTART_COOLDOWN_MS, RESTART_DRAIN_MAX_MS, RESTART_URGENT_COOLDOWN_MIN, RESTART_URGENT_COOLDOWN_MS, STALE_ESCALATE_AFTER_MS, STALE_ESCALATE_EVERY_MS, } from "./redeploy-policy.js";
|
|
6
6
|
import { PrewarmProbes, track } from "./redeploy-probes.js";
|
|
7
7
|
/** Wrap the event sink so an unwritable feed cannot throw out of the redeploy state machine.
|
|
8
8
|
* `poll` runs inside the orchestrator's catch-less poll loop and `forceRestart` inside the
|
|
@@ -29,7 +29,7 @@ export function bestEffortLog(log) {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
/** The redeploy state machine — one per orchestrator process. `poll` is called every scheduler
|
|
32
|
-
* cycle with main's current head and how many role/director
|
|
32
|
+
* cycle with main's current head and how many role/director runs are in flight, and returns what
|
|
33
33
|
* to do; it never throws and never awaits anything slower than a git query. */
|
|
34
34
|
export class Redeployer {
|
|
35
35
|
build;
|
|
@@ -44,12 +44,12 @@ export class Redeployer {
|
|
|
44
44
|
/** When the team's current unbroken hold began — 0 when it is not being held. The drain
|
|
45
45
|
* deadline is measured from here and NOT from when the current head became pending: a busy
|
|
46
46
|
* self-hosting team merges while it drains, and giving each new head its own full window
|
|
47
|
-
* handed the same in-flight
|
|
47
|
+
* handed the same in-flight runs another 30 minutes every time main moved. On 2026-09-08 that
|
|
48
48
|
* held the team for 38 minutes under a 30-minute cap and reported the last 30 (BUGS.md).
|
|
49
|
-
* Nothing new starts during a hold, so the
|
|
49
|
+
* Nothing new starts during a hold, so the runs a drain waits on can only be the ones it
|
|
50
50
|
* began with — one window is all they are owed. */
|
|
51
51
|
drainSince = 0;
|
|
52
|
-
/** The drain window captured when the current hold began: the team's observed p75
|
|
52
|
+
/** The drain window captured when the current hold began: the team's observed p75 run
|
|
53
53
|
* duration when the orchestrator has enough samples, else the cold-start RESTART_DRAIN_MAX_MS.
|
|
54
54
|
* Captured once per unbroken hold so a sample change mid-episode cannot move a deadline that
|
|
55
55
|
* is already running (see drainSince). */
|
|
@@ -106,7 +106,7 @@ export class Redeployer {
|
|
|
106
106
|
cooldownWarnedUntil = null;
|
|
107
107
|
/** The ordinary cooldown deadline whose urgent lapse has already warned: when the red-carved
|
|
108
108
|
* deadline sits in the past, the deferred-branch warning above cannot fire, and the episode
|
|
109
|
-
* would otherwise start with no event naming why the announced
|
|
109
|
+
* would otherwise start with no event naming why the announced deadline was abandoned
|
|
110
110
|
* (BUGS.md 2026-09-30). Keyed to the ordinary deadline — one warning per cooldown, the same
|
|
111
111
|
* discipline as cooldownWarnedUntil. */
|
|
112
112
|
urgentLapseWarnedFor = null;
|
|
@@ -147,7 +147,7 @@ export class Redeployer {
|
|
|
147
147
|
* respect to this main, and poll is a no-op (see isSelfHosted). */
|
|
148
148
|
selfHosted, deps, log,
|
|
149
149
|
/** Cold-start drain window (default RESTART_DRAIN_MAX_MS): the fallback poll uses until the
|
|
150
|
-
* orchestrator supplies enough observed
|
|
150
|
+
* orchestrator supplies enough observed run durations; a test seam. */
|
|
151
151
|
drainMaxMs = RESTART_DRAIN_MAX_MS,
|
|
152
152
|
/** The completed-auto-restart record (see AutoRestartRecord) — production reads it from its
|
|
153
153
|
* state file at construction via autoRestartRecord(root), tests inject one. */
|
|
@@ -171,14 +171,14 @@ export class Redeployer {
|
|
|
171
171
|
s.checkedHead = this.lastHead;
|
|
172
172
|
// Why a stale build is still the one running. Staleness alone cannot say: a restart that
|
|
173
173
|
// is minutes away and one that was refused hours ago look identical, and on 2026-09-08
|
|
174
|
-
// that gap is what let a blocked restart sit unnoticed while the team
|
|
174
|
+
// that gap is what let a blocked restart sit unnoticed while the team ran on stale
|
|
175
175
|
// code (BUGS.md). Mutually exclusive by construction — block() clears the pending head,
|
|
176
176
|
// and an episode cannot start inside the cooldown, so no two branches can hold at once.
|
|
177
177
|
if (this.pendingHead === this.lastHead)
|
|
178
178
|
s.restartPending = true;
|
|
179
179
|
else if (this.blockedHead === this.lastHead && this.blockedReason)
|
|
180
180
|
s.restartBlocked = this.blockedReason;
|
|
181
|
-
// Inside the post-restart cooldown the team deliberately keeps
|
|
181
|
+
// Inside the post-restart cooldown the team deliberately keeps running on the stale build
|
|
182
182
|
// — say so with a deadline, through the same channel as a refused restart
|
|
183
183
|
// (BUGS.md 2026-09-11).
|
|
184
184
|
// Past it, a startup gate that keeps failing holds the team on the stale build just as
|
|
@@ -203,7 +203,7 @@ export class Redeployer {
|
|
|
203
203
|
* the next poll that reaches the cooldown check waives the deferral — it nulls the cooldown's
|
|
204
204
|
* start, so the whole episode proceeds now and later polls of it stay un-deferred. It clears
|
|
205
205
|
* ONLY the cooldown — a red main verdict, a failed compile, a swap error, or a boot refusal
|
|
206
|
-
* still blocks through the ordinary paths, and in-flight
|
|
206
|
+
* still blocks through the ordinary paths, and in-flight runs still drain through the
|
|
207
207
|
* ordinary window. One `restart_forced` event records the operator's hand, so the feed shows
|
|
208
208
|
* why an episode started mid-cooldown. */
|
|
209
209
|
forceRestart() {
|
|
@@ -232,7 +232,7 @@ export class Redeployer {
|
|
|
232
232
|
this.buildRedSha = this.build.sha;
|
|
233
233
|
this.buildRed = track(this.deps.buildRed(this.build.sha));
|
|
234
234
|
}
|
|
235
|
-
/** The deadline this deferral holds to: the ordinary
|
|
235
|
+
/** The deadline this deferral holds to: the ordinary cooldown, cut to the urgent
|
|
236
236
|
* window when the RUNNING build's own commit carries a settled red verdict (BUGS.md
|
|
237
237
|
* 2026-09-30). The verdict is whatever the background check has produced so far — an
|
|
238
238
|
* unsettled or unknown verdict reads as not-red, so a cold cache leaves the ordinary
|
|
@@ -295,8 +295,8 @@ export class Redeployer {
|
|
|
295
295
|
return this.endDrain();
|
|
296
296
|
// Completed auto-restarts are rate-limited to one per RESTART_COOLDOWN_MS (BUGS.md 2026-09-11):
|
|
297
297
|
// under sustained churn every stale head would otherwise drive a full hold+drain+swap episode
|
|
298
|
-
// back to back. Inside the cooldown the team keeps
|
|
299
|
-
// a restart is blocked — no pendingHead, no hold, no drain, no new-
|
|
298
|
+
// back to back. Inside the cooldown the team keeps running on the stale build exactly as when
|
|
299
|
+
// a restart is blocked — no pendingHead, no hold, no drain, no new-run block — but the
|
|
300
300
|
// deferred head's green check and staged compile still run (prewarm, BUGS.md 2026-09-30), so
|
|
301
301
|
// the lapse reaches the swap directly instead of paying green-check + compile + drain from
|
|
302
302
|
// zero. This is re-evaluated on every poll rather than latched like blockedHead: once the
|
|
@@ -323,7 +323,7 @@ export class Redeployer {
|
|
|
323
323
|
this.warn(`auto-restart of ${shortSha(mainHead)} deferred — cooldown until ${new Date(cooldownUntil).toISOString()}` +
|
|
324
324
|
(urgent
|
|
325
325
|
? ` (the running version ${shortSha(this.build.sha)} fails its check — the cooldown is cut to ${RESTART_URGENT_COOLDOWN_MIN} min)`
|
|
326
|
-
:
|
|
326
|
+
: ` (at most one completed restart per ${RESTART_COOLDOWN_HOURS} h)`));
|
|
327
327
|
}
|
|
328
328
|
this.probes.prewarm(mainHead, this.pendingHead !== null);
|
|
329
329
|
return this.endDrain();
|
|
@@ -333,7 +333,7 @@ export class Redeployer {
|
|
|
333
333
|
// The carve-out's second silence (BUGS.md 2026-09-30): a red verdict arriving after the
|
|
334
334
|
// 15 min urgent window has passed cuts the deadline to a point already gone, so the
|
|
335
335
|
// deferred-branch warning above never ran and the episode below started with no word of
|
|
336
|
-
// why the announced
|
|
336
|
+
// why the announced deadline was abandoned. urgent here means now is still inside the
|
|
337
337
|
// ordinary cooldown and the running build is red — say why the episode starts early, once
|
|
338
338
|
// per ordinary deadline.
|
|
339
339
|
if (urgent && this.urgentLapseWarnedFor !== this.cooldownUntil()) {
|
|
@@ -356,7 +356,7 @@ export class Redeployer {
|
|
|
356
356
|
this.drainSince = now;
|
|
357
357
|
// Capture the window with the hold: the observed p75 when the orchestrator has it,
|
|
358
358
|
// otherwise the cold-start constant.
|
|
359
|
-
const p75 = inFlight.
|
|
359
|
+
const p75 = inFlight.roleRunP75Ms;
|
|
360
360
|
this.drainWindowMs = typeof p75 === "number" && p75 > 0 ? p75 : this.drainMaxMs;
|
|
361
361
|
}
|
|
362
362
|
// Adopt the cooldown's pre-warm (BUGS.md 2026-09-30): verdicts already in hand mean the
|
|
@@ -425,10 +425,10 @@ export class Redeployer {
|
|
|
425
425
|
this.block(mainHead, reason, `${reason} — staying on version ${shortSha(this.build.sha)}: ${detail}`);
|
|
426
426
|
return this.endDrain();
|
|
427
427
|
}
|
|
428
|
-
// The drain rule, split by who requested the work (BUGS.md 2026-09-08): a director
|
|
428
|
+
// The drain rule, split by who requested the work (BUGS.md 2026-09-08): a director run is
|
|
429
429
|
// an explicit human prompt and outranks the redeploy — while one is in flight the hold has no
|
|
430
|
-
// time cap: no swap and no abort until it finishes. The per-
|
|
431
|
-
// long one run can take, so this cannot hang the team beyond what a single
|
|
430
|
+
// time cap: no swap and no abort until it finishes. The per-run watchdogs already bound how
|
|
431
|
+
// long one run can take, so this cannot hang the team beyond what a single run can do.
|
|
432
432
|
if (inFlight.directorInFlight > 0)
|
|
433
433
|
return "hold";
|
|
434
434
|
if (inFlight.roleInFlight > 0 && now - this.drainSince < this.drainWindowMs)
|
|
@@ -468,7 +468,7 @@ export class Redeployer {
|
|
|
468
468
|
this.staleSince = null;
|
|
469
469
|
this.lastEscalationAt = null;
|
|
470
470
|
// The director is guaranteed finished by here (poll only reaches the swap with
|
|
471
|
-
// directorInFlight === 0), so what gets aborted — and counted — are role
|
|
471
|
+
// directorInFlight === 0), so what gets aborted — and counted — are role runs only, and
|
|
472
472
|
// only those holding a permit (see InFlightCounts). A director-extended hold reports
|
|
473
473
|
// finishedMs past the window: correct and informative.
|
|
474
474
|
this.log({
|
|
@@ -4,6 +4,7 @@ import { isSelfHosted, readBuildInfo } from "../build/build-info.js";
|
|
|
4
4
|
import { RESTART_EXIT_CODE } from "./redeploy-policy.js";
|
|
5
5
|
import { childEnv } from "../process/process.js";
|
|
6
6
|
import { startParentDeathWatch } from "../process/supervisor.js";
|
|
7
|
+
import { liveNodeBin } from "../process/node-bin.js";
|
|
7
8
|
/** Auto-reload for the user-launched dashboards (`tumwater tui`, `tumwater gui`).
|
|
8
9
|
*
|
|
9
10
|
* Unlike the orchestrator — which the supervisor respawns onto a fresh build — a dashboard is
|
|
@@ -73,7 +74,7 @@ export function reexecSelf(spawnImpl = spawn) {
|
|
|
73
74
|
stdio: "inherit",
|
|
74
75
|
env: childEnv({ [DASHBOARD_CHILD_ENV]: String(process.pid) }),
|
|
75
76
|
};
|
|
76
|
-
const startChild = () => spawnImpl(
|
|
77
|
+
const startChild = () => spawnImpl(liveNodeBin(), process.argv.slice(1), options);
|
|
77
78
|
const supervise = () => {
|
|
78
79
|
const child = startChild();
|
|
79
80
|
child.on("exit", (code) => {
|