@telora/daemon 0.24.17 → 0.24.26
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/build-info.json +12 -3
- package/dist/audit/audit-prompt.d.ts.map +1 -1
- package/dist/audit/audit-prompt.js +15 -0
- package/dist/audit/audit-prompt.js.map +1 -1
- package/dist/ci/candidate-failure-record.d.ts +104 -0
- package/dist/ci/candidate-failure-record.d.ts.map +1 -0
- package/dist/ci/candidate-failure-record.js +135 -0
- package/dist/ci/candidate-failure-record.js.map +1 -0
- package/dist/ci/candidate-ref.d.ts.map +1 -1
- package/dist/ci/candidate-ref.js +10 -3
- package/dist/ci/candidate-ref.js.map +1 -1
- package/dist/ci/ci-status-git.d.ts.map +1 -1
- package/dist/ci/ci-status-git.js +1 -0
- package/dist/ci/ci-status-git.js.map +1 -1
- package/dist/ci/ci-status.d.ts.map +1 -1
- package/dist/ci/ci-status.js +1 -0
- package/dist/ci/ci-status.js.map +1 -1
- package/dist/ci/gate-ref.d.ts +10 -1
- package/dist/ci/gate-ref.d.ts.map +1 -1
- package/dist/ci/gate-ref.js +11 -4
- package/dist/ci/gate-ref.js.map +1 -1
- package/dist/ci/product-ci-repo.d.ts.map +1 -1
- package/dist/ci/product-ci-repo.js +3 -2
- package/dist/ci/product-ci-repo.js.map +1 -1
- package/dist/completion/completion-event/event.d.ts +4 -3
- package/dist/completion/completion-event/event.d.ts.map +1 -1
- package/dist/completion/completion-event/event.js.map +1 -1
- package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts +19 -11
- package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts.map +1 -1
- package/dist/completion/review-cycle-budget/review-cycle-cap.js +36 -36
- package/dist/completion/review-cycle-budget/review-cycle-cap.js.map +1 -1
- package/dist/completion/review-cycle-budget/review-loop-detection.d.ts +101 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.d.ts.map +1 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.js +105 -0
- package/dist/completion/review-cycle-budget/review-loop-detection.js.map +1 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.d.ts +70 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.d.ts.map +1 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.js +98 -0
- package/dist/completion/review-cycle-budget/spent-budget-release.js.map +1 -0
- package/dist/completion/review-exit/review-defect-detector.d.ts +71 -49
- package/dist/completion/review-exit/review-defect-detector.d.ts.map +1 -1
- package/dist/completion/review-exit/review-defect-detector.js +75 -69
- package/dist/completion/review-exit/review-defect-detector.js.map +1 -1
- package/dist/completion/review-exit/review-exit-attribution.d.ts +1 -1
- package/dist/completion/review-exit/review-exit-attribution.js +1 -1
- package/dist/completion/review-exit/review-exit-deps.d.ts +5 -2
- package/dist/completion/review-exit/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-deps.js +1 -1
- package/dist/completion/review-exit/review-exit-evidence.d.ts +10 -1
- package/dist/completion/review-exit/review-exit-evidence.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-evidence.js +17 -14
- package/dist/completion/review-exit/review-exit-evidence.js.map +1 -1
- package/dist/completion/review-exit/review-exit-foreign-findings.d.ts +1 -1
- package/dist/completion/review-exit/review-exit-foreign-findings.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.js +12 -8
- package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
- package/dist/completion/state-cascade/review-next-step.d.ts +12 -3
- package/dist/completion/state-cascade/review-next-step.d.ts.map +1 -1
- package/dist/completion/state-cascade/review-next-step.js +10 -1
- package/dist/completion/state-cascade/review-next-step.js.map +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.d.ts +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.d.ts.map +1 -1
- package/dist/completion/state-cascade/standing-approval-convergence.js +10 -4
- package/dist/completion/state-cascade/standing-approval-convergence.js.map +1 -1
- package/dist/completion/state-cascade/state-cascade.d.ts +3 -0
- package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade/state-cascade.js +16 -1
- package/dist/completion/state-cascade/state-cascade.js.map +1 -1
- package/dist/completion/team-exit/status-advance-phase.d.ts +1 -1
- package/dist/completion/team-exit/status-advance-phase.d.ts.map +1 -1
- package/dist/completion/team-exit/status-advance-phase.js +6 -4
- package/dist/completion/team-exit/status-advance-phase.js.map +1 -1
- package/dist/completion/team-outcome/apply-turn.d.ts.map +1 -1
- package/dist/completion/team-outcome/apply-turn.js +9 -4
- package/dist/completion/team-outcome/apply-turn.js.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide-turn-entry-rows.js +28 -3
- package/dist/completion/team-outcome/decide-turn-entry-rows.js.map +1 -1
- package/dist/completion/team-outcome/decide.d.ts.map +1 -1
- package/dist/completion/team-outcome/decide.js +1 -0
- package/dist/completion/team-outcome/decide.js.map +1 -1
- package/dist/completion/team-outcome/exit-limits.d.ts +6 -0
- package/dist/completion/team-outcome/exit-limits.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-limits.js +6 -0
- package/dist/completion/team-outcome/exit-limits.js.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts +5 -0
- package/dist/completion/team-outcome/exit-pipeline-state.d.ts.map +1 -1
- package/dist/completion/team-outcome/exit-pipeline-state.js.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts +10 -1
- package/dist/completion/team-teardown/session-hold-bounds.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold-bounds.js +11 -0
- package/dist/completion/team-teardown/session-hold-bounds.js.map +1 -1
- package/dist/completion/team-teardown/session-hold.d.ts.map +1 -1
- package/dist/completion/team-teardown/session-hold.js +2 -0
- package/dist/completion/team-teardown/session-hold.js.map +1 -1
- package/dist/composition/engine-start-context.d.ts.map +1 -1
- package/dist/composition/engine-start-context.js +9 -1
- package/dist/composition/engine-start-context.js.map +1 -1
- package/dist/composition/execution-merge-context.d.ts +13 -0
- package/dist/composition/execution-merge-context.d.ts.map +1 -1
- package/dist/composition/execution-merge-context.js +76 -3
- package/dist/composition/execution-merge-context.js.map +1 -1
- package/dist/composition/execution-spawn-context.d.ts.map +1 -1
- package/dist/composition/execution-spawn-context.js +2 -0
- package/dist/composition/execution-spawn-context.js.map +1 -1
- package/dist/composition/focus-activity-live-sources.d.ts.map +1 -1
- package/dist/composition/focus-activity-live-sources.js +1 -0
- package/dist/composition/focus-activity-live-sources.js.map +1 -1
- package/dist/composition/judgement-contexts.d.ts.map +1 -1
- package/dist/composition/judgement-contexts.js +8 -2
- package/dist/composition/judgement-contexts.js.map +1 -1
- package/dist/composition/review-exit-context.d.ts.map +1 -1
- package/dist/composition/review-exit-context.js +2 -0
- package/dist/composition/review-exit-context.js.map +1 -1
- package/dist/composition/review-loop-context.d.ts +28 -0
- package/dist/composition/review-loop-context.d.ts.map +1 -0
- package/dist/composition/review-loop-context.js +147 -0
- package/dist/composition/review-loop-context.js.map +1 -0
- package/dist/composition/runtime-heartbeat-context.d.ts +11 -0
- package/dist/composition/runtime-heartbeat-context.d.ts.map +1 -1
- package/dist/composition/runtime-heartbeat-context.js +33 -2
- package/dist/composition/runtime-heartbeat-context.js.map +1 -1
- package/dist/composition/spawn-pass-deps.d.ts.map +1 -1
- package/dist/composition/spawn-pass-deps.js +3 -0
- package/dist/composition/spawn-pass-deps.js.map +1 -1
- package/dist/composition/state-cascade-context.d.ts.map +1 -1
- package/dist/composition/state-cascade-context.js +3 -1
- package/dist/composition/state-cascade-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/tower-escalation-context.d.ts +12 -0
- package/dist/composition/tower-escalation-context.d.ts.map +1 -0
- package/dist/composition/tower-escalation-context.js +109 -0
- package/dist/composition/tower-escalation-context.js.map +1 -0
- package/dist/composition/verification-context.d.ts.map +1 -1
- package/dist/composition/verification-context.js +34 -4
- package/dist/composition/verification-context.js.map +1 -1
- package/dist/composition/workstation-intervals-context.d.ts +3 -0
- package/dist/composition/workstation-intervals-context.d.ts.map +1 -0
- package/dist/composition/workstation-intervals-context.js +33 -0
- package/dist/composition/workstation-intervals-context.js.map +1 -0
- package/dist/daemon-state/awaiting-slot.d.ts +18 -1
- package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
- package/dist/daemon-state/awaiting-slot.js +7 -0
- package/dist/daemon-state/awaiting-slot.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts +7 -7
- package/dist/delivery/recorded-concerns.d.ts +63 -28
- package/dist/delivery/recorded-concerns.d.ts.map +1 -1
- package/dist/delivery/recorded-concerns.js +72 -28
- package/dist/delivery/recorded-concerns.js.map +1 -1
- package/dist/directive/directive-queue.d.ts +8 -0
- package/dist/directive/directive-queue.d.ts.map +1 -1
- package/dist/directive/directive-queue.js +1 -1
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/focus/control-state.d.ts +6 -4
- package/dist/focus/control-state.d.ts.map +1 -1
- package/dist/focus/control-state.js +6 -4
- package/dist/focus/control-state.js.map +1 -1
- package/dist/focus/daemon-contexts-judgement.d.ts +6 -0
- package/dist/focus/daemon-contexts-judgement.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.d.ts +6 -0
- package/dist/focus/daemon-contexts.d.ts.map +1 -1
- package/dist/focus/daemon-contexts.js.map +1 -1
- package/dist/focus/focus-engine.d.ts.map +1 -1
- package/dist/focus/focus-engine.js +3 -1
- package/dist/focus/focus-engine.js.map +1 -1
- package/dist/focus/focus-executor.d.ts.map +1 -1
- package/dist/focus/focus-executor.js +3 -2
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-loop-registry.d.ts.map +1 -1
- package/dist/focus/focus-loop-registry.js +42 -0
- package/dist/focus/focus-loop-registry.js.map +1 -1
- package/dist/focus/focus-poller-auto-advance.d.ts +4 -2
- package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
- package/dist/focus/focus-poller-auto-advance.js +24 -18
- package/dist/focus/focus-poller-auto-advance.js.map +1 -1
- package/dist/focus/focus-poller-spawn.d.ts.map +1 -1
- package/dist/focus/focus-poller-spawn.js +8 -6
- package/dist/focus/focus-poller-spawn.js.map +1 -1
- package/dist/focus/heartbeat-metadata.d.ts +5 -0
- package/dist/focus/heartbeat-metadata.d.ts.map +1 -1
- package/dist/focus/heartbeat-metadata.js +12 -0
- package/dist/focus/heartbeat-metadata.js.map +1 -1
- package/dist/focus/heartbeat.d.ts +9 -2
- package/dist/focus/heartbeat.d.ts.map +1 -1
- package/dist/focus/heartbeat.js +10 -1
- package/dist/focus/heartbeat.js.map +1 -1
- package/dist/focus/host-pressure.d.ts +77 -0
- package/dist/focus/host-pressure.d.ts.map +1 -0
- package/dist/focus/host-pressure.js +83 -0
- package/dist/focus/host-pressure.js.map +1 -0
- package/dist/focus/pending-directive-gates.d.ts +14 -0
- package/dist/focus/pending-directive-gates.d.ts.map +1 -1
- package/dist/focus/pending-directive-gates.js +25 -1
- package/dist/focus/pending-directive-gates.js.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.d.ts +7 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts +1 -1
- package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
- package/dist/focus/pending-spawn-review-next-step.js +2 -0
- package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
- package/dist/focus/ready-focus-team-work.d.ts +9 -4
- package/dist/focus/ready-focus-team-work.d.ts.map +1 -1
- package/dist/focus/ready-focus-team-work.js +14 -3
- package/dist/focus/ready-focus-team-work.js.map +1 -1
- package/dist/focus/verify-open-issues.d.ts +3 -2
- package/dist/focus/verify-open-issues.d.ts.map +1 -1
- package/dist/focus/verify-open-issues.js +6 -4
- package/dist/focus/verify-open-issues.js.map +1 -1
- package/dist/focus/workstation-intervals.d.ts +83 -0
- package/dist/focus/workstation-intervals.d.ts.map +1 -0
- package/dist/focus/workstation-intervals.js +81 -0
- package/dist/focus/workstation-intervals.js.map +1 -0
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +5 -2
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +2 -2
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/git/types.js +1 -1
- package/dist/merge/candidate-ci-failures.d.ts +72 -0
- package/dist/merge/candidate-ci-failures.d.ts.map +1 -0
- package/dist/merge/candidate-ci-failures.js +240 -0
- package/dist/merge/candidate-ci-failures.js.map +1 -0
- package/dist/merge/candidate-red-record.d.ts +44 -0
- package/dist/merge/candidate-red-record.d.ts.map +1 -0
- package/dist/merge/candidate-red-record.js +98 -0
- package/dist/merge/candidate-red-record.js.map +1 -0
- package/dist/merge/candidate-rework.d.ts +4 -3
- package/dist/merge/candidate-rework.d.ts.map +1 -1
- package/dist/merge/candidate-rework.js +46 -14
- package/dist/merge/candidate-rework.js.map +1 -1
- package/dist/merge/candidate-tip-attribution.d.ts +135 -0
- package/dist/merge/candidate-tip-attribution.d.ts.map +1 -0
- package/dist/merge/candidate-tip-attribution.js +319 -0
- package/dist/merge/candidate-tip-attribution.js.map +1 -0
- package/dist/merge/completion-merge-driver.d.ts +49 -5
- package/dist/merge/completion-merge-driver.d.ts.map +1 -1
- package/dist/merge/completion-merge-driver.js +56 -2
- package/dist/merge/completion-merge-driver.js.map +1 -1
- package/dist/merge/completion-merge-gate.d.ts +4 -1
- package/dist/merge/completion-merge-gate.d.ts.map +1 -1
- package/dist/merge/completion-merge-gate.js +9 -8
- package/dist/merge/completion-merge-gate.js.map +1 -1
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +4 -1
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/prompt-sections/qa-author-section.d.ts.map +1 -1
- package/dist/prompt-sections/qa-author-section.js +18 -1
- package/dist/prompt-sections/qa-author-section.js.map +1 -1
- package/dist/prompt-sections/scoping-sections.d.ts +0 -12
- package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
- package/dist/prompt-sections/scoping-sections.js +16 -2
- package/dist/prompt-sections/scoping-sections.js.map +1 -1
- package/dist/prompts/bounded-universals.d.ts +13 -0
- package/dist/prompts/bounded-universals.d.ts.map +1 -0
- package/dist/prompts/bounded-universals.js +32 -0
- package/dist/prompts/bounded-universals.js.map +1 -0
- package/dist/queries/api-client/shared.d.ts +2 -1
- package/dist/queries/api-client/shared.d.ts.map +1 -1
- package/dist/queries/api-client/shared.js +36 -1
- package/dist/queries/api-client/shared.js.map +1 -1
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.d.ts +35 -0
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.d.ts.map +1 -0
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.js +42 -0
- package/dist/queries/candidate-ci-reds/candidate-ci-reds.js.map +1 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.d.ts +16 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.d.ts.map +1 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.js +51 -0
- package/dist/queries/candidate-ci-reds/gate-escape-files.js.map +1 -0
- package/dist/queries/deliveries/issues.d.ts.map +1 -1
- package/dist/queries/deliveries/issues.js +1 -0
- package/dist/queries/deliveries/issues.js.map +1 -1
- package/dist/queries/escalations/escalation-consumption.d.ts +13 -0
- package/dist/queries/escalations/escalation-consumption.d.ts.map +1 -1
- package/dist/queries/escalations/escalation-consumption.js +12 -2
- package/dist/queries/escalations/escalation-consumption.js.map +1 -1
- package/dist/queries/escalations/tower-escalations.d.ts +82 -0
- package/dist/queries/escalations/tower-escalations.d.ts.map +1 -0
- package/dist/queries/escalations/tower-escalations.js +97 -0
- package/dist/queries/escalations/tower-escalations.js.map +1 -0
- package/dist/queries/focus-review/recorded-concern-ids.d.ts +48 -11
- package/dist/queries/focus-review/recorded-concern-ids.d.ts.map +1 -1
- package/dist/queries/focus-review/recorded-concern-ids.js +42 -12
- package/dist/queries/focus-review/recorded-concern-ids.js.map +1 -1
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts +37 -0
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js +64 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -0
- package/dist/queries/focus-review/review-finding-facts.d.ts +18 -6
- package/dist/queries/focus-review/review-finding-facts.d.ts.map +1 -1
- package/dist/queries/focus-review/review-finding-facts.js +21 -8
- package/dist/queries/focus-review/review-finding-facts.js.map +1 -1
- package/dist/queries/focuses/ended-arm.d.ts +56 -13
- package/dist/queries/focuses/ended-arm.d.ts.map +1 -1
- package/dist/queries/focuses/ended-arm.js +40 -14
- package/dist/queries/focuses/ended-arm.js.map +1 -1
- package/dist/queries/focuses/focus-criteria-standing.d.ts +12 -0
- package/dist/queries/focuses/focus-criteria-standing.d.ts.map +1 -1
- package/dist/queries/focuses/focus-criteria-standing.js +13 -0
- package/dist/queries/focuses/focus-criteria-standing.js.map +1 -1
- package/dist/queries/focuses/focus-discovery.d.ts +14 -3
- package/dist/queries/focuses/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focuses/focus-discovery.js +2 -19
- package/dist/queries/focuses/focus-discovery.js.map +1 -1
- package/dist/queries/focuses/focuses.d.ts +15 -12
- package/dist/queries/focuses/focuses.d.ts.map +1 -1
- package/dist/queries/focuses/focuses.js +15 -13
- 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/sessions/sessions.d.ts.map +1 -1
- package/dist/queries/sessions/sessions.js +2 -1
- package/dist/queries/sessions/sessions.js.map +1 -1
- package/dist/queries/tower-decisions/tower-decisions.d.ts +103 -0
- package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -0
- package/dist/queries/tower-decisions/tower-decisions.js +138 -0
- package/dist/queries/tower-decisions/tower-decisions.js.map +1 -0
- package/dist/queries/verification/verification.js +1 -1
- package/dist/queries/wire-schemas/schemas.d.ts +2 -0
- package/dist/queries/wire-schemas/schemas.d.ts.map +1 -1
- package/dist/queries/wire-schemas/schemas.js +8 -2
- package/dist/queries/wire-schemas/schemas.js.map +1 -1
- package/dist/queries/workstation-intervals/workstation-intervals.d.ts +52 -0
- package/dist/queries/workstation-intervals/workstation-intervals.d.ts.map +1 -0
- package/dist/queries/workstation-intervals/workstation-intervals.js +49 -0
- package/dist/queries/workstation-intervals/workstation-intervals.js.map +1 -0
- package/dist/resolvers/escalation-answers.d.ts +31 -0
- package/dist/resolvers/escalation-answers.d.ts.map +1 -1
- package/dist/resolvers/escalation-answers.js +31 -17
- package/dist/resolvers/escalation-answers.js.map +1 -1
- package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
- package/dist/resolvers/focus-criteria-standing.js +20 -0
- package/dist/resolvers/focus-criteria-standing.js.map +1 -1
- package/dist/shell/unified-engine-lifecycle.d.ts +11 -1
- package/dist/shell/unified-engine-lifecycle.d.ts.map +1 -1
- package/dist/shell/unified-engine-lifecycle.js +10 -1
- package/dist/shell/unified-engine-lifecycle.js.map +1 -1
- package/dist/shell/unified-shell.d.ts +25 -0
- package/dist/shell/unified-shell.d.ts.map +1 -1
- package/dist/shell/unified-shell.js +26 -80
- package/dist/shell/unified-shell.js.map +1 -1
- package/dist/shell/update-restart.d.ts +47 -0
- package/dist/shell/update-restart.d.ts.map +1 -0
- package/dist/shell/update-restart.js +124 -0
- package/dist/shell/update-restart.js.map +1 -0
- package/dist/spawn/directive-dispatch.d.ts.map +1 -1
- package/dist/spawn/directive-dispatch.js +1 -0
- package/dist/spawn/directive-dispatch.js.map +1 -1
- package/dist/spawn/lead-continuation.d.ts +4 -3
- package/dist/spawn/lead-continuation.d.ts.map +1 -1
- package/dist/spawn/lead-continuation.js.map +1 -1
- package/dist/spawn/live-answer-delivery.d.ts +53 -0
- package/dist/spawn/live-answer-delivery.d.ts.map +1 -0
- package/dist/spawn/live-answer-delivery.js +26 -0
- package/dist/spawn/live-answer-delivery.js.map +1 -0
- package/dist/spawn/routing-decider-spawn.d.ts +64 -2
- package/dist/spawn/routing-decider-spawn.d.ts.map +1 -1
- package/dist/spawn/routing-decider-spawn.js +65 -20
- package/dist/spawn/routing-decider-spawn.js.map +1 -1
- package/dist/spawn/worktree-session.d.ts +7 -5
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +11 -7
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/supervision/escalation-suppression.js +1 -1
- package/dist/supervision/review-cycle-cap-hold.d.ts +11 -5
- package/dist/supervision/review-cycle-cap-hold.d.ts.map +1 -1
- package/dist/supervision/review-cycle-cap-hold.js +29 -11
- package/dist/supervision/review-cycle-cap-hold.js.map +1 -1
- package/dist/supervision/review-loop-detector.d.ts +48 -0
- package/dist/supervision/review-loop-detector.d.ts.map +1 -0
- package/dist/supervision/review-loop-detector.js +13 -0
- package/dist/supervision/review-loop-detector.js.map +1 -0
- package/dist/supervision/review-loop-hold.d.ts +29 -0
- package/dist/supervision/review-loop-hold.d.ts.map +1 -0
- package/dist/supervision/review-loop-hold.js +99 -0
- package/dist/supervision/review-loop-hold.js.map +1 -0
- package/dist/supervision/stall-detector-config.d.ts +8 -0
- package/dist/supervision/stall-detector-config.d.ts.map +1 -1
- package/dist/supervision/stall-detector-config.js +14 -3
- package/dist/supervision/stall-detector-config.js.map +1 -1
- package/dist/supervision/stop-registry.d.ts +3 -0
- package/dist/supervision/stop-registry.d.ts.map +1 -1
- package/dist/supervision/stop-registry.js +3 -1
- package/dist/supervision/stop-registry.js.map +1 -1
- package/dist/supervision/stop-rows-review-loop.d.ts +35 -0
- package/dist/supervision/stop-rows-review-loop.d.ts.map +1 -0
- package/dist/supervision/stop-rows-review-loop.js +150 -0
- package/dist/supervision/stop-rows-review-loop.js.map +1 -0
- package/dist/supervision/stop-rows-team-session.d.ts +1 -1
- package/dist/supervision/stop-rows-team-session.d.ts.map +1 -1
- package/dist/supervision/stop-rows-team-session.js.map +1 -1
- package/dist/supervision/unreviewed-settle-detector.d.ts +7 -2
- package/dist/supervision/unreviewed-settle-detector.d.ts.map +1 -1
- package/dist/supervision/unreviewed-settle-detector.js +15 -2
- package/dist/supervision/unreviewed-settle-detector.js.map +1 -1
- package/dist/templates/agents-md.d.ts.map +1 -1
- package/dist/templates/agents-md.js +1 -0
- package/dist/templates/agents-md.js.map +1 -1
- package/dist/templates/claude-md.d.ts +1 -1
- package/dist/templates/claude-md.d.ts.map +1 -1
- package/dist/templates/claude-md.js +12 -0
- package/dist/templates/claude-md.js.map +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/completion-judge-stubs.d.ts +7 -2
- package/dist/testing/fixtures/completion-judge-stubs.d.ts.map +1 -1
- package/dist/testing/fixtures/completion-judge-stubs.js +11 -1
- package/dist/testing/fixtures/completion-judge-stubs.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/merge-log-capture.d.ts.map +1 -1
- package/dist/testing/fixtures/merge-log-capture.js +1 -0
- package/dist/testing/fixtures/merge-log-capture.js.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.d.ts +4 -0
- package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +15 -2
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/testing/fixtures/recording-api-client.js +1 -1
- package/dist/testing/fixtures/review-exit-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/review-exit-deps.js +3 -1
- package/dist/testing/fixtures/review-exit-deps.js.map +1 -1
- package/dist/testing/fixtures/review-loop.d.ts +19 -0
- package/dist/testing/fixtures/review-loop.d.ts.map +1 -0
- package/dist/testing/fixtures/review-loop.js +30 -0
- package/dist/testing/fixtures/review-loop.js.map +1 -0
- package/dist/testing/fixtures/shortfall-rework-hold-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/shortfall-rework-hold-deps.js +1 -0
- package/dist/testing/fixtures/shortfall-rework-hold-deps.js.map +1 -1
- package/dist/testing/fixtures/tower-loop.d.ts +28 -0
- package/dist/testing/fixtures/tower-loop.d.ts.map +1 -0
- package/dist/testing/fixtures/tower-loop.js +83 -0
- package/dist/testing/fixtures/tower-loop.js.map +1 -0
- package/dist/testing/fixtures/verification-deps.d.ts +7 -0
- package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/verification-deps.js +17 -1
- package/dist/testing/fixtures/verification-deps.js.map +1 -1
- package/dist/testing/fixtures/vitest-failure-log.d.ts.map +1 -1
- package/dist/testing/fixtures/vitest-failure-log.js +2 -1
- package/dist/testing/fixtures/vitest-failure-log.js.map +1 -1
- package/dist/tower/tower-escalation-gather.d.ts +33 -0
- package/dist/tower/tower-escalation-gather.d.ts.map +1 -0
- package/dist/tower/tower-escalation-gather.js +38 -0
- package/dist/tower/tower-escalation-gather.js.map +1 -0
- package/dist/tower/tower-escalation-prompt.d.ts +62 -0
- package/dist/tower/tower-escalation-prompt.d.ts.map +1 -0
- package/dist/tower/tower-escalation-prompt.js +130 -0
- package/dist/tower/tower-escalation-prompt.js.map +1 -0
- package/dist/tower/tower-escalation-routing.d.ts +49 -0
- package/dist/tower/tower-escalation-routing.d.ts.map +1 -0
- package/dist/tower/tower-escalation-routing.js +53 -0
- package/dist/tower/tower-escalation-routing.js.map +1 -0
- package/dist/tower/tower-escalation-session.d.ts +149 -0
- package/dist/tower/tower-escalation-session.d.ts.map +1 -0
- package/dist/tower/tower-escalation-session.js +238 -0
- package/dist/tower/tower-escalation-session.js.map +1 -0
- package/dist/tower/tower-supervisor-history.d.ts +129 -0
- package/dist/tower/tower-supervisor-history.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-history.js +217 -0
- package/dist/tower/tower-supervisor-history.js.map +1 -0
- package/dist/tower/tower-supervisor-prompt.d.ts +21 -0
- package/dist/tower/tower-supervisor-prompt.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-prompt.js +205 -0
- package/dist/tower/tower-supervisor-prompt.js.map +1 -0
- package/dist/tower/tower-supervisor-session.d.ts +220 -0
- package/dist/tower/tower-supervisor-session.d.ts.map +1 -0
- package/dist/tower/tower-supervisor-session.js +307 -0
- package/dist/tower/tower-supervisor-session.js.map +1 -0
- package/dist/tower/tower-supervisor.d.ts +86 -0
- package/dist/tower/tower-supervisor.d.ts.map +1 -0
- package/dist/tower/tower-supervisor.js +8 -0
- package/dist/tower/tower-supervisor.js.map +1 -0
- package/dist/types/index.js +1 -1
- package/dist/update/auto-update.d.ts +11 -5
- package/dist/update/auto-update.d.ts.map +1 -1
- package/dist/update/auto-update.js +11 -5
- package/dist/update/auto-update.js.map +1 -1
- package/dist/update/restart-contract.d.ts +62 -0
- package/dist/update/restart-contract.d.ts.map +1 -0
- package/dist/update/restart-contract.js +137 -0
- package/dist/update/restart-contract.js.map +1 -0
- package/dist/verify/attribution/verification-baseline-run.d.ts.map +1 -1
- package/dist/verify/attribution/verification-baseline-run.js +1 -0
- package/dist/verify/attribution/verification-baseline-run.js.map +1 -1
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts +3 -0
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts.map +1 -1
- package/dist/verify/ci-gate/ci-gate-dispatch.js +31 -9
- package/dist/verify/ci-gate/ci-gate-dispatch.js.map +1 -1
- package/dist/verify/ci-gate/ci-gate-wait-record.d.ts +6 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.d.ts.map +1 -1
- package/dist/verify/ci-gate/ci-gate-wait-record.js +1 -0
- package/dist/verify/ci-gate/ci-gate-wait-record.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.d.ts +12 -2
- package/dist/verify/deterministic-gate/verification-checkout.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-checkout.js +18 -3
- package/dist/verify/deterministic-gate/verification-checkout.js.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js +1 -1
- package/dist/verify/deterministic-gate/verification-failure-parser.d.ts +30 -9
- package/dist/verify/deterministic-gate/verification-failure-parser.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-failure-parser.js +52 -8
- package/dist/verify/deterministic-gate/verification-failure-parser.js.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.d.ts.map +1 -1
- package/dist/verify/engine/verification-commit-sharing.js +6 -2
- package/dist/verify/engine/verification-commit-sharing.js.map +1 -1
- package/dist/verify/engine/verification-deps.d.ts +9 -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 +4 -1
- package/dist/verify/engine/verification-engine.js.map +1 -1
- package/dist/verify/escaped-tests/escaped-pass-store.d.ts +19 -0
- package/dist/verify/escaped-tests/escaped-pass-store.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-pass-store.js +90 -0
- package/dist/verify/escaped-tests/escaped-pass-store.js.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-run.d.ts +39 -0
- package/dist/verify/escaped-tests/escaped-test-run.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-run.js +156 -0
- package/dist/verify/escaped-tests/escaped-test-run.js.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-set.d.ts +65 -0
- package/dist/verify/escaped-tests/escaped-test-set.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-test-set.js +95 -0
- package/dist/verify/escaped-tests/escaped-test-set.js.map +1 -0
- package/dist/verify/escaped-tests/escaped-tests-source.d.ts +44 -0
- package/dist/verify/escaped-tests/escaped-tests-source.d.ts.map +1 -0
- package/dist/verify/escaped-tests/escaped-tests-source.js +142 -0
- package/dist/verify/escaped-tests/escaped-tests-source.js.map +1 -0
- package/dist/verify/gate-config/verification-manifest.d.ts +12 -1
- package/dist/verify/gate-config/verification-manifest.d.ts.map +1 -1
- package/dist/verify/gate-config/verification-manifest.js +12 -1
- package/dist/verify/gate-config/verification-manifest.js.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts +4 -4
- package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-issue.js +16 -6
- package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
- package/package.json +3 -3
- package/scripts/telora-daemon-wrapper.sh +16 -7
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DaemonConfig } from '../types/index.js';
|
|
2
|
+
import { type OneShotJudgementIdentity } from '../spawn/routing-decider-spawn.js';
|
|
3
|
+
import type { TowerSupervisor } from '../tower/tower-supervisor.js';
|
|
4
|
+
import { type TowerSupervisorDeps } from '../tower/tower-supervisor-session.js';
|
|
5
|
+
import { type LoopHistoryDeps } from '../tower/tower-supervisor-history.js';
|
|
6
|
+
import type { ReviewLoopDetectionDeps } from '../completion/review-cycle-budget/review-loop-detection.js';
|
|
7
|
+
import type { ReviewLoopHoldDeps } from '../supervision/review-loop-hold.js';
|
|
8
|
+
/** The context ladder a supervisor reads: the focus, its stamped criteria and where they stand, the loop. */
|
|
9
|
+
export declare const TOWER_SUPERVISOR_CONTEXT_RECIPE: readonly string[];
|
|
10
|
+
/**
|
|
11
|
+
* The supervisor session's identity on the shared one-shot judgement process.
|
|
12
|
+
* `mcpProfile` hands it ONLY the scoped `tower_supervisor` MCP surface (inline
|
|
13
|
+
* --mcp-config + --strict-mcp-config), never the cwd's .mcp.json.
|
|
14
|
+
*/
|
|
15
|
+
export declare const TOWER_SUPERVISOR_IDENTITY: OneShotJudgementIdentity;
|
|
16
|
+
/** Assemble a context recipe for a focus (the supervisor's reads; the escalation supervisor reuses it). */
|
|
17
|
+
export declare function assembleFocusRecipe(recipe: readonly string[], focusId: string, productId: string, config: DaemonConfig): Promise<string>;
|
|
18
|
+
/** The history gathering's reads: the API, git in the focus worktree, and the product repo's files. */
|
|
19
|
+
export declare const LOOP_HISTORY_DEPS: LoopHistoryDeps;
|
|
20
|
+
/** The supervisor's production collaborators. */
|
|
21
|
+
export declare function buildTowerSupervisorDeps(): TowerSupervisorDeps;
|
|
22
|
+
/** The process's Tower supervisor (built once). */
|
|
23
|
+
export declare function productionTowerSupervisor(): TowerSupervisor;
|
|
24
|
+
/** The detection's collaborators (ReviewExitDeps.reviewLoop). */
|
|
25
|
+
export declare function buildReviewLoopDetectionDeps(): ReviewLoopDetectionDeps;
|
|
26
|
+
/** The hold's read (ReviewCycleCapHoldDeps.reviewLoopHold). */
|
|
27
|
+
export declare const REVIEW_LOOP_HOLD_DEPS: ReviewLoopHoldDeps;
|
|
28
|
+
//# sourceMappingURL=review-loop-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-loop-context.d.ts","sourceRoot":"","sources":["../../src/composition/review-loop-context.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAoBtD,OAAO,EAAgC,KAAK,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAEhH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAuD,KAAK,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AACrI,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AAC1G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAI7E,6GAA6G;AAC7G,eAAO,MAAM,+BAA+B,EAAE,SAAS,MAAM,EAAiE,CAAC;AAE/H;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,wBAMvC,CAAC;AAEF,2GAA2G;AAC3G,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAClF,OAAO,CAAC,MAAM,CAAC,CAYjB;AAMD,uGAAuG;AACvG,eAAO,MAAM,iBAAiB,EAAE,eAQ/B,CAAC;AAEF,iDAAiD;AACjD,wBAAgB,wBAAwB,IAAI,mBAAmB,CA8C9D;AAKD,mDAAmD;AACnD,wBAAgB,yBAAyB,IAAI,eAAe,CAG3D;AAED,iEAAiE;AACjE,wBAAgB,4BAA4B,IAAI,uBAAuB,CAQtE;AAED,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB,EAAE,kBAA4C,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/tower/tower-supervisor.test.ts
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* The production binding of the non-converging review-loop machinery: the
|
|
6
|
+
* detection the review exit runs ahead of the review budget
|
|
7
|
+
* (completion/review-cycle-budget/review-loop-detection.ts), the hold every
|
|
8
|
+
* spawn gate reads (supervision/review-loop-hold.ts), and the Tower
|
|
9
|
+
* supervisor a held loop is handed to (tower/tower-supervisor-session.ts) --
|
|
10
|
+
* its reads, its history gathering, its one-shot session process and its one
|
|
11
|
+
* filing. One supervisor per process: the review exit hands it new loops and
|
|
12
|
+
* the focus engine's sweep (focus/focus-loop-registry.ts) hands it the rest.
|
|
13
|
+
*
|
|
14
|
+
* @module composition/review-loop-context
|
|
15
|
+
*/
|
|
16
|
+
import { randomUUID } from 'node:crypto';
|
|
17
|
+
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
18
|
+
import { ESCALATION_REASONS } from '@telora/daemon-core';
|
|
19
|
+
import { configForProduct, findProduct } from '../config/config.js';
|
|
20
|
+
import { liveDaemonConfig } from '../config/live-daemon-config.js';
|
|
21
|
+
import { listReviewCriterionVerdicts } from '../queries/focus-review/review-criterion-verdicts.js';
|
|
22
|
+
import { escalateRepeatReviewLoop, listOpenReviewLoops, listTowerDecisions, recordTowerDecision, } from '../queries/tower-decisions/tower-decisions.js';
|
|
23
|
+
import { getActiveFocuses } from '../queries/focuses/focus-discovery.js';
|
|
24
|
+
import { getFocusDeliveries, getFocusIssues } from '../queries/focuses/focuses.js';
|
|
25
|
+
import { DISPOSITION_AGENT_RESOLVABLE } from '../queries/escalations/escalation-dispositions.js';
|
|
26
|
+
import { resolveReviewLoopThreshold } from '../supervision/stall-detector-config.js';
|
|
27
|
+
import { createEscalation } from '../supervision/escalation-filing.js';
|
|
28
|
+
import { clearPendingReviewDirective } from '../directive/directive-queue.js';
|
|
29
|
+
import { getFocusWorktree } from '../worktree/focus-worktree-state.js';
|
|
30
|
+
import { runGitSync } from '../git/types.js';
|
|
31
|
+
import { resolveAssemblyRecipeWithManifest } from '../resolvers/assembly-engine.js';
|
|
32
|
+
import { initResolvers } from '../resolvers/index.js';
|
|
33
|
+
import { spawnOneShotJudgementSession } from '../spawn/routing-decider-spawn.js';
|
|
34
|
+
import { getGovernor } from '../focus/focus-executor.js';
|
|
35
|
+
import { createTowerSupervisor, TOWER_SUPERVISOR_MCP_PROFILE } from '../tower/tower-supervisor-session.js';
|
|
36
|
+
import { gatherLoopHistory } from '../tower/tower-supervisor-history.js';
|
|
37
|
+
import { buildResolverContexts } from './execution-resolver-context.js';
|
|
38
|
+
import { buildRoutingDeciderSpawnSeam } from './execution-spawn-context.js';
|
|
39
|
+
/** The context ladder a supervisor reads: the focus, its stamped criteria and where they stand, the loop. */
|
|
40
|
+
export const TOWER_SUPERVISOR_CONTEXT_RECIPE = ['focus.context', 'focus.criteria_standing', 'loop.context'];
|
|
41
|
+
/**
|
|
42
|
+
* The supervisor session's identity on the shared one-shot judgement process.
|
|
43
|
+
* `mcpProfile` hands it ONLY the scoped `tower_supervisor` MCP surface (inline
|
|
44
|
+
* --mcp-config + --strict-mcp-config), never the cwd's .mcp.json.
|
|
45
|
+
*/
|
|
46
|
+
export const TOWER_SUPERVISOR_IDENTITY = {
|
|
47
|
+
label: 'tower-supervisor',
|
|
48
|
+
phase: 'tower_supervision',
|
|
49
|
+
envVar: 'TELORA_DAEMON_TOWER_SUPERVISOR',
|
|
50
|
+
metadataKey: 'towerDecisionId',
|
|
51
|
+
mcpProfile: TOWER_SUPERVISOR_MCP_PROFILE,
|
|
52
|
+
};
|
|
53
|
+
/** Assemble a context recipe for a focus (the supervisor's reads; the escalation supervisor reuses it). */
|
|
54
|
+
export async function assembleFocusRecipe(recipe, focusId, productId, config) {
|
|
55
|
+
initResolvers(buildResolverContexts());
|
|
56
|
+
const deliveries = await getFocusDeliveries(focusId).catch(() => []);
|
|
57
|
+
const ctx = {
|
|
58
|
+
focusId,
|
|
59
|
+
deliveryIds: deliveries.map((d) => d.id),
|
|
60
|
+
worktreePath: getFocusWorktree(focusId)?.worktreePath ?? null,
|
|
61
|
+
config,
|
|
62
|
+
organizationId: config.organizationId,
|
|
63
|
+
productId,
|
|
64
|
+
};
|
|
65
|
+
return (await resolveAssemblyRecipeWithManifest([...recipe], ctx)).content;
|
|
66
|
+
}
|
|
67
|
+
function assembleSupervisorContext(focusId, productId, config) {
|
|
68
|
+
return assembleFocusRecipe(TOWER_SUPERVISOR_CONTEXT_RECIPE, focusId, productId, config);
|
|
69
|
+
}
|
|
70
|
+
/** The history gathering's reads: the API, git in the focus worktree, and the product repo's files. */
|
|
71
|
+
export const LOOP_HISTORY_DEPS = {
|
|
72
|
+
listReviewCriterionVerdicts,
|
|
73
|
+
getFocusIssues,
|
|
74
|
+
getFocusDeliveries,
|
|
75
|
+
assembleFocusContext: assembleSupervisorContext,
|
|
76
|
+
runGit: (args, cwd) => runGitSync(args, cwd),
|
|
77
|
+
readTextFile: (path) => (existsSync(path) && statSync(path).isFile() ? readFileSync(path, 'utf8') : null),
|
|
78
|
+
listDirectory: (path) => (existsSync(path) && statSync(path).isDirectory() ? readdirSync(path) : null),
|
|
79
|
+
};
|
|
80
|
+
/** The supervisor's production collaborators. */
|
|
81
|
+
export function buildTowerSupervisorDeps() {
|
|
82
|
+
const seam = buildRoutingDeciderSpawnSeam();
|
|
83
|
+
return {
|
|
84
|
+
readConfig: () => liveDaemonConfig,
|
|
85
|
+
productConfig: (config, productId) => {
|
|
86
|
+
const product = findProduct(config, productId);
|
|
87
|
+
return product ? configForProduct(config, product) : null;
|
|
88
|
+
},
|
|
89
|
+
readGovernor: getGovernor,
|
|
90
|
+
listOpenReviewLoops,
|
|
91
|
+
listTowerDecisions,
|
|
92
|
+
recordTowerDecision,
|
|
93
|
+
escalateRepeatReviewLoop,
|
|
94
|
+
findFocus: async (focusId, productId) => {
|
|
95
|
+
const focus = (await getActiveFocuses('', productId ?? undefined)).find((f) => f.focus_id === focusId);
|
|
96
|
+
return focus && focus.product_id
|
|
97
|
+
? { focusId, focusName: focus.focus_name, focusDescription: focus.focus_description, productId: focus.product_id }
|
|
98
|
+
: null;
|
|
99
|
+
},
|
|
100
|
+
focusWorktreePath: (focusId) => getFocusWorktree(focusId)?.worktreePath ?? null,
|
|
101
|
+
gatherHistory: (args) => gatherLoopHistory(LOOP_HISTORY_DEPS, args),
|
|
102
|
+
spawn: (opts) => spawnOneShotJudgementSession({
|
|
103
|
+
config: opts.config, prompt: opts.prompt, cwd: opts.cwd, focusId: opts.focusId, escalationId: opts.loopDecisionId,
|
|
104
|
+
model: opts.model, timeoutMs: opts.timeoutMs, allowedTools: opts.allowedTools,
|
|
105
|
+
}, seam, TOWER_SUPERVISOR_IDENTITY),
|
|
106
|
+
// The daemon's one filing for a loop no supervisor could decide: machine lane, through the chokepoint.
|
|
107
|
+
fileUndecidedLoop: async (filing) => {
|
|
108
|
+
const res = await createEscalation({
|
|
109
|
+
organizationId: filing.organizationId,
|
|
110
|
+
issueId: null,
|
|
111
|
+
reasonType: ESCALATION_REASONS.DECISION_NEEDED,
|
|
112
|
+
disposition: DISPOSITION_AGENT_RESOLVABLE,
|
|
113
|
+
escalationKind: filing.escalationKind,
|
|
114
|
+
anchor: { focusId: filing.focusId },
|
|
115
|
+
productId: filing.productId,
|
|
116
|
+
focusId: filing.focusId,
|
|
117
|
+
description: filing.description,
|
|
118
|
+
whatWasTried: filing.whatWasTried,
|
|
119
|
+
helpNeeded: filing.helpNeeded,
|
|
120
|
+
metadata: filing.metadata,
|
|
121
|
+
});
|
|
122
|
+
return { escalationId: res.escalationId ?? res.incidentEscalationId ?? null };
|
|
123
|
+
},
|
|
124
|
+
dropPendingReviewDirective: clearPendingReviewDirective,
|
|
125
|
+
newSessionId: randomUUID,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/** The one Tower supervisor of the process. */
|
|
129
|
+
let towerSupervisor = null;
|
|
130
|
+
/** The process's Tower supervisor (built once). */
|
|
131
|
+
export function productionTowerSupervisor() {
|
|
132
|
+
towerSupervisor ??= createTowerSupervisor(buildTowerSupervisorDeps());
|
|
133
|
+
return towerSupervisor;
|
|
134
|
+
}
|
|
135
|
+
/** The detection's collaborators (ReviewExitDeps.reviewLoop). */
|
|
136
|
+
export function buildReviewLoopDetectionDeps() {
|
|
137
|
+
return {
|
|
138
|
+
listReviewCriterionVerdicts,
|
|
139
|
+
listTowerDecisions,
|
|
140
|
+
recordTowerDecision,
|
|
141
|
+
resolveReviewLoopThreshold,
|
|
142
|
+
towerSupervisor: productionTowerSupervisor(),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/** The hold's read (ReviewCycleCapHoldDeps.reviewLoopHold). */
|
|
146
|
+
export const REVIEW_LOOP_HOLD_DEPS = { listOpenReviewLoops };
|
|
147
|
+
//# sourceMappingURL=review-loop-context.js.map
|
|
@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C,cAAc;gBACrC,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,kBAAkB,CAAC,eAAe;gBAC9C,WAAW,EAAE,4BAA4B;gBACzC,cAAc,EAAE,MAAM,CAAC,cAAc;gBACrC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;gBACnC,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,YAAY,EAAE,MAAM,CAAC,YAAY;gBACjC,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;aAC1B,CAAC,CAAC;YACH,OAAO,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,oBAAoB,IAAI,IAAI,EAAE,CAAC;QAChF,CAAC;QACD,0BAA0B,EAAE,2BAA2B;QACvD,YAAY,EAAE,UAAU;KACzB,CAAC;AACJ,CAAC;AAED,+CAA+C;AAC/C,IAAI,eAAe,GAA2B,IAAI,CAAC;AAEnD,mDAAmD;AACnD,MAAM,UAAU,yBAAyB;IACvC,eAAe,KAAK,qBAAqB,CAAC,wBAAwB,EAAE,CAAC,CAAC;IACtE,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,2BAA2B;QAC3B,kBAAkB;QAClB,mBAAmB;QACnB,0BAA0B;QAC1B,eAAe,EAAE,yBAAyB,EAAE;KAC7C,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAuB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -2,6 +2,17 @@ import type { DaemonConfig } from '../types/index.js';
|
|
|
2
2
|
import { type HeartbeatContext } from '../focus/heartbeat.js';
|
|
3
3
|
import { type ComputeBranchStatusDeps } from '../focus/branch-status.js';
|
|
4
4
|
import { type MigrationHeldSetProducerDeps } from '../focus/migration-held-set-publish.js';
|
|
5
|
+
import { type HostPsiReading } from '../focus/host-pressure.js';
|
|
6
|
+
/** Where Linux publishes PSI. The production reader reads here unless told otherwise. */
|
|
7
|
+
export declare const PROC_PRESSURE_DIR = "/proc/pressure";
|
|
8
|
+
/**
|
|
9
|
+
* The host's PSI reading off `pressureDir` (/proc/pressure in production); null
|
|
10
|
+
* when the host has no PSI. The directory is a parameter so a test can drive this
|
|
11
|
+
* exact reader -- the one the heartbeat context binds -- over fixture files.
|
|
12
|
+
*/
|
|
13
|
+
export declare function readProductionHostPressure(pressureDir?: string): HostPsiReading | null;
|
|
14
|
+
/** The host's logical CPU count; 0 (published as no count) when it cannot be read. */
|
|
15
|
+
export declare function readProductionHostCores(): number;
|
|
5
16
|
/** computeBranchStatus's git/state reads and health-event signal. */
|
|
6
17
|
export declare function buildBranchStatusDeps(): ComputeBranchStatusDeps;
|
|
7
18
|
/** The heartbeat's collaborators, over the execution contexts' migration held-set producer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-heartbeat-context.d.ts","sourceRoot":"","sources":["../../src/composition/runtime-heartbeat-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-heartbeat-context.d.ts","sourceRoot":"","sources":["../../src/composition/runtime-heartbeat-context.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAQrF,OAAO,EAAuB,KAAK,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,wCAAwC,CAAC;AAOhD,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAK7E,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,GAAE,MAA0B,GAAG,cAAc,GAAG,IAAI,CAEzG;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,IAAI,MAAM,CAMhD;AAED,qEAAqE;AACrE,wBAAgB,qBAAqB,IAAI,uBAAuB,CAQ/D;AAED,+FAA+F;AAC/F,wBAAgB,qBAAqB,CACnC,wBAAwB,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,4BAA4B,GAC/E,gBAAgB,CAyBlB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
2
|
// Pinned by: packages/daemon/src/focus/heartbeat-host-load.test.ts,
|
|
3
|
+
// packages/daemon/src/focus/heartbeat-host-pressure.test.ts,
|
|
3
4
|
// packages/daemon/src/focus/heartbeat-mcp-version.test.ts,
|
|
4
5
|
// packages/daemon/src/focus/heartbeat-migration-held-set.test.ts,
|
|
5
6
|
// packages/daemon/src/migrations/claim-production-wiring.test.ts
|
|
@@ -9,7 +10,8 @@
|
|
|
9
10
|
* focus/heartbeat.ts): the connection-row sender and disconnect, the backend
|
|
10
11
|
* probe, the per-product branch status over real git and the live worktree /
|
|
11
12
|
* team registries, the focus activity record's live sources, the per-product migration held set, the executed-MCP
|
|
12
|
-
* version read,
|
|
13
|
+
* version read, the host's load averages (node:os), core count and PSI pressure (/proc/pressure),
|
|
14
|
+
* and the workstation capacity close a graceful stop writes before its disconnect.
|
|
13
15
|
*
|
|
14
16
|
* Part of the daemon composition root (runtime contexts, member `heartbeat`).
|
|
15
17
|
* The migration held set's producer is the execution contexts' own
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
import { liveTeamLivenessPhaseSources } from './team-liveness-phase-sources.js';
|
|
22
24
|
import { liveFocusActivitySources } from './focus-activity-live-sources.js';
|
|
23
25
|
import { readFileSync } from 'node:fs';
|
|
26
|
+
import { join } from 'node:path';
|
|
24
27
|
import { loadavg } from 'node:os';
|
|
25
28
|
import { healthEvents } from '@telora/daemon-core';
|
|
26
29
|
import { HEARTBEAT_INTERVAL_MS } from '../focus/heartbeat.js';
|
|
@@ -35,6 +38,29 @@ import { getAllFocusWorktrees } from '../worktree/focus-worktree-state.js';
|
|
|
35
38
|
import { getActiveTeams } from '../daemon-state/focus-team-state.js';
|
|
36
39
|
import { buildTowerStatusByProduct } from '../tower/tower-heartbeat-status.js';
|
|
37
40
|
import { PRODUCTION_TOWER_ADMISSION } from './tower-pass-context.js';
|
|
41
|
+
import { readHostPsi } from '../focus/host-pressure.js';
|
|
42
|
+
import { readHostCapacity } from '../config/session-cap.js';
|
|
43
|
+
import { WORKSTATION_CAPACITY_CLOSE_TIMEOUT_MS } from '../focus/workstation-intervals.js';
|
|
44
|
+
import { PRODUCTION_WORKSTATION_INTERVALS } from './workstation-intervals-context.js';
|
|
45
|
+
/** Where Linux publishes PSI. The production reader reads here unless told otherwise. */
|
|
46
|
+
export const PROC_PRESSURE_DIR = '/proc/pressure';
|
|
47
|
+
/**
|
|
48
|
+
* The host's PSI reading off `pressureDir` (/proc/pressure in production); null
|
|
49
|
+
* when the host has no PSI. The directory is a parameter so a test can drive this
|
|
50
|
+
* exact reader -- the one the heartbeat context binds -- over fixture files.
|
|
51
|
+
*/
|
|
52
|
+
export function readProductionHostPressure(pressureDir = PROC_PRESSURE_DIR) {
|
|
53
|
+
return readHostPsi((resource) => readFileSync(join(pressureDir, resource), 'utf8'));
|
|
54
|
+
}
|
|
55
|
+
/** The host's logical CPU count; 0 (published as no count) when it cannot be read. */
|
|
56
|
+
export function readProductionHostCores() {
|
|
57
|
+
try {
|
|
58
|
+
return readHostCapacity().cores;
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
38
64
|
/** computeBranchStatus's git/state reads and health-event signal. */
|
|
39
65
|
export function buildBranchStatusDeps() {
|
|
40
66
|
return {
|
|
@@ -62,8 +88,13 @@ export function buildHeartbeatContext(migrationHeldSetProducer) {
|
|
|
62
88
|
readExecutedMcpVersion: () => readExecutedMcpVersion(resolveMcpServerPath, (path) => readFileSync(path, 'utf8')),
|
|
63
89
|
readTowerStatus: (cfg) => buildTowerStatusByProduct(cfg.products, PRODUCTION_TOWER_ADMISSION),
|
|
64
90
|
readHostLoad: loadavg,
|
|
91
|
+
readHostPressure: readProductionHostPressure,
|
|
92
|
+
readHostCores: readProductionHostCores,
|
|
93
|
+
},
|
|
94
|
+
stop: {
|
|
95
|
+
sendDisconnect,
|
|
96
|
+
closeWorkstationCapacity: () => PRODUCTION_WORKSTATION_INTERVALS.stop(WORKSTATION_CAPACITY_CLOSE_TIMEOUT_MS),
|
|
65
97
|
},
|
|
66
|
-
stop: { sendDisconnect },
|
|
67
98
|
};
|
|
68
99
|
}
|
|
69
100
|
//# sourceMappingURL=runtime-heartbeat-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-heartbeat-context.js","sourceRoot":"","sources":["../../src/composition/runtime-heartbeat-context.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oEAAoE;AACpE,6DAA6D;AAC7D,oEAAoE;AACpE,mEAAmE;AACnE,gBAAgB;AAEhB
|
|
1
|
+
{"version":3,"file":"runtime-heartbeat-context.js","sourceRoot":"","sources":["../../src/composition/runtime-heartbeat-context.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,oEAAoE;AACpE,+DAA+D;AAC/D,6DAA6D;AAC7D,oEAAoE;AACpE,mEAAmE;AACnE,gBAAgB;AAEhB;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE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7F,YAAY,EAAE,OAAO;YACrB,gBAAgB,EAAE,0BAA0B;YAC5C,aAAa,EAAE,uBAAuB;SACvC;QACD,IAAI,EAAE;YACJ,cAAc;YACd,wBAAwB,EAAE,GAAG,EAAE,CAAC,gCAAgC,CAAC,IAAI,CAAC,qCAAqC,CAAC;SAC7G;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-pass-deps.d.ts","sourceRoot":"","sources":["../../src/composition/spawn-pass-deps.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"spawn-pass-deps.d.ts","sourceRoot":"","sources":["../../src/composition/spawn-pass-deps.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AAW9F,6FAA6F;AAC7F,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,WAAW,GAAG,cAAc,GAAG,iBAAiB,GAAG,aAAa,CAAC,CAAC;AAE9J,0JAA0J;AAC1J,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,gBAAgB,GAAG,6BAA6B,CAQrG;AAED,iEAAiE;AACjE,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,kBAAkB,CAgBtF;AAED,mEAAmE;AACnE,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,oBAAoB,CAkB1F"}
|
|
@@ -9,6 +9,7 @@ import { readUnchangedReviewedHead } from '../focus/unchanged-reviewed-head.js';
|
|
|
9
9
|
import { adoptCaptureHead } from '../worktree/capture-head-adoption.js';
|
|
10
10
|
import { fileReworkForFailedVerdict } from '../verify/outcome-routing/verification-rework-issue.js';
|
|
11
11
|
import { PRODUCTION_TOWER_ADMISSION } from './tower-pass-context.js';
|
|
12
|
+
import { PRODUCTION_WORKSTATION_INTERVALS } from './workstation-intervals-context.js';
|
|
12
13
|
/** The approved-head gate over the contexts: its own reads, the approval read, the unchanged-range read, the rework filing, the capture-head adoption. */
|
|
13
14
|
export function buildReviewApprovedHeadDeps(contexts) {
|
|
14
15
|
return {
|
|
@@ -34,6 +35,7 @@ export function buildReadyFocusPassDeps(contexts) {
|
|
|
34
35
|
return row ? row.review_requested_at : 'absent';
|
|
35
36
|
},
|
|
36
37
|
tower: PRODUCTION_TOWER_ADMISSION,
|
|
38
|
+
slotWaits: PRODUCTION_WORKSTATION_INTERVALS,
|
|
37
39
|
};
|
|
38
40
|
}
|
|
39
41
|
/** The pending-spawn pass over the composition root's contexts. */
|
|
@@ -53,6 +55,7 @@ export function buildPendingSpawnPassDeps(contexts) {
|
|
|
53
55
|
pendingSpawnGuard: contexts.pendingSpawnGuard,
|
|
54
56
|
respawnCycleEscalation: contexts.respawnCycleEscalation,
|
|
55
57
|
tower: PRODUCTION_TOWER_ADMISSION,
|
|
58
|
+
slotWaits: PRODUCTION_WORKSTATION_INTERVALS,
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
//# sourceMappingURL=spawn-pass-deps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spawn-pass-deps.js","sourceRoot":"","sources":["../../src/composition/spawn-pass-deps.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wEAAwE;AACxE,gBAAgB;AAoBhB,OAAO,EAAE,2BAA2B,EA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0B;QACjC,SAAS,EAAE,gCAAgC;KAC5C,CAAC;AACJ,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,yBAAyB,CAAC,QAA0B;IAClE,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;IAC/B,OAAO;QACL,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;QAC5C,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,cAAc,EAAE,QAAQ,CAAC,cAAc;QACvC,kBAAkB,EAAE,2BAA2B,CAAC,QAAQ,CAAC;QACzD,UAAU,EAAE,QAAQ,CAAC,eAAe;QACpC,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB;QAC/C,eAAe,EAAE,QAAQ,CAAC,eAAe;QACzC,cAAc,EAAE,QAAQ,CAAC,cAAc;QACvC,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;QAC7C,sBAAsB,EAAE,QAAQ,CAAC,sBAAsB;QACvD,KAAK,EAAE,0BAA0B;QACjC,SAAS,EAAE,gCAAgC;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-cascade-context.d.ts","sourceRoot":"","sources":["../../src/composition/state-cascade-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state-cascade-context.d.ts","sourceRoot":"","sources":["../../src/composition/state-cascade-context.ts"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAClH,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAMzG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAI3G,OAAO,EAA6C,KAAK,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAUpI,mGAAmG;AACnG,wBAAgB,wBAAwB,IAAI,mBAAmB,CAO9D;AAED,qHAAqH;AACrH,wBAAgB,8BAA8B,IAAI,yBAAyB,CAS1E;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,uBAAuB,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,sBAAsB,GAAG,oBAAoB,CAY/F;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,wBAAwB,CAQxE;AAED,0DAA0D;AAC1D,wBAAgB,wBAAwB,IAAI,mBAAmB,CAiE9D"}
|
|
@@ -37,6 +37,7 @@ import { fileEscalationIdempotent } from '../supervision/escalation-suppression.
|
|
|
37
37
|
import { resolveOpenFocusEscalationsOfKind } from '../supervision/escalation-clearing.js';
|
|
38
38
|
import { activeReviewFocusIds, isTeamRecoverable } from '../supervision/stall-detectors.js';
|
|
39
39
|
import { resolveIdleTeamStallHours, resolveReviewCycleCap, resolveReviewLivenessWindowMinutes, resolveReviewSilenceDeadlineMinutes, resolveReviewWindowStaleHours, resolveStalledTeamBackstopMinutes, resolveVerifyFailedCap, } from '../supervision/stall-detector-config.js';
|
|
40
|
+
import { REVIEW_LOOP_HOLD_DEPS } from './review-loop-context.js';
|
|
40
41
|
import { commitGateSeams } from './commit-gate-context.js';
|
|
41
42
|
import { isGateRunSelected } from '../verify/gate-verdicts/gate-run-registry.js';
|
|
42
43
|
import { recordedPassSha } from '../verify/run-selection/default-on-guards.js';
|
|
@@ -166,7 +167,8 @@ export function buildStateCascadeContext() {
|
|
|
166
167
|
},
|
|
167
168
|
teamStallReapers: buildTeamStallReapersDeps(teamStallReaperEffects(buildObserveLiveTeamDeps(), buildTeamTermination())),
|
|
168
169
|
coverageStabilized: { listOpen: listOpenFocusEscalationsOfKind, resolveRef, markEscalationResolved },
|
|
169
|
-
reviewCycleCapHold: { resolveReviewCycleCap },
|
|
170
|
+
reviewCycleCapHold: { resolveReviewCycleCap, reviewLoopHold: REVIEW_LOOP_HOLD_DEPS },
|
|
171
|
+
spentBudgetRelease: { releaseFocusArm, resolveReviewCycleCap },
|
|
170
172
|
captureHeadAdoption: adoptCaptureHead,
|
|
171
173
|
reviewRequestGate: commitGateSeams,
|
|
172
174
|
reviewVerifyJudgment: buildReviewVerifyJudgmentDeps(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-cascade-context.js","sourceRoot":"","sources":["../../src/composition/state-cascade-context.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wFAAwF;AACxF,+DAA+D;AAC/D,6EAA6E;AAC7E,0EAA0E;AAC1E,4EAA4E;AAC5E,+DAA+D;AAC/D,gBAAgB;AAEhB;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/G,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC5F,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,kCAAkC,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"state-cascade-context.js","sourceRoot":"","sources":["../../src/composition/state-cascade-context.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wFAAwF;AACxF,+DAA+D;AAC/D,6EAA6E;AAC7E,0EAA0E;AAC1E,4EAA4E;AAC5E,+DAA+D;AAC/D,gBAAgB;AAEhB;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/G,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCA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E,cAAc,EAAE,wBAAwB,EAAE,UAAU,EAAE,eAAe,EAAE,qBAAqB,EAAE;QAClH,yBAAyB,EAAE;YACzB,wBAAwB,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,iCAAiC,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC;SAC1H;QACD,gBAAgB,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,wBAAwB,EAAE,EAAE,oBAAoB,EAAE,CAAC,CAAC;QACvH,kBAAkB,EAAE,EAAE,QAAQ,EAAE,8BAA8B,EAAE,UAAU,EAAE,sBAAsB,EAAE;QACpG,kBAAkB,EAAE,EAAE,qBAAqB,EAAE,cAAc,EAAE,qBAAqB,EAAE;QACpF,kBAAkB,EAAE,EAAE,eAAe,EAAE,qBAAqB,EAAE;QAC9D,mBAAmB,EAAE,gBAAgB;QACrC,iBAAiB,EAAE,eAAe;QAClC,oBAAoB,EAAE,6BAA6B,EAAE;QACrD,sBAAsB,EAAE;YACtB,eAAe;YACf,IAAI,EAAE,0BAA0B;YAChC,KAAK,EAAE,2BAA2B;SACnC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-liveness-phase-sources.d.ts","sourceRoot":"","sources":["../../src/composition/team-liveness-phase-sources.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"team-liveness-phase-sources.d.ts","sourceRoot":"","sources":["../../src/composition/team-liveness-phase-sources.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAOnG,oEAAoE;AACpE,eAAO,MAAM,4BAA4B,EAAE,wBAS1C,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// packages/daemon/src/focus/heartbeat-draining-status.test.ts,
|
|
5
5
|
// packages/daemon/src/focus/heartbeat-focus-activity.test.ts,
|
|
6
6
|
// packages/daemon/src/focus/heartbeat-host-load.test.ts,
|
|
7
|
+
// packages/daemon/src/focus/heartbeat-host-pressure.test.ts,
|
|
7
8
|
// packages/daemon/src/focus/heartbeat-shutdown-guard.test.ts,
|
|
8
9
|
// packages/daemon/src/focus/heartbeat-team-liveness-phases.test.ts,
|
|
9
10
|
// packages/daemon/src/focus/retention-observation-heartbeat.test.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-liveness-phase-sources.js","sourceRoot":"","sources":["../../src/composition/team-liveness-phase-sources.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8DAA8D;AAC9D,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,2DAA2D;AAC3D,gEAAgE;AAChE,sEAAsE;AACtE,sEAAsE;AACtE,gBAAgB;AAchB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,oEAAoE;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAA6B;IACpE,qBAAqB,EAAE,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE;IACpD,aAAa;IACb,uBAAuB;IACvB,cAAc;IACd,uBAAuB;IACvB,wBAAwB;IACxB,wBAAwB;IACxB,iBAAiB,EAAE,0BAA0B;CAC9C,CAAC"}
|
|
1
|
+
{"version":3,"file":"team-liveness-phase-sources.js","sourceRoot":"","sources":["../../src/composition/team-liveness-phase-sources.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8DAA8D;AAC9D,kEAAkE;AAClE,iEAAiE;AACjE,gEAAgE;AAChE,2DAA2D;AAC3D,+DAA+D;AAC/D,gEAAgE;AAChE,sEAAsE;AACtE,sEAAsE;AACtE,gBAAgB;AAchB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,oEAAoE;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAA6B;IACpE,qBAAqB,EAAE,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE;IACpD,aAAa;IACb,uBAAuB;IACvB,cAAc;IACd,uBAAuB;IACvB,wBAAwB;IACxB,wBAAwB;IACxB,iBAAiB,EAAE,0BAA0B;CAC9C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type OneShotJudgementIdentity } from '../spawn/routing-decider-spawn.js';
|
|
2
|
+
import { type LiveAnswerDeliveryDeps } from '../spawn/live-answer-delivery.js';
|
|
3
|
+
import { type TowerEscalationSupervisor, type TowerEscalationSupervisorDeps } from '../tower/tower-escalation-session.js';
|
|
4
|
+
/** The escalation session's identity on the shared one-shot judgement process (the subject is the escalation). */
|
|
5
|
+
export declare const TOWER_ESCALATION_IDENTITY: OneShotJudgementIdentity;
|
|
6
|
+
/** The live answer delivery's collaborators: the read-back, the guarded lead write, the consume and the re-arm clear. */
|
|
7
|
+
export declare function buildLiveAnswerDeliveryDeps(): LiveAnswerDeliveryDeps;
|
|
8
|
+
/** The escalation supervisor's production collaborators. */
|
|
9
|
+
export declare function buildTowerEscalationSupervisorDeps(): TowerEscalationSupervisorDeps;
|
|
10
|
+
/** The process's escalation supervisor (built once). */
|
|
11
|
+
export declare function productionTowerEscalationSupervisor(): TowerEscalationSupervisor;
|
|
12
|
+
//# sourceMappingURL=tower-escalation-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tower-escalation-context.d.ts","sourceRoot":"","sources":["../../src/composition/tower-escalation-context.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAgC,KAAK,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAEhH,OAAO,EAA4B,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAGzG,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EACnC,MAAM,sCAAsC,CAAC;AAM9C,kHAAkH;AAClH,eAAO,MAAM,yBAAyB,EAAE,wBAMvC,CAAC;AAEF,yHAAyH;AACzH,wBAAgB,2BAA2B,IAAI,sBAAsB,CAQpE;AAmBD,4DAA4D;AAC5D,wBAAgB,kCAAkC,IAAI,6BAA6B,CA+BlF;AAID,wDAAwD;AACxD,wBAAgB,mCAAmC,IAAI,yBAAyB,CAG/E"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/composition/tower-escalation-context.test.ts
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* The production binding of the Tower supervisor's ESCALATION half
|
|
6
|
+
* (tower/tower-escalation-session.ts): its reads of the pending team
|
|
7
|
+
* escalations and their focuses, the context it gathers, its one-shot session
|
|
8
|
+
* process (the review-loop supervisor's, under the same scoped
|
|
9
|
+
* `tower_supervisor` MCP profile), the daemon's hand-off to the operator, and the
|
|
10
|
+
* live delivery of an answer to the team (spawn/live-answer-delivery.ts). One
|
|
11
|
+
* per process; the escalation-lane tick (focus/focus-loop-registry.ts) sweeps it.
|
|
12
|
+
*
|
|
13
|
+
* @module composition/tower-escalation-context
|
|
14
|
+
*/
|
|
15
|
+
import { randomUUID } from 'node:crypto';
|
|
16
|
+
import { configForProduct, findProduct } from '../config/config.js';
|
|
17
|
+
import { liveDaemonConfig } from '../config/live-daemon-config.js';
|
|
18
|
+
import { getActiveFocuses, clearAnswerRearm } from '../queries/focuses/focus-discovery.js';
|
|
19
|
+
import { getFocusDeliveries } from '../queries/focuses/focuses.js';
|
|
20
|
+
import { listTowerDecisions, recordTowerDecision } from '../queries/tower-decisions/tower-decisions.js';
|
|
21
|
+
import { deferTowerEscalation, listTowerPendingEscalations, readTowerEscalation, } from '../queries/escalations/tower-escalations.js';
|
|
22
|
+
import { readArmBaselineIds } from '../supervision/recorded-new-intent.js';
|
|
23
|
+
import { getFocusWorktree } from '../worktree/focus-worktree-state.js';
|
|
24
|
+
import { markDirectedAnswersConsumed, resolveAnsweredEscalations } from '../resolvers/escalation-answers.js';
|
|
25
|
+
import { spawnOneShotJudgementSession } from '../spawn/routing-decider-spawn.js';
|
|
26
|
+
import { sendToLead } from '../spawn/lead-send.js';
|
|
27
|
+
import { deliverAnswersToLiveTeam } from '../spawn/live-answer-delivery.js';
|
|
28
|
+
import { getGovernor } from '../focus/focus-executor.js';
|
|
29
|
+
import { gatherEscalationContext, TOWER_ESCALATION_CONTEXT_RECIPE } from '../tower/tower-escalation-gather.js';
|
|
30
|
+
import { createTowerEscalationSupervisor, } from '../tower/tower-escalation-session.js';
|
|
31
|
+
import { TOWER_SUPERVISOR_MCP_PROFILE, TOWER_SUPERVISOR_MODEL } from '../tower/tower-supervisor-session.js';
|
|
32
|
+
import { assembleFocusRecipe, LOOP_HISTORY_DEPS } from './review-loop-context.js';
|
|
33
|
+
import { buildLeadSendDeps } from './execution-directive-context.js';
|
|
34
|
+
import { buildRoutingDeciderSpawnSeam } from './execution-spawn-context.js';
|
|
35
|
+
/** The escalation session's identity on the shared one-shot judgement process (the subject is the escalation). */
|
|
36
|
+
export const TOWER_ESCALATION_IDENTITY = {
|
|
37
|
+
label: 'tower-escalation',
|
|
38
|
+
phase: 'tower_escalation',
|
|
39
|
+
envVar: 'TELORA_DAEMON_TOWER_SUPERVISOR',
|
|
40
|
+
metadataKey: 'escalationId',
|
|
41
|
+
mcpProfile: TOWER_SUPERVISOR_MCP_PROFILE,
|
|
42
|
+
};
|
|
43
|
+
/** The live answer delivery's collaborators: the read-back, the guarded lead write, the consume and the re-arm clear. */
|
|
44
|
+
export function buildLiveAnswerDeliveryDeps() {
|
|
45
|
+
const leadSend = buildLeadSendDeps();
|
|
46
|
+
return {
|
|
47
|
+
resolveAnsweredEscalations,
|
|
48
|
+
sendToLead: (focusId, content) => sendToLead(focusId, content, leadSend),
|
|
49
|
+
markAnswersConsumed: markDirectedAnswersConsumed,
|
|
50
|
+
clearAnswerRearm: (focusId, value) => clearAnswerRearm(focusId, value),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** The active focuses of one product, as the escalation supervisor reads them. */
|
|
54
|
+
async function listFocuses(productId) {
|
|
55
|
+
const rows = await getActiveFocuses('', productId);
|
|
56
|
+
return rows.flatMap((f) => {
|
|
57
|
+
if (!f.product_id)
|
|
58
|
+
return [];
|
|
59
|
+
const baseline = readArmBaselineIds(f.armed_baseline_delivery_ids);
|
|
60
|
+
return [{
|
|
61
|
+
focusId: f.focus_id,
|
|
62
|
+
focusName: f.focus_name,
|
|
63
|
+
focusDescription: f.focus_description,
|
|
64
|
+
productId: f.product_id,
|
|
65
|
+
armed: f.assigned_agent_role_id !== null,
|
|
66
|
+
armedBaselineDeliveryIds: baseline ? [...baseline] : null,
|
|
67
|
+
}];
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/** The escalation supervisor's production collaborators. */
|
|
71
|
+
export function buildTowerEscalationSupervisorDeps() {
|
|
72
|
+
const seam = buildRoutingDeciderSpawnSeam();
|
|
73
|
+
const liveAnswer = buildLiveAnswerDeliveryDeps();
|
|
74
|
+
return {
|
|
75
|
+
readConfig: () => liveDaemonConfig,
|
|
76
|
+
productConfig: (config, productId) => {
|
|
77
|
+
const product = findProduct(config, productId);
|
|
78
|
+
return product ? configForProduct(config, product) : null;
|
|
79
|
+
},
|
|
80
|
+
readGovernor: getGovernor,
|
|
81
|
+
listPending: listTowerPendingEscalations,
|
|
82
|
+
readEscalation: readTowerEscalation,
|
|
83
|
+
defer: deferTowerEscalation,
|
|
84
|
+
listFocuses,
|
|
85
|
+
focusWorktreePath: (focusId) => getFocusWorktree(focusId)?.worktreePath ?? null,
|
|
86
|
+
gatherContext: (args) => gatherEscalationContext({
|
|
87
|
+
getFocusDeliveries,
|
|
88
|
+
assembleFocusContext: (focusId, productId, config) => assembleFocusRecipe(TOWER_ESCALATION_CONTEXT_RECIPE, focusId, productId, config),
|
|
89
|
+
readTextFile: LOOP_HISTORY_DEPS.readTextFile,
|
|
90
|
+
listDirectory: LOOP_HISTORY_DEPS.listDirectory,
|
|
91
|
+
}, args),
|
|
92
|
+
spawn: (opts) => spawnOneShotJudgementSession({
|
|
93
|
+
config: opts.config, prompt: opts.prompt, cwd: opts.cwd, focusId: opts.focusId, escalationId: opts.escalationId,
|
|
94
|
+
model: opts.model, timeoutMs: opts.timeoutMs, allowedTools: opts.allowedTools,
|
|
95
|
+
}, seam, TOWER_ESCALATION_IDENTITY),
|
|
96
|
+
deliverAnswer: (args) => deliverAnswersToLiveTeam(args, liveAnswer),
|
|
97
|
+
listTowerDecisions,
|
|
98
|
+
recordTowerDecision,
|
|
99
|
+
newSessionId: randomUUID,
|
|
100
|
+
model: TOWER_SUPERVISOR_MODEL,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
let towerEscalationSupervisor = null;
|
|
104
|
+
/** The process's escalation supervisor (built once). */
|
|
105
|
+
export function productionTowerEscalationSupervisor() {
|
|
106
|
+
towerEscalationSupervisor ??= createTowerEscalationSupervisor(buildTowerEscalationSupervisorDeps());
|
|
107
|
+
return towerEscalationSupervisor;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=tower-escalation-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tower-escalation-context.js","sourceRoot":"","sources":["../../src/composition/tower-escalation-context.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,8EAA8E;AAC9E,gBAAgB;AAEhB;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACxG,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EAAE,4BAA4B,EAAiC,MAAM,mCAAmC,CAAC;AAChH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAA+B,MAAM,kCAAkC,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EACL,+BAA+B,GAIhC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC5G,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAA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AAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/G,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY;SAC9E,EAAE,IAAI,EAAE,yBAAyB,CAAC;QACnC,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC;QACnE,kBAAkB;QAClB,mBAAmB;QACnB,YAAY,EAAE,UAAU;QACxB,KAAK,EAAE,sBAAsB;KAC9B,CAAC;AACJ,CAAC;AAED,IAAI,yBAAyB,GAAqC,IAAI,CAAC;AAEvE,wDAAwD;AACxD,MAAM,UAAU,mCAAmC;IACjD,yBAAyB,KAAK,+BAA+B,CAAC,kCAAkC,EAAE,CAAC,CAAC;IACpG,OAAO,yBAAyB,CAAC;AACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-context.d.ts","sourceRoot":"","sources":["../../src/composition/verification-context.ts"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAKhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuBtD,OAAO,EAAmC,KAAK,SAAS,EAAE,MAAM,6CAA6C,CAAC;AA6D9G,OAAO,KAAK,EAA8B,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"verification-context.d.ts","sourceRoot":"","sources":["../../src/composition/verification-context.ts"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAKhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAuBtD,OAAO,EAAmC,KAAK,SAAS,EAAE,MAAM,6CAA6C,CAAC;AA6D9G,OAAO,KAAK,EAA8B,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAqC1G,0HAA0H;AAC1H,eAAO,MAAM,yBAAyB,EAAE,yBAOvC,CAAC;AAkBF,sHAAsH;AACtH,eAAO,MAAM,aAAa,EAAE,SAO1B,CAAC;AAiMH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,YAAY,KAAG,gBAmG5D,CAAC"}
|