@openrig/cli 0.7.15 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/daemon/assets/onboarding/02-self-and-competent-action.md +5 -41
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/README.md +26 -7
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +22 -6
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +4 -1
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +1 -1
- package/daemon/assets/skills/rigs/SKILL.md +155 -41
- package/daemon/assets/skills/rigs/references/installing-for-someone.md +47 -0
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +169 -40
- package/daemon/context-packs/reference/getting-started.md +12 -11
- package/daemon/context-packs/reference/manifest.yaml +4 -1
- package/daemon/context-packs/reference/product-journey-sdlc.md +348 -0
- package/daemon/context-packs/reference/rig-spec.md +92 -4
- package/daemon/context-packs/reference/whats-new.md +397 -5
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +4 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/SKILL.md +22 -6
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +42 -6
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +4 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +2 -0
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +28 -11
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +15 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +75 -28
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/openshell-driver.d.ts +1 -0
- package/daemon/dist/adapters/openshell-driver.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-driver.js +3 -0
- package/daemon/dist/adapters/openshell-driver.js.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.d.ts +9 -7
- package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.js +20 -3
- package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +38 -4
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +244 -30
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +6 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +17 -3
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +8 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/167_seat_handover_attempts.d.ts +14 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.d.ts.map +1 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.js +54 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.js.map +1 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.d.ts +6 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.d.ts.map +1 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.js +10 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.js.map +1 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.d.ts +5 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.d.ts.map +1 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.js +25 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.js.map +1 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.d.ts +3 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.d.ts.map +1 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.js +21 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.js.map +1 -0
- package/daemon/dist/domain/claim-service.d.ts +1 -3
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +3 -1
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +11 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +83 -36
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-filesystem-preflight.d.ts +33 -0
- package/daemon/dist/domain/codex-filesystem-preflight.d.ts.map +1 -0
- package/daemon/dist/domain/codex-filesystem-preflight.js +255 -0
- package/daemon/dist/domain/codex-filesystem-preflight.js.map +1 -0
- package/daemon/dist/domain/codex-member-permissions.d.ts +23 -2
- package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.js +55 -9
- package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +13 -0
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.js +37 -30
- package/daemon/dist/domain/codex-network-default.js.map +1 -1
- package/daemon/dist/domain/codex-thread-id.d.ts +13 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +132 -9
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +59 -13
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/connection-contract.d.ts.map +1 -1
- package/daemon/dist/domain/connection-contract.js +2 -1
- package/daemon/dist/domain/connection-contract.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +11 -2
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +33 -13
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +5 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +66 -4
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/destination-successor.d.ts +3 -0
- package/daemon/dist/domain/destination-successor.d.ts.map +1 -0
- package/daemon/dist/domain/destination-successor.js +49 -0
- package/daemon/dist/domain/destination-successor.js.map +1 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts +15 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts.map +1 -1
- package/daemon/dist/domain/environment-lifecycle.js +22 -4
- package/daemon/dist/domain/environment-lifecycle.js.map +1 -1
- package/daemon/dist/domain/expected-conversation.d.ts.map +1 -1
- package/daemon/dist/domain/expected-conversation.js +26 -11
- package/daemon/dist/domain/expected-conversation.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.d.ts +4 -0
- package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +10 -3
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +3 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +14 -4
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +4 -0
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts +3 -0
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +45 -4
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/hosts/fleet-scopes.d.ts +111 -0
- package/daemon/dist/domain/hosts/fleet-scopes.d.ts.map +1 -0
- package/daemon/dist/domain/hosts/fleet-scopes.js +231 -0
- package/daemon/dist/domain/hosts/fleet-scopes.js.map +1 -0
- package/daemon/dist/domain/hosts/read-through.d.ts +1 -1
- package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/read-through.js +4 -0
- package/daemon/dist/domain/hosts/read-through.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-model-picker.d.ts +2 -0
- package/daemon/dist/domain/native-model-picker.d.ts.map +1 -1
- package/daemon/dist/domain/native-model-picker.js +8 -2
- package/daemon/dist/domain/native-model-picker.js.map +1 -1
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +12 -5
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +11 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +25 -4
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +109 -26
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-connector.js +5 -3
- package/daemon/dist/domain/network/network-connector.js.map +1 -1
- package/daemon/dist/domain/network/network-installations.d.ts +5 -4
- package/daemon/dist/domain/network/network-installations.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-installations.js +42 -11
- package/daemon/dist/domain/network/network-installations.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +6 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +10 -3
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts +4 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.js +10 -2
- package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts.map +1 -1
- package/daemon/dist/domain/operation-correlation.js +1 -1
- package/daemon/dist/domain/operation-correlation.js.map +1 -1
- package/daemon/dist/domain/permission-account.d.ts.map +1 -1
- package/daemon/dist/domain/permission-account.js +8 -6
- package/daemon/dist/domain/permission-account.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/queue-destination-check.d.ts +2 -0
- package/daemon/dist/domain/queue-destination-check.d.ts.map +1 -1
- package/daemon/dist/domain/queue-destination-check.js +8 -11
- package/daemon/dist/domain/queue-destination-check.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +7 -1
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +226 -20
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +39 -17
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +96 -64
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +49 -21
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +6 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts +4 -4
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +30 -16
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +90 -24
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/receiver-context.js +1 -1
- package/daemon/dist/domain/receiver-context.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +13 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +122 -9
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +4 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +132 -48
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +2 -0
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +17 -4
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +64 -15
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +6 -0
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +14 -8
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/rig-delivery-drain.d.ts +46 -0
- package/daemon/dist/domain/rig-delivery-drain.d.ts.map +1 -0
- package/daemon/dist/domain/rig-delivery-drain.js +128 -0
- package/daemon/dist/domain/rig-delivery-drain.js.map +1 -0
- package/daemon/dist/domain/rig-edge-ops.js +1 -1
- package/daemon/dist/domain/rig-edge-ops.js.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +4 -1
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +20 -3
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +71 -11
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +6 -2
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +36 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +19 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +69 -12
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +15 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +8 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +38 -3
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-attempts.d.ts +50 -0
- package/daemon/dist/domain/seat-handover-attempts.d.ts.map +1 -0
- package/daemon/dist/domain/seat-handover-attempts.js +75 -0
- package/daemon/dist/domain/seat-handover-attempts.js.map +1 -0
- package/daemon/dist/domain/seat-handover-service.d.ts +64 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +443 -29
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +3 -2
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +16 -4
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +47 -2
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +48 -2
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-home-record-types.d.ts +16 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.js +2 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts +173 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record.js +317 -0
- package/daemon/dist/domain/seat-runtime-home-record.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +7 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +47 -2
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts +16 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.js +178 -1
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
- package/daemon/dist/domain/session-name.d.ts +13 -0
- package/daemon/dist/domain/session-name.d.ts.map +1 -1
- package/daemon/dist/domain/session-name.js +77 -0
- package/daemon/dist/domain/session-name.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +7 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +7 -4
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +1 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +33 -9
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shared-history-selection.d.ts +1 -0
- package/daemon/dist/domain/shared-history-selection.d.ts.map +1 -1
- package/daemon/dist/domain/shared-history-selection.js +3 -1
- package/daemon/dist/domain/shared-history-selection.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +3 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +7 -3
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts +4 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +24 -12
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +3 -2
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +16 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +70 -38
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +43 -2
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +3 -1
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +6 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +4 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +28 -1
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +13 -8
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +14 -2
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +41 -4
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +55 -0
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +355 -174
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts +7 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.js +51 -13
- package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +11 -3
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +141 -27
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +12 -7
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +6 -3
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +78 -31
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +17 -0
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rig-delivery-drain.d.ts +3 -0
- package/daemon/dist/routes/rig-delivery-drain.d.ts.map +1 -0
- package/daemon/dist/routes/rig-delivery-drain.js +46 -0
- package/daemon/dist/routes/rig-delivery-drain.js.map +1 -0
- package/daemon/dist/routes/scopes.d.ts.map +1 -1
- package/daemon/dist/routes/scopes.js +102 -19
- package/daemon/dist/routes/scopes.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +50 -2
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +54 -10
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +230 -40
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +36 -2
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +2 -0
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/watchdog.d.ts.map +1 -1
- package/daemon/dist/routes/watchdog.js +7 -1
- package/daemon/dist/routes/watchdog.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +23 -5
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +2 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +111 -37
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +90 -2
- package/daemon/docs/reference/daemon-http-clients.md +69 -0
- package/daemon/docs/reference/developing.md +1 -1
- package/daemon/docs/reference/gateway-participants.md +5 -3
- package/daemon/docs/reference/getting-started.md +12 -11
- package/daemon/docs/reference/hosted-members.md +4 -2
- package/daemon/docs/reference/network-connector.md +4 -3
- package/daemon/docs/reference/queue-erasure.md +16 -1
- package/daemon/docs/reference/quickstart.md +2 -2
- package/daemon/docs/reference/rig-spec.md +92 -4
- package/daemon/docs/reference/rosters.md +26 -0
- package/daemon/docs/reference/seat-delivery.md +7 -1
- package/daemon/docs/reference/whats-new.md +397 -5
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +1 -1
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +22 -6
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +78 -18
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +9 -6
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +7 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +2 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +5 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/environment.js +1 -1
- package/dist/commands/environment.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +8 -0
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +18 -1
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/network.d.ts +2 -0
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +14 -1
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +11 -5
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +49 -12
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +6 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/roster.d.ts +4 -2
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/roster.js +2 -2
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/seat.d.ts +2 -0
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +201 -14
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +31 -6
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +5 -3
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +7 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +4 -0
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +30 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +3 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +5 -0
- package/dist/config-store.js.map +1 -1
- package/dist/lib/bundle-check.d.ts.map +1 -1
- package/dist/lib/bundle-check.js +33 -3
- package/dist/lib/bundle-check.js.map +1 -1
- package/dist/mcp-http.d.ts +3 -0
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +13 -0
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +9 -2
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +287 -69
- package/dist/mcp-server.js.map +1 -1
- package/dist/person-registration-offer.d.ts.map +1 -1
- package/dist/person-registration-offer.js +2 -1
- package/dist/person-registration-offer.js.map +1 -1
- package/package.json +2 -2
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +1 -0
- package/tui/dist/commands/registry.js.map +1 -1
- package/tui/dist/config/config-model.js +1 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/crash-cart/start-daemon.d.ts.map +1 -1
- package/tui/dist/crash-cart/start-daemon.js +4 -2
- package/tui/dist/crash-cart/start-daemon.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +12 -1
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +44 -2
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +43 -1
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/main.js +3 -0
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/page-read.d.ts.map +1 -1
- package/tui/dist/page-read.js +2 -1
- package/tui/dist/page-read.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +110 -16
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/fleet-scopes-model.d.ts +73 -0
- package/tui/dist/scopes/fleet-scopes-model.d.ts.map +1 -0
- package/tui/dist/scopes/fleet-scopes-model.js +102 -0
- package/tui/dist/scopes/fleet-scopes-model.js.map +1 -0
- package/tui/dist/scopes/scopes-model.d.ts +2 -0
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +7 -4
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/sections.d.ts.map +1 -1
- package/tui/dist/sections.js +5 -0
- package/tui/dist/sections.js.map +1 -1
- package/tui/dist/startup.d.ts +5 -0
- package/tui/dist/startup.d.ts.map +1 -1
- package/tui/dist/startup.js +12 -0
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +12 -5
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/types.d.ts +18 -1
- package/tui/dist/types.d.ts.map +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { RigDeliveryDrainStore } from "./rig-delivery-drain.js";
|
|
1
2
|
import { PROMPT_ALERT_TAG, readWakeLadderBackstop } from "./queue-wake-ladder.js";
|
|
2
3
|
import { withUrgentLine } from "./urgent-line.js";
|
|
3
4
|
import { quietCustodyBackstop, quietHoldCustody } from "./quiet-hold-custody.js";
|
|
5
|
+
import { cooperativeReadFile, readRowsCooperatively } from "./execution-candidate-reader.js";
|
|
4
6
|
import { createHash } from "node:crypto";
|
|
5
7
|
import { loadHumanRegistry, registeredPeople, resolveRegisteredHumanAddress, slackSubscriptionFor, withHumanAlertTag } from "./gateway/human-registry.js";
|
|
6
8
|
import { DispatchBuffer } from "./gateway/dispatch-buffer.js";
|
|
@@ -31,7 +33,7 @@ import { parseSessionName, isHumanSeatSessionRef } from "./session-name.js";
|
|
|
31
33
|
import { runnerPermissionOrigin } from "./runner-permissions.js";
|
|
32
34
|
import { isHostPairingAsk } from "./hosts/pairing-ask.js";
|
|
33
35
|
import { parseReplyToChoice, parseArrivalThread, parseReplyToThreadMissing, formatReplyToChoice, describeReplyToFallback, REPLY_TO_CHOICE_ACTOR } from "./reply-to-choice.js";
|
|
34
|
-
import { classifyDestination } from "./gateway/destination-resolver.js";
|
|
36
|
+
import { classifyDestination, recordsNoWakeRoute } from "./gateway/destination-resolver.js";
|
|
35
37
|
import { join } from "node:path";
|
|
36
38
|
import { SettingsStore } from "./user-settings/settings-store.js";
|
|
37
39
|
import { hostedMembersAt, hostedWakeFor, isHostedMemberAt } from "./rosters.js";
|
|
@@ -539,10 +541,12 @@ function isWakeTimeoutSignal(s) {
|
|
|
539
541
|
}
|
|
540
542
|
export class QueueRepository {
|
|
541
543
|
db;
|
|
544
|
+
deliveryDrains;
|
|
542
545
|
transitionLog;
|
|
543
546
|
eventBus;
|
|
544
547
|
destinationAdvisory;
|
|
545
548
|
validateRig;
|
|
549
|
+
canRecordDestination;
|
|
546
550
|
transport;
|
|
547
551
|
/** W1 (transactional closure): the durable wake-intent store. A terminal act
|
|
548
552
|
* (handoff / handoff-and-complete) stages an outbox intent row INSIDE its
|
|
@@ -606,10 +610,12 @@ export class QueueRepository {
|
|
|
606
610
|
workflowFrontierPredicate;
|
|
607
611
|
constructor(db, eventBus, opts) {
|
|
608
612
|
this.db = db;
|
|
613
|
+
this.deliveryDrains = new RigDeliveryDrainStore(db);
|
|
609
614
|
this.eventBus = eventBus;
|
|
610
615
|
this.transitionLog = new QueueTransitionLog(db);
|
|
611
616
|
this.wakeRepo = new QueueWakeRepository(db);
|
|
612
617
|
this.validateRig = opts?.validateRig ?? (() => true);
|
|
618
|
+
this.canRecordDestination = opts?.canRecordDestination ?? this.validateRig;
|
|
613
619
|
this.destinationAdvisory = opts?.destinationAdvisory ?? (() => null);
|
|
614
620
|
if (opts?.transport)
|
|
615
621
|
this.attachTransport(opts.transport);
|
|
@@ -988,13 +994,15 @@ export class QueueRepository {
|
|
|
988
994
|
return "skipped";
|
|
989
995
|
const alreadyHeld = this.outbox.getById(outboxId);
|
|
990
996
|
if (alreadyHeld?.deliveryState === "retained" || alreadyHeld?.deliveryState === "retired") {
|
|
997
|
+
if (this.deliveryDrains.holds(alreadyHeld.destinationSession))
|
|
998
|
+
return "retained";
|
|
991
999
|
if (alreadyHeld.auditPointer)
|
|
992
1000
|
this.recordNudgeAttempt(alreadyHeld.auditPointer, "retained:typing_guard");
|
|
993
1001
|
return "retained";
|
|
994
1002
|
}
|
|
995
1003
|
let recovering = false;
|
|
996
1004
|
const claim = (entry) => {
|
|
997
|
-
if (!eligible(entry) || attempted.has(entry.outboxId) || !this.outbox.claimForDelivery(entry.outboxId))
|
|
1005
|
+
if (this.deliveryDrains.holds(entry.destinationSession) || !eligible(entry) || attempted.has(entry.outboxId) || !this.outbox.claimForDelivery(entry.outboxId))
|
|
998
1006
|
return false;
|
|
999
1007
|
this.bindFirstTarget(entry);
|
|
1000
1008
|
attempted.add(entry.outboxId);
|
|
@@ -1003,6 +1011,8 @@ export class QueueRepository {
|
|
|
1003
1011
|
};
|
|
1004
1012
|
let superseded = false;
|
|
1005
1013
|
const actionable = (entry) => {
|
|
1014
|
+
if (!eligible(entry))
|
|
1015
|
+
return false;
|
|
1006
1016
|
const current = this.currentWakeIntent(entry);
|
|
1007
1017
|
if (!current) {
|
|
1008
1018
|
// Existing failed state means the requested old delivery was refused;
|
|
@@ -1206,18 +1216,19 @@ export class QueueRepository {
|
|
|
1206
1216
|
const BATCH = 200;
|
|
1207
1217
|
const horizon = this.db.prepare("SELECT COALESCE(MAX(rowid),0) AS id FROM outbox_entries").get().id;
|
|
1208
1218
|
// Retire never-attempted obsolete notifications without materializing historical intents.
|
|
1209
|
-
|
|
1219
|
+
if (!opts?.eligible)
|
|
1220
|
+
tally.failed += this.db.prepare(`UPDATE outbox_entries AS o SET delivery_state = 'failed',
|
|
1210
1221
|
tags = json_insert(COALESCE(tags, '[]'), '$[#]', 'queue:wake-superseded')
|
|
1211
1222
|
WHERE delivery_state = 'pending' AND rowid <= ? AND substr(outbox_id, 1, ?) = ?
|
|
1212
1223
|
AND substr(outbox_id, 1, ?) != ?
|
|
1213
1224
|
AND NOT EXISTS (SELECT 1 FROM queue_items q WHERE q.qitem_id = o.audit_pointer
|
|
1214
1225
|
AND q.state = 'pending' AND q.destination_session = o.destination_session)`)
|
|
1215
|
-
|
|
1226
|
+
.run(horizon, WAKE_INTENT_PREFIX.length, WAKE_INTENT_PREFIX, CLAIM_OVERRIDDEN_WAKE_PREFIX.length, CLAIM_OVERRIDDEN_WAKE_PREFIX).changes;
|
|
1216
1227
|
// A stop also refuses every later claim inside a delivery: coalesced peers and members it releases for their own send.
|
|
1217
1228
|
// So does a missing receiver, for a notification already tried. One never tried still gets its attempt, so its row
|
|
1218
1229
|
// records why it didn't land.
|
|
1219
1230
|
const eligible = (entry) => {
|
|
1220
|
-
if (opts?.stopRequested?.())
|
|
1231
|
+
if (opts?.stopRequested?.() || opts?.eligible && !opts.eligible(entry))
|
|
1221
1232
|
return false;
|
|
1222
1233
|
if (entry.deliveryState === "pending" || !this.wakeHasNoReceiver(entry.destinationSession))
|
|
1223
1234
|
return true;
|
|
@@ -1292,9 +1303,11 @@ export class QueueRepository {
|
|
|
1292
1303
|
* copies were deleted, refused at the seat boundary instead); this
|
|
1293
1304
|
* site holds no copy of its own.
|
|
1294
1305
|
*/
|
|
1295
|
-
async maybeNudge(qitemId, destinationSession, nudgeOpt, sourceSession, bodyOverride, trigger = "agent") {
|
|
1306
|
+
async maybeNudge(qitemId, destinationSession, nudgeOpt, sourceSession, bodyOverride, trigger = "agent", opts) {
|
|
1296
1307
|
if (nudgeOpt === false)
|
|
1297
1308
|
return;
|
|
1309
|
+
if (!opts?.explicit && this.deliveryDrains.holds(destinationSession))
|
|
1310
|
+
return;
|
|
1298
1311
|
if (!this.transport)
|
|
1299
1312
|
return;
|
|
1300
1313
|
const outcome = await this.performWakeSend(qitemId, destinationSession, sourceSession, bodyOverride, undefined, undefined, trigger);
|
|
@@ -1302,6 +1315,7 @@ export class QueueRepository {
|
|
|
1302
1315
|
}
|
|
1303
1316
|
/** The following startup intent drain owns durable pending wakes. Legacy packets
|
|
1304
1317
|
* and overdue claimed work (not eligible for that drain) still use the nudge path. */
|
|
1318
|
+
// Held workflow boot packets remain owed: their keepalive resumes after END; the sweep reports unclaimed work.
|
|
1305
1319
|
async recoverLostNudge(qitemId, destinationSession, sourceSession) {
|
|
1306
1320
|
const outboxId = `${WAKE_INTENT_PREFIX}${qitemId}`;
|
|
1307
1321
|
if (this.outbox?.getById(outboxId) && this.getById(qitemId)?.state === "pending")
|
|
@@ -1323,6 +1337,8 @@ export class QueueRepository {
|
|
|
1323
1337
|
}
|
|
1324
1338
|
if (state !== "running" && state !== "idle")
|
|
1325
1339
|
return;
|
|
1340
|
+
if (addresses.some(address => this.deliveryDrains.holds(address)))
|
|
1341
|
+
return;
|
|
1326
1342
|
if (addresses.every(address => this.promptRecoveryState.get(address) === false))
|
|
1327
1343
|
return;
|
|
1328
1344
|
// A compaction's "Compacted" is also a clear. While its turn boundary, restore or audit is still owed, a retried wake
|
|
@@ -1389,7 +1405,7 @@ export class QueueRepository {
|
|
|
1389
1405
|
* gateway, not held or released for quiet hours, and its seat now pane-bound. A handoff's retry ladder is the
|
|
1390
1406
|
* caller's to check: the sweep defers to a live ladder, the reachable-seat retry leaves every handed-off row to it. */
|
|
1391
1407
|
unroutableWakeRetryable(row, now = new Date()) {
|
|
1392
|
-
return row.lastNudgeResult
|
|
1408
|
+
return recordsNoWakeRoute(row.lastNudgeResult)
|
|
1393
1409
|
&& !row.claimedAt
|
|
1394
1410
|
&& row.deliveryOutcome !== "never-posted" && row.deliveryOutcome !== "transport-failed"
|
|
1395
1411
|
&& !this.isLocalHumanDecisionWithoutGateway(row)
|
|
@@ -1405,12 +1421,15 @@ export class QueueRepository {
|
|
|
1405
1421
|
const addresses = this.resolveSessionAddresses(sessionName);
|
|
1406
1422
|
if (!addresses.length)
|
|
1407
1423
|
return;
|
|
1424
|
+
if (addresses.some(address => this.deliveryDrains.holds(address)))
|
|
1425
|
+
return;
|
|
1408
1426
|
// As for a prompt clear (#2575): while a compaction's restore is owed, the wake would reach the agent before it.
|
|
1409
1427
|
if ([sessionName, ...addresses].some(address => this.hasPendingPostCompactStage?.(address)))
|
|
1410
1428
|
return;
|
|
1411
1429
|
const rows = this.db.prepare(`SELECT qitem_id FROM queue_items
|
|
1412
1430
|
WHERE destination_session IN (${addresses.map(() => "?").join(",")}) AND state = 'pending'
|
|
1413
|
-
AND handed_off_from IS NULL AND last_nudge_result LIKE 'unroutable:%'
|
|
1431
|
+
AND handed_off_from IS NULL AND (last_nudge_result LIKE 'unroutable:%' OR last_nudge_result LIKE 'awaiting-pickup:%')
|
|
1432
|
+
ORDER BY ts_created, qitem_id`)
|
|
1414
1433
|
.all(...addresses);
|
|
1415
1434
|
const now = new Date();
|
|
1416
1435
|
// One attempt per intent for the pass: a returned result and its resume go as one send, so the second row's turn
|
|
@@ -1663,7 +1682,7 @@ export class QueueRepository {
|
|
|
1663
1682
|
// instance. Host identity is added only at the cross-host forwarding boundary
|
|
1664
1683
|
// (routes/queue.ts stamp-at-FORWARD), and a genuine origin triple arriving from a
|
|
1665
1684
|
// forward is stored verbatim (never re-stamped, never stripped).
|
|
1666
|
-
if (!this.
|
|
1685
|
+
if (!this.canRecordDestination(input.destinationSession)) {
|
|
1667
1686
|
throw destinationValidationError("destination_session", input.destinationSession, this.loadHumanRegistryFn);
|
|
1668
1687
|
}
|
|
1669
1688
|
let wakeStaged = false;
|
|
@@ -1765,7 +1784,7 @@ export class QueueRepository {
|
|
|
1765
1784
|
* compose with an outer transaction, use create() instead.
|
|
1766
1785
|
*/
|
|
1767
1786
|
createWithinTransaction(input) {
|
|
1768
|
-
if (!this.
|
|
1787
|
+
if (!this.canRecordDestination(input.destinationSession)) {
|
|
1769
1788
|
throw destinationValidationError("destination_session", input.destinationSession, this.loadHumanRegistryFn);
|
|
1770
1789
|
}
|
|
1771
1790
|
const result = this.createInTransactionalContext(input);
|
|
@@ -1950,7 +1969,7 @@ export class QueueRepository {
|
|
|
1950
1969
|
return registry.ok && resolveRegisteredHumanAddress(destination, registry.entities) !== null;
|
|
1951
1970
|
}
|
|
1952
1971
|
/** The registered person an address names, so an ask back reaches them; null for anyone else, the unattributed
|
|
1953
|
-
* terminal actor included (
|
|
1972
|
+
* terminal actor included (a person address, but a row there asks no one; it waits on Steering and in the Feed, and OpenRig reports it as undeliverable). */
|
|
1954
1973
|
reachablePerson(address) {
|
|
1955
1974
|
if (!address || address === UNATTRIBUTED_ACTOR)
|
|
1956
1975
|
return null;
|
|
@@ -2018,7 +2037,7 @@ export class QueueRepository {
|
|
|
2018
2037
|
if (isTerminalState(source.state)) {
|
|
2019
2038
|
throw new QueueRepositoryError("qitem_already_terminal", `qitem ${input.qitemId} is already in terminal state ${source.state}`);
|
|
2020
2039
|
}
|
|
2021
|
-
if (!this.
|
|
2040
|
+
if (!this.canRecordDestination(input.toSession)) {
|
|
2022
2041
|
throw destinationValidationError("to_session", input.toSession, this.loadHumanRegistryFn);
|
|
2023
2042
|
}
|
|
2024
2043
|
this.assertHumanAlert(input.humanAlert, input.toSession);
|
|
@@ -2177,7 +2196,7 @@ export class QueueRepository {
|
|
|
2177
2196
|
if (isTerminalState(source.state)) {
|
|
2178
2197
|
throw new QueueRepositoryError("qitem_already_terminal", `qitem ${input.qitemId} is already in terminal state ${source.state}`);
|
|
2179
2198
|
}
|
|
2180
|
-
if (!this.
|
|
2199
|
+
if (!this.canRecordDestination(input.toSession)) {
|
|
2181
2200
|
throw destinationValidationError("to_session", input.toSession, this.loadHumanRegistryFn);
|
|
2182
2201
|
}
|
|
2183
2202
|
this.assertHumanAlert(input.humanAlert, input.toSession);
|
|
@@ -2683,6 +2702,7 @@ export class QueueRepository {
|
|
|
2683
2702
|
}
|
|
2684
2703
|
const hasNote = typeof input.transitionNote === "string" && input.transitionNote.trim().length > 0;
|
|
2685
2704
|
const hasValidSummary = typeof input.summary === "string" && input.summary.trim().length > 0;
|
|
2705
|
+
const hasValidEvidenceRef = typeof input.evidenceRef === "string" && input.evidenceRef.trim().length > 0;
|
|
2686
2706
|
const isGuardedTerminal = ["done", "canceled", "handed-off"].includes(qitem.state);
|
|
2687
2707
|
const isStatePreservingAppend = input.state === undefined || (isGuardedTerminal && input.state === qitem.state)
|
|
2688
2708
|
|| (hasReestimate && input.state === qitem.state);
|
|
@@ -2837,31 +2857,14 @@ export class QueueRepository {
|
|
|
2837
2857
|
throw new QueueRepositoryError("invalid_human_notification", "An informational delivery cannot become a human approval park; author a separate decision request.");
|
|
2838
2858
|
}
|
|
2839
2859
|
// A park on a person by any address (a legacy human seat, or a registered person's own address or alias) keeps the
|
|
2840
|
-
// summary and evidence it names
|
|
2860
|
+
// summary and evidence it names, or the row's own where it names a blank one. validateHumanPark still requires them
|
|
2861
|
+
// only for the legacy human-seat form.
|
|
2841
2862
|
const isHumanPark = input.state === "blocked" && !!effectiveBlockedOn && this.isPersonAddress(effectiveBlockedOn);
|
|
2842
|
-
//
|
|
2843
|
-
|
|
2844
|
-
//
|
|
2845
|
-
//
|
|
2846
|
-
//
|
|
2847
|
-
// caller learns immediately and nothing is half-applied. null/undefined = absent (allowed);
|
|
2848
|
-
// empty string = present (a deliberate value → rejected on a non-park transition).
|
|
2849
|
-
if (!isHumanPark) {
|
|
2850
|
-
const invalidFields = [];
|
|
2851
|
-
if (input.summary != null)
|
|
2852
|
-
invalidFields.push("summary");
|
|
2853
|
-
if (input.evidenceRef != null && !isDoneClose)
|
|
2854
|
-
invalidFields.push("evidenceRef");
|
|
2855
|
-
if (invalidFields.length > 0) {
|
|
2856
|
-
const flags = invalidFields.map((f) => (f === "summary" ? "--summary" : "--evidence-ref")).join(" / ");
|
|
2857
|
-
const where = invalidFields.map((f) => f === "summary"
|
|
2858
|
-
? "summary persists on a human-seat park, or on its own (rig queue update <id> --summary … with no --state)"
|
|
2859
|
-
: "evidenceRef persists on a human-seat park or a done close").join("; ");
|
|
2860
|
-
throw new QueueRepositoryError("summary_evidence_not_persistable", `${where}; the '${input.state}' transition cannot store ${invalidFields.length > 1 ? "them" : "it"}. Remove ${flags}, or use one of those.`, { invalidFields });
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
// SWEEP-a (shape f2576102) — closure/blocked-field COHERENCE, beside the reference
|
|
2864
|
-
// reject above: an incoherent field must never silently persist (worse than a drop —
|
|
2863
|
+
// OPR.0.5.1 slice-51-06 D2 refused the whole transition when summary/evidence_ref came with a state it
|
|
2864
|
+
// didn't store them for, so finished work could stay pending over optional metadata. A state change now
|
|
2865
|
+
// stores them (below), except a blank value; the route reports what wasn't stored.
|
|
2866
|
+
// SWEEP-a (shape f2576102) — closure/blocked-field COHERENCE: an incoherent
|
|
2867
|
+
// field must never silently persist (worse than a drop —
|
|
2865
2868
|
// the COALESCE below would write it). Admits-map, derived from LIVE schema use:
|
|
2866
2869
|
// closure_reason/closure_target → state "done", OR the PARK-RECORD form
|
|
2867
2870
|
// (state "blocked" with closureReason "blocked_on" — the workflow gate/park
|
|
@@ -2915,8 +2918,8 @@ export class QueueRepository {
|
|
|
2915
2918
|
let effectiveSummary = qitem.summary;
|
|
2916
2919
|
let effectiveEvidenceRef = qitem.evidenceRef;
|
|
2917
2920
|
if (isHumanPark) {
|
|
2918
|
-
effectiveSummary = input.summary
|
|
2919
|
-
effectiveEvidenceRef = input.evidenceRef
|
|
2921
|
+
effectiveSummary = hasValidSummary ? input.summary : qitem.summary;
|
|
2922
|
+
effectiveEvidenceRef = hasValidEvidenceRef ? input.evidenceRef : qitem.evidenceRef;
|
|
2920
2923
|
const park = validateHumanPark({
|
|
2921
2924
|
blockedOn: effectiveBlockedOn,
|
|
2922
2925
|
summary: effectiveSummary,
|
|
@@ -3023,16 +3026,15 @@ export class QueueRepository {
|
|
|
3023
3026
|
resolution = ?
|
|
3024
3027
|
WHERE qitem_id = ?`)
|
|
3025
3028
|
.run(input.state, ts, validation.closureReason, validation.closureTarget, input.handedOffTo ?? null, nextBlockedOn, nextResolution, input.qitemId);
|
|
3026
|
-
// FR-6:
|
|
3027
|
-
//
|
|
3028
|
-
//
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
this.persistEvidenceRef(input.qitemId, input.evidenceRef
|
|
3035
|
-
}
|
|
3029
|
+
// FR-6: summary/evidence_ref are PERSISTED onto the existing item (not
|
|
3030
|
+
// merely validated-then-dropped) — visible to the attention query, to
|
|
3031
|
+
// Packet 2 and to every reader of the row. Only non-blank values are
|
|
3032
|
+
// stored, on a park on a person too: a blank one would erase the row's
|
|
3033
|
+
// subject or evidence link, and the route reports it as not stored.
|
|
3034
|
+
if (hasValidSummary)
|
|
3035
|
+
this.persistSummary(input.qitemId, input.summary);
|
|
3036
|
+
if (hasValidEvidenceRef)
|
|
3037
|
+
this.persistEvidenceRef(input.qitemId, input.evidenceRef);
|
|
3036
3038
|
const transition = this.transitionLog.append({
|
|
3037
3039
|
qitemId: input.qitemId,
|
|
3038
3040
|
state: input.state,
|
|
@@ -3114,9 +3116,9 @@ export class QueueRepository {
|
|
|
3114
3116
|
closureReason: validation.closureReason ?? null,
|
|
3115
3117
|
closureTarget: validation.closureTarget ?? null,
|
|
3116
3118
|
actorSession: input.actorSession,
|
|
3117
|
-
// FR-1 × FR-6: the event carries the summary as
|
|
3119
|
+
// FR-1 × FR-6: the event carries the summary as stored by THIS mutation
|
|
3118
3120
|
// (park-time summary included) so surfaces refresh without a fetch.
|
|
3119
|
-
summary:
|
|
3121
|
+
summary: this.getById(input.qitemId)?.summary ?? null,
|
|
3120
3122
|
});
|
|
3121
3123
|
return { persistedEvent, persistedEvents: [...dependentEvents, persistedEvent] };
|
|
3122
3124
|
}
|
|
@@ -3687,9 +3689,11 @@ export class QueueRepository {
|
|
|
3687
3689
|
return posted !== null && answered !== null && answered > posted;
|
|
3688
3690
|
}
|
|
3689
3691
|
/** A park's current question: its latest human-required transition, and that notification's final post receipt, if any. */
|
|
3690
|
-
/** The opaque revision of what a person decides on (#2446): the question (body, intent, questions
|
|
3691
|
-
* (open, blocked or terminal; who it's addressed to or parked on; its
|
|
3692
|
-
* and the replies returned). A label, a wake, a claim or a note on a
|
|
3692
|
+
/** The opaque revision of what a person decides on (#2446): the question (body, intent, questions, and the evidence it
|
|
3693
|
+
* points to, when it has any) and its decision state (open, blocked or terminal; who it's addressed to or parked on; its
|
|
3694
|
+
* answers, a decision made for them, the current park, and the replies returned). A label, a wake, a claim or a note on a
|
|
3695
|
+
* park doesn't change it; a new park does, on any blocker, and so does a new evidence pointer. A row with no evidence
|
|
3696
|
+
* keeps the revision it had before evidence counted. */
|
|
3693
3697
|
decisionRevision(item, opts) {
|
|
3694
3698
|
const phase = item.state === "blocked" ? "blocked" : item.state === "pending" || item.state === "in-progress" ? "open" : item.state;
|
|
3695
3699
|
const excludeOp = typeof opts?.excludeOperationReply === "string" && opts.excludeOperationReply.length > 0
|
|
@@ -3713,7 +3717,8 @@ export class QueueRepository {
|
|
|
3713
3717
|
parkEntry = transitions[i].transitionId;
|
|
3714
3718
|
}
|
|
3715
3719
|
const decision = [item.body, item.humanIntent ?? null, item.humanQuestions ?? null, phase, item.destinationSession, item.blockedOn,
|
|
3716
|
-
item.humanAnswers ?? null, item.delegatedDecision ?? null, this.currentHumanRequiredEpisode(item.qitemId)?.key ?? null, parkEntry, replies
|
|
3720
|
+
item.humanAnswers ?? null, item.delegatedDecision ?? null, this.currentHumanRequiredEpisode(item.qitemId)?.key ?? null, parkEntry, replies,
|
|
3721
|
+
...(item.evidenceRef ? [item.evidenceRef] : [])];
|
|
3717
3722
|
return `dr1-${createHash("sha256").update(JSON.stringify(decision)).digest("hex").slice(0, 24)}`;
|
|
3718
3723
|
}
|
|
3719
3724
|
listRelayOwnerNotificationReceipts(qitemId) {
|
|
@@ -4284,12 +4289,9 @@ export class QueueRepository {
|
|
|
4284
4289
|
this.eventBus.notifySubscribers(persisted);
|
|
4285
4290
|
return persisted;
|
|
4286
4291
|
}
|
|
4287
|
-
findUndelivered
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
// carry a current episode or a legacy nudge/receipt, then derive/filter in
|
|
4291
|
-
// JS. LIMIT is applied after that filtering so historical POSTED episodes
|
|
4292
|
-
// cannot consume the window and hide a later failure.
|
|
4292
|
+
/** The active rows findUndelivered considers: each can carry a current owner episode, a legacy nudge failure or a
|
|
4293
|
+
* delivery receipt. Which of them is undelivered is derived per row afterwards. */
|
|
4294
|
+
undeliveredCandidateFilter(opts) {
|
|
4293
4295
|
const ownerEpisodeCandidate = this.hasOwnerNotificationColumns
|
|
4294
4296
|
? `EXISTS (SELECT 1 FROM queue_transitions owner_episode
|
|
4295
4297
|
WHERE owner_episode.qitem_id = queue_items.qitem_id
|
|
@@ -4299,6 +4301,7 @@ export class QueueRepository {
|
|
|
4299
4301
|
"state IN ('pending', 'in-progress', 'blocked')",
|
|
4300
4302
|
`((state = 'pending' AND (last_nudge_result LIKE 'failed:%'
|
|
4301
4303
|
OR last_nudge_result LIKE 'unroutable:%'
|
|
4304
|
+
OR last_nudge_result LIKE 'awaiting-pickup:%'
|
|
4302
4305
|
OR last_nudge_result LIKE 'gateway-owned%'))
|
|
4303
4306
|
OR ${ownerEpisodeCandidate}
|
|
4304
4307
|
OR EXISTS (SELECT 1 FROM queue_transitions receipt
|
|
@@ -4318,6 +4321,35 @@ export class QueueRepository {
|
|
|
4318
4321
|
conditions.push("(destination_session LIKE ? ESCAPE '\\' OR source_session LIKE ? ESCAPE '\\')");
|
|
4319
4322
|
params.push(`%@${escaped}`, `%@${escaped}`);
|
|
4320
4323
|
}
|
|
4324
|
+
return { conditions, params };
|
|
4325
|
+
}
|
|
4326
|
+
/**
|
|
4327
|
+
* The ids of the rows findUndelivered considers, oldest first, with no row's delivery outcome derived: a caller that
|
|
4328
|
+
* must stay responsive (the stuck sweep) derives each one by id, `findUndelivered({ qitemId })`, between its own
|
|
4329
|
+
* yields, so a long candidate set never runs as one synchronous read. On a WAL file database outside a transaction the
|
|
4330
|
+
* read runs in rowid windows on its own readonly connection and yields between windows (readRowsCooperatively, one
|
|
4331
|
+
* snapshot for the whole read); otherwise it is one id-only read on this handle. Every candidate is returned: nothing
|
|
4332
|
+
* is capped, and rows that change after the read are judged on that fresh read by id.
|
|
4333
|
+
*/
|
|
4334
|
+
async undeliveredCandidateIds(opts) {
|
|
4335
|
+
const { conditions, params } = this.undeliveredCandidateFilter(opts);
|
|
4336
|
+
const where = conditions.join(" AND ");
|
|
4337
|
+
const columns = "qitem_id, ts_created, queue_items.rowid AS rid";
|
|
4338
|
+
const file = cooperativeReadFile(this.db);
|
|
4339
|
+
const rows = file
|
|
4340
|
+
? (await readRowsCooperatively(file, "queue_items", `SELECT ${columns} FROM queue_items WHERE queue_items.rowid > ? AND queue_items.rowid <= ? AND ${where}`, params)).rows
|
|
4341
|
+
: this.db.prepare(`SELECT ${columns} FROM queue_items WHERE ${where}`).all(...params);
|
|
4342
|
+
// findUndelivered's order: oldest first, ties in rowid order.
|
|
4343
|
+
rows.sort((a, b) => (a.ts_created < b.ts_created ? -1 : a.ts_created > b.ts_created ? 1 : a.rid - b.rid));
|
|
4344
|
+
return rows.map((row) => row.qitem_id);
|
|
4345
|
+
}
|
|
4346
|
+
findUndelivered(opts) {
|
|
4347
|
+
// OPR.0.5.6.14 — delivery truth belongs to the CURRENT human-notification
|
|
4348
|
+
// episode, not to the row's whole history. Pull every active row that can
|
|
4349
|
+
// carry a current episode or a legacy nudge/receipt, then derive/filter in
|
|
4350
|
+
// JS. LIMIT is applied after that filtering so historical POSTED episodes
|
|
4351
|
+
// cannot consume the window and hide a later failure.
|
|
4352
|
+
const { conditions, params } = this.undeliveredCandidateFilter(opts);
|
|
4321
4353
|
const columns = opts?.compact ? this.compactColumns() : "*";
|
|
4322
4354
|
const sql = `SELECT ${columns} FROM queue_items WHERE ${conditions.join(" AND ")} ORDER BY ts_created ASC`;
|
|
4323
4355
|
const rows = this.db.prepare(sql).all(...params);
|
|
@@ -4348,7 +4380,7 @@ export class QueueRepository {
|
|
|
4348
4380
|
// undelivered. An active non-human row can still have an old OWNER
|
|
4349
4381
|
// transition; that historical episode is not a current obligation.
|
|
4350
4382
|
const lastNudge = item.lastNudgeResult ?? "";
|
|
4351
|
-
if (item.state === "pending" && (lastNudge.startsWith("failed:") || lastNudge
|
|
4383
|
+
if (item.state === "pending" && (lastNudge.startsWith("failed:") || recordsNoWakeRoute(lastNudge))) {
|
|
4352
4384
|
out.push(item);
|
|
4353
4385
|
}
|
|
4354
4386
|
}
|
|
@@ -4357,8 +4389,8 @@ export class QueueRepository {
|
|
|
4357
4389
|
}
|
|
4358
4390
|
return opts?.compact ? out.map(compactRow) : out;
|
|
4359
4391
|
}
|
|
4360
|
-
/**
|
|
4361
|
-
*
|
|
4392
|
+
/** Existing address preflight for choosing a receiver or recovery owner.
|
|
4393
|
+
* Recordability is separate and does not establish that somebody can receive the work. */
|
|
4362
4394
|
acceptsDestination(destinationSession) {
|
|
4363
4395
|
return this.validateRig(destinationSession);
|
|
4364
4396
|
}
|