@openrig/cli 0.6.10 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- 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 +30 -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 +77 -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 +69 -16
- 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 +10 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +2 -2
- 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 +6 -1
- 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 +56 -10
- 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 +131 -37
- package/daemon/context-packs/reference/getting-started.md +39 -6
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +66 -5
- package/daemon/context-packs/reference/whats-new.md +169 -147
- 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 +2 -2
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +3 -3
- 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 +10 -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 +6 -1
- 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 +17 -15
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +200 -105
- 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 +73 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +230 -48
- 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 +4 -0
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +2 -0
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +4 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +5 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +67 -2
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +336 -13
- 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 +18 -1
- 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/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 +75 -15
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +352 -57
- 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/103_session_stop_intent.d.ts +4 -0
- package/daemon/dist/db/migrations/103_session_stop_intent.d.ts.map +1 -0
- package/daemon/dist/db/migrations/103_session_stop_intent.js +9 -0
- package/daemon/dist/db/migrations/103_session_stop_intent.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/domain/active-occupant.d.ts +14 -0
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +17 -0
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- 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-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 +26 -0
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -0
- package/daemon/dist/domain/claude-core-plugin-env.js +86 -0
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts +13 -6
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +58 -5
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +3 -0
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.js +1 -1
- package/daemon/dist/domain/codex-network-default.js.map +1 -1
- package/daemon/dist/domain/codex-pane-patterns.d.ts +2 -0
- package/daemon/dist/domain/codex-pane-patterns.d.ts.map +1 -0
- package/daemon/dist/domain/codex-pane-patterns.js +5 -0
- package/daemon/dist/domain/codex-pane-patterns.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 +59 -23
- 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/cwd-resolution.d.ts +8 -0
- package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
- package/daemon/dist/domain/cwd-resolution.js +24 -3
- package/daemon/dist/domain/cwd-resolution.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/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.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-recovery.js +4 -3
- 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 +99 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +325 -7
- 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/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-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 +133 -20
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.d.ts +9 -2
- package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.js +24 -2
- package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
- 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 +17 -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 +41 -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 +63 -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 +130 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +42 -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 +160 -5
- 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 +54 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +181 -29
- 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 +43 -6
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +41 -16
- 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 +62 -3
- 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/pane-cutover.d.ts +27 -0
- package/daemon/dist/domain/pane-cutover.d.ts.map +1 -0
- package/daemon/dist/domain/pane-cutover.js +37 -0
- package/daemon/dist/domain/pane-cutover.js.map +1 -0
- package/daemon/dist/domain/parent-session-env.d.ts +8 -0
- package/daemon/dist/domain/parent-session-env.d.ts.map +1 -0
- package/daemon/dist/domain/parent-session-env.js +37 -0
- package/daemon/dist/domain/parent-session-env.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/policies/parked-owner-consumer.d.ts +11 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +81 -11
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +2 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +6 -3
- 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/proof/judgments.d.ts +10 -5
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +57 -20
- 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 +68 -0
- package/daemon/dist/domain/provider/claude-usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-usage-windows.js +260 -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-limit-banner.d.ts +2 -2
- package/daemon/dist/domain/provider/codex-limit-banner.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-limit-banner.js +56 -9
- package/daemon/dist/domain/provider/codex-limit-banner.js.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-reader.d.ts +33 -0
- package/daemon/dist/domain/provider/codex-usage-reader.d.ts.map +1 -0
- package/daemon/dist/domain/provider/codex-usage-reader.js +117 -0
- package/daemon/dist/domain/provider/codex-usage-reader.js.map +1 -0
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts +39 -0
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/codex-usage-windows.js +101 -0
- package/daemon/dist/domain/provider/codex-usage-windows.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 +15 -0
- package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +45 -1
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +7 -0
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +133 -0
- 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 +563 -0
- package/daemon/dist/domain/provider/usage-across-hosts.js.map +1 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts +88 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/usage-windows.js +189 -0
- package/daemon/dist/domain/provider/usage-windows.js.map +1 -0
- package/daemon/dist/domain/ps-projection.d.ts +5 -2
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +27 -25
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- 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 +91 -14
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +347 -89
- 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 +29 -27
- 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 +8 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +15 -5
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +4 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +111 -18
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts +4 -0
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +35 -20
- 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 +109 -21
- 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 +18 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +52 -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 +28 -5
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +25 -11
- 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 +24 -2
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +12 -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 +4 -2
- package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.js +29 -14
- 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 +114 -7
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- 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 +115 -0
- package/daemon/dist/domain/seat-effort.d.ts.map +1 -0
- package/daemon/dist/domain/seat-effort.js +233 -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 +234 -5
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +651 -95
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +303 -0
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -0
- package/daemon/dist/domain/seat-restart-in-place.js +914 -0
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -0
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +7 -3
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +50 -15
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/session-fingerprinter.d.ts.map +1 -1
- package/daemon/dist/domain/session-fingerprinter.js +9 -5
- package/daemon/dist/domain/session-fingerprinter.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +16 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +35 -3
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +141 -4
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +1496 -139
- 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 +33 -3
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +220 -61
- 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 +10 -8
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +11 -33
- 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 +82 -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 +67 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/wake-resolver.js +2 -2
- package/daemon/dist/domain/wake-resolver.js.map +1 -1
- 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 +32 -4
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +1 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +31 -2
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +4 -1
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +25 -19
- package/daemon/dist/domain/whoami-service.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 +18 -4
- 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 +4 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +23 -8
- 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 +16 -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/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/chat.d.ts.map +1 -1
- package/daemon/dist/routes/chat.js +23 -2
- package/daemon/dist/routes/chat.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/proof.d.ts.map +1 -1
- package/daemon/dist/routes/proof.js +99 -10
- package/daemon/dist/routes/proof.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 +204 -1
- 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 +62 -9
- package/daemon/dist/routes/queue.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/rigs.js +5 -3
- package/daemon/dist/routes/rigs.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/scopes.d.ts.map +1 -1
- package/daemon/dist/routes/scopes.js +5 -3
- package/daemon/dist/routes/scopes.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +95 -12
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +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 +13 -2
- 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.map +1 -1
- package/daemon/dist/server.js +4 -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 +150 -54
- 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 +4 -2
- package/daemon/docs/reference/agent-startup-guide.md +114 -6
- package/daemon/docs/reference/claude-status-line.md +69 -0
- package/daemon/docs/reference/getting-started.md +39 -6
- package/daemon/docs/reference/keeping-a-watch.md +253 -0
- package/daemon/docs/reference/project-workspace.md +70 -1
- package/daemon/docs/reference/publishing-a-rig-bundle.md +6 -1
- package/daemon/docs/reference/refocus-channel.md +41 -5
- package/daemon/docs/reference/rig-bundle.md +26 -2
- package/daemon/docs/reference/rig-spec.md +66 -5
- 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 +50 -2
- package/daemon/docs/reference/seat-delivery.md +127 -0
- package/daemon/docs/reference/slack-app-setup.md +147 -17
- package/daemon/docs/reference/topology-naming.md +9 -0
- package/daemon/docs/reference/whats-new.md +169 -147
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +2 -2
- 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 +15 -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 +8 -0
- 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/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +7 -0
- package/dist/commands/daemon.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/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/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +11 -5
- package/dist/commands/proof.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 +360 -1
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +15 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +53 -10
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +15 -5
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +172 -47
- package/dist/commands/queue.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/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +103 -44
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +290 -28
- 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 +9 -4
- 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 +81 -6
- 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 +68 -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 +107 -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 +20 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +92 -0
- 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/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/mission-composition.d.ts +5 -1
- package/dist/lib/scope/mission-composition.d.ts.map +1 -1
- package/dist/lib/scope/mission-composition.js +61 -1
- package/dist/lib/scope/mission-composition.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +10 -1
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +54 -5
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/slice-claims.d.ts +8 -0
- package/dist/lib/scope/slice-claims.d.ts.map +1 -0
- package/dist/lib/scope/slice-claims.js +88 -0
- package/dist/lib/scope/slice-claims.js.map +1 -0
- 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 +113 -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/queue-receipt.d.ts +41 -0
- package/dist/queue-receipt.d.ts.map +1 -0
- package/dist/queue-receipt.js +272 -0
- package/dist/queue-receipt.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/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 +7 -0
- 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 +43 -5
- 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/pulse-model.d.ts +1 -0
- package/tui/dist/pulse/pulse-model.d.ts.map +1 -1
- package/tui/dist/pulse/pulse-model.js +7 -3
- package/tui/dist/pulse/pulse-model.js.map +1 -1
- package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
- package/tui/dist/pulse/render-pulse.js +10 -2
- 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 +36 -12
- 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.map +1 -1
- package/tui/dist/terminals/open-window.js +2 -1
- package/tui/dist/terminals/open-window.js.map +1 -1
- package/tui/dist/types.d.ts +12 -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 +39 -0
- package/tui/dist/usage/usage-model.d.ts.map +1 -0
- package/tui/dist/usage/usage-model.js +161 -0
- package/tui/dist/usage/usage-model.js.map +1 -0
- package/ui/dist/assets/{index-D5n8EwkG.js → index-Cfbtfd9G.js} +159 -159
- 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). */
|
|
@@ -185,6 +187,41 @@ export function deriveCrossHostSuccessorId(sourceQitemId, destinationSession, ho
|
|
|
185
187
|
.slice(0, 16);
|
|
186
188
|
return `qitem-xh-${digest}`;
|
|
187
189
|
}
|
|
190
|
+
/** The retained next owner must describe this closure, not a handoff before a reopen. */
|
|
191
|
+
export function matchesRecordedHandoffTarget(qitemId, handedOffTo, closureTarget) {
|
|
192
|
+
if (!handedOffTo || !closureTarget)
|
|
193
|
+
return false;
|
|
194
|
+
if (closureTarget === handedOffTo)
|
|
195
|
+
return true;
|
|
196
|
+
// Cross-host re-drives preserve the pre-convention member@rig@host target.
|
|
197
|
+
const legacy = /^(.+)@([A-Za-z0-9][A-Za-z0-9._-]*)$/.exec(closureTarget);
|
|
198
|
+
if (legacy?.[1] === handedOffTo)
|
|
199
|
+
return true;
|
|
200
|
+
const foreign = /^(qitem-[^@]+)@([^@]+)$/.exec(closureTarget);
|
|
201
|
+
return foreign !== null && foreign[1] === deriveCrossHostSuccessorId(qitemId, handedOffTo, foreign[2]);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Shared read-only lineage helper for handoff advisory and stuck sweep.
|
|
205
|
+
* Checks whether a local successor item exists matching target (by qitem_id or destination_session)
|
|
206
|
+
* linked to sourceQitemId (via handed_off_from or chain_of_record membership).
|
|
207
|
+
*
|
|
208
|
+
* Excludes source row itself (s.qitem_id != sourceQitemId). Guards chain_of_record with json_valid.
|
|
209
|
+
* Throws on database/query errors so callers can handle lookup failures with their own policies.
|
|
210
|
+
*/
|
|
211
|
+
export function hasLinkedSuccessor(db, sourceQitemId, target) {
|
|
212
|
+
const successor = db
|
|
213
|
+
.prepare(`SELECT 1 FROM queue_items s
|
|
214
|
+
WHERE (s.qitem_id = ? OR s.destination_session = ?) AND s.qitem_id != ?
|
|
215
|
+
AND (s.handed_off_from = ? OR (
|
|
216
|
+
s.chain_of_record IS NOT NULL
|
|
217
|
+
AND json_valid(s.chain_of_record)
|
|
218
|
+
AND EXISTS (
|
|
219
|
+
SELECT 1 FROM json_each(s.chain_of_record) WHERE value = ?
|
|
220
|
+
)
|
|
221
|
+
)) LIMIT 1`)
|
|
222
|
+
.get(target, target, sourceQitemId, sourceQitemId, sourceQitemId);
|
|
223
|
+
return Boolean(successor);
|
|
224
|
+
}
|
|
188
225
|
/** PL-007 — defensive column probe. Older test fixtures bypass the
|
|
189
226
|
* canonical migration list, so target_repo may be absent. Mirrors
|
|
190
227
|
* the `hasNodeColumn` pattern in rig-repository.ts. */
|
|
@@ -227,7 +264,12 @@ function compactRow(item) {
|
|
|
227
264
|
delete row[field];
|
|
228
265
|
return row;
|
|
229
266
|
}
|
|
230
|
-
const
|
|
267
|
+
const COMPACT_QUEUE_COLUMN_NAMES = [
|
|
268
|
+
"qitem_id", "ts_created", "ts_updated", "source_session", "destination_session", "state", "priority", "tier", "tags",
|
|
269
|
+
"blocked_on", "handed_off_to", "handed_off_from", "expires_at", "closure_reason", "closure_target", "closure_required_at",
|
|
270
|
+
"claimed_at", "last_nudge_attempt", "last_nudge_result", "last_heartbeat", "resolution", "target_repo",
|
|
271
|
+
];
|
|
272
|
+
const COMPACT_QUEUE_COLUMNS = COMPACT_QUEUE_COLUMN_NAMES.join(", ");
|
|
231
273
|
export function stampSelfHostSuffix(session) {
|
|
232
274
|
if (session === undefined)
|
|
233
275
|
return undefined;
|
|
@@ -276,6 +318,9 @@ export function destinationRigTeaching(session) {
|
|
|
276
318
|
* gateway resolver (how to register + "not an agent seat"). Loads the registry only for
|
|
277
319
|
* the (rare) @external refusal path. Undefined for non-@external / registered / scheme.
|
|
278
320
|
*/
|
|
321
|
+
/** Refusal teachings issued because nobody is registered yet (the load result's `noHumans`), so the refusal's
|
|
322
|
+
* wording can say so. Kept off the teaching object itself, whose fields are unchanged. */
|
|
323
|
+
const NOBODY_REGISTERED_TEACHINGS = new WeakSet();
|
|
279
324
|
export function externalAdmissionTeaching(session, loadRegistry = loadHumanRegistry) {
|
|
280
325
|
const parsed = parseSessionName(session);
|
|
281
326
|
if (parsed.kind !== "external")
|
|
@@ -283,6 +328,18 @@ export function externalAdmissionTeaching(session, loadRegistry = loadHumanRegis
|
|
|
283
328
|
if (resolveExternal(parsed.local, []).kind === "scheme")
|
|
284
329
|
return undefined;
|
|
285
330
|
const reg = loadRegistry();
|
|
331
|
+
if (!reg.ok && reg.noHumans) {
|
|
332
|
+
// Nobody registered yet: not a broken registry. Same fields as below; the hint names the registration verb.
|
|
333
|
+
const teaching = {
|
|
334
|
+
externalDomain: parsed.domain,
|
|
335
|
+
registryLoadError: true,
|
|
336
|
+
registryError: reg.error,
|
|
337
|
+
hint: `human registry admission is unavailable because no human is registered yet: ${reg.error}. ` +
|
|
338
|
+
"Register the person with rig gateway human add; do not downgrade the destination to an agent seat.",
|
|
339
|
+
};
|
|
340
|
+
NOBODY_REGISTERED_TEACHINGS.add(teaching);
|
|
341
|
+
return teaching;
|
|
342
|
+
}
|
|
286
343
|
if (!reg.ok) {
|
|
287
344
|
return {
|
|
288
345
|
externalDomain: parsed.domain,
|
|
@@ -307,7 +364,9 @@ export function destinationRefusalTeaching(session, loadRegistry = loadHumanRegi
|
|
|
307
364
|
function destinationValidationError(field, session, loadRegistry) {
|
|
308
365
|
const teaching = destinationRefusalTeaching(session, loadRegistry);
|
|
309
366
|
if (teaching?.registryLoadError === true) {
|
|
310
|
-
return new QueueRepositoryError("human_registry_unavailable",
|
|
367
|
+
return new QueueRepositoryError("human_registry_unavailable", NOBODY_REGISTERED_TEACHINGS.has(teaching)
|
|
368
|
+
? `${field} ${session} cannot be admitted because no human is registered yet: ${String(teaching.registryError)}`
|
|
369
|
+
: `${field} ${session} cannot be admitted because the human registry failed to load: ${String(teaching.registryError)}`, teaching);
|
|
311
370
|
}
|
|
312
371
|
return new QueueRepositoryError("unknown_destination_rig", `${field} ${session} references an unknown rig`, teaching);
|
|
313
372
|
}
|
|
@@ -372,7 +431,8 @@ export class QueueRepository {
|
|
|
372
431
|
this.wakeRepo = new QueueWakeRepository(db);
|
|
373
432
|
this.validateRig = opts?.validateRig ?? (() => true);
|
|
374
433
|
this.destinationAdvisory = opts?.destinationAdvisory ?? (() => null);
|
|
375
|
-
|
|
434
|
+
if (opts?.transport)
|
|
435
|
+
this.attachTransport(opts.transport);
|
|
376
436
|
this.workflowFrontierPredicate = opts?.workflowFrontierPredicate;
|
|
377
437
|
this.resolveOccupantGeneration = opts?.resolveOccupantGeneration;
|
|
378
438
|
this.loadHumanRegistryFn = opts?.loadHumanRegistry ?? (() => loadHumanRegistry());
|
|
@@ -436,6 +496,39 @@ export class QueueRepository {
|
|
|
436
496
|
*/
|
|
437
497
|
attachTransport(transport) {
|
|
438
498
|
this.transport = transport;
|
|
499
|
+
transport.configureGuardedWakes?.(entries => entries.every(entry => {
|
|
500
|
+
const row = entry.auditPointer ? this.getById(entry.auditPointer) : null;
|
|
501
|
+
if (!row || row.destinationSession !== entry.destinationSession)
|
|
502
|
+
return false;
|
|
503
|
+
return entry.outboxId.startsWith(WAKE_INTENT_PREFIX) ? this.currentWakeIntent(entry) : isBlockerLive(row.state);
|
|
504
|
+
}));
|
|
505
|
+
}
|
|
506
|
+
currentWakeIntent(entry) {
|
|
507
|
+
const row = entry.auditPointer ? this.db.prepare("SELECT state FROM queue_items WHERE qitem_id=?").get(entry.auditPointer) : undefined;
|
|
508
|
+
if (row?.state !== "pending")
|
|
509
|
+
return false;
|
|
510
|
+
const prefix = `${WAKE_INTENT_PREFIX}blocker-`;
|
|
511
|
+
if (!entry.outboxId.startsWith(prefix))
|
|
512
|
+
return true;
|
|
513
|
+
const expected = Number(entry.outboxId.slice(prefix.length));
|
|
514
|
+
const latest = this.db.prepare(`SELECT transition_id FROM (
|
|
515
|
+
SELECT transition_id, state, LAG(state) OVER (ORDER BY transition_id) AS previous_state
|
|
516
|
+
FROM queue_transitions WHERE qitem_id=?)
|
|
517
|
+
WHERE state='pending' AND previous_state IS NOT 'pending' ORDER BY transition_id DESC LIMIT 1`)
|
|
518
|
+
.get(entry.auditPointer);
|
|
519
|
+
return expected === latest?.transition_id;
|
|
520
|
+
}
|
|
521
|
+
classifyWakeResult(res) {
|
|
522
|
+
if (res.outcome === "retained")
|
|
523
|
+
return { classified: "retained", nudgeResult: res.reason?.startsWith("draft_")
|
|
524
|
+
? "retained:draft_aware" : "retained:typing_guard" };
|
|
525
|
+
if (res.ok)
|
|
526
|
+
return res.verified ? { classified: "verified", nudgeResult: "verified" } : { classified: "indeterminate", nudgeResult: "delivered-ack-pending" };
|
|
527
|
+
const detail = res.error ?? res.reason ?? "unknown";
|
|
528
|
+
if (res.delivery?.state === "indeterminate" || res.delivery?.state === "sending" || isWakeTimeoutSignal(res.reason) || isWakeTimeoutSignal(res.error)) {
|
|
529
|
+
return { classified: "indeterminate", nudgeResult: `indeterminate:${detail}` };
|
|
530
|
+
}
|
|
531
|
+
return { classified: "failed", nudgeResult: `failed:${detail}` };
|
|
439
532
|
}
|
|
440
533
|
/**
|
|
441
534
|
* W1 (transactional closure): attach the durable wake-intent store AFTER
|
|
@@ -528,6 +621,11 @@ export class QueueRepository {
|
|
|
528
621
|
if (target)
|
|
529
622
|
this.outbox.retain(record, target);
|
|
530
623
|
else {
|
|
624
|
+
// Draft-aware wakes remain pending until the transport owns their bounded
|
|
625
|
+
// retry. Manual retention is deliberately never drained.
|
|
626
|
+
const draftTarget = this.transport?.draftAwareTarget?.(input.toSession);
|
|
627
|
+
if (draftTarget)
|
|
628
|
+
this.outbox.assertRetentionCapacity(draftTarget.nodeId, frozenEnvelope);
|
|
531
629
|
this.outbox.record(record);
|
|
532
630
|
const binding = this.transport?.deliveryTarget?.(input.toSession);
|
|
533
631
|
if (binding)
|
|
@@ -618,18 +716,7 @@ export class QueueRepository {
|
|
|
618
716
|
// original frozen intent and audit pointer survives; only transport coalesces.
|
|
619
717
|
let superseded = false;
|
|
620
718
|
const actionable = (entry) => {
|
|
621
|
-
const
|
|
622
|
-
let current = row?.state === "pending";
|
|
623
|
-
const resumePrefix = `${WAKE_INTENT_PREFIX}blocker-`;
|
|
624
|
-
if (current && entry.outboxId.startsWith(resumePrefix)) {
|
|
625
|
-
const expected = Number(entry.outboxId.slice(resumePrefix.length));
|
|
626
|
-
const latest = this.db.prepare(`SELECT transition_id FROM (
|
|
627
|
-
SELECT transition_id, state, LAG(state) OVER (ORDER BY transition_id) AS previous_state
|
|
628
|
-
FROM queue_transitions WHERE qitem_id = ?)
|
|
629
|
-
WHERE state = 'pending' AND previous_state IS NOT 'pending' ORDER BY transition_id DESC LIMIT 1`)
|
|
630
|
-
.get(entry.auditPointer);
|
|
631
|
-
current = expected === latest?.transition_id;
|
|
632
|
-
}
|
|
719
|
+
const current = this.currentWakeIntent(entry);
|
|
633
720
|
if (!current) {
|
|
634
721
|
// Existing failed state means the requested old delivery was refused;
|
|
635
722
|
// the explicit tag distinguishes supersession from a transport attempt.
|
|
@@ -920,12 +1007,12 @@ export class QueueRepository {
|
|
|
920
1007
|
}
|
|
921
1008
|
const deliveryId = `guard-nudge-${qitemId}-${createHash("sha256").update(JSON.stringify([sourceSession, destinationSession, bodyOverride ?? null])).digest("hex")}`;
|
|
922
1009
|
const held = !committedOutboxIds ? this.outbox?.getById(deliveryId) : null;
|
|
923
|
-
if (held?.
|
|
1010
|
+
if (held?.guardBinding) {
|
|
924
1011
|
// Same logical nudge reuses its original frozen envelope, not a new timestamp.
|
|
925
1012
|
text = held.body;
|
|
926
1013
|
}
|
|
927
1014
|
try {
|
|
928
|
-
const res = await this.transport.send(destinationSession, text, { verify: true, stampISO, actorSession: sourceSession, committedOutboxIds, deliveryId: committedOutboxIds ? undefined : deliveryId, auditPointer: qitemId });
|
|
1015
|
+
const res = await this.transport.send(destinationSession, text, { verify: true, stampISO, actorSession: sourceSession, committedOutboxIds, deliveryId: committedOutboxIds ? undefined : deliveryId, auditPointer: qitemId, queueWake: true });
|
|
929
1016
|
// OPR.0.3.2.21.FR-4(c) — wording rename: the prior literal
|
|
930
1017
|
// "sent-unverified" read as a failure even in the common case
|
|
931
1018
|
// (delivery confirmed but the synchronous ack window expired,
|
|
@@ -933,22 +1020,11 @@ export class QueueRepository {
|
|
|
933
1020
|
// "delivered-ack-pending" reads as healthy. The old "verified"
|
|
934
1021
|
// case is unchanged for backward-compat with any tooling that
|
|
935
1022
|
// already consumed the positive literal.
|
|
936
|
-
if (res.outcome === "retained")
|
|
937
|
-
return { classified: "retained", nudgeResult: "retained:typing_guard" };
|
|
938
|
-
if (res.ok) {
|
|
939
|
-
return res.verified
|
|
940
|
-
? { classified: "verified", nudgeResult: "verified" }
|
|
941
|
-
: { classified: "indeterminate", nudgeResult: "delivered-ack-pending" };
|
|
942
|
-
}
|
|
943
1023
|
// MF6: a TIMEOUT is ambiguous — the send may have landed but the ack window
|
|
944
1024
|
// expired — so it records `indeterminate` (never silently delivered, never a
|
|
945
1025
|
// hard `failed`). A definite non-timeout failure (unreachable, unknown
|
|
946
1026
|
// session) stays `failed`.
|
|
947
|
-
|
|
948
|
-
if (isWakeTimeoutSignal(res.reason) || isWakeTimeoutSignal(res.error)) {
|
|
949
|
-
return { classified: "indeterminate", nudgeResult: `indeterminate:${detail}` };
|
|
950
|
-
}
|
|
951
|
-
return { classified: "failed", nudgeResult: `failed:${detail}` };
|
|
1027
|
+
return this.classifyWakeResult(res);
|
|
952
1028
|
}
|
|
953
1029
|
catch (err) {
|
|
954
1030
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -1556,6 +1632,7 @@ export class QueueRepository {
|
|
|
1556
1632
|
transitionNote: input.transitionNote ?? `cross-host handoff to ${input.toSession}`,
|
|
1557
1633
|
closureReason: "handed_off_to",
|
|
1558
1634
|
closureTarget: input.closureTarget,
|
|
1635
|
+
identityProvenance: input.identityProvenance ?? null,
|
|
1559
1636
|
});
|
|
1560
1637
|
// OPR.0.5.8.1 S1b — third member of the handoff family, same bypass.
|
|
1561
1638
|
this.retireParkGeneratedTimer(input.qitemId, `park_ended:${input.terminalState}`);
|
|
@@ -1577,7 +1654,7 @@ export class QueueRepository {
|
|
|
1577
1654
|
qitemId: input.qitemId,
|
|
1578
1655
|
terminalState: input.terminalState,
|
|
1579
1656
|
actorSession: input.fromSession,
|
|
1580
|
-
identityProvenance: null,
|
|
1657
|
+
identityProvenance: input.identityProvenance ?? null,
|
|
1581
1658
|
ts,
|
|
1582
1659
|
})) {
|
|
1583
1660
|
events.push(dependentEvent);
|
|
@@ -1814,11 +1891,12 @@ export class QueueRepository {
|
|
|
1814
1891
|
throw new QueueRepositoryError("qitem_not_found", `qitem ${input.qitemId} not found`);
|
|
1815
1892
|
}
|
|
1816
1893
|
const hasNote = typeof input.transitionNote === "string" && input.transitionNote.trim().length > 0;
|
|
1894
|
+
const hasValidSummary = typeof input.summary === "string" && input.summary.trim().length > 0;
|
|
1817
1895
|
const isGuardedTerminal = ["done", "canceled", "handed-off"].includes(qitem.state);
|
|
1818
1896
|
const isStatePreservingAppend = input.state === undefined || (isGuardedTerminal && input.state === qitem.state);
|
|
1819
1897
|
if (isStatePreservingAppend) {
|
|
1820
|
-
if (input.state === undefined && !hasNote) {
|
|
1821
|
-
throw new QueueRepositoryError("state_or_note_required", "queue update requires --state or a non-empty --
|
|
1898
|
+
if (input.state === undefined && !hasNote && !hasValidSummary) {
|
|
1899
|
+
throw new QueueRepositoryError("state_or_note_required", "queue update requires --state, a non-empty --note, or a non-empty --summary; nothing was written");
|
|
1822
1900
|
}
|
|
1823
1901
|
const disallowed = input.reopen === true
|
|
1824
1902
|
|| input.closureReason != null
|
|
@@ -1830,16 +1908,25 @@ export class QueueRepository {
|
|
|
1830
1908
|
|| input.wakeMaxSeconds != null
|
|
1831
1909
|
|| input.wakeProgressEvidence != null
|
|
1832
1910
|
|| input.wakeMessage != null
|
|
1833
|
-
|| input.
|
|
1834
|
-
|| input.
|
|
1911
|
+
|| input.evidenceRef != null
|
|
1912
|
+
|| (input.state !== undefined && input.summary != null)
|
|
1913
|
+
|| (input.summary != null && !hasValidSummary);
|
|
1835
1914
|
if (disallowed) {
|
|
1836
1915
|
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");
|
|
1837
1916
|
}
|
|
1917
|
+
if (hasValidSummary) {
|
|
1918
|
+
this.persistSummary(input.qitemId, input.summary);
|
|
1919
|
+
}
|
|
1920
|
+
const note = hasValidSummary
|
|
1921
|
+
? (hasNote
|
|
1922
|
+
? (input.transitionNote.includes("(summary updated)") ? input.transitionNote : `${input.transitionNote} (summary updated)`)
|
|
1923
|
+
: "summary updated")
|
|
1924
|
+
: input.transitionNote;
|
|
1838
1925
|
this.transitionLog.append({
|
|
1839
1926
|
qitemId: input.qitemId,
|
|
1840
1927
|
state: qitem.state,
|
|
1841
1928
|
actorSession: input.actorSession,
|
|
1842
|
-
transitionNote:
|
|
1929
|
+
transitionNote: note,
|
|
1843
1930
|
// A note-only append does not clear the claim's retained park gate.
|
|
1844
1931
|
// Carry its audit pointer so a later state write can end this chain.
|
|
1845
1932
|
closureTarget: qitem.state === "in-progress" ? this.retainedClaimBlocker(input.qitemId) : undefined,
|
|
@@ -1853,7 +1940,7 @@ export class QueueRepository {
|
|
|
1853
1940
|
closureReason: null,
|
|
1854
1941
|
closureTarget: null,
|
|
1855
1942
|
actorSession: input.actorSession,
|
|
1856
|
-
summary: qitem.summary ?? null,
|
|
1943
|
+
summary: hasValidSummary ? input.summary : (qitem.summary ?? null),
|
|
1857
1944
|
});
|
|
1858
1945
|
return { persistedEvent, persistedEvents: [persistedEvent] };
|
|
1859
1946
|
}
|
|
@@ -2089,6 +2176,15 @@ export class QueueRepository {
|
|
|
2089
2176
|
// NULL. The prior `COALESCE(?, blocked_on)` preserved the blocker on every non-blocked
|
|
2090
2177
|
// transition, leaving dead blockers that nothing audits (the root-cause strand).
|
|
2091
2178
|
const nextBlockedOn = input.state === "blocked" ? effectiveBlockedOn : null;
|
|
2179
|
+
// The outcome is used only as non-blank text on the update that closes an open row; on any other
|
|
2180
|
+
// update the field is ignored and the row answers as it would without it. It goes after what the row
|
|
2181
|
+
// already carries (a pod-fallback line, or an earlier close's outcome) on its own line, text as sent.
|
|
2182
|
+
const closingResolution = typeof input.resolution === "string" && input.resolution.trim().length > 0
|
|
2183
|
+
&& isBlockerLive(qitem.state) && !isBlockerLive(input.state)
|
|
2184
|
+
? input.resolution : null;
|
|
2185
|
+
const nextResolution = closingResolution === null
|
|
2186
|
+
? qitem.resolution
|
|
2187
|
+
: qitem.resolution ? `${qitem.resolution}\n${closingResolution}` : closingResolution;
|
|
2092
2188
|
const notification = this.classifyOwnerNotification({
|
|
2093
2189
|
action: "update",
|
|
2094
2190
|
destinationSession: qitem.destinationSession,
|
|
@@ -2105,9 +2201,10 @@ export class QueueRepository {
|
|
|
2105
2201
|
closure_reason = COALESCE(?, closure_reason),
|
|
2106
2202
|
closure_target = COALESCE(?, closure_target),
|
|
2107
2203
|
handed_off_to = COALESCE(?, handed_off_to),
|
|
2108
|
-
blocked_on =
|
|
2204
|
+
blocked_on = ?,
|
|
2205
|
+
resolution = ?
|
|
2109
2206
|
WHERE qitem_id = ?`)
|
|
2110
|
-
.run(input.state, ts, validation.closureReason, validation.closureTarget, input.handedOffTo ?? null, nextBlockedOn, input.qitemId);
|
|
2207
|
+
.run(input.state, ts, validation.closureReason, validation.closureTarget, input.handedOffTo ?? null, nextBlockedOn, nextResolution, input.qitemId);
|
|
2111
2208
|
// FR-6: park-time summary/evidence_ref are PERSISTED onto the existing
|
|
2112
2209
|
// item (not merely validated-then-dropped) — visible to the attention
|
|
2113
2210
|
// query and to Packet 2. Only the park path writes them.
|
|
@@ -2308,6 +2405,10 @@ export class QueueRepository {
|
|
|
2308
2405
|
getParkWakeStatus(qitemId) {
|
|
2309
2406
|
return this.wakeRepo.getStatus(qitemId);
|
|
2310
2407
|
}
|
|
2408
|
+
/** For parked diagnosis only (see QueueWakeRepository.servedByOwnRepeatingReminder). */
|
|
2409
|
+
parkWakeServedByOwnReminder(qitemId) {
|
|
2410
|
+
return this.wakeRepo.servedByOwnRepeatingReminder(qitemId);
|
|
2411
|
+
}
|
|
2311
2412
|
/** Park timers a seat swap keeps: each is still its blocked row's current wake and still targets the
|
|
2312
2413
|
* row's owner (see QueueWakeRepository.currentParkTimerIds). */
|
|
2313
2414
|
currentParkTimerIds() {
|
|
@@ -2333,6 +2434,18 @@ export class QueueRepository {
|
|
|
2333
2434
|
return wake ? { ...transition, wake } : transition;
|
|
2334
2435
|
});
|
|
2335
2436
|
}
|
|
2437
|
+
/** The transition that closed a row: the first of the trailing run in its current closed state.
|
|
2438
|
+
* Later notes and delivery receipts on a closed row repeat that state, so the latest transition
|
|
2439
|
+
* is not the close. Null while the row is still active (pending, in-progress, blocked). */
|
|
2440
|
+
closingTransition(qitemId, currentState) {
|
|
2441
|
+
if (isBlockerLive(currentState))
|
|
2442
|
+
return null;
|
|
2443
|
+
const transitions = this.transitionLog.listForQitem(qitemId);
|
|
2444
|
+
let closing = null;
|
|
2445
|
+
for (let i = transitions.length - 1; i >= 0 && transitions[i].state === currentState; i--)
|
|
2446
|
+
closing = transitions[i];
|
|
2447
|
+
return closing;
|
|
2448
|
+
}
|
|
2336
2449
|
/** Read-only scope-aware RECENT projection. Normalization and its hard cap
|
|
2337
2450
|
* live with the append-only transition log; the repository owns the public
|
|
2338
2451
|
* queue-domain door. */
|
|
@@ -2391,8 +2504,20 @@ export class QueueRepository {
|
|
|
2391
2504
|
if (deliveryStatus === "retained")
|
|
2392
2505
|
return firedEvents;
|
|
2393
2506
|
if (usageLimitBlockers.length === 0) {
|
|
2394
|
-
|
|
2395
|
-
|
|
2507
|
+
const jobsRepo = this.watchdogJobsRepo ?? new WatchdogJobsRepository(this.db);
|
|
2508
|
+
if (parkGeneratedTimer && !backOffQueueWait(jobsRepo, jobId, deliveryStatus)) {
|
|
2509
|
+
jobsRepo.markTerminal(jobId, "park_timer_fired_once");
|
|
2510
|
+
}
|
|
2511
|
+
else if (!parkGeneratedTimer) {
|
|
2512
|
+
// A one-shot generated job whose original park has ended and whose last attachment this attempt just
|
|
2513
|
+
// consumed is retired now, not at its next check: while it stayed active, --wake-watchdog could attach
|
|
2514
|
+
// another task to it. Repeating (queue-wait) jobs keep their own lifecycle.
|
|
2515
|
+
const job = jobsRepo.getById(jobId);
|
|
2516
|
+
if (job && !isQueueWait(job.specYaml)) {
|
|
2517
|
+
const reason = this.resolveWatchdogPreDeliveryTerminalReason(jobId);
|
|
2518
|
+
if (reason)
|
|
2519
|
+
jobsRepo.markTerminal(jobId, reason);
|
|
2520
|
+
}
|
|
2396
2521
|
}
|
|
2397
2522
|
return firedEvents;
|
|
2398
2523
|
}
|
|
@@ -2519,23 +2644,46 @@ export class QueueRepository {
|
|
|
2519
2644
|
}
|
|
2520
2645
|
/** #96 — whether some update recorded this Slack root as the thread it posts into. Such a
|
|
2521
2646
|
* root is shared: its owner's next decision must not reuse it (see slack-subsystem). */
|
|
2522
|
-
isReplyToThread(threadTs) {
|
|
2647
|
+
isReplyToThread(threadTs, where) {
|
|
2523
2648
|
if (!this.hasQueueTransitionsTable)
|
|
2524
2649
|
return false;
|
|
2525
2650
|
// Same trust rule as replyToChoiceFor: a pre-provenance schema reads every row as null.
|
|
2526
2651
|
const provenance = this.hasTransitionProvenanceColumn ? " AND identity_provenance IS NULL" : "";
|
|
2652
|
+
const note = formatReplyToChoice({ kind: "thread", threadTs });
|
|
2653
|
+
// A root is its channel's: with `where`, only a choice naming that channel counts. One naming no
|
|
2654
|
+
// channel is judged by the caller from the rows that made it (unnamedReplyToChoiceRows).
|
|
2655
|
+
if (where) {
|
|
2656
|
+
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;
|
|
2657
|
+
}
|
|
2527
2658
|
// #192: with a channel map the note carries a ` channel=<id>` suffix. Match the exact note, or
|
|
2528
2659
|
// the exact note followed by that suffix; a prefix compare, not LIKE (the note itself contains
|
|
2529
2660
|
// `_`), and the trailing space keeps thread 1.1 from matching 1.10.
|
|
2530
|
-
const note = formatReplyToChoice({ kind: "thread", threadTs });
|
|
2531
2661
|
const withChannel = `${note} channel=`;
|
|
2532
2662
|
return this.db.prepare(`SELECT 1 FROM queue_transitions
|
|
2533
2663
|
WHERE (transition_note = ? OR substr(transition_note, 1, ?) = ?) AND actor_session = ?${provenance} LIMIT 1`).get(note, withChannel.length, withChannel, REPLY_TO_CHOICE_ACTOR) !== undefined;
|
|
2534
2664
|
}
|
|
2665
|
+
/** #96 — the rows whose recorded choice threads into this ts without naming a channel. Such a choice
|
|
2666
|
+
* was made for the default channel of its day, which may have changed since, so the note alone
|
|
2667
|
+
* can't say which root it took; the caller checks where each row's post landed (its recorded parts). */
|
|
2668
|
+
unnamedReplyToChoiceRows(threadTs) {
|
|
2669
|
+
if (!this.hasQueueTransitionsTable)
|
|
2670
|
+
return [];
|
|
2671
|
+
const provenance = this.hasTransitionProvenanceColumn ? " AND identity_provenance IS NULL" : "";
|
|
2672
|
+
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);
|
|
2673
|
+
return rows.map((r) => r.qitem_id);
|
|
2674
|
+
}
|
|
2535
2675
|
replyToFallbackFor(qitemId) {
|
|
2536
2676
|
const choice = this.replyToChoiceFor(qitemId);
|
|
2537
2677
|
return choice?.kind === "fallback" ? describeReplyToFallback(choice) : null;
|
|
2538
2678
|
}
|
|
2679
|
+
/** The parked query's obligation face: open rows to one destination, newest first, without the per-row
|
|
2680
|
+
* projections list() derives (pickup, waiting view, delivery ledger), which this read never uses. */
|
|
2681
|
+
listOpenObligations(destinationSession, limit) {
|
|
2682
|
+
const rows = this.db.prepare(`SELECT qitem_id, state${this.hasSummaryColumn ? ", summary" : ""} FROM queue_items
|
|
2683
|
+
WHERE destination_session = ? AND state IN ('pending', 'in-progress', 'blocked')
|
|
2684
|
+
ORDER BY ts_created DESC LIMIT ?`).all(destinationSession, limit);
|
|
2685
|
+
return rows.map((r) => ({ qitemId: r.qitem_id, state: r.state, summary: r.summary ?? null }));
|
|
2686
|
+
}
|
|
2539
2687
|
list(opts) {
|
|
2540
2688
|
const limit = opts?.limit ?? 100;
|
|
2541
2689
|
const conditions = [];
|
|
@@ -2584,9 +2732,11 @@ export class QueueRepository {
|
|
|
2584
2732
|
const rows = this.db
|
|
2585
2733
|
.prepare(`SELECT ${columns} FROM queue_items ${where} ORDER BY ${orderBy} LIMIT ?`)
|
|
2586
2734
|
.all(...params);
|
|
2735
|
+
const owners = this.transitionLog.ownerNotificationsForQitems(rows.map((row) => row.qitem_id));
|
|
2736
|
+
const ledgers = this.deliveryOutcomesFor(rows, owners);
|
|
2587
2737
|
const items = rows.map((r) => {
|
|
2588
|
-
const
|
|
2589
|
-
const
|
|
2738
|
+
const ledger = ledgers.get(r.qitem_id);
|
|
2739
|
+
const item = this.rowToItem(r, !opts?.compact, { owners: owners.get(r.qitem_id) ?? [], ledger: ledger ?? null });
|
|
2590
2740
|
return {
|
|
2591
2741
|
...item,
|
|
2592
2742
|
deliveryOutcome: ledger?.outcome ?? null,
|
|
@@ -2882,9 +3032,10 @@ export class QueueRepository {
|
|
|
2882
3032
|
}
|
|
2883
3033
|
}
|
|
2884
3034
|
/** Null means legacy/no OWNER history; inactive means OWNER history exists
|
|
2885
|
-
* but the row no longer projects a current human-notification episode.
|
|
2886
|
-
|
|
2887
|
-
|
|
3035
|
+
* but the row no longer projects a current human-notification episode.
|
|
3036
|
+
* owners: the row's owner notifications, newest first. */
|
|
3037
|
+
currentDeliveryEpisode(item, owners, loadRegistry) {
|
|
3038
|
+
let transition = owners[0];
|
|
2888
3039
|
if (!transition)
|
|
2889
3040
|
return null;
|
|
2890
3041
|
// A human-decision-resolved notice written BY the transition that closed the row (a human's direct reply closing
|
|
@@ -2894,15 +3045,13 @@ export class QueueRepository {
|
|
|
2894
3045
|
// stayed active is a real delivery and keeps its outcome after an agent later closes the row.
|
|
2895
3046
|
let resolvedBy = null;
|
|
2896
3047
|
if (transition.ownerNotificationKind === "human-decision-resolved" && !["pending", "in-progress", "blocked"].includes(transition.state)) {
|
|
2897
|
-
const outbound =
|
|
2898
|
-
.filter((t) => t.ownerNotificationLevel != null && t.ownerNotificationKind != null && t.ownerNotificationKind !== "human-decision-resolved")
|
|
2899
|
-
.sort((a, b) => b.transitionId - a.transitionId)[0];
|
|
3048
|
+
const outbound = owners.find(isOutboundOwnerNotice);
|
|
2900
3049
|
if (!outbound)
|
|
2901
3050
|
return "inactive";
|
|
2902
3051
|
resolvedBy = transition.actorSession;
|
|
2903
3052
|
transition = outbound;
|
|
2904
3053
|
}
|
|
2905
|
-
const registry =
|
|
3054
|
+
const registry = loadRegistry();
|
|
2906
3055
|
if (!registry.ok)
|
|
2907
3056
|
return "inactive";
|
|
2908
3057
|
// After that fallback the recipient is the human who answered: the row may be an agent's that was parked on them
|
|
@@ -2930,13 +3079,14 @@ export class QueueRepository {
|
|
|
2930
3079
|
* to a registered human, aliases included) has a POSTED receipt. Legacy rows with no OWNER
|
|
2931
3080
|
* history, inactive episodes, never-posted and transport-failed all read false. Same derivation
|
|
2932
3081
|
* as deliveryOutcomeFor; it reads row fields, never the waiting view. */
|
|
2933
|
-
humanNotificationPostedThisEpisode(qitemId) {
|
|
3082
|
+
humanNotificationPostedThisEpisode(qitemId, listed) {
|
|
2934
3083
|
if (!this.hasQueueTransitionsTable)
|
|
2935
3084
|
return false;
|
|
2936
3085
|
// Only the ask's own notification binds a recipient: create writes it in state pending, to the destination of
|
|
2937
3086
|
// that moment. A park notice (its recipient is not retained), a resolution notice, or a later destination change
|
|
2938
3087
|
// (routeToFallback opens no new episode) cannot establish that the current destination received this ask.
|
|
2939
|
-
const
|
|
3088
|
+
const owners = listed?.owners ?? this.transitionLog.ownerNotificationsForQitems([qitemId]).get(qitemId) ?? [];
|
|
3089
|
+
const owner = owners[0];
|
|
2940
3090
|
if (!owner || owner.state !== "pending")
|
|
2941
3091
|
return false;
|
|
2942
3092
|
if (owner.ownerNotificationKind !== "human-required" && owner.ownerNotificationKind !== "human-update")
|
|
@@ -2945,10 +3095,11 @@ export class QueueRepository {
|
|
|
2945
3095
|
if (rerouted)
|
|
2946
3096
|
return false;
|
|
2947
3097
|
// The ledger's episode exists only when the destination resolves to a registered human (aliases included).
|
|
2948
|
-
const ledger = this.deliveryLedger(qitemId,
|
|
3098
|
+
const ledger = listed ? listed.ledger : this.deliveryLedger(qitemId, owners);
|
|
2949
3099
|
return ledger !== null && ledger.outcome === "posted" && ledger.episode?.notificationKey === `${qitemId}:${owner.transitionId}`;
|
|
2950
3100
|
}
|
|
2951
|
-
|
|
3101
|
+
/** owners: the row's owner notifications as ownerNotificationsForQitems gives them, when the caller read them. */
|
|
3102
|
+
deliveryLedger(qitemId, owners) {
|
|
2952
3103
|
// Some repository-only fixtures intentionally model the pre-transition
|
|
2953
3104
|
// schema. Delivery projection is additive there: absence means no verdict,
|
|
2954
3105
|
// never a list failure.
|
|
@@ -2958,26 +3109,65 @@ export class QueueRepository {
|
|
|
2958
3109
|
.get(qitemId);
|
|
2959
3110
|
if (!row)
|
|
2960
3111
|
return null;
|
|
2961
|
-
// The delivery episode uses row fields, not the waiting/backstop view.
|
|
2962
|
-
//
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
3112
|
+
// The delivery episode uses row fields, not the waiting/backstop view. Its receipts are read after it, as they
|
|
3113
|
+
// always were for a single row: a receipt committed while the human registry loads is then seen.
|
|
3114
|
+
return this.deliveryOutcomesFor([row], owners && new Map([[qitemId, owners]]), true).get(qitemId) ?? null;
|
|
3115
|
+
}
|
|
3116
|
+
receiptNotesStatement;
|
|
3117
|
+
/** The delivery ledger of each row, its reads batched: one read of the rows' owner notifications (unless the caller
|
|
3118
|
+
* read them already), one of their receipts, the human registry loaded once at most. A single row's
|
|
3119
|
+
* (deliveryOutcomeFor, show, the sweeps) is a batch of one. receiptsAfterEpisodes: read the receipts once the
|
|
3120
|
+
* episodes (and so the registry) are worked out, as a single row's ledger does; a listing reads them before. */
|
|
3121
|
+
deliveryOutcomesFor(rows, knownOwners, receiptsAfterEpisodes = false) {
|
|
3122
|
+
const ledgers = new Map();
|
|
3123
|
+
if (!this.hasQueueTransitionsTable || rows.length === 0)
|
|
3124
|
+
return ledgers;
|
|
3125
|
+
const qitemIds = rows.map((row) => row.qitem_id);
|
|
3126
|
+
const owners = knownOwners ?? this.transitionLog.ownerNotificationsForQitems(qitemIds);
|
|
3127
|
+
let notes = receiptsAfterEpisodes ? undefined : this.receiptNotesFor(qitemIds);
|
|
3128
|
+
let registry;
|
|
3129
|
+
const loadRegistry = () => (registry ??= this.loadHumanRegistryFn());
|
|
3130
|
+
const episodes = rows.map((row) => {
|
|
3131
|
+
const item = ledgerItem(row);
|
|
3132
|
+
return { item, episode: this.currentDeliveryEpisode(item, owners.get(row.qitem_id) ?? [], loadRegistry) };
|
|
3133
|
+
});
|
|
3134
|
+
notes ??= this.receiptNotesFor(qitemIds);
|
|
3135
|
+
for (const { item, episode } of episodes) {
|
|
3136
|
+
if (episode === "inactive")
|
|
3137
|
+
continue;
|
|
3138
|
+
const ledger = this.ledgerOf(item, episode, notes.get(item.qitemId) ?? []);
|
|
3139
|
+
if (ledger)
|
|
3140
|
+
ledgers.set(item.qitemId, ledger);
|
|
3141
|
+
}
|
|
3142
|
+
return ledgers;
|
|
3143
|
+
}
|
|
3144
|
+
/** The delivery receipt notes of these qitems, newest first, by qitem. */
|
|
3145
|
+
receiptNotesFor(qitemIds) {
|
|
3146
|
+
this.receiptNotesStatement ??= this.db.prepare(`SELECT qitem_id, transition_note FROM queue_transitions
|
|
3147
|
+
WHERE qitem_id IN (SELECT value FROM json_each(?)) AND (transition_note LIKE 'slack-owner-notification-posted %'
|
|
2970
3148
|
OR transition_note LIKE 'slack-owner-notification-transport-failed %')
|
|
2971
|
-
ORDER BY transition_id DESC`)
|
|
3149
|
+
ORDER BY transition_id DESC`);
|
|
3150
|
+
const notes = new Map();
|
|
3151
|
+
for (const row of this.receiptNotesStatement.all(JSON.stringify(qitemIds))) {
|
|
3152
|
+
const own = notes.get(row.qitem_id);
|
|
3153
|
+
if (own)
|
|
3154
|
+
own.push(row.transition_note);
|
|
3155
|
+
else
|
|
3156
|
+
notes.set(row.qitem_id, [row.transition_note]);
|
|
3157
|
+
}
|
|
3158
|
+
return notes;
|
|
3159
|
+
}
|
|
3160
|
+
/** The ledger of one row's current episode, from its receipt notes (newest first). */
|
|
3161
|
+
ledgerOf(item, episode, notes) {
|
|
2972
3162
|
const currentNotes = episode
|
|
2973
|
-
? notes.filter((note) => note.
|
|
3163
|
+
? notes.filter((note) => note.split(/\s+/).includes(`notification_key=${episode.notificationKey}`))
|
|
2974
3164
|
: notes;
|
|
2975
|
-
const posted = currentNotes.find((note) => note.
|
|
3165
|
+
const posted = currentNotes.find((note) => note.startsWith("slack-owner-notification-posted "));
|
|
2976
3166
|
if (posted)
|
|
2977
|
-
return { outcome: "posted", detail: posted
|
|
2978
|
-
const failed = currentNotes.find((note) => note.
|
|
3167
|
+
return { outcome: "posted", detail: posted, episode };
|
|
3168
|
+
const failed = currentNotes.find((note) => note.startsWith("slack-owner-notification-transport-failed "));
|
|
2979
3169
|
if (failed)
|
|
2980
|
-
return { outcome: "transport-failed", detail: failed
|
|
3170
|
+
return { outcome: "transport-failed", detail: failed, episode };
|
|
2981
3171
|
const startedAt = episode?.startedAt ?? item.tsCreated;
|
|
2982
3172
|
const gatewayRouted = episode !== null || item.lastNudgeResult?.startsWith("gateway-owned") === true;
|
|
2983
3173
|
if (gatewayRouted) {
|
|
@@ -3000,6 +3190,56 @@ export class QueueRepository {
|
|
|
3000
3190
|
WHERE qitem_id = ?`)
|
|
3001
3191
|
.run(ts, result, qitemId);
|
|
3002
3192
|
}
|
|
3193
|
+
/**
|
|
3194
|
+
* Where, in the row's `resolution`, the fallback line `routeToFallback` last wrote begins; null when it cannot be
|
|
3195
|
+
* told, and the field is then left whole. The row's own transitions say what that reroute printed: a newest-first
|
|
3196
|
+
* seek by row on the live log, then on the archive the retention sweep moves an aged closed row's transitions to,
|
|
3197
|
+
* 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
|
|
3198
|
+
* `fallback: <reason>`, built from the same printed reason, so it starts at a line start `i` of the field with
|
|
3199
|
+
* `fallback: ` there and the rest of the field, `r`, satisfying note ends with ` (r)`. Neither the destinations nor
|
|
3200
|
+
* the chain are consulted, so how a value was stored cannot matter. At most one `i` can satisfy it when the field
|
|
3201
|
+
* ends with that line: a longer `r` would have to be preceded in the note by ` (`, and a shorter one starts inside the
|
|
3202
|
+
* reason, right after a newline, which is not ` (`.
|
|
3203
|
+
*
|
|
3204
|
+
* A close that came after that reroute from an open state may have appended an outcome behind the line, and an
|
|
3205
|
+
* outcome can read like the line, so then only a field that is nothing but the line (`i` = 0, which an appended
|
|
3206
|
+
* outcome would lengthen) is accepted.
|
|
3207
|
+
*/
|
|
3208
|
+
fallbackLineStart(qitemId, resolution) {
|
|
3209
|
+
let note = null;
|
|
3210
|
+
let newerClosed = false;
|
|
3211
|
+
let outcomeMayFollow = false;
|
|
3212
|
+
for (const table of ["queue_transitions", ...(detectTable(this.db, "queue_transitions_archive") ? ["queue_transitions_archive"] : [])]) {
|
|
3213
|
+
// The reroute's transition is written in-process, so it has no identity provenance; the update route records one
|
|
3214
|
+
// on every write and takes the actor and note from the request, so a transition it wrote can carry the same
|
|
3215
|
+
// actor and note without being a reroute (the trust rule replyToChoiceFor uses). A schema without the column
|
|
3216
|
+
// predates the update route's provenance and reads every row as unstamped.
|
|
3217
|
+
const stamped = this.db.prepare(`PRAGMA table_info(${table})`).all().some((c) => c.name === "identity_provenance");
|
|
3218
|
+
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`);
|
|
3219
|
+
for (const row of newestFirst.iterate(qitemId)) {
|
|
3220
|
+
if (newerClosed && isBlockerLive(row.state))
|
|
3221
|
+
outcomeMayFollow = true;
|
|
3222
|
+
if (row.identity_provenance === null && row.actor_session === FALLBACK_ACTOR && row.transition_note?.startsWith("fallback-routed: ")) {
|
|
3223
|
+
note = row.transition_note;
|
|
3224
|
+
break;
|
|
3225
|
+
}
|
|
3226
|
+
newerClosed = !isBlockerLive(row.state);
|
|
3227
|
+
}
|
|
3228
|
+
if (note !== null)
|
|
3229
|
+
break;
|
|
3230
|
+
}
|
|
3231
|
+
if (note === null)
|
|
3232
|
+
return null;
|
|
3233
|
+
const printed = note;
|
|
3234
|
+
const startsHere = (i) => resolution.startsWith("fallback: ", i) && (i === 0 || resolution[i - 1] === "\n") && printed.endsWith(` (${resolution.slice(i + "fallback: ".length)})`);
|
|
3235
|
+
if (outcomeMayFollow)
|
|
3236
|
+
return startsHere(0) ? 0 : null;
|
|
3237
|
+
for (let i = 0; i < resolution.length; i = resolution.indexOf("\n", i) + 1 || resolution.length) {
|
|
3238
|
+
if (startsHere(i))
|
|
3239
|
+
return i;
|
|
3240
|
+
}
|
|
3241
|
+
return null;
|
|
3242
|
+
}
|
|
3003
3243
|
/**
|
|
3004
3244
|
* Pod-fallback: redirect qitem to a fallback destination (e.g., when a seat
|
|
3005
3245
|
* is unreachable). Emits qitem.fallback_routed; preserves chain_of_record.
|
|
@@ -3012,6 +3252,16 @@ export class QueueRepository {
|
|
|
3012
3252
|
const ts = new Date().toISOString();
|
|
3013
3253
|
const originalDestination = qitem.destinationSession;
|
|
3014
3254
|
const newChain = JSON.stringify([...(qitem.chainOfRecord ?? []), `fallback-from:${originalDestination}`]);
|
|
3255
|
+
// The field held only a fallback line before a close could store an outcome. The line this method last
|
|
3256
|
+
// wrote is replaced, as it always was; anything else in the field is an outcome (possibly after an
|
|
3257
|
+
// earlier fallback line) and stays, with the new line after it. "The line it last wrote" comes from the
|
|
3258
|
+
// row's own transitions, so no marker is stored in the text. When the row has closed since, the field may
|
|
3259
|
+
// end with an outcome that reads like that line, so then only a field that is exactly the line (an
|
|
3260
|
+
// appended outcome would make it longer) is replaced; with no such reroute transition the field is left whole.
|
|
3261
|
+
const fallbackLine = `fallback: ${reason}`;
|
|
3262
|
+
const start = qitem.resolution ? this.fallbackLineStart(qitemId, qitem.resolution) : null;
|
|
3263
|
+
const kept = qitem.resolution && start !== null ? qitem.resolution.slice(0, Math.max(0, start - 1)) : qitem.resolution;
|
|
3264
|
+
const nextResolution = kept ? `${kept}\n${fallbackLine}` : fallbackLine;
|
|
3015
3265
|
const txn = this.db.transaction(() => {
|
|
3016
3266
|
this.db
|
|
3017
3267
|
.prepare(`UPDATE queue_items
|
|
@@ -3020,7 +3270,7 @@ export class QueueRepository {
|
|
|
3020
3270
|
chain_of_record = ?,
|
|
3021
3271
|
resolution = ?
|
|
3022
3272
|
WHERE qitem_id = ?`)
|
|
3023
|
-
.run(fallbackDestination, ts, newChain,
|
|
3273
|
+
.run(fallbackDestination, ts, newChain, nextResolution, qitemId);
|
|
3024
3274
|
// A park timer targets the owner that parked the row. Once the row belongs to someone else it must not keep
|
|
3025
3275
|
// waking the old owner, so it ends here like any other exit from the park. A repeating wait is left running:
|
|
3026
3276
|
// it resolves its recipient from the row's current owner at delivery (evaluateQueueWait).
|
|
@@ -3031,7 +3281,7 @@ export class QueueRepository {
|
|
|
3031
3281
|
this.transitionLog.append({
|
|
3032
3282
|
qitemId,
|
|
3033
3283
|
state: qitem.state,
|
|
3034
|
-
actorSession:
|
|
3284
|
+
actorSession: FALLBACK_ACTOR,
|
|
3035
3285
|
transitionNote: `fallback-routed: ${originalDestination} → ${fallbackDestination} (${reason})`,
|
|
3036
3286
|
closureTarget: qitem.state === "in-progress" ? this.retainedClaimBlocker(qitemId) : undefined,
|
|
3037
3287
|
});
|
|
@@ -3147,12 +3397,13 @@ export class QueueRepository {
|
|
|
3147
3397
|
return null;
|
|
3148
3398
|
}
|
|
3149
3399
|
}
|
|
3150
|
-
|
|
3400
|
+
/** listed: the row's owner notifications and ledger, when a listing read them for all its rows. */
|
|
3401
|
+
waitingView(qitemId, listed) {
|
|
3151
3402
|
const view = readWaitingView(this.db, qitemId, this.activityReader);
|
|
3152
3403
|
if (view && ["pending", "in-progress"].includes(view.state)) {
|
|
3153
3404
|
// #514 — the unclaimed sweep skips a pending ask already posted to its human in the current
|
|
3154
3405
|
// episode (same predicate as runStuckSweep), so the view must not promise that sweep.
|
|
3155
|
-
const awaitingHuman = view.state === "pending" && this.humanNotificationPostedThisEpisode(qitemId);
|
|
3406
|
+
const awaitingHuman = view.state === "pending" && this.humanNotificationPostedThisEpisode(qitemId, listed);
|
|
3156
3407
|
if (awaitingHuman) {
|
|
3157
3408
|
view.nextBackstop = { owner: view.owner, mechanism: "none (posted to the human; awaiting their decision)", dueAt: null, intervalSeconds: null };
|
|
3158
3409
|
}
|
|
@@ -3166,21 +3417,14 @@ export class QueueRepository {
|
|
|
3166
3417
|
return view;
|
|
3167
3418
|
}
|
|
3168
3419
|
handoffAdvisory(row) {
|
|
3169
|
-
//
|
|
3170
|
-
//
|
|
3171
|
-
if (row.state === "handed-off" || !isTerminalState(row.state)
|
|
3420
|
+
// Generic updates can write handed-off and retain a previous handoff's owner
|
|
3421
|
+
// after reopening. Skip only when that owner still matches this closure.
|
|
3422
|
+
if ((row.state === "handed-off" && matchesRecordedHandoffTarget(row.qitem_id, row.handed_off_to, row.closure_target)) || !isTerminalState(row.state)
|
|
3172
3423
|
|| row.closure_reason !== "handed_off_to" || !row.closure_target)
|
|
3173
3424
|
return undefined;
|
|
3174
3425
|
const target = row.closure_target;
|
|
3175
3426
|
try {
|
|
3176
|
-
|
|
3177
|
-
WHERE (s.qitem_id = ? OR s.destination_session = ?) AND s.qitem_id != ?
|
|
3178
|
-
AND (s.handed_off_from = ? OR EXISTS (
|
|
3179
|
-
SELECT 1 FROM json_each(s.chain_of_record) WHERE value = ?
|
|
3180
|
-
)) LIMIT 1`).get(target, target, row.qitem_id, row.qitem_id, row.qitem_id);
|
|
3181
|
-
// A linked row may have handed on to another owner. Its current state
|
|
3182
|
-
// does not establish whether later hops still hold the work.
|
|
3183
|
-
if (successor)
|
|
3427
|
+
if (hasLinkedSuccessor(this.db, row.qitem_id, target))
|
|
3184
3428
|
return undefined;
|
|
3185
3429
|
}
|
|
3186
3430
|
catch {
|
|
@@ -3194,15 +3438,15 @@ export class QueueRepository {
|
|
|
3194
3438
|
target,
|
|
3195
3439
|
reason: "no-live-local-successor",
|
|
3196
3440
|
message: foreignTarget
|
|
3197
|
-
? `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.`
|
|
3198
|
-
: `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.`,
|
|
3441
|
+
? `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.`
|
|
3442
|
+
: `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.`,
|
|
3199
3443
|
};
|
|
3200
3444
|
}
|
|
3201
|
-
rowToItem(row, includeWaiting = true) {
|
|
3445
|
+
rowToItem(row, includeWaiting = true, listed) {
|
|
3202
3446
|
// S04 — derive the pickup receipt at the ONE shared projection point (list/show/overdue
|
|
3203
3447
|
// all flow through here), so the park-vs-strand question is answered by the row face.
|
|
3204
3448
|
const meaningful = lastMeaningfulTransition(this.db, row.qitem_id);
|
|
3205
|
-
const waiting = includeWaiting ? this.waitingView(row.qitem_id) : null;
|
|
3449
|
+
const waiting = includeWaiting ? this.waitingView(row.qitem_id, listed) : null;
|
|
3206
3450
|
const activity = this.ownerActivity(row.destination_session);
|
|
3207
3451
|
const pickup = derivePickup({
|
|
3208
3452
|
state: row.state,
|
|
@@ -3259,6 +3503,20 @@ export class QueueRepository {
|
|
|
3259
3503
|
};
|
|
3260
3504
|
}
|
|
3261
3505
|
}
|
|
3506
|
+
function ledgerItem(row) {
|
|
3507
|
+
return {
|
|
3508
|
+
qitemId: row.qitem_id,
|
|
3509
|
+
state: row.state,
|
|
3510
|
+
blockedOn: row.blocked_on,
|
|
3511
|
+
destinationSession: row.destination_session,
|
|
3512
|
+
tsCreated: row.ts_created,
|
|
3513
|
+
lastNudgeResult: presentedNudgeResult(row.last_nudge_result, row.claimed_at),
|
|
3514
|
+
};
|
|
3515
|
+
}
|
|
3516
|
+
/** A notice sent to the owner, as opposed to the resolution notice a human's own answer writes. */
|
|
3517
|
+
function isOutboundOwnerNotice(t) {
|
|
3518
|
+
return t.ownerNotificationLevel != null && t.ownerNotificationKind != null && t.ownerNotificationKind !== "human-decision-resolved";
|
|
3519
|
+
}
|
|
3262
3520
|
function isQueueState(value) {
|
|
3263
3521
|
return typeof value === "string" && QUEUE_STATES.includes(value);
|
|
3264
3522
|
}
|