@openrig/cli 0.6.11 → 0.6.13
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 +23 -13
- package/daemon/assets/claude-statusline-context.cjs +2 -0
- package/daemon/assets/guidance/openrig-start.md +2 -1
- 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 +37 -7
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +7 -7
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +2 -2
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +93 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +23 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +4 -2
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +76 -20
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +24 -0
- package/daemon/assets/plugins/openrig-core/skills/delegating-work/SKILL.md +25 -5
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +4 -2
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +15 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +172 -11
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +7 -4
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +8 -0
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +61 -16
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +5 -2
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +19 -0
- package/daemon/assets/skills/rigs/SKILL.md +63 -13
- 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 +160 -43
- package/daemon/context-packs/reference/getting-started.md +81 -18
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +67 -6
- package/daemon/context-packs/reference/whats-new.md +99 -151
- 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 +24 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +0 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +7 -4
- 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/SKILL.md +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/delegating-work/SKILL.md +25 -5
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +3 -3
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +4 -2
- 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/SKILL.md +15 -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 +172 -11
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +7 -4
- 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/SKILL.md +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/SKILL.md +8 -0
- 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 +61 -16
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +5 -2
- 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/SKILL.md +19 -0
- 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/bounded-probe-exec.d.ts +45 -0
- package/daemon/dist/adapters/bounded-probe-exec.d.ts.map +1 -0
- package/daemon/dist/adapters/bounded-probe-exec.js +204 -0
- package/daemon/dist/adapters/bounded-probe-exec.js.map +1 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts +26 -2
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +275 -76
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +14 -3
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +5 -0
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +17 -3
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +38 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +184 -11
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +46 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +102 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -0
- package/daemon/dist/adapters/compose-services-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js +2 -1
- package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +8 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +35 -10
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/omp-rpc-frame.d.ts +51 -0
- package/daemon/dist/adapters/omp-rpc-frame.d.ts.map +1 -0
- package/daemon/dist/adapters/omp-rpc-frame.js +153 -0
- package/daemon/dist/adapters/omp-rpc-frame.js.map +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts +67 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.js +228 -0
- package/daemon/dist/adapters/pi-openrouter-charge.js.map +1 -0
- package/daemon/dist/adapters/pi-readiness.d.ts +81 -5
- package/daemon/dist/adapters/pi-readiness.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-readiness.js +193 -27
- package/daemon/dist/adapters/pi-readiness.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts +5 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +6 -1
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +13 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +21 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +72 -4
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +405 -28
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +16 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +19 -0
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/preflight-exec.d.ts +3 -0
- package/daemon/dist/adapters/preflight-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/preflight-exec.js +15 -7
- package/daemon/dist/adapters/preflight-exec.js.map +1 -1
- package/daemon/dist/adapters/replace-file.d.ts +8 -0
- package/daemon/dist/adapters/replace-file.d.ts.map +1 -0
- package/daemon/dist/adapters/replace-file.js +32 -0
- package/daemon/dist/adapters/replace-file.js.map +1 -0
- package/daemon/dist/adapters/stub-compaction.d.ts +1 -0
- package/daemon/dist/adapters/stub-compaction.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-compaction.js +2 -0
- package/daemon/dist/adapters/stub-compaction.js.map +1 -1
- package/daemon/dist/adapters/stub-refocus.d.ts +6 -0
- package/daemon/dist/adapters/stub-refocus.d.ts.map +1 -0
- package/daemon/dist/adapters/stub-refocus.js +22 -0
- package/daemon/dist/adapters/stub-refocus.js.map +1 -0
- package/daemon/dist/adapters/stub-runner.d.ts +6 -0
- package/daemon/dist/adapters/stub-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runner.js +18 -1
- package/daemon/dist/adapters/stub-runner.js.map +1 -1
- package/daemon/dist/adapters/stub-script.d.ts +2 -2
- package/daemon/dist/adapters/stub-script.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-script.js +2 -2
- package/daemon/dist/adapters/stub-script.js.map +1 -1
- package/daemon/dist/adapters/tmux-control.d.ts +119 -0
- package/daemon/dist/adapters/tmux-control.d.ts.map +1 -0
- package/daemon/dist/adapters/tmux-control.js +547 -0
- package/daemon/dist/adapters/tmux-control.js.map +1 -0
- package/daemon/dist/adapters/tmux-exec.d.ts +18 -4
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +98 -17
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +52 -15
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +232 -58
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/composer-prompts-surface.d.ts +2 -0
- package/daemon/dist/composer-prompts-surface.d.ts.map +1 -0
- package/daemon/dist/composer-prompts-surface.js +2 -0
- package/daemon/dist/composer-prompts-surface.js.map +1 -0
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +26 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/100_typing_guard_modes.d.ts +3 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.js +10 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.js.map +1 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.d.ts +3 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.d.ts.map +1 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.js +10 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.js.map +1 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.d.ts +9 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.d.ts.map +1 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.js +14 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.js.map +1 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.d.ts +10 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.d.ts.map +1 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.js +38 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.js.map +1 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.d.ts +12 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.d.ts.map +1 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.js +39 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.js.map +1 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.d.ts +5 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.d.ts.map +1 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.js +11 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.js.map +1 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.d.ts +10 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.d.ts.map +1 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.js +14 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.js.map +1 -0
- package/daemon/dist/db/migrations/111_seat_env.d.ts +6 -0
- package/daemon/dist/db/migrations/111_seat_env.d.ts.map +1 -0
- package/daemon/dist/db/migrations/111_seat_env.js +11 -0
- package/daemon/dist/db/migrations/111_seat_env.js.map +1 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.d.ts +3 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.d.ts.map +1 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.js +14 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.js.map +1 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.d.ts +3 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.d.ts.map +1 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.js +9 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.js.map +1 -0
- package/daemon/dist/db/migrations/114_session_agent_app.d.ts +3 -0
- package/daemon/dist/db/migrations/114_session_agent_app.d.ts.map +1 -0
- package/daemon/dist/db/migrations/114_session_agent_app.js +11 -0
- package/daemon/dist/db/migrations/114_session_agent_app.js.map +1 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.d.ts +3 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.d.ts.map +1 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.js +28 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.js.map +1 -0
- package/daemon/dist/db/migrations/117_provider_account_readings.d.ts +3 -0
- package/daemon/dist/db/migrations/117_provider_account_readings.d.ts.map +1 -0
- package/daemon/dist/db/migrations/117_provider_account_readings.js +32 -0
- package/daemon/dist/db/migrations/117_provider_account_readings.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +13 -5
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js +14 -2
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +2 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +14 -8
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/agent-image-library-service.js +1 -1
- package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -1
- package/daemon/dist/domain/agent-images/manifest-parser.js +1 -1
- package/daemon/dist/domain/agent-images/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +21 -3
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.d.ts +2 -0
- package/daemon/dist/domain/applied-launch-observation-store.d.ts.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.js +27 -3
- package/daemon/dist/domain/applied-launch-observation-store.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts +3 -0
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +49 -16
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/built-in-runtimes.d.ts +10 -0
- package/daemon/dist/domain/built-in-runtimes.d.ts.map +1 -0
- package/daemon/dist/domain/built-in-runtimes.js +14 -0
- package/daemon/dist/domain/built-in-runtimes.js.map +1 -0
- package/daemon/dist/domain/bundle-archive.d.ts +3 -1
- package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-archive.js +5 -3
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.d.ts +20 -0
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.js +57 -1
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
- package/daemon/dist/domain/bundle-integrity.d.ts +5 -2
- package/daemon/dist/domain/bundle-integrity.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-integrity.js +39 -8
- package/daemon/dist/domain/bundle-integrity.js.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts +3 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.js +7 -2
- package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
- package/daemon/dist/domain/bundle-types.d.ts +6 -0
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-types.js +26 -0
- package/daemon/dist/domain/bundle-types.js.map +1 -1
- package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.js +3 -2
- package/daemon/dist/domain/chat-repository.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts +6 -0
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +20 -1
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.d.ts +6 -0
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +19 -1
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +63 -2
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +154 -16
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts +28 -0
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -0
- package/daemon/dist/domain/claude-core-plugin-env.js +90 -0
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts +18 -6
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +104 -10
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/claude-mcp-menu.d.ts +5 -0
- package/daemon/dist/domain/claude-mcp-menu.d.ts.map +1 -0
- package/daemon/dist/domain/claude-mcp-menu.js +25 -0
- package/daemon/dist/domain/claude-mcp-menu.js.map +1 -0
- package/daemon/dist/domain/codex-thread-id.d.ts +22 -3
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +65 -16
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +38 -0
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -0
- package/daemon/dist/domain/community-harness-presets.js +155 -0
- package/daemon/dist/domain/community-harness-presets.js.map +1 -0
- package/daemon/dist/domain/composer-prompts.d.ts +118 -0
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -0
- package/daemon/dist/domain/composer-prompts.js +165 -0
- package/daemon/dist/domain/composer-prompts.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts +3 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +14 -2
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-library-service.js +2 -2
- package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +4 -0
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +1 -0
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/current-work.js +2 -2
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts +32 -0
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -0
- package/daemon/dist/domain/draft-aware-delivery.js +156 -0
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -0
- package/daemon/dist/domain/event-bus.d.ts +10 -1
- package/daemon/dist/domain/event-bus.d.ts.map +1 -1
- package/daemon/dist/domain/event-bus.js +25 -0
- package/daemon/dist/domain/event-bus.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +76 -10
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/fresh-occupant-relation.d.ts +7 -0
- package/daemon/dist/domain/fresh-occupant-relation.d.ts.map +1 -1
- package/daemon/dist/domain/fresh-occupant-relation.js +44 -0
- package/daemon/dist/domain/fresh-occupant-relation.js.map +1 -1
- package/daemon/dist/domain/frontmatter.d.ts +11 -0
- package/daemon/dist/domain/frontmatter.d.ts.map +1 -0
- package/daemon/dist/domain/frontmatter.js +20 -0
- package/daemon/dist/domain/frontmatter.js.map +1 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +11 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.js +7 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +6 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +7 -0
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/bot-inbox.d.ts +54 -0
- package/daemon/dist/domain/gateway/slack/bot-inbox.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/bot-inbox.js +86 -0
- package/daemon/dist/domain/gateway/slack/bot-inbox.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js +1 -0
- package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts +11 -1
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-map.js +31 -6
- package/daemon/dist/domain/gateway/slack/channel-map.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts +14 -2
- package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-recovery.js +128 -89
- package/daemon/dist/domain/gateway/slack/channel-recovery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.d.ts +14 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +28 -0
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/forwarding.d.ts +32 -0
- package/daemon/dist/domain/gateway/slack/forwarding.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/forwarding.js +76 -0
- package/daemon/dist/domain/gateway/slack/forwarding.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +103 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +329 -9
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +28 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +105 -4
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +3 -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 +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts +24 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.js +18 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +10 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +13 -0
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +12 -2
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-recovery.d.ts +104 -0
- package/daemon/dist/domain/gateway/slack/slack-recovery.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/slack-recovery.js +236 -0
- package/daemon/dist/domain/gateway/slack/slack-recovery.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +157 -21
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.d.ts +43 -2
- package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.js +91 -2
- package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-recovery.d.ts +37 -0
- package/daemon/dist/domain/gateway/slack/thread-recovery.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/thread-recovery.js +173 -0
- package/daemon/dist/domain/gateway/slack/thread-recovery.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js +18 -7
- package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +25 -6
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js +52 -23
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
- package/daemon/dist/domain/history-query.d.ts.map +1 -1
- package/daemon/dist/domain/history-query.js +2 -1
- package/daemon/dist/domain/history-query.js.map +1 -1
- package/daemon/dist/domain/home-isolation.d.ts +18 -0
- package/daemon/dist/domain/home-isolation.d.ts.map +1 -0
- package/daemon/dist/domain/home-isolation.js +75 -0
- package/daemon/dist/domain/home-isolation.js.map +1 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +22 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.js +43 -3
- package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
- package/daemon/dist/domain/inbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/inbox-handler.js +34 -32
- package/daemon/dist/domain/inbox-handler.js.map +1 -1
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js +12 -2
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js.map +1 -1
- package/daemon/dist/domain/mission-control/notification-dispatcher.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/notification-dispatcher.js +2 -1
- package/daemon/dist/domain/mission-control/notification-dispatcher.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +68 -0
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +133 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts +74 -0
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -0
- package/daemon/dist/domain/model-divergence/current-model-reader.js +246 -0
- package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -0
- package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +60 -0
- package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/effective-model-readers.js +182 -11
- package/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +8 -2
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +10 -5
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +57 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +169 -41
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +3 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +77 -14
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +110 -27
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +18 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +60 -2
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/openrouter-charge.d.ts +42 -0
- package/daemon/dist/domain/openrouter-charge.d.ts.map +1 -0
- package/daemon/dist/domain/openrouter-charge.js +57 -0
- package/daemon/dist/domain/openrouter-charge.js.map +1 -0
- package/daemon/dist/domain/parked-query.d.ts +5 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +9 -2
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js +27 -3
- package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts +2 -0
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.js +5 -7
- package/daemon/dist/domain/permission-policy/policy-spec.js.map +1 -1
- package/daemon/dist/domain/pi-usage-entries-store.d.ts +41 -0
- package/daemon/dist/domain/pi-usage-entries-store.d.ts.map +1 -0
- package/daemon/dist/domain/pi-usage-entries-store.js +173 -0
- package/daemon/dist/domain/pi-usage-entries-store.js.map +1 -0
- package/daemon/dist/domain/pi-usage-facts.d.ts +90 -0
- package/daemon/dist/domain/pi-usage-facts.d.ts.map +1 -0
- package/daemon/dist/domain/pi-usage-facts.js +165 -0
- package/daemon/dist/domain/pi-usage-facts.js.map +1 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +2 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +4 -0
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.js +6 -4
- package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -1
- package/daemon/dist/domain/process-census.d.ts +1 -1
- package/daemon/dist/domain/process-census.d.ts.map +1 -1
- package/daemon/dist/domain/process-table.d.ts +26 -0
- package/daemon/dist/domain/process-table.d.ts.map +1 -0
- package/daemon/dist/domain/process-table.js +185 -0
- package/daemon/dist/domain/process-table.js.map +1 -0
- package/daemon/dist/domain/profile-resolver.d.ts +10 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +15 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts +4 -0
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js +63 -3
- package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
- package/daemon/dist/domain/projection-planner.js +1 -1
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +31 -2
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts +33 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.js +195 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.js.map +1 -0
- package/daemon/dist/domain/provider/claude-usage-windows.d.ts +70 -0
- package/daemon/dist/domain/provider/claude-usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-usage-windows.js +305 -0
- package/daemon/dist/domain/provider/claude-usage-windows.js.map +1 -0
- package/daemon/dist/domain/provider/codex-auth-reader.d.ts +14 -0
- package/daemon/dist/domain/provider/codex-auth-reader.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-auth-reader.js +41 -12
- package/daemon/dist/domain/provider/codex-auth-reader.js.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-reader.d.ts +6 -1
- package/daemon/dist/domain/provider/codex-usage-reader.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-reader.js +6 -1
- package/daemon/dist/domain/provider/codex-usage-reader.js.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts +12 -49
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-windows.js +16 -173
- package/daemon/dist/domain/provider/codex-usage-windows.js.map +1 -1
- package/daemon/dist/domain/provider/provider-account-readings.d.ts +42 -0
- package/daemon/dist/domain/provider/provider-account-readings.d.ts.map +1 -0
- package/daemon/dist/domain/provider/provider-account-readings.js +132 -0
- package/daemon/dist/domain/provider/provider-account-readings.js.map +1 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts +18 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts.map +1 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.js +159 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.js.map +1 -0
- package/daemon/dist/domain/provider/provider-service-impl.d.ts +7 -2
- package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +20 -2
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +4 -2
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +101 -4
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.js +2 -0
- package/daemon/dist/domain/provider/reactive-tap.js.map +1 -1
- package/daemon/dist/domain/provider/subscription-moves.d.ts +77 -0
- package/daemon/dist/domain/provider/subscription-moves.d.ts.map +1 -0
- package/daemon/dist/domain/provider/subscription-moves.js +140 -0
- package/daemon/dist/domain/provider/subscription-moves.js.map +1 -0
- package/daemon/dist/domain/provider/usage-across-hosts.d.ts +162 -0
- package/daemon/dist/domain/provider/usage-across-hosts.d.ts.map +1 -0
- package/daemon/dist/domain/provider/usage-across-hosts.js +569 -0
- package/daemon/dist/domain/provider/usage-across-hosts.js.map +1 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts +113 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/usage-windows.js +285 -0
- package/daemon/dist/domain/provider/usage-windows.js.map +1 -0
- package/daemon/dist/domain/queue-owner.d.ts +6 -0
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +22 -0
- package/daemon/dist/domain/queue-owner.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +112 -14
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +390 -87
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +53 -22
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +23 -2
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +98 -39
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +2 -2
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +27 -8
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +7 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +54 -5
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +2 -0
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
- package/daemon/dist/domain/reply-to-choice.js +2 -0
- package/daemon/dist/domain/reply-to-choice.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +10 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +76 -12
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +6 -0
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +21 -5
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +79 -15
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +23 -19
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-policy.d.ts +26 -0
- package/daemon/dist/domain/restore-policy.d.ts.map +1 -0
- package/daemon/dist/domain/restore-policy.js +22 -0
- package/daemon/dist/domain/restore-policy.js.map +1 -0
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +6 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/restore-runtime-compatibility.d.ts +3 -0
- package/daemon/dist/domain/restore-runtime-compatibility.d.ts.map +1 -0
- package/daemon/dist/domain/restore-runtime-compatibility.js +7 -0
- package/daemon/dist/domain/restore-runtime-compatibility.js.map +1 -0
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +10 -5
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +115 -50
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +7 -1
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +5 -4
- package/daemon/dist/domain/review/compose.js.map +1 -1
- package/daemon/dist/domain/review/gather.d.ts +2 -1
- package/daemon/dist/domain/review/gather.d.ts.map +1 -1
- package/daemon/dist/domain/review/gather.js +25 -17
- package/daemon/dist/domain/review/gather.js.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.d.ts +31 -8
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +253 -98
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-mode/rig-mode-store.d.ts +11 -1
- package/daemon/dist/domain/rig-mode/rig-mode-store.d.ts.map +1 -1
- package/daemon/dist/domain/rig-mode/rig-mode-store.js +69 -48
- package/daemon/dist/domain/rig-mode/rig-mode-store.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +21 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +58 -1
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +4 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +40 -2
- 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 +7 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +4 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +3 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +32 -7
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +4 -0
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +30 -7
- 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 +35 -2
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +24 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-verifier.d.ts +15 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +28 -4
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.js +23 -10
- package/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +9 -2
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +100 -15
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +3 -0
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +129 -8
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-cwd-preparation.d.ts +22 -0
- package/daemon/dist/domain/seat-cwd-preparation.d.ts.map +1 -0
- package/daemon/dist/domain/seat-cwd-preparation.js +107 -0
- package/daemon/dist/domain/seat-cwd-preparation.js.map +1 -0
- package/daemon/dist/domain/seat-delivery-guard.d.ts +36 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +255 -22
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-effort.d.ts +116 -0
- package/daemon/dist/domain/seat-effort.d.ts.map +1 -0
- package/daemon/dist/domain/seat-effort.js +251 -0
- package/daemon/dist/domain/seat-effort.js.map +1 -0
- package/daemon/dist/domain/seat-env.d.ts +37 -0
- package/daemon/dist/domain/seat-env.d.ts.map +1 -0
- package/daemon/dist/domain/seat-env.js +94 -0
- package/daemon/dist/domain/seat-env.js.map +1 -0
- package/daemon/dist/domain/seat-handover-service.d.ts +5 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +22 -4
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +19 -2
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +153 -5
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +509 -23
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +27 -2
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +82 -7
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +2 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +1 -0
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +12 -2
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +51 -9
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/session-name.d.ts +8 -0
- package/daemon/dist/domain/session-name.d.ts.map +1 -1
- package/daemon/dist/domain/session-name.js +12 -0
- package/daemon/dist/domain/session-name.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +13 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +29 -2
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +186 -4
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +1421 -143
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts +2 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +16 -4
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +10 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +84 -4
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +3 -0
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +19 -2
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +24 -21
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/spec-validation-advisory.js +1 -1
- package/daemon/dist/domain/spec-validation-advisory.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +31 -3
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +218 -60
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +13 -3
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +34 -25
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/startup-validation.d.ts.map +1 -1
- package/daemon/dist/domain/startup-validation.js +3 -0
- package/daemon/dist/domain/startup-validation.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +7 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +6 -2
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/text-cut.d.ts +4 -0
- package/daemon/dist/domain/text-cut.d.ts.map +1 -0
- package/daemon/dist/domain/text-cut.js +7 -0
- package/daemon/dist/domain/text-cut.js.map +1 -0
- package/daemon/dist/domain/time-bound-advisory.d.ts +5 -0
- package/daemon/dist/domain/time-bound-advisory.d.ts.map +1 -0
- package/daemon/dist/domain/time-bound-advisory.js +25 -0
- package/daemon/dist/domain/time-bound-advisory.js.map +1 -0
- package/daemon/dist/domain/transcript-capture.d.ts +7 -0
- package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-capture.js +22 -1
- package/daemon/dist/domain/transcript-capture.js.map +1 -1
- package/daemon/dist/domain/transcript-rotation.d.ts +12 -4
- package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-rotation.js +185 -23
- package/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +8 -4
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +67 -3
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/usage-samples-store.d.ts +8 -0
- package/daemon/dist/domain/usage-samples-store.d.ts.map +1 -1
- package/daemon/dist/domain/usage-samples-store.js +24 -5
- package/daemon/dist/domain/usage-samples-store.js.map +1 -1
- package/daemon/dist/domain/usage-series.d.ts +154 -2
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +208 -9
- package/daemon/dist/domain/usage-series.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 +37 -1
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts +29 -0
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-delivery.js +113 -0
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +3 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +13 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +61 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +185 -30
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-scheduler.js +6 -1
- package/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +3 -1
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-readiness.js +7 -3
- package/daemon/dist/domain/workflow-exception-readiness.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +11 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +24 -6
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +5 -3
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-rig-placeholder.d.ts +24 -0
- package/daemon/dist/domain/workflow-rig-placeholder.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-rig-placeholder.js +43 -0
- package/daemon/dist/domain/workflow-rig-placeholder.js.map +1 -0
- package/daemon/dist/domain/workflow-runtime.d.ts +10 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +26 -13
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-scope.d.ts +50 -0
- package/daemon/dist/domain/workflow-scope.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-scope.js +129 -0
- package/daemon/dist/domain/workflow-scope.js.map +1 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts +10 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +13 -0
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +4 -0
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-types.js.map +1 -1
- package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-validator.js +3 -1
- package/daemon/dist/domain/workflow-validator.js.map +1 -1
- package/daemon/dist/domain/workspace/project-read.d.ts +2 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +4 -0
- 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 +10 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +1 -1
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/middleware/json-body-error.d.ts +4 -3
- package/daemon/dist/middleware/json-body-error.d.ts.map +1 -1
- package/daemon/dist/middleware/json-body-error.js +18 -4
- package/daemon/dist/middleware/json-body-error.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +78 -0
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +41 -1
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +39 -16
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/community-harnesses.d.ts +3 -0
- package/daemon/dist/routes/community-harnesses.d.ts.map +1 -0
- package/daemon/dist/routes/community-harnesses.js +18 -0
- package/daemon/dist/routes/community-harnesses.js.map +1 -0
- package/daemon/dist/routes/compaction.d.ts +3 -0
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +14 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/events.js +26 -12
- package/daemon/dist/routes/events.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts +3 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +15 -0
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +2 -1
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts +11 -1
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +182 -10
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/query-limit.d.ts +1 -0
- package/daemon/dist/routes/query-limit.d.ts.map +1 -1
- package/daemon/dist/routes/query-limit.js +1 -1
- package/daemon/dist/routes/query-limit.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +47 -4
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +19 -1
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rig-mode.d.ts.map +1 -1
- package/daemon/dist/routes/rig-mode.js +66 -11
- package/daemon/dist/routes/rig-mode.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +10 -0
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +76 -12
- 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 +8 -2
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +9 -2
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/telemetry.d.ts.map +1 -1
- package/daemon/dist/routes/telemetry.js +13 -3
- package/daemon/dist/routes/telemetry.js.map +1 -1
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +14 -5
- package/daemon/dist/routes/transcripts.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +26 -4
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +4 -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 +50 -1
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +1 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +5 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/spec-validation-surface.d.ts +1 -1
- package/daemon/dist/spec-validation-surface.d.ts.map +1 -1
- package/daemon/dist/spec-validation-surface.js +1 -1
- package/daemon/dist/spec-validation-surface.js.map +1 -1
- package/daemon/dist/startup.d.ts +3 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +160 -148
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/workflow-scope-surface.d.ts +2 -0
- package/daemon/dist/workflow-scope-surface.d.ts.map +1 -0
- package/daemon/dist/workflow-scope-surface.js +2 -0
- package/daemon/dist/workflow-scope-surface.js.map +1 -0
- package/daemon/docs/reference/agent-spec.md +5 -3
- package/daemon/docs/reference/agent-startup-guide.md +179 -6
- package/daemon/docs/reference/claude-status-line.md +69 -0
- package/daemon/docs/reference/getting-started.md +81 -18
- package/daemon/docs/reference/keeping-a-watch.md +102 -5
- package/daemon/docs/reference/project-workspace.md +70 -1
- package/daemon/docs/reference/publishing-a-rig-bundle.md +11 -3
- package/daemon/docs/reference/refocus-channel.md +52 -6
- package/daemon/docs/reference/rig-bundle.md +26 -2
- package/daemon/docs/reference/rig-spec.md +67 -6
- package/daemon/docs/reference/rosters.md +29 -2
- package/daemon/docs/reference/schemas/bundle-behaviour.v1.schema.json +105 -2
- package/daemon/docs/reference/scoped-operating-posture.md +12 -2
- package/daemon/docs/reference/sdlc-conventions.md +39 -1
- package/daemon/docs/reference/seat-delivery.md +127 -0
- package/daemon/docs/reference/slack-app-setup.md +187 -29
- package/daemon/docs/reference/topology-naming.md +9 -0
- package/daemon/docs/reference/whats-new.md +99 -151
- package/daemon/specs/agents/apps/vault-specialist/agent.yaml +1 -0
- package/daemon/specs/agents/conveyor/builder/agent.yaml +1 -0
- package/daemon/specs/agents/conveyor/lead/agent.yaml +1 -0
- package/daemon/specs/agents/conveyor/planner/agent.yaml +1 -0
- package/daemon/specs/agents/conveyor/reviewer/agent.yaml +1 -0
- package/daemon/specs/agents/design/product-designer/agent.yaml +1 -0
- package/daemon/specs/agents/development/implementer/agent.yaml +1 -0
- package/daemon/specs/agents/development/qa/agent.yaml +1 -0
- package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +1 -0
- package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +1 -0
- package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +1 -0
- package/daemon/specs/agents/product-management/pm/agent.yaml +1 -0
- package/daemon/specs/agents/research/analyst/agent.yaml +1 -0
- package/daemon/specs/agents/research/synthesizer/agent.yaml +1 -0
- package/daemon/specs/agents/review/independent-reviewer/agent.yaml +1 -0
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +7 -4
- package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +1 -1
- package/daemon/specs/rigs/launch/demo/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/factory/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/factory/topology/rig/CRAFT.md +2 -2
- package/daemon/specs/rigs/launch/first-project/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/first-project-claude/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/first-project-mixed/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +9 -2
- package/daemon/specs/rigs/launch/starter/CULTURE.md +2 -1
- package/daemon/specs/rigs/preview/product-team/CULTURE.md +1 -1
- package/dist/bin-wrapper.d.ts +2 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +61 -4
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/bundle-behaviour.d.ts.map +1 -1
- package/dist/bundle-behaviour.js +22 -0
- package/dist/bundle-behaviour.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +16 -5
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +9 -5
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +8 -0
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/capture.d.ts +4 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +29 -2
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/community-harness.d.ts +4 -0
- package/dist/commands/community-harness.d.ts.map +1 -0
- package/dist/commands/community-harness.js +48 -0
- package/dist/commands/community-harness.js.map +1 -0
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +8 -4
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +9 -2
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/crash-cart.d.ts.map +1 -1
- package/dist/commands/crash-cart.js +3 -5
- package/dist/commands/crash-cart.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +7 -5
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +8 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +2 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/grow.d.ts.map +1 -1
- package/dist/commands/grow.js +24 -7
- package/dist/commands/grow.js.map +1 -1
- package/dist/commands/launch.d.ts +1 -0
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +61 -10
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/policy.d.ts +2 -1
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +66 -7
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/provider.d.ts +2 -0
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +372 -49
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +13 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +52 -7
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +59 -10
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +20 -1
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/requirements.d.ts.map +1 -1
- package/dist/commands/requirements.js +8 -5
- package/dist/commands/requirements.js.map +1 -1
- package/dist/commands/restore.js +1 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/rig-mode.d.ts.map +1 -1
- package/dist/commands/rig-mode.js +106 -18
- package/dist/commands/rig-mode.js.map +1 -1
- package/dist/commands/roster.d.ts +2 -1
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/roster.js +10 -5
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +47 -9
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +203 -25
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts +2 -2
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +79 -12
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +23 -5
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/start.d.ts +11 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +77 -3
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +60 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +58 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/usage.d.ts +12 -0
- package/dist/commands/usage.d.ts.map +1 -1
- package/dist/commands/usage.js +108 -0
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/watchdog.d.ts.map +1 -1
- package/dist/commands/watchdog.js +20 -7
- package/dist/commands/watchdog.js.map +1 -1
- package/dist/commands/whoami.d.ts +36 -0
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +125 -7
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +53 -5
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +14 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +50 -1
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +2 -2
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +5 -4
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +6 -3
- package/dist/host-registry.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts +9 -0
- package/dist/lazy-program.d.ts.map +1 -0
- package/dist/lazy-program.js +111 -0
- package/dist/lazy-program.js.map +1 -0
- package/dist/lib/bundle-check.js +2 -2
- package/dist/lib/bundle-check.js.map +1 -1
- package/dist/lib/bundle-source.d.ts +1 -0
- package/dist/lib/bundle-source.d.ts.map +1 -1
- package/dist/lib/bundle-source.js +1 -0
- package/dist/lib/bundle-source.js.map +1 -1
- package/dist/lib/codex-auth.d.ts.map +1 -1
- package/dist/lib/codex-auth.js +17 -1
- package/dist/lib/codex-auth.js.map +1 -1
- package/dist/lib/context-install.js +1 -1
- package/dist/lib/context-install.js.map +1 -1
- package/dist/lib/file-transfer.js +1 -1
- package/dist/lib/file-transfer.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +11 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +20 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/model-observation.d.ts +13 -0
- package/dist/lib/model-observation.d.ts.map +1 -0
- package/dist/lib/model-observation.js +25 -0
- package/dist/lib/model-observation.js.map +1 -0
- package/dist/lib/permission-policy/policy-spec.d.ts.map +1 -1
- package/dist/lib/permission-policy/policy-spec.js +5 -7
- package/dist/lib/permission-policy/policy-spec.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.js +1 -1
- package/dist/lib/scope/logical-checkbox.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +8 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +50 -1
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +3 -13
- package/dist/lib/work-install.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +114 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/program-root.d.ts +5 -0
- package/dist/program-root.d.ts.map +1 -0
- package/dist/program-root.js +11 -0
- package/dist/program-root.js.map +1 -0
- package/dist/queue-read-compact.d.ts +29 -0
- package/dist/queue-read-compact.d.ts.map +1 -0
- package/dist/queue-read-compact.js +74 -0
- package/dist/queue-read-compact.js.map +1 -0
- package/dist/remote-host-ops.d.ts +21 -0
- package/dist/remote-host-ops.d.ts.map +1 -1
- package/dist/remote-host-ops.js +25 -12
- package/dist/remote-host-ops.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.js +6 -5
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/attention/source-continuity.d.ts.map +1 -1
- package/tui/dist/attention/source-continuity.js +2 -0
- package/tui/dist/attention/source-continuity.js.map +1 -1
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +3 -0
- package/tui/dist/commands/registry.js.map +1 -1
- package/tui/dist/config/config-model.d.ts.map +1 -1
- package/tui/dist/config/config-model.js +6 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/cost/cost-model.d.ts +12 -0
- package/tui/dist/cost/cost-model.d.ts.map +1 -0
- package/tui/dist/cost/cost-model.js +141 -0
- package/tui/dist/cost/cost-model.js.map +1 -0
- package/tui/dist/cost/cost-read.d.ts +19 -0
- package/tui/dist/cost/cost-read.d.ts.map +1 -0
- package/tui/dist/cost/cost-read.js +4 -0
- package/tui/dist/cost/cost-read.js.map +1 -0
- package/tui/dist/daemon-client.d.ts +13 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +77 -1
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/detail.d.ts +2 -0
- package/tui/dist/detail.d.ts.map +1 -1
- package/tui/dist/detail.js +5 -0
- package/tui/dist/detail.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +38 -18
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/helper-cwd.d.ts +3 -0
- package/tui/dist/helper-cwd.d.ts.map +1 -0
- package/tui/dist/helper-cwd.js +16 -0
- package/tui/dist/helper-cwd.js.map +1 -0
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +32 -1
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/input.d.ts.map +1 -1
- package/tui/dist/input.js +2 -1
- package/tui/dist/input.js.map +1 -1
- package/tui/dist/local-reading.d.ts.map +1 -1
- package/tui/dist/local-reading.js +2 -1
- package/tui/dist/local-reading.js.map +1 -1
- package/tui/dist/main.js +6 -5
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
- package/tui/dist/pulse/render-pulse.js +7 -1
- package/tui/dist/pulse/render-pulse.js.map +1 -1
- package/tui/dist/reading.js +1 -1
- package/tui/dist/reading.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +10 -1
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/scopes-model.d.ts +6 -1
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +33 -13
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/sections.d.ts.map +1 -1
- package/tui/dist/sections.js +4 -1
- package/tui/dist/sections.js.map +1 -1
- package/tui/dist/socket-server.d.ts.map +1 -1
- package/tui/dist/socket-server.js +2 -1
- package/tui/dist/socket-server.js.map +1 -1
- package/tui/dist/specs/launch.d.ts.map +1 -1
- package/tui/dist/specs/launch.js +2 -1
- package/tui/dist/specs/launch.js.map +1 -1
- package/tui/dist/startup.js +1 -1
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +8 -4
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts +11 -1
- package/tui/dist/terminals/open-window.d.ts.map +1 -1
- package/tui/dist/terminals/open-window.js +48 -2
- package/tui/dist/terminals/open-window.js.map +1 -1
- package/tui/dist/types.d.ts +9 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/usage/usage-hosts-model.d.ts +17 -0
- package/tui/dist/usage/usage-hosts-model.d.ts.map +1 -0
- package/tui/dist/usage/usage-hosts-model.js +73 -0
- package/tui/dist/usage/usage-hosts-model.js.map +1 -0
- package/tui/dist/usage/usage-model.d.ts +41 -0
- package/tui/dist/usage/usage-model.d.ts.map +1 -0
- package/tui/dist/usage/usage-model.js +196 -0
- package/tui/dist/usage/usage-model.js.map +1 -0
- package/ui/dist/assets/{index-DhmxKuZf.js → index-CVgod3Pm.js} +2 -2
- package/ui/dist/index.html +1 -1
|
@@ -62,6 +62,8 @@ export function hasLiveHumanGate(item) {
|
|
|
62
62
|
}
|
|
63
63
|
const AUTO_UNPARK_WAKE_TAG = "queue:auto-unpark:blocker";
|
|
64
64
|
const AUTO_UNPARK_BLOCKER_TAG_PREFIX = "queue:auto-unpark:blocker-ref:";
|
|
65
|
+
/** The actor on the transition routeToFallback writes; the row's own history is how a later reroute finds the line it wrote. */
|
|
66
|
+
const FALLBACK_ACTOR = "system:queue-fallback";
|
|
65
67
|
/** 0.5.1-53 Atom 1a — typed non-qitem gate blocker prefixes. A park may be gated on a fold / auth /
|
|
66
68
|
* external condition that is NOT a qitem and NOT a human seat; these prefixes make such a gate a
|
|
67
69
|
* first-class, compact-visible, downstream-classifiable blocker (the ruling detail rides a transition). */
|
|
@@ -121,6 +123,10 @@ export function classifyNudgeFailure(lastNudgeResult) {
|
|
|
121
123
|
return "unknown";
|
|
122
124
|
}
|
|
123
125
|
export const QUEUE_PRIORITIES = ["routine", "urgent", "critical"];
|
|
126
|
+
/** The message a `--wake-after` park timer carries when its owner gives none. */
|
|
127
|
+
export function defaultParkWakeMessage(qitemId) {
|
|
128
|
+
return `Wake timer fired for parked qitem ${qitemId}. Resume the recorded continuation and update the row.`;
|
|
129
|
+
}
|
|
124
130
|
export class QueueRepositoryError extends Error {
|
|
125
131
|
code;
|
|
126
132
|
meta;
|
|
@@ -198,6 +204,28 @@ export function matchesRecordedHandoffTarget(qitemId, handedOffTo, closureTarget
|
|
|
198
204
|
const foreign = /^(qitem-[^@]+)@([^@]+)$/.exec(closureTarget);
|
|
199
205
|
return foreign !== null && foreign[1] === deriveCrossHostSuccessorId(qitemId, handedOffTo, foreign[2]);
|
|
200
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Shared read-only lineage helper for handoff advisory and stuck sweep.
|
|
209
|
+
* Checks whether a local successor item exists matching target (by qitem_id or destination_session)
|
|
210
|
+
* linked to sourceQitemId (via handed_off_from or chain_of_record membership).
|
|
211
|
+
*
|
|
212
|
+
* Excludes source row itself (s.qitem_id != sourceQitemId). Guards chain_of_record with json_valid.
|
|
213
|
+
* Throws on database/query errors so callers can handle lookup failures with their own policies.
|
|
214
|
+
*/
|
|
215
|
+
export function hasLinkedSuccessor(db, sourceQitemId, target) {
|
|
216
|
+
const successor = db
|
|
217
|
+
.prepare(`SELECT 1 FROM queue_items s
|
|
218
|
+
WHERE (s.qitem_id = ? OR s.destination_session = ?) AND s.qitem_id != ?
|
|
219
|
+
AND (s.handed_off_from = ? OR (
|
|
220
|
+
s.chain_of_record IS NOT NULL
|
|
221
|
+
AND json_valid(s.chain_of_record)
|
|
222
|
+
AND EXISTS (
|
|
223
|
+
SELECT 1 FROM json_each(s.chain_of_record) WHERE value = ?
|
|
224
|
+
)
|
|
225
|
+
)) LIMIT 1`)
|
|
226
|
+
.get(target, target, sourceQitemId, sourceQitemId, sourceQitemId);
|
|
227
|
+
return Boolean(successor);
|
|
228
|
+
}
|
|
201
229
|
/** PL-007 — defensive column probe. Older test fixtures bypass the
|
|
202
230
|
* canonical migration list, so target_repo may be absent. Mirrors
|
|
203
231
|
* the `hasNodeColumn` pattern in rig-repository.ts. */
|
|
@@ -240,7 +268,12 @@ function compactRow(item) {
|
|
|
240
268
|
delete row[field];
|
|
241
269
|
return row;
|
|
242
270
|
}
|
|
243
|
-
const
|
|
271
|
+
const COMPACT_QUEUE_COLUMN_NAMES = [
|
|
272
|
+
"qitem_id", "ts_created", "ts_updated", "source_session", "destination_session", "state", "priority", "tier", "tags",
|
|
273
|
+
"blocked_on", "handed_off_to", "handed_off_from", "expires_at", "closure_reason", "closure_target", "closure_required_at",
|
|
274
|
+
"claimed_at", "last_nudge_attempt", "last_nudge_result", "last_heartbeat", "resolution", "target_repo",
|
|
275
|
+
];
|
|
276
|
+
const COMPACT_QUEUE_COLUMNS = COMPACT_QUEUE_COLUMN_NAMES.join(", ");
|
|
244
277
|
export function stampSelfHostSuffix(session) {
|
|
245
278
|
if (session === undefined)
|
|
246
279
|
return undefined;
|
|
@@ -289,6 +322,9 @@ export function destinationRigTeaching(session) {
|
|
|
289
322
|
* gateway resolver (how to register + "not an agent seat"). Loads the registry only for
|
|
290
323
|
* the (rare) @external refusal path. Undefined for non-@external / registered / scheme.
|
|
291
324
|
*/
|
|
325
|
+
/** Refusal teachings issued because nobody is registered yet (the load result's `noHumans`), so the refusal's
|
|
326
|
+
* wording can say so. Kept off the teaching object itself, whose fields are unchanged. */
|
|
327
|
+
const NOBODY_REGISTERED_TEACHINGS = new WeakSet();
|
|
292
328
|
export function externalAdmissionTeaching(session, loadRegistry = loadHumanRegistry) {
|
|
293
329
|
const parsed = parseSessionName(session);
|
|
294
330
|
if (parsed.kind !== "external")
|
|
@@ -296,6 +332,18 @@ export function externalAdmissionTeaching(session, loadRegistry = loadHumanRegis
|
|
|
296
332
|
if (resolveExternal(parsed.local, []).kind === "scheme")
|
|
297
333
|
return undefined;
|
|
298
334
|
const reg = loadRegistry();
|
|
335
|
+
if (!reg.ok && reg.noHumans) {
|
|
336
|
+
// Nobody registered yet: not a broken registry. Same fields as below; the hint names the registration verb.
|
|
337
|
+
const teaching = {
|
|
338
|
+
externalDomain: parsed.domain,
|
|
339
|
+
registryLoadError: true,
|
|
340
|
+
registryError: reg.error,
|
|
341
|
+
hint: `human registry admission is unavailable because no human is registered yet: ${reg.error}. ` +
|
|
342
|
+
"Register the person with rig gateway human add; do not downgrade the destination to an agent seat.",
|
|
343
|
+
};
|
|
344
|
+
NOBODY_REGISTERED_TEACHINGS.add(teaching);
|
|
345
|
+
return teaching;
|
|
346
|
+
}
|
|
299
347
|
if (!reg.ok) {
|
|
300
348
|
return {
|
|
301
349
|
externalDomain: parsed.domain,
|
|
@@ -320,7 +368,9 @@ export function destinationRefusalTeaching(session, loadRegistry = loadHumanRegi
|
|
|
320
368
|
function destinationValidationError(field, session, loadRegistry) {
|
|
321
369
|
const teaching = destinationRefusalTeaching(session, loadRegistry);
|
|
322
370
|
if (teaching?.registryLoadError === true) {
|
|
323
|
-
return new QueueRepositoryError("human_registry_unavailable",
|
|
371
|
+
return new QueueRepositoryError("human_registry_unavailable", NOBODY_REGISTERED_TEACHINGS.has(teaching)
|
|
372
|
+
? `${field} ${session} cannot be admitted because no human is registered yet: ${String(teaching.registryError)}`
|
|
373
|
+
: `${field} ${session} cannot be admitted because the human registry failed to load: ${String(teaching.registryError)}`, teaching);
|
|
324
374
|
}
|
|
325
375
|
return new QueueRepositoryError("unknown_destination_rig", `${field} ${session} references an unknown rig`, teaching);
|
|
326
376
|
}
|
|
@@ -385,7 +435,8 @@ export class QueueRepository {
|
|
|
385
435
|
this.wakeRepo = new QueueWakeRepository(db);
|
|
386
436
|
this.validateRig = opts?.validateRig ?? (() => true);
|
|
387
437
|
this.destinationAdvisory = opts?.destinationAdvisory ?? (() => null);
|
|
388
|
-
|
|
438
|
+
if (opts?.transport)
|
|
439
|
+
this.attachTransport(opts.transport);
|
|
389
440
|
this.workflowFrontierPredicate = opts?.workflowFrontierPredicate;
|
|
390
441
|
this.resolveOccupantGeneration = opts?.resolveOccupantGeneration;
|
|
391
442
|
this.loadHumanRegistryFn = opts?.loadHumanRegistry ?? (() => loadHumanRegistry());
|
|
@@ -449,6 +500,39 @@ export class QueueRepository {
|
|
|
449
500
|
*/
|
|
450
501
|
attachTransport(transport) {
|
|
451
502
|
this.transport = transport;
|
|
503
|
+
transport.configureGuardedWakes?.(entries => entries.every(entry => {
|
|
504
|
+
const row = entry.auditPointer ? this.getById(entry.auditPointer) : null;
|
|
505
|
+
if (!row || row.destinationSession !== entry.destinationSession)
|
|
506
|
+
return false;
|
|
507
|
+
return entry.outboxId.startsWith(WAKE_INTENT_PREFIX) ? this.currentWakeIntent(entry) : isBlockerLive(row.state);
|
|
508
|
+
}));
|
|
509
|
+
}
|
|
510
|
+
currentWakeIntent(entry) {
|
|
511
|
+
const row = entry.auditPointer ? this.db.prepare("SELECT state FROM queue_items WHERE qitem_id=?").get(entry.auditPointer) : undefined;
|
|
512
|
+
if (row?.state !== "pending")
|
|
513
|
+
return false;
|
|
514
|
+
const prefix = `${WAKE_INTENT_PREFIX}blocker-`;
|
|
515
|
+
if (!entry.outboxId.startsWith(prefix))
|
|
516
|
+
return true;
|
|
517
|
+
const expected = Number(entry.outboxId.slice(prefix.length));
|
|
518
|
+
const latest = this.db.prepare(`SELECT transition_id FROM (
|
|
519
|
+
SELECT transition_id, state, LAG(state) OVER (ORDER BY transition_id) AS previous_state
|
|
520
|
+
FROM queue_transitions WHERE qitem_id=?)
|
|
521
|
+
WHERE state='pending' AND previous_state IS NOT 'pending' ORDER BY transition_id DESC LIMIT 1`)
|
|
522
|
+
.get(entry.auditPointer);
|
|
523
|
+
return expected === latest?.transition_id;
|
|
524
|
+
}
|
|
525
|
+
classifyWakeResult(res) {
|
|
526
|
+
if (res.outcome === "retained")
|
|
527
|
+
return { classified: "retained", nudgeResult: res.reason?.startsWith("draft_")
|
|
528
|
+
? "retained:draft_aware" : "retained:typing_guard" };
|
|
529
|
+
if (res.ok)
|
|
530
|
+
return res.verified ? { classified: "verified", nudgeResult: "verified" } : { classified: "indeterminate", nudgeResult: "delivered-ack-pending" };
|
|
531
|
+
const detail = res.error ?? res.reason ?? "unknown";
|
|
532
|
+
if (res.delivery?.state === "indeterminate" || res.delivery?.state === "sending" || isWakeTimeoutSignal(res.reason) || isWakeTimeoutSignal(res.error)) {
|
|
533
|
+
return { classified: "indeterminate", nudgeResult: `indeterminate:${detail}` };
|
|
534
|
+
}
|
|
535
|
+
return { classified: "failed", nudgeResult: `failed:${detail}` };
|
|
452
536
|
}
|
|
453
537
|
/**
|
|
454
538
|
* W1 (transactional closure): attach the durable wake-intent store AFTER
|
|
@@ -541,6 +625,11 @@ export class QueueRepository {
|
|
|
541
625
|
if (target)
|
|
542
626
|
this.outbox.retain(record, target);
|
|
543
627
|
else {
|
|
628
|
+
// Draft-aware wakes remain pending until the transport owns their bounded
|
|
629
|
+
// retry. Manual retention is deliberately never drained.
|
|
630
|
+
const draftTarget = this.transport?.draftAwareTarget?.(input.toSession);
|
|
631
|
+
if (draftTarget)
|
|
632
|
+
this.outbox.assertRetentionCapacity(draftTarget.nodeId, frozenEnvelope);
|
|
544
633
|
this.outbox.record(record);
|
|
545
634
|
const binding = this.transport?.deliveryTarget?.(input.toSession);
|
|
546
635
|
if (binding)
|
|
@@ -631,18 +720,7 @@ export class QueueRepository {
|
|
|
631
720
|
// original frozen intent and audit pointer survives; only transport coalesces.
|
|
632
721
|
let superseded = false;
|
|
633
722
|
const actionable = (entry) => {
|
|
634
|
-
const
|
|
635
|
-
let current = row?.state === "pending";
|
|
636
|
-
const resumePrefix = `${WAKE_INTENT_PREFIX}blocker-`;
|
|
637
|
-
if (current && entry.outboxId.startsWith(resumePrefix)) {
|
|
638
|
-
const expected = Number(entry.outboxId.slice(resumePrefix.length));
|
|
639
|
-
const latest = this.db.prepare(`SELECT transition_id FROM (
|
|
640
|
-
SELECT transition_id, state, LAG(state) OVER (ORDER BY transition_id) AS previous_state
|
|
641
|
-
FROM queue_transitions WHERE qitem_id = ?)
|
|
642
|
-
WHERE state = 'pending' AND previous_state IS NOT 'pending' ORDER BY transition_id DESC LIMIT 1`)
|
|
643
|
-
.get(entry.auditPointer);
|
|
644
|
-
current = expected === latest?.transition_id;
|
|
645
|
-
}
|
|
723
|
+
const current = this.currentWakeIntent(entry);
|
|
646
724
|
if (!current) {
|
|
647
725
|
// Existing failed state means the requested old delivery was refused;
|
|
648
726
|
// the explicit tag distinguishes supersession from a transport attempt.
|
|
@@ -933,12 +1011,12 @@ export class QueueRepository {
|
|
|
933
1011
|
}
|
|
934
1012
|
const deliveryId = `guard-nudge-${qitemId}-${createHash("sha256").update(JSON.stringify([sourceSession, destinationSession, bodyOverride ?? null])).digest("hex")}`;
|
|
935
1013
|
const held = !committedOutboxIds ? this.outbox?.getById(deliveryId) : null;
|
|
936
|
-
if (held?.
|
|
1014
|
+
if (held?.guardBinding) {
|
|
937
1015
|
// Same logical nudge reuses its original frozen envelope, not a new timestamp.
|
|
938
1016
|
text = held.body;
|
|
939
1017
|
}
|
|
940
1018
|
try {
|
|
941
|
-
const res = await this.transport.send(destinationSession, text, { verify: true, stampISO, actorSession: sourceSession, committedOutboxIds, deliveryId: committedOutboxIds ? undefined : deliveryId, auditPointer: qitemId });
|
|
1019
|
+
const res = await this.transport.send(destinationSession, text, { verify: true, stampISO, actorSession: sourceSession, committedOutboxIds, deliveryId: committedOutboxIds ? undefined : deliveryId, auditPointer: qitemId, queueWake: true });
|
|
942
1020
|
// OPR.0.3.2.21.FR-4(c) — wording rename: the prior literal
|
|
943
1021
|
// "sent-unverified" read as a failure even in the common case
|
|
944
1022
|
// (delivery confirmed but the synchronous ack window expired,
|
|
@@ -946,22 +1024,11 @@ export class QueueRepository {
|
|
|
946
1024
|
// "delivered-ack-pending" reads as healthy. The old "verified"
|
|
947
1025
|
// case is unchanged for backward-compat with any tooling that
|
|
948
1026
|
// already consumed the positive literal.
|
|
949
|
-
if (res.outcome === "retained")
|
|
950
|
-
return { classified: "retained", nudgeResult: "retained:typing_guard" };
|
|
951
|
-
if (res.ok) {
|
|
952
|
-
return res.verified
|
|
953
|
-
? { classified: "verified", nudgeResult: "verified" }
|
|
954
|
-
: { classified: "indeterminate", nudgeResult: "delivered-ack-pending" };
|
|
955
|
-
}
|
|
956
1027
|
// MF6: a TIMEOUT is ambiguous — the send may have landed but the ack window
|
|
957
1028
|
// expired — so it records `indeterminate` (never silently delivered, never a
|
|
958
1029
|
// hard `failed`). A definite non-timeout failure (unreachable, unknown
|
|
959
1030
|
// session) stays `failed`.
|
|
960
|
-
|
|
961
|
-
if (isWakeTimeoutSignal(res.reason) || isWakeTimeoutSignal(res.error)) {
|
|
962
|
-
return { classified: "indeterminate", nudgeResult: `indeterminate:${detail}` };
|
|
963
|
-
}
|
|
964
|
-
return { classified: "failed", nudgeResult: `failed:${detail}` };
|
|
1031
|
+
return this.classifyWakeResult(res);
|
|
965
1032
|
}
|
|
966
1033
|
catch (err) {
|
|
967
1034
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -1569,6 +1636,7 @@ export class QueueRepository {
|
|
|
1569
1636
|
transitionNote: input.transitionNote ?? `cross-host handoff to ${input.toSession}`,
|
|
1570
1637
|
closureReason: "handed_off_to",
|
|
1571
1638
|
closureTarget: input.closureTarget,
|
|
1639
|
+
identityProvenance: input.identityProvenance ?? null,
|
|
1572
1640
|
});
|
|
1573
1641
|
// OPR.0.5.8.1 S1b — third member of the handoff family, same bypass.
|
|
1574
1642
|
this.retireParkGeneratedTimer(input.qitemId, `park_ended:${input.terminalState}`);
|
|
@@ -1590,7 +1658,7 @@ export class QueueRepository {
|
|
|
1590
1658
|
qitemId: input.qitemId,
|
|
1591
1659
|
terminalState: input.terminalState,
|
|
1592
1660
|
actorSession: input.fromSession,
|
|
1593
|
-
identityProvenance: null,
|
|
1661
|
+
identityProvenance: input.identityProvenance ?? null,
|
|
1594
1662
|
ts,
|
|
1595
1663
|
})) {
|
|
1596
1664
|
events.push(dependentEvent);
|
|
@@ -1827,11 +1895,12 @@ export class QueueRepository {
|
|
|
1827
1895
|
throw new QueueRepositoryError("qitem_not_found", `qitem ${input.qitemId} not found`);
|
|
1828
1896
|
}
|
|
1829
1897
|
const hasNote = typeof input.transitionNote === "string" && input.transitionNote.trim().length > 0;
|
|
1898
|
+
const hasValidSummary = typeof input.summary === "string" && input.summary.trim().length > 0;
|
|
1830
1899
|
const isGuardedTerminal = ["done", "canceled", "handed-off"].includes(qitem.state);
|
|
1831
1900
|
const isStatePreservingAppend = input.state === undefined || (isGuardedTerminal && input.state === qitem.state);
|
|
1832
1901
|
if (isStatePreservingAppend) {
|
|
1833
|
-
if (input.state === undefined && !hasNote) {
|
|
1834
|
-
throw new QueueRepositoryError("state_or_note_required", "queue update requires --state or a non-empty --
|
|
1902
|
+
if (input.state === undefined && !hasNote && !hasValidSummary) {
|
|
1903
|
+
throw new QueueRepositoryError("state_or_note_required", "queue update requires --state, a non-empty --note, or a non-empty --summary; nothing was written");
|
|
1835
1904
|
}
|
|
1836
1905
|
const disallowed = input.reopen === true
|
|
1837
1906
|
|| input.closureReason != null
|
|
@@ -1843,16 +1912,25 @@ export class QueueRepository {
|
|
|
1843
1912
|
|| input.wakeMaxSeconds != null
|
|
1844
1913
|
|| input.wakeProgressEvidence != null
|
|
1845
1914
|
|| input.wakeMessage != null
|
|
1846
|
-
|| input.
|
|
1847
|
-
|| input.
|
|
1915
|
+
|| input.evidenceRef != null
|
|
1916
|
+
|| (input.state !== undefined && input.summary != null)
|
|
1917
|
+
|| (input.summary != null && !hasValidSummary);
|
|
1848
1918
|
if (disallowed) {
|
|
1849
1919
|
throw new QueueRepositoryError("note_append_fields_not_admitted", "a state-preserving note append accepts only --note (and an optional same --state); state-write fields were supplied, so nothing was written");
|
|
1850
1920
|
}
|
|
1921
|
+
if (hasValidSummary) {
|
|
1922
|
+
this.persistSummary(input.qitemId, input.summary);
|
|
1923
|
+
}
|
|
1924
|
+
const note = hasValidSummary
|
|
1925
|
+
? (hasNote
|
|
1926
|
+
? (input.transitionNote.includes("(summary updated)") ? input.transitionNote : `${input.transitionNote} (summary updated)`)
|
|
1927
|
+
: "summary updated")
|
|
1928
|
+
: input.transitionNote;
|
|
1851
1929
|
this.transitionLog.append({
|
|
1852
1930
|
qitemId: input.qitemId,
|
|
1853
1931
|
state: qitem.state,
|
|
1854
1932
|
actorSession: input.actorSession,
|
|
1855
|
-
transitionNote:
|
|
1933
|
+
transitionNote: note,
|
|
1856
1934
|
// A note-only append does not clear the claim's retained park gate.
|
|
1857
1935
|
// Carry its audit pointer so a later state write can end this chain.
|
|
1858
1936
|
closureTarget: qitem.state === "in-progress" ? this.retainedClaimBlocker(input.qitemId) : undefined,
|
|
@@ -1866,7 +1944,7 @@ export class QueueRepository {
|
|
|
1866
1944
|
closureReason: null,
|
|
1867
1945
|
closureTarget: null,
|
|
1868
1946
|
actorSession: input.actorSession,
|
|
1869
|
-
summary: qitem.summary ?? null,
|
|
1947
|
+
summary: hasValidSummary ? input.summary : (qitem.summary ?? null),
|
|
1870
1948
|
});
|
|
1871
1949
|
return { persistedEvent, persistedEvents: [persistedEvent] };
|
|
1872
1950
|
}
|
|
@@ -2072,7 +2150,7 @@ export class QueueRepository {
|
|
|
2072
2150
|
"policy: periodic-reminder",
|
|
2073
2151
|
"target:",
|
|
2074
2152
|
` session: ${JSON.stringify(qitem.destinationSession)}`,
|
|
2075
|
-
`message: ${JSON.stringify(input.wakeMessage ??
|
|
2153
|
+
`message: ${JSON.stringify(input.wakeMessage ?? defaultParkWakeMessage(qitem.qitemId))}`,
|
|
2076
2154
|
"",
|
|
2077
2155
|
].join("\n"),
|
|
2078
2156
|
targetSession: qitem.destinationSession,
|
|
@@ -2102,6 +2180,15 @@ export class QueueRepository {
|
|
|
2102
2180
|
// NULL. The prior `COALESCE(?, blocked_on)` preserved the blocker on every non-blocked
|
|
2103
2181
|
// transition, leaving dead blockers that nothing audits (the root-cause strand).
|
|
2104
2182
|
const nextBlockedOn = input.state === "blocked" ? effectiveBlockedOn : null;
|
|
2183
|
+
// The outcome is used only as non-blank text on the update that closes an open row; on any other
|
|
2184
|
+
// update the field is ignored and the row answers as it would without it. It goes after what the row
|
|
2185
|
+
// already carries (a pod-fallback line, or an earlier close's outcome) on its own line, text as sent.
|
|
2186
|
+
const closingResolution = typeof input.resolution === "string" && input.resolution.trim().length > 0
|
|
2187
|
+
&& isBlockerLive(qitem.state) && !isBlockerLive(input.state)
|
|
2188
|
+
? input.resolution : null;
|
|
2189
|
+
const nextResolution = closingResolution === null
|
|
2190
|
+
? qitem.resolution
|
|
2191
|
+
: qitem.resolution ? `${qitem.resolution}\n${closingResolution}` : closingResolution;
|
|
2105
2192
|
const notification = this.classifyOwnerNotification({
|
|
2106
2193
|
action: "update",
|
|
2107
2194
|
destinationSession: qitem.destinationSession,
|
|
@@ -2118,9 +2205,10 @@ export class QueueRepository {
|
|
|
2118
2205
|
closure_reason = COALESCE(?, closure_reason),
|
|
2119
2206
|
closure_target = COALESCE(?, closure_target),
|
|
2120
2207
|
handed_off_to = COALESCE(?, handed_off_to),
|
|
2121
|
-
blocked_on =
|
|
2208
|
+
blocked_on = ?,
|
|
2209
|
+
resolution = ?
|
|
2122
2210
|
WHERE qitem_id = ?`)
|
|
2123
|
-
.run(input.state, ts, validation.closureReason, validation.closureTarget, input.handedOffTo ?? null, nextBlockedOn, input.qitemId);
|
|
2211
|
+
.run(input.state, ts, validation.closureReason, validation.closureTarget, input.handedOffTo ?? null, nextBlockedOn, nextResolution, input.qitemId);
|
|
2124
2212
|
// FR-6: park-time summary/evidence_ref are PERSISTED onto the existing
|
|
2125
2213
|
// item (not merely validated-then-dropped) — visible to the attention
|
|
2126
2214
|
// query and to Packet 2. Only the park path writes them.
|
|
@@ -2321,6 +2409,10 @@ export class QueueRepository {
|
|
|
2321
2409
|
getParkWakeStatus(qitemId) {
|
|
2322
2410
|
return this.wakeRepo.getStatus(qitemId);
|
|
2323
2411
|
}
|
|
2412
|
+
/** For parked diagnosis only (see QueueWakeRepository.servedByOwnRepeatingReminder). */
|
|
2413
|
+
parkWakeServedByOwnReminder(qitemId) {
|
|
2414
|
+
return this.wakeRepo.servedByOwnRepeatingReminder(qitemId);
|
|
2415
|
+
}
|
|
2324
2416
|
/** Park timers a seat swap keeps: each is still its blocked row's current wake and still targets the
|
|
2325
2417
|
* row's owner (see QueueWakeRepository.currentParkTimerIds). */
|
|
2326
2418
|
currentParkTimerIds() {
|
|
@@ -2346,12 +2438,43 @@ export class QueueRepository {
|
|
|
2346
2438
|
return wake ? { ...transition, wake } : transition;
|
|
2347
2439
|
});
|
|
2348
2440
|
}
|
|
2441
|
+
/** The transition that closed a row: the first of the trailing run in its current closed state.
|
|
2442
|
+
* Later notes and delivery receipts on a closed row repeat that state, so the latest transition
|
|
2443
|
+
* is not the close. Null while the row is still active (pending, in-progress, blocked). */
|
|
2444
|
+
closingTransition(qitemId, currentState) {
|
|
2445
|
+
if (isBlockerLive(currentState))
|
|
2446
|
+
return null;
|
|
2447
|
+
const transitions = this.transitionLog.listForQitem(qitemId);
|
|
2448
|
+
let closing = null;
|
|
2449
|
+
for (let i = transitions.length - 1; i >= 0 && transitions[i].state === currentState; i--)
|
|
2450
|
+
closing = transitions[i];
|
|
2451
|
+
return closing;
|
|
2452
|
+
}
|
|
2349
2453
|
/** Read-only scope-aware RECENT projection. Normalization and its hard cap
|
|
2350
2454
|
* live with the append-only transition log; the repository owns the public
|
|
2351
2455
|
* queue-domain door. */
|
|
2352
2456
|
listRecentTransitions(scope, limit = 20) {
|
|
2353
2457
|
return this.transitionLog.listRecent(typeof scope === "string" ? { kind: "rig", rig: scope } : scope, limit);
|
|
2354
2458
|
}
|
|
2459
|
+
/** The parked row an ordinary due park timer reminds about, when its reminder may share one message with other
|
|
2460
|
+
* reminders due for the same seat in the same scheduler pass: a one-shot `--wake-after` timer serving exactly one
|
|
2461
|
+
* live parked row, carrying its default message. Null keeps the reminder's own send: a custom message, a shared
|
|
2462
|
+
* or attached watchdog, a repeating wait and a provider-limit timer each deliver as before. */
|
|
2463
|
+
parkReminderDigestEntry(jobId, message) {
|
|
2464
|
+
const generated = this.wakeRepo.findCurrentQitemsByGeneratedTimer(jobId);
|
|
2465
|
+
const bound = this.wakeRepo.findBlockedQitemsByWatchdog(jobId, true);
|
|
2466
|
+
if (generated.length !== 1 || bound.length !== 1 || bound[0].qitemId !== generated[0].qitemId)
|
|
2467
|
+
return null;
|
|
2468
|
+
const row = this.getById(generated[0].qitemId);
|
|
2469
|
+
if (!row || row.state !== "blocked" || row.tags?.includes(USAGE_LIMIT_BLOCKER_TAG))
|
|
2470
|
+
return null;
|
|
2471
|
+
const job = (this.watchdogJobsRepo ?? new WatchdogJobsRepository(this.db)).getById(jobId);
|
|
2472
|
+
if (!job || job.policy !== "periodic-reminder" || isQueueWait(job.specYaml))
|
|
2473
|
+
return null;
|
|
2474
|
+
if (message !== defaultParkWakeMessage(row.qitemId))
|
|
2475
|
+
return null;
|
|
2476
|
+
return { qitemId: row.qitemId, summary: row.summary ?? null };
|
|
2477
|
+
}
|
|
2355
2478
|
/** Called by the watchdog engine after the delivery attempt is durably
|
|
2356
2479
|
* audited. The queue transition records that attempt independently of
|
|
2357
2480
|
* whether the HELD row's owner consumed it. */
|
|
@@ -2404,8 +2527,20 @@ export class QueueRepository {
|
|
|
2404
2527
|
if (deliveryStatus === "retained")
|
|
2405
2528
|
return firedEvents;
|
|
2406
2529
|
if (usageLimitBlockers.length === 0) {
|
|
2407
|
-
|
|
2408
|
-
|
|
2530
|
+
const jobsRepo = this.watchdogJobsRepo ?? new WatchdogJobsRepository(this.db);
|
|
2531
|
+
if (parkGeneratedTimer && !backOffQueueWait(jobsRepo, jobId, deliveryStatus)) {
|
|
2532
|
+
jobsRepo.markTerminal(jobId, "park_timer_fired_once");
|
|
2533
|
+
}
|
|
2534
|
+
else if (!parkGeneratedTimer) {
|
|
2535
|
+
// A one-shot generated job whose original park has ended and whose last attachment this attempt just
|
|
2536
|
+
// consumed is retired now, not at its next check: while it stayed active, --wake-watchdog could attach
|
|
2537
|
+
// another task to it. Repeating (queue-wait) jobs keep their own lifecycle.
|
|
2538
|
+
const job = jobsRepo.getById(jobId);
|
|
2539
|
+
if (job && !isQueueWait(job.specYaml)) {
|
|
2540
|
+
const reason = this.resolveWatchdogPreDeliveryTerminalReason(jobId);
|
|
2541
|
+
if (reason)
|
|
2542
|
+
jobsRepo.markTerminal(jobId, reason);
|
|
2543
|
+
}
|
|
2409
2544
|
}
|
|
2410
2545
|
return firedEvents;
|
|
2411
2546
|
}
|
|
@@ -2532,23 +2667,46 @@ export class QueueRepository {
|
|
|
2532
2667
|
}
|
|
2533
2668
|
/** #96 — whether some update recorded this Slack root as the thread it posts into. Such a
|
|
2534
2669
|
* root is shared: its owner's next decision must not reuse it (see slack-subsystem). */
|
|
2535
|
-
isReplyToThread(threadTs) {
|
|
2670
|
+
isReplyToThread(threadTs, where) {
|
|
2536
2671
|
if (!this.hasQueueTransitionsTable)
|
|
2537
2672
|
return false;
|
|
2538
2673
|
// Same trust rule as replyToChoiceFor: a pre-provenance schema reads every row as null.
|
|
2539
2674
|
const provenance = this.hasTransitionProvenanceColumn ? " AND identity_provenance IS NULL" : "";
|
|
2675
|
+
const note = formatReplyToChoice({ kind: "thread", threadTs });
|
|
2676
|
+
// A root is its channel's: with `where`, only a choice naming that channel counts. One naming no
|
|
2677
|
+
// channel is judged by the caller from the rows that made it (unnamedReplyToChoiceRows).
|
|
2678
|
+
if (where) {
|
|
2679
|
+
return this.db.prepare(`SELECT 1 FROM queue_transitions WHERE transition_note = ? AND actor_session = ?${provenance} LIMIT 1`).get(`${note} channel=${where.channel}`, REPLY_TO_CHOICE_ACTOR) !== undefined;
|
|
2680
|
+
}
|
|
2540
2681
|
// #192: with a channel map the note carries a ` channel=<id>` suffix. Match the exact note, or
|
|
2541
2682
|
// the exact note followed by that suffix; a prefix compare, not LIKE (the note itself contains
|
|
2542
2683
|
// `_`), and the trailing space keeps thread 1.1 from matching 1.10.
|
|
2543
|
-
const note = formatReplyToChoice({ kind: "thread", threadTs });
|
|
2544
2684
|
const withChannel = `${note} channel=`;
|
|
2545
2685
|
return this.db.prepare(`SELECT 1 FROM queue_transitions
|
|
2546
2686
|
WHERE (transition_note = ? OR substr(transition_note, 1, ?) = ?) AND actor_session = ?${provenance} LIMIT 1`).get(note, withChannel.length, withChannel, REPLY_TO_CHOICE_ACTOR) !== undefined;
|
|
2547
2687
|
}
|
|
2688
|
+
/** #96 — the rows whose recorded choice threads into this ts without naming a channel. Such a choice
|
|
2689
|
+
* was made for the default channel of its day, which may have changed since, so the note alone
|
|
2690
|
+
* can't say which root it took; the caller checks where each row's post landed (its recorded parts). */
|
|
2691
|
+
unnamedReplyToChoiceRows(threadTs) {
|
|
2692
|
+
if (!this.hasQueueTransitionsTable)
|
|
2693
|
+
return [];
|
|
2694
|
+
const provenance = this.hasTransitionProvenanceColumn ? " AND identity_provenance IS NULL" : "";
|
|
2695
|
+
const rows = this.db.prepare(`SELECT DISTINCT qitem_id FROM queue_transitions WHERE transition_note = ? AND actor_session = ?${provenance}`).all(formatReplyToChoice({ kind: "thread", threadTs }), REPLY_TO_CHOICE_ACTOR);
|
|
2696
|
+
return rows.map((r) => r.qitem_id);
|
|
2697
|
+
}
|
|
2548
2698
|
replyToFallbackFor(qitemId) {
|
|
2549
2699
|
const choice = this.replyToChoiceFor(qitemId);
|
|
2550
2700
|
return choice?.kind === "fallback" ? describeReplyToFallback(choice) : null;
|
|
2551
2701
|
}
|
|
2702
|
+
/** The parked query's obligation face: open rows to one destination, newest first, without the per-row
|
|
2703
|
+
* projections list() derives (pickup, waiting view, delivery ledger), which this read never uses. */
|
|
2704
|
+
listOpenObligations(destinationSession, limit) {
|
|
2705
|
+
const rows = this.db.prepare(`SELECT qitem_id, state${this.hasSummaryColumn ? ", summary" : ""} FROM queue_items
|
|
2706
|
+
WHERE destination_session = ? AND state IN ('pending', 'in-progress', 'blocked')
|
|
2707
|
+
ORDER BY ts_created DESC LIMIT ?`).all(destinationSession, limit);
|
|
2708
|
+
return rows.map((r) => ({ qitemId: r.qitem_id, state: r.state, summary: r.summary ?? null }));
|
|
2709
|
+
}
|
|
2552
2710
|
list(opts) {
|
|
2553
2711
|
const limit = opts?.limit ?? 100;
|
|
2554
2712
|
const conditions = [];
|
|
@@ -2597,9 +2755,11 @@ export class QueueRepository {
|
|
|
2597
2755
|
const rows = this.db
|
|
2598
2756
|
.prepare(`SELECT ${columns} FROM queue_items ${where} ORDER BY ${orderBy} LIMIT ?`)
|
|
2599
2757
|
.all(...params);
|
|
2758
|
+
const owners = this.transitionLog.ownerNotificationsForQitems(rows.map((row) => row.qitem_id));
|
|
2759
|
+
const ledgers = this.deliveryOutcomesFor(rows, owners);
|
|
2600
2760
|
const items = rows.map((r) => {
|
|
2601
|
-
const
|
|
2602
|
-
const
|
|
2761
|
+
const ledger = ledgers.get(r.qitem_id);
|
|
2762
|
+
const item = this.rowToItem(r, !opts?.compact, { owners: owners.get(r.qitem_id) ?? [], ledger: ledger ?? null });
|
|
2603
2763
|
return {
|
|
2604
2764
|
...item,
|
|
2605
2765
|
deliveryOutcome: ledger?.outcome ?? null,
|
|
@@ -2654,6 +2814,21 @@ export class QueueRepository {
|
|
|
2654
2814
|
`).all(limit);
|
|
2655
2815
|
return rows.map((row) => ({ ...this.rowToItem(row), deliveredAt: row.delivered_at, deliveryReceipt: row.delivery_receipt }));
|
|
2656
2816
|
}
|
|
2817
|
+
/** Current explicit human FYIs; delivery receipts are not required for local visibility.
|
|
2818
|
+
* Filter before the bounded window so agent and malformed destinations cannot hide updates. */
|
|
2819
|
+
listOpenHumanUpdates(opts = {}) {
|
|
2820
|
+
if (!this.hasHumanIntentColumn)
|
|
2821
|
+
return [];
|
|
2822
|
+
const limit = Number.isFinite(opts.limit) ? Math.max(1, Math.min(1001, Math.floor(opts.limit))) : 100;
|
|
2823
|
+
const rows = this.db.prepare(`
|
|
2824
|
+
SELECT * FROM queue_items
|
|
2825
|
+
WHERE state IN ('pending', 'in-progress', 'blocked')
|
|
2826
|
+
AND human_intent = 'update'
|
|
2827
|
+
AND is_human_seat_session(destination_session) = 1
|
|
2828
|
+
ORDER BY CASE priority WHEN 'critical' THEN 2 WHEN 'urgent' THEN 1 ELSE 0 END DESC, ts_created DESC, qitem_id DESC LIMIT ?
|
|
2829
|
+
`).all(limit);
|
|
2830
|
+
return rows.map(row => this.rowToItem(row));
|
|
2831
|
+
}
|
|
2657
2832
|
listAttention(opts) {
|
|
2658
2833
|
const limit = opts?.limit ?? 100;
|
|
2659
2834
|
const states = opts?.state
|
|
@@ -2850,6 +3025,26 @@ export class QueueRepository {
|
|
|
2850
3025
|
}
|
|
2851
3026
|
return opts?.compact ? out.map(compactRow) : out;
|
|
2852
3027
|
}
|
|
3028
|
+
/** Read the same address-admission predicate used by queue writes before choosing
|
|
3029
|
+
* a recovery owner. Admission does not require a live seat or terminal binding. */
|
|
3030
|
+
acceptsDestination(destinationSession) {
|
|
3031
|
+
return this.validateRig(destinationSession);
|
|
3032
|
+
}
|
|
3033
|
+
/** Human ownership includes reserved references and registered aliases, even when
|
|
3034
|
+
* an alias has a terminal binding. Transport capability does not determine identity.
|
|
3035
|
+
* A canonical identity is unknown when the registry cannot be read: throw instead
|
|
3036
|
+
* of returning an agent classification that a caller could persist as a route. */
|
|
3037
|
+
isHumanDestination(destinationSession) {
|
|
3038
|
+
if (isHumanSeatSessionRef(destinationSession))
|
|
3039
|
+
return true;
|
|
3040
|
+
if (parseSessionName(destinationSession).kind !== "canonical")
|
|
3041
|
+
return false;
|
|
3042
|
+
const registry = this.loadHumanRegistryFn();
|
|
3043
|
+
if (!registry.ok) {
|
|
3044
|
+
throw new QueueRepositoryError("human_registry_unavailable", `Cannot classify '${destinationSession}' as human or agent: human registry unavailable (${registry.error}).`);
|
|
3045
|
+
}
|
|
3046
|
+
return resolveRegisteredHumanAddress(destinationSession, registry.entities) !== null;
|
|
3047
|
+
}
|
|
2853
3048
|
/** OPR.0.5.6.14 — the one destination-classification seam, as the wake path consults it.
|
|
2854
3049
|
* Public for the single-row read route; getById itself stays free of topology reads. */
|
|
2855
3050
|
classifyDestinationOf(destinationSession) {
|
|
@@ -2895,9 +3090,10 @@ export class QueueRepository {
|
|
|
2895
3090
|
}
|
|
2896
3091
|
}
|
|
2897
3092
|
/** Null means legacy/no OWNER history; inactive means OWNER history exists
|
|
2898
|
-
* but the row no longer projects a current human-notification episode.
|
|
2899
|
-
|
|
2900
|
-
|
|
3093
|
+
* but the row no longer projects a current human-notification episode.
|
|
3094
|
+
* owners: the row's owner notifications, newest first. */
|
|
3095
|
+
currentDeliveryEpisode(item, owners, loadRegistry) {
|
|
3096
|
+
let transition = owners[0];
|
|
2901
3097
|
if (!transition)
|
|
2902
3098
|
return null;
|
|
2903
3099
|
// A human-decision-resolved notice written BY the transition that closed the row (a human's direct reply closing
|
|
@@ -2907,15 +3103,13 @@ export class QueueRepository {
|
|
|
2907
3103
|
// stayed active is a real delivery and keeps its outcome after an agent later closes the row.
|
|
2908
3104
|
let resolvedBy = null;
|
|
2909
3105
|
if (transition.ownerNotificationKind === "human-decision-resolved" && !["pending", "in-progress", "blocked"].includes(transition.state)) {
|
|
2910
|
-
const outbound =
|
|
2911
|
-
.filter((t) => t.ownerNotificationLevel != null && t.ownerNotificationKind != null && t.ownerNotificationKind !== "human-decision-resolved")
|
|
2912
|
-
.sort((a, b) => b.transitionId - a.transitionId)[0];
|
|
3106
|
+
const outbound = owners.find(isOutboundOwnerNotice);
|
|
2913
3107
|
if (!outbound)
|
|
2914
3108
|
return "inactive";
|
|
2915
3109
|
resolvedBy = transition.actorSession;
|
|
2916
3110
|
transition = outbound;
|
|
2917
3111
|
}
|
|
2918
|
-
const registry =
|
|
3112
|
+
const registry = loadRegistry();
|
|
2919
3113
|
if (!registry.ok)
|
|
2920
3114
|
return "inactive";
|
|
2921
3115
|
// After that fallback the recipient is the human who answered: the row may be an agent's that was parked on them
|
|
@@ -2943,13 +3137,14 @@ export class QueueRepository {
|
|
|
2943
3137
|
* to a registered human, aliases included) has a POSTED receipt. Legacy rows with no OWNER
|
|
2944
3138
|
* history, inactive episodes, never-posted and transport-failed all read false. Same derivation
|
|
2945
3139
|
* as deliveryOutcomeFor; it reads row fields, never the waiting view. */
|
|
2946
|
-
humanNotificationPostedThisEpisode(qitemId) {
|
|
3140
|
+
humanNotificationPostedThisEpisode(qitemId, listed) {
|
|
2947
3141
|
if (!this.hasQueueTransitionsTable)
|
|
2948
3142
|
return false;
|
|
2949
3143
|
// Only the ask's own notification binds a recipient: create writes it in state pending, to the destination of
|
|
2950
3144
|
// that moment. A park notice (its recipient is not retained), a resolution notice, or a later destination change
|
|
2951
3145
|
// (routeToFallback opens no new episode) cannot establish that the current destination received this ask.
|
|
2952
|
-
const
|
|
3146
|
+
const owners = listed?.owners ?? this.transitionLog.ownerNotificationsForQitems([qitemId]).get(qitemId) ?? [];
|
|
3147
|
+
const owner = owners[0];
|
|
2953
3148
|
if (!owner || owner.state !== "pending")
|
|
2954
3149
|
return false;
|
|
2955
3150
|
if (owner.ownerNotificationKind !== "human-required" && owner.ownerNotificationKind !== "human-update")
|
|
@@ -2958,10 +3153,11 @@ export class QueueRepository {
|
|
|
2958
3153
|
if (rerouted)
|
|
2959
3154
|
return false;
|
|
2960
3155
|
// The ledger's episode exists only when the destination resolves to a registered human (aliases included).
|
|
2961
|
-
const ledger = this.deliveryLedger(qitemId,
|
|
3156
|
+
const ledger = listed ? listed.ledger : this.deliveryLedger(qitemId, owners);
|
|
2962
3157
|
return ledger !== null && ledger.outcome === "posted" && ledger.episode?.notificationKey === `${qitemId}:${owner.transitionId}`;
|
|
2963
3158
|
}
|
|
2964
|
-
|
|
3159
|
+
/** owners: the row's owner notifications as ownerNotificationsForQitems gives them, when the caller read them. */
|
|
3160
|
+
deliveryLedger(qitemId, owners) {
|
|
2965
3161
|
// Some repository-only fixtures intentionally model the pre-transition
|
|
2966
3162
|
// schema. Delivery projection is additive there: absence means no verdict,
|
|
2967
3163
|
// never a list failure.
|
|
@@ -2971,26 +3167,65 @@ export class QueueRepository {
|
|
|
2971
3167
|
.get(qitemId);
|
|
2972
3168
|
if (!row)
|
|
2973
3169
|
return null;
|
|
2974
|
-
// The delivery episode uses row fields, not the waiting/backstop view.
|
|
2975
|
-
//
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
3170
|
+
// The delivery episode uses row fields, not the waiting/backstop view. Its receipts are read after it, as they
|
|
3171
|
+
// always were for a single row: a receipt committed while the human registry loads is then seen.
|
|
3172
|
+
return this.deliveryOutcomesFor([row], owners && new Map([[qitemId, owners]]), true).get(qitemId) ?? null;
|
|
3173
|
+
}
|
|
3174
|
+
receiptNotesStatement;
|
|
3175
|
+
/** The delivery ledger of each row, its reads batched: one read of the rows' owner notifications (unless the caller
|
|
3176
|
+
* read them already), one of their receipts, the human registry loaded once at most. A single row's
|
|
3177
|
+
* (deliveryOutcomeFor, show, the sweeps) is a batch of one. receiptsAfterEpisodes: read the receipts once the
|
|
3178
|
+
* episodes (and so the registry) are worked out, as a single row's ledger does; a listing reads them before. */
|
|
3179
|
+
deliveryOutcomesFor(rows, knownOwners, receiptsAfterEpisodes = false) {
|
|
3180
|
+
const ledgers = new Map();
|
|
3181
|
+
if (!this.hasQueueTransitionsTable || rows.length === 0)
|
|
3182
|
+
return ledgers;
|
|
3183
|
+
const qitemIds = rows.map((row) => row.qitem_id);
|
|
3184
|
+
const owners = knownOwners ?? this.transitionLog.ownerNotificationsForQitems(qitemIds);
|
|
3185
|
+
let notes = receiptsAfterEpisodes ? undefined : this.receiptNotesFor(qitemIds);
|
|
3186
|
+
let registry;
|
|
3187
|
+
const loadRegistry = () => (registry ??= this.loadHumanRegistryFn());
|
|
3188
|
+
const episodes = rows.map((row) => {
|
|
3189
|
+
const item = ledgerItem(row);
|
|
3190
|
+
return { item, episode: this.currentDeliveryEpisode(item, owners.get(row.qitem_id) ?? [], loadRegistry) };
|
|
3191
|
+
});
|
|
3192
|
+
notes ??= this.receiptNotesFor(qitemIds);
|
|
3193
|
+
for (const { item, episode } of episodes) {
|
|
3194
|
+
if (episode === "inactive")
|
|
3195
|
+
continue;
|
|
3196
|
+
const ledger = this.ledgerOf(item, episode, notes.get(item.qitemId) ?? []);
|
|
3197
|
+
if (ledger)
|
|
3198
|
+
ledgers.set(item.qitemId, ledger);
|
|
3199
|
+
}
|
|
3200
|
+
return ledgers;
|
|
3201
|
+
}
|
|
3202
|
+
/** The delivery receipt notes of these qitems, newest first, by qitem. */
|
|
3203
|
+
receiptNotesFor(qitemIds) {
|
|
3204
|
+
this.receiptNotesStatement ??= this.db.prepare(`SELECT qitem_id, transition_note FROM queue_transitions
|
|
3205
|
+
WHERE qitem_id IN (SELECT value FROM json_each(?)) AND (transition_note LIKE 'slack-owner-notification-posted %'
|
|
2983
3206
|
OR transition_note LIKE 'slack-owner-notification-transport-failed %')
|
|
2984
|
-
ORDER BY transition_id DESC`)
|
|
3207
|
+
ORDER BY transition_id DESC`);
|
|
3208
|
+
const notes = new Map();
|
|
3209
|
+
for (const row of this.receiptNotesStatement.all(JSON.stringify(qitemIds))) {
|
|
3210
|
+
const own = notes.get(row.qitem_id);
|
|
3211
|
+
if (own)
|
|
3212
|
+
own.push(row.transition_note);
|
|
3213
|
+
else
|
|
3214
|
+
notes.set(row.qitem_id, [row.transition_note]);
|
|
3215
|
+
}
|
|
3216
|
+
return notes;
|
|
3217
|
+
}
|
|
3218
|
+
/** The ledger of one row's current episode, from its receipt notes (newest first). */
|
|
3219
|
+
ledgerOf(item, episode, notes) {
|
|
2985
3220
|
const currentNotes = episode
|
|
2986
|
-
? notes.filter((note) => note.
|
|
3221
|
+
? notes.filter((note) => note.split(/\s+/).includes(`notification_key=${episode.notificationKey}`))
|
|
2987
3222
|
: notes;
|
|
2988
|
-
const posted = currentNotes.find((note) => note.
|
|
3223
|
+
const posted = currentNotes.find((note) => note.startsWith("slack-owner-notification-posted "));
|
|
2989
3224
|
if (posted)
|
|
2990
|
-
return { outcome: "posted", detail: posted
|
|
2991
|
-
const failed = currentNotes.find((note) => note.
|
|
3225
|
+
return { outcome: "posted", detail: posted, episode };
|
|
3226
|
+
const failed = currentNotes.find((note) => note.startsWith("slack-owner-notification-transport-failed "));
|
|
2992
3227
|
if (failed)
|
|
2993
|
-
return { outcome: "transport-failed", detail: failed
|
|
3228
|
+
return { outcome: "transport-failed", detail: failed, episode };
|
|
2994
3229
|
const startedAt = episode?.startedAt ?? item.tsCreated;
|
|
2995
3230
|
const gatewayRouted = episode !== null || item.lastNudgeResult?.startsWith("gateway-owned") === true;
|
|
2996
3231
|
if (gatewayRouted) {
|
|
@@ -3013,6 +3248,56 @@ export class QueueRepository {
|
|
|
3013
3248
|
WHERE qitem_id = ?`)
|
|
3014
3249
|
.run(ts, result, qitemId);
|
|
3015
3250
|
}
|
|
3251
|
+
/**
|
|
3252
|
+
* Where, in the row's `resolution`, the fallback line `routeToFallback` last wrote begins; null when it cannot be
|
|
3253
|
+
* told, and the field is then left whole. The row's own transitions say what that reroute printed: a newest-first
|
|
3254
|
+
* seek by row on the live log, then on the archive the retention sweep moves an aged closed row's transitions to,
|
|
3255
|
+
* stopping at the reroute's own transition (the in-process one, with no identity provenance), whose note is `fallback-routed: <from> → <to> (<reason>)`. The line is
|
|
3256
|
+
* `fallback: <reason>`, built from the same printed reason, so it starts at a line start `i` of the field with
|
|
3257
|
+
* `fallback: ` there and the rest of the field, `r`, satisfying note ends with ` (r)`. Neither the destinations nor
|
|
3258
|
+
* the chain are consulted, so how a value was stored cannot matter. At most one `i` can satisfy it when the field
|
|
3259
|
+
* ends with that line: a longer `r` would have to be preceded in the note by ` (`, and a shorter one starts inside the
|
|
3260
|
+
* reason, right after a newline, which is not ` (`.
|
|
3261
|
+
*
|
|
3262
|
+
* A close that came after that reroute from an open state may have appended an outcome behind the line, and an
|
|
3263
|
+
* outcome can read like the line, so then only a field that is nothing but the line (`i` = 0, which an appended
|
|
3264
|
+
* outcome would lengthen) is accepted.
|
|
3265
|
+
*/
|
|
3266
|
+
fallbackLineStart(qitemId, resolution) {
|
|
3267
|
+
let note = null;
|
|
3268
|
+
let newerClosed = false;
|
|
3269
|
+
let outcomeMayFollow = false;
|
|
3270
|
+
for (const table of ["queue_transitions", ...(detectTable(this.db, "queue_transitions_archive") ? ["queue_transitions_archive"] : [])]) {
|
|
3271
|
+
// The reroute's transition is written in-process, so it has no identity provenance; the update route records one
|
|
3272
|
+
// on every write and takes the actor and note from the request, so a transition it wrote can carry the same
|
|
3273
|
+
// actor and note without being a reroute (the trust rule replyToChoiceFor uses). A schema without the column
|
|
3274
|
+
// predates the update route's provenance and reads every row as unstamped.
|
|
3275
|
+
const stamped = this.db.prepare(`PRAGMA table_info(${table})`).all().some((c) => c.name === "identity_provenance");
|
|
3276
|
+
const newestFirst = this.db.prepare(`SELECT state, actor_session, transition_note, ${stamped ? "identity_provenance" : "NULL AS identity_provenance"} FROM ${table} WHERE qitem_id = ? ORDER BY transition_id DESC`);
|
|
3277
|
+
for (const row of newestFirst.iterate(qitemId)) {
|
|
3278
|
+
if (newerClosed && isBlockerLive(row.state))
|
|
3279
|
+
outcomeMayFollow = true;
|
|
3280
|
+
if (row.identity_provenance === null && row.actor_session === FALLBACK_ACTOR && row.transition_note?.startsWith("fallback-routed: ")) {
|
|
3281
|
+
note = row.transition_note;
|
|
3282
|
+
break;
|
|
3283
|
+
}
|
|
3284
|
+
newerClosed = !isBlockerLive(row.state);
|
|
3285
|
+
}
|
|
3286
|
+
if (note !== null)
|
|
3287
|
+
break;
|
|
3288
|
+
}
|
|
3289
|
+
if (note === null)
|
|
3290
|
+
return null;
|
|
3291
|
+
const printed = note;
|
|
3292
|
+
const startsHere = (i) => resolution.startsWith("fallback: ", i) && (i === 0 || resolution[i - 1] === "\n") && printed.endsWith(` (${resolution.slice(i + "fallback: ".length)})`);
|
|
3293
|
+
if (outcomeMayFollow)
|
|
3294
|
+
return startsHere(0) ? 0 : null;
|
|
3295
|
+
for (let i = 0; i < resolution.length; i = resolution.indexOf("\n", i) + 1 || resolution.length) {
|
|
3296
|
+
if (startsHere(i))
|
|
3297
|
+
return i;
|
|
3298
|
+
}
|
|
3299
|
+
return null;
|
|
3300
|
+
}
|
|
3016
3301
|
/**
|
|
3017
3302
|
* Pod-fallback: redirect qitem to a fallback destination (e.g., when a seat
|
|
3018
3303
|
* is unreachable). Emits qitem.fallback_routed; preserves chain_of_record.
|
|
@@ -3025,6 +3310,16 @@ export class QueueRepository {
|
|
|
3025
3310
|
const ts = new Date().toISOString();
|
|
3026
3311
|
const originalDestination = qitem.destinationSession;
|
|
3027
3312
|
const newChain = JSON.stringify([...(qitem.chainOfRecord ?? []), `fallback-from:${originalDestination}`]);
|
|
3313
|
+
// The field held only a fallback line before a close could store an outcome. The line this method last
|
|
3314
|
+
// wrote is replaced, as it always was; anything else in the field is an outcome (possibly after an
|
|
3315
|
+
// earlier fallback line) and stays, with the new line after it. "The line it last wrote" comes from the
|
|
3316
|
+
// row's own transitions, so no marker is stored in the text. When the row has closed since, the field may
|
|
3317
|
+
// end with an outcome that reads like that line, so then only a field that is exactly the line (an
|
|
3318
|
+
// appended outcome would make it longer) is replaced; with no such reroute transition the field is left whole.
|
|
3319
|
+
const fallbackLine = `fallback: ${reason}`;
|
|
3320
|
+
const start = qitem.resolution ? this.fallbackLineStart(qitemId, qitem.resolution) : null;
|
|
3321
|
+
const kept = qitem.resolution && start !== null ? qitem.resolution.slice(0, Math.max(0, start - 1)) : qitem.resolution;
|
|
3322
|
+
const nextResolution = kept ? `${kept}\n${fallbackLine}` : fallbackLine;
|
|
3028
3323
|
const txn = this.db.transaction(() => {
|
|
3029
3324
|
this.db
|
|
3030
3325
|
.prepare(`UPDATE queue_items
|
|
@@ -3033,7 +3328,7 @@ export class QueueRepository {
|
|
|
3033
3328
|
chain_of_record = ?,
|
|
3034
3329
|
resolution = ?
|
|
3035
3330
|
WHERE qitem_id = ?`)
|
|
3036
|
-
.run(fallbackDestination, ts, newChain,
|
|
3331
|
+
.run(fallbackDestination, ts, newChain, nextResolution, qitemId);
|
|
3037
3332
|
// A park timer targets the owner that parked the row. Once the row belongs to someone else it must not keep
|
|
3038
3333
|
// waking the old owner, so it ends here like any other exit from the park. A repeating wait is left running:
|
|
3039
3334
|
// it resolves its recipient from the row's current owner at delivery (evaluateQueueWait).
|
|
@@ -3044,7 +3339,7 @@ export class QueueRepository {
|
|
|
3044
3339
|
this.transitionLog.append({
|
|
3045
3340
|
qitemId,
|
|
3046
3341
|
state: qitem.state,
|
|
3047
|
-
actorSession:
|
|
3342
|
+
actorSession: FALLBACK_ACTOR,
|
|
3048
3343
|
transitionNote: `fallback-routed: ${originalDestination} → ${fallbackDestination} (${reason})`,
|
|
3049
3344
|
closureTarget: qitem.state === "in-progress" ? this.retainedClaimBlocker(qitemId) : undefined,
|
|
3050
3345
|
});
|
|
@@ -3160,12 +3455,13 @@ export class QueueRepository {
|
|
|
3160
3455
|
return null;
|
|
3161
3456
|
}
|
|
3162
3457
|
}
|
|
3163
|
-
|
|
3458
|
+
/** listed: the row's owner notifications and ledger, when a listing read them for all its rows. */
|
|
3459
|
+
waitingView(qitemId, listed) {
|
|
3164
3460
|
const view = readWaitingView(this.db, qitemId, this.activityReader);
|
|
3165
3461
|
if (view && ["pending", "in-progress"].includes(view.state)) {
|
|
3166
3462
|
// #514 — the unclaimed sweep skips a pending ask already posted to its human in the current
|
|
3167
3463
|
// episode (same predicate as runStuckSweep), so the view must not promise that sweep.
|
|
3168
|
-
const awaitingHuman = view.state === "pending" && this.humanNotificationPostedThisEpisode(qitemId);
|
|
3464
|
+
const awaitingHuman = view.state === "pending" && this.humanNotificationPostedThisEpisode(qitemId, listed);
|
|
3169
3465
|
if (awaitingHuman) {
|
|
3170
3466
|
view.nextBackstop = { owner: view.owner, mechanism: "none (posted to the human; awaiting their decision)", dueAt: null, intervalSeconds: null };
|
|
3171
3467
|
}
|
|
@@ -3186,14 +3482,7 @@ export class QueueRepository {
|
|
|
3186
3482
|
return undefined;
|
|
3187
3483
|
const target = row.closure_target;
|
|
3188
3484
|
try {
|
|
3189
|
-
|
|
3190
|
-
WHERE (s.qitem_id = ? OR s.destination_session = ?) AND s.qitem_id != ?
|
|
3191
|
-
AND (s.handed_off_from = ? OR EXISTS (
|
|
3192
|
-
SELECT 1 FROM json_each(s.chain_of_record) WHERE value = ?
|
|
3193
|
-
)) LIMIT 1`).get(target, target, row.qitem_id, row.qitem_id, row.qitem_id);
|
|
3194
|
-
// A linked row may have handed on to another owner. Its current state
|
|
3195
|
-
// does not establish whether later hops still hold the work.
|
|
3196
|
-
if (successor)
|
|
3485
|
+
if (hasLinkedSuccessor(this.db, row.qitem_id, target))
|
|
3197
3486
|
return undefined;
|
|
3198
3487
|
}
|
|
3199
3488
|
catch {
|
|
@@ -3207,15 +3496,15 @@ export class QueueRepository {
|
|
|
3207
3496
|
target,
|
|
3208
3497
|
reason: "no-live-local-successor",
|
|
3209
3498
|
message: foreignTarget
|
|
3210
|
-
? `Successor custody for '${target}' is unverified on this daemon: the successor is named on that host, and this daemon cannot read its custody. This closure records a handoff claim, not proof of transfer or pickup.`
|
|
3211
|
-
: `Successor custody for '${target}' is unverified on this daemon: no local row with this source's lineage was found. A successor may exist on another host. This closure records a handoff claim, not proof of transfer or pickup; reconcile the successor by ID.`,
|
|
3499
|
+
? `Successor custody for '${target}' is unverified on this daemon: the successor is named on that host, and this daemon cannot read its custody. This closure records a handoff claim, not proof of transfer or pickup. Use 'rig queue handoff' or 'handoff-and-complete': a local handoff is atomic, across hosts the successor is created first and the source closed after, and an uncertain result is reconciled by its exact id, since re-running the same handoff is idempotent.`
|
|
3500
|
+
: `Successor custody for '${target}' is unverified on this daemon: no local row with this source's lineage was found. A successor may exist on another host. This closure records a handoff claim, not proof of transfer or pickup; reconcile the successor by ID. Use 'rig queue handoff' or 'handoff-and-complete': a local handoff is atomic, across hosts the successor is created first and the source closed after, and an uncertain result is reconciled by its exact id, since re-running the same handoff is idempotent.`,
|
|
3212
3501
|
};
|
|
3213
3502
|
}
|
|
3214
|
-
rowToItem(row, includeWaiting = true) {
|
|
3503
|
+
rowToItem(row, includeWaiting = true, listed) {
|
|
3215
3504
|
// S04 — derive the pickup receipt at the ONE shared projection point (list/show/overdue
|
|
3216
3505
|
// all flow through here), so the park-vs-strand question is answered by the row face.
|
|
3217
3506
|
const meaningful = lastMeaningfulTransition(this.db, row.qitem_id);
|
|
3218
|
-
const waiting = includeWaiting ? this.waitingView(row.qitem_id) : null;
|
|
3507
|
+
const waiting = includeWaiting ? this.waitingView(row.qitem_id, listed) : null;
|
|
3219
3508
|
const activity = this.ownerActivity(row.destination_session);
|
|
3220
3509
|
const pickup = derivePickup({
|
|
3221
3510
|
state: row.state,
|
|
@@ -3272,6 +3561,20 @@ export class QueueRepository {
|
|
|
3272
3561
|
};
|
|
3273
3562
|
}
|
|
3274
3563
|
}
|
|
3564
|
+
function ledgerItem(row) {
|
|
3565
|
+
return {
|
|
3566
|
+
qitemId: row.qitem_id,
|
|
3567
|
+
state: row.state,
|
|
3568
|
+
blockedOn: row.blocked_on,
|
|
3569
|
+
destinationSession: row.destination_session,
|
|
3570
|
+
tsCreated: row.ts_created,
|
|
3571
|
+
lastNudgeResult: presentedNudgeResult(row.last_nudge_result, row.claimed_at),
|
|
3572
|
+
};
|
|
3573
|
+
}
|
|
3574
|
+
/** A notice sent to the owner, as opposed to the resolution notice a human's own answer writes. */
|
|
3575
|
+
function isOutboundOwnerNotice(t) {
|
|
3576
|
+
return t.ownerNotificationLevel != null && t.ownerNotificationKind != null && t.ownerNotificationKind !== "human-decision-resolved";
|
|
3577
|
+
}
|
|
3275
3578
|
function isQueueState(value) {
|
|
3276
3579
|
return typeof value === "string" && QUEUE_STATES.includes(value);
|
|
3277
3580
|
}
|