@telora/daemon 0.22.146 → 0.22.169
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 +15 -3
- package/dist/audit/audit-phase.d.ts +11 -1
- package/dist/audit/audit-phase.d.ts.map +1 -1
- package/dist/audit/audit-phase.js +2 -14
- package/dist/audit/audit-phase.js.map +1 -1
- package/dist/audit/audit-prompt.d.ts +7 -4
- package/dist/audit/audit-prompt.d.ts.map +1 -1
- package/dist/audit/audit-prompt.js +34 -23
- package/dist/audit/audit-prompt.js.map +1 -1
- package/dist/backends/codex/codex-mcp-proxy.d.ts +4 -6
- package/dist/backends/codex/codex-mcp-proxy.d.ts.map +1 -1
- package/dist/backends/codex/codex-mcp-proxy.js.map +1 -1
- package/dist/backends/codex/mcp-preflight.d.ts +2 -2
- package/dist/backends/codex/mcp-preflight.d.ts.map +1 -1
- package/dist/backends/codex/mcp-preflight.js.map +1 -1
- package/dist/completion/advancement-stall-watchdog.d.ts +12 -0
- package/dist/completion/advancement-stall-watchdog.d.ts.map +1 -0
- package/dist/completion/advancement-stall-watchdog.js +79 -0
- package/dist/completion/advancement-stall-watchdog.js.map +1 -0
- package/dist/completion/arm-visible-progress-inputs.d.ts +51 -0
- package/dist/completion/arm-visible-progress-inputs.d.ts.map +1 -0
- package/dist/completion/arm-visible-progress-inputs.js +19 -0
- package/dist/completion/arm-visible-progress-inputs.js.map +1 -0
- package/dist/completion/completion-phase-registry.d.ts +1 -0
- package/dist/completion/completion-phase-registry.d.ts.map +1 -1
- package/dist/completion/completion-phase-registry.js +7 -5
- package/dist/completion/completion-phase-registry.js.map +1 -1
- package/dist/completion/delivery-advancement-guard.d.ts.map +1 -1
- package/dist/completion/delivery-advancement-guard.js +1 -0
- package/dist/completion/delivery-advancement-guard.js.map +1 -1
- package/dist/completion/escalation-provenance.d.ts.map +1 -1
- package/dist/completion/escalation-provenance.js +5 -2
- package/dist/completion/escalation-provenance.js.map +1 -1
- package/dist/completion/event-entry-phases.d.ts.map +1 -1
- package/dist/completion/event-entry-phases.js +9 -2
- package/dist/completion/event-entry-phases.js.map +1 -1
- package/dist/completion/event-phases.d.ts +15 -8
- package/dist/completion/event-phases.d.ts.map +1 -1
- package/dist/completion/event-phases.js +26 -64
- package/dist/completion/event-phases.js.map +1 -1
- package/dist/completion/event.d.ts.map +1 -1
- package/dist/completion/event.js +7 -1
- package/dist/completion/event.js.map +1 -1
- package/dist/completion/exit-classification.d.ts +1 -1
- package/dist/completion/exit-classification.d.ts.map +1 -1
- package/dist/completion/exit-classification.js +7 -1
- package/dist/completion/exit-classification.js.map +1 -1
- package/dist/completion/review-cycle-cap.d.ts +81 -35
- package/dist/completion/review-cycle-cap.d.ts.map +1 -1
- package/dist/completion/review-cycle-cap.js +60 -132
- package/dist/completion/review-cycle-cap.js.map +1 -1
- package/dist/completion/review-exit-deps.d.ts +3 -1
- package/dist/completion/review-exit-deps.d.ts.map +1 -1
- package/dist/completion/review-exit-deps.js +3 -1
- package/dist/completion/review-exit-deps.js.map +1 -1
- package/dist/completion/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit-phase.js +5 -4
- package/dist/completion/review-exit-phase.js.map +1 -1
- package/dist/completion/shutdown-attribution.d.ts +107 -0
- package/dist/completion/shutdown-attribution.d.ts.map +1 -0
- package/dist/completion/shutdown-attribution.js +106 -0
- package/dist/completion/shutdown-attribution.js.map +1 -0
- package/dist/completion/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade.js +3 -7
- package/dist/completion/state-cascade.js.map +1 -1
- package/dist/completion/team-lifecycle.d.ts.map +1 -1
- package/dist/completion/team-lifecycle.js +16 -0
- package/dist/completion/team-lifecycle.js.map +1 -1
- package/dist/delivery/delivery-lifecycle.d.ts.map +1 -1
- package/dist/delivery/delivery-lifecycle.js +1 -0
- package/dist/delivery/delivery-lifecycle.js.map +1 -1
- package/dist/directive/directive-assembly.d.ts +19 -1
- package/dist/directive/directive-assembly.d.ts.map +1 -1
- package/dist/directive/directive-assembly.js +15 -3
- package/dist/directive/directive-assembly.js.map +1 -1
- package/dist/directive/directive-dispatch.d.ts +67 -2
- package/dist/directive/directive-dispatch.d.ts.map +1 -1
- package/dist/directive/directive-dispatch.js +188 -45
- package/dist/directive/directive-dispatch.js.map +1 -1
- package/dist/directive/directive-executor.d.ts +2 -2
- package/dist/directive/directive-executor.d.ts.map +1 -1
- package/dist/directive/directive-executor.js +49 -12
- package/dist/directive/directive-executor.js.map +1 -1
- package/dist/directive/directive-queue.d.ts.map +1 -1
- package/dist/directive/directive-queue.js +1 -0
- package/dist/directive/directive-queue.js.map +1 -1
- package/dist/directive/stage-tracker.d.ts +20 -0
- package/dist/directive/stage-tracker.d.ts.map +1 -1
- package/dist/directive/stage-tracker.js +29 -1
- package/dist/directive/stage-tracker.js.map +1 -1
- package/dist/focus/focus-engine.d.ts +16 -0
- package/dist/focus/focus-engine.d.ts.map +1 -1
- package/dist/focus/focus-engine.js +42 -18
- 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 +21 -3
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-phase.d.ts +11 -1
- package/dist/focus/focus-phase.d.ts.map +1 -1
- package/dist/focus/focus-phase.js +12 -2
- package/dist/focus/focus-phase.js.map +1 -1
- package/dist/focus/focus-spawn-decision.d.ts +5 -3
- package/dist/focus/focus-spawn-decision.d.ts.map +1 -1
- package/dist/focus/focus-spawn-decision.js.map +1 -1
- package/dist/focus/focus-team-state.js +1 -1
- package/dist/focus/listener-auto-advance.d.ts.map +1 -1
- package/dist/focus/listener-auto-advance.js +1 -0
- package/dist/focus/listener-auto-advance.js.map +1 -1
- package/dist/focus/listener-spawn.d.ts.map +1 -1
- package/dist/focus/listener-spawn.js +37 -13
- package/dist/focus/listener-spawn.js.map +1 -1
- package/dist/focus/listener.d.ts +15 -0
- package/dist/focus/listener.d.ts.map +1 -1
- package/dist/focus/listener.js +79 -17
- package/dist/focus/listener.js.map +1 -1
- package/dist/focus/live-arm-facts.d.ts +10 -0
- package/dist/focus/live-arm-facts.d.ts.map +1 -0
- package/dist/focus/live-arm-facts.js +47 -0
- package/dist/focus/live-arm-facts.js.map +1 -0
- package/dist/focus/recorded-new-intent.d.ts +81 -0
- package/dist/focus/recorded-new-intent.d.ts.map +1 -0
- package/dist/focus/recorded-new-intent.js +147 -0
- package/dist/focus/recorded-new-intent.js.map +1 -0
- package/dist/focus/review-cycle-cap-hold.d.ts +15 -94
- package/dist/focus/review-cycle-cap-hold.d.ts.map +1 -1
- package/dist/focus/review-cycle-cap-hold.js +54 -112
- package/dist/focus/review-cycle-cap-hold.js.map +1 -1
- package/dist/focus/session-health.d.ts +22 -1
- package/dist/focus/session-health.d.ts.map +1 -1
- package/dist/focus/session-health.js +28 -3
- package/dist/focus/session-health.js.map +1 -1
- package/dist/focus/session-process-reap.d.ts +3 -1
- package/dist/focus/session-process-reap.d.ts.map +1 -1
- package/dist/focus/session-process-reap.js +20 -0
- package/dist/focus/session-process-reap.js.map +1 -1
- package/dist/focus/stage-watermark-seeding.d.ts +39 -0
- package/dist/focus/stage-watermark-seeding.d.ts.map +1 -0
- package/dist/focus/stage-watermark-seeding.js +60 -0
- package/dist/focus/stage-watermark-seeding.js.map +1 -0
- package/dist/focus-stage-lifecycle/index.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/index.js +1 -0
- package/dist/focus-stage-lifecycle/index.js.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +29 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +46 -6
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/git/focus-integration-sync.d.ts +42 -3
- package/dist/git/focus-integration-sync.d.ts.map +1 -1
- package/dist/git/focus-integration-sync.js +38 -2
- package/dist/git/focus-integration-sync.js.map +1 -1
- package/dist/merge/abandoned-merge-recovery.d.ts.map +1 -1
- package/dist/merge/abandoned-merge-recovery.js +10 -0
- package/dist/merge/abandoned-merge-recovery.js.map +1 -1
- package/dist/merge/merge-back-loop.d.ts +1 -0
- package/dist/merge/merge-back-loop.d.ts.map +1 -1
- package/dist/merge/merge-back-loop.js +3 -3
- package/dist/merge/merge-back-loop.js.map +1 -1
- package/dist/prompt/focus-prompt-builder.d.ts +2 -1
- package/dist/prompt/focus-prompt-builder.d.ts.map +1 -1
- package/dist/prompt/focus-prompt-builder.js +10 -1
- package/dist/prompt/focus-prompt-builder.js.map +1 -1
- package/dist/prompt/team-prompt-base.d.ts +2 -1
- package/dist/prompt/team-prompt-base.d.ts.map +1 -1
- package/dist/prompt/team-prompt-base.js +8 -20
- package/dist/prompt/team-prompt-base.js.map +1 -1
- package/dist/prompt-sections/execution-sections.d.ts +22 -1
- package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
- package/dist/prompt-sections/execution-sections.js +23 -2
- package/dist/prompt-sections/execution-sections.js.map +1 -1
- package/dist/prompt-sections/integration-reconcile-section.d.ts +45 -0
- package/dist/prompt-sections/integration-reconcile-section.d.ts.map +1 -0
- package/dist/prompt-sections/integration-reconcile-section.js +69 -0
- package/dist/prompt-sections/integration-reconcile-section.js.map +1 -0
- package/dist/prompt-sections/persona-sections.d.ts +0 -20
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +4 -49
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/prompt-sections/shared.d.ts +9 -0
- package/dist/prompt-sections/shared.d.ts.map +1 -1
- package/dist/prompt-sections/shared.js +2 -1
- package/dist/prompt-sections/shared.js.map +1 -1
- package/dist/prompt-sections/testing-standard.d.ts +51 -0
- package/dist/prompt-sections/testing-standard.d.ts.map +1 -0
- package/dist/prompt-sections/testing-standard.js +132 -0
- package/dist/prompt-sections/testing-standard.js.map +1 -0
- package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -1
- package/dist/queries/agent-resolvable-promotion.js +7 -5
- package/dist/queries/agent-resolvable-promotion.js.map +1 -1
- package/dist/queries/arm-covered-targets.d.ts +84 -0
- package/dist/queries/arm-covered-targets.d.ts.map +1 -0
- package/dist/queries/arm-covered-targets.js +129 -0
- package/dist/queries/arm-covered-targets.js.map +1 -0
- package/dist/queries/deliveries.d.ts +3 -0
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js +10 -3
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/delivery-gate-state.d.ts +10 -0
- package/dist/queries/delivery-gate-state.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state.js +1 -1
- package/dist/queries/delivery-gate-state.js.map +1 -1
- package/dist/queries/delivery-write-discipline.d.ts.map +1 -1
- package/dist/queries/delivery-write-discipline.js +2 -1
- package/dist/queries/delivery-write-discipline.js.map +1 -1
- package/dist/queries/directive-undelivered.d.ts +104 -0
- package/dist/queries/directive-undelivered.d.ts.map +1 -0
- package/dist/queries/directive-undelivered.js +162 -0
- package/dist/queries/directive-undelivered.js.map +1 -0
- package/dist/queries/ended-arm.d.ts +47 -0
- package/dist/queries/ended-arm.d.ts.map +1 -0
- package/dist/queries/ended-arm.js +35 -0
- package/dist/queries/ended-arm.js.map +1 -0
- package/dist/queries/escalation-consumption.d.ts.map +1 -1
- package/dist/queries/escalation-consumption.js +0 -1
- package/dist/queries/escalation-consumption.js.map +1 -1
- package/dist/queries/focus-discovery.d.ts +30 -0
- package/dist/queries/focus-discovery.d.ts.map +1 -1
- package/dist/queries/focus-discovery.js +4 -0
- package/dist/queries/focus-discovery.js.map +1 -1
- package/dist/queries/focus-integration-conflict.d.ts +78 -0
- package/dist/queries/focus-integration-conflict.d.ts.map +1 -0
- package/dist/queries/focus-integration-conflict.js +136 -0
- package/dist/queries/focus-integration-conflict.js.map +1 -0
- package/dist/queries/focuses.d.ts +6 -3
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +14 -5
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/incident-correlation.d.ts +1 -2
- package/dist/queries/incident-correlation.d.ts.map +1 -1
- package/dist/queries/incident-correlation.js +1 -3
- package/dist/queries/incident-correlation.js.map +1 -1
- package/dist/queries/issues.d.ts.map +1 -1
- package/dist/queries/issues.js +1 -0
- package/dist/queries/issues.js.map +1 -1
- package/dist/queries/local-models.js +1 -1
- package/dist/queries/local-models.js.map +1 -1
- package/dist/queries/recorded-targets-record.d.ts +46 -0
- package/dist/queries/recorded-targets-record.d.ts.map +1 -0
- package/dist/queries/recorded-targets-record.js +29 -0
- package/dist/queries/recorded-targets-record.js.map +1 -0
- package/dist/queries/schemas-local-model.d.ts +47 -0
- package/dist/queries/schemas-local-model.d.ts.map +1 -0
- package/dist/queries/schemas-local-model.js +57 -0
- package/dist/queries/schemas-local-model.js.map +1 -0
- package/dist/queries/schemas.d.ts +14 -32
- package/dist/queries/schemas.d.ts.map +1 -1
- package/dist/queries/schemas.js +24 -41
- package/dist/queries/schemas.js.map +1 -1
- package/dist/queries/sessions.d.ts +120 -12
- package/dist/queries/sessions.d.ts.map +1 -1
- package/dist/queries/sessions.js +104 -11
- package/dist/queries/sessions.js.map +1 -1
- package/dist/queries/shared.d.ts +1 -0
- package/dist/queries/shared.d.ts.map +1 -1
- package/dist/queries/shared.js +1 -1
- package/dist/queries/shared.js.map +1 -1
- package/dist/queries/system-session.d.ts.map +1 -1
- package/dist/queries/system-session.js +3 -1
- package/dist/queries/system-session.js.map +1 -1
- package/dist/queries/verification.js +1 -1
- package/dist/queries/workflows.d.ts.map +1 -1
- package/dist/queries/workflows.js +1 -0
- package/dist/queries/workflows.js.map +1 -1
- package/dist/resolvers/assembly-engine.d.ts +33 -1
- package/dist/resolvers/assembly-engine.d.ts.map +1 -1
- package/dist/resolvers/assembly-engine.js +74 -23
- package/dist/resolvers/assembly-engine.js.map +1 -1
- package/dist/resolvers/compose/loop-delivery-index-compose.d.ts +23 -3
- package/dist/resolvers/compose/loop-delivery-index-compose.d.ts.map +1 -1
- package/dist/resolvers/compose/loop-delivery-index-compose.js +90 -43
- package/dist/resolvers/compose/loop-delivery-index-compose.js.map +1 -1
- package/dist/resolvers/delivery-listing.d.ts +27 -0
- package/dist/resolvers/delivery-listing.d.ts.map +1 -1
- package/dist/resolvers/delivery-listing.js +52 -36
- package/dist/resolvers/delivery-listing.js.map +1 -1
- package/dist/resolvers/loop-delivery-index.d.ts +8 -0
- package/dist/resolvers/loop-delivery-index.d.ts.map +1 -1
- package/dist/resolvers/loop-delivery-index.js +68 -7
- package/dist/resolvers/loop-delivery-index.js.map +1 -1
- package/dist/resolvers/shared/loop.d.ts +7 -0
- package/dist/resolvers/shared/loop.d.ts.map +1 -1
- package/dist/resolvers/shared/loop.js.map +1 -1
- package/dist/resolvers/wiki-topic.d.ts +6 -5
- package/dist/resolvers/wiki-topic.d.ts.map +1 -1
- package/dist/resolvers/wiki-topic.js +43 -27
- package/dist/resolvers/wiki-topic.js.map +1 -1
- package/dist/session/session-lineage.d.ts.map +1 -1
- package/dist/session/session-lineage.js +1 -0
- package/dist/session/session-lineage.js.map +1 -1
- package/dist/shell/crash-recovery.d.ts +4 -2
- package/dist/shell/crash-recovery.d.ts.map +1 -1
- package/dist/shell/crash-recovery.js +15 -14
- package/dist/shell/crash-recovery.js.map +1 -1
- package/dist/shell/daemon-instance.d.ts +176 -0
- package/dist/shell/daemon-instance.d.ts.map +1 -0
- package/dist/shell/daemon-instance.js +281 -0
- package/dist/shell/daemon-instance.js.map +1 -0
- package/dist/shell/graceful-shutdown.d.ts +12 -1
- package/dist/shell/graceful-shutdown.d.ts.map +1 -1
- package/dist/shell/graceful-shutdown.js +7 -4
- package/dist/shell/graceful-shutdown.js.map +1 -1
- package/dist/shell/shutdown-ownership.d.ts +34 -0
- package/dist/shell/shutdown-ownership.d.ts.map +1 -0
- package/dist/shell/shutdown-ownership.js +51 -0
- package/dist/shell/shutdown-ownership.js.map +1 -0
- package/dist/shell/unified-shell.d.ts.map +1 -1
- package/dist/shell/unified-shell.js +12 -5
- package/dist/shell/unified-shell.js.map +1 -1
- package/dist/shell/worker-pidfile.d.ts +127 -11
- package/dist/shell/worker-pidfile.d.ts.map +1 -1
- package/dist/shell/worker-pidfile.js +349 -58
- package/dist/shell/worker-pidfile.js.map +1 -1
- package/dist/spawn/helpers.d.ts.map +1 -1
- package/dist/spawn/helpers.js +4 -2
- package/dist/spawn/helpers.js.map +1 -1
- package/dist/spawn/lead-continuation.d.ts.map +1 -1
- package/dist/spawn/lead-continuation.js +8 -2
- package/dist/spawn/lead-continuation.js.map +1 -1
- package/dist/spawn/lead-launch.d.ts +17 -1
- package/dist/spawn/lead-launch.d.ts.map +1 -1
- package/dist/spawn/lead-launch.js +56 -7
- package/dist/spawn/lead-launch.js.map +1 -1
- package/dist/spawn/lead-process-ownership.d.ts +5 -4
- package/dist/spawn/lead-process-ownership.d.ts.map +1 -1
- package/dist/spawn/lead-process-ownership.js +7 -4
- package/dist/spawn/lead-process-ownership.js.map +1 -1
- package/dist/spawn/lead-send.d.ts +97 -0
- package/dist/spawn/lead-send.d.ts.map +1 -0
- package/dist/spawn/lead-send.js +80 -0
- package/dist/spawn/lead-send.js.map +1 -0
- package/dist/spawn/lifecycle.d.ts +0 -12
- package/dist/spawn/lifecycle.d.ts.map +1 -1
- package/dist/spawn/lifecycle.js +76 -19
- package/dist/spawn/lifecycle.js.map +1 -1
- package/dist/spawn/liveness.d.ts.map +1 -1
- package/dist/spawn/liveness.js +3 -1
- package/dist/spawn/liveness.js.map +1 -1
- package/dist/spawn/one-shot-process-ownership.d.ts +46 -2
- package/dist/spawn/one-shot-process-ownership.d.ts.map +1 -1
- package/dist/spawn/one-shot-process-ownership.js +78 -3
- package/dist/spawn/one-shot-process-ownership.js.map +1 -1
- package/dist/spawn/process-group-kill.d.ts.map +1 -1
- package/dist/spawn/process-group-kill.js +15 -2
- package/dist/spawn/process-group-kill.js.map +1 -1
- package/dist/spawn/process-spawn.d.ts +5 -15
- package/dist/spawn/process-spawn.d.ts.map +1 -1
- package/dist/spawn/process-spawn.js +8 -1
- package/dist/spawn/process-spawn.js.map +1 -1
- package/dist/spawn/prompt-assembly.d.ts +35 -2
- package/dist/spawn/prompt-assembly.d.ts.map +1 -1
- package/dist/spawn/prompt-assembly.js +67 -44
- package/dist/spawn/prompt-assembly.js.map +1 -1
- package/dist/spawn/spawn-decision.d.ts +25 -1
- package/dist/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +19 -3
- package/dist/spawn/spawn-decision.js.map +1 -1
- package/dist/spawn/worktree-session.d.ts +49 -2
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +59 -5
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/testing/fixtures/conflicting-repo.d.ts +30 -0
- package/dist/testing/fixtures/conflicting-repo.d.ts.map +1 -0
- package/dist/testing/fixtures/conflicting-repo.js +89 -0
- package/dist/testing/fixtures/conflicting-repo.js.map +1 -0
- package/dist/testing/fixtures/index.d.ts.map +1 -1
- package/dist/testing/fixtures/index.js +2 -1
- package/dist/testing/fixtures/index.js.map +1 -1
- package/dist/testing/fixtures/pending-spawn-world.js +2 -2
- package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
- package/dist/types/exit-category.d.ts +59 -0
- package/dist/types/exit-category.d.ts.map +1 -0
- package/dist/types/exit-category.js +133 -0
- package/dist/types/exit-category.js.map +1 -0
- package/dist/types/focus.d.ts +19 -0
- package/dist/types/focus.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/session.d.ts +5 -1
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +1 -1
- package/dist/types/session.js.map +1 -1
- package/dist/verify/injection-stamp.d.ts +30 -0
- package/dist/verify/injection-stamp.d.ts.map +1 -1
- package/dist/verify/injection-stamp.js +37 -1
- package/dist/verify/injection-stamp.js.map +1 -1
- package/dist/verify/recorded-targets.d.ts +103 -0
- package/dist/verify/recorded-targets.d.ts.map +1 -0
- package/dist/verify/recorded-targets.js +159 -0
- package/dist/verify/recorded-targets.js.map +1 -0
- package/dist/verify/stall-detector-config.d.ts +5 -1
- package/dist/verify/stall-detector-config.d.ts.map +1 -1
- package/dist/verify/stall-detector-config.js +5 -1
- package/dist/verify/stall-detector-config.js.map +1 -1
- package/dist/verify/verification-deps-default.d.ts.map +1 -1
- package/dist/verify/verification-deps-default.js +15 -2
- package/dist/verify/verification-deps-default.js.map +1 -1
- package/dist/verify/verification-deps.d.ts +17 -1
- package/dist/verify/verification-deps.d.ts.map +1 -1
- package/dist/verify/verification-engine.d.ts.map +1 -1
- package/dist/verify/verification-engine.js +51 -47
- package/dist/verify/verification-engine.js.map +1 -1
- package/dist/verify/verify-restatement.d.ts +27 -33
- package/dist/verify/verify-restatement.d.ts.map +1 -1
- package/dist/verify/verify-restatement.js +74 -1
- package/dist/verify/verify-restatement.js.map +1 -1
- package/dist/worktree/state.d.ts +75 -1
- package/dist/worktree/state.d.ts.map +1 -1
- package/dist/worktree/state.js +89 -17
- package/dist/worktree/state.js.map +1 -1
- package/package.json +3 -3
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* Source types are extensible via a registry pattern.
|
|
8
8
|
*/
|
|
9
9
|
import type { DaemonConfig } from '../types/index.js';
|
|
10
|
+
import type { ArmFacts } from '../focus/recorded-new-intent.js';
|
|
10
11
|
/** Context available to resolvers when hydrating a recipe. */
|
|
11
12
|
export interface AssemblyContext {
|
|
12
13
|
focusId: string;
|
|
@@ -45,6 +46,18 @@ export interface AssemblyContext {
|
|
|
45
46
|
* called directly by a test, say).
|
|
46
47
|
*/
|
|
47
48
|
signals?: AssemblySignals;
|
|
49
|
+
/**
|
|
50
|
+
* The arm the focus is currently running under, when a team is live on it
|
|
51
|
+
* (`focus/live-arm-facts.ts`). Resolvers that render a delivery list read it
|
|
52
|
+
* so they can OMIT anything recorded as new intent after that arm
|
|
53
|
+
* (`focus/recorded-new-intent.ts`).
|
|
54
|
+
*
|
|
55
|
+
* Absent/null -- every caller that is not a live spawn or directive dispatch,
|
|
56
|
+
* and every focus with no live team -- means nothing can be proved recorded,
|
|
57
|
+
* which is the fail-closed default: the section renders exactly as it did
|
|
58
|
+
* before the rule existed.
|
|
59
|
+
*/
|
|
60
|
+
armFacts?: ArmFacts | null;
|
|
48
61
|
}
|
|
49
62
|
/**
|
|
50
63
|
* Findings a resolver may report to its caller MECHANICALLY, alongside (never
|
|
@@ -95,10 +108,27 @@ export interface AssemblyManifestEntry {
|
|
|
95
108
|
sourceRef: string;
|
|
96
109
|
/** Position of this entry in the recipe (0-based, recipe order). */
|
|
97
110
|
ordinal: number;
|
|
98
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Raw character count of what this source contributed to the prompt: the
|
|
113
|
+
* resolved section, or -- for a source that FAILED to resolve -- the line it
|
|
114
|
+
* contributed to the missing-context section. 0 for a source that resolved to
|
|
115
|
+
* nothing.
|
|
116
|
+
*/
|
|
99
117
|
charCount: number;
|
|
100
118
|
/** Modeled token estimate (chars / 4, rounded up). Exact for injected context. */
|
|
101
119
|
estimatedTokens: number;
|
|
120
|
+
/**
|
|
121
|
+
* True when this source did NOT resolve -- a resolver threw, or no resolver is
|
|
122
|
+
* registered for its type. Its content is ABSENT from the prompt.
|
|
123
|
+
*
|
|
124
|
+
* Absent (never false) on a source that resolved, INCLUDING one that resolved
|
|
125
|
+
* to nothing: an empty listing or a focus with no prior review report is a
|
|
126
|
+
* truthful answer, not a missing source, and reporting it as failed would bury
|
|
127
|
+
* the real failures in noise.
|
|
128
|
+
*/
|
|
129
|
+
failed?: boolean;
|
|
130
|
+
/** Why it failed, as stated in the prompt's missing-context section. Set iff `failed`. */
|
|
131
|
+
failureReason?: string;
|
|
102
132
|
}
|
|
103
133
|
/** Result of resolving a recipe with attribution: the composed string + manifest. */
|
|
104
134
|
export interface ResolvedAssembly {
|
|
@@ -162,4 +192,6 @@ export declare function resolveAssemblyRecipe(recipe: string[], context: Assembl
|
|
|
162
192
|
* and reports charCount 0).
|
|
163
193
|
*/
|
|
164
194
|
export declare function resolveAssemblyRecipeWithManifest(recipe: string[], context: AssemblyContext): Promise<ResolvedAssembly>;
|
|
195
|
+
/** Heading of the missing-context section; the marker its tests and readers key on. */
|
|
196
|
+
export declare const MISSING_CONTEXT_HEADING = "## Missing context";
|
|
165
197
|
//# sourceMappingURL=assembly-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-engine.d.ts","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"assembly-engine.d.ts","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAMhE,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;OA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AM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAelG;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iCAAiC,CACrD,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAgE3B;AAsCD,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,uBAAuB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 26 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/resolvers/assembly-engine.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
import { createLogger } from '../shell/log.js';
|
|
5
5
|
const log = createLogger({ module: 'assembly-engine' });
|
|
@@ -97,33 +97,26 @@ export async function resolveAssemblyRecipeWithManifest(recipe, context) {
|
|
|
97
97
|
// passed in is replaced below).
|
|
98
98
|
const signals = {};
|
|
99
99
|
const resolverContext = { ...context, signals };
|
|
100
|
+
// Lines for the missing-context section, in recipe order. One per source that
|
|
101
|
+
// failed to resolve; empty when every source answered.
|
|
102
|
+
const missingLines = [];
|
|
100
103
|
let ordinal = 0;
|
|
101
104
|
for (const ref of recipe) {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
//
|
|
105
|
+
const outcome = await resolveOneSource(ref, resolverContext);
|
|
106
|
+
// What this source contributed to the prompt: its resolved section, or its
|
|
107
|
+
// line in the missing-context section, or nothing. The manifest measures
|
|
108
|
+
// exactly that, so a failed source's cost is attributed to it and not to
|
|
109
|
+
// some other row.
|
|
107
110
|
let contributed = '';
|
|
108
|
-
if (
|
|
109
|
-
contributed =
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
if (outcome.failureReason === undefined) {
|
|
112
|
+
contributed = outcome.content;
|
|
113
|
+
if (contributed)
|
|
114
|
+
sections.push(contributed);
|
|
112
115
|
}
|
|
113
116
|
else {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
contributed = content;
|
|
118
|
-
sections.push(contributed);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
catch (err) {
|
|
122
|
-
const message = err.message;
|
|
123
|
-
contributed = `<!-- Assembly: failed to resolve "${ref}": ${message} -->`;
|
|
124
|
-
sections.push(contributed);
|
|
125
|
-
log.warn(`Failed to resolve source "${ref}": ${message}`);
|
|
126
|
-
}
|
|
117
|
+
contributed = missingSourceLine(ref, outcome.failureReason);
|
|
118
|
+
missingLines.push(contributed);
|
|
119
|
+
log.warn(`Failed to resolve source "${ref}": ${outcome.failureReason}`);
|
|
127
120
|
}
|
|
128
121
|
const charCount = contributed.length;
|
|
129
122
|
manifest.push({
|
|
@@ -131,9 +124,67 @@ export async function resolveAssemblyRecipeWithManifest(recipe, context) {
|
|
|
131
124
|
ordinal,
|
|
132
125
|
charCount,
|
|
133
126
|
estimatedTokens: estimateTokens(charCount),
|
|
127
|
+
...(outcome.failureReason === undefined
|
|
128
|
+
? {}
|
|
129
|
+
: { failed: true, failureReason: outcome.failureReason }),
|
|
134
130
|
});
|
|
135
131
|
ordinal += 1;
|
|
136
132
|
}
|
|
133
|
+
if (missingLines.length > 0)
|
|
134
|
+
sections.push(buildMissingContextSection(missingLines));
|
|
137
135
|
return { content: sections.join('\n\n'), manifest, signals };
|
|
138
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Resolve ONE recipe entry. The two ways a source can fail to arrive are both
|
|
139
|
+
* here, and both come back as a `failureReason` rather than as silence: no
|
|
140
|
+
* resolver is registered for the type (a directive naming a source the daemon
|
|
141
|
+
* does not have), or the resolver threw.
|
|
142
|
+
*
|
|
143
|
+
* A resolver that returns empty/whitespace is NOT a failure -- it answered, and
|
|
144
|
+
* the answer was "nothing".
|
|
145
|
+
*/
|
|
146
|
+
async function resolveOneSource(ref, context) {
|
|
147
|
+
const { type, params } = parseSourceReference(ref);
|
|
148
|
+
const resolver = resolverRegistry.get(type);
|
|
149
|
+
if (!resolver) {
|
|
150
|
+
return { content: '', failureReason: `no resolver is registered for source type "${type}"` };
|
|
151
|
+
}
|
|
152
|
+
try {
|
|
153
|
+
const content = await resolver(context, params);
|
|
154
|
+
return { content: content && content.trim() ? content : '' };
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
return { content: '', failureReason: `the ${type} resolver failed: ${err.message}` };
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** One source's line in the missing-context section. */
|
|
161
|
+
function missingSourceLine(sourceRef, reason) {
|
|
162
|
+
return `- \`${sourceRef}\` -- ${reason}`;
|
|
163
|
+
}
|
|
164
|
+
/** Heading of the missing-context section; the marker its tests and readers key on. */
|
|
165
|
+
export const MISSING_CONTEXT_HEADING = '## Missing context';
|
|
166
|
+
/**
|
|
167
|
+
* The section that makes a failed source VISIBLE to the agent that is missing
|
|
168
|
+
* it.
|
|
169
|
+
*
|
|
170
|
+
* Before this, a source that did not resolve left an HTML comment
|
|
171
|
+
* and a daemon-log warning: invisible in the rendered prompt and invisible to
|
|
172
|
+
* anyone not reading the log. A stage directive naming a wiki page that exists
|
|
173
|
+
* in one product went unnoticed for months that way. Naming the failure in the
|
|
174
|
+
* prompt puts it in front of the one party who can tell that the context it was
|
|
175
|
+
* promised never came -- and the manifest entry carries the same fact
|
|
176
|
+
* mechanically.
|
|
177
|
+
*/
|
|
178
|
+
function buildMissingContextSection(missingLines) {
|
|
179
|
+
return [
|
|
180
|
+
MISSING_CONTEXT_HEADING,
|
|
181
|
+
'',
|
|
182
|
+
'These context sources are named by this stage\'s assembly recipe but did NOT',
|
|
183
|
+
'resolve, so their content is absent from this prompt. Treat whatever depended',
|
|
184
|
+
'on them as UNAVAILABLE -- not as empty, and not as supplied elsewhere. (A',
|
|
185
|
+
'source that resolved and legitimately had nothing to say is not listed here.)',
|
|
186
|
+
'',
|
|
187
|
+
...missingLines,
|
|
188
|
+
].join('\n');
|
|
189
|
+
}
|
|
139
190
|
//# sourceMappingURL=assembly-engine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-engine.js","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+GAA+G;AAC/G,gBAAgB;
|
|
1
|
+
{"version":3,"file":"assembly-engine.js","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+GAA+G;AAC/G,gBAAgB;AAahB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAkJxD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,OAAO,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,+BAA+B;AAC/B,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA0B,CAAC;AAE3D,0DAA0D;AAC1D,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,QAAwB;IACjF,gBAAgB,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,WAAW,CAAC,UAAkB;IAC5C,OAAO,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC1C,CAAC;A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C;IAC/D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,IAAI,qBAAsB,GAAa,CAAC,OAAO,EAAE,EAAE,CAAC;IAClG,CAAC;AACH,CAAC;AAED,wDAAwD;AACxD,SAAS,iBAAiB,CAAC,SAAiB,EAAE,MAAc;IAC1D,OAAO,OAAO,SAAS,SAAS,MAAM,EAAE,CAAC;AAC3C,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,SAAS,0BAA0B,CAAC,YAA+B;IACjE,OAAO;QACL,uBAAuB;QACvB,EAAE;QACF,8EAA8E;QAC9E,+EAA+E;QAC/E,2EAA2E;QAC3E,+EAA+E;QAC/E,EAAE;QACF,GAAG,YAAY;KAChB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -15,6 +15,22 @@ export declare const REF = "loop.delivery_index";
|
|
|
15
15
|
export interface DeliveryIndexNowTarget {
|
|
16
16
|
now: string;
|
|
17
17
|
target: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* True when this target was added to the injection AFTER the focus was armed
|
|
20
|
+
* and is not causally wired to an effect the arm covers -- new intent the
|
|
21
|
+
* tree RECORDED, which runs on the next arm.
|
|
22
|
+
*
|
|
23
|
+
* The index is the lead's handoff surface: it says which Now->Target to embed
|
|
24
|
+
* in a worker's prompt, so a target listed here plainly is owed work. Verify
|
|
25
|
+
* judges the delivery only against the targets the arm covered, so leaving a
|
|
26
|
+
* recorded target unlabelled here hands a worker a task its own gate will not
|
|
27
|
+
* ask for -- the Tinker Tailor shape this focus exists to close.
|
|
28
|
+
*
|
|
29
|
+
* ABSENT/false means owed, which is the direction every unprovable case
|
|
30
|
+
* resolves to: the caller holds to EVERY target when it cannot establish the
|
|
31
|
+
* split, so a resolver that never sets this renders exactly as before.
|
|
32
|
+
*/
|
|
33
|
+
recorded?: boolean;
|
|
18
34
|
}
|
|
19
35
|
/** One delivery + the fields of its linked injection the index line renders. */
|
|
20
36
|
export interface LoopDeliveryIndexEntry {
|
|
@@ -35,10 +51,14 @@ export interface LoopDeliveryIndexEntry {
|
|
|
35
51
|
}
|
|
36
52
|
/**
|
|
37
53
|
* Render the lead's per-delivery INDEX: one flat line per in-focus delivery
|
|
38
|
-
* with a linked injection -- delivery name, injection seq, its first
|
|
39
|
-
* (with a "+N more" tail),
|
|
54
|
+
* with a linked injection -- delivery name, injection seq, its first OWED
|
|
55
|
+
* Now->Target (with a "+N more" tail), the pull handle
|
|
40
56
|
* telora_reality_tree_injection_context(seq=<seq>) that returns the full
|
|
41
|
-
* differential on demand
|
|
57
|
+
* differential on demand, and -- when the arm does not cover every target --
|
|
58
|
+
* the recorded ones, labelled. Returns '' when there are no entries.
|
|
59
|
+
*
|
|
60
|
+
* Only targets the arm covers count toward the owed Now->Target and its "+N
|
|
61
|
+
* more"; a recorded target is named on the line but never presented as work.
|
|
42
62
|
*/
|
|
43
63
|
export declare function composeLoopDeliveryIndex(entries: LoopDeliveryIndexEntry[]): string;
|
|
44
64
|
//# sourceMappingURL=loop-delivery-index-compose.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop-delivery-index-compose.d.ts","sourceRoot":"","sources":["../../../src/resolvers/compose/loop-delivery-index-compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,GAAG,wBAAwB,CAAC;AAEzC,+DAA+D;AAC/D,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"loop-delivery-index-compose.d.ts","sourceRoot":"","sources":["../../../src/resolvers/compose/loop-delivery-index-compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,GAAG,wBAAwB,CAAC;AAEzC,+DAA+D;AAC/D,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA+ID;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,MAAM,CAOlF"}
|
|
@@ -12,18 +12,16 @@
|
|
|
12
12
|
/** The assembly source-reference this module composes. */
|
|
13
13
|
export const REF = 'loop.delivery_index';
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* Map every injection materialized by MORE THAN ONE delivery to the names of
|
|
16
|
+
* those deliveries.
|
|
17
|
+
*
|
|
18
|
+
* Grouped by injection NODE ID, never by seq (see
|
|
19
|
+
* LoopDeliveryIndexEntry.injectionId). Two deliveries citing one injection is
|
|
20
|
+
* the defect this flag exists to surface -- it was previously latent here,
|
|
21
|
+
* visible only as two lines happening to cite the same #seq, which is what
|
|
22
|
+
* left an inheriting lead to re-derive the duplication by hand.
|
|
20
23
|
*/
|
|
21
|
-
|
|
22
|
-
// Shared-injection detection: group by injection NODE ID, never by seq (see
|
|
23
|
-
// LoopDeliveryIndexEntry.injectionId). Two deliveries citing one injection is
|
|
24
|
-
// the defect this flag exists to surface -- it was previously latent here,
|
|
25
|
-
// visible only as two lines happening to cite the same #seq, which is what
|
|
26
|
-
// left an inheriting lead to re-derive the duplication by hand.
|
|
24
|
+
function findSharedInjections(entries) {
|
|
27
25
|
const namesByInjection = new Map();
|
|
28
26
|
for (const entry of entries) {
|
|
29
27
|
if (!entry.injectionId)
|
|
@@ -32,40 +30,67 @@ export function composeLoopDeliveryIndex(entries) {
|
|
|
32
30
|
names.push(entry.deliveryName);
|
|
33
31
|
namesByInjection.set(entry.injectionId, names);
|
|
34
32
|
}
|
|
35
|
-
const
|
|
33
|
+
const shared = new Map();
|
|
36
34
|
for (const [injectionId, names] of namesByInjection) {
|
|
37
35
|
if (names.length > 1)
|
|
38
|
-
|
|
36
|
+
shared.set(injectionId, names);
|
|
39
37
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
`-> pull: telora_reality_tree_injection_context(seq=${seq})${sharedTag}`);
|
|
38
|
+
return shared;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The OWED half of an entry's targets and the half the arm merely recorded.
|
|
42
|
+
*
|
|
43
|
+
* Only the owed half may drive the Now->Target the lead hands a worker (see
|
|
44
|
+
* DeliveryIndexNowTarget.recorded). Absent/false means owed, so an input that
|
|
45
|
+
* never sets the flag splits to "everything owed".
|
|
46
|
+
*/
|
|
47
|
+
function splitByCoverage(entry) {
|
|
48
|
+
const nowTargets = entry.nowTargets ?? [];
|
|
49
|
+
return {
|
|
50
|
+
held: nowTargets.filter((nt) => nt.recorded !== true),
|
|
51
|
+
recorded: nowTargets.filter((nt) => nt.recorded === true),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** The Now->Target segment: the first OWED target, or an affirmative stand-in. */
|
|
55
|
+
function renderNowTarget(held, recorded, statement) {
|
|
56
|
+
const first = held[0];
|
|
57
|
+
if (first) {
|
|
58
|
+
const target = first.target && first.target.trim().length > 0
|
|
59
|
+
? first.target
|
|
60
|
+
: '(no FRT overlay yet)';
|
|
61
|
+
const more = held.length > 1 ? ` (+${held.length - 1} more)` : '';
|
|
62
|
+
return `Now: ${first.now} -> Target: ${target}${more}`;
|
|
66
63
|
}
|
|
67
|
-
if (
|
|
68
|
-
|
|
64
|
+
if (recorded.length > 0) {
|
|
65
|
+
// Every target this injection carries arrived after the arm. Saying so
|
|
66
|
+
// affirmatively is the point: an empty owed half must not read as "no
|
|
67
|
+
// context was resolved", which is what would send a lead pulling the full
|
|
68
|
+
// differential and treating all of it as owed.
|
|
69
|
+
return `(injection: ${statement} -- this arm covers none of its targets)`;
|
|
70
|
+
}
|
|
71
|
+
return `(injection: ${statement})`;
|
|
72
|
+
}
|
|
73
|
+
/** One index line: the delivery, its owed Now->Target, the pull handle, the flags. */
|
|
74
|
+
function renderEntryLine(entry, sharedByInjection) {
|
|
75
|
+
const { deliveryName, seq, statement } = entry;
|
|
76
|
+
const { held, recorded } = splitByCoverage(entry);
|
|
77
|
+
const firstRecorded = recorded[0];
|
|
78
|
+
const recordedTag = firstRecorded
|
|
79
|
+
? ` -- RECORDED, NOT OWED UNDER THIS ARM: "${firstRecorded.now}"` +
|
|
80
|
+
(recorded.length > 1 ? ` (+${recorded.length - 1} more)` : '')
|
|
81
|
+
: '';
|
|
82
|
+
const shared = entry.injectionId ? sharedByInjection.get(entry.injectionId) : undefined;
|
|
83
|
+
const sharedTag = shared
|
|
84
|
+
? ` -- SHARED INJECTION with ${shared
|
|
85
|
+
.filter((n) => n !== deliveryName)
|
|
86
|
+
.map((n) => `"${n}"`)
|
|
87
|
+
.join(', ')}`
|
|
88
|
+
: '';
|
|
89
|
+
return (`- ${deliveryName} -> injection #${seq} -> ${renderNowTarget(held, recorded, statement)} ` +
|
|
90
|
+
`-> pull: telora_reality_tree_injection_context(seq=${seq})${sharedTag}${recordedTag}`);
|
|
91
|
+
}
|
|
92
|
+
/** The section header, plus the clauses the rendered lines actually earned. */
|
|
93
|
+
function renderHeader(hasSharedInjection, hasRecordedTarget) {
|
|
69
94
|
const header = [
|
|
70
95
|
'## Per-Delivery Index',
|
|
71
96
|
'',
|
|
@@ -76,10 +101,32 @@ export function composeLoopDeliveryIndex(entries) {
|
|
|
76
101
|
"returned Now->Target in the worker's task prompt so the worker begins holding",
|
|
77
102
|
"its delivery's start->end context.",
|
|
78
103
|
];
|
|
79
|
-
if (
|
|
104
|
+
if (hasSharedInjection) {
|
|
80
105
|
header.push('', 'SHARED INJECTIONS: the deliveries flagged below materialize the SAME injection.', 'That splits the evidence for one desired effect -- verify partitions commits by the', 'Telora-Delivery trailer, so whichever delivery the coder did not use holds acceptance', 'criteria with no trailered commits to evidence and the gate re-queues it. Resolve the', 'ANCHOR (retire or unlink one side, or record the split as deliberate); do NOT write the', 'work twice, and do NOT abandon it. The operator-facing focus surface lists every', 'injection carrying more than one live delivery if you need the full picture.');
|
|
81
106
|
}
|
|
107
|
+
if (hasRecordedTarget) {
|
|
108
|
+
header.push('', 'RECORDED TARGETS: a target added to an injection AFTER this focus was armed, and not', 'causally wired to an effect the arm already covers, is NEW INTENT. It is listed on the', 'line so nothing is hidden from you, and it is NOT owed work under this arm: do not file', 'issues for it, do not hand it to a worker, and do not read verify as holding you to it --', 'verify judges this delivery against the targets the arm covered and lists the rest as', 'recorded. Recorded is not refused and not frozen: the target stands on the tree and runs', 'when the focus is armed again. If you believe one IS means to a covered effect, say so', 'the way the tree can check -- draw the causal edge (telora_reality_tree_edge) from it to', 'the covered effect it causes; that redraws the line, and a sentence does not.');
|
|
109
|
+
}
|
|
82
110
|
header.push('');
|
|
83
|
-
return header
|
|
111
|
+
return header;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Render the lead's per-delivery INDEX: one flat line per in-focus delivery
|
|
115
|
+
* with a linked injection -- delivery name, injection seq, its first OWED
|
|
116
|
+
* Now->Target (with a "+N more" tail), the pull handle
|
|
117
|
+
* telora_reality_tree_injection_context(seq=<seq>) that returns the full
|
|
118
|
+
* differential on demand, and -- when the arm does not cover every target --
|
|
119
|
+
* the recorded ones, labelled. Returns '' when there are no entries.
|
|
120
|
+
*
|
|
121
|
+
* Only targets the arm covers count toward the owed Now->Target and its "+N
|
|
122
|
+
* more"; a recorded target is named on the line but never presented as work.
|
|
123
|
+
*/
|
|
124
|
+
export function composeLoopDeliveryIndex(entries) {
|
|
125
|
+
const sharedByInjection = findSharedInjections(entries);
|
|
126
|
+
const lines = entries.map((entry) => renderEntryLine(entry, sharedByInjection));
|
|
127
|
+
if (lines.length === 0)
|
|
128
|
+
return '';
|
|
129
|
+
const hasRecordedTarget = entries.some((entry) => splitByCoverage(entry).recorded.length > 0);
|
|
130
|
+
return renderHeader(sharedByInjection.size > 0, hasRecordedTarget).concat(lines).join('\n');
|
|
84
131
|
}
|
|
85
132
|
//# sourceMappingURL=loop-delivery-index-compose.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop-delivery-index-compose.js","sourceRoot":"","sources":["../../../src/resolvers/compose/loop-delivery-index-compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,GAAG,GAAG,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"loop-delivery-index-compose.js","sourceRoot":"","sources":["../../../src/resolvers/compose/loop-delivery-index-compose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,GAAG,GAAG,qBAAqB,CAAC;AA0CzC;;;;;;;;;GASG;AACH,SAAS,oBAAoB,CAAC,OAAiC;IAC7D,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAoB,CAAC;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;IACxD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAChF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAElC,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9F,OAAO,YAAY,CAAC,iBAAiB,CAAC,IAAI,GAAG,CAAC,EAAE,iBAAiB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
import type { AssemblyContext } from './assembly-engine.js';
|
|
2
|
+
import { getFocusDeliveries, getFocusIssues } from '../queries/focuses.js';
|
|
3
|
+
import { getAuditCycleLowerBound } from './shared/audit.js';
|
|
4
|
+
/**
|
|
5
|
+
* The reads this resolver makes, as an injectable seam.
|
|
6
|
+
*
|
|
7
|
+
* Exists so `resolveDeliveryListing` below -- the REAL resolver body, not a
|
|
8
|
+
* restatement of it -- can be driven by a test without registering a
|
|
9
|
+
* `mock.module` (see packages/daemon/CLAUDE.md, the daemon-core mock-loader
|
|
10
|
+
* quirk). Production wiring passes `defaultDeliveryListingDeps`.
|
|
11
|
+
*/
|
|
12
|
+
export interface DeliveryListingDeps {
|
|
13
|
+
getFocusDeliveries: typeof getFocusDeliveries;
|
|
14
|
+
getFocusIssues: typeof getFocusIssues;
|
|
15
|
+
getAuditCycleLowerBound: typeof getAuditCycleLowerBound;
|
|
16
|
+
}
|
|
17
|
+
export declare const defaultDeliveryListingDeps: DeliveryListingDeps;
|
|
1
18
|
/**
|
|
2
19
|
* delivery.listing
|
|
3
20
|
*
|
|
@@ -11,7 +28,17 @@
|
|
|
11
28
|
* - "done_since_last_audit": deliveries with executionStatus=done whose
|
|
12
29
|
* updatedAt is at or after the previous audit cycle's completed_at.
|
|
13
30
|
* When no prior audit exists, returns all done deliveries.
|
|
31
|
+
*
|
|
32
|
+
* RECORDED NEW INTENT. Every branch hands `context.armFacts` to
|
|
33
|
+
* `buildDeliveryListingSection`, which omits any delivery recorded as new
|
|
34
|
+
* intent under the live arm. This is the DIRECTIVE half of the initial team
|
|
35
|
+
* prompt -- the builtin Building stage's assembly recipe ends in
|
|
36
|
+
* `delivery.listing` -- so without it a recorded delivery still reached a
|
|
37
|
+
* freshly spawned team under "Other Deliveries" even though the legacy prompt
|
|
38
|
+
* path had stopped naming it. Absent arm facts (no live team, or a caller that
|
|
39
|
+
* is not a spawn) => the listing is unchanged.
|
|
14
40
|
*/
|
|
41
|
+
export declare function resolveDeliveryListing(context: AssemblyContext, params: Record<string, string>, deps?: DeliveryListingDeps): Promise<string>;
|
|
15
42
|
/** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
|
|
16
43
|
export declare function registerDeliveryListingResolver(): void;
|
|
17
44
|
//# sourceMappingURL=delivery-listing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-listing.d.ts","sourceRoot":"","sources":["../../src/resolvers/delivery-listing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delivery-listing.d.ts","sourceRoot":"","sources":["../../src/resolvers/delivery-listing.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,uBAAuB,EAAE,OAAO,uBAAuB,CAAC;CACzD;AAED,eAAO,MAAM,0BAA0B,EAAE,mBAIxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,GAAE,mBAAgD,GACrD,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED,oGAAoG;AACpG,wBAAgB,+BAA+B,IAAI,IAAI,CAGtD"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: packages/daemon/src/resolvers/delivery-listing-arm-coverage.test.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
import { registerSourceResolver } from './assembly-engine.js';
|
|
5
5
|
import { getFocusDeliveries, getFocusIssues } from '../queries/focuses.js';
|
|
6
6
|
import { buildDeliveryListingSection } from '../prompt/team-prompt-base.js';
|
|
7
7
|
import { getAuditCycleLowerBound } from './shared/audit.js';
|
|
8
|
+
export const defaultDeliveryListingDeps = {
|
|
9
|
+
getFocusDeliveries,
|
|
10
|
+
getFocusIssues,
|
|
11
|
+
getAuditCycleLowerBound,
|
|
12
|
+
};
|
|
8
13
|
/**
|
|
9
14
|
* delivery.listing
|
|
10
15
|
*
|
|
@@ -18,43 +23,54 @@ import { getAuditCycleLowerBound } from './shared/audit.js';
|
|
|
18
23
|
* - "done_since_last_audit": deliveries with executionStatus=done whose
|
|
19
24
|
* updatedAt is at or after the previous audit cycle's completed_at.
|
|
20
25
|
* When no prior audit exists, returns all done deliveries.
|
|
26
|
+
*
|
|
27
|
+
* RECORDED NEW INTENT. Every branch hands `context.armFacts` to
|
|
28
|
+
* `buildDeliveryListingSection`, which omits any delivery recorded as new
|
|
29
|
+
* intent under the live arm. This is the DIRECTIVE half of the initial team
|
|
30
|
+
* prompt -- the builtin Building stage's assembly recipe ends in
|
|
31
|
+
* `delivery.listing` -- so without it a recorded delivery still reached a
|
|
32
|
+
* freshly spawned team under "Other Deliveries" even though the legacy prompt
|
|
33
|
+
* path had stopped naming it. Absent arm facts (no live team, or a caller that
|
|
34
|
+
* is not a spawn) => the listing is unchanged.
|
|
21
35
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
36
|
+
export async function resolveDeliveryListing(context, params, deps = defaultDeliveryListingDeps) {
|
|
37
|
+
const deliveries = await deps.getFocusDeliveries(context.focusId);
|
|
38
|
+
if (deliveries.length === 0)
|
|
39
|
+
return '';
|
|
40
|
+
const issues = await deps.getFocusIssues(context.focusId);
|
|
41
|
+
const scope = params.scope ?? 'team';
|
|
42
|
+
const armFacts = context.armFacts ?? null;
|
|
43
|
+
if (scope === 'verify') {
|
|
44
|
+
// Filter to only verify deliveries for review context
|
|
45
|
+
const verifyDeliveries = deliveries.filter(d => d.executionStatus === 'verify');
|
|
46
|
+
if (verifyDeliveries.length === 0)
|
|
47
|
+
return '';
|
|
48
|
+
const lines = buildDeliveryListingSection(verifyDeliveries, issues, armFacts);
|
|
49
|
+
return lines.join('\n');
|
|
50
|
+
}
|
|
51
|
+
if (scope === 'done_since_last_audit') {
|
|
52
|
+
const since = await deps.getAuditCycleLowerBound(context.focusId);
|
|
53
|
+
const doneDeliveries = deliveries.filter(d => {
|
|
54
|
+
if (d.executionStatus !== 'done')
|
|
55
|
+
return false;
|
|
56
|
+
if (!since)
|
|
57
|
+
return true;
|
|
58
|
+
// updatedAt is the closest proxy for "moved to done at" -- when the
|
|
59
|
+
// daemon advances a delivery to done, that bumps updated_at. Missing
|
|
60
|
+
// timestamps are included so we don't silently drop a real completion.
|
|
61
|
+
return !d.updatedAt || d.updatedAt >= since;
|
|
62
|
+
});
|
|
63
|
+
if (doneDeliveries.length === 0)
|
|
27
64
|
return '';
|
|
28
|
-
const
|
|
29
|
-
const scope = params.scope ?? 'team';
|
|
30
|
-
if (scope === 'verify') {
|
|
31
|
-
// Filter to only verify deliveries for review context
|
|
32
|
-
const verifyDeliveries = deliveries.filter(d => d.executionStatus === 'verify');
|
|
33
|
-
if (verifyDeliveries.length === 0)
|
|
34
|
-
return '';
|
|
35
|
-
const lines = buildDeliveryListingSection(verifyDeliveries, issues);
|
|
36
|
-
return lines.join('\n');
|
|
37
|
-
}
|
|
38
|
-
if (scope === 'done_since_last_audit') {
|
|
39
|
-
const since = await getAuditCycleLowerBound(context.focusId);
|
|
40
|
-
const doneDeliveries = deliveries.filter(d => {
|
|
41
|
-
if (d.executionStatus !== 'done')
|
|
42
|
-
return false;
|
|
43
|
-
if (!since)
|
|
44
|
-
return true;
|
|
45
|
-
// updatedAt is the closest proxy for "moved to done at" -- when the
|
|
46
|
-
// daemon advances a delivery to done, that bumps updated_at. Missing
|
|
47
|
-
// timestamps are included so we don't silently drop a real completion.
|
|
48
|
-
return !d.updatedAt || d.updatedAt >= since;
|
|
49
|
-
});
|
|
50
|
-
if (doneDeliveries.length === 0)
|
|
51
|
-
return '';
|
|
52
|
-
const lines = buildDeliveryListingSection(doneDeliveries, issues);
|
|
53
|
-
return lines.join('\n');
|
|
54
|
-
}
|
|
55
|
-
// Default: use buildDeliveryListingSection which partitions into team/other
|
|
56
|
-
const lines = buildDeliveryListingSection(deliveries, issues);
|
|
65
|
+
const lines = buildDeliveryListingSection(doneDeliveries, issues, armFacts);
|
|
57
66
|
return lines.join('\n');
|
|
58
|
-
}
|
|
67
|
+
}
|
|
68
|
+
// Default: use buildDeliveryListingSection which partitions into team/other
|
|
69
|
+
const lines = buildDeliveryListingSection(deliveries, issues, armFacts);
|
|
70
|
+
return lines.join('\n');
|
|
71
|
+
}
|
|
72
|
+
/** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
|
|
73
|
+
export function registerDeliveryListingResolver() {
|
|
74
|
+
registerSourceResolver('delivery.listing', (context, params) => resolveDeliveryListing(context, params));
|
|
59
75
|
}
|
|
60
76
|
//# sourceMappingURL=delivery-listing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-listing.js","sourceRoot":"","sources":["../../src/resolvers/delivery-listing.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"delivery-listing.js","sourceRoot":"","sources":["../../src/resolvers/delivery-listing.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iFAAiF;AACjF,gBAAgB;AAEhB,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAgB5D,MAAM,CAAC,MAAM,0BAA0B,GAAwB;IAC7D,kBAAkB;IAClB,cAAc;IACd,uBAAuB;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAwB,EACxB,MAA8B,EAC9B,OAA4B,0BAA0B;IAEtD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC;IACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC;IAE1C,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvB,sDAAsD;QACtD,MAAM,gB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