@openrig/cli 0.7.22 → 0.7.24
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 +7 -7
- package/daemon/assets/claude-hook-bridge.cjs +575 -6
- package/daemon/assets/claude-hook-bridge.d.cts +5 -0
- package/daemon/assets/claude-permission-policies.cjs +4 -3
- package/daemon/assets/guidance/openrig-context-entry.md +1 -0
- package/daemon/assets/onboarding/01-world-and-purpose.md +2 -1
- package/daemon/assets/onboarding/02-self-and-competent-action.md +6 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +4 -3
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +3 -2
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/README.md +64 -9
- package/daemon/assets/plugins/openrig/hooks/claude.json +39 -0
- package/daemon/assets/plugins/openrig/hooks/codex.json +27 -0
- package/daemon/assets/plugins/openrig/hooks/scripts/claude-hook-bridge.cjs +715 -0
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/scripts/run-rig.cjs +30 -0
- package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +71 -9
- package/daemon/assets/plugins/openrig-codex/.agents/plugins/marketplace.json +15 -0
- package/daemon/assets/plugins/openrig-codex/.codex-plugin/plugin.json +42 -0
- package/daemon/assets/plugins/openrig-codex/LICENSE +200 -0
- package/daemon/assets/plugins/openrig-codex/assets/logo.svg +1 -0
- package/daemon/assets/plugins/openrig-codex/hooks/codex.json +27 -0
- package/daemon/assets/plugins/openrig-codex/hooks/scripts/claude-hook-bridge.cjs +715 -0
- package/daemon/assets/plugins/openrig-codex/skills/working-with-an-openrig-team/SKILL.md +175 -0
- 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/README.md +10 -2
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +9 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +50 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +3 -1
- package/daemon/assets/plugins/openrig-core/hooks/scripts/permission-answer.cjs +270 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +24 -6
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +11 -8
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +76 -10
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +4 -2
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +191 -25
- package/daemon/assets/skills/rigs/SKILL.md +136 -26
- 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 +128 -18
- package/daemon/context-packs/reference/acp-agents.md +11 -3
- package/daemon/context-packs/reference/getting-started.md +144 -13
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +201 -3
- package/daemon/context-packs/reference/tmux-servers.md +43 -2
- package/daemon/context-packs/reference/whats-new.md +186 -12
- 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/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +11 -8
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +76 -10
- 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/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +3 -3
- 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-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 +71 -9
- 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/SKILL.md +4 -2
- 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/refocusing/scripts/trace-to-root.py +191 -25
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +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 +24 -2
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +312 -45
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume-launch.d.ts +3 -0
- package/daemon/dist/adapters/claude-resume-launch.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume-launch.js +5 -0
- package/daemon/dist/adapters/claude-resume-launch.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +66 -24
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +22 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +72 -20
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts +9 -0
- package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-community-runtime-adapter.js +6 -0
- package/daemon/dist/adapters/pi-community-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +3 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +9 -3
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/seat-slice.d.ts +19 -0
- package/daemon/dist/adapters/seat-slice.d.ts.map +1 -0
- package/daemon/dist/adapters/seat-slice.js +29 -0
- package/daemon/dist/adapters/seat-slice.js.map +1 -0
- package/daemon/dist/adapters/shell-quote.d.ts +1 -0
- package/daemon/dist/adapters/shell-quote.d.ts.map +1 -1
- package/daemon/dist/adapters/shell-quote.js +6 -0
- package/daemon/dist/adapters/shell-quote.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +84 -17
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +355 -78
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/conversation-key-surface.d.ts +2 -0
- package/daemon/dist/conversation-key-surface.d.ts.map +1 -0
- package/daemon/dist/conversation-key-surface.js +5 -0
- package/daemon/dist/conversation-key-surface.js.map +1 -0
- package/daemon/dist/daemon-shutdown.d.ts +8 -0
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +15 -2
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +32 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrate.d.ts +15 -1
- package/daemon/dist/db/migrate.d.ts.map +1 -1
- package/daemon/dist/db/migrate.js +41 -6
- package/daemon/dist/db/migrate.js.map +1 -1
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.d.ts +14 -0
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.d.ts.map +1 -0
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.js +54 -0
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.js.map +1 -0
- package/daemon/dist/db/migrations/179_remote_control_observations.d.ts +10 -0
- package/daemon/dist/db/migrations/179_remote_control_observations.d.ts.map +1 -0
- package/daemon/dist/db/migrations/179_remote_control_observations.js +20 -0
- package/daemon/dist/db/migrations/179_remote_control_observations.js.map +1 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts +5 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts.map +1 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.js +7 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.js.map +1 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.d.ts +8 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.js +26 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.js.map +1 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts +7 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js +11 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js.map +1 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts +8 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js +13 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js.map +1 -0
- package/daemon/dist/db/migrations/184_network_requests.d.ts +11 -0
- package/daemon/dist/db/migrations/184_network_requests.d.ts.map +1 -0
- package/daemon/dist/db/migrations/184_network_requests.js +32 -0
- package/daemon/dist/db/migrations/184_network_requests.js.map +1 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts +9 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts.map +1 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.js +19 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.js.map +1 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts +3 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts.map +1 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.js +5 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.js.map +1 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts +5 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts.map +1 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.js +7 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.js.map +1 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts +3 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts.map +1 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.js +20 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.js.map +1 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.d.ts +3 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.d.ts.map +1 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.js +27 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.js.map +1 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.d.ts +4 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.d.ts.map +1 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.js +6 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.js.map +1 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.d.ts +4 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.d.ts.map +1 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.js +13 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.js.map +1 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.d.ts +5 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.d.ts.map +1 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.js +7 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.js.map +1 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.d.ts +9 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.js +14 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +3 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +17 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +101 -45
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +14 -0
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/background-process-evidence.d.ts +23 -0
- package/daemon/dist/domain/background-process-evidence.d.ts.map +1 -0
- package/daemon/dist/domain/background-process-evidence.js +81 -0
- package/daemon/dist/domain/background-process-evidence.js.map +1 -0
- package/daemon/dist/domain/chat-repository.d.ts +1 -1
- package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.js +2 -2
- package/daemon/dist/domain/chat-repository.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +46 -8
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +66 -20
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.d.ts +35 -0
- package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.js +106 -1
- package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +9 -0
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +25 -1
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +12 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +130 -2
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.js +11 -3
- package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -1
- package/daemon/dist/domain/core-app-job.d.ts +4 -4
- package/daemon/dist/domain/core-app-job.d.ts.map +1 -1
- package/daemon/dist/domain/core-app-job.js +4 -59
- package/daemon/dist/domain/core-app-job.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +43 -4
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +52 -3
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/escalation-owner.d.ts +3 -0
- package/daemon/dist/domain/escalation-owner.d.ts.map +1 -1
- package/daemon/dist/domain/escalation-owner.js +9 -3
- package/daemon/dist/domain/escalation-owner.js.map +1 -1
- package/daemon/dist/domain/execution-candidate-reader.d.ts +3 -0
- package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -1
- package/daemon/dist/domain/execution-candidate-reader.js +8 -2
- package/daemon/dist/domain/execution-candidate-reader.js.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.d.ts +2 -0
- package/daemon/dist/domain/existing-rig-restore.d.ts.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.js +11 -1
- package/daemon/dist/domain/existing-rig-restore.js.map +1 -1
- package/daemon/dist/domain/feed/attention-aggregator.d.ts +5 -5
- package/daemon/dist/domain/feed/attention-aggregator.d.ts.map +1 -1
- package/daemon/dist/domain/feed/attention-aggregator.js +10 -4
- package/daemon/dist/domain/feed/attention-aggregator.js.map +1 -1
- package/daemon/dist/domain/files/path-safety.d.ts +7 -0
- package/daemon/dist/domain/files/path-safety.d.ts.map +1 -1
- package/daemon/dist/domain/files/path-safety.js +23 -0
- package/daemon/dist/domain/files/path-safety.js.map +1 -1
- package/daemon/dist/domain/frontmatter.d.ts.map +1 -1
- package/daemon/dist/domain/frontmatter.js +4 -2
- package/daemon/dist/domain/frontmatter.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.d.ts +3 -0
- package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +9 -0
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.js +2 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +6 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +53 -9
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +4 -4
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +20 -7
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.js +1 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +9 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +2 -0
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js +15 -2
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +10 -19
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +64 -40
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +3 -13
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +70 -22
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/harness-not-started-notice.d.ts +5 -2
- package/daemon/dist/domain/harness-not-started-notice.d.ts.map +1 -1
- package/daemon/dist/domain/harness-not-started-notice.js +46 -15
- package/daemon/dist/domain/harness-not-started-notice.js.map +1 -1
- package/daemon/dist/domain/health-detectors.d.ts +4 -0
- package/daemon/dist/domain/health-detectors.d.ts.map +1 -1
- package/daemon/dist/domain/health-detectors.js +4 -1
- package/daemon/dist/domain/health-detectors.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +14 -9
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts +2 -0
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +71 -13
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/history-query.d.ts +1 -1
- package/daemon/dist/domain/history-query.d.ts.map +1 -1
- package/daemon/dist/domain/history-query.js +1 -2
- package/daemon/dist/domain/history-query.js.map +1 -1
- 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 +9 -2
- package/daemon/dist/domain/hosts/read-through.js.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.d.ts +3 -3
- package/daemon/dist/domain/hot-potato-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.js +2 -2
- package/daemon/dist/domain/hot-potato-enforcer.js.map +1 -1
- package/daemon/dist/domain/human-questions.d.ts +1 -1
- package/daemon/dist/domain/human-questions.d.ts.map +1 -1
- package/daemon/dist/domain/human-questions.js +2 -0
- package/daemon/dist/domain/human-questions.js.map +1 -1
- package/daemon/dist/domain/input-read-diagnostic.js +1 -1
- package/daemon/dist/domain/input-read-diagnostic.js.map +1 -1
- package/daemon/dist/domain/keep-alive-supervisor.d.ts +178 -0
- package/daemon/dist/domain/keep-alive-supervisor.d.ts.map +1 -0
- package/daemon/dist/domain/keep-alive-supervisor.js +523 -0
- package/daemon/dist/domain/keep-alive-supervisor.js.map +1 -0
- package/daemon/dist/domain/managed-restore-read-access.d.ts +18 -0
- package/daemon/dist/domain/managed-restore-read-access.d.ts.map +1 -1
- package/daemon/dist/domain/managed-restore-read-access.js +41 -1
- package/daemon/dist/domain/managed-restore-read-access.js.map +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.d.ts +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.js +3 -6
- package/daemon/dist/domain/mission-control/audit-browse.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts +6 -0
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +38 -9
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.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 +50 -5
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/mutation-trace.d.ts +28 -0
- package/daemon/dist/domain/mutation-trace.d.ts.map +1 -0
- package/daemon/dist/domain/mutation-trace.js +38 -0
- package/daemon/dist/domain/mutation-trace.js.map +1 -0
- package/daemon/dist/domain/native-resume-probe.d.ts +35 -3
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +84 -17
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/hub-client.d.ts +30 -1
- package/daemon/dist/domain/network/hub-client.d.ts.map +1 -1
- package/daemon/dist/domain/network/hub-client.js +62 -9
- package/daemon/dist/domain/network/hub-client.js.map +1 -1
- package/daemon/dist/domain/network/network-bindings.d.ts +52 -2
- package/daemon/dist/domain/network/network-bindings.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-bindings.js +217 -23
- package/daemon/dist/domain/network/network-bindings.js.map +1 -1
- package/daemon/dist/domain/network/network-connector.d.ts +9 -1
- package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-connector.js +95 -7
- package/daemon/dist/domain/network/network-connector.js.map +1 -1
- package/daemon/dist/domain/network/network-installations.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-installations.js +22 -7
- package/daemon/dist/domain/network/network-installations.js.map +1 -1
- package/daemon/dist/domain/network/network-provider-removal.d.ts +9 -0
- package/daemon/dist/domain/network/network-provider-removal.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-provider-removal.js +75 -0
- package/daemon/dist/domain/network/network-provider-removal.js.map +1 -0
- package/daemon/dist/domain/network/network-requests.d.ts +60 -0
- package/daemon/dist/domain/network/network-requests.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-requests.js +502 -0
- package/daemon/dist/domain/network/network-requests.js.map +1 -0
- package/daemon/dist/domain/node-inventory.d.ts +26 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +87 -7
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +2 -2
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +9 -7
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.js +1 -1
- package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +11 -0
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +20 -0
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/pane-cutover.d.ts +36 -9
- package/daemon/dist/domain/pane-cutover.d.ts.map +1 -1
- package/daemon/dist/domain/pane-cutover.js +82 -13
- package/daemon/dist/domain/pane-cutover.js.map +1 -1
- package/daemon/dist/domain/parked-query.d.ts +6 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +14 -4
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/policies/seat-pool.d.ts +13 -0
- package/daemon/dist/domain/policies/seat-pool.d.ts.map +1 -1
- package/daemon/dist/domain/policies/seat-pool.js +18 -3
- package/daemon/dist/domain/policies/seat-pool.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +7 -1
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +7 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js +11 -0
- package/daemon/dist/domain/progress/progress-indexer.js.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js +4 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
- package/daemon/dist/domain/projection-planner.d.ts +17 -3
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +9 -1
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +3 -0
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +13 -3
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +4 -4
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/claude-interruption.d.ts +6 -0
- package/daemon/dist/domain/provider/claude-interruption.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-interruption.js +18 -0
- package/daemon/dist/domain/provider/claude-interruption.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +8 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +11 -3
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-destination-check.d.ts +8 -0
- package/daemon/dist/domain/queue-destination-check.d.ts.map +1 -1
- package/daemon/dist/domain/queue-destination-check.js +17 -4
- package/daemon/dist/domain/queue-destination-check.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +3 -0
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +2 -2
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-owner.d.ts +5 -0
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +16 -8
- package/daemon/dist/domain/queue-owner.js.map +1 -1
- package/daemon/dist/domain/queue-recorded-graph.d.ts +32 -0
- package/daemon/dist/domain/queue-recorded-graph.d.ts.map +1 -0
- package/daemon/dist/domain/queue-recorded-graph.js +84 -0
- package/daemon/dist/domain/queue-recorded-graph.js.map +1 -0
- package/daemon/dist/domain/queue-repository.d.ts +94 -5
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +491 -39
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +1 -1
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +4 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +23 -3
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +661 -22
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transfer-export.d.ts +75 -0
- package/daemon/dist/domain/queue-transfer-export.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-export.js +158 -0
- package/daemon/dist/domain/queue-transfer-export.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-format.d.ts +15 -0
- package/daemon/dist/domain/queue-transfer-format.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-format.js +32 -0
- package/daemon/dist/domain/queue-transfer-format.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-parse.d.ts +40 -0
- package/daemon/dist/domain/queue-transfer-parse.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-parse.js +131 -0
- package/daemon/dist/domain/queue-transfer-parse.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-review.d.ts +22 -0
- package/daemon/dist/domain/queue-transfer-review.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-review.js +81 -0
- package/daemon/dist/domain/queue-transfer-review.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-staging.d.ts +79 -0
- package/daemon/dist/domain/queue-transfer-staging.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-staging.js +67 -0
- package/daemon/dist/domain/queue-transfer-staging.js.map +1 -0
- 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 +1 -1
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +7 -0
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +4 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +181 -24
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts +27 -2
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +184 -16
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/refusal-trace.d.ts +15 -0
- package/daemon/dist/domain/refusal-trace.d.ts.map +1 -0
- package/daemon/dist/domain/refusal-trace.js +23 -0
- package/daemon/dist/domain/refusal-trace.js.map +1 -0
- package/daemon/dist/domain/rehydrate-eligibility.d.ts +8 -0
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +61 -9
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/relayed-answers.d.ts +80 -0
- package/daemon/dist/domain/relayed-answers.d.ts.map +1 -0
- package/daemon/dist/domain/relayed-answers.js +8 -0
- package/daemon/dist/domain/relayed-answers.js.map +1 -0
- package/daemon/dist/domain/remote-control-observations.d.ts +50 -0
- package/daemon/dist/domain/remote-control-observations.d.ts.map +1 -0
- package/daemon/dist/domain/remote-control-observations.js +72 -0
- package/daemon/dist/domain/remote-control-observations.js.map +1 -0
- package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.js +8 -2
- package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +5 -2
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +70 -6
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +387 -51
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/return-route.d.ts +13 -2
- package/daemon/dist/domain/return-route.d.ts.map +1 -1
- package/daemon/dist/domain/return-route.js +30 -1
- package/daemon/dist/domain/return-route.js.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.d.ts +1 -0
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +27 -3
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.js +23 -4
- package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +21 -3
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +67 -2
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +52 -9
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +184 -32
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +12 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts +14 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +56 -14
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +34 -3
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +195 -40
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +26 -3
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +30 -4
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/roster-ready-notice.d.ts +11 -0
- package/daemon/dist/domain/roster-ready-notice.d.ts.map +1 -0
- package/daemon/dist/domain/roster-ready-notice.js +35 -0
- package/daemon/dist/domain/roster-ready-notice.js.map +1 -0
- package/daemon/dist/domain/rosters.d.ts +1 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +5 -4
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runner-permissions.d.ts +140 -5
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +593 -16
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +3 -1
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-exit.d.ts +79 -0
- package/daemon/dist/domain/runtime-exit.d.ts.map +1 -0
- package/daemon/dist/domain/runtime-exit.js +301 -0
- package/daemon/dist/domain/runtime-exit.js.map +1 -0
- package/daemon/dist/domain/runtime-switch-materials.d.ts +4 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +66 -13
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/scope/attestation-lineage.generated.js +2 -2
- package/daemon/dist/domain/scope/attestation-lineage.generated.js.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js +18 -0
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.js +2 -2
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +4 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +24 -5
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +7 -0
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +152 -65
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-cold-start.d.ts +150 -0
- package/daemon/dist/domain/seat-cold-start.d.ts.map +1 -0
- package/daemon/dist/domain/seat-cold-start.js +371 -0
- package/daemon/dist/domain/seat-cold-start.js.map +1 -0
- package/daemon/dist/domain/seat-delivery-guard.d.ts +11 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +34 -6
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +5 -2
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +30 -6
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +31 -0
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +218 -29
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-identity-store.d.ts +5 -3
- package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-store.js +7 -3
- package/daemon/dist/domain/seat-identity-store.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +8 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +37 -5
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +54 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +220 -30
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-pool-executor.d.ts +174 -0
- package/daemon/dist/domain/seat-pool-executor.d.ts.map +1 -0
- package/daemon/dist/domain/seat-pool-executor.js +1241 -0
- package/daemon/dist/domain/seat-pool-executor.js.map +1 -0
- package/daemon/dist/domain/seat-pool-registration.d.ts +93 -0
- package/daemon/dist/domain/seat-pool-registration.d.ts.map +1 -0
- package/daemon/dist/domain/seat-pool-registration.js +149 -0
- package/daemon/dist/domain/seat-pool-registration.js.map +1 -0
- package/daemon/dist/domain/seat-pool-slots.d.ts +66 -0
- package/daemon/dist/domain/seat-pool-slots.d.ts.map +1 -1
- package/daemon/dist/domain/seat-pool-slots.js +101 -0
- package/daemon/dist/domain/seat-pool-slots.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +15 -0
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +54 -2
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-home-record.d.ts +8 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-home-record.js +1 -1
- package/daemon/dist/domain/seat-runtime-home-record.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +2 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +68 -20
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +22 -3
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +38 -6
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +18 -2
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +73 -39
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +24 -10
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +55 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +259 -50
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +6 -2
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +118 -30
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-proof.d.ts +6 -0
- package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
- package/daemon/dist/domain/startup-proof.js +11 -0
- package/daemon/dist/domain/startup-proof.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +3 -0
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +36 -3
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/stream-reader-actions.d.ts +23 -0
- package/daemon/dist/domain/stream-reader-actions.d.ts.map +1 -1
- package/daemon/dist/domain/stream-reader-actions.js +43 -0
- package/daemon/dist/domain/stream-reader-actions.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +24 -3
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +54 -23
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.d.ts +2 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.js +48 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +2 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +2 -0
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/rex-agent-status.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/rex-agent-status.js +5 -2
- package/daemon/dist/domain/terminal/rex-agent-status.js.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +2 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js +80 -38
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +30 -26
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts +31 -3
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.js +95 -4
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts +2 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +4 -2
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/topology-trace.d.ts +40 -0
- package/daemon/dist/domain/topology-trace.d.ts.map +1 -0
- package/daemon/dist/domain/topology-trace.js +106 -0
- package/daemon/dist/domain/topology-trace.js.map +1 -0
- package/daemon/dist/domain/transcript-redaction.d.ts +10 -8
- package/daemon/dist/domain/transcript-redaction.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-redaction.js +51 -22
- package/daemon/dist/domain/transcript-redaction.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +12 -1
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +111 -9
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js +6 -2
- 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 +2 -0
- 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 +13 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +5 -3
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +6 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +8 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +6 -2
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +11 -0
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +13 -0
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +2 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +11 -2
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +3 -1
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +58 -10
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.js +9 -0
- package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
- package/daemon/dist/domain/workflow-run-title.d.ts +4 -0
- package/daemon/dist/domain/workflow-run-title.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-run-title.js +5 -0
- package/daemon/dist/domain/workflow-run-title.js.map +1 -0
- package/daemon/dist/domain/workflow-runtime.d.ts +3 -0
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +48 -3
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +2 -2
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +20 -1
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +15 -0
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-types.js +4 -0
- package/daemon/dist/domain/workflow-types.js.map +1 -1
- package/daemon/dist/domain/workspace/project-read.d.ts +10 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +34 -2
- package/daemon/dist/domain/workspace/project-read.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +7 -1
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/queue-transfer-export-surface.d.ts +33 -0
- package/daemon/dist/queue-transfer-export-surface.d.ts.map +1 -0
- package/daemon/dist/queue-transfer-export-surface.js +13 -0
- package/daemon/dist/queue-transfer-export-surface.js.map +1 -0
- package/daemon/dist/queue-transfer-staging-surface.d.ts +86 -0
- package/daemon/dist/queue-transfer-staging-surface.d.ts.map +1 -0
- package/daemon/dist/queue-transfer-staging-surface.js +91 -0
- package/daemon/dist/queue-transfer-staging-surface.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +105 -2
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +33 -11
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +23 -1
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/events.js +7 -4
- package/daemon/dist/routes/events.js.map +1 -1
- package/daemon/dist/routes/network.d.ts +2 -0
- package/daemon/dist/routes/network.d.ts.map +1 -1
- package/daemon/dist/routes/network.js +62 -1
- package/daemon/dist/routes/network.js.map +1 -1
- package/daemon/dist/routes/ps.js +12 -1
- package/daemon/dist/routes/ps.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +219 -77
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/require-sender-identity.d.ts +15 -0
- package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
- package/daemon/dist/routes/require-sender-identity.js +57 -8
- package/daemon/dist/routes/require-sender-identity.js.map +1 -1
- package/daemon/dist/routes/rigs.js +2 -0
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +18 -5
- 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 +14 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +16 -7
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +49 -4
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/stream.d.ts.map +1 -1
- package/daemon/dist/routes/stream.js +28 -1
- package/daemon/dist/routes/stream.js.map +1 -1
- package/daemon/dist/routes/terminal-ws.js +28 -2
- package/daemon/dist/routes/terminal-ws.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +3 -2
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +14 -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/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +57 -44
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +7 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +25 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts +3 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +166 -12
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts +10 -0
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +63 -4
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/dist/topology-trace-surface.d.ts +2 -0
- package/daemon/dist/topology-trace-surface.d.ts.map +1 -0
- package/daemon/dist/topology-trace-surface.js +2 -0
- package/daemon/dist/topology-trace-surface.js.map +1 -0
- package/daemon/dist/transcript-redaction-surface.d.ts +2 -0
- package/daemon/dist/transcript-redaction-surface.d.ts.map +1 -0
- package/daemon/dist/transcript-redaction-surface.js +2 -0
- package/daemon/dist/transcript-redaction-surface.js.map +1 -0
- package/daemon/docs/reference/acp-agents.md +11 -3
- package/daemon/docs/reference/agent-spec.md +25 -2
- package/daemon/docs/reference/agent-startup-guide.md +13 -1
- package/daemon/docs/reference/agent-state-taxonomy.md +35 -1
- package/daemon/docs/reference/checked-seat-stop.md +11 -1
- package/daemon/docs/reference/claude-status-line.md +7 -0
- package/daemon/docs/reference/community-harness-examples/cursor/cursor.yaml +3 -1
- package/daemon/docs/reference/community-harness-presets.md +27 -2
- package/daemon/docs/reference/daemon-http-clients.md +177 -18
- package/daemon/docs/reference/developing.md +3 -2
- package/daemon/docs/reference/gateway-participants.md +6 -0
- package/daemon/docs/reference/getting-started.md +144 -13
- package/daemon/docs/reference/harness-runner-contract.md +72 -0
- package/daemon/docs/reference/hosted-members.md +133 -0
- package/daemon/docs/reference/inventory-request-diagnostics.md +22 -0
- package/daemon/docs/reference/network-connector.md +141 -4
- package/daemon/docs/reference/project-workspace.md +11 -2
- package/daemon/docs/reference/queue-erasure.md +1 -1
- package/daemon/docs/reference/queue-transfer-export.md +38 -0
- package/daemon/docs/reference/queue-transfer-staging.md +39 -0
- package/daemon/docs/reference/quickstart.md +4 -4
- package/daemon/docs/reference/refocus-channel.md +53 -2
- package/daemon/docs/reference/rig-bundle.md +11 -1
- package/daemon/docs/reference/rig-spec.md +201 -3
- package/daemon/docs/reference/rosters.md +18 -3
- package/daemon/docs/reference/sdlc-conventions.md +1 -1
- package/daemon/docs/reference/seat-delivery.md +21 -4
- package/daemon/docs/reference/seat-node-targeting.md +10 -0
- package/daemon/docs/reference/seat-pools.md +182 -0
- package/daemon/docs/reference/slack-app-setup.md +15 -0
- package/daemon/docs/reference/terminal-sessions.md +127 -13
- package/daemon/docs/reference/tmux-servers.md +43 -2
- package/daemon/docs/reference/whats-new.md +186 -12
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +71 -9
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +4 -1
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +2 -1
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +4 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +24 -5
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +6 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/agent.js +1 -1
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/broadcast.d.ts.map +1 -1
- package/dist/commands/broadcast.js +87 -8
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +18 -4
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/chatroom.d.ts +3 -0
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +7 -1
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +2 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +6 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +18 -15
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +12 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +22 -13
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/expand.js +1 -1
- package/dist/commands/expand.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +5 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/fork.js +1 -1
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/gateway.d.ts +4 -0
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +37 -0
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/grow.d.ts.map +1 -1
- package/dist/commands/grow.js +9 -4
- package/dist/commands/grow.js.map +1 -1
- package/dist/commands/import.js +1 -1
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +57 -22
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/network.d.ts +2 -3
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +102 -4
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/parked.d.ts.map +1 -1
- package/dist/commands/parked.js +12 -6
- package/dist/commands/parked.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +3 -2
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +13 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +65 -29
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue-export.d.ts +3 -0
- package/dist/commands/queue-export.d.ts.map +1 -0
- package/dist/commands/queue-export.js +67 -0
- package/dist/commands/queue-export.js.map +1 -0
- package/dist/commands/queue-import.d.ts +4 -0
- package/dist/commands/queue-import.d.ts.map +1 -0
- package/dist/commands/queue-import.js +47 -0
- package/dist/commands/queue-import.js.map +1 -0
- package/dist/commands/queue.d.ts +3 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +79 -7
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/reconcile-session.js +1 -1
- package/dist/commands/reconcile-session.js.map +1 -1
- package/dist/commands/restore.js +1 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/rig.js +2 -2
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/roster.js +1 -1
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +30 -18
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +75 -18
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +15 -3
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/skill.js +1 -1
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/start.d.ts +14 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +57 -7
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +20 -4
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +2 -1
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +6 -0
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +37 -34
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow-render.d.ts +1 -1
- package/dist/commands/workflow-render.d.ts.map +1 -1
- package/dist/commands/workflow-render.js +2 -7
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +26 -2
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +2 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +14 -1
- package/dist/config-store.js.map +1 -1
- package/dist/cross-host-executor.d.ts +3 -0
- package/dist/cross-host-executor.d.ts.map +1 -1
- package/dist/cross-host-executor.js +5 -0
- package/dist/cross-host-executor.js.map +1 -1
- package/dist/daemon-auto-start.d.ts.map +1 -1
- package/dist/daemon-auto-start.js +1 -0
- package/dist/daemon-auto-start.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +30 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +135 -38
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-start-lock.d.ts +38 -3
- package/dist/daemon-start-lock.d.ts.map +1 -1
- package/dist/daemon-start-lock.js +201 -48
- package/dist/daemon-start-lock.js.map +1 -1
- package/dist/lib/bundle-source.d.ts +4 -0
- package/dist/lib/bundle-source.d.ts.map +1 -1
- package/dist/lib/bundle-source.js +14 -2
- package/dist/lib/bundle-source.js.map +1 -1
- package/dist/lib/context-git.js +2 -2
- package/dist/lib/context-git.js.map +1 -1
- package/dist/lib/frontmatter.d.ts.map +1 -1
- package/dist/lib/frontmatter.js +4 -2
- package/dist/lib/frontmatter.js.map +1 -1
- package/dist/lib/scope/attestation-lineage.js +2 -2
- package/dist/lib/scope/attestation-lineage.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.d.ts.map +1 -1
- package/dist/lib/scope/logical-checkbox.js +18 -0
- package/dist/lib/scope/logical-checkbox.js.map +1 -1
- package/dist/lib/scope/progress-edit.d.ts.map +1 -1
- package/dist/lib/scope/progress-edit.js +11 -1
- package/dist/lib/scope/progress-edit.js.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.js +2 -2
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
- package/dist/lib/terminal-cell.d.ts +5 -0
- package/dist/lib/terminal-cell.d.ts.map +1 -0
- package/dist/lib/terminal-cell.js +22 -0
- package/dist/lib/terminal-cell.js.map +1 -0
- package/dist/lib/topology-trace.d.ts +3 -34
- package/dist/lib/topology-trace.d.ts.map +1 -1
- package/dist/lib/topology-trace.js +3 -97
- package/dist/lib/topology-trace.js.map +1 -1
- package/dist/local-db.d.ts +2 -0
- package/dist/local-db.d.ts.map +1 -1
- package/dist/local-db.js +14 -11
- package/dist/local-db.js.map +1 -1
- package/dist/mcp-caller-resolver.d.ts +36 -0
- package/dist/mcp-caller-resolver.d.ts.map +1 -0
- package/dist/mcp-caller-resolver.js +82 -0
- package/dist/mcp-caller-resolver.js.map +1 -0
- package/dist/mcp-http.d.ts +44 -3
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +228 -48
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +28 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +219 -52
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-surface.d.ts +3 -2
- package/dist/mcp-surface.d.ts.map +1 -1
- package/dist/node-support.d.ts.map +1 -1
- package/dist/node-support.js +10 -0
- package/dist/node-support.js.map +1 -1
- package/dist/release-surface/extract-surface.d.ts.map +1 -1
- package/dist/release-surface/extract-surface.js +38 -20
- package/dist/release-surface/extract-surface.js.map +1 -1
- package/dist/release-surface/generate.d.ts.map +1 -1
- package/dist/release-surface/generate.js +3 -0
- package/dist/release-surface/generate.js.map +1 -1
- package/dist/release-surface/surface-diff.d.ts +1 -0
- package/dist/release-surface/surface-diff.d.ts.map +1 -1
- package/dist/release-surface/surface-diff.js +19 -18
- package/dist/release-surface/surface-diff.js.map +1 -1
- package/dist/remote-host-ops.d.ts +3 -0
- package/dist/remote-host-ops.d.ts.map +1 -1
- package/dist/remote-host-ops.js +15 -1
- package/dist/remote-host-ops.js.map +1 -1
- package/dist/restore-packet/redaction.d.ts +4 -26
- package/dist/restore-packet/redaction.d.ts.map +1 -1
- package/dist/restore-packet/redaction.js +19 -63
- package/dist/restore-packet/redaction.js.map +1 -1
- package/dist/terminal-orca.d.ts +7 -0
- package/dist/terminal-orca.d.ts.map +1 -0
- package/dist/terminal-orca.js +239 -0
- package/dist/terminal-orca.js.map +1 -0
- package/package.json +3 -3
- package/scripts/check-abi.mjs +15 -0
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +8 -4
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/connected-assistants.d.ts +1 -1
- package/tui/dist/connected-assistants.d.ts.map +1 -1
- package/tui/dist/connected-assistants.js +3 -1
- package/tui/dist/connected-assistants.js.map +1 -1
- package/tui/dist/crash-cart/start-daemon.d.ts +20 -0
- package/tui/dist/crash-cart/start-daemon.d.ts.map +1 -1
- package/tui/dist/crash-cart/start-daemon.js +56 -0
- package/tui/dist/crash-cart/start-daemon.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +4 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +12 -8
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/health/health-model.d.ts.map +1 -1
- package/tui/dist/health/health-model.js +2 -0
- package/tui/dist/health/health-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts +3 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +44 -27
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/live.d.ts +5 -1
- package/tui/dist/live.d.ts.map +1 -1
- package/tui/dist/live.js +20 -2
- package/tui/dist/live.js.map +1 -1
- package/tui/dist/main.js +29 -10
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/pulse/pulse-model.d.ts.map +1 -1
- package/tui/dist/pulse/pulse-model.js +3 -2
- package/tui/dist/pulse/pulse-model.js.map +1 -1
- package/tui/dist/render.d.ts +2 -0
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +47 -14
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/types.d.ts +10 -4
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/index-Chh-NS8Z.css +32 -0
- package/ui/dist/assets/index-DG_7XFcL.js +628 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-B-sMy02c.js +0 -623
- package/ui/dist/assets/index-DiN7RwWg.css +0 -32
|
@@ -34,6 +34,7 @@ import { isBoundTerminalSeat } from "./terminal-seat.js";
|
|
|
34
34
|
import { createLinkedSuccessorLookup, deriveCrossHostSuccessorId, hasLinkedSuccessor, matchesRecordedHandoffTarget, QueueRepositoryError } from "./queue-repository.js";
|
|
35
35
|
import { recordsNoWakeRoute } from "./gateway/destination-resolver.js";
|
|
36
36
|
import { stalledPickupFinding } from "./queue-pickup.js";
|
|
37
|
+
import { isRosterReadyNotice } from "./roster-ready-notice.js";
|
|
37
38
|
import { SettingsStore } from "./user-settings/settings-store.js";
|
|
38
39
|
import { loadHostRegistry } from "./hosts/hosts-registry-reader.js";
|
|
39
40
|
import { describeCheckIn, readWakeOutcome } from "./connection-contract.js";
|
|
@@ -112,8 +113,92 @@ export function findingTitle(kind, rowId, ageMinutes) {
|
|
|
112
113
|
case "undelivered-human-notice": return `Checked on ${rowId}: notification to its person is unconfirmed (${minutes})`;
|
|
113
114
|
case "dangling-closure": return `Checked on ${rowId}: it was closed onto a successor that isn't here (${minutes})`;
|
|
114
115
|
case "unclaimed-backlog": return `Checked on ${rowId}: nobody has picked it up in ${minutes}`;
|
|
116
|
+
case "unroutable-notice": return `Unreachable destination ${rowId}: unclaimed work waiting`;
|
|
115
117
|
}
|
|
116
118
|
}
|
|
119
|
+
/** The sweep's own session: the sender of a finding that comes back to the person whose row it's about. */
|
|
120
|
+
const STUCK_SWEEP_SESSION = "stuck-sweep@system";
|
|
121
|
+
/** A person's notice that their row waits for a seat that couldn't be woken: it names that seat. It keeps the
|
|
122
|
+
* `Checked on <row>: ` start, so the sweep still reads it as a title it wrote. */
|
|
123
|
+
function personNoticeTitle(rowId, seat, ageMinutes) {
|
|
124
|
+
return `Checked on ${rowId}: it's waiting for ${seat}, which couldn't be woken (${ageMinutes} ${ageMinutes === 1 ? "minute" : "minutes"})`;
|
|
125
|
+
}
|
|
126
|
+
/** #514: create-once unreachable notice prefix and separator, distinct from #2988 `=>` keys. */
|
|
127
|
+
export const UNROUTABLE_NOTICE_PREFIX = "stuck-sweep:unroutable-notice:";
|
|
128
|
+
export const UNROUTABLE_NOTICE_SEPARATOR = "~>";
|
|
129
|
+
/** Idempotency key of a #514 create-once notice, deduplicated per (source, destination) while open. */
|
|
130
|
+
export function unroutableNoticeTag(source, destination) {
|
|
131
|
+
return `${UNROUTABLE_NOTICE_PREFIX}${source}${UNROUTABLE_NOTICE_SEPARATOR}${destination}`;
|
|
132
|
+
}
|
|
133
|
+
const OPEN_UNROUTABLE_NOTICE_STATES = ["pending", "in-progress", "blocked"];
|
|
134
|
+
/** Look up the latest #514 unroutable-notice row for `(source, destination)` by
|
|
135
|
+
* `STUCK_SWEEP_FINDING_TAG` plus `unroutableNoticeTag(source, destination)` alone.
|
|
136
|
+
* Defaults to open rows (`pending`, `in-progress`, `blocked`); pass `states` to
|
|
137
|
+
* inspect closed notices (for example `["done", "canceled"]`) or another state set. */
|
|
138
|
+
export function findUnroutableNotice(db, source, destination, options) {
|
|
139
|
+
const states = options?.states ?? OPEN_UNROUTABLE_NOTICE_STATES;
|
|
140
|
+
if (states.length === 0)
|
|
141
|
+
return null;
|
|
142
|
+
const tag = unroutableNoticeTag(source, destination);
|
|
143
|
+
const placeholders = states.map(() => "?").join(", ");
|
|
144
|
+
const row = db.prepare(
|
|
145
|
+
// Unary + on state prevents SQLite from choosing idx_queue_items_state over the smaller partial idx_queue_items_recovery_tags.
|
|
146
|
+
`SELECT qitem_id, state, destination_session, ts_updated
|
|
147
|
+
FROM queue_items
|
|
148
|
+
WHERE +state IN (${placeholders})
|
|
149
|
+
AND (tags LIKE '%"stuck-sweep:%')
|
|
150
|
+
AND json_valid(tags)
|
|
151
|
+
AND EXISTS (SELECT 1 FROM json_each(tags) j WHERE typeof(j.value) = 'text' AND j.value = ?)
|
|
152
|
+
AND EXISTS (SELECT 1 FROM json_each(tags) j WHERE typeof(j.value) = 'text' AND j.value = ?)
|
|
153
|
+
ORDER BY +CASE WHEN state IN ('pending', 'in-progress', 'blocked') THEN 0 ELSE 1 END,
|
|
154
|
+
ts_updated DESC, ts_created DESC, qitem_id DESC
|
|
155
|
+
LIMIT 1`).get(...states, STUCK_SWEEP_FINDING_TAG, tag);
|
|
156
|
+
return row
|
|
157
|
+
? { qitemId: row.qitem_id, state: row.state, destinationSession: row.destination_session, tsUpdated: row.ts_updated }
|
|
158
|
+
: null;
|
|
159
|
+
}
|
|
160
|
+
function unroutableNoticeEvidenceRef(destination) {
|
|
161
|
+
return `rig queue list --destination ${destination} --state pending`;
|
|
162
|
+
}
|
|
163
|
+
function unroutableNoticeText(source, destination, count) {
|
|
164
|
+
const countLabel = `${count} unclaimed ${count === 1 ? "row" : "rows"}`;
|
|
165
|
+
return {
|
|
166
|
+
summary: `Unreachable destination ${destination}: ${countLabel} from ${source}`,
|
|
167
|
+
body: `STUCK SWEEP FINDING (unroutable-notice)\n` +
|
|
168
|
+
`destination: ${destination}\n` +
|
|
169
|
+
`source: ${source}\n` +
|
|
170
|
+
`count: ${countLabel} from ${source} to ${destination}\n` +
|
|
171
|
+
`list: ${unroutableNoticeEvidenceRef(destination)}`,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function parseUnroutableNoticeTags(rawTags) {
|
|
175
|
+
if (!rawTags)
|
|
176
|
+
return null;
|
|
177
|
+
let parsed;
|
|
178
|
+
try {
|
|
179
|
+
parsed = JSON.parse(rawTags);
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
if (!Array.isArray(parsed))
|
|
185
|
+
return null;
|
|
186
|
+
const strings = parsed.filter((t) => typeof t === "string");
|
|
187
|
+
if (!strings.includes(STUCK_SWEEP_FINDING_TAG))
|
|
188
|
+
return null;
|
|
189
|
+
const noticeTags = strings.filter((t) => t.startsWith(UNROUTABLE_NOTICE_PREFIX));
|
|
190
|
+
if (noticeTags.length !== 1)
|
|
191
|
+
return null;
|
|
192
|
+
const key = noticeTags[0].slice(UNROUTABLE_NOTICE_PREFIX.length);
|
|
193
|
+
const sepAt = key.indexOf(UNROUTABLE_NOTICE_SEPARATOR);
|
|
194
|
+
if (sepAt <= 0)
|
|
195
|
+
return null;
|
|
196
|
+
const source = key.slice(0, sepAt);
|
|
197
|
+
const dest = key.slice(sepAt + UNROUTABLE_NOTICE_SEPARATOR.length);
|
|
198
|
+
if (!source || !dest)
|
|
199
|
+
return null;
|
|
200
|
+
return { source, dest };
|
|
201
|
+
}
|
|
117
202
|
/** A standing notice's title: whose work, and how many items nobody has picked up. */
|
|
118
203
|
function backlogTitle(whose, count) {
|
|
119
204
|
return `Checked on ${whose}: ${count} ${count === 1 ? "item" : "items"} nobody has picked up`;
|
|
@@ -375,6 +460,14 @@ function lastTransitionLine(db, qitemId) {
|
|
|
375
460
|
function isFindingRow(item) {
|
|
376
461
|
return (item.tags ?? []).includes(STUCK_SWEEP_FINDING_TAG);
|
|
377
462
|
}
|
|
463
|
+
function isRosterNotice(item) {
|
|
464
|
+
return isRosterReadyNotice({ qitem_id: item.qitemId, source_session: item.sourceSession });
|
|
465
|
+
}
|
|
466
|
+
/** Rows no finding is filed about: the sweep's own findings, which self-exclude by their stamp tag, and OpenRig's
|
|
467
|
+
* roster-ready notice, which is information about the team, not work. Its wake is still retried like any row's. */
|
|
468
|
+
function isSweepExempt(item) {
|
|
469
|
+
return isFindingRow(item) || isRosterNotice(item);
|
|
470
|
+
}
|
|
378
471
|
/** Without OWNER history a receipt has no recipient/episode key. A simple
|
|
379
472
|
* legacy park is still identifiable, but a later state write or an earlier
|
|
380
473
|
* notice/reroute makes that binding unknown. Even a same-state append may be
|
|
@@ -405,6 +498,8 @@ function deliveryResolutionEvidence(deps, kind, qitemId, now) {
|
|
|
405
498
|
if (["done", "failed", "denied", "canceled", "handed-off"].includes(row.state)) {
|
|
406
499
|
return `source closed (${row.state})`;
|
|
407
500
|
}
|
|
501
|
+
if (isRosterNotice(row))
|
|
502
|
+
return "source is OpenRig's roster-ready notice: information about the team, not work";
|
|
408
503
|
// An agent's claim/park resolves its failed wake or unclaimed work, not the
|
|
409
504
|
// separate notification owed to a person while that agent is waiting on them.
|
|
410
505
|
if (kind !== "undelivered-human-notice") {
|
|
@@ -492,7 +587,7 @@ export function custodyHeadline(rowId, targets, ageMinutes) {
|
|
|
492
587
|
? `Custody not checked on host ${hosts.join(", ")} for ${rowId} (${ageMinutes} min)`
|
|
493
588
|
: `Custody not checked: no successor of ${rowId} in this store (${ageMinutes} min)`;
|
|
494
589
|
}
|
|
495
|
-
function evidenceBody(db, c) {
|
|
590
|
+
function evidenceBody(db, c, personNotice = false) {
|
|
496
591
|
if (c.verificationTargets?.length) {
|
|
497
592
|
const checks = c.verificationTargets
|
|
498
593
|
.map((target) => `- ${target}\n ${verificationCommand(target)}\n` +
|
|
@@ -517,8 +612,12 @@ function evidenceBody(db, c) {
|
|
|
517
612
|
`age: ${c.ageMinutes} min\n` +
|
|
518
613
|
`last transition: ${lastTransitionLine(db, c.row.qitemId)}\n` +
|
|
519
614
|
`why: ${c.why}\n` +
|
|
520
|
-
|
|
521
|
-
|
|
615
|
+
(personNotice
|
|
616
|
+
? `This is a notice from OpenRig, not a task for you: ${c.row.qitemId} is waiting for ${c.row.destinationSession}, which couldn't ` +
|
|
617
|
+
`be woken (why, above). It reaches ${c.row.destinationSession} only when a wake lands there, and the sweep closes this notice ` +
|
|
618
|
+
`itself once ${c.row.qitemId} is no longer stuck.`
|
|
619
|
+
: `This is a diagnostic about ${c.row.qitemId}, not a second assignment. Read ${c.row.qitemId} and act on it: pick it up, resume, route or park it, as fits; ` +
|
|
620
|
+
`the sweep closes this finding itself once ${c.row.qitemId} is no longer stuck. Closing this finding alone doesn't complete ${c.row.qitemId}.`));
|
|
522
621
|
}
|
|
523
622
|
/** The last line of a standing notice's body: every row it stands for, so the sweep knows what it covered. */
|
|
524
623
|
const BACKLOG_ROWS_PREFIX = "Every row this notice stands for: ";
|
|
@@ -691,7 +790,19 @@ export async function runStuckSweep(deps) {
|
|
|
691
790
|
const agentSeats = new Map();
|
|
692
791
|
/** #2988: each seat's one declared delegation parent (parentNow, below), dropped with agentSeats. */
|
|
693
792
|
const parentsNow = new Map();
|
|
694
|
-
|
|
793
|
+
/** Hosted polling-member status (pollsForWork, below), dropped on every yield or awaited write. */
|
|
794
|
+
const pollingMembers = new Map();
|
|
795
|
+
/** Configured operator recovery seats (routeAroundMissing, below), dropped on every yield or awaited write. */
|
|
796
|
+
let recoverySeats;
|
|
797
|
+
const othersMayHaveRun = () => {
|
|
798
|
+
othersRan++;
|
|
799
|
+
recoveries.invalidate();
|
|
800
|
+
successors?.invalidate();
|
|
801
|
+
agentSeats.clear();
|
|
802
|
+
parentsNow.clear();
|
|
803
|
+
pollingMembers.clear();
|
|
804
|
+
recoverySeats = undefined;
|
|
805
|
+
};
|
|
695
806
|
// A successor index whose build took at least half of a stretch that yielded by elapsed time is not rebuilt for
|
|
696
807
|
// the rest of the pass: the yield drops it, the next stretch would pay the build again and end the same way after a
|
|
697
808
|
// few rows, so the rows would pay about one build each instead of one per STUCK_SWEEP_YIELD_EVERY_ROWS. Those rows
|
|
@@ -755,7 +866,7 @@ export async function runStuckSweep(deps) {
|
|
|
755
866
|
// Half 1 — claimed-never-closed. The claimant holds the obligation; the finding
|
|
756
867
|
// routes to them.
|
|
757
868
|
const overdueCandidate = (row) => {
|
|
758
|
-
if (
|
|
869
|
+
if (isSweepExempt(row))
|
|
759
870
|
return null;
|
|
760
871
|
return {
|
|
761
872
|
kind: "overdue-claim",
|
|
@@ -770,7 +881,7 @@ export async function runStuckSweep(deps) {
|
|
|
770
881
|
// pickup module remains the ONE derivation rule; this only enumerates and routes.
|
|
771
882
|
const stalledCandidate = (qitemId) => {
|
|
772
883
|
const row = indexed(() => deps.queueRepo.getById(qitemId, { waiting: false }));
|
|
773
|
-
if (!row ||
|
|
884
|
+
if (!row || isSweepExempt(row))
|
|
774
885
|
return null;
|
|
775
886
|
if ((row.state !== "pending" && row.state !== "in-progress") || !row.claimedAt)
|
|
776
887
|
return null;
|
|
@@ -822,7 +933,7 @@ export async function runStuckSweep(deps) {
|
|
|
822
933
|
// have no retry ladder: the same sweep/recovery route owns their actionable disposition.
|
|
823
934
|
const parkedCandidate = (qitemId) => {
|
|
824
935
|
const row = indexed(() => deps.queueRepo.getById(qitemId, { waiting: false }));
|
|
825
|
-
if (!row ||
|
|
936
|
+
if (!row || isSweepExempt(row))
|
|
826
937
|
return null;
|
|
827
938
|
if (row.state !== "blocked" || !startsWithCI(row.lastNudgeResult, "failed:"))
|
|
828
939
|
return null;
|
|
@@ -861,8 +972,7 @@ export async function runStuckSweep(deps) {
|
|
|
861
972
|
const isHumanNotice = (row) => row.deliveryOutcome === "never-posted" || row.deliveryOutcome === "transport-failed";
|
|
862
973
|
// A hosted member with no wake trigger picks up its work by reading the queue: nothing can push work to it, by design.
|
|
863
974
|
// Its rows' unroutable wakes aren't failed deliveries, so they get no finding each; work it leaves unclaimed past the
|
|
864
|
-
// unclaimed age is listed in the member's one standing notice instead.
|
|
865
|
-
const pollingMembers = new Map();
|
|
975
|
+
// unclaimed age is listed in the member's one standing notice instead. Refreshed after every yield or awaited write.
|
|
866
976
|
const pollsForWork = (session) => {
|
|
867
977
|
let polls = pollingMembers.get(session);
|
|
868
978
|
if (polls === undefined) {
|
|
@@ -874,7 +984,7 @@ export async function runStuckSweep(deps) {
|
|
|
874
984
|
const polledRow = (row) => recordsNoWakeRoute(row.lastNudgeResult) && pollsForWork(row.destinationSession);
|
|
875
985
|
/** `row` comes from findUndelivered (it carries the delivery verdict). Call it after any wake retry the row needs. */
|
|
876
986
|
const undeliveredCandidate = (row, recordSuppression) => {
|
|
877
|
-
if (
|
|
987
|
+
if (isSweepExempt(row))
|
|
878
988
|
return null;
|
|
879
989
|
const humanNotice = isHumanNotice(row);
|
|
880
990
|
// A claim supersedes a retained failed wake, including on a row returned to
|
|
@@ -934,7 +1044,7 @@ export async function runStuckSweep(deps) {
|
|
|
934
1044
|
const cutoff = new Date(now.getTime() - ageMinutes * 60_000).toISOString();
|
|
935
1045
|
const unclaimedCandidate = (qitemId, recordSuppression) => {
|
|
936
1046
|
const row = indexed(() => deps.queueRepo.getById(qitemId, { waiting: false }));
|
|
937
|
-
if (!row ||
|
|
1047
|
+
if (!row || isSweepExempt(row))
|
|
938
1048
|
return null;
|
|
939
1049
|
// The query's own predicate, on the row as it is now.
|
|
940
1050
|
if (row.state !== "pending" || row.claimedAt || !row.destinationSession || row.tsCreated > cutoff
|
|
@@ -1030,7 +1140,7 @@ export async function runStuckSweep(deps) {
|
|
|
1030
1140
|
const custodyCandidate = (qitemId, hasSuccessor, recheck = false) => {
|
|
1031
1141
|
// A recheck reads live, without the lent indexes: one row's own queries cost less than a rebuilt successor index.
|
|
1032
1142
|
const row = recheck ? deps.queueRepo.getById(qitemId, { waiting: false }) : indexed(() => deps.queueRepo.getById(qitemId, { waiting: false }));
|
|
1033
|
-
if (!row ||
|
|
1143
|
+
if (!row || isSweepExempt(row))
|
|
1034
1144
|
return null;
|
|
1035
1145
|
// The query's own predicate, on the row as it is now.
|
|
1036
1146
|
const closed = row.state === "done" || row.state === "canceled"
|
|
@@ -1283,7 +1393,6 @@ export async function runStuckSweep(deps) {
|
|
|
1283
1393
|
return nodeId === null ? null : nodeExecutorStoppedReason(deps.db, nodeId);
|
|
1284
1394
|
};
|
|
1285
1395
|
const sessionMissing = deps.sessionConfirmedMissing ?? ((session) => stoppedReason(session) !== null);
|
|
1286
|
-
let recoverySeats;
|
|
1287
1396
|
const routeAroundMissing = (c) => {
|
|
1288
1397
|
if (!sessionMissing(c.route))
|
|
1289
1398
|
return;
|
|
@@ -1412,7 +1521,7 @@ export async function runStuckSweep(deps) {
|
|
|
1412
1521
|
const { created } = await deps.queueRepo.handoff({
|
|
1413
1522
|
qitemId: row.qitemId, fromSession: "stuck-sweep@system", toSession: target,
|
|
1414
1523
|
body: `${row.body}\n\nOriginal finding destination ${row.destinationSession} references a missing rig. This finding was handed back to the originating agent.`,
|
|
1415
|
-
summary: row.summary, evidenceRef: row.evidenceRef,
|
|
1524
|
+
summary: row.summary, evidenceRef: row.evidenceRef, evidenceRefRoots: row.evidenceRefRoots,
|
|
1416
1525
|
});
|
|
1417
1526
|
othersMayHaveRun();
|
|
1418
1527
|
findings.push({ kind, qitemId: row.qitemId, findingQitemId: created.qitemId, action: "created" });
|
|
@@ -1476,6 +1585,8 @@ export async function runStuckSweep(deps) {
|
|
|
1476
1585
|
}
|
|
1477
1586
|
c.why += `; ${c.route} declares no delegation parent or escalates_to, so this finding goes to ${choices[chosen]}, ${FAILED_WAKE_ROUTE_RULES[chosen]}`;
|
|
1478
1587
|
c.route = choices[chosen];
|
|
1588
|
+
if (chosen === 0)
|
|
1589
|
+
c.failedWakeToCreator = true;
|
|
1479
1590
|
};
|
|
1480
1591
|
/** The three re-routes, in order, for one candidate. The third reads no earlier pass: a failed wake's finding is
|
|
1481
1592
|
* routed only here, on the row as it is right before the finding is created. */
|
|
@@ -1517,6 +1628,42 @@ export async function runStuckSweep(deps) {
|
|
|
1517
1628
|
* switch the pass to per-row reads after the candidate came from the index. True when the row no longer qualifies,
|
|
1518
1629
|
* so nothing is kept. */
|
|
1519
1630
|
const keptOnBoundedRead = (c) => c.kind === "dangling-closure" && freshCandidate(c.kind, c.row.qitemId) === null;
|
|
1631
|
+
const isHumanTarget = (session) => {
|
|
1632
|
+
try {
|
|
1633
|
+
return deps.queueRepo.isHumanDestination(session);
|
|
1634
|
+
}
|
|
1635
|
+
catch {
|
|
1636
|
+
return true;
|
|
1637
|
+
}
|
|
1638
|
+
};
|
|
1639
|
+
const sessionStoppedOrMissing = (session) => {
|
|
1640
|
+
if (sessionMissing(session))
|
|
1641
|
+
return true;
|
|
1642
|
+
const row = deps.db.prepare("SELECT status FROM sessions WHERE session_name = ? ORDER BY id DESC LIMIT 1").get(session);
|
|
1643
|
+
return !row || ["exited", "superseded", "detached"].includes(row.status);
|
|
1644
|
+
};
|
|
1645
|
+
const isUnreachableUnclaimed = (c) => c.kind === "unclaimed-obligation"
|
|
1646
|
+
&& c.route === c.row.destinationSession
|
|
1647
|
+
&& !routeNotes.has(c.row.qitemId)
|
|
1648
|
+
&& !polledRow(c.row)
|
|
1649
|
+
&& !isHumanTarget(c.row.destinationSession)
|
|
1650
|
+
&& (classOf(c.row.destinationSession) === "unroutable" || sessionMissing(c.row.destinationSession))
|
|
1651
|
+
&& sessionStoppedOrMissing(c.row.destinationSession);
|
|
1652
|
+
const activeBacklogKeyOf = (c) => {
|
|
1653
|
+
const key = backlogKeyOf(c);
|
|
1654
|
+
if (!key)
|
|
1655
|
+
return null;
|
|
1656
|
+
return selfRoutedUnclaimed(c) && isUnreachableUnclaimed(c) ? null : key;
|
|
1657
|
+
};
|
|
1658
|
+
const unroutableGroups = new Map();
|
|
1659
|
+
const enqueueUnroutable = (candidate) => {
|
|
1660
|
+
const groupKey = `${candidate.row.sourceSession}${UNROUTABLE_NOTICE_SEPARATOR}${candidate.row.destinationSession}`;
|
|
1661
|
+
const group = unroutableGroups.get(groupKey);
|
|
1662
|
+
if (group)
|
|
1663
|
+
group.rows.push(candidate);
|
|
1664
|
+
else
|
|
1665
|
+
unroutableGroups.set(groupKey, { source: candidate.row.sourceSession, destination: candidate.row.destinationSession, rows: [candidate] });
|
|
1666
|
+
};
|
|
1520
1667
|
const unclaimedBacklog = new Map();
|
|
1521
1668
|
for (const c of [...new Map(candidates.map(c => [c.row.qitemId, c])).values()]) {
|
|
1522
1669
|
if (dueToYield())
|
|
@@ -1530,7 +1677,7 @@ export async function runStuckSweep(deps) {
|
|
|
1530
1677
|
const dedupTag = findingDedupTag(c.kind, c.row.qitemId);
|
|
1531
1678
|
const shared = recoveries.find(c.row.qitemId);
|
|
1532
1679
|
const fold = foldable(c, shared);
|
|
1533
|
-
const backlogKey = shared && !fold ? null :
|
|
1680
|
+
const backlogKey = shared && !fold ? null : activeBacklogKeyOf(c);
|
|
1534
1681
|
if (backlogKey) {
|
|
1535
1682
|
if (fold)
|
|
1536
1683
|
foldFrom.set(c.row.qitemId, fold);
|
|
@@ -1543,6 +1690,10 @@ export async function runStuckSweep(deps) {
|
|
|
1543
1690
|
unclaimedBacklog.set(backlogKey, [c]);
|
|
1544
1691
|
continue;
|
|
1545
1692
|
}
|
|
1693
|
+
if (!shared && isUnreachableUnclaimed(c)) {
|
|
1694
|
+
enqueueUnroutable(c);
|
|
1695
|
+
continue;
|
|
1696
|
+
}
|
|
1546
1697
|
const sharedRow = shared ? indexed(() => deps.queueRepo.getById(shared.qitemId, { waiting: false })) : null;
|
|
1547
1698
|
// A later accepted deadline can expire after the previous finding closed.
|
|
1548
1699
|
// Its newer time is fresh evidence even when the pickup candidate wins this row.
|
|
@@ -1613,17 +1764,40 @@ export async function runStuckSweep(deps) {
|
|
|
1613
1764
|
if (!now_)
|
|
1614
1765
|
continue;
|
|
1615
1766
|
routeCandidate(now_); // its destination, reason and targets as they are now
|
|
1767
|
+
if (!shared && !activeBacklogKeyOf(now_) && isUnreachableUnclaimed(now_)) {
|
|
1768
|
+
enqueueUnroutable(now_);
|
|
1769
|
+
continue;
|
|
1770
|
+
}
|
|
1771
|
+
// A person's own row (their answer or ask) waits on a live agent seat that only couldn't take a wake, and its
|
|
1772
|
+
// finding comes back to them (routeAroundFailedWake). Nothing in it is theirs to do, so it reaches them as a notice
|
|
1773
|
+
// from OpenRig: an update from the sweep, at the person's own address, never an ask from themselves. The other
|
|
1774
|
+
// routes back to a creator (no wake route, a terminal seat, a missing seat) ask the person to act, and stay asks.
|
|
1775
|
+
// When the person's address can't be read, the finding is written as before, so it's never lost.
|
|
1776
|
+
let noticeTo = null;
|
|
1777
|
+
if (c.kind === "undelivered-wake" && !now_.verificationTargets && now_.failedWakeToCreator && now_.route === now_.row.sourceSession) {
|
|
1778
|
+
try {
|
|
1779
|
+
const person = isHumanSeatSessionRef(now_.route) ? now_.route : deps.queueRepo.reachablePerson(now_.route);
|
|
1780
|
+
noticeTo = person && isHumanSeatSessionRef(person) ? person : null;
|
|
1781
|
+
}
|
|
1782
|
+
catch {
|
|
1783
|
+
noticeTo = null;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
const personNotice = noticeTo !== null;
|
|
1616
1787
|
const input = {
|
|
1617
1788
|
// A finding folded into a parent's notice (#2988) holds its id without owning the row: a new one gets its own.
|
|
1618
1789
|
qitemId: freshRecoveryId(deps.db, c.row.qitemId, renewedDeadline ? c.row.closureRequiredAt : undefined),
|
|
1619
1790
|
// The detector is machinery, not a seat: the obligation's own creator is the
|
|
1620
|
-
// finding's source (the workflow-exception precedent).
|
|
1621
|
-
sourceSession: c.row.sourceSession,
|
|
1622
|
-
destinationSession: now_.route,
|
|
1623
|
-
body: evidenceBody(deps.db, now_) + (routeNotes.has(c.row.qitemId) ? `\nescalation route: ${routeNotes.get(c.row.qitemId)}` : ""),
|
|
1791
|
+
// finding's source (the workflow-exception precedent), except on a person's notice about their own row.
|
|
1792
|
+
sourceSession: personNotice ? STUCK_SWEEP_SESSION : c.row.sourceSession,
|
|
1793
|
+
destinationSession: noticeTo ?? now_.route,
|
|
1794
|
+
body: evidenceBody(deps.db, now_, personNotice) + (routeNotes.has(c.row.qitemId) ? `\nescalation route: ${routeNotes.get(c.row.qitemId)}` : ""),
|
|
1624
1795
|
summary: now_.verificationTargets
|
|
1625
1796
|
? custodyHeadline(c.row.qitemId, now_.verificationTargets, now_.ageMinutes)
|
|
1626
|
-
:
|
|
1797
|
+
: personNotice
|
|
1798
|
+
? personNoticeTitle(c.row.qitemId, now_.row.destinationSession, now_.ageMinutes)
|
|
1799
|
+
: findingTitle(c.kind, c.row.qitemId, now_.ageMinutes),
|
|
1800
|
+
...(personNotice ? { humanIntent: "update" } : {}),
|
|
1627
1801
|
evidenceRef: `rig queue show ${c.row.qitemId}`,
|
|
1628
1802
|
tags: [STUCK_SWEEP_FINDING_TAG, dedupTag, recoveryTag(c.row.qitemId),
|
|
1629
1803
|
...(routed.has(c.row.qitemId) || now_.row.tags?.includes(ESCALATION_HOP_TAG) ? [ESCALATION_HOP_TAG] : []),
|
|
@@ -1667,7 +1841,9 @@ export async function runStuckSweep(deps) {
|
|
|
1667
1841
|
const target = sourceAgent(live.row.sourceSession, now_.route);
|
|
1668
1842
|
if (target) {
|
|
1669
1843
|
try {
|
|
1670
|
-
|
|
1844
|
+
// To an agent: the finding as it always was, never a person's notice.
|
|
1845
|
+
await createFinding({ ...input, destinationSession: target, sourceSession: c.row.sourceSession, humanIntent: undefined,
|
|
1846
|
+
summary: personNotice ? findingTitle(c.kind, c.row.qitemId, now_.ageMinutes) : input.summary,
|
|
1671
1847
|
tags: input.tags.filter((tag) => tag !== ESCALATION_HOP_TAG || live.row.tags?.includes(tag)),
|
|
1672
1848
|
body: `${evidenceBody(deps.db, live)}\nOriginal finding destination ${now_.route} references a missing rig. This finding goes to the originating agent.` });
|
|
1673
1849
|
othersMayHaveRun();
|
|
@@ -2011,8 +2187,12 @@ export async function runStuckSweep(deps) {
|
|
|
2011
2187
|
const now_ = freshCandidate(c.kind, c.row.qitemId);
|
|
2012
2188
|
if (now_)
|
|
2013
2189
|
routeCandidate(now_);
|
|
2014
|
-
if (!now_ ||
|
|
2190
|
+
if (!now_ || activeBacklogKeyOf(now_) !== key) {
|
|
2191
|
+
if (now_ && !recoveries.find(now_.row.qitemId) && !activeBacklogKeyOf(now_) && isUnreachableUnclaimed(now_)) {
|
|
2192
|
+
enqueueUnroutable(now_);
|
|
2193
|
+
}
|
|
2015
2194
|
return [];
|
|
2195
|
+
}
|
|
2016
2196
|
// A row held by a recovery stays out, unless that recovery is the per-row finding this notice folds in.
|
|
2017
2197
|
const held = recoveries.find(now_.row.qitemId);
|
|
2018
2198
|
return !held || (parent && foldFrom.get(now_.row.qitemId) === held.qitemId) ? [now_] : [];
|
|
@@ -2029,6 +2209,463 @@ export async function runStuckSweep(deps) {
|
|
|
2029
2209
|
if (filed && parent)
|
|
2030
2210
|
await foldInto(filed, seat, parent, current.map((c) => c.row.qitemId));
|
|
2031
2211
|
}
|
|
2212
|
+
// #514: create-once notices for unreachable unclaimed obligations, identified by STUCK_SWEEP_FINDING_TAG plus
|
|
2213
|
+
// unroutableNoticeTag(source, destination) alone (matching unclaimed-backlog notices).
|
|
2214
|
+
const reachableNoticeTarget = (seat, destination) => {
|
|
2215
|
+
if (!seat || seat === destination || isMachinerySession(seat) || sessionMissing(seat)
|
|
2216
|
+
|| classOf(seat) === "unroutable" || isBoundTerminalSeat(deps.db, seat)
|
|
2217
|
+
|| !deps.queueRepo.acceptsDestination(seat))
|
|
2218
|
+
return false;
|
|
2219
|
+
if (!isHumanTarget(seat)) {
|
|
2220
|
+
const latest = deps.db.prepare("SELECT status FROM sessions WHERE session_name = ? ORDER BY id DESC LIMIT 1").get(seat);
|
|
2221
|
+
if (latest && ["exited", "superseded", "detached"].includes(latest.status))
|
|
2222
|
+
return false;
|
|
2223
|
+
}
|
|
2224
|
+
return true;
|
|
2225
|
+
};
|
|
2226
|
+
const unreachableNoticeTarget = (destination, source) => [source, (deps.resolveRecoveryAgentSeat ?? resolveRecoveryAgentSeat)(), (deps.resolveOperatorSeat ?? resolveOperatorSeat)()]
|
|
2227
|
+
.find((seat) => reachableNoticeTarget(seat, destination)) ?? null;
|
|
2228
|
+
const findLatestNonSweepClosedUnroutable = (source, destination) => {
|
|
2229
|
+
const closed = findUnroutableNotice(deps.db, source, destination, { states: ["done", "canceled"] });
|
|
2230
|
+
if (!closed)
|
|
2231
|
+
return null;
|
|
2232
|
+
const latestClose = deps.db.prepare(`SELECT actor_session, closure_reason FROM (
|
|
2233
|
+
SELECT transition_id, state, actor_session, closure_reason,
|
|
2234
|
+
LAG(state) OVER (ORDER BY transition_id) AS previous_state
|
|
2235
|
+
FROM (
|
|
2236
|
+
SELECT transition_id, state, actor_session, closure_reason FROM queue_transitions WHERE qitem_id = ?
|
|
2237
|
+
UNION ALL
|
|
2238
|
+
SELECT transition_id, state, actor_session, closure_reason FROM queue_transitions_archive WHERE qitem_id = ?
|
|
2239
|
+
)
|
|
2240
|
+
) WHERE state IN ('done', 'canceled')
|
|
2241
|
+
AND (state IS NOT previous_state OR closure_reason IS NOT NULL)
|
|
2242
|
+
ORDER BY transition_id DESC LIMIT 1`).get(closed.qitemId, closed.qitemId);
|
|
2243
|
+
return closed.state === "done"
|
|
2244
|
+
&& latestClose?.actor_session === "stuck-sweep@system"
|
|
2245
|
+
&& latestClose?.closure_reason === "no-follow-on"
|
|
2246
|
+
? null
|
|
2247
|
+
: { qitemId: closed.qitemId, tsUpdated: closed.tsUpdated };
|
|
2248
|
+
};
|
|
2249
|
+
const recountQualifyingUnroutable = (rows, source, destination) => {
|
|
2250
|
+
const current = [];
|
|
2251
|
+
for (const c of rows) {
|
|
2252
|
+
routeNotes.delete(c.row.qitemId);
|
|
2253
|
+
routed.delete(c.row.qitemId);
|
|
2254
|
+
delegationParent.delete(c.row.qitemId);
|
|
2255
|
+
const now_ = freshCandidate("unclaimed-obligation", c.row.qitemId);
|
|
2256
|
+
if (!now_ || now_.row.sourceSession !== source || now_.row.destinationSession !== destination)
|
|
2257
|
+
continue;
|
|
2258
|
+
routeAroundMissing(now_);
|
|
2259
|
+
routeAroundNoWake(now_);
|
|
2260
|
+
if (!recoveries.find(now_.row.qitemId) && !activeBacklogKeyOf(now_) && isUnreachableUnclaimed(now_)) {
|
|
2261
|
+
current.push(now_);
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
return current;
|
|
2265
|
+
};
|
|
2266
|
+
class DuplicateOpenUnroutableNoticeError extends Error {
|
|
2267
|
+
existingQitemId;
|
|
2268
|
+
constructor(existingQitemId) {
|
|
2269
|
+
super(existingQitemId);
|
|
2270
|
+
this.existingQitemId = existingQitemId;
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
class UnroutableNoticeSkippedError extends Error {
|
|
2274
|
+
}
|
|
2275
|
+
const recordUnroutableGap = (row, note, logLine, destination, findingQitemId = "") => {
|
|
2276
|
+
if (!hasGap.get(row.qitemId, note)) {
|
|
2277
|
+
// A same-state daemon note is bookkeeping, not work progress or a new recovery episode.
|
|
2278
|
+
deps.queueRepo.transitionLog.append({ qitemId: row.qitemId, state: row.state, actorSession: "daemon@system", transitionNote: note });
|
|
2279
|
+
log(logLine);
|
|
2280
|
+
}
|
|
2281
|
+
findings.push({ kind: "unroutable-notice", qitemId: row.qitemId, findingQitemId, action: "unreported", destination });
|
|
2282
|
+
};
|
|
2283
|
+
const liveUnroutableTags = new Set();
|
|
2284
|
+
const recoverOrphanedUnroutableNotice = async (noticeRow, source, destination, groupKey, tag, recordConcurrentRefresh) => {
|
|
2285
|
+
const target = unreachableNoticeTarget(destination, source);
|
|
2286
|
+
if (target) {
|
|
2287
|
+
try {
|
|
2288
|
+
const { created } = await deps.queueRepo.handoff({
|
|
2289
|
+
qitemId: noticeRow.qitemId,
|
|
2290
|
+
fromSession: "stuck-sweep@system",
|
|
2291
|
+
toSession: target,
|
|
2292
|
+
body: `${noticeRow.body}\n\nOriginal notice destination ${noticeRow.destinationSession} references a missing rig. This notice was handed off to ${target}.`,
|
|
2293
|
+
summary: noticeRow.summary,
|
|
2294
|
+
evidenceRef: noticeRow.evidenceRef,
|
|
2295
|
+
});
|
|
2296
|
+
othersMayHaveRun();
|
|
2297
|
+
liveUnroutableTags.add(tag);
|
|
2298
|
+
findings.push({ kind: "unroutable-notice", qitemId: groupKey, findingQitemId: created.qitemId, action: "created" });
|
|
2299
|
+
return;
|
|
2300
|
+
}
|
|
2301
|
+
catch (err) {
|
|
2302
|
+
othersMayHaveRun();
|
|
2303
|
+
if (!unknownRig(err)) {
|
|
2304
|
+
const latest = indexed(() => deps.queueRepo.getById(noticeRow.qitemId, { waiting: false }));
|
|
2305
|
+
if (latest && ["pending", "in-progress", "blocked"].includes(latest.state)
|
|
2306
|
+
&& (latest.state !== "pending" || latest.claimedAt)) {
|
|
2307
|
+
liveUnroutableTags.add(tag);
|
|
2308
|
+
if (recordConcurrentRefresh) {
|
|
2309
|
+
findings.push({ kind: "unroutable-notice", qitemId: groupKey, findingQitemId: latest.qitemId, action: "refreshed" });
|
|
2310
|
+
}
|
|
2311
|
+
return;
|
|
2312
|
+
}
|
|
2313
|
+
recordFailure(`orphaned unroutable-notice ${noticeRow.qitemId} not handed off`, err);
|
|
2314
|
+
liveUnroutableTags.add(tag);
|
|
2315
|
+
return;
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
liveUnroutableTags.add(tag);
|
|
2320
|
+
const note = `stuck-sweep routing gap: ${noticeRow.destinationSession} references an unknown rig; no reachable source, operator agent or operator seat for ${groupKey}`;
|
|
2321
|
+
recordUnroutableGap(noticeRow, note, `[stuck-sweep] unreported #514 orphaned notice ${noticeRow.qitemId} at ${noticeRow.destinationSession}: no reachable source, operator agent or operator seat`, noticeRow.destinationSession, noticeRow.qitemId);
|
|
2322
|
+
};
|
|
2323
|
+
for (const [groupKey, group] of unroutableGroups) {
|
|
2324
|
+
if (dueToYield())
|
|
2325
|
+
await yieldLoop();
|
|
2326
|
+
if (deps.queueRepo.deliveryDrains.holds(group.destination))
|
|
2327
|
+
continue;
|
|
2328
|
+
const liveRows = [];
|
|
2329
|
+
let refreshYielded = false;
|
|
2330
|
+
for (const c of group.rows) {
|
|
2331
|
+
if (dueToYield()) {
|
|
2332
|
+
await yieldLoop();
|
|
2333
|
+
refreshYielded = true;
|
|
2334
|
+
}
|
|
2335
|
+
routeNotes.delete(c.row.qitemId);
|
|
2336
|
+
routed.delete(c.row.qitemId);
|
|
2337
|
+
delegationParent.delete(c.row.qitemId);
|
|
2338
|
+
const now_ = freshCandidate("unclaimed-obligation", c.row.qitemId);
|
|
2339
|
+
if (!now_ || now_.row.sourceSession !== group.source || now_.row.destinationSession !== group.destination)
|
|
2340
|
+
continue;
|
|
2341
|
+
routeAroundMissing(now_);
|
|
2342
|
+
routeAroundNoWake(now_);
|
|
2343
|
+
if (!recoveries.find(now_.row.qitemId) && !activeBacklogKeyOf(now_) && isUnreachableUnclaimed(now_)) {
|
|
2344
|
+
liveRows.push(now_);
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
if (deps.queueRepo.deliveryDrains.holds(group.destination) || liveRows.length === 0)
|
|
2348
|
+
continue;
|
|
2349
|
+
const tag = unroutableNoticeTag(group.source, group.destination);
|
|
2350
|
+
const surviving = refreshYielded ? recountQualifyingUnroutable(liveRows, group.source, group.destination) : liveRows;
|
|
2351
|
+
if (surviving.length === 0)
|
|
2352
|
+
continue;
|
|
2353
|
+
const openNotice = findUnroutableNotice(deps.db, group.source, group.destination);
|
|
2354
|
+
if (openNotice) {
|
|
2355
|
+
const noticeRow = indexed(() => deps.queueRepo.getById(openNotice.qitemId, { waiting: false }));
|
|
2356
|
+
if (noticeRow && ["pending", "in-progress", "blocked"].includes(noticeRow.state)) {
|
|
2357
|
+
if (noticeRow.state === "pending" && !noticeRow.claimedAt
|
|
2358
|
+
&& missingRig(noticeRow.destinationSession) && !deliveryHeld(noticeRow)) {
|
|
2359
|
+
await recoverOrphanedUnroutableNotice(noticeRow, group.source, group.destination, groupKey, tag, true);
|
|
2360
|
+
continue;
|
|
2361
|
+
}
|
|
2362
|
+
liveUnroutableTags.add(tag);
|
|
2363
|
+
findings.push({ kind: "unroutable-notice", qitemId: groupKey, findingQitemId: noticeRow.qitemId, action: "refreshed" });
|
|
2364
|
+
continue;
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
const dismissed = findLatestNonSweepClosedUnroutable(group.source, group.destination);
|
|
2368
|
+
if (dismissed && !surviving.some((c) => evidenceIsNewer(c.evidenceAt, dismissed.tsUpdated)))
|
|
2369
|
+
continue;
|
|
2370
|
+
const target = unreachableNoticeTarget(group.destination, group.source);
|
|
2371
|
+
if (!target) {
|
|
2372
|
+
liveUnroutableTags.add(tag);
|
|
2373
|
+
for (const c of surviving) {
|
|
2374
|
+
const note = `stuck-sweep routing gap: ${group.destination} unreachable; no reachable source, operator agent or operator seat`;
|
|
2375
|
+
recordUnroutableGap(c.row, note, `[stuck-sweep] unreported #514 unreachable row ${c.row.qitemId} at ${group.destination}: no reachable source, operator agent or operator seat`, group.destination);
|
|
2376
|
+
}
|
|
2377
|
+
continue;
|
|
2378
|
+
}
|
|
2379
|
+
const text = unroutableNoticeText(group.source, group.destination, surviving.length);
|
|
2380
|
+
const createInput = {
|
|
2381
|
+
sourceSession: group.destination,
|
|
2382
|
+
destinationSession: target,
|
|
2383
|
+
body: text.body,
|
|
2384
|
+
summary: text.summary,
|
|
2385
|
+
evidenceRef: unroutableNoticeEvidenceRef(group.destination),
|
|
2386
|
+
tags: [STUCK_SWEEP_FINDING_TAG, tag],
|
|
2387
|
+
wakeTrigger: "openrig",
|
|
2388
|
+
};
|
|
2389
|
+
try {
|
|
2390
|
+
const created = await deps.queueRepo.create(createInput, () => {
|
|
2391
|
+
if (deps.queueRepo.deliveryDrains.holds(group.destination))
|
|
2392
|
+
throw new UnroutableNoticeSkippedError();
|
|
2393
|
+
const existing = findUnroutableNotice(deps.db, group.source, group.destination);
|
|
2394
|
+
if (existing)
|
|
2395
|
+
throw new DuplicateOpenUnroutableNoticeError(existing.qitemId);
|
|
2396
|
+
othersMayHaveRun();
|
|
2397
|
+
const recounted = recountQualifyingUnroutable(surviving, group.source, group.destination);
|
|
2398
|
+
if (recounted.length === 0)
|
|
2399
|
+
throw new UnroutableNoticeSkippedError();
|
|
2400
|
+
const latestDismissed = findLatestNonSweepClosedUnroutable(group.source, group.destination);
|
|
2401
|
+
if (latestDismissed && !recounted.some((c) => evidenceIsNewer(c.evidenceAt, latestDismissed.tsUpdated))) {
|
|
2402
|
+
throw new UnroutableNoticeSkippedError();
|
|
2403
|
+
}
|
|
2404
|
+
if (recounted.length !== surviving.length) {
|
|
2405
|
+
const refreshedText = unroutableNoticeText(group.source, group.destination, recounted.length);
|
|
2406
|
+
createInput.body = refreshedText.body;
|
|
2407
|
+
createInput.summary = refreshedText.summary;
|
|
2408
|
+
}
|
|
2409
|
+
});
|
|
2410
|
+
othersMayHaveRun();
|
|
2411
|
+
liveUnroutableTags.add(tag);
|
|
2412
|
+
findings.push({ kind: "unroutable-notice", qitemId: groupKey, findingQitemId: created.qitemId, action: "created" });
|
|
2413
|
+
}
|
|
2414
|
+
catch (err) {
|
|
2415
|
+
othersMayHaveRun();
|
|
2416
|
+
if (err instanceof DuplicateOpenUnroutableNoticeError) {
|
|
2417
|
+
liveUnroutableTags.add(tag);
|
|
2418
|
+
findings.push({ kind: "unroutable-notice", qitemId: groupKey, findingQitemId: err.existingQitemId, action: "refreshed" });
|
|
2419
|
+
continue;
|
|
2420
|
+
}
|
|
2421
|
+
if (err instanceof UnroutableNoticeSkippedError)
|
|
2422
|
+
continue;
|
|
2423
|
+
const message = `unroutable-notice for ${groupKey} not created: ${err instanceof Error ? err.message : String(err)}`;
|
|
2424
|
+
log(`[stuck-sweep] ${message}`);
|
|
2425
|
+
failedCreates.push(message);
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
const inspectUnreachableUnclaimed = (row) => {
|
|
2429
|
+
if (row.state !== "pending" || row.claimedAt || polledRow(row))
|
|
2430
|
+
return "other";
|
|
2431
|
+
if (classOf(row.destinationSession) !== "unroutable" && !sessionMissing(row.destinationSession))
|
|
2432
|
+
return "other";
|
|
2433
|
+
if (recoveries.find(row.qitemId))
|
|
2434
|
+
return "recovery";
|
|
2435
|
+
if (deliveryResolutionEvidence(deps, "unclaimed-obligation", row.qitemId, now))
|
|
2436
|
+
return "delivery";
|
|
2437
|
+
const savedNotes = new Map(routeNotes);
|
|
2438
|
+
const savedRouted = new Set(routed);
|
|
2439
|
+
const savedParents = new Map(delegationParent);
|
|
2440
|
+
try {
|
|
2441
|
+
const route = resolveOrch(row.destinationSession, row) ?? row.destinationSession;
|
|
2442
|
+
const probe = { kind: "unclaimed-obligation", row, route, ageMinutes: 0, evidenceAt: row.tsCreated, why: "" };
|
|
2443
|
+
routeAroundMissing(probe);
|
|
2444
|
+
routeAroundNoWake(probe);
|
|
2445
|
+
return !activeBacklogKeyOf(probe) && isUnreachableUnclaimed(probe) ? "live" : "other";
|
|
2446
|
+
}
|
|
2447
|
+
finally {
|
|
2448
|
+
routeNotes.clear();
|
|
2449
|
+
for (const [k, v] of savedNotes)
|
|
2450
|
+
routeNotes.set(k, v);
|
|
2451
|
+
routed.clear();
|
|
2452
|
+
for (const k of savedRouted)
|
|
2453
|
+
routed.add(k);
|
|
2454
|
+
delegationParent.clear();
|
|
2455
|
+
for (const [k, v] of savedParents)
|
|
2456
|
+
delegationParent.set(k, v);
|
|
2457
|
+
}
|
|
2458
|
+
};
|
|
2459
|
+
const openUnroutableNotices = deps.db.prepare(`SELECT q.qitem_id, q.tags
|
|
2460
|
+
FROM queue_items q
|
|
2461
|
+
WHERE +q.state IN ('pending', 'in-progress', 'blocked')
|
|
2462
|
+
AND (q.tags LIKE '%"stuck-sweep:%')
|
|
2463
|
+
AND json_valid(q.tags)
|
|
2464
|
+
AND EXISTS (SELECT 1 FROM json_each(q.tags) j WHERE typeof(j.value) = 'text' AND j.value = ?)
|
|
2465
|
+
AND EXISTS (SELECT 1 FROM json_each(q.tags) j WHERE typeof(j.value) = 'text' AND substr(j.value, 1, length(?)) = ?)`).all(STUCK_SWEEP_FINDING_TAG, UNROUTABLE_NOTICE_PREFIX, UNROUTABLE_NOTICE_PREFIX);
|
|
2466
|
+
for (const notice of openUnroutableNotices) {
|
|
2467
|
+
if (dueToYield())
|
|
2468
|
+
await yieldLoop();
|
|
2469
|
+
const pair = parseUnroutableNoticeTags(notice.tags);
|
|
2470
|
+
if (!pair)
|
|
2471
|
+
continue;
|
|
2472
|
+
const { source, dest } = pair;
|
|
2473
|
+
const noticeTag = unroutableNoticeTag(source, dest);
|
|
2474
|
+
if (liveUnroutableTags.has(noticeTag))
|
|
2475
|
+
continue;
|
|
2476
|
+
const key = `${source}${UNROUTABLE_NOTICE_SEPARATOR}${dest}`;
|
|
2477
|
+
const hasOrdinaryPending = () => deps.db.prepare(`SELECT 1 FROM queue_items
|
|
2478
|
+
WHERE destination_session = ? AND source_session = ? AND state = 'pending' AND claimed_at IS NULL
|
|
2479
|
+
AND NOT (json_valid(tags) AND EXISTS (SELECT 1 FROM json_each(tags) WHERE value = ?))
|
|
2480
|
+
LIMIT 1`).get(dest, source, STUCK_SWEEP_FINDING_TAG) !== undefined;
|
|
2481
|
+
const pendingRows = deps.db.prepare(`SELECT qitem_id FROM queue_items
|
|
2482
|
+
WHERE destination_session = ? AND source_session = ? AND state = 'pending' AND claimed_at IS NULL
|
|
2483
|
+
AND NOT (json_valid(tags) AND EXISTS (SELECT 1 FROM json_each(tags) WHERE value = ?))`).all(dest, source, STUCK_SWEEP_FINDING_TAG);
|
|
2484
|
+
const queryPendingMeta = () => deps.db.prepare(`SELECT qitem_id, ts_updated, last_nudge_result, tags,
|
|
2485
|
+
COALESCE((SELECT MAX(t.transition_id) FROM queue_transitions t WHERE t.qitem_id = queue_items.qitem_id), 0) AS max_tid
|
|
2486
|
+
FROM queue_items
|
|
2487
|
+
WHERE destination_session = ? AND source_session = ? AND state = 'pending' AND claimed_at IS NULL
|
|
2488
|
+
AND NOT (json_valid(tags) AND EXISTS (SELECT 1 FROM json_each(tags) WHERE value = ?))`).all(dest, source, STUCK_SWEEP_FINDING_TAG);
|
|
2489
|
+
const pairEnvKey = () => {
|
|
2490
|
+
const recAgent = (deps.resolveRecoveryAgentSeat ?? resolveRecoveryAgentSeat)() ?? "";
|
|
2491
|
+
const opSeat = (deps.resolveOperatorSeat ?? resolveOperatorSeat)() ?? "";
|
|
2492
|
+
const seatSummary = (seat) => seat ? `${seat}:${sessionMissing(seat)}:${classOf(seat)}:${isBoundTerminalSeat(deps.db, seat)}` : "";
|
|
2493
|
+
const orch = deps.resolveOrchestrator
|
|
2494
|
+
? (deps.resolveOrchestrator(dest) ?? "")
|
|
2495
|
+
: JSON.stringify(resolveEscalationOwner(deps.db, dest, (target) => deps.queueRepo.acceptsDestination(target)));
|
|
2496
|
+
const agent = agentSeatNode(dest);
|
|
2497
|
+
return JSON.stringify([
|
|
2498
|
+
classOf(dest),
|
|
2499
|
+
sessionMissing(dest),
|
|
2500
|
+
stoppedReason(dest),
|
|
2501
|
+
sessionStoppedOrMissing(dest),
|
|
2502
|
+
isHumanTarget(dest),
|
|
2503
|
+
pollsForWork(dest),
|
|
2504
|
+
isBoundTerminalSeat(deps.db, dest),
|
|
2505
|
+
orch,
|
|
2506
|
+
agent ? `${agent.rig}:${agent.logicalId}` : "",
|
|
2507
|
+
seatSummary(source),
|
|
2508
|
+
seatSummary(recAgent),
|
|
2509
|
+
seatSummary(opSeat),
|
|
2510
|
+
]);
|
|
2511
|
+
};
|
|
2512
|
+
const keepOpenOrphanedNotice = async () => {
|
|
2513
|
+
if (deps.queueRepo.deliveryDrains.holds(dest))
|
|
2514
|
+
return;
|
|
2515
|
+
const noticeRow = indexed(() => deps.queueRepo.getById(notice.qitem_id, { waiting: false }));
|
|
2516
|
+
if (!noticeRow || noticeRow.state !== "pending" || noticeRow.claimedAt)
|
|
2517
|
+
return;
|
|
2518
|
+
const liveTags = deps.db.prepare("SELECT tags FROM queue_items WHERE qitem_id = ?")
|
|
2519
|
+
.get(noticeRow.qitemId);
|
|
2520
|
+
const livePair = parseUnroutableNoticeTags(liveTags?.tags ?? null);
|
|
2521
|
+
if (!livePair || livePair.source !== source || livePair.dest !== dest)
|
|
2522
|
+
return;
|
|
2523
|
+
if (!missingRig(noticeRow.destinationSession) || deliveryHeld(noticeRow))
|
|
2524
|
+
return;
|
|
2525
|
+
await recoverOrphanedUnroutableNotice(noticeRow, source, dest, key, noticeTag, false);
|
|
2526
|
+
};
|
|
2527
|
+
if (deps.queueRepo.deliveryDrains.holds(dest)) {
|
|
2528
|
+
if (pendingRows.length > 0)
|
|
2529
|
+
continue;
|
|
2530
|
+
}
|
|
2531
|
+
else {
|
|
2532
|
+
let hasLivePending = false;
|
|
2533
|
+
const inspected = new Map();
|
|
2534
|
+
// Zero-yield fast path avoids pairEnvKey() and MAX(transition_id) queries until a yield actually fires.
|
|
2535
|
+
const preYieldVerdicts = new Map();
|
|
2536
|
+
let currentEnv = null;
|
|
2537
|
+
let metaById = new Map();
|
|
2538
|
+
let toScan = pendingRows;
|
|
2539
|
+
for (let pass = 0;; pass++) {
|
|
2540
|
+
let passYielded = false;
|
|
2541
|
+
for (const pending of toScan) {
|
|
2542
|
+
if (dueToYield()) {
|
|
2543
|
+
if (currentEnv === null && preYieldVerdicts.size > 0) {
|
|
2544
|
+
const preYieldEnv = pairEnvKey();
|
|
2545
|
+
for (const meta of queryPendingMeta()) {
|
|
2546
|
+
const skipReason = preYieldVerdicts.get(meta.qitem_id);
|
|
2547
|
+
if (!skipReason)
|
|
2548
|
+
continue;
|
|
2549
|
+
inspected.set(meta.qitem_id, {
|
|
2550
|
+
tsUpdated: meta.ts_updated,
|
|
2551
|
+
lastNudgeResult: meta.last_nudge_result,
|
|
2552
|
+
rawTags: meta.tags,
|
|
2553
|
+
maxTid: meta.max_tid,
|
|
2554
|
+
skipReason,
|
|
2555
|
+
envKey: preYieldEnv,
|
|
2556
|
+
});
|
|
2557
|
+
}
|
|
2558
|
+
preYieldVerdicts.clear();
|
|
2559
|
+
}
|
|
2560
|
+
await yieldLoop();
|
|
2561
|
+
passYielded = true;
|
|
2562
|
+
if (deps.queueRepo.deliveryDrains.holds(dest)) {
|
|
2563
|
+
hasLivePending = hasOrdinaryPending();
|
|
2564
|
+
break;
|
|
2565
|
+
}
|
|
2566
|
+
currentEnv = pairEnvKey();
|
|
2567
|
+
metaById = new Map(queryPendingMeta().map((m) => [m.qitem_id, m]));
|
|
2568
|
+
}
|
|
2569
|
+
const row = indexed(() => deps.queueRepo.getById(pending.qitem_id, { waiting: false }));
|
|
2570
|
+
if (!row) {
|
|
2571
|
+
preYieldVerdicts.delete(pending.qitem_id);
|
|
2572
|
+
inspected.delete(pending.qitem_id);
|
|
2573
|
+
continue;
|
|
2574
|
+
}
|
|
2575
|
+
const verdict = inspectUnreachableUnclaimed(row);
|
|
2576
|
+
if (verdict === "live") {
|
|
2577
|
+
hasLivePending = true;
|
|
2578
|
+
break;
|
|
2579
|
+
}
|
|
2580
|
+
if (row.state === "pending" && !row.claimedAt && row.sourceSession === source && row.destinationSession === dest) {
|
|
2581
|
+
if (currentEnv === null) {
|
|
2582
|
+
preYieldVerdicts.set(row.qitemId, verdict);
|
|
2583
|
+
}
|
|
2584
|
+
else {
|
|
2585
|
+
const meta = metaById.get(row.qitemId);
|
|
2586
|
+
if (meta) {
|
|
2587
|
+
inspected.set(row.qitemId, {
|
|
2588
|
+
tsUpdated: row.tsUpdated,
|
|
2589
|
+
lastNudgeResult: row.lastNudgeResult ?? null,
|
|
2590
|
+
rawTags: meta.tags,
|
|
2591
|
+
maxTid: meta.max_tid,
|
|
2592
|
+
skipReason: verdict,
|
|
2593
|
+
envKey: currentEnv,
|
|
2594
|
+
});
|
|
2595
|
+
}
|
|
2596
|
+
else {
|
|
2597
|
+
inspected.delete(row.qitemId);
|
|
2598
|
+
}
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2601
|
+
else {
|
|
2602
|
+
preYieldVerdicts.delete(pending.qitem_id);
|
|
2603
|
+
inspected.delete(pending.qitem_id);
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
if (hasLivePending || !passYielded)
|
|
2607
|
+
break;
|
|
2608
|
+
if (deps.queueRepo.deliveryDrains.holds(dest)) {
|
|
2609
|
+
hasLivePending = hasOrdinaryPending();
|
|
2610
|
+
break;
|
|
2611
|
+
}
|
|
2612
|
+
if (classOf(dest) !== "unroutable" && !sessionMissing(dest))
|
|
2613
|
+
break;
|
|
2614
|
+
const nowEnv = pairEnvKey();
|
|
2615
|
+
const currentPending = queryPendingMeta();
|
|
2616
|
+
const dirty = currentPending.filter((pending) => {
|
|
2617
|
+
const prev = inspected.get(pending.qitem_id);
|
|
2618
|
+
if (!prev)
|
|
2619
|
+
return true;
|
|
2620
|
+
if (prev.envKey !== nowEnv)
|
|
2621
|
+
return true;
|
|
2622
|
+
if (prev.tsUpdated !== pending.ts_updated)
|
|
2623
|
+
return true;
|
|
2624
|
+
if (prev.lastNudgeResult !== pending.last_nudge_result)
|
|
2625
|
+
return true;
|
|
2626
|
+
if (prev.rawTags !== pending.tags)
|
|
2627
|
+
return true;
|
|
2628
|
+
if (prev.maxTid !== pending.max_tid)
|
|
2629
|
+
return true;
|
|
2630
|
+
if (prev.skipReason === "recovery" && !recoveries.find(pending.qitem_id))
|
|
2631
|
+
return true;
|
|
2632
|
+
if (prev.skipReason === "delivery" && !deliveryResolutionEvidence(deps, "unclaimed-obligation", pending.qitem_id, now))
|
|
2633
|
+
return true;
|
|
2634
|
+
return false;
|
|
2635
|
+
});
|
|
2636
|
+
if (dirty.length === 0)
|
|
2637
|
+
break;
|
|
2638
|
+
if (pass >= 2) {
|
|
2639
|
+
hasLivePending = true;
|
|
2640
|
+
break;
|
|
2641
|
+
}
|
|
2642
|
+
currentEnv = nowEnv;
|
|
2643
|
+
metaById = new Map(dirty.map((m) => [m.qitem_id, m]));
|
|
2644
|
+
toScan = dirty;
|
|
2645
|
+
}
|
|
2646
|
+
if (hasLivePending) {
|
|
2647
|
+
await keepOpenOrphanedNotice();
|
|
2648
|
+
continue;
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
const liveNotice = deps.db.prepare("SELECT state, tags FROM queue_items WHERE qitem_id = ?").get(notice.qitem_id);
|
|
2652
|
+
if (!liveNotice || !["pending", "in-progress", "blocked"].includes(liveNotice.state))
|
|
2653
|
+
continue;
|
|
2654
|
+
const livePair = parseUnroutableNoticeTags(liveNotice.tags);
|
|
2655
|
+
if (!livePair || livePair.source !== source || livePair.dest !== dest)
|
|
2656
|
+
continue;
|
|
2657
|
+
if (deps.queueRepo.deliveryDrains.holds(dest) && hasOrdinaryPending())
|
|
2658
|
+
continue;
|
|
2659
|
+
await deps.queueRepo.update({
|
|
2660
|
+
qitemId: notice.qitem_id,
|
|
2661
|
+
actorSession: "stuck-sweep@system",
|
|
2662
|
+
state: "done",
|
|
2663
|
+
closureReason: "no-follow-on",
|
|
2664
|
+
transitionNote: `stuck-sweep resolved: unroutable-notice on ${key} no pending unreachable work from ${source} at ${dest}`,
|
|
2665
|
+
});
|
|
2666
|
+
othersMayHaveRun();
|
|
2667
|
+
findings.push({ kind: "unroutable-notice", qitemId: key, findingQitemId: notice.qitem_id, action: "closed" });
|
|
2668
|
+
}
|
|
2032
2669
|
// Resolution: an open finding whose underlying condition is no longer detected closes
|
|
2033
2670
|
// with its reason — the sweep cleans up after itself, no human unwind.
|
|
2034
2671
|
const openFindings = deps.db
|
|
@@ -2050,6 +2687,8 @@ export async function runStuckSweep(deps) {
|
|
|
2050
2687
|
if (!dedupTag || liveDedupTags.has(dedupTag))
|
|
2051
2688
|
continue;
|
|
2052
2689
|
const [, kind, stuckId] = dedupTag.match(/^stuck-sweep:([a-z-]+):(.+)$/) ?? [];
|
|
2690
|
+
if (kind === "unroutable-notice")
|
|
2691
|
+
continue;
|
|
2053
2692
|
// A retry marker only suppresses reporting. Other reporting filters (a new
|
|
2054
2693
|
// unconfirmed send, a fresh post window, or a larger unclaimed age) do not
|
|
2055
2694
|
// prove resolution either: delivery/pickup findings need source evidence.
|