@openrig/cli 0.6.11 → 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 +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +172 -11
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +7 -4
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +8 -0
- package/daemon/assets/plugins/openrig-core/skills/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 +55 -9
- 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 +106 -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 +64 -3
- package/daemon/context-packs/reference/whats-new.md +167 -146
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +24 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +0 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +7 -4
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/SKILL.md +25 -5
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +3 -3
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +4 -2
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +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/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 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +173 -32
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +14 -3
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +5 -0
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +17 -3
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +38 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +137 -5
- 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 +333 -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 +17 -0
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/preflight-exec.d.ts +3 -0
- package/daemon/dist/adapters/preflight-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/preflight-exec.js +15 -7
- package/daemon/dist/adapters/preflight-exec.js.map +1 -1
- package/daemon/dist/adapters/replace-file.d.ts +8 -0
- package/daemon/dist/adapters/replace-file.d.ts.map +1 -0
- package/daemon/dist/adapters/replace-file.js +32 -0
- package/daemon/dist/adapters/replace-file.js.map +1 -0
- package/daemon/dist/adapters/tmux-control.d.ts +119 -0
- package/daemon/dist/adapters/tmux-control.d.ts.map +1 -0
- package/daemon/dist/adapters/tmux-control.js +547 -0
- package/daemon/dist/adapters/tmux-control.js.map +1 -0
- package/daemon/dist/adapters/tmux-exec.d.ts +18 -4
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +98 -17
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +52 -15
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +232 -58
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/composer-prompts-surface.d.ts +2 -0
- package/daemon/dist/composer-prompts-surface.d.ts.map +1 -0
- package/daemon/dist/composer-prompts-surface.js +2 -0
- package/daemon/dist/composer-prompts-surface.js.map +1 -0
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +24 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/100_typing_guard_modes.d.ts +3 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.js +10 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.js.map +1 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.d.ts +3 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.d.ts.map +1 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.js +10 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.js.map +1 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.d.ts +9 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.d.ts.map +1 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.js +14 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.js.map +1 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.d.ts +10 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.d.ts.map +1 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.js +38 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.js.map +1 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.d.ts +12 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.d.ts.map +1 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.js +39 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.js.map +1 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.d.ts +5 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.d.ts.map +1 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.js +11 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.js.map +1 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.d.ts +10 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.d.ts.map +1 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.js +14 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.js.map +1 -0
- package/daemon/dist/db/migrations/111_seat_env.d.ts +6 -0
- package/daemon/dist/db/migrations/111_seat_env.d.ts.map +1 -0
- package/daemon/dist/db/migrations/111_seat_env.js +11 -0
- package/daemon/dist/db/migrations/111_seat_env.js.map +1 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.d.ts +3 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.d.ts.map +1 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.js +14 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.js.map +1 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.d.ts +3 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.d.ts.map +1 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.js +9 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.js.map +1 -0
- package/daemon/dist/db/migrations/114_session_agent_app.d.ts +3 -0
- package/daemon/dist/db/migrations/114_session_agent_app.d.ts.map +1 -0
- package/daemon/dist/db/migrations/114_session_agent_app.js +11 -0
- package/daemon/dist/db/migrations/114_session_agent_app.js.map +1 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.d.ts +3 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.d.ts.map +1 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.js +28 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.js.map +1 -0
- package/daemon/dist/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-thread-id.d.ts +22 -3
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +65 -16
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +38 -0
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -0
- package/daemon/dist/domain/community-harness-presets.js +155 -0
- package/daemon/dist/domain/community-harness-presets.js.map +1 -0
- package/daemon/dist/domain/composer-prompts.d.ts +118 -0
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -0
- package/daemon/dist/domain/composer-prompts.js +165 -0
- package/daemon/dist/domain/composer-prompts.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts +3 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +14 -2
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-library-service.js +2 -2
- package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +4 -0
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +1 -0
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/current-work.js +2 -2
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts +32 -0
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -0
- package/daemon/dist/domain/draft-aware-delivery.js +156 -0
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -0
- package/daemon/dist/domain/event-bus.d.ts +10 -1
- package/daemon/dist/domain/event-bus.d.ts.map +1 -1
- package/daemon/dist/domain/event-bus.js +25 -0
- package/daemon/dist/domain/event-bus.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +76 -10
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/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/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 +49 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +129 -15
- 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 +26 -9
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +18 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +60 -2
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/openrouter-charge.d.ts +42 -0
- package/daemon/dist/domain/openrouter-charge.d.ts.map +1 -0
- package/daemon/dist/domain/openrouter-charge.js +57 -0
- package/daemon/dist/domain/openrouter-charge.js.map +1 -0
- package/daemon/dist/domain/parked-query.d.ts +5 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +9 -2
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js +27 -3
- package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts +2 -0
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.js +5 -7
- package/daemon/dist/domain/permission-policy/policy-spec.js.map +1 -1
- package/daemon/dist/domain/pi-usage-entries-store.d.ts +41 -0
- package/daemon/dist/domain/pi-usage-entries-store.d.ts.map +1 -0
- package/daemon/dist/domain/pi-usage-entries-store.js +173 -0
- package/daemon/dist/domain/pi-usage-entries-store.js.map +1 -0
- package/daemon/dist/domain/pi-usage-facts.d.ts +90 -0
- package/daemon/dist/domain/pi-usage-facts.d.ts.map +1 -0
- package/daemon/dist/domain/pi-usage-facts.js +165 -0
- package/daemon/dist/domain/pi-usage-facts.js.map +1 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +2 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +4 -0
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.js +6 -4
- package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +2 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +4 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts +4 -0
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js +63 -3
- package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +31 -2
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts +33 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.js +195 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.js.map +1 -0
- package/daemon/dist/domain/provider/claude-usage-windows.d.ts +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-usage-reader.d.ts +2 -0
- package/daemon/dist/domain/provider/codex-usage-reader.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-reader.js +3 -1
- package/daemon/dist/domain/provider/codex-usage-reader.js.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts +10 -49
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-windows.js +15 -173
- package/daemon/dist/domain/provider/codex-usage-windows.js.map +1 -1
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts +18 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts.map +1 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.js +159 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.js.map +1 -0
- package/daemon/dist/domain/provider/provider-service-impl.d.ts +7 -2
- package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +20 -2
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +4 -2
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +72 -4
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.js +2 -0
- package/daemon/dist/domain/provider/reactive-tap.js.map +1 -1
- package/daemon/dist/domain/provider/subscription-moves.d.ts +77 -0
- package/daemon/dist/domain/provider/subscription-moves.d.ts.map +1 -0
- package/daemon/dist/domain/provider/subscription-moves.js +140 -0
- package/daemon/dist/domain/provider/subscription-moves.js.map +1 -0
- package/daemon/dist/domain/provider/usage-across-hosts.d.ts +162 -0
- package/daemon/dist/domain/provider/usage-across-hosts.d.ts.map +1 -0
- package/daemon/dist/domain/provider/usage-across-hosts.js +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/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 +89 -14
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +331 -86
- 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 +9 -21
- 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.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +3 -2
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +78 -14
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +23 -19
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-policy.d.ts +26 -0
- package/daemon/dist/domain/restore-policy.d.ts.map +1 -0
- package/daemon/dist/domain/restore-policy.js +22 -0
- package/daemon/dist/domain/restore-policy.js.map +1 -0
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +6 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/restore-runtime-compatibility.d.ts +3 -0
- package/daemon/dist/domain/restore-runtime-compatibility.d.ts.map +1 -0
- package/daemon/dist/domain/restore-runtime-compatibility.js +7 -0
- package/daemon/dist/domain/restore-runtime-compatibility.js.map +1 -0
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +10 -5
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +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 +18 -5
- 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 +11 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-verifier.d.ts +15 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +28 -4
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.js +23 -10
- package/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +9 -2
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +100 -15
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +3 -0
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +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 +119 -5
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +318 -23
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +13 -2
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +23 -4
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +6 -2
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +45 -9
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +13 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +29 -2
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +108 -1
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +1116 -129
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts +2 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +16 -4
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +10 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +84 -4
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +3 -0
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +19 -2
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +24 -21
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/spec-validation-advisory.js +1 -1
- package/daemon/dist/domain/spec-validation-advisory.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +31 -3
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +218 -60
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +13 -3
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +34 -25
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/startup-validation.d.ts.map +1 -1
- package/daemon/dist/domain/startup-validation.js +3 -0
- package/daemon/dist/domain/startup-validation.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +7 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +5 -1
- 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 +53 -3
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/usage-samples-store.d.ts +8 -0
- package/daemon/dist/domain/usage-samples-store.d.ts.map +1 -1
- package/daemon/dist/domain/usage-samples-store.js +24 -5
- package/daemon/dist/domain/usage-samples-store.js.map +1 -1
- package/daemon/dist/domain/usage-series.d.ts +154 -2
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +208 -9
- package/daemon/dist/domain/usage-series.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +37 -1
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +3 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +13 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +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/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 +2 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +4 -0
- package/daemon/dist/domain/workspace/project-read.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +10 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +1 -1
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/middleware/json-body-error.d.ts +4 -3
- package/daemon/dist/middleware/json-body-error.d.ts.map +1 -1
- package/daemon/dist/middleware/json-body-error.js +18 -4
- package/daemon/dist/middleware/json-body-error.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +78 -0
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +39 -16
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/community-harnesses.d.ts +3 -0
- package/daemon/dist/routes/community-harnesses.d.ts.map +1 -0
- package/daemon/dist/routes/community-harnesses.js +18 -0
- package/daemon/dist/routes/community-harnesses.js.map +1 -0
- package/daemon/dist/routes/compaction.d.ts +3 -0
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +14 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/events.js +26 -12
- package/daemon/dist/routes/events.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts +3 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +15 -0
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +2 -1
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts +11 -1
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +182 -10
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/query-limit.d.ts +1 -0
- package/daemon/dist/routes/query-limit.d.ts.map +1 -1
- package/daemon/dist/routes/query-limit.js +1 -1
- package/daemon/dist/routes/query-limit.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +44 -3
- 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/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +10 -0
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +63 -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 +140 -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 +95 -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 +102 -5
- 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 +64 -3
- package/daemon/docs/reference/schemas/bundle-behaviour.v1.schema.json +105 -2
- package/daemon/docs/reference/scoped-operating-posture.md +12 -2
- package/daemon/docs/reference/sdlc-conventions.md +39 -1
- package/daemon/docs/reference/seat-delivery.md +127 -0
- package/daemon/docs/reference/slack-app-setup.md +141 -13
- package/daemon/docs/reference/topology-naming.md +9 -0
- package/daemon/docs/reference/whats-new.md +167 -146
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +7 -4
- package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +1 -1
- package/daemon/specs/rigs/launch/demo/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/factory/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/factory/topology/rig/CRAFT.md +2 -2
- package/daemon/specs/rigs/launch/first-project/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/first-project-claude/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/first-project-mixed/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +9 -2
- package/daemon/specs/rigs/launch/starter/CULTURE.md +2 -1
- package/daemon/specs/rigs/preview/product-team/CULTURE.md +1 -1
- package/dist/bin-wrapper.d.ts +2 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +61 -4
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/bundle-behaviour.d.ts.map +1 -1
- package/dist/bundle-behaviour.js +22 -0
- package/dist/bundle-behaviour.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +16 -5
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +9 -5
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +8 -0
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/capture.d.ts +4 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +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 -2
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/crash-cart.d.ts.map +1 -1
- package/dist/commands/crash-cart.js +3 -5
- package/dist/commands/crash-cart.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +7 -5
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/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/provider.d.ts +2 -0
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +336 -49
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +11 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +40 -6
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +59 -10
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/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 +47 -9
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +131 -20
- 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 +77 -3
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +60 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +58 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/usage.d.ts +12 -0
- package/dist/commands/usage.d.ts.map +1 -1
- package/dist/commands/usage.js +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 +14 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +50 -1
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +2 -2
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +5 -4
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +6 -3
- package/dist/host-registry.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts +9 -0
- package/dist/lazy-program.d.ts.map +1 -0
- package/dist/lazy-program.js +111 -0
- package/dist/lazy-program.js.map +1 -0
- package/dist/lib/bundle-check.js +2 -2
- package/dist/lib/bundle-check.js.map +1 -1
- package/dist/lib/bundle-source.d.ts +1 -0
- package/dist/lib/bundle-source.d.ts.map +1 -1
- package/dist/lib/bundle-source.js +1 -0
- package/dist/lib/bundle-source.js.map +1 -1
- package/dist/lib/codex-auth.d.ts.map +1 -1
- package/dist/lib/codex-auth.js +17 -1
- package/dist/lib/codex-auth.js.map +1 -1
- package/dist/lib/context-install.js +1 -1
- package/dist/lib/context-install.js.map +1 -1
- package/dist/lib/file-transfer.js +1 -1
- package/dist/lib/file-transfer.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +11 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +20 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/permission-policy/policy-spec.d.ts.map +1 -1
- package/dist/lib/permission-policy/policy-spec.js +5 -7
- package/dist/lib/permission-policy/policy-spec.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.js +1 -1
- package/dist/lib/scope/logical-checkbox.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +8 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +50 -1
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +3 -13
- package/dist/lib/work-install.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +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/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 +6 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/cost/cost-model.d.ts +12 -0
- package/tui/dist/cost/cost-model.d.ts.map +1 -0
- package/tui/dist/cost/cost-model.js +141 -0
- package/tui/dist/cost/cost-model.js.map +1 -0
- package/tui/dist/cost/cost-read.d.ts +19 -0
- package/tui/dist/cost/cost-read.d.ts.map +1 -0
- package/tui/dist/cost/cost-read.js +4 -0
- package/tui/dist/cost/cost-read.js.map +1 -0
- package/tui/dist/daemon-client.d.ts +13 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +77 -1
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/detail.d.ts +2 -0
- package/tui/dist/detail.d.ts.map +1 -1
- package/tui/dist/detail.js +5 -0
- package/tui/dist/detail.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +38 -18
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/helper-cwd.d.ts +3 -0
- package/tui/dist/helper-cwd.d.ts.map +1 -0
- package/tui/dist/helper-cwd.js +16 -0
- package/tui/dist/helper-cwd.js.map +1 -0
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +32 -1
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/input.d.ts.map +1 -1
- package/tui/dist/input.js +2 -1
- package/tui/dist/input.js.map +1 -1
- package/tui/dist/local-reading.d.ts.map +1 -1
- package/tui/dist/local-reading.js +2 -1
- package/tui/dist/local-reading.js.map +1 -1
- package/tui/dist/main.js +6 -5
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
- package/tui/dist/pulse/render-pulse.js +7 -1
- package/tui/dist/pulse/render-pulse.js.map +1 -1
- package/tui/dist/reading.js +1 -1
- package/tui/dist/reading.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +10 -1
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/scopes-model.d.ts +6 -1
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +33 -13
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/sections.d.ts.map +1 -1
- package/tui/dist/sections.js +4 -1
- package/tui/dist/sections.js.map +1 -1
- package/tui/dist/socket-server.d.ts.map +1 -1
- package/tui/dist/socket-server.js +2 -1
- package/tui/dist/socket-server.js.map +1 -1
- package/tui/dist/specs/launch.d.ts.map +1 -1
- package/tui/dist/specs/launch.js +2 -1
- package/tui/dist/specs/launch.js.map +1 -1
- package/tui/dist/startup.js +1 -1
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +8 -4
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts.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 +9 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/usage/usage-hosts-model.d.ts +17 -0
- package/tui/dist/usage/usage-hosts-model.d.ts.map +1 -0
- package/tui/dist/usage/usage-hosts-model.js +73 -0
- package/tui/dist/usage/usage-hosts-model.js.map +1 -0
- package/tui/dist/usage/usage-model.d.ts +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-DhmxKuZf.js → index-Cfbtfd9G.js} +2 -2
- package/ui/dist/index.html +1 -1
|
@@ -62,6 +62,8 @@ export function hasLiveHumanGate(item) {
|
|
|
62
62
|
}
|
|
63
63
|
const AUTO_UNPARK_WAKE_TAG = "queue:auto-unpark:blocker";
|
|
64
64
|
const AUTO_UNPARK_BLOCKER_TAG_PREFIX = "queue:auto-unpark:blocker-ref:";
|
|
65
|
+
/** The actor on the transition routeToFallback writes; the row's own history is how a later reroute finds the line it wrote. */
|
|
66
|
+
const FALLBACK_ACTOR = "system:queue-fallback";
|
|
65
67
|
/** 0.5.1-53 Atom 1a — typed non-qitem gate blocker prefixes. A park may be gated on a fold / auth /
|
|
66
68
|
* external condition that is NOT a qitem and NOT a human seat; these prefixes make such a gate a
|
|
67
69
|
* first-class, compact-visible, downstream-classifiable blocker (the ruling detail rides a transition). */
|
|
@@ -198,6 +200,28 @@ export function matchesRecordedHandoffTarget(qitemId, handedOffTo, closureTarget
|
|
|
198
200
|
const foreign = /^(qitem-[^@]+)@([^@]+)$/.exec(closureTarget);
|
|
199
201
|
return foreign !== null && foreign[1] === deriveCrossHostSuccessorId(qitemId, handedOffTo, foreign[2]);
|
|
200
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
|
+
}
|
|
201
225
|
/** PL-007 — defensive column probe. Older test fixtures bypass the
|
|
202
226
|
* canonical migration list, so target_repo may be absent. Mirrors
|
|
203
227
|
* the `hasNodeColumn` pattern in rig-repository.ts. */
|
|
@@ -240,7 +264,12 @@ function compactRow(item) {
|
|
|
240
264
|
delete row[field];
|
|
241
265
|
return row;
|
|
242
266
|
}
|
|
243
|
-
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(", ");
|
|
244
273
|
export function stampSelfHostSuffix(session) {
|
|
245
274
|
if (session === undefined)
|
|
246
275
|
return undefined;
|
|
@@ -289,6 +318,9 @@ export function destinationRigTeaching(session) {
|
|
|
289
318
|
* gateway resolver (how to register + "not an agent seat"). Loads the registry only for
|
|
290
319
|
* the (rare) @external refusal path. Undefined for non-@external / registered / scheme.
|
|
291
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();
|
|
292
324
|
export function externalAdmissionTeaching(session, loadRegistry = loadHumanRegistry) {
|
|
293
325
|
const parsed = parseSessionName(session);
|
|
294
326
|
if (parsed.kind !== "external")
|
|
@@ -296,6 +328,18 @@ export function externalAdmissionTeaching(session, loadRegistry = loadHumanRegis
|
|
|
296
328
|
if (resolveExternal(parsed.local, []).kind === "scheme")
|
|
297
329
|
return undefined;
|
|
298
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
|
+
}
|
|
299
343
|
if (!reg.ok) {
|
|
300
344
|
return {
|
|
301
345
|
externalDomain: parsed.domain,
|
|
@@ -320,7 +364,9 @@ export function destinationRefusalTeaching(session, loadRegistry = loadHumanRegi
|
|
|
320
364
|
function destinationValidationError(field, session, loadRegistry) {
|
|
321
365
|
const teaching = destinationRefusalTeaching(session, loadRegistry);
|
|
322
366
|
if (teaching?.registryLoadError === true) {
|
|
323
|
-
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);
|
|
324
370
|
}
|
|
325
371
|
return new QueueRepositoryError("unknown_destination_rig", `${field} ${session} references an unknown rig`, teaching);
|
|
326
372
|
}
|
|
@@ -385,7 +431,8 @@ export class QueueRepository {
|
|
|
385
431
|
this.wakeRepo = new QueueWakeRepository(db);
|
|
386
432
|
this.validateRig = opts?.validateRig ?? (() => true);
|
|
387
433
|
this.destinationAdvisory = opts?.destinationAdvisory ?? (() => null);
|
|
388
|
-
|
|
434
|
+
if (opts?.transport)
|
|
435
|
+
this.attachTransport(opts.transport);
|
|
389
436
|
this.workflowFrontierPredicate = opts?.workflowFrontierPredicate;
|
|
390
437
|
this.resolveOccupantGeneration = opts?.resolveOccupantGeneration;
|
|
391
438
|
this.loadHumanRegistryFn = opts?.loadHumanRegistry ?? (() => loadHumanRegistry());
|
|
@@ -449,6 +496,39 @@ export class QueueRepository {
|
|
|
449
496
|
*/
|
|
450
497
|
attachTransport(transport) {
|
|
451
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}` };
|
|
452
532
|
}
|
|
453
533
|
/**
|
|
454
534
|
* W1 (transactional closure): attach the durable wake-intent store AFTER
|
|
@@ -541,6 +621,11 @@ export class QueueRepository {
|
|
|
541
621
|
if (target)
|
|
542
622
|
this.outbox.retain(record, target);
|
|
543
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);
|
|
544
629
|
this.outbox.record(record);
|
|
545
630
|
const binding = this.transport?.deliveryTarget?.(input.toSession);
|
|
546
631
|
if (binding)
|
|
@@ -631,18 +716,7 @@ export class QueueRepository {
|
|
|
631
716
|
// original frozen intent and audit pointer survives; only transport coalesces.
|
|
632
717
|
let superseded = false;
|
|
633
718
|
const actionable = (entry) => {
|
|
634
|
-
const
|
|
635
|
-
let current = row?.state === "pending";
|
|
636
|
-
const resumePrefix = `${WAKE_INTENT_PREFIX}blocker-`;
|
|
637
|
-
if (current && entry.outboxId.startsWith(resumePrefix)) {
|
|
638
|
-
const expected = Number(entry.outboxId.slice(resumePrefix.length));
|
|
639
|
-
const latest = this.db.prepare(`SELECT transition_id FROM (
|
|
640
|
-
SELECT transition_id, state, LAG(state) OVER (ORDER BY transition_id) AS previous_state
|
|
641
|
-
FROM queue_transitions WHERE qitem_id = ?)
|
|
642
|
-
WHERE state = 'pending' AND previous_state IS NOT 'pending' ORDER BY transition_id DESC LIMIT 1`)
|
|
643
|
-
.get(entry.auditPointer);
|
|
644
|
-
current = expected === latest?.transition_id;
|
|
645
|
-
}
|
|
719
|
+
const current = this.currentWakeIntent(entry);
|
|
646
720
|
if (!current) {
|
|
647
721
|
// Existing failed state means the requested old delivery was refused;
|
|
648
722
|
// the explicit tag distinguishes supersession from a transport attempt.
|
|
@@ -933,12 +1007,12 @@ export class QueueRepository {
|
|
|
933
1007
|
}
|
|
934
1008
|
const deliveryId = `guard-nudge-${qitemId}-${createHash("sha256").update(JSON.stringify([sourceSession, destinationSession, bodyOverride ?? null])).digest("hex")}`;
|
|
935
1009
|
const held = !committedOutboxIds ? this.outbox?.getById(deliveryId) : null;
|
|
936
|
-
if (held?.
|
|
1010
|
+
if (held?.guardBinding) {
|
|
937
1011
|
// Same logical nudge reuses its original frozen envelope, not a new timestamp.
|
|
938
1012
|
text = held.body;
|
|
939
1013
|
}
|
|
940
1014
|
try {
|
|
941
|
-
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 });
|
|
942
1016
|
// OPR.0.3.2.21.FR-4(c) — wording rename: the prior literal
|
|
943
1017
|
// "sent-unverified" read as a failure even in the common case
|
|
944
1018
|
// (delivery confirmed but the synchronous ack window expired,
|
|
@@ -946,22 +1020,11 @@ export class QueueRepository {
|
|
|
946
1020
|
// "delivered-ack-pending" reads as healthy. The old "verified"
|
|
947
1021
|
// case is unchanged for backward-compat with any tooling that
|
|
948
1022
|
// already consumed the positive literal.
|
|
949
|
-
if (res.outcome === "retained")
|
|
950
|
-
return { classified: "retained", nudgeResult: "retained:typing_guard" };
|
|
951
|
-
if (res.ok) {
|
|
952
|
-
return res.verified
|
|
953
|
-
? { classified: "verified", nudgeResult: "verified" }
|
|
954
|
-
: { classified: "indeterminate", nudgeResult: "delivered-ack-pending" };
|
|
955
|
-
}
|
|
956
1023
|
// MF6: a TIMEOUT is ambiguous — the send may have landed but the ack window
|
|
957
1024
|
// expired — so it records `indeterminate` (never silently delivered, never a
|
|
958
1025
|
// hard `failed`). A definite non-timeout failure (unreachable, unknown
|
|
959
1026
|
// session) stays `failed`.
|
|
960
|
-
|
|
961
|
-
if (isWakeTimeoutSignal(res.reason) || isWakeTimeoutSignal(res.error)) {
|
|
962
|
-
return { classified: "indeterminate", nudgeResult: `indeterminate:${detail}` };
|
|
963
|
-
}
|
|
964
|
-
return { classified: "failed", nudgeResult: `failed:${detail}` };
|
|
1027
|
+
return this.classifyWakeResult(res);
|
|
965
1028
|
}
|
|
966
1029
|
catch (err) {
|
|
967
1030
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -1569,6 +1632,7 @@ export class QueueRepository {
|
|
|
1569
1632
|
transitionNote: input.transitionNote ?? `cross-host handoff to ${input.toSession}`,
|
|
1570
1633
|
closureReason: "handed_off_to",
|
|
1571
1634
|
closureTarget: input.closureTarget,
|
|
1635
|
+
identityProvenance: input.identityProvenance ?? null,
|
|
1572
1636
|
});
|
|
1573
1637
|
// OPR.0.5.8.1 S1b — third member of the handoff family, same bypass.
|
|
1574
1638
|
this.retireParkGeneratedTimer(input.qitemId, `park_ended:${input.terminalState}`);
|
|
@@ -1590,7 +1654,7 @@ export class QueueRepository {
|
|
|
1590
1654
|
qitemId: input.qitemId,
|
|
1591
1655
|
terminalState: input.terminalState,
|
|
1592
1656
|
actorSession: input.fromSession,
|
|
1593
|
-
identityProvenance: null,
|
|
1657
|
+
identityProvenance: input.identityProvenance ?? null,
|
|
1594
1658
|
ts,
|
|
1595
1659
|
})) {
|
|
1596
1660
|
events.push(dependentEvent);
|
|
@@ -1827,11 +1891,12 @@ export class QueueRepository {
|
|
|
1827
1891
|
throw new QueueRepositoryError("qitem_not_found", `qitem ${input.qitemId} not found`);
|
|
1828
1892
|
}
|
|
1829
1893
|
const hasNote = typeof input.transitionNote === "string" && input.transitionNote.trim().length > 0;
|
|
1894
|
+
const hasValidSummary = typeof input.summary === "string" && input.summary.trim().length > 0;
|
|
1830
1895
|
const isGuardedTerminal = ["done", "canceled", "handed-off"].includes(qitem.state);
|
|
1831
1896
|
const isStatePreservingAppend = input.state === undefined || (isGuardedTerminal && input.state === qitem.state);
|
|
1832
1897
|
if (isStatePreservingAppend) {
|
|
1833
|
-
if (input.state === undefined && !hasNote) {
|
|
1834
|
-
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");
|
|
1835
1900
|
}
|
|
1836
1901
|
const disallowed = input.reopen === true
|
|
1837
1902
|
|| input.closureReason != null
|
|
@@ -1843,16 +1908,25 @@ export class QueueRepository {
|
|
|
1843
1908
|
|| input.wakeMaxSeconds != null
|
|
1844
1909
|
|| input.wakeProgressEvidence != null
|
|
1845
1910
|
|| input.wakeMessage != null
|
|
1846
|
-
|| input.
|
|
1847
|
-
|| input.
|
|
1911
|
+
|| input.evidenceRef != null
|
|
1912
|
+
|| (input.state !== undefined && input.summary != null)
|
|
1913
|
+
|| (input.summary != null && !hasValidSummary);
|
|
1848
1914
|
if (disallowed) {
|
|
1849
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");
|
|
1850
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;
|
|
1851
1925
|
this.transitionLog.append({
|
|
1852
1926
|
qitemId: input.qitemId,
|
|
1853
1927
|
state: qitem.state,
|
|
1854
1928
|
actorSession: input.actorSession,
|
|
1855
|
-
transitionNote:
|
|
1929
|
+
transitionNote: note,
|
|
1856
1930
|
// A note-only append does not clear the claim's retained park gate.
|
|
1857
1931
|
// Carry its audit pointer so a later state write can end this chain.
|
|
1858
1932
|
closureTarget: qitem.state === "in-progress" ? this.retainedClaimBlocker(input.qitemId) : undefined,
|
|
@@ -1866,7 +1940,7 @@ export class QueueRepository {
|
|
|
1866
1940
|
closureReason: null,
|
|
1867
1941
|
closureTarget: null,
|
|
1868
1942
|
actorSession: input.actorSession,
|
|
1869
|
-
summary: qitem.summary ?? null,
|
|
1943
|
+
summary: hasValidSummary ? input.summary : (qitem.summary ?? null),
|
|
1870
1944
|
});
|
|
1871
1945
|
return { persistedEvent, persistedEvents: [persistedEvent] };
|
|
1872
1946
|
}
|
|
@@ -2102,6 +2176,15 @@ export class QueueRepository {
|
|
|
2102
2176
|
// NULL. The prior `COALESCE(?, blocked_on)` preserved the blocker on every non-blocked
|
|
2103
2177
|
// transition, leaving dead blockers that nothing audits (the root-cause strand).
|
|
2104
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;
|
|
2105
2188
|
const notification = this.classifyOwnerNotification({
|
|
2106
2189
|
action: "update",
|
|
2107
2190
|
destinationSession: qitem.destinationSession,
|
|
@@ -2118,9 +2201,10 @@ export class QueueRepository {
|
|
|
2118
2201
|
closure_reason = COALESCE(?, closure_reason),
|
|
2119
2202
|
closure_target = COALESCE(?, closure_target),
|
|
2120
2203
|
handed_off_to = COALESCE(?, handed_off_to),
|
|
2121
|
-
blocked_on =
|
|
2204
|
+
blocked_on = ?,
|
|
2205
|
+
resolution = ?
|
|
2122
2206
|
WHERE qitem_id = ?`)
|
|
2123
|
-
.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);
|
|
2124
2208
|
// FR-6: park-time summary/evidence_ref are PERSISTED onto the existing
|
|
2125
2209
|
// item (not merely validated-then-dropped) — visible to the attention
|
|
2126
2210
|
// query and to Packet 2. Only the park path writes them.
|
|
@@ -2321,6 +2405,10 @@ export class QueueRepository {
|
|
|
2321
2405
|
getParkWakeStatus(qitemId) {
|
|
2322
2406
|
return this.wakeRepo.getStatus(qitemId);
|
|
2323
2407
|
}
|
|
2408
|
+
/** For parked diagnosis only (see QueueWakeRepository.servedByOwnRepeatingReminder). */
|
|
2409
|
+
parkWakeServedByOwnReminder(qitemId) {
|
|
2410
|
+
return this.wakeRepo.servedByOwnRepeatingReminder(qitemId);
|
|
2411
|
+
}
|
|
2324
2412
|
/** Park timers a seat swap keeps: each is still its blocked row's current wake and still targets the
|
|
2325
2413
|
* row's owner (see QueueWakeRepository.currentParkTimerIds). */
|
|
2326
2414
|
currentParkTimerIds() {
|
|
@@ -2346,6 +2434,18 @@ export class QueueRepository {
|
|
|
2346
2434
|
return wake ? { ...transition, wake } : transition;
|
|
2347
2435
|
});
|
|
2348
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
|
+
}
|
|
2349
2449
|
/** Read-only scope-aware RECENT projection. Normalization and its hard cap
|
|
2350
2450
|
* live with the append-only transition log; the repository owns the public
|
|
2351
2451
|
* queue-domain door. */
|
|
@@ -2404,8 +2504,20 @@ export class QueueRepository {
|
|
|
2404
2504
|
if (deliveryStatus === "retained")
|
|
2405
2505
|
return firedEvents;
|
|
2406
2506
|
if (usageLimitBlockers.length === 0) {
|
|
2407
|
-
|
|
2408
|
-
|
|
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
|
+
}
|
|
2409
2521
|
}
|
|
2410
2522
|
return firedEvents;
|
|
2411
2523
|
}
|
|
@@ -2532,23 +2644,46 @@ export class QueueRepository {
|
|
|
2532
2644
|
}
|
|
2533
2645
|
/** #96 — whether some update recorded this Slack root as the thread it posts into. Such a
|
|
2534
2646
|
* root is shared: its owner's next decision must not reuse it (see slack-subsystem). */
|
|
2535
|
-
isReplyToThread(threadTs) {
|
|
2647
|
+
isReplyToThread(threadTs, where) {
|
|
2536
2648
|
if (!this.hasQueueTransitionsTable)
|
|
2537
2649
|
return false;
|
|
2538
2650
|
// Same trust rule as replyToChoiceFor: a pre-provenance schema reads every row as null.
|
|
2539
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
|
+
}
|
|
2540
2658
|
// #192: with a channel map the note carries a ` channel=<id>` suffix. Match the exact note, or
|
|
2541
2659
|
// the exact note followed by that suffix; a prefix compare, not LIKE (the note itself contains
|
|
2542
2660
|
// `_`), and the trailing space keeps thread 1.1 from matching 1.10.
|
|
2543
|
-
const note = formatReplyToChoice({ kind: "thread", threadTs });
|
|
2544
2661
|
const withChannel = `${note} channel=`;
|
|
2545
2662
|
return this.db.prepare(`SELECT 1 FROM queue_transitions
|
|
2546
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;
|
|
2547
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
|
+
}
|
|
2548
2675
|
replyToFallbackFor(qitemId) {
|
|
2549
2676
|
const choice = this.replyToChoiceFor(qitemId);
|
|
2550
2677
|
return choice?.kind === "fallback" ? describeReplyToFallback(choice) : null;
|
|
2551
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
|
+
}
|
|
2552
2687
|
list(opts) {
|
|
2553
2688
|
const limit = opts?.limit ?? 100;
|
|
2554
2689
|
const conditions = [];
|
|
@@ -2597,9 +2732,11 @@ export class QueueRepository {
|
|
|
2597
2732
|
const rows = this.db
|
|
2598
2733
|
.prepare(`SELECT ${columns} FROM queue_items ${where} ORDER BY ${orderBy} LIMIT ?`)
|
|
2599
2734
|
.all(...params);
|
|
2735
|
+
const owners = this.transitionLog.ownerNotificationsForQitems(rows.map((row) => row.qitem_id));
|
|
2736
|
+
const ledgers = this.deliveryOutcomesFor(rows, owners);
|
|
2600
2737
|
const items = rows.map((r) => {
|
|
2601
|
-
const
|
|
2602
|
-
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 });
|
|
2603
2740
|
return {
|
|
2604
2741
|
...item,
|
|
2605
2742
|
deliveryOutcome: ledger?.outcome ?? null,
|
|
@@ -2895,9 +3032,10 @@ export class QueueRepository {
|
|
|
2895
3032
|
}
|
|
2896
3033
|
}
|
|
2897
3034
|
/** Null means legacy/no OWNER history; inactive means OWNER history exists
|
|
2898
|
-
* but the row no longer projects a current human-notification episode.
|
|
2899
|
-
|
|
2900
|
-
|
|
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];
|
|
2901
3039
|
if (!transition)
|
|
2902
3040
|
return null;
|
|
2903
3041
|
// A human-decision-resolved notice written BY the transition that closed the row (a human's direct reply closing
|
|
@@ -2907,15 +3045,13 @@ export class QueueRepository {
|
|
|
2907
3045
|
// stayed active is a real delivery and keeps its outcome after an agent later closes the row.
|
|
2908
3046
|
let resolvedBy = null;
|
|
2909
3047
|
if (transition.ownerNotificationKind === "human-decision-resolved" && !["pending", "in-progress", "blocked"].includes(transition.state)) {
|
|
2910
|
-
const outbound =
|
|
2911
|
-
.filter((t) => t.ownerNotificationLevel != null && t.ownerNotificationKind != null && t.ownerNotificationKind !== "human-decision-resolved")
|
|
2912
|
-
.sort((a, b) => b.transitionId - a.transitionId)[0];
|
|
3048
|
+
const outbound = owners.find(isOutboundOwnerNotice);
|
|
2913
3049
|
if (!outbound)
|
|
2914
3050
|
return "inactive";
|
|
2915
3051
|
resolvedBy = transition.actorSession;
|
|
2916
3052
|
transition = outbound;
|
|
2917
3053
|
}
|
|
2918
|
-
const registry =
|
|
3054
|
+
const registry = loadRegistry();
|
|
2919
3055
|
if (!registry.ok)
|
|
2920
3056
|
return "inactive";
|
|
2921
3057
|
// After that fallback the recipient is the human who answered: the row may be an agent's that was parked on them
|
|
@@ -2943,13 +3079,14 @@ export class QueueRepository {
|
|
|
2943
3079
|
* to a registered human, aliases included) has a POSTED receipt. Legacy rows with no OWNER
|
|
2944
3080
|
* history, inactive episodes, never-posted and transport-failed all read false. Same derivation
|
|
2945
3081
|
* as deliveryOutcomeFor; it reads row fields, never the waiting view. */
|
|
2946
|
-
humanNotificationPostedThisEpisode(qitemId) {
|
|
3082
|
+
humanNotificationPostedThisEpisode(qitemId, listed) {
|
|
2947
3083
|
if (!this.hasQueueTransitionsTable)
|
|
2948
3084
|
return false;
|
|
2949
3085
|
// Only the ask's own notification binds a recipient: create writes it in state pending, to the destination of
|
|
2950
3086
|
// that moment. A park notice (its recipient is not retained), a resolution notice, or a later destination change
|
|
2951
3087
|
// (routeToFallback opens no new episode) cannot establish that the current destination received this ask.
|
|
2952
|
-
const
|
|
3088
|
+
const owners = listed?.owners ?? this.transitionLog.ownerNotificationsForQitems([qitemId]).get(qitemId) ?? [];
|
|
3089
|
+
const owner = owners[0];
|
|
2953
3090
|
if (!owner || owner.state !== "pending")
|
|
2954
3091
|
return false;
|
|
2955
3092
|
if (owner.ownerNotificationKind !== "human-required" && owner.ownerNotificationKind !== "human-update")
|
|
@@ -2958,10 +3095,11 @@ export class QueueRepository {
|
|
|
2958
3095
|
if (rerouted)
|
|
2959
3096
|
return false;
|
|
2960
3097
|
// The ledger's episode exists only when the destination resolves to a registered human (aliases included).
|
|
2961
|
-
const ledger = this.deliveryLedger(qitemId,
|
|
3098
|
+
const ledger = listed ? listed.ledger : this.deliveryLedger(qitemId, owners);
|
|
2962
3099
|
return ledger !== null && ledger.outcome === "posted" && ledger.episode?.notificationKey === `${qitemId}:${owner.transitionId}`;
|
|
2963
3100
|
}
|
|
2964
|
-
|
|
3101
|
+
/** owners: the row's owner notifications as ownerNotificationsForQitems gives them, when the caller read them. */
|
|
3102
|
+
deliveryLedger(qitemId, owners) {
|
|
2965
3103
|
// Some repository-only fixtures intentionally model the pre-transition
|
|
2966
3104
|
// schema. Delivery projection is additive there: absence means no verdict,
|
|
2967
3105
|
// never a list failure.
|
|
@@ -2971,26 +3109,65 @@ export class QueueRepository {
|
|
|
2971
3109
|
.get(qitemId);
|
|
2972
3110
|
if (!row)
|
|
2973
3111
|
return null;
|
|
2974
|
-
// The delivery episode uses row fields, not the waiting/backstop view.
|
|
2975
|
-
//
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
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 %'
|
|
2983
3148
|
OR transition_note LIKE 'slack-owner-notification-transport-failed %')
|
|
2984
|
-
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) {
|
|
2985
3162
|
const currentNotes = episode
|
|
2986
|
-
? notes.filter((note) => note.
|
|
3163
|
+
? notes.filter((note) => note.split(/\s+/).includes(`notification_key=${episode.notificationKey}`))
|
|
2987
3164
|
: notes;
|
|
2988
|
-
const posted = currentNotes.find((note) => note.
|
|
3165
|
+
const posted = currentNotes.find((note) => note.startsWith("slack-owner-notification-posted "));
|
|
2989
3166
|
if (posted)
|
|
2990
|
-
return { outcome: "posted", detail: posted
|
|
2991
|
-
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 "));
|
|
2992
3169
|
if (failed)
|
|
2993
|
-
return { outcome: "transport-failed", detail: failed
|
|
3170
|
+
return { outcome: "transport-failed", detail: failed, episode };
|
|
2994
3171
|
const startedAt = episode?.startedAt ?? item.tsCreated;
|
|
2995
3172
|
const gatewayRouted = episode !== null || item.lastNudgeResult?.startsWith("gateway-owned") === true;
|
|
2996
3173
|
if (gatewayRouted) {
|
|
@@ -3013,6 +3190,56 @@ export class QueueRepository {
|
|
|
3013
3190
|
WHERE qitem_id = ?`)
|
|
3014
3191
|
.run(ts, result, qitemId);
|
|
3015
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
|
+
}
|
|
3016
3243
|
/**
|
|
3017
3244
|
* Pod-fallback: redirect qitem to a fallback destination (e.g., when a seat
|
|
3018
3245
|
* is unreachable). Emits qitem.fallback_routed; preserves chain_of_record.
|
|
@@ -3025,6 +3252,16 @@ export class QueueRepository {
|
|
|
3025
3252
|
const ts = new Date().toISOString();
|
|
3026
3253
|
const originalDestination = qitem.destinationSession;
|
|
3027
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;
|
|
3028
3265
|
const txn = this.db.transaction(() => {
|
|
3029
3266
|
this.db
|
|
3030
3267
|
.prepare(`UPDATE queue_items
|
|
@@ -3033,7 +3270,7 @@ export class QueueRepository {
|
|
|
3033
3270
|
chain_of_record = ?,
|
|
3034
3271
|
resolution = ?
|
|
3035
3272
|
WHERE qitem_id = ?`)
|
|
3036
|
-
.run(fallbackDestination, ts, newChain,
|
|
3273
|
+
.run(fallbackDestination, ts, newChain, nextResolution, qitemId);
|
|
3037
3274
|
// A park timer targets the owner that parked the row. Once the row belongs to someone else it must not keep
|
|
3038
3275
|
// waking the old owner, so it ends here like any other exit from the park. A repeating wait is left running:
|
|
3039
3276
|
// it resolves its recipient from the row's current owner at delivery (evaluateQueueWait).
|
|
@@ -3044,7 +3281,7 @@ export class QueueRepository {
|
|
|
3044
3281
|
this.transitionLog.append({
|
|
3045
3282
|
qitemId,
|
|
3046
3283
|
state: qitem.state,
|
|
3047
|
-
actorSession:
|
|
3284
|
+
actorSession: FALLBACK_ACTOR,
|
|
3048
3285
|
transitionNote: `fallback-routed: ${originalDestination} → ${fallbackDestination} (${reason})`,
|
|
3049
3286
|
closureTarget: qitem.state === "in-progress" ? this.retainedClaimBlocker(qitemId) : undefined,
|
|
3050
3287
|
});
|
|
@@ -3160,12 +3397,13 @@ export class QueueRepository {
|
|
|
3160
3397
|
return null;
|
|
3161
3398
|
}
|
|
3162
3399
|
}
|
|
3163
|
-
|
|
3400
|
+
/** listed: the row's owner notifications and ledger, when a listing read them for all its rows. */
|
|
3401
|
+
waitingView(qitemId, listed) {
|
|
3164
3402
|
const view = readWaitingView(this.db, qitemId, this.activityReader);
|
|
3165
3403
|
if (view && ["pending", "in-progress"].includes(view.state)) {
|
|
3166
3404
|
// #514 — the unclaimed sweep skips a pending ask already posted to its human in the current
|
|
3167
3405
|
// episode (same predicate as runStuckSweep), so the view must not promise that sweep.
|
|
3168
|
-
const awaitingHuman = view.state === "pending" && this.humanNotificationPostedThisEpisode(qitemId);
|
|
3406
|
+
const awaitingHuman = view.state === "pending" && this.humanNotificationPostedThisEpisode(qitemId, listed);
|
|
3169
3407
|
if (awaitingHuman) {
|
|
3170
3408
|
view.nextBackstop = { owner: view.owner, mechanism: "none (posted to the human; awaiting their decision)", dueAt: null, intervalSeconds: null };
|
|
3171
3409
|
}
|
|
@@ -3186,14 +3424,7 @@ export class QueueRepository {
|
|
|
3186
3424
|
return undefined;
|
|
3187
3425
|
const target = row.closure_target;
|
|
3188
3426
|
try {
|
|
3189
|
-
|
|
3190
|
-
WHERE (s.qitem_id = ? OR s.destination_session = ?) AND s.qitem_id != ?
|
|
3191
|
-
AND (s.handed_off_from = ? OR EXISTS (
|
|
3192
|
-
SELECT 1 FROM json_each(s.chain_of_record) WHERE value = ?
|
|
3193
|
-
)) LIMIT 1`).get(target, target, row.qitem_id, row.qitem_id, row.qitem_id);
|
|
3194
|
-
// A linked row may have handed on to another owner. Its current state
|
|
3195
|
-
// does not establish whether later hops still hold the work.
|
|
3196
|
-
if (successor)
|
|
3427
|
+
if (hasLinkedSuccessor(this.db, row.qitem_id, target))
|
|
3197
3428
|
return undefined;
|
|
3198
3429
|
}
|
|
3199
3430
|
catch {
|
|
@@ -3207,15 +3438,15 @@ export class QueueRepository {
|
|
|
3207
3438
|
target,
|
|
3208
3439
|
reason: "no-live-local-successor",
|
|
3209
3440
|
message: foreignTarget
|
|
3210
|
-
? `Successor custody for '${target}' is unverified on this daemon: the successor is named on that host, and this daemon cannot read its custody. This closure records a handoff claim, not proof of transfer or pickup.`
|
|
3211
|
-
: `Successor custody for '${target}' is unverified on this daemon: no local row with this source's lineage was found. A successor may exist on another host. This closure records a handoff claim, not proof of transfer or pickup; reconcile the successor by ID.`,
|
|
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.`,
|
|
3212
3443
|
};
|
|
3213
3444
|
}
|
|
3214
|
-
rowToItem(row, includeWaiting = true) {
|
|
3445
|
+
rowToItem(row, includeWaiting = true, listed) {
|
|
3215
3446
|
// S04 — derive the pickup receipt at the ONE shared projection point (list/show/overdue
|
|
3216
3447
|
// all flow through here), so the park-vs-strand question is answered by the row face.
|
|
3217
3448
|
const meaningful = lastMeaningfulTransition(this.db, row.qitem_id);
|
|
3218
|
-
const waiting = includeWaiting ? this.waitingView(row.qitem_id) : null;
|
|
3449
|
+
const waiting = includeWaiting ? this.waitingView(row.qitem_id, listed) : null;
|
|
3219
3450
|
const activity = this.ownerActivity(row.destination_session);
|
|
3220
3451
|
const pickup = derivePickup({
|
|
3221
3452
|
state: row.state,
|
|
@@ -3272,6 +3503,20 @@ export class QueueRepository {
|
|
|
3272
3503
|
};
|
|
3273
3504
|
}
|
|
3274
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
|
+
}
|
|
3275
3520
|
function isQueueState(value) {
|
|
3276
3521
|
return typeof value === "string" && QUEUE_STATES.includes(value);
|
|
3277
3522
|
}
|