@telora/daemon 0.24.25 → 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 +9 -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/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-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/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.map +1 -1
- package/dist/composition/runtime-heartbeat-context.js +8 -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/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/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.d.ts +9 -2
- package/dist/focus/heartbeat.d.ts.map +1 -1
- package/dist/focus/heartbeat.js +9 -1
- package/dist/focus/heartbeat.js.map +1 -1
- 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/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 +31 -1
- package/dist/queries/api-client/shared.js.map +1 -1
- 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/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/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/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/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/index.js +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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escalation-consumption.d.ts","sourceRoot":"","sources":["../../../src/queries/escalations/escalation-consumption.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAiC,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE/G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA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MAAM,GAAG,SAAS,CAAC;CACjC;AAED,UAAU,sBAAuB,SAAQ,4BAA4B;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,SAAS,sBAAsB,EAAE,GACtC,wBAAwB,EAAE,CAqB5B;AAED;;;;;GAKG;AACH,wBAAsB,kCAAkC,IACrD,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAOrC"}
|
|
@@ -31,6 +31,14 @@ import { callApi } from '../api-client/shared.js';
|
|
|
31
31
|
import { DISPOSITION_AGENT_RESOLVABLE, DISPOSITION_NEEDS_INTENT, OPEN_ESCALATION_STATUSES } from './escalation-dispositions.js';
|
|
32
32
|
import { readHumanAct, readObservation } from './filing-observation.js';
|
|
33
33
|
import { isMachineLaneRow, readIncidentKey, readSymptoms } from './incident-record.js';
|
|
34
|
+
/**
|
|
35
|
+
* Pure: whether a row belongs to the Tower supervisor's lane (routed to it at
|
|
36
|
+
* filing). The routing decider keeps the daemon-filed observations; the
|
|
37
|
+
* supervisor takes team-filed escalations (docs/daemon/invariants-review-and-arm.md).
|
|
38
|
+
*/
|
|
39
|
+
export function isTowerRoutedRow(row) {
|
|
40
|
+
return typeof row.towerState === 'string' && row.towerState !== '';
|
|
41
|
+
}
|
|
34
42
|
/** Pure: the optional observation + metadata fields an item carries from its row. */
|
|
35
43
|
function observationFields(metadata) {
|
|
36
44
|
const observation = readObservation(metadata);
|
|
@@ -145,7 +153,8 @@ export function toAgentResolvableItems(rows) {
|
|
|
145
153
|
const humanLane = openHumanLaneByIncident(rows);
|
|
146
154
|
return rows
|
|
147
155
|
.filter((e) => (!e.status || OPEN_ESCALATION_STATUSES.has(e.status)) &&
|
|
148
|
-
e.disposition === DISPOSITION_AGENT_RESOLVABLE
|
|
156
|
+
e.disposition === DISPOSITION_AGENT_RESOLVABLE &&
|
|
157
|
+
!isTowerRoutedRow(e))
|
|
149
158
|
.map((e) => {
|
|
150
159
|
const key = readIncidentKey(e.metadata);
|
|
151
160
|
const pending = key ? humanLane.get(key) : undefined;
|
|
@@ -192,7 +201,8 @@ export async function listOpenAgentResolvableForFocus(focusId) {
|
|
|
192
201
|
export function toOrgAgentResolvableItems(rows) {
|
|
193
202
|
return rows
|
|
194
203
|
.filter((e) => (!e.status || OPEN_ESCALATION_STATUSES.has(e.status)) &&
|
|
195
|
-
e.disposition === DISPOSITION_AGENT_RESOLVABLE
|
|
204
|
+
e.disposition === DISPOSITION_AGENT_RESOLVABLE &&
|
|
205
|
+
!isTowerRoutedRow(e))
|
|
196
206
|
.map((e) => ({
|
|
197
207
|
id: e.id,
|
|
198
208
|
escalationKind: e.escalationKind ?? null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escalation-consumption.js","sourceRoot":"","sources":["../../../src/queries/escalations/escalation-consumption.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,qGAAqG;AACrG,0FAA0F;AAC1F,qFAAqF;AACrF,2FAA2F;AAC3F,2EAA2E;AAC3E,gFAAgF;AAChF,6EAA6E;AAC7E,sFAAsF;AACtF,oEAAoE;AACpE,8EAA8E;AAC9E,wEAAwE;AACxE,4EAA4E;AAC5E,kEAAkE;AAClE,6DAA6D;AAC7D,4EAA4E;AAC5E,gBAAgB;AAEhB;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,6EAA6E;AAC7E,sEAAsE;AACtE,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAChI,OAAO,EAAE,YAAY,EAAE,eAAe,EAAyC,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"escalation-consumption.js","sourceRoot":"","sources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+
* (product-api handlers/tower-escalation-handlers.ts, migration
|
|
4
|
+
* 20261020155839):
|
|
5
|
+
*
|
|
6
|
+
* listTowerPendingEscalations -- escalation_list { towerState: 'pending' }:
|
|
7
|
+
* the org's open team escalations routed to the
|
|
8
|
+
* supervisor at filing, full detail.
|
|
9
|
+
* readTowerEscalation -- escalation_get: where one row stands now (the
|
|
10
|
+
* read after a supervisor session exits).
|
|
11
|
+
* deferTowerEscalation -- daemon_escalation_tower_defer: hand a pending
|
|
12
|
+
* row to the operator, recording
|
|
13
|
+
* escalation_deferred (decided by the daemon).
|
|
14
|
+
*
|
|
15
|
+
* The pending read re-checks towerState CLIENT-SIDE: an edge that predates the
|
|
16
|
+
* column ignores the unknown filter and answers every open row, and every one of
|
|
17
|
+
* those must read as not routed rather than as owed a supervisor.
|
|
18
|
+
*
|
|
19
|
+
* @module queries/escalations/tower-escalations
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
/** A team escalation the supervisor owes a decision. */
|
|
23
|
+
export interface TowerPendingEscalation {
|
|
24
|
+
escalationId: string;
|
|
25
|
+
focusId: string | null;
|
|
26
|
+
productId: string | null;
|
|
27
|
+
deliveryId: string | null;
|
|
28
|
+
issueId: string | null;
|
|
29
|
+
disposition: string | null;
|
|
30
|
+
reasonType: string;
|
|
31
|
+
status: string;
|
|
32
|
+
description: string;
|
|
33
|
+
whatWasTried: string | null;
|
|
34
|
+
helpNeeded: string | null;
|
|
35
|
+
metadata: Record<string, unknown>;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
towerRoutedAt: string | null;
|
|
38
|
+
}
|
|
39
|
+
/** Where one routed escalation stands. */
|
|
40
|
+
export interface TowerEscalationState {
|
|
41
|
+
escalationId: string;
|
|
42
|
+
status: string;
|
|
43
|
+
towerState: string | null;
|
|
44
|
+
answeredAt: string | null;
|
|
45
|
+
}
|
|
46
|
+
declare const RowSchema: z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
reasonType: z.ZodString;
|
|
49
|
+
status: z.ZodString;
|
|
50
|
+
disposition: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
+
focusId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
productId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
deliveryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
issueId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
whatWasTried: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
helpNeeded: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
59
|
+
createdAt: z.ZodString;
|
|
60
|
+
towerState: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
towerRoutedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
+
answeredAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
}, z.core.$loose>;
|
|
64
|
+
/** Pure: the open rows of a list answer that are pending on the supervisor. */
|
|
65
|
+
export declare function toTowerPendingEscalations(rows: ReadonlyArray<z.infer<typeof RowSchema>>): TowerPendingEscalation[];
|
|
66
|
+
/** The org's open team escalations pending on the Tower supervisor, oldest routed first. */
|
|
67
|
+
export declare function listTowerPendingEscalations(): Promise<TowerPendingEscalation[]>;
|
|
68
|
+
/** Where one escalation stands now. */
|
|
69
|
+
export declare function readTowerEscalation(escalationId: string): Promise<TowerEscalationState>;
|
|
70
|
+
/** What the daemon hands to the operator, and why. */
|
|
71
|
+
export interface TowerDeferral {
|
|
72
|
+
escalationId: string;
|
|
73
|
+
summary: string;
|
|
74
|
+
rationale: string;
|
|
75
|
+
evidence: Record<string, unknown>;
|
|
76
|
+
}
|
|
77
|
+
/** Hand a pending escalation to the operator, recording escalation_deferred (decided by the daemon). */
|
|
78
|
+
export declare function deferTowerEscalation(deferral: TowerDeferral): Promise<{
|
|
79
|
+
towerDecisionId: string | null;
|
|
80
|
+
}>;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=tower-escalations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tower-escalations.d.ts","sourceRoot":"","sources":["../../../src/queries/escalations/tower-escalations.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wDAAwD;AACxD,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;iBAiBC,CAAC;AAQjB,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC,GAAG,sBAAsB,EAAE,CAmBlH;AAED,4FAA4F;AAC5F,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAQrF;AAED,uCAAuC;AACvC,wBAAsB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAQ7F;AAED,sDAAsD;AACtD,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,wGAAwG;AACxG,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC;IAAE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAG/G"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
// packages/daemon/src/queries/escalations/tower-escalations.test.ts,
|
|
4
|
+
// packages/daemon/src/tower/tower-escalation-prompt.test.ts,
|
|
5
|
+
// packages/daemon/src/tower/tower-escalation-session.test.ts
|
|
6
|
+
// PINNED-BY-END
|
|
7
|
+
/**
|
|
8
|
+
* The Tower supervisor's escalation reads and the daemon's hand-off write
|
|
9
|
+
* (product-api handlers/tower-escalation-handlers.ts, migration
|
|
10
|
+
* 20261020155839):
|
|
11
|
+
*
|
|
12
|
+
* listTowerPendingEscalations -- escalation_list { towerState: 'pending' }:
|
|
13
|
+
* the org's open team escalations routed to the
|
|
14
|
+
* supervisor at filing, full detail.
|
|
15
|
+
* readTowerEscalation -- escalation_get: where one row stands now (the
|
|
16
|
+
* read after a supervisor session exits).
|
|
17
|
+
* deferTowerEscalation -- daemon_escalation_tower_defer: hand a pending
|
|
18
|
+
* row to the operator, recording
|
|
19
|
+
* escalation_deferred (decided by the daemon).
|
|
20
|
+
*
|
|
21
|
+
* The pending read re-checks towerState CLIENT-SIDE: an edge that predates the
|
|
22
|
+
* column ignores the unknown filter and answers every open row, and every one of
|
|
23
|
+
* those must read as not routed rather than as owed a supervisor.
|
|
24
|
+
*
|
|
25
|
+
* @module queries/escalations/tower-escalations
|
|
26
|
+
*/
|
|
27
|
+
import { z } from 'zod';
|
|
28
|
+
import { callApiValidated } from '../api-client/shared.js';
|
|
29
|
+
const RowSchema = z.object({
|
|
30
|
+
id: z.string(),
|
|
31
|
+
reasonType: z.string(),
|
|
32
|
+
status: z.string(),
|
|
33
|
+
disposition: z.string().nullable().optional(),
|
|
34
|
+
focusId: z.string().nullable().optional(),
|
|
35
|
+
productId: z.string().nullable().optional(),
|
|
36
|
+
deliveryId: z.string().nullable().optional(),
|
|
37
|
+
issueId: z.string().nullable().optional(),
|
|
38
|
+
description: z.string().nullable().optional(),
|
|
39
|
+
whatWasTried: z.string().nullable().optional(),
|
|
40
|
+
helpNeeded: z.string().nullable().optional(),
|
|
41
|
+
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
42
|
+
createdAt: z.string(),
|
|
43
|
+
towerState: z.string().nullable().optional(),
|
|
44
|
+
towerRoutedAt: z.string().nullable().optional(),
|
|
45
|
+
answeredAt: z.string().nullable().optional(),
|
|
46
|
+
}).passthrough();
|
|
47
|
+
const ListSchema = z.object({ escalations: z.array(RowSchema) }).passthrough();
|
|
48
|
+
const GetSchema = z.object({ escalation: RowSchema }).passthrough();
|
|
49
|
+
const DeferSchema = z.object({ towerDecisionId: z.string().nullable().optional() }).passthrough();
|
|
50
|
+
const OPEN = new Set(['pending', 'in_review']);
|
|
51
|
+
/** Pure: the open rows of a list answer that are pending on the supervisor. */
|
|
52
|
+
export function toTowerPendingEscalations(rows) {
|
|
53
|
+
return rows
|
|
54
|
+
.filter((r) => r.towerState === 'pending' && OPEN.has(r.status))
|
|
55
|
+
.map((r) => ({
|
|
56
|
+
escalationId: r.id,
|
|
57
|
+
focusId: r.focusId ?? null,
|
|
58
|
+
productId: r.productId ?? null,
|
|
59
|
+
deliveryId: r.deliveryId ?? null,
|
|
60
|
+
issueId: r.issueId ?? null,
|
|
61
|
+
disposition: r.disposition ?? null,
|
|
62
|
+
reasonType: r.reasonType,
|
|
63
|
+
status: r.status,
|
|
64
|
+
description: r.description ?? '',
|
|
65
|
+
whatWasTried: r.whatWasTried ?? null,
|
|
66
|
+
helpNeeded: r.helpNeeded ?? null,
|
|
67
|
+
metadata: r.metadata ?? {},
|
|
68
|
+
createdAt: r.createdAt,
|
|
69
|
+
towerRoutedAt: r.towerRoutedAt ?? null,
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
/** The org's open team escalations pending on the Tower supervisor, oldest routed first. */
|
|
73
|
+
export async function listTowerPendingEscalations() {
|
|
74
|
+
const res = await callApiValidated('escalation_list', ListSchema, {
|
|
75
|
+
fields: { towerState: 'pending', statuses: ['pending', 'in_review'] },
|
|
76
|
+
limit: 200,
|
|
77
|
+
detail: 'full',
|
|
78
|
+
});
|
|
79
|
+
return toTowerPendingEscalations(res.escalations)
|
|
80
|
+
.sort((a, b) => (a.towerRoutedAt ?? a.createdAt).localeCompare(b.towerRoutedAt ?? b.createdAt));
|
|
81
|
+
}
|
|
82
|
+
/** Where one escalation stands now. */
|
|
83
|
+
export async function readTowerEscalation(escalationId) {
|
|
84
|
+
const res = await callApiValidated('escalation_get', GetSchema, { escalationId, detail: 'full' });
|
|
85
|
+
return {
|
|
86
|
+
escalationId: res.escalation.id,
|
|
87
|
+
status: res.escalation.status,
|
|
88
|
+
towerState: res.escalation.towerState ?? null,
|
|
89
|
+
answeredAt: res.escalation.answeredAt ?? null,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/** Hand a pending escalation to the operator, recording escalation_deferred (decided by the daemon). */
|
|
93
|
+
export async function deferTowerEscalation(deferral) {
|
|
94
|
+
const res = await callApiValidated('daemon_escalation_tower_defer', DeferSchema, { ...deferral });
|
|
95
|
+
return { towerDecisionId: res.towerDecisionId ?? null };
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=tower-escalations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tower-escalations.js","sourceRoot":"","sources":["../../../src/queries/escalations/tower-escalations.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+EAA+E;AAC/E,uEAAuE;AACvE,+DAA+D;AAC/D,+DAA+D;AAC/D,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AA4B3D,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,WAAW,EAAE,CAA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IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AACpG,CAAC;AAED,uCAAuC;AACvC,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,YAAoB;IAC5D,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,gBAAgB,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClG,OAAO;QACL,YAAY,EAAE,GAAG,CAAC,UAAU,CAAC,EAAE;QAC/B,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC,MAAM;QAC7B,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI;QAC7C,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI;KAC9C,CAAC;AACJ,CAAC;AAUD,wGAAwG;AACxG,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,QAAuB;IAChE,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,+BAA+B,EAAE,WAAW,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;IAClG,OAAO,EAAE,eAAe,EAAE,GAAG,CAAC,eAAe,IAAI,IAAI,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* review-
|
|
5
|
-
*
|
|
2
|
+
* THE review-finding rule, daemon side, and the RECORDED CONCERNS of a focus as
|
|
3
|
+
* pure functions over its review-finding facts
|
|
4
|
+
* (queries/focus-review/review-finding-facts.ts).
|
|
5
|
+
*
|
|
6
|
+
* A finding blocks only when a not_met acceptance criterion names it. Every
|
|
7
|
+
* other issue a review files is a CONCERN: recorded for the human and the
|
|
8
|
+
* next arm, never the running team's work, never holding its delivery.
|
|
9
|
+
*
|
|
10
|
+
* findingClassOf is a hand MIRROR of the canonical
|
|
11
|
+
* supabase/functions/_shared/review-finding-class.ts findingClassOf (the daemon
|
|
12
|
+
* cannot import the Deno tree at runtime); review-finding-class-parity.test.ts
|
|
13
|
+
* runs both over one case matrix and fails on the first disagreement. Every
|
|
14
|
+
* daemon reader classifies through it: the live delivery writers
|
|
15
|
+
* (delivery/recorded-concerns.ts), the review exit
|
|
16
|
+
* (completion/review-exit/review-defect-detector.ts isBlockingReviewFinding),
|
|
17
|
+
* the team prompt's listing and the ended-arm summary.
|
|
18
|
+
*
|
|
19
|
+
* A daemon-filed rework Bug (gate or shortfall) is never a review finding,
|
|
20
|
+
* whatever session it was credited to (isDaemonReworkIssue): it is owed work by
|
|
21
|
+
* construction.
|
|
6
22
|
*
|
|
7
23
|
* Kept apart from the facts READ so a pure caller (the team prompt's listing,
|
|
8
24
|
* the reconcile writers) does not import the API client.
|
|
@@ -10,17 +26,38 @@
|
|
|
10
26
|
* @module queries/focus-review/recorded-concern-ids
|
|
11
27
|
*/
|
|
12
28
|
import type { ReviewFindingClass } from './review-finding-facts.js';
|
|
29
|
+
/**
|
|
30
|
+
* MIRROR of _shared/review-finding-class.ts findingClassOf. The class of one
|
|
31
|
+
* issue under the rule: null = not a review finding (ordinary owed work);
|
|
32
|
+
* 'blocking' = review-filed and recorded blocking (a not_met criterion names
|
|
33
|
+
* it); 'concern' = review-filed and anything else -- recorded concern, or no
|
|
34
|
+
* class reached the reader (an older edge's link-less review). Pure.
|
|
35
|
+
*/
|
|
36
|
+
export declare function findingClassOf(issueId: string, reviewFiledIds: ReadonlySet<string>, findingClasses: ReadonlyMap<string, ReviewFindingClass>): ReviewFindingClass | null;
|
|
37
|
+
/** MIRROR of _shared/review-finding-class.ts isBlockingFinding: only a recorded 'blocking' blocks. Pure. */
|
|
38
|
+
export declare function isBlockingFinding(issueId: string, findingClasses: ReadonlyMap<string, ReviewFindingClass>): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether an issue is a daemon-filed rework Bug -- a failed gate's
|
|
41
|
+
* (isGateReworkIssue) or a verify shortfall's (isShortfallReworkIssue). Such a
|
|
42
|
+
* Bug is owed work by construction and is never a review finding, even when an
|
|
43
|
+
* older edge credited it to a review session that was live when it was filed.
|
|
44
|
+
* An issue whose title is not known is not one. Pure.
|
|
45
|
+
*/
|
|
46
|
+
export declare function isDaemonReworkIssue(issue: {
|
|
47
|
+
title?: string | null;
|
|
48
|
+
}): boolean;
|
|
13
49
|
/** The facts as the pure helpers below read them (a FocusReviewFindingFacts, or the review exit's id set + classes). */
|
|
14
50
|
export interface ReviewFindingFactsView {
|
|
15
51
|
issueIds: Iterable<string>;
|
|
16
52
|
findingClasses: ReadonlyMap<string, ReviewFindingClass>;
|
|
17
53
|
}
|
|
18
54
|
/**
|
|
19
|
-
* Pure: the ids of the RECORDED CONCERNS among the facts -- review-filed
|
|
20
|
-
* `issueIds`)
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
55
|
+
* Pure: the ids of the RECORDED CONCERNS among the facts -- every review-filed
|
|
56
|
+
* id (in `issueIds`) findingClassOf calls a concern: anything no not_met
|
|
57
|
+
* criterion names, an id with no class included. A concern is recorded for the
|
|
58
|
+
* human and the next arm; it is not the running team's work
|
|
59
|
+
* (prompt-sections/prompt-listing.ts splitRecordedConcerns). A caller holding
|
|
60
|
+
* the issues' titles also drops daemon rework Bugs (isDaemonReworkIssue).
|
|
24
61
|
*/
|
|
25
62
|
export declare function recordedConcernIds(facts: ReviewFindingFactsView): Set<string>;
|
|
26
63
|
/** One open recorded concern, as a human-facing summary names it. */
|
|
@@ -34,8 +71,8 @@ export interface OpenConcernSummary {
|
|
|
34
71
|
* Pure: every OPEN recorded concern among `issues`, by key and title -- the
|
|
35
72
|
* "Open concerns (recorded by review, not worked by this arm)" list a human reads
|
|
36
73
|
* when the armed run ends (queries/focuses/ended-arm.ts `openConcerns`). Closed
|
|
37
|
-
* concerns (Done / Verified / In Review / Cancelled ...) are not listed
|
|
38
|
-
*
|
|
74
|
+
* concerns (Done / Verified / In Review / Cancelled ...) are not listed, nor is a
|
|
75
|
+
* daemon rework Bug.
|
|
39
76
|
*/
|
|
40
77
|
export declare function openRecordedConcerns(issues: ReadonlyArray<{
|
|
41
78
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorded-concern-ids.d.ts","sourceRoot":"","sources":["../../../src/queries/focus-review/recorded-concern-ids.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recorded-concern-ids.d.ts","sourceRoot":"","sources":["../../../src/queries/focus-review/recorded-concern-ids.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,GACtD,kBAAkB,GAAG,IAAI,CAG3B;AAED,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,GACtD,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,OAAO,CAG7E;AAED,wHAAwH;AACxH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACzD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,MAAM,CAAC,CAO7E;AAED,qEAAqE;AACrE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,EAC7G,KAAK,EAAE,sBAAsB,GAC5B,kBAAkB,EAAE,CAKtB"}
|
|
@@ -1,18 +1,48 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/prompt/recorded-concerns-not-owed-work.test.ts
|
|
2
|
+
// Pinned by: packages/daemon/src/prompt/recorded-concerns-not-owed-work.test.ts,
|
|
3
|
+
// packages/daemon/src/queries/focus-review/review-finding-class-parity.test.ts
|
|
3
4
|
// PINNED-BY-END
|
|
4
|
-
import { OPEN_ISSUE_STATUSES } from '../../types/issue-status.js';
|
|
5
|
+
import { OPEN_ISSUE_STATUSES, isGateReworkIssue, isShortfallReworkIssue } from '../../types/issue-status.js';
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* MIRROR of _shared/review-finding-class.ts findingClassOf. The class of one
|
|
8
|
+
* issue under the rule: null = not a review finding (ordinary owed work);
|
|
9
|
+
* 'blocking' = review-filed and recorded blocking (a not_met criterion names
|
|
10
|
+
* it); 'concern' = review-filed and anything else -- recorded concern, or no
|
|
11
|
+
* class reached the reader (an older edge's link-less review). Pure.
|
|
12
|
+
*/
|
|
13
|
+
export function findingClassOf(issueId, reviewFiledIds, findingClasses) {
|
|
14
|
+
if (!reviewFiledIds.has(issueId))
|
|
15
|
+
return null;
|
|
16
|
+
return findingClasses.get(issueId) === 'blocking' ? 'blocking' : 'concern';
|
|
17
|
+
}
|
|
18
|
+
/** MIRROR of _shared/review-finding-class.ts isBlockingFinding: only a recorded 'blocking' blocks. Pure. */
|
|
19
|
+
export function isBlockingFinding(issueId, findingClasses) {
|
|
20
|
+
return findingClasses.get(issueId) === 'blocking';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Whether an issue is a daemon-filed rework Bug -- a failed gate's
|
|
24
|
+
* (isGateReworkIssue) or a verify shortfall's (isShortfallReworkIssue). Such a
|
|
25
|
+
* Bug is owed work by construction and is never a review finding, even when an
|
|
26
|
+
* older edge credited it to a review session that was live when it was filed.
|
|
27
|
+
* An issue whose title is not known is not one. Pure.
|
|
28
|
+
*/
|
|
29
|
+
export function isDaemonReworkIssue(issue) {
|
|
30
|
+
const title = issue.title;
|
|
31
|
+
return typeof title === 'string' && (isGateReworkIssue({ title }) || isShortfallReworkIssue({ title }));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Pure: the ids of the RECORDED CONCERNS among the facts -- every review-filed
|
|
35
|
+
* id (in `issueIds`) findingClassOf calls a concern: anything no not_met
|
|
36
|
+
* criterion names, an id with no class included. A concern is recorded for the
|
|
37
|
+
* human and the next arm; it is not the running team's work
|
|
38
|
+
* (prompt-sections/prompt-listing.ts splitRecordedConcerns). A caller holding
|
|
39
|
+
* the issues' titles also drops daemon rework Bugs (isDaemonReworkIssue).
|
|
11
40
|
*/
|
|
12
41
|
export function recordedConcernIds(facts) {
|
|
42
|
+
const filed = new Set(facts.issueIds);
|
|
13
43
|
const concerns = new Set();
|
|
14
|
-
for (const id of
|
|
15
|
-
if (facts.findingClasses
|
|
44
|
+
for (const id of filed) {
|
|
45
|
+
if (findingClassOf(id, filed, facts.findingClasses) === 'concern')
|
|
16
46
|
concerns.add(id);
|
|
17
47
|
}
|
|
18
48
|
return concerns;
|
|
@@ -21,13 +51,13 @@ export function recordedConcernIds(facts) {
|
|
|
21
51
|
* Pure: every OPEN recorded concern among `issues`, by key and title -- the
|
|
22
52
|
* "Open concerns (recorded by review, not worked by this arm)" list a human reads
|
|
23
53
|
* when the armed run ends (queries/focuses/ended-arm.ts `openConcerns`). Closed
|
|
24
|
-
* concerns (Done / Verified / In Review / Cancelled ...) are not listed
|
|
25
|
-
*
|
|
54
|
+
* concerns (Done / Verified / In Review / Cancelled ...) are not listed, nor is a
|
|
55
|
+
* daemon rework Bug.
|
|
26
56
|
*/
|
|
27
57
|
export function openRecordedConcerns(issues, facts) {
|
|
28
58
|
const concernIds = recordedConcernIds(facts);
|
|
29
59
|
return issues
|
|
30
|
-
.filter((i) => concernIds.has(i.id) && OPEN_ISSUE_STATUSES.has(i.status))
|
|
60
|
+
.filter((i) => concernIds.has(i.id) && !isDaemonReworkIssue(i) && OPEN_ISSUE_STATUSES.has(i.status))
|
|
31
61
|
.map((i) => ({ id: i.id, key: i.key, title: i.title, deliveryId: i.deliveryId ?? null }));
|
|
32
62
|
}
|
|
33
63
|
//# sourceMappingURL=recorded-concern-ids.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorded-concern-ids.js","sourceRoot":"","sources":["../../../src/queries/focus-review/recorded-concern-ids.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"recorded-concern-ids.js","sourceRoot":"","sources":["../../../src/queries/focus-review/recorded-concern-ids.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iFAAiF;AACjF,iFAAiF;AACjF,gBAAgB;AA+BhB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE7G;;;;;;GAMG;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AAM;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;SACnG,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** The action this module calls. */
|
|
2
|
+
export declare const LIST_REVIEW_CRITERION_VERDICTS_ACTION = "daemon_list_review_criterion_verdicts";
|
|
3
|
+
/** A review's verdict on one criterion (one element of focus_reviews.criterion_verdicts). */
|
|
4
|
+
export interface CriterionVerdictRecord {
|
|
5
|
+
/** `node:<uuid>` for a tree criterion, `text:<normalized>` for a declared one. */
|
|
6
|
+
criterionKey: string;
|
|
7
|
+
nodeId: string | null;
|
|
8
|
+
source: 'tree' | 'delivery' | 'focus';
|
|
9
|
+
criterion: string;
|
|
10
|
+
verdict: 'met' | 'not_met' | 'excused';
|
|
11
|
+
/** The issues a not_met verdict names. */
|
|
12
|
+
issueIds: string[];
|
|
13
|
+
}
|
|
14
|
+
/** One completed, verdict-bearing review under the arm. */
|
|
15
|
+
export interface ReviewVerdictRecord {
|
|
16
|
+
reviewId: string;
|
|
17
|
+
completedAt: string;
|
|
18
|
+
outcome: string;
|
|
19
|
+
criterionVerdicts: CriterionVerdictRecord[];
|
|
20
|
+
/**
|
|
21
|
+
* The agreed criteria the review left WITHOUT a verdict, by criterion key (a
|
|
22
|
+
* gaps_found may leave some). [] when it judged every criterion -- and on an
|
|
23
|
+
* older edge or a review stored before the edge recorded them, which
|
|
24
|
+
* therefore read as fully judged.
|
|
25
|
+
*/
|
|
26
|
+
unjudgedCriterionKeys?: string[];
|
|
27
|
+
/** The review's stored blocking set; null = its not_met verdicts named no issue (nothing blocks). */
|
|
28
|
+
blockingIssueIds: string[] | null;
|
|
29
|
+
createdIssueIds: string[];
|
|
30
|
+
/** The focus-branch commit the review judged; absent/null when unrecorded or on an older edge. */
|
|
31
|
+
reviewedSha?: string | null;
|
|
32
|
+
/** The review's summary markdown (each verdict's reasoning); absent/null when none or on an older edge. */
|
|
33
|
+
summary?: string | null;
|
|
34
|
+
}
|
|
35
|
+
/** The focus's verdict-bearing reviews since its arm, newest first, at most `limit`. Throws on failure. */
|
|
36
|
+
export declare function listReviewCriterionVerdicts(focusId: string, limit: number): Promise<ReviewVerdictRecord[]>;
|
|
37
|
+
//# sourceMappingURL=review-criterion-verdicts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-criterion-verdicts.d.ts","sourceRoot":"","sources":["../../../src/queries/focus-review/review-criterion-verdicts.ts"],"names":[],"mappings":"AA2BA,oCAAoC;AACpC,eAAO,MAAM,qCAAqC,0CAA0C,CAAC;AAE7F,6FAA6F;AAC7F,MAAM,WAAW,sBAAsB;IACrC,kFAAkF;IAClF,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;IACvC,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,2DAA2D;AAC3D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,qGAAqG;IACrG,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2GAA2G;IAC3G,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAyBD,2GAA2G;AAC3G,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAiBhH"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/completion/review-cycle-budget/review-cycle-cap-regression.test.ts,
|
|
3
|
+
// packages/daemon/src/completion/review-cycle-budget/review-loop-detection.test.ts,
|
|
4
|
+
// packages/daemon/src/queries/focus-review/review-criterion-verdicts.test.ts,
|
|
5
|
+
// packages/daemon/src/supervision/review-loop-detector.test.ts,
|
|
6
|
+
// packages/daemon/src/tower/tower-supervisor.test.ts
|
|
7
|
+
// PINNED-BY-END
|
|
8
|
+
/**
|
|
9
|
+
* The read of a focus's per-criterion review verdicts: product-api
|
|
10
|
+
* `daemon_list_review_criterion_verdicts`, which answers the focus's
|
|
11
|
+
* verdict-bearing reviews completed since the arm instant, NEWEST FIRST, each
|
|
12
|
+
* with focus_reviews.criterion_verdicts and its stored blocking / created
|
|
13
|
+
* issue ids. A focus with no arm stamp answers none (the history starts at the
|
|
14
|
+
* arm, as the criterion-reopening history does).
|
|
15
|
+
*
|
|
16
|
+
* The review-loop detector decides on it
|
|
17
|
+
* (supervision/review-loop-detector.ts). Throws on a failed call or a
|
|
18
|
+
* malformed answer; the caller (completion/review-cycle-budget/review-loop-detection.ts)
|
|
19
|
+
* owns swallowing it.
|
|
20
|
+
*
|
|
21
|
+
* @module queries/focus-review/review-criterion-verdicts
|
|
22
|
+
*/
|
|
23
|
+
import { z } from 'zod';
|
|
24
|
+
import { callApiValidated } from '../api-client/shared.js';
|
|
25
|
+
/** The action this module calls. */
|
|
26
|
+
export const LIST_REVIEW_CRITERION_VERDICTS_ACTION = 'daemon_list_review_criterion_verdicts';
|
|
27
|
+
const VerdictSchema = z.object({
|
|
28
|
+
criterionKey: z.string(),
|
|
29
|
+
nodeId: z.string().nullable(),
|
|
30
|
+
source: z.enum(['tree', 'delivery', 'focus']),
|
|
31
|
+
criterion: z.string(),
|
|
32
|
+
verdict: z.enum(['met', 'not_met', 'excused']),
|
|
33
|
+
issueIds: z.array(z.string()),
|
|
34
|
+
}).passthrough();
|
|
35
|
+
const ReviewSchema = z.object({
|
|
36
|
+
reviewId: z.string(),
|
|
37
|
+
completedAt: z.string(),
|
|
38
|
+
outcome: z.string(),
|
|
39
|
+
criterionVerdicts: z.array(VerdictSchema),
|
|
40
|
+
unjudgedCriterionKeys: z.array(z.string()).optional(),
|
|
41
|
+
blockingIssueIds: z.array(z.string()).nullable(),
|
|
42
|
+
createdIssueIds: z.array(z.string()),
|
|
43
|
+
reviewedSha: z.string().nullable().optional(),
|
|
44
|
+
summary: z.string().nullable().optional(),
|
|
45
|
+
}).passthrough();
|
|
46
|
+
const ResponseSchema = z.object({ reviews: z.array(ReviewSchema) }).passthrough();
|
|
47
|
+
/** The focus's verdict-bearing reviews since its arm, newest first, at most `limit`. Throws on failure. */
|
|
48
|
+
export async function listReviewCriterionVerdicts(focusId, limit) {
|
|
49
|
+
const res = await callApiValidated(LIST_REVIEW_CRITERION_VERDICTS_ACTION, ResponseSchema, { focusId, limit });
|
|
50
|
+
return res.reviews.map((r) => ({
|
|
51
|
+
reviewId: r.reviewId,
|
|
52
|
+
completedAt: r.completedAt,
|
|
53
|
+
outcome: r.outcome,
|
|
54
|
+
criterionVerdicts: r.criterionVerdicts.map((v) => ({
|
|
55
|
+
criterionKey: v.criterionKey, nodeId: v.nodeId, source: v.source, criterion: v.criterion, verdict: v.verdict, issueIds: v.issueIds,
|
|
56
|
+
})),
|
|
57
|
+
unjudgedCriterionKeys: r.unjudgedCriterionKeys ?? [],
|
|
58
|
+
blockingIssueIds: r.blockingIssueIds,
|
|
59
|
+
createdIssueIds: r.createdIssueIds,
|
|
60
|
+
reviewedSha: r.reviewedSha ?? null,
|
|
61
|
+
summary: r.summary ?? null,
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=review-criterion-verdicts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-criterion-verdicts.js","sourceRoot":"","sources":["../../../src/queries/focus-review/review-criterion-verdicts.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,qGAAqG;AACrG,sFAAsF;AACtF,gFAAgF;AAChF,kEAAkE;AAClE,uDAAuD;AACvD,gBAAgB;AAEhB;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,oCAAoC;AACpC,MAAM,CAAC,MAAM,qCAAqC,GAAG,uCAAuC,CAAC;AAoC7F,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,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AQ;QACpB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,iBAAiB,EAAE,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACjD,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ;SACnI,CAAC,CAAC;QACH,qBAAqB,EAAE,CAAC,CAAC,qBAAqB,IAAI,EAAE;QACpD,gBAAgB,EAAE,CAAC,CAAC,gBAAgB;QACpC,eAAe,EAAE,CAAC,CAAC,eAAe;QAClC,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,IAAI;QAClC,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,IAAI;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -7,12 +7,17 @@
|
|
|
7
7
|
* `focus_review_filed_issue_ids` returns `issueIds: string[]` and, from the edge
|
|
8
8
|
* that records finding classes on, `findingClasses: Record<issueId,
|
|
9
9
|
* 'blocking' | 'concern'>`. An OLDER edge omits `findingClasses`; that reads as
|
|
10
|
-
* an empty map,
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* an empty map, and under the one rule (recorded-concern-ids.ts findingClassOf)
|
|
11
|
+
* every review-filed issue with no recorded 'blocking' is a concern -- the
|
|
12
|
+
* absence of a naming is never a naming.
|
|
13
13
|
*
|
|
14
|
-
* The response is validated (zod) -- a malformed class value throws
|
|
15
|
-
*
|
|
14
|
+
* The response is validated (zod) -- a malformed class value throws.
|
|
15
|
+
*
|
|
16
|
+
* A READ THAT FAILS THROWS. No earlier answer stands in for it: the facts
|
|
17
|
+
* change whenever a review is recorded, and facts kept from before that review
|
|
18
|
+
* can call a finding it re-judged blocking a concern. Every reader that cannot
|
|
19
|
+
* read the classes DEFERS its decision instead (delivery/recorded-concerns.ts;
|
|
20
|
+
* the review exit's findingFactsUnreadable).
|
|
16
21
|
*
|
|
17
22
|
* @module queries/focus-review/review-finding-facts
|
|
18
23
|
*/
|
|
@@ -39,6 +44,13 @@ export interface FocusReviewFindingFacts {
|
|
|
39
44
|
}
|
|
40
45
|
/** Pure: normalize a validated response (missing keys -> empty). Exported for tests. */
|
|
41
46
|
export declare function toReviewFindingFacts(response: z.infer<typeof FocusReviewFindingFactsResponseSchema>): FocusReviewFindingFacts;
|
|
42
|
-
/**
|
|
47
|
+
/** The wire shape of focus_review_filed_issue_ids. */
|
|
48
|
+
export type FocusReviewFindingFactsResponse = z.infer<typeof FocusReviewFindingFactsResponseSchema>;
|
|
49
|
+
/**
|
|
50
|
+
* Read the focus-wide review-filed issue ids AND their recorded finding classes
|
|
51
|
+
* through `read`. Throws when the read fails (module header).
|
|
52
|
+
*/
|
|
53
|
+
export declare function readFocusReviewFindingFactsVia(focusId: string, read: (focusId: string) => Promise<FocusReviewFindingFactsResponse>): Promise<FocusReviewFindingFacts>;
|
|
54
|
+
/** Read the focus-wide review-filed issue ids AND their recorded finding classes over the API. */
|
|
43
55
|
export declare function getFocusReviewFindingFacts(focusId: string): Promise<FocusReviewFindingFacts>;
|
|
44
56
|
//# sourceMappingURL=review-finding-facts.d.ts.map
|