@telora/daemon 0.22.289 → 0.22.293
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 +2 -2
- package/build-info.json +2 -2
- package/dist/backends/agent-backend.d.ts +2 -0
- package/dist/backends/agent-backend.d.ts.map +1 -1
- package/dist/backends/availability.d.ts +14 -0
- package/dist/backends/availability.d.ts.map +1 -1
- package/dist/backends/availability.js +37 -0
- package/dist/backends/availability.js.map +1 -1
- package/dist/backends/claude/claude-backend.d.ts.map +1 -1
- package/dist/backends/claude/claude-backend.js +2 -0
- package/dist/backends/claude/claude-backend.js.map +1 -1
- package/dist/backends/codex/codex-backend.d.ts.map +1 -1
- package/dist/backends/codex/codex-backend.js +2 -0
- package/dist/backends/codex/codex-backend.js.map +1 -1
- package/dist/backends/index.d.ts +1 -1
- package/dist/backends/index.d.ts.map +1 -1
- package/dist/backends/index.js +2 -17
- package/dist/backends/index.js.map +1 -1
- package/dist/cli/connect/config-write.d.ts.map +1 -1
- package/dist/cli/connect/config-write.js +2 -1
- package/dist/cli/connect/config-write.js.map +1 -1
- package/dist/cli/status-commands.d.ts +7 -0
- package/dist/cli/status-commands.d.ts.map +1 -1
- package/dist/cli/status-commands.js +17 -0
- package/dist/cli/status-commands.js.map +1 -1
- package/dist/completion/completion-event/event.d.ts +1 -0
- package/dist/completion/completion-event/event.d.ts.map +1 -1
- package/dist/completion/completion-event/event.js +1 -0
- package/dist/completion/completion-event/event.js.map +1 -1
- package/dist/completion/review-exit/review-census-record.d.ts +4 -2
- package/dist/completion/review-exit/review-census-record.d.ts.map +1 -1
- package/dist/completion/review-exit/review-census-record.js +11 -3
- package/dist/completion/review-exit/review-census-record.js.map +1 -1
- package/dist/completion/review-exit/review-exit-deps.js +1 -1
- package/dist/completion/review-exit/review-exit-phase.d.ts +9 -0
- package/dist/completion/review-exit/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.js +1 -1
- package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
- package/dist/completion/review-exit-holds/commit-verdict-release.d.ts.map +1 -1
- package/dist/completion/review-exit-holds/commit-verdict-release.js +2 -1
- package/dist/completion/review-exit-holds/commit-verdict-release.js.map +1 -1
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.d.ts +1 -0
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.d.ts.map +1 -1
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.js +1 -0
- package/dist/completion/review-exit-holds/review-exit-verdict-gate.js.map +1 -1
- package/dist/completion/team-exit/team-completion.d.ts.map +1 -1
- package/dist/completion/team-exit/team-completion.js +3 -1
- package/dist/completion/team-exit/team-completion.js.map +1 -1
- package/dist/completion/team-liveness/liveness-firing.js +3 -3
- package/dist/completion/team-liveness/team-liveness-phase.d.ts +6 -1
- package/dist/completion/team-liveness/team-liveness-phase.d.ts.map +1 -1
- package/dist/completion/team-liveness/team-liveness-phase.js.map +1 -1
- package/dist/completion/team-outcome/apply-close.d.ts.map +1 -1
- package/dist/completion/team-outcome/apply-close.js +4 -1
- package/dist/completion/team-outcome/apply-close.js.map +1 -1
- package/dist/completion/team-outcome/apply-turn.d.ts.map +1 -1
- package/dist/completion/team-outcome/apply-turn.js +3 -1
- package/dist/completion/team-outcome/apply-turn.js.map +1 -1
- package/dist/completion/team-outcome/apply.d.ts.map +1 -1
- package/dist/completion/team-outcome/apply.js +3 -1
- package/dist/completion/team-outcome/apply.js.map +1 -1
- package/dist/completion/team-outcome/decide-shared.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide-shared.js +3 -2
- package/dist/completion/team-outcome/decide-shared.js.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.js +2 -1
- package/dist/completion/team-outcome/exit-pipeline-state.js.map +1 -1
- package/dist/completion/team-outcome/team-outcome.d.ts.map +1 -1
- package/dist/completion/team-outcome/team-outcome.js +3 -1
- package/dist/completion/team-outcome/team-outcome.js.map +1 -1
- package/dist/composition/execution-migrations-context.d.ts.map +1 -1
- package/dist/composition/execution-migrations-context.js +2 -0
- package/dist/composition/execution-migrations-context.js.map +1 -1
- package/dist/composition/execution-process-context.js +1 -1
- package/dist/composition/execution-spawn-context.d.ts.map +1 -1
- package/dist/composition/execution-spawn-context.js +3 -1
- package/dist/composition/execution-spawn-context.js.map +1 -1
- package/dist/composition/execution-spawn-process-context.d.ts.map +1 -1
- package/dist/composition/execution-spawn-process-context.js +3 -2
- package/dist/composition/execution-spawn-process-context.js.map +1 -1
- package/dist/composition/focus-activity-live-sources.d.ts +4 -0
- package/dist/composition/focus-activity-live-sources.d.ts.map +1 -0
- package/dist/composition/focus-activity-live-sources.js +68 -0
- package/dist/composition/focus-activity-live-sources.js.map +1 -0
- package/dist/composition/runtime-delivery-advance-context.d.ts +6 -1
- package/dist/composition/runtime-delivery-advance-context.d.ts.map +1 -1
- package/dist/composition/runtime-delivery-advance-context.js +14 -3
- package/dist/composition/runtime-delivery-advance-context.js.map +1 -1
- package/dist/composition/runtime-heartbeat-context.d.ts.map +1 -1
- package/dist/composition/runtime-heartbeat-context.js +3 -1
- package/dist/composition/runtime-heartbeat-context.js.map +1 -1
- package/dist/composition/team-lifecycle-context.d.ts.map +1 -1
- package/dist/composition/team-lifecycle-context.js +3 -1
- package/dist/composition/team-lifecycle-context.js.map +1 -1
- package/dist/composition/team-liveness-phase-sources.d.ts.map +1 -1
- package/dist/composition/team-liveness-phase-sources.js +1 -0
- package/dist/composition/team-liveness-phase-sources.js.map +1 -1
- package/dist/composition/verification-context.d.ts.map +1 -1
- package/dist/composition/verification-context.js +4 -1
- package/dist/composition/verification-context.js.map +1 -1
- package/dist/composition/verify-probe-context.d.ts +7 -0
- package/dist/composition/verify-probe-context.d.ts.map +1 -1
- package/dist/composition/verify-probe-context.js +55 -3
- package/dist/composition/verify-probe-context.js.map +1 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +4 -3
- package/dist/config/config.js.map +1 -1
- package/dist/config/session-cap.d.ts +89 -0
- package/dist/config/session-cap.d.ts.map +1 -0
- package/dist/config/session-cap.js +176 -0
- package/dist/config/session-cap.js.map +1 -0
- package/dist/daemon-state/awaiting-slot.d.ts +8 -2
- package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
- package/dist/daemon-state/awaiting-slot.js +21 -8
- package/dist/daemon-state/awaiting-slot.js.map +1 -1
- package/dist/daemon-state/engine-readiness.d.ts +73 -0
- package/dist/daemon-state/engine-readiness.d.ts.map +1 -0
- package/dist/daemon-state/engine-readiness.js +191 -0
- package/dist/daemon-state/engine-readiness.js.map +1 -0
- package/dist/daemon-state/focus-progress-clock.d.ts +34 -0
- package/dist/daemon-state/focus-progress-clock.d.ts.map +1 -0
- package/dist/daemon-state/focus-progress-clock.js +167 -0
- package/dist/daemon-state/focus-progress-clock.js.map +1 -0
- package/dist/daemon-state/focus-team-state.d.ts +32 -9
- package/dist/daemon-state/focus-team-state.d.ts.map +1 -1
- package/dist/daemon-state/focus-team-state.js +50 -9
- package/dist/daemon-state/focus-team-state.js.map +1 -1
- package/dist/daemon-state/provider-window.d.ts.map +1 -1
- package/dist/daemon-state/provider-window.js +5 -1
- package/dist/daemon-state/provider-window.js.map +1 -1
- package/dist/daemon-state/review-park-record.d.ts +36 -0
- package/dist/daemon-state/review-park-record.d.ts.map +1 -0
- package/dist/daemon-state/review-park-record.js +27 -0
- package/dist/daemon-state/review-park-record.js.map +1 -0
- package/dist/daemon-state/worker-pidfile.d.ts.map +1 -1
- package/dist/daemon-state/worker-pidfile.js +3 -1
- package/dist/daemon-state/worker-pidfile.js.map +1 -1
- package/dist/delivery/commit-verdict-hold.d.ts.map +1 -1
- package/dist/delivery/commit-verdict-hold.js +3 -1
- package/dist/delivery/commit-verdict-hold.js.map +1 -1
- package/dist/directive/directive-queue.js +1 -1
- package/dist/focus/focus-activity-held.d.ts +37 -0
- package/dist/focus/focus-activity-held.d.ts.map +1 -0
- package/dist/focus/focus-activity-held.js +89 -0
- package/dist/focus/focus-activity-held.js.map +1 -0
- package/dist/focus/focus-activity-poll-facts.d.ts +39 -0
- package/dist/focus/focus-activity-poll-facts.d.ts.map +1 -0
- package/dist/focus/focus-activity-poll-facts.js +110 -0
- package/dist/focus/focus-activity-poll-facts.js.map +1 -0
- package/dist/focus/focus-activity-producers.d.ts +43 -0
- package/dist/focus/focus-activity-producers.d.ts.map +1 -0
- package/dist/focus/focus-activity-producers.js +130 -0
- package/dist/focus/focus-activity-producers.js.map +1 -0
- package/dist/focus/focus-activity-record.d.ts +58 -0
- package/dist/focus/focus-activity-record.d.ts.map +1 -0
- package/dist/focus/focus-activity-record.js +141 -0
- package/dist/focus/focus-activity-record.js.map +1 -0
- package/dist/focus/focus-activity-sources.d.ts +99 -0
- package/dist/focus/focus-activity-sources.d.ts.map +1 -0
- package/dist/focus/focus-activity-sources.js +45 -0
- package/dist/focus/focus-activity-sources.js.map +1 -0
- package/dist/focus/focus-executor.js +1 -1
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
- package/dist/focus/focus-poller-auto-advance.js +2 -0
- package/dist/focus/focus-poller-auto-advance.js.map +1 -1
- package/dist/focus/heartbeat-metadata.d.ts.map +1 -1
- package/dist/focus/heartbeat-metadata.js +6 -0
- package/dist/focus/heartbeat-metadata.js.map +1 -1
- package/dist/focus/heartbeat.d.ts +3 -0
- package/dist/focus/heartbeat.d.ts.map +1 -1
- package/dist/focus/heartbeat.js +31 -31
- package/dist/focus/heartbeat.js.map +1 -1
- package/dist/focus/pending-review-approved-head.d.ts.map +1 -1
- package/dist/focus/pending-review-approved-head.js +4 -2
- package/dist/focus/pending-review-approved-head.js.map +1 -1
- package/dist/focus/unchanged-reviewed-head.d.ts.map +1 -1
- package/dist/focus/unchanged-reviewed-head.js +4 -2
- package/dist/focus/unchanged-reviewed-head.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/queries/deliveries/deliveries.d.ts +4 -0
- package/dist/queries/deliveries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries/deliveries.js +6 -0
- package/dist/queries/deliveries/deliveries.js.map +1 -1
- package/dist/queries/deliveries/issues.d.ts +3 -0
- package/dist/queries/deliveries/issues.d.ts.map +1 -1
- package/dist/queries/deliveries/issues.js +10 -2
- package/dist/queries/deliveries/issues.js.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts +27 -1
- package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.d.ts +3 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.js.map +1 -1
- package/dist/queries/focuses/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focuses/focus-discovery.js +2 -0
- package/dist/queries/focuses/focus-discovery.js.map +1 -1
- package/dist/queries/focuses/focuses.d.ts.map +1 -1
- package/dist/queries/focuses/focuses.js +2 -0
- package/dist/queries/focuses/focuses.js.map +1 -1
- package/dist/queries/sessions/daemon-connection.d.ts.map +1 -1
- package/dist/queries/sessions/daemon-connection.js +1 -0
- package/dist/queries/sessions/daemon-connection.js.map +1 -1
- package/dist/queries/workflow-transitions/workflows.d.ts.map +1 -1
- package/dist/queries/workflow-transitions/workflows.js +1 -0
- package/dist/queries/workflow-transitions/workflows.js.map +1 -1
- package/dist/shell/config-hot-reload.d.ts +11 -0
- package/dist/shell/config-hot-reload.d.ts.map +1 -1
- package/dist/shell/config-hot-reload.js +12 -0
- package/dist/shell/config-hot-reload.js.map +1 -1
- package/dist/shell/unified-engine-lifecycle.d.ts +8 -1
- package/dist/shell/unified-engine-lifecycle.d.ts.map +1 -1
- package/dist/shell/unified-engine-lifecycle.js +44 -24
- package/dist/shell/unified-engine-lifecycle.js.map +1 -1
- package/dist/shell/unified-init.d.ts +5 -1
- package/dist/shell/unified-init.d.ts.map +1 -1
- package/dist/shell/unified-init.js +2 -2
- package/dist/shell/unified-init.js.map +1 -1
- package/dist/shell/unified-shell-config.d.ts +2 -1
- package/dist/shell/unified-shell-config.d.ts.map +1 -1
- package/dist/shell/unified-shell-config.js +9 -3
- package/dist/shell/unified-shell-config.js.map +1 -1
- package/dist/shell/unified-shell-status.d.ts +11 -1
- package/dist/shell/unified-shell-status.d.ts.map +1 -1
- package/dist/shell/unified-shell-status.js +15 -1
- package/dist/shell/unified-shell-status.js.map +1 -1
- package/dist/shell/unified-shell.d.ts.map +1 -1
- package/dist/shell/unified-shell.js +25 -5
- package/dist/shell/unified-shell.js.map +1 -1
- package/dist/spawn/codex-auth.d.ts +32 -0
- package/dist/spawn/codex-auth.d.ts.map +1 -0
- package/dist/spawn/codex-auth.js +55 -0
- package/dist/spawn/codex-auth.js.map +1 -0
- package/dist/spawn/helpers.d.ts.map +1 -1
- package/dist/spawn/helpers.js +19 -3
- package/dist/spawn/helpers.js.map +1 -1
- package/dist/spawn/model-reached.d.ts +36 -0
- package/dist/spawn/model-reached.d.ts.map +1 -0
- package/dist/spawn/model-reached.js +43 -0
- package/dist/spawn/model-reached.js.map +1 -0
- package/dist/spawn/next-spawn-cooldown.d.ts +21 -2
- package/dist/spawn/next-spawn-cooldown.d.ts.map +1 -1
- package/dist/spawn/next-spawn-cooldown.js +65 -7
- package/dist/spawn/next-spawn-cooldown.js.map +1 -1
- package/dist/spawn/process-spawn.d.ts.map +1 -1
- package/dist/spawn/process-spawn.js +8 -5
- package/dist/spawn/process-spawn.js.map +1 -1
- package/dist/spawn/review-hold-park.d.ts +12 -1
- package/dist/spawn/review-hold-park.d.ts.map +1 -1
- package/dist/spawn/review-hold-park.js +25 -9
- package/dist/spawn/review-hold-park.js.map +1 -1
- package/dist/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +4 -0
- package/dist/spawn/spawn-decision.js.map +1 -1
- package/dist/spawn/team-working-delivery.d.ts +76 -0
- package/dist/spawn/team-working-delivery.d.ts.map +1 -0
- package/dist/spawn/team-working-delivery.js +76 -0
- package/dist/spawn/team-working-delivery.js.map +1 -0
- package/dist/spawn/worktree-session.d.ts +15 -0
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +25 -2
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/supervision/spawn-cooldown-window.d.ts +15 -0
- package/dist/supervision/spawn-cooldown-window.d.ts.map +1 -0
- package/dist/supervision/spawn-cooldown-window.js +46 -0
- package/dist/supervision/spawn-cooldown-window.js.map +1 -0
- package/dist/supervision/spawn-cooldown.d.ts +3 -2
- package/dist/supervision/spawn-cooldown.d.ts.map +1 -1
- package/dist/supervision/spawn-cooldown.js +6 -1
- package/dist/supervision/spawn-cooldown.js.map +1 -1
- package/dist/supervision/stop-registry.d.ts +1 -0
- package/dist/supervision/stop-registry.d.ts.map +1 -1
- package/dist/supervision/stop-rows-spawn.d.ts +8 -0
- package/dist/supervision/stop-rows-spawn.d.ts.map +1 -1
- package/dist/supervision/stop-rows-spawn.js +28 -1
- package/dist/supervision/stop-rows-spawn.js.map +1 -1
- package/dist/testing/fake-npm-registry.d.ts +31 -0
- package/dist/testing/fake-npm-registry.d.ts.map +1 -0
- package/dist/testing/fake-npm-registry.js +127 -0
- package/dist/testing/fake-npm-registry.js.map +1 -0
- package/dist/testing/fixtures/approved-head-inert-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/approved-head-inert-deps.js +4 -2
- package/dist/testing/fixtures/approved-head-inert-deps.js.map +1 -1
- package/dist/testing/fixtures/codex-stream-session.d.ts +4 -0
- package/dist/testing/fixtures/codex-stream-session.d.ts.map +1 -1
- package/dist/testing/fixtures/codex-stream-session.js +21 -5
- package/dist/testing/fixtures/codex-stream-session.js.map +1 -1
- package/dist/testing/fixtures/completion-event-deps.js +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/process-close-context.d.ts.map +1 -1
- package/dist/testing/fixtures/process-close-context.js +2 -0
- package/dist/testing/fixtures/process-close-context.js.map +1 -1
- package/dist/testing/fixtures/recording-api-client.js +1 -1
- package/dist/testing/fixtures/review-exit-deps.js +1 -1
- package/dist/testing/fixtures/session-wire.d.ts.map +1 -1
- package/dist/testing/fixtures/session-wire.js +2 -1
- package/dist/testing/fixtures/session-wire.js.map +1 -1
- package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/verification-deps.js +4 -0
- package/dist/testing/fixtures/verification-deps.js.map +1 -1
- package/dist/types/config.d.ts +30 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/focus-team-state.d.ts +28 -2
- package/dist/types/focus-team-state.d.ts.map +1 -1
- package/dist/types/focus-team-state.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.d.ts +8 -4
- package/dist/verify/deterministic-gate/verification-checkout.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.js +50 -13
- package/dist/verify/deterministic-gate/verification-checkout.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js +3 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js.map +1 -1
- package/dist/verify/engine/verification-deps.d.ts +7 -0
- package/dist/verify/engine/verification-deps.d.ts.map +1 -1
- package/dist/verify/engine/verification-deps.js +1 -1
- package/dist/verify/engine/verification-engine.d.ts.map +1 -1
- package/dist/verify/engine/verification-engine.js +107 -8
- package/dist/verify/engine/verification-engine.js.map +1 -1
- package/dist/verify/gate-config/verification-config.js +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +1 -1
- package/dist/verify/gate-verdicts/gate-run-registry.d.ts +74 -3
- package/dist/verify/gate-verdicts/gate-run-registry.d.ts.map +1 -1
- package/dist/verify/gate-verdicts/gate-run-registry.js +41 -20
- package/dist/verify/gate-verdicts/gate-run-registry.js.map +1 -1
- package/dist/verify/install-probe/in-repo-publish.d.ts +154 -0
- package/dist/verify/install-probe/in-repo-publish.d.ts.map +1 -0
- package/dist/verify/install-probe/in-repo-publish.js +183 -0
- package/dist/verify/install-probe/in-repo-publish.js.map +1 -0
- package/dist/verify/install-probe/install-probe-tick.d.ts +23 -2
- package/dist/verify/install-probe/install-probe-tick.d.ts.map +1 -1
- package/dist/verify/install-probe/install-probe-tick.js +84 -12
- package/dist/verify/install-probe/install-probe-tick.js.map +1 -1
- package/dist/verify/install-probe/install-probe.d.ts +16 -0
- package/dist/verify/install-probe/install-probe.d.ts.map +1 -1
- package/dist/verify/install-probe/install-probe.js +35 -19
- package/dist/verify/install-probe/install-probe.js.map +1 -1
- package/dist/verify/install-probe/npm-unresolved.d.ts +37 -0
- package/dist/verify/install-probe/npm-unresolved.d.ts.map +1 -0
- package/dist/verify/install-probe/npm-unresolved.js +63 -0
- package/dist/verify/install-probe/npm-unresolved.js.map +1 -0
- package/dist/verify/run-selection/default-on-guards.d.ts.map +1 -1
- package/dist/verify/run-selection/default-on-guards.js +1 -19
- package/dist/verify/run-selection/default-on-guards.js.map +1 -1
- package/dist/worktree/verify-interlock.d.ts +23 -2
- package/dist/worktree/verify-interlock.d.ts.map +1 -1
- package/dist/worktree/verify-interlock.js +79 -2
- package/dist/worktree/verify-interlock.js.map +1 -1
- package/package.json +3 -3
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
// packages/daemon/src/verify/deterministic-gate/verification-checkout.test.ts,
|
|
7
7
|
// packages/daemon/src/verify/deterministic-gate/verification-deterministic.test.ts,
|
|
8
8
|
// packages/daemon/src/verify/engine/verification-commit-sharing.test.ts,
|
|
9
|
+
// packages/daemon/src/verify/gate-verdicts/gate-run-activity.test.ts,
|
|
10
|
+
// packages/daemon/src/worktree/verify-interlock.test.ts,
|
|
9
11
|
// packages/daemon/src/worktree/worktree-package-provisioning.test.ts
|
|
10
12
|
// PINNED-BY-END
|
|
11
13
|
/**
|
|
@@ -61,6 +63,20 @@ const holds = new Map();
|
|
|
61
63
|
* with no delivery id (a caller that judges none) records nothing here.
|
|
62
64
|
*/
|
|
63
65
|
const heldDeliveries = new Map();
|
|
66
|
+
/**
|
|
67
|
+
* When each standing hold can stand until at the latest: canonical worktree path ->
|
|
68
|
+
* hold token -> epoch ms (acquired-at plus the kill timeout its owner declared), or
|
|
69
|
+
* null for an owner that declared none. Read by {@link verifyHoldOutlastsMs}.
|
|
70
|
+
*/
|
|
71
|
+
const holdDeadlines = new Map();
|
|
72
|
+
/** Who waits for a worktree's holds to clear: canonical worktree path -> wakers (see {@link awaitVerifyHoldRelease}). */
|
|
73
|
+
const releaseWaiters = new Map();
|
|
74
|
+
function wakeReleaseWaiters(key) {
|
|
75
|
+
const waiters = releaseWaiters.get(key);
|
|
76
|
+
releaseWaiters.delete(key);
|
|
77
|
+
for (const wake of waiters ?? [])
|
|
78
|
+
wake();
|
|
79
|
+
}
|
|
64
80
|
function adjustDeliveryHold(key, deliveryId, delta) {
|
|
65
81
|
const byDelivery = heldDeliveries.get(key) ?? new Map();
|
|
66
82
|
const next = (byDelivery.get(deliveryId) ?? 0) + delta;
|
|
@@ -93,12 +109,18 @@ function keyFor(worktreePath) {
|
|
|
93
109
|
*
|
|
94
110
|
* `deliveryId` names the delivery the verify is judging, so the actionable-work
|
|
95
111
|
* predicate can withhold exactly that delivery (see {@link verifyHeldDeliveryIds}).
|
|
112
|
+
* `maxHoldMs` is the owner's kill timeout -- how long its process can live -- so a
|
|
113
|
+
* waiter can bound its wait by it ({@link verifyHoldOutlastsMs}).
|
|
96
114
|
*/
|
|
97
|
-
export function acquireVerifyHold(worktreePath, deliveryId) {
|
|
115
|
+
export function acquireVerifyHold(worktreePath, deliveryId, maxHoldMs) {
|
|
98
116
|
const key = keyFor(worktreePath);
|
|
99
117
|
holds.set(key, (holds.get(key) ?? 0) + 1);
|
|
100
118
|
if (deliveryId)
|
|
101
119
|
adjustDeliveryHold(key, deliveryId, 1);
|
|
120
|
+
const token = Symbol(key);
|
|
121
|
+
const deadlines = holdDeadlines.get(key) ?? new Map();
|
|
122
|
+
deadlines.set(token, maxHoldMs !== undefined ? Date.now() + maxHoldMs : null);
|
|
123
|
+
holdDeadlines.set(key, deadlines);
|
|
102
124
|
log.debug(`verify-interlock: hold acquired for ${key} (depth ${holds.get(key)}${deliveryId ? `, delivery ${deliveryId}` : ''})`);
|
|
103
125
|
let released = false;
|
|
104
126
|
return () => {
|
|
@@ -108,12 +130,16 @@ export function acquireVerifyHold(worktreePath, deliveryId) {
|
|
|
108
130
|
const next = (holds.get(key) ?? 1) - 1;
|
|
109
131
|
if (next <= 0) {
|
|
110
132
|
holds.delete(key);
|
|
133
|
+
wakeReleaseWaiters(key);
|
|
111
134
|
}
|
|
112
135
|
else {
|
|
113
136
|
holds.set(key, next);
|
|
114
137
|
}
|
|
115
138
|
if (deliveryId)
|
|
116
139
|
adjustDeliveryHold(key, deliveryId, -1);
|
|
140
|
+
deadlines.delete(token);
|
|
141
|
+
if (deadlines.size === 0 && holdDeadlines.get(key) === deadlines)
|
|
142
|
+
holdDeadlines.delete(key);
|
|
117
143
|
log.debug(`verify-interlock: hold released for ${key} (depth ${next <= 0 ? 0 : next})`);
|
|
118
144
|
};
|
|
119
145
|
}
|
|
@@ -134,10 +160,61 @@ export function verifyHeldDeliveryIds(worktreePath) {
|
|
|
134
160
|
export function isWorktreeUnderVerify(worktreePath) {
|
|
135
161
|
return (holds.get(keyFor(worktreePath)) ?? 0) > 0;
|
|
136
162
|
}
|
|
137
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* How long, from `now`, the holds standing on `worktreePath` can still stand: the
|
|
165
|
+
* latest deadline among them, each its acquisition plus the kill timeout its owner
|
|
166
|
+
* declared; a hold whose owner declared none counts as standing `undeclaredMs` more.
|
|
167
|
+
* 0 when nothing holds the worktree. A wait bounded by at least this never ends
|
|
168
|
+
* before a legitimate hold's own timeout ends it.
|
|
169
|
+
*/
|
|
170
|
+
export function verifyHoldOutlastsMs(worktreePath, undeclaredMs, now) {
|
|
171
|
+
let outlasts = 0;
|
|
172
|
+
for (const deadline of holdDeadlines.get(keyFor(worktreePath))?.values() ?? []) {
|
|
173
|
+
outlasts = Math.max(outlasts, deadline === null ? undeclaredMs : deadline - now);
|
|
174
|
+
}
|
|
175
|
+
return outlasts;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Resolve once no verify holds `worktreePath` -- at once when none does -- or when
|
|
179
|
+
* `maxWaitMs` elapses first ('timed_out'). The bound is a backstop, not the
|
|
180
|
+
* expected path: every hold is released when its verify process exits, and that
|
|
181
|
+
* process is killed at its own timeout, so a wait bounded past that timeout
|
|
182
|
+
* ({@link verifyHoldOutlastsMs}) outlives the bound only when a hold leaked. A gate
|
|
183
|
+
* run waits here before it takes a verification slot, so it does not start in a
|
|
184
|
+
* worktree another verify is judging -- nor after a timed-out wait, which ends
|
|
185
|
+
* that dispatch unstarted (verify/engine/verification-engine.ts).
|
|
186
|
+
*/
|
|
187
|
+
export function awaitVerifyHoldRelease(worktreePath, maxWaitMs) {
|
|
188
|
+
const key = keyFor(worktreePath);
|
|
189
|
+
if ((holds.get(key) ?? 0) <= 0)
|
|
190
|
+
return Promise.resolve('released');
|
|
191
|
+
return new Promise((resolveWait) => {
|
|
192
|
+
let waiters = releaseWaiters.get(key);
|
|
193
|
+
if (waiters === undefined) {
|
|
194
|
+
waiters = new Set();
|
|
195
|
+
releaseWaiters.set(key, waiters);
|
|
196
|
+
}
|
|
197
|
+
const wake = () => {
|
|
198
|
+
clearTimeout(timer);
|
|
199
|
+
resolveWait('released');
|
|
200
|
+
};
|
|
201
|
+
const timer = setTimeout(() => {
|
|
202
|
+
waiters.delete(wake);
|
|
203
|
+
if (waiters.size === 0 && releaseWaiters.get(key) === waiters)
|
|
204
|
+
releaseWaiters.delete(key);
|
|
205
|
+
resolveWait('timed_out');
|
|
206
|
+
}, maxWaitMs);
|
|
207
|
+
timer.unref?.();
|
|
208
|
+
waiters.add(wake);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/** Test seam: clear all holds between cases (anyone waiting on a release is woken). */
|
|
138
212
|
export function __resetVerifyHolds() {
|
|
139
213
|
holds.clear();
|
|
140
214
|
heldDeliveries.clear();
|
|
215
|
+
holdDeadlines.clear();
|
|
216
|
+
for (const key of [...releaseWaiters.keys()])
|
|
217
|
+
wakeReleaseWaiters(key);
|
|
141
218
|
}
|
|
142
219
|
/**
|
|
143
220
|
* The ONE boundary every daemon path that REWRITES an existing worktree passes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-interlock.js","sourceRoot":"","sources":["../../src/worktree/verify-interlock.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+EAA+E;AAC/E,iEAAiE;AACjE,kFAAkF;AAClF,8EAA8E;AAC9E,iFAAiF;AACjF,sFAAsF;AACtF,2EAA2E;AAC3E,uEAAuE;AACvE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,IAAI,GAAG,EAA+B,CAAC;AAE9D,SAAS,kBAAkB,CAAC,GAAW,EAAE,UAAkB,EAAE,KAAa;IACxE,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,EAAkB,CAAC;IACxE,MAAM,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,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,KAAK,EAAE,CAAC;IACvB,aAAa,CAAC,KAAK,EAAE,CAAC;IACtB,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC;QAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACxE,CAAC;AAeD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,iCAAiC,CAC/C,YAAoB,EACpB,MAAe,EACf,IAAmC;IAEnC,qEAAqE;IACrE,IAAI,SAAS,CAAC,kBAAkB,EAAE,EAAE,mBAAmB,EAAE,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;QACrG,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telora/daemon",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.293",
|
|
4
4
|
"description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"//testRunner": "Uses Node.js built-in test runner (node:test) via tsx for TypeScript support. The root package uses Vitest; this is a deliberate choice for the daemon package to avoid framework dependencies. Test files live beside the modules they exercise (owner-directory layout); the runner discovers them recursively.",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@telora/daemon-core": "^0.2.
|
|
41
|
-
"@telora/mcp-products": "^0.22.
|
|
40
|
+
"@telora/daemon-core": "^0.2.105",
|
|
41
|
+
"@telora/mcp-products": "^0.22.170",
|
|
42
42
|
"commander": "^14.0.3",
|
|
43
43
|
"yaml": "^2.4.0",
|
|
44
44
|
"zod": "^4.3.6"
|