@openrig/cli 0.6.14 → 0.7.1
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 +14 -12
- package/daemon/assets/claude-statusline-context.cjs +13 -3
- package/daemon/assets/guidance/openrig-seat-skills.md +1 -0
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/README.md +11 -4
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +11 -11
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +6 -6
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +22 -9
- package/daemon/assets/plugins/openrig-core/hooks/scripts/codex-hook-trust.cjs +49 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +2 -2
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +35 -11
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +9 -2
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +1 -1
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +16 -10
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +43 -4
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +2 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +192 -61
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +10 -4
- package/daemon/assets/skills/rigs/SKILL.md +26 -6
- 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 +209 -33
- package/daemon/context-packs/reference/getting-started.md +148 -23
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +83 -3
- package/daemon/context-packs/reference/whats-new.md +173 -69
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +9 -2
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +43 -4
- 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/SKILL.md +3 -0
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +2 -2
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +2 -2
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +11 -5
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +16 -10
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +192 -61
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/SKILL.md +2 -0
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +3 -1
- package/daemon/context-packs/skills/pods/development-team/references/refactoring.md +11 -0
- 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/SKILL.md +46 -96
- 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/SKILL.md +17 -80
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +5 -3
- package/daemon/context-packs/skills/process/verification-before-completion/references/performance-claims.md +12 -0
- package/daemon/context-packs/skills/queue-handoff/SKILL.md +10 -4
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +6 -2
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +127 -32
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +2 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +10 -3
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +2 -7
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +75 -3
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +592 -91
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +21 -2
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +90 -8
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.d.ts +16 -0
- package/daemon/dist/adapters/compose-services-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js +52 -9
- package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +9 -5
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +13 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +64 -16
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +9 -6
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/runtime-probe-exec.d.ts +11 -0
- package/daemon/dist/adapters/runtime-probe-exec.d.ts.map +1 -0
- package/daemon/dist/adapters/runtime-probe-exec.js +25 -0
- package/daemon/dist/adapters/runtime-probe-exec.js.map +1 -0
- package/daemon/dist/adapters/stub-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runner.js +2 -0
- package/daemon/dist/adapters/stub-runner.js.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +9 -5
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +36 -5
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +162 -33
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/attention-surface.d.ts +14 -0
- package/daemon/dist/attention-surface.d.ts.map +1 -1
- package/daemon/dist/attention-surface.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/daemon-db-path.d.ts +6 -0
- package/daemon/dist/daemon-db-path.d.ts.map +1 -1
- package/daemon/dist/daemon-db-path.js +65 -1
- package/daemon/dist/daemon-db-path.js.map +1 -1
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +4 -2
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +28 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/116_queue_item_wake_input_box.d.ts +3 -0
- package/daemon/dist/db/migrations/116_queue_item_wake_input_box.d.ts.map +1 -0
- package/daemon/dist/db/migrations/116_queue_item_wake_input_box.js +8 -0
- package/daemon/dist/db/migrations/116_queue_item_wake_input_box.js.map +1 -0
- package/daemon/dist/db/migrations/118_human_quiet_windows.d.ts +3 -0
- package/daemon/dist/db/migrations/118_human_quiet_windows.d.ts.map +1 -0
- package/daemon/dist/db/migrations/118_human_quiet_windows.js +30 -0
- package/daemon/dist/db/migrations/118_human_quiet_windows.js.map +1 -0
- package/daemon/dist/db/migrations/119_seat_identity_pane_pid.d.ts +3 -0
- package/daemon/dist/db/migrations/119_seat_identity_pane_pid.d.ts.map +1 -0
- package/daemon/dist/db/migrations/119_seat_identity_pane_pid.js +7 -0
- package/daemon/dist/db/migrations/119_seat_identity_pane_pid.js.map +1 -0
- package/daemon/dist/db/migrations/121_rig_startup_layers.d.ts +13 -0
- package/daemon/dist/db/migrations/121_rig_startup_layers.d.ts.map +1 -0
- package/daemon/dist/db/migrations/121_rig_startup_layers.js +17 -0
- package/daemon/dist/db/migrations/121_rig_startup_layers.js.map +1 -0
- package/daemon/dist/db/migrations/122_human_operating_modes.d.ts +3 -0
- package/daemon/dist/db/migrations/122_human_operating_modes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/122_human_operating_modes.js +55 -0
- package/daemon/dist/db/migrations/122_human_operating_modes.js.map +1 -0
- package/daemon/dist/db/migrations/123_queue_delegated_decision.d.ts +3 -0
- package/daemon/dist/db/migrations/123_queue_delegated_decision.d.ts.map +1 -0
- package/daemon/dist/db/migrations/123_queue_delegated_decision.js +10 -0
- package/daemon/dist/db/migrations/123_queue_delegated_decision.js.map +1 -0
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.d.ts +4 -0
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.d.ts.map +1 -0
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.js +9 -0
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.js.map +1 -0
- package/daemon/dist/db/migrations/125_node_advisor.d.ts +3 -0
- package/daemon/dist/db/migrations/125_node_advisor.d.ts.map +1 -0
- package/daemon/dist/db/migrations/125_node_advisor.js +8 -0
- package/daemon/dist/db/migrations/125_node_advisor.js.map +1 -0
- package/daemon/dist/db/migrations/127_operation_correlation.d.ts +3 -0
- package/daemon/dist/db/migrations/127_operation_correlation.d.ts.map +1 -0
- package/daemon/dist/db/migrations/127_operation_correlation.js +10 -0
- package/daemon/dist/db/migrations/127_operation_correlation.js.map +1 -0
- package/daemon/dist/db/migrations/128_terminal_policy.d.ts +3 -0
- package/daemon/dist/db/migrations/128_terminal_policy.d.ts.map +1 -0
- package/daemon/dist/db/migrations/128_terminal_policy.js +37 -0
- package/daemon/dist/db/migrations/128_terminal_policy.js.map +1 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.d.ts +10 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.js +35 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.js.map +1 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.d.ts +11 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.js +33 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.js.map +1 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.d.ts +8 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.d.ts.map +1 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.js +20 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.js.map +1 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.d.ts +3 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.d.ts.map +1 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.js +16 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.js.map +1 -0
- package/daemon/dist/domain/active-occupant.d.ts +8 -3
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +8 -4
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.d.ts +19 -1
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js +21 -0
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +24 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +50 -5
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/evidence-guard.js +3 -3
- package/daemon/dist/domain/agent-images/evidence-guard.js.map +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.js +2 -10
- package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +14 -2
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/ask-service.d.ts +1 -0
- package/daemon/dist/domain/ask-service.d.ts.map +1 -1
- package/daemon/dist/domain/ask-service.js +7 -1
- package/daemon/dist/domain/ask-service.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts +5 -0
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +25 -12
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.d.ts.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.js +2 -0
- package/daemon/dist/domain/builtin-startup-files.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.js +28 -1
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts +20 -2
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +74 -19
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/classification-attempts.d.ts +4 -1
- package/daemon/dist/domain/classification-attempts.d.ts.map +1 -1
- package/daemon/dist/domain/classification-attempts.js +10 -1
- package/daemon/dist/domain/classification-attempts.js.map +1 -1
- package/daemon/dist/domain/classification-sources.d.ts +38 -0
- package/daemon/dist/domain/classification-sources.d.ts.map +1 -1
- package/daemon/dist/domain/classification-sources.js +26 -1
- package/daemon/dist/domain/classification-sources.js.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.d.ts +2 -2
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +8 -7
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +126 -11
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +527 -68
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts +14 -0
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.js +37 -11
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.d.ts +1 -1
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +33 -15
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/codex-core-plugin-install.d.ts +41 -0
- package/daemon/dist/domain/codex-core-plugin-install.d.ts.map +1 -0
- package/daemon/dist/domain/codex-core-plugin-install.js +126 -0
- package/daemon/dist/domain/codex-core-plugin-install.js.map +1 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts +26 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.js +187 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -0
- package/daemon/dist/domain/codex-rebuild-permissions.d.ts +54 -0
- package/daemon/dist/domain/codex-rebuild-permissions.d.ts.map +1 -0
- package/daemon/dist/domain/codex-rebuild-permissions.js +134 -0
- package/daemon/dist/domain/codex-rebuild-permissions.js.map +1 -0
- package/daemon/dist/domain/codex-thread-id.d.ts +23 -1
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +58 -17
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/community-harness-launch-result.d.ts +33 -0
- package/daemon/dist/domain/community-harness-launch-result.d.ts.map +1 -0
- package/daemon/dist/domain/community-harness-launch-result.js +93 -0
- package/daemon/dist/domain/community-harness-launch-result.js.map +1 -0
- package/daemon/dist/domain/community-harness-presets.d.ts +27 -2
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +49 -5
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/composer-prompts.d.ts +5 -2
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -1
- package/daemon/dist/domain/composer-prompts.js +2 -2
- package/daemon/dist/domain/composer-prompts.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +13 -5
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +49 -14
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +3 -0
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.d.ts +1 -0
- package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.js +2 -0
- package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +18 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +17 -3
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts +7 -7
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +61 -82
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +9 -7
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.d.ts +110 -0
- package/daemon/dist/domain/existing-rig-restore.d.ts.map +1 -0
- package/daemon/dist/domain/existing-rig-restore.js +254 -0
- package/daemon/dist/domain/existing-rig-restore.js.map +1 -0
- package/daemon/dist/domain/footprint-choice.d.ts +41 -0
- package/daemon/dist/domain/footprint-choice.d.ts.map +1 -0
- package/daemon/dist/domain/footprint-choice.js +42 -0
- package/daemon/dist/domain/footprint-choice.js.map +1 -0
- package/daemon/dist/domain/fresh-occupant-relation.d.ts.map +1 -1
- package/daemon/dist/domain/fresh-occupant-relation.js +9 -2
- package/daemon/dist/domain/fresh-occupant-relation.js.map +1 -1
- package/daemon/dist/domain/gateway/channel-operations.d.ts +3 -4
- package/daemon/dist/domain/gateway/channel-operations.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/channel-operations.js.map +1 -1
- package/daemon/dist/domain/gateway/connections-projection.d.ts +0 -5
- package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/connections-projection.js +3 -46
- package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
- package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts +14 -1
- package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/delivery-rules-engine.js +13 -3
- package/daemon/dist/domain/gateway/delivery-rules-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/dispatch-buffer.d.ts +4 -0
- package/daemon/dist/domain/gateway/dispatch-buffer.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/dispatch-buffer.js +18 -0
- package/daemon/dist/domain/gateway/dispatch-buffer.js.map +1 -1
- package/daemon/dist/domain/gateway/human-mode-account.d.ts +61 -0
- package/daemon/dist/domain/gateway/human-mode-account.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/human-mode-account.js +112 -0
- package/daemon/dist/domain/gateway/human-mode-account.js.map +1 -0
- package/daemon/dist/domain/gateway/human-operating-modes.d.ts +171 -0
- package/daemon/dist/domain/gateway/human-operating-modes.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/human-operating-modes.js +422 -0
- package/daemon/dist/domain/gateway/human-operating-modes.js.map +1 -0
- package/daemon/dist/domain/gateway/human-quiet-windows.d.ts +121 -0
- package/daemon/dist/domain/gateway/human-quiet-windows.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/human-quiet-windows.js +217 -0
- package/daemon/dist/domain/gateway/human-quiet-windows.js.map +1 -0
- package/daemon/dist/domain/gateway/human-registry.d.ts +55 -2
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +137 -8
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +9 -0
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +10 -2
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +76 -6
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +13 -2
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +9 -3
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.js +40 -6
- package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +7 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +14 -2
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +17 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +143 -56
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +3 -2
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +266 -51
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/generated-file-hygiene.js +1 -1
- package/daemon/dist/domain/generated-file-hygiene.js.map +1 -1
- package/daemon/dist/domain/graph-projection.d.ts +3 -0
- package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
- package/daemon/dist/domain/graph-projection.js +2 -0
- package/daemon/dist/domain/graph-projection.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +14 -6
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts +4 -0
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +34 -4
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts +3 -1
- package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-reader.js +9 -9
- package/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -1
- package/daemon/dist/domain/hosts/learned-host-bindings.d.ts +28 -0
- package/daemon/dist/domain/hosts/learned-host-bindings.d.ts.map +1 -0
- package/daemon/dist/domain/hosts/learned-host-bindings.js +77 -0
- package/daemon/dist/domain/hosts/learned-host-bindings.js.map +1 -0
- package/daemon/dist/domain/hot-potato-enforcer.d.ts +7 -5
- package/daemon/dist/domain/hot-potato-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.js +19 -10
- package/daemon/dist/domain/hot-potato-enforcer.js.map +1 -1
- package/daemon/dist/domain/human-questions.d.ts +10 -1
- package/daemon/dist/domain/human-questions.d.ts.map +1 -1
- package/daemon/dist/domain/human-questions.js +5 -0
- package/daemon/dist/domain/human-questions.js.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.d.ts +17 -1
- package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.js +44 -3
- package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -1
- package/daemon/dist/domain/kernel-boot.d.ts +26 -1
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot.js +91 -6
- package/daemon/dist/domain/kernel-boot.js.map +1 -1
- package/daemon/dist/domain/managed-blocks.d.ts +32 -1
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +109 -11
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js +3 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +21 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +110 -0
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +2 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +8 -3
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts +2 -0
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.js +7 -0
- package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +10 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +24 -5
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +3 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +103 -17
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe-evidence.d.ts +19 -0
- package/daemon/dist/domain/native-resume-probe-evidence.d.ts.map +1 -0
- package/daemon/dist/domain/native-resume-probe-evidence.js +37 -0
- package/daemon/dist/domain/native-resume-probe-evidence.js.map +1 -0
- package/daemon/dist/domain/native-resume-probe.d.ts +7 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +12 -9
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +49 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +145 -57
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +5 -3
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +36 -26
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts +16 -4
- package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.js +25 -5
- package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts +78 -0
- package/daemon/dist/domain/operation-correlation.d.ts.map +1 -0
- package/daemon/dist/domain/operation-correlation.js +54 -0
- package/daemon/dist/domain/operation-correlation.js.map +1 -0
- package/daemon/dist/domain/outbox-handler.d.ts +3 -5
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +9 -19
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/park-wake-text.d.ts +11 -0
- package/daemon/dist/domain/park-wake-text.d.ts.map +1 -0
- package/daemon/dist/domain/park-wake-text.js +26 -0
- package/daemon/dist/domain/park-wake-text.js.map +1 -0
- package/daemon/dist/domain/permission-account.d.ts +28 -0
- package/daemon/dist/domain/permission-account.d.ts.map +1 -0
- package/daemon/dist/domain/permission-account.js +102 -0
- package/daemon/dist/domain/permission-account.js.map +1 -0
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js +11 -7
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.d.ts +4 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +29 -6
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +1 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +25 -0
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts +7 -0
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.js +8 -4
- package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -1
- package/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -1
- package/daemon/dist/domain/policies/context-usage-threshold.js +109 -21
- package/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -1
- package/daemon/dist/domain/policies/delivery-digest-flush.d.ts +1 -0
- package/daemon/dist/domain/policies/delivery-digest-flush.d.ts.map +1 -1
- package/daemon/dist/domain/policies/delivery-digest-flush.js +25 -4
- package/daemon/dist/domain/policies/delivery-digest-flush.js.map +1 -1
- package/daemon/dist/domain/policies/edge-artifact-required.d.ts +6 -1
- package/daemon/dist/domain/policies/edge-artifact-required.d.ts.map +1 -1
- package/daemon/dist/domain/policies/edge-artifact-required.js +18 -13
- package/daemon/dist/domain/policies/edge-artifact-required.js.map +1 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.d.ts +39 -0
- package/daemon/dist/domain/policies/mode-scheduled-end.d.ts.map +1 -0
- package/daemon/dist/domain/policies/mode-scheduled-end.js +165 -0
- package/daemon/dist/domain/policies/mode-scheduled-end.js.map +1 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +11 -7
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +82 -113
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/policies/periodic-reminder.d.ts +10 -0
- package/daemon/dist/domain/policies/periodic-reminder.d.ts.map +1 -1
- package/daemon/dist/domain/policies/periodic-reminder.js +11 -6
- package/daemon/dist/domain/policies/periodic-reminder.js.map +1 -1
- package/daemon/dist/domain/policies/quiet-release.d.ts +109 -0
- package/daemon/dist/domain/policies/quiet-release.d.ts.map +1 -0
- package/daemon/dist/domain/policies/quiet-release.js +213 -0
- package/daemon/dist/domain/policies/quiet-release.js.map +1 -0
- package/daemon/dist/domain/policies/types.d.ts +25 -0
- package/daemon/dist/domain/policies/types.d.ts.map +1 -1
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts +6 -1
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
- package/daemon/dist/domain/policies/workflow-keepalive.js +11 -5
- package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
- package/daemon/dist/domain/profile-resolution-worker.d.ts +7 -0
- package/daemon/dist/domain/profile-resolution-worker.d.ts.map +1 -0
- package/daemon/dist/domain/profile-resolution-worker.js +83 -0
- package/daemon/dist/domain/profile-resolution-worker.js.map +1 -0
- package/daemon/dist/domain/profile-resolver.d.ts +6 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +20 -3
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/project-classifier.d.ts +7 -0
- package/daemon/dist/domain/project-classifier.d.ts.map +1 -1
- package/daemon/dist/domain/project-classifier.js +26 -0
- package/daemon/dist/domain/project-classifier.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +2 -2
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/subscription-move-report.d.ts +86 -0
- package/daemon/dist/domain/provider/subscription-move-report.d.ts.map +1 -0
- package/daemon/dist/domain/provider/subscription-move-report.js +227 -0
- package/daemon/dist/domain/provider/subscription-move-report.js.map +1 -0
- package/daemon/dist/domain/ps-projection.d.ts +6 -35
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +14 -55
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-destination-check.d.ts +6 -0
- package/daemon/dist/domain/queue-destination-check.d.ts.map +1 -0
- package/daemon/dist/domain/queue-destination-check.js +35 -0
- package/daemon/dist/domain/queue-destination-check.js.map +1 -0
- package/daemon/dist/domain/queue-owner.d.ts +6 -3
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +12 -6
- package/daemon/dist/domain/queue-owner.js.map +1 -1
- package/daemon/dist/domain/queue-pickup.d.ts +5 -2
- package/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
- package/daemon/dist/domain/queue-pickup.js +19 -2
- package/daemon/dist/domain/queue-pickup.js.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +3 -2
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +146 -72
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +505 -169
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +18 -0
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +74 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +15 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +132 -16
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +5 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +25 -8
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wait-backoff.d.ts +3 -0
- package/daemon/dist/domain/queue-wait-backoff.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wait-backoff.js +9 -0
- package/daemon/dist/domain/queue-wait-backoff.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts +2 -0
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +2 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +112 -17
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/quiet-hold-custody.d.ts +24 -0
- package/daemon/dist/domain/quiet-hold-custody.d.ts.map +1 -0
- package/daemon/dist/domain/quiet-hold-custody.js +85 -0
- package/daemon/dist/domain/quiet-hold-custody.js.map +1 -0
- package/daemon/dist/domain/reconciler.d.ts +23 -0
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +44 -1
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts +12 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +47 -10
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +7 -0
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +20 -8
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +24 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +295 -41
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts +10 -3
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +56 -18
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-policy.d.ts +4 -0
- package/daemon/dist/domain/restore-policy.d.ts.map +1 -1
- package/daemon/dist/domain/restore-policy.js +11 -0
- package/daemon/dist/domain/restore-policy.js.map +1 -1
- package/daemon/dist/domain/review/gather.d.ts.map +1 -1
- package/daemon/dist/domain/review/gather.js +8 -5
- package/daemon/dist/domain/review/gather.js.map +1 -1
- package/daemon/dist/domain/rig-edge-ops.d.ts +58 -0
- package/daemon/dist/domain/rig-edge-ops.d.ts.map +1 -0
- package/daemon/dist/domain/rig-edge-ops.js +113 -0
- package/daemon/dist/domain/rig-edge-ops.js.map +1 -0
- package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.js +3 -1
- package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -1
- package/daemon/dist/domain/rig-name-override.d.ts +14 -0
- package/daemon/dist/domain/rig-name-override.d.ts.map +1 -0
- package/daemon/dist/domain/rig-name-override.js +38 -0
- package/daemon/dist/domain/rig-name-override.js.map +1 -0
- package/daemon/dist/domain/rig-repository.d.ts +19 -1
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +41 -3
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-status-compose.d.ts +1 -1
- package/daemon/dist/domain/rig-status-compose.d.ts.map +1 -1
- package/daemon/dist/domain/rig-status-compose.js +3 -1
- package/daemon/dist/domain/rig-status-compose.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +19 -0
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +109 -12
- 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 +10 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts +3 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +22 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +39 -2
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +319 -73
- 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 +15 -2
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts +8 -0
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +97 -3
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +47 -3
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js +5 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.d.ts +6 -0
- package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.js +26 -10
- package/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +22 -5
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +137 -62
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +27 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +63 -7
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +20 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +87 -16
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +10 -2
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +100 -4
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-identity-store.d.ts +11 -1
- package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-store.js +32 -4
- package/daemon/dist/domain/seat-identity-store.js.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.d.ts +115 -0
- package/daemon/dist/domain/seat-launch-additions.d.ts.map +1 -0
- package/daemon/dist/domain/seat-launch-additions.js +439 -0
- package/daemon/dist/domain/seat-launch-additions.js.map +1 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +18 -2
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +83 -4
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +202 -12
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +33 -14
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +102 -30
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts +139 -0
- package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -0
- package/daemon/dist/domain/seat-skill-apply.js +221 -0
- package/daemon/dist/domain/seat-skill-apply.js.map +1 -0
- package/daemon/dist/domain/seat-skill-storage.d.ts +295 -0
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -0
- package/daemon/dist/domain/seat-skill-storage.js +850 -0
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -0
- package/daemon/dist/domain/seat-status-service.d.ts +9 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +15 -3
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/self-attach-service.d.ts +3 -2
- package/daemon/dist/domain/self-attach-service.d.ts.map +1 -1
- package/daemon/dist/domain/self-attach-service.js +18 -1
- package/daemon/dist/domain/self-attach-service.js.map +1 -1
- package/daemon/dist/domain/services-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/services-readiness.js +14 -3
- package/daemon/dist/domain/services-readiness.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +49 -0
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +137 -0
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +76 -27
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +202 -82
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +16 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +15 -6
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts +24 -3
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/skill-discovery.js +85 -12
- package/daemon/dist/domain/skill-discovery.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +1 -0
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +23 -10
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +47 -5
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +291 -29
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +4 -11
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +11 -17
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/stream-dispositions.d.ts +51 -0
- package/daemon/dist/domain/stream-dispositions.d.ts.map +1 -0
- package/daemon/dist/domain/stream-dispositions.js +112 -0
- package/daemon/dist/domain/stream-dispositions.js.map +1 -0
- package/daemon/dist/domain/stream-store.d.ts +22 -0
- package/daemon/dist/domain/stream-store.d.ts.map +1 -1
- package/daemon/dist/domain/stream-store.js +49 -6
- package/daemon/dist/domain/stream-store.js.map +1 -1
- package/daemon/dist/domain/stream-subscriptions.d.ts +94 -0
- package/daemon/dist/domain/stream-subscriptions.d.ts.map +1 -0
- package/daemon/dist/domain/stream-subscriptions.js +160 -0
- package/daemon/dist/domain/stream-subscriptions.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +8 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +6 -1
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +3 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +125 -4
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts +9 -0
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-sessions.js +23 -0
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +4 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +12 -3
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +42 -17
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +1 -0
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/terminal-policy.d.ts +80 -0
- package/daemon/dist/domain/terminal-policy.d.ts.map +1 -0
- package/daemon/dist/domain/terminal-policy.js +117 -0
- package/daemon/dist/domain/terminal-policy.js.map +1 -0
- package/daemon/dist/domain/terminal-seat.d.ts +9 -0
- package/daemon/dist/domain/terminal-seat.d.ts.map +1 -0
- package/daemon/dist/domain/terminal-seat.js +37 -0
- package/daemon/dist/domain/terminal-seat.js.map +1 -0
- package/daemon/dist/domain/topology-converge.d.ts +25 -2
- package/daemon/dist/domain/topology-converge.d.ts.map +1 -1
- package/daemon/dist/domain/topology-converge.js +14 -1
- package/daemon/dist/domain/topology-converge.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +73 -6
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/urgent-line.d.ts +4 -0
- package/daemon/dist/domain/urgent-line.d.ts.map +1 -0
- package/daemon/dist/domain/urgent-line.js +7 -0
- package/daemon/dist/domain/urgent-line.js.map +1 -0
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +6 -2
- package/daemon/dist/domain/usage-series.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +4 -2
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +3 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +106 -8
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/view-projector.d.ts.map +1 -1
- package/daemon/dist/domain/view-projector.js +2 -1
- package/daemon/dist/domain/view-projector.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts +3 -23
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +12 -89
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.d.ts +5 -2
- package/daemon/dist/domain/watchdog-history-log.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.js.map +1 -1
- package/daemon/dist/domain/watchdog-job-update.d.ts +21 -0
- package/daemon/dist/domain/watchdog-job-update.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-job-update.js +143 -0
- package/daemon/dist/domain/watchdog-job-update.js.map +1 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +65 -9
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +194 -21
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +39 -24
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +89 -55
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +2 -0
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +23 -6
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow-boot-sweep.d.ts +2 -1
- package/daemon/dist/domain/workflow-boot-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-boot-sweep.js +11 -5
- package/daemon/dist/domain/workflow-boot-sweep.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +9 -4
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +5 -2
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +21 -9
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-role-context.js +2 -2
- package/daemon/dist/domain/workflow-role-context.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +8 -2
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +32 -7
- package/daemon/dist/domain/workflow-runtime.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 +10 -1
- 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 +2 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/router-line-surface.d.ts +2 -0
- package/daemon/dist/router-line-surface.d.ts.map +1 -0
- package/daemon/dist/router-line-surface.js +3 -0
- package/daemon/dist/router-line-surface.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts +13 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +70 -2
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/agent-images.d.ts.map +1 -1
- package/daemon/dist/routes/agent-images.js +12 -2
- package/daemon/dist/routes/agent-images.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +30 -3
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/bootstrap-failure-response.js +2 -2
- package/daemon/dist/routes/bootstrap-failure-response.js.map +1 -1
- package/daemon/dist/routes/bundles.js +1 -1
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +38 -12
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/discovery.js +3 -0
- package/daemon/dist/routes/discovery.js.map +1 -1
- package/daemon/dist/routes/down.js +9 -1
- package/daemon/dist/routes/down.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts +2 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +181 -1
- 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 -0
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/kernel-status.js +6 -1
- package/daemon/dist/routes/kernel-status.js.map +1 -1
- package/daemon/dist/routes/mission-control.d.ts.map +1 -1
- package/daemon/dist/routes/mission-control.js +5 -1
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/projects.d.ts.map +1 -1
- package/daemon/dist/routes/projects.js +59 -12
- package/daemon/dist/routes/projects.js.map +1 -1
- package/daemon/dist/routes/proof.js +2 -2
- package/daemon/dist/routes/proof.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +87 -73
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +125 -16
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +104 -20
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/rigspec.d.ts.map +1 -1
- package/daemon/dist/routes/rigspec.js +40 -15
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/scopes.d.ts.map +1 -1
- package/daemon/dist/routes/scopes.js +30 -7
- package/daemon/dist/routes/scopes.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +21 -5
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +5 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/skills.d.ts.map +1 -1
- package/daemon/dist/routes/skills.js +55 -2
- package/daemon/dist/routes/skills.js.map +1 -1
- package/daemon/dist/routes/stream.d.ts.map +1 -1
- package/daemon/dist/routes/stream.js +62 -13
- package/daemon/dist/routes/stream.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +20 -11
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +7 -3
- 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 +25 -3
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +41 -52
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/watchdog.d.ts +1 -0
- package/daemon/dist/routes/watchdog.d.ts.map +1 -1
- package/daemon/dist/routes/watchdog.js +52 -3
- package/daemon/dist/routes/watchdog.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +24 -13
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +2 -0
- 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/skill-loadout-surface.d.ts +2 -0
- package/daemon/dist/skill-loadout-surface.d.ts.map +1 -1
- package/daemon/dist/skill-loadout-surface.js +2 -0
- package/daemon/dist/skill-loadout-surface.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +156 -81
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +9 -2
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/docs/reference/a2a-agents.md +343 -0
- package/daemon/docs/reference/acp-agents.md +77 -0
- package/daemon/docs/reference/agent-spec.md +7 -5
- package/daemon/docs/reference/agent-startup-guide.md +46 -0
- package/daemon/docs/reference/agent-state-taxonomy.md +43 -3
- package/daemon/docs/reference/checked-seat-stop.md +11 -0
- package/daemon/docs/reference/community-harness-examples/cursor/cursor.yaml +13 -0
- package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +61 -0
- package/daemon/docs/reference/community-harness-examples/hermes/config.yaml.example +18 -0
- package/daemon/docs/reference/community-harness-examples/hermes/hermes.yaml +12 -0
- package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +34 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openclaw.yaml +13 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +38 -0
- package/daemon/docs/reference/community-harness-presets.md +179 -0
- package/daemon/docs/reference/getting-started.md +148 -23
- package/daemon/docs/reference/operation-correlation.md +9 -0
- package/daemon/docs/reference/project-workspace.md +6 -0
- package/daemon/docs/reference/quickstart.md +33 -20
- package/daemon/docs/reference/refocus-channel.md +11 -3
- package/daemon/docs/reference/rig-spec.md +83 -3
- package/daemon/docs/reference/seat-delivery.md +130 -20
- package/daemon/docs/reference/slack-app-setup.md +52 -3
- package/daemon/docs/reference/stream-classifier-worker.md +28 -0
- package/daemon/docs/reference/telemetry.md +3 -0
- package/daemon/docs/reference/terminal-sessions.md +90 -0
- package/daemon/docs/reference/topology-naming.md +1 -1
- package/daemon/docs/reference/whats-new.md +173 -69
- package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +0 -3
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +43 -4
- package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +3 -0
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +2 -2
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +2 -2
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +11 -5
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +2 -0
- package/daemon/specs/agents/shared/skills/pods/development-team/references/refactoring.md +11 -0
- package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +46 -96
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +17 -80
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/references/performance-claims.md +12 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +129 -24
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +11 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +3 -1
- package/daemon/specs/rigs/launch/secrets-manager/secrets-manager.compose.yaml +1 -1
- package/dist/acp/connector.d.ts +72 -0
- package/dist/acp/connector.d.ts.map +1 -0
- package/dist/acp/connector.js +218 -0
- package/dist/acp/connector.js.map +1 -0
- package/dist/acp/json-rpc-stdio.d.ts +53 -0
- package/dist/acp/json-rpc-stdio.d.ts.map +1 -0
- package/dist/acp/json-rpc-stdio.js +141 -0
- package/dist/acp/json-rpc-stdio.js.map +1 -0
- package/dist/acp/run-processes.d.ts +10 -0
- package/dist/acp/run-processes.d.ts.map +1 -0
- package/dist/acp/run-processes.js +33 -0
- package/dist/acp/run-processes.js.map +1 -0
- package/dist/build-info.js +3 -3
- package/dist/cli-error.d.ts +4 -0
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +6 -0
- package/dist/cli-error.js.map +1 -1
- package/dist/client.d.ts +7 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +14 -7
- package/dist/client.js.map +1 -1
- package/dist/commands/acp.d.ts +11 -0
- package/dist/commands/acp.d.ts.map +1 -0
- package/dist/commands/acp.js +198 -0
- package/dist/commands/acp.js.map +1 -0
- package/dist/commands/agent-image.d.ts.map +1 -1
- package/dist/commands/agent-image.js +15 -7
- package/dist/commands/agent-image.js.map +1 -1
- package/dist/commands/archive.d.ts.map +1 -1
- package/dist/commands/archive.js +17 -3
- package/dist/commands/archive.js.map +1 -1
- package/dist/commands/attach.d.ts.map +1 -1
- package/dist/commands/attach.js +7 -5
- package/dist/commands/attach.js.map +1 -1
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +39 -10
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/broadcast.js +2 -0
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/community-harness.d.ts.map +1 -1
- package/dist/commands/community-harness.js +2 -1
- package/dist/commands/community-harness.js.map +1 -1
- package/dist/commands/compact-plan.d.ts +2 -0
- package/dist/commands/compact-plan.d.ts.map +1 -1
- package/dist/commands/compact-plan.js +40 -4
- package/dist/commands/compact-plan.js.map +1 -1
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +11 -4
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +17 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +16 -9
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/create.js +2 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +2 -0
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/down.d.ts +5 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +87 -3
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/edge.d.ts +4 -0
- package/dist/commands/edge.d.ts.map +1 -0
- package/dist/commands/edge.js +135 -0
- package/dist/commands/edge.js.map +1 -0
- package/dist/commands/expand.d.ts.map +1 -1
- package/dist/commands/expand.js +16 -2
- package/dist/commands/expand.js.map +1 -1
- package/dist/commands/export.d.ts +1 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +60 -2
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/fork.d.ts.map +1 -1
- package/dist/commands/fork.js +22 -3
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/gateway.d.ts +39 -0
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +311 -3
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/grow.js +2 -2
- package/dist/commands/grow.js.map +1 -1
- package/dist/commands/health.js +3 -2
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/host.d.ts +1 -1
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +2 -2
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +10 -3
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +113 -1
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/plugin.d.ts.map +1 -1
- package/dist/commands/plugin.js +2 -1
- package/dist/commands/plugin.js.map +1 -1
- package/dist/commands/project-worker.d.ts +25 -1
- package/dist/commands/project-worker.d.ts.map +1 -1
- package/dist/commands/project-worker.js +9 -7
- package/dist/commands/project-worker.js.map +1 -1
- package/dist/commands/project.d.ts +2 -0
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +64 -1
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +72 -44
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +16 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +145 -52
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +7 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +97 -13
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/reconcile-session.d.ts.map +1 -1
- package/dist/commands/reconcile-session.js +6 -0
- package/dist/commands/reconcile-session.js.map +1 -1
- package/dist/commands/release.d.ts.map +1 -1
- package/dist/commands/release.js +16 -2
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/restore-check.d.ts.map +1 -1
- package/dist/commands/restore-check.js +2 -1
- package/dist/commands/restore-check.js.map +1 -1
- package/dist/commands/restore-packet.d.ts.map +1 -1
- package/dist/commands/restore-packet.js +2 -1
- package/dist/commands/restore-packet.js.map +1 -1
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +23 -6
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +5 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts +2 -0
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +124 -10
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +87 -56
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +27 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +189 -16
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/shrink.d.ts.map +1 -1
- package/dist/commands/shrink.js +16 -2
- package/dist/commands/shrink.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +116 -3
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +11 -24
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/snapshot.d.ts.map +1 -1
- package/dist/commands/snapshot.js +36 -10
- package/dist/commands/snapshot.js.map +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +11 -5
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +54 -35
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +8 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stream-outcome.d.ts +157 -0
- package/dist/commands/stream-outcome.d.ts.map +1 -0
- package/dist/commands/stream-outcome.js +81 -0
- package/dist/commands/stream-outcome.js.map +1 -0
- package/dist/commands/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +64 -2
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/terminal.d.ts +1 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +35 -6
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/topology-default-agent.d.ts +2 -2
- package/dist/commands/topology-default-agent.d.ts.map +1 -1
- package/dist/commands/topology-default-agent.js +5 -3
- package/dist/commands/topology-default-agent.js.map +1 -1
- package/dist/commands/transcript.d.ts.map +1 -1
- package/dist/commands/transcript.js +12 -7
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/unarchive.d.ts.map +1 -1
- package/dist/commands/unarchive.js +16 -2
- package/dist/commands/unarchive.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +106 -35
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +2 -1
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/watchdog.d.ts.map +1 -1
- package/dist/commands/watchdog.js +80 -5
- package/dist/commands/watchdog.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +3 -0
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow-errors.js +1 -1
- package/dist/commands/workflow-errors.js.map +1 -1
- package/dist/commands/workflow-render.js +4 -4
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +34 -15
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +18 -2
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +120 -11
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +13 -4
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +100 -30
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-reachability.d.ts +13 -0
- package/dist/daemon-reachability.d.ts.map +1 -1
- package/dist/daemon-reachability.js +28 -0
- package/dist/daemon-reachability.js.map +1 -1
- package/dist/decisions/decisions.d.ts +203 -0
- package/dist/decisions/decisions.d.ts.map +1 -0
- package/dist/decisions/decisions.js +374 -0
- package/dist/decisions/decisions.js.map +1 -0
- package/dist/decisions/stream-consumer.d.ts +255 -0
- package/dist/decisions/stream-consumer.d.ts.map +1 -0
- package/dist/decisions/stream-consumer.js +282 -0
- package/dist/decisions/stream-consumer.js.map +1 -0
- package/dist/decisions/templates.d.ts +8 -0
- package/dist/decisions/templates.d.ts.map +1 -0
- package/dist/decisions/templates.js +34 -0
- package/dist/decisions/templates.js.map +1 -0
- package/dist/fetch-with-timeout.d.ts.map +1 -1
- package/dist/fetch-with-timeout.js +19 -16
- package/dist/fetch-with-timeout.js.map +1 -1
- package/dist/fresh-seat-command.d.ts +18 -0
- package/dist/fresh-seat-command.d.ts.map +1 -0
- package/dist/fresh-seat-command.js +36 -0
- package/dist/fresh-seat-command.js.map +1 -0
- package/dist/front-door.d.ts +4 -0
- package/dist/front-door.d.ts.map +1 -1
- package/dist/front-door.js +8 -4
- package/dist/front-door.js.map +1 -1
- package/dist/host-bindings.d.ts +6 -0
- package/dist/host-bindings.d.ts.map +1 -1
- package/dist/host-bindings.js +23 -13
- package/dist/host-bindings.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts.map +1 -1
- package/dist/lazy-program.js +2 -0
- package/dist/lazy-program.js.map +1 -1
- package/dist/lib/bundle-check.d.ts.map +1 -1
- package/dist/lib/bundle-check.js +13 -5
- package/dist/lib/bundle-check.js.map +1 -1
- package/dist/lib/run-on-host.d.ts +29 -0
- package/dist/lib/run-on-host.d.ts.map +1 -0
- package/dist/lib/run-on-host.js +69 -0
- package/dist/lib/run-on-host.js.map +1 -0
- package/dist/lib/seat-activity.d.ts +17 -0
- package/dist/lib/seat-activity.d.ts.map +1 -0
- package/dist/lib/seat-activity.js +29 -0
- package/dist/lib/seat-activity.js.map +1 -0
- package/dist/local-daemon-owner.d.ts +4 -0
- package/dist/local-daemon-owner.d.ts.map +1 -1
- package/dist/local-daemon-owner.js +1 -1
- package/dist/local-daemon-owner.js.map +1 -1
- package/dist/mcp-http.d.ts +42 -0
- package/dist/mcp-http.d.ts.map +1 -0
- package/dist/mcp-http.js +232 -0
- package/dist/mcp-http.js.map +1 -0
- package/dist/mcp-server.d.ts +30 -2
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +1126 -407
- package/dist/mcp-server.js.map +1 -1
- package/dist/rig-handle.d.ts +18 -1
- package/dist/rig-handle.d.ts.map +1 -1
- package/dist/rig-handle.js +19 -2
- package/dist/rig-handle.js.map +1 -1
- package/dist/seat-launch-additions-lines.d.ts +11 -0
- package/dist/seat-launch-additions-lines.d.ts.map +1 -0
- package/dist/seat-launch-additions-lines.js +14 -0
- package/dist/seat-launch-additions-lines.js.map +1 -0
- package/dist/terminal-window.d.ts +1 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +50 -22
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.d.ts +3 -1
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +68 -1
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +2 -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 +3 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/connections/connections-model.d.ts +0 -5
- package/tui/dist/connections/connections-model.d.ts.map +1 -1
- package/tui/dist/connections/connections-model.js +1 -1
- package/tui/dist/connections/connections-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +20 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +27 -0
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +22 -7
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/live.d.ts +10 -1
- package/tui/dist/live.d.ts.map +1 -1
- package/tui/dist/live.js +56 -7
- package/tui/dist/live.js.map +1 -1
- package/tui/dist/main.js +50 -3
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +121 -10
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/topology/fixture.js +1 -1
- package/tui/dist/topology/fixture.js.map +1 -1
- package/tui/dist/topology/glyphs.js +1 -1
- package/tui/dist/topology/glyphs.js.map +1 -1
- package/tui/dist/topology/graph-types.d.ts +1 -0
- package/tui/dist/topology/graph-types.d.ts.map +1 -1
- package/tui/dist/types.d.ts +78 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/version-skew.d.ts +24 -0
- package/tui/dist/version-skew.d.ts.map +1 -0
- package/tui/dist/version-skew.js +37 -0
- package/tui/dist/version-skew.js.map +1 -0
- package/ui/dist/assets/{index-CVgod3Pm.js → index-Blg-p32B.js} +92 -92
- package/ui/dist/index.html +1 -1
- package/daemon/dist/domain/provider/subscription-moves.d.ts +0 -77
- package/daemon/dist/domain/provider/subscription-moves.d.ts.map +0 -1
- package/daemon/dist/domain/provider/subscription-moves.js +0 -140
- package/daemon/dist/domain/provider/subscription-moves.js.map +0 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
// Slice 18 — the report an agent files after it moves (or tries to move) a Codex home between subscriptions. The
|
|
2
|
+
// agent decides and moves (`rig auth switch`, `rig seat restart --keep-conversation`, then `--verify` after a real
|
|
3
|
+
// turn); this only checks and keeps what it reports. The report is a queue item to whoever asked, tagged
|
|
4
|
+
// `subscription-move`, whose body carries the report as one fenced JSON block, so the agent (and the Fleet app, once its
|
|
5
|
+
// page is connected) can read it back. It holds labels and references, never credentials, and it decides nothing: a refused report changes
|
|
6
|
+
// nothing about the move, and nothing here switches or restarts anything.
|
|
7
|
+
export const MOVE_REPORT_TAG = "subscription-move";
|
|
8
|
+
export const MOVE_REPORT_FENCE = "openrig-subscription-move";
|
|
9
|
+
// Recognized credential formats only. Ordinary labels, home paths and account names aren't credentials, so there is
|
|
10
|
+
// no broad shape heuristic (such as long base64 runs) here.
|
|
11
|
+
const CREDENTIAL_FORMATS = [
|
|
12
|
+
{ kind: "API key", pattern: /\bsk-[A-Za-z0-9_-]{16,}/ },
|
|
13
|
+
{ kind: "GitHub token", pattern: /\b(?:gh[pousr]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,})/ },
|
|
14
|
+
{ kind: "Slack token", pattern: /\bxox[abeprs]-[A-Za-z0-9-]{10,}|\bxapp-[A-Za-z0-9-]{10,}/ },
|
|
15
|
+
{ kind: "bearer token", pattern: /\bBearer\s+[A-Za-z0-9._~+/=-]{20,}/i },
|
|
16
|
+
{ kind: "JWT", pattern: /\beyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/ },
|
|
17
|
+
];
|
|
18
|
+
/** Where `value` has a recognized credential format, in a string or in an object key: the path to it and the format,
|
|
19
|
+
* never the value. A key is checked before what it holds, so a path only ever names keys that passed. */
|
|
20
|
+
export function findCredential(value, path = "report") {
|
|
21
|
+
const format = (text) => CREDENTIAL_FORMATS.find((candidate) => candidate.pattern.test(text));
|
|
22
|
+
if (typeof value === "string") {
|
|
23
|
+
const hit = format(value);
|
|
24
|
+
return hit ? { path, kind: hit.kind, inKey: false } : null;
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray(value)) {
|
|
27
|
+
for (const [index, item] of value.entries()) {
|
|
28
|
+
const hit = findCredential(item, `${path}[${index}]`);
|
|
29
|
+
if (hit)
|
|
30
|
+
return hit;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
if (value && typeof value === "object") {
|
|
35
|
+
for (const [key, item] of Object.entries(value)) {
|
|
36
|
+
const named = format(key);
|
|
37
|
+
if (named)
|
|
38
|
+
return { path, kind: named.kind, inKey: true };
|
|
39
|
+
const hit = findCredential(item, `${path}.${key}`);
|
|
40
|
+
if (hit)
|
|
41
|
+
return hit;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
/** The refusal for a credential `findCredential` found, saying where and which format without repeating it. */
|
|
47
|
+
export function credentialRefusal(hit) {
|
|
48
|
+
return `${hit.path} ${hit.inKey ? "has a key that looks like" : "holds what looks like"} a ${hit.kind}; a report holds labels and references only, never credentials`;
|
|
49
|
+
}
|
|
50
|
+
const isObject = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
51
|
+
const text = (value) => typeof value === "string" && value.trim() !== "";
|
|
52
|
+
const isoTime = (value) => typeof value === "string" && !Number.isNaN(Date.parse(value));
|
|
53
|
+
/** Check a report's shape. It checks what the report claims, not whether the move was authorized or happened. */
|
|
54
|
+
export function checkMoveReport(raw) {
|
|
55
|
+
const credential = findCredential(raw);
|
|
56
|
+
if (credential)
|
|
57
|
+
return { ok: false, errors: [credentialRefusal(credential)] };
|
|
58
|
+
if (!isObject(raw))
|
|
59
|
+
return { ok: false, errors: ["the report must be a JSON object"] };
|
|
60
|
+
const errors = [];
|
|
61
|
+
if (raw.version !== 1)
|
|
62
|
+
errors.push("version must be 1");
|
|
63
|
+
for (const field of ["host", "home", "from", "to", "reason"]) {
|
|
64
|
+
if (!text(raw[field]))
|
|
65
|
+
errors.push(`${field} must be a non-empty string`);
|
|
66
|
+
}
|
|
67
|
+
if (raw.policy !== undefined) {
|
|
68
|
+
const policy = raw.policy;
|
|
69
|
+
const named = isObject(policy) && text(policy.ref) && text(policy.version);
|
|
70
|
+
const none = isObject(policy) && policy.none === true;
|
|
71
|
+
if (!named && !none)
|
|
72
|
+
errors.push('policy must be { "ref": "<pack>", "version": "<version>" } or { "none": true }');
|
|
73
|
+
}
|
|
74
|
+
if (!Array.isArray(raw.readings) || raw.readings.length === 0) {
|
|
75
|
+
errors.push("readings must list at least one reading the move acted on (an unavailable one counts, with basis unavailable)");
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
raw.readings.forEach((reading, index) => {
|
|
79
|
+
const at = `readings[${index}]`;
|
|
80
|
+
if (!isObject(reading)) {
|
|
81
|
+
errors.push(`${at} must be an object`);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (!text(reading.subject))
|
|
85
|
+
errors.push(`${at}.subject must be a non-empty string`);
|
|
86
|
+
if (!text(reading.summary))
|
|
87
|
+
errors.push(`${at}.summary must be a non-empty string`);
|
|
88
|
+
if (reading.observedAt !== undefined && !isoTime(reading.observedAt))
|
|
89
|
+
errors.push(`${at}.observedAt must be an ISO 8601 time`);
|
|
90
|
+
if (reading.basis === "observed") {
|
|
91
|
+
if (reading.observedAt === undefined)
|
|
92
|
+
errors.push(`${at}: an observed reading needs observedAt, when it was observed`);
|
|
93
|
+
}
|
|
94
|
+
else if (reading.basis === "expected") {
|
|
95
|
+
if (!isoTime(reading.expectedFullSince))
|
|
96
|
+
errors.push(`${at}: an expected reading needs expectedFullSince, the reset it rests on`);
|
|
97
|
+
}
|
|
98
|
+
else if (reading.basis !== "unavailable") {
|
|
99
|
+
errors.push(`${at}.basis must be observed, expected or unavailable`);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (!Array.isArray(raw.seats)) {
|
|
104
|
+
errors.push("seats must be a list (empty when every seat on the home is a peer)");
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
raw.seats.forEach((seat, index) => {
|
|
108
|
+
const at = `seats[${index}]`;
|
|
109
|
+
if (!isObject(seat)) {
|
|
110
|
+
errors.push(`${at} must be an object`);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!text(seat.seat))
|
|
114
|
+
errors.push(`${at}.seat must be a non-empty string`);
|
|
115
|
+
for (const key of ["accountEvidence", "toolTurn"]) {
|
|
116
|
+
const evidence = seat[key];
|
|
117
|
+
if (evidence === undefined)
|
|
118
|
+
continue;
|
|
119
|
+
if (!isObject(evidence) || !text(evidence.state))
|
|
120
|
+
errors.push(`${at}.${key} must be an object with a state`);
|
|
121
|
+
else if (evidence.at !== undefined && !isoTime(evidence.at))
|
|
122
|
+
errors.push(`${at}.${key}.at must be an ISO 8601 time`);
|
|
123
|
+
}
|
|
124
|
+
if (seat.result === "moved") {
|
|
125
|
+
const account = isObject(seat.accountEvidence) ? seat.accountEvidence.state : undefined;
|
|
126
|
+
const turn = isObject(seat.toolTurn) ? seat.toolTurn.state : undefined;
|
|
127
|
+
if (account !== "matched" || turn !== "observed") {
|
|
128
|
+
errors.push(`${at}: moved needs accountEvidence.state matched and toolTurn.state observed (from rig seat restart --verify); report it unconfirmed, with what's missing, until both are seen`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else if (seat.result === "unconfirmed" || seat.result === "unknown") {
|
|
132
|
+
if (!text(seat.missing))
|
|
133
|
+
errors.push(`${at}: ${seat.result} needs missing, what wasn't seen`);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
errors.push(`${at}.result must be moved, unconfirmed or unknown`);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
if (raw.peers !== undefined) {
|
|
141
|
+
if (!Array.isArray(raw.peers))
|
|
142
|
+
errors.push("peers must be a list");
|
|
143
|
+
else
|
|
144
|
+
raw.peers.forEach((peer, index) => {
|
|
145
|
+
if (!isObject(peer) || !text(peer.seat) || !text(peer.note))
|
|
146
|
+
errors.push(`peers[${index}] must have a seat and a note`);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (raw.follows !== undefined && !text(raw.follows))
|
|
150
|
+
errors.push("follows must be the qitem id of the report this one follows up");
|
|
151
|
+
return errors.length > 0 ? { ok: false, errors } : { ok: true, report: raw };
|
|
152
|
+
}
|
|
153
|
+
function seatLine(seat) {
|
|
154
|
+
if (seat.result === "moved") {
|
|
155
|
+
const account = seat.accountEvidence;
|
|
156
|
+
return `- ${seat.seat}: moved (account ${account.state}${account.detail ? `: ${account.detail}` : ""}${account.at ? ` at ${account.at}` : ""}; tool turn ${seat.toolTurn.state}${seat.toolTurn.at ? ` at ${seat.toolTurn.at}` : ""})`;
|
|
157
|
+
}
|
|
158
|
+
return `- ${seat.seat}: ${seat.result}; missing: ${seat.missing}`;
|
|
159
|
+
}
|
|
160
|
+
function readingLine(reading) {
|
|
161
|
+
if (reading.basis === "expected") {
|
|
162
|
+
return `- ${reading.subject}: expected full since ${reading.expectedFullSince} (not measured${reading.observedAt ? `; last reading ${reading.observedAt}` : ""}): ${reading.summary}`;
|
|
163
|
+
}
|
|
164
|
+
if (reading.basis === "unavailable") {
|
|
165
|
+
return `- ${reading.subject}: unavailable${reading.observedAt ? ` (last reading ${reading.observedAt})` : ""}: ${reading.summary}`;
|
|
166
|
+
}
|
|
167
|
+
return `- ${reading.subject}: observed ${reading.observedAt}: ${reading.summary}`;
|
|
168
|
+
}
|
|
169
|
+
/** The queue item's summary and body: readable prose, then the report itself as one fenced block. */
|
|
170
|
+
export function renderMoveReport(report) {
|
|
171
|
+
const count = (result) => report.seats.filter((seat) => seat.result === result).length;
|
|
172
|
+
const results = ["moved", "unconfirmed", "unknown"].filter((result) => count(result) > 0).map((result) => `${count(result)} ${result}`);
|
|
173
|
+
const peers = report.peers ?? [];
|
|
174
|
+
const summary = `Subscription move ${report.from} → ${report.to} on ${report.host}: ${[...results, `${peers.length} peer${peers.length === 1 ? "" : "s"}`].join(", ")}`;
|
|
175
|
+
const policy = report.policy === undefined ? "not stated"
|
|
176
|
+
: "none" in report.policy ? "no policy" : `${report.policy.ref}, version ${report.policy.version}`;
|
|
177
|
+
const lines = [
|
|
178
|
+
`# Subscription move on ${report.host}: ${report.home}, ${report.from} → ${report.to}`,
|
|
179
|
+
"",
|
|
180
|
+
`**Reason:** ${report.reason}`,
|
|
181
|
+
`**Policy:** ${policy}`,
|
|
182
|
+
...(report.follows ? [`**Follows:** ${report.follows}`] : []),
|
|
183
|
+
"",
|
|
184
|
+
"**Seats:**",
|
|
185
|
+
...(report.seats.length > 0 ? report.seats.map(seatLine) : ["- none restarted"]),
|
|
186
|
+
...(peers.length > 0 ? ["", "**Peers:**", ...peers.map((peer) => `- ${peer.seat}: ${peer.note}`)] : []),
|
|
187
|
+
"",
|
|
188
|
+
"**Readings:**",
|
|
189
|
+
...report.readings.map(readingLine),
|
|
190
|
+
"",
|
|
191
|
+
`\`\`\`${MOVE_REPORT_FENCE}`,
|
|
192
|
+
JSON.stringify(report, null, 2),
|
|
193
|
+
"```",
|
|
194
|
+
"",
|
|
195
|
+
];
|
|
196
|
+
return { summary, body: lines.join("\n") };
|
|
197
|
+
}
|
|
198
|
+
const OPENING = `\`\`\`${MOVE_REPORT_FENCE}\n`;
|
|
199
|
+
/** The report's block: the LAST opening fence at the start of a line, up to the next fence line. The block is written
|
|
200
|
+
* last, after the prose, so a fence quoted in the prose (say a reason quoting an earlier report) comes before it;
|
|
201
|
+
* inside the block, JSON escapes every newline, so no fence line can occur there. */
|
|
202
|
+
function reportBlock(body) {
|
|
203
|
+
let at = body.lastIndexOf(OPENING);
|
|
204
|
+
while (at > 0 && body[at - 1] !== "\n")
|
|
205
|
+
at = body.lastIndexOf(OPENING, at - 1);
|
|
206
|
+
if (at < 0)
|
|
207
|
+
return undefined;
|
|
208
|
+
const start = at + OPENING.length;
|
|
209
|
+
const end = body.indexOf("\n```", start);
|
|
210
|
+
return end < 0 ? undefined : body.slice(start, end);
|
|
211
|
+
}
|
|
212
|
+
/** Read a report back from a queue item's body, with the same check as when it was filed. */
|
|
213
|
+
export function readMoveReport(body) {
|
|
214
|
+
const block = reportBlock(body);
|
|
215
|
+
if (block === undefined)
|
|
216
|
+
return { ok: false, errors: [`no ${MOVE_REPORT_FENCE} block`] };
|
|
217
|
+
let raw;
|
|
218
|
+
try {
|
|
219
|
+
raw = JSON.parse(block);
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
// Not the parser's message: it quotes the input, which may be what a report must never repeat.
|
|
223
|
+
return { ok: false, errors: [`the ${MOVE_REPORT_FENCE} block isn't valid JSON`] };
|
|
224
|
+
}
|
|
225
|
+
return checkMoveReport(raw);
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=subscription-move-report.js.map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zC,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,MAAM,iBAAiB,QAAQ,CAAC,EAAE,CAAC;IACzF,IAAI,GAAY,CAAC;IACjB,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,+FAA+F;QAC/F,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,OAAO,iBAAiB,yBAAyB,CAAC,EAAE,CAAC;IACpF,CAAC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type Database from "better-sqlite3";
|
|
2
|
-
import type {
|
|
2
|
+
import type { NodeInventoryEntry, NodeLifecycleState, RigLifecycleState } from "./types.js";
|
|
3
3
|
import { type AssignedWorkCounts } from "./node-inventory.js";
|
|
4
4
|
import { type RigArchiveFilter } from "./rig-repository.js";
|
|
5
5
|
import type { SeatActivityService } from "./seat-activity-service.js";
|
|
6
|
+
import type { SeatStructuralActivityService } from "./seat-structural-activity-service.js";
|
|
6
7
|
import type { AgentActivityStore } from "./agent-activity-store.js";
|
|
7
|
-
import type { ArbitratedSeatState } from "./activity-taxonomy.js";
|
|
8
8
|
export interface PsEntry {
|
|
9
9
|
rigId: string;
|
|
10
10
|
name: string;
|
|
@@ -59,39 +59,7 @@ export interface PsEntry {
|
|
|
59
59
|
*/
|
|
60
60
|
attentionCount: number;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
* OPR.0.4.4.21 — THE rig-rollup attention predicate (one predicate, one
|
|
64
|
-
* count; mirrors + extends the CLI's per-node `needsAttention`). A seat
|
|
65
|
-
* needs attention iff ANY of:
|
|
66
|
-
* - lifecycle `attention_required`
|
|
67
|
-
* - startup `attention_required`/`failed` — counted DIRECTLY from
|
|
68
|
-
* startupStatus; `latestError` may legitimately be null here
|
|
69
|
-
* - `needs_input`: the ARBITRATED seat state is the first answer when it has one
|
|
70
|
-
* (`arbitratedNeedsInput` — the same oracle the per-seat row renders, pane chrome
|
|
71
|
-
* included), and the hook store's live `needs_input` is the fallback when the
|
|
72
|
-
* arbitrated signal is `null` (stale hooks arrive as `unknown` and contribute
|
|
73
|
-
* nothing — never guessed). The rig total and the seat row must not disagree
|
|
74
|
-
* about the same seat.
|
|
75
|
-
* - a held seat (`heldReason` present)
|
|
76
|
-
* - a recorded startup error (`latestError` present)
|
|
77
|
-
*/
|
|
78
|
-
export declare function seatNeedsAttention(entry: NodeInventoryEntry, activity: AgentActivity | null, arbitratedNeedsInput?: boolean | null): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* #180 review — the arbitrated needs-input answer is TRI-STATE; collapsing it to
|
|
81
|
-
* `needsInput.count > 0` treats `count: 0` as a definite "no" even when no source said
|
|
82
|
-
* "no". `count: 0` is also the default when no authoritative rung reported needs-input:
|
|
83
|
-
* a Codex seat (hooks at `trial`), a generic/Pi/OMP seat (sampling floor only), a seat
|
|
84
|
-
* with no declaration, or a Claude seat whose declared rungs have not reported (after a
|
|
85
|
-
* daemon restart, or once its hook rung is downgraded). A live `PermissionRequest` in
|
|
86
|
-
* the hook store must still count there. Rules:
|
|
87
|
-
* - count > 0 → true (the service only reports a
|
|
88
|
-
* positive count from an authoritative source)
|
|
89
|
-
* - count is 0 AND needs-input evidence from an authoritative rung supplied it → false
|
|
90
|
-
* (an observed clear legitimately supersedes a stale hook)
|
|
91
|
-
* - otherwise → null (let the hook store decide).
|
|
92
|
-
* A declared rung is a capability, not an observation that the seat is clear.
|
|
93
|
-
*/
|
|
94
|
-
export declare function arbitratedNeedsInputSignal(state: Pick<ArbitratedSeatState, "needsInput" | "needsInputEvidence"> | null): boolean | null;
|
|
62
|
+
export { seatNeedsAttention, arbitratedNeedsInputSignal } from "./node-inventory.js";
|
|
95
63
|
/**
|
|
96
64
|
* Folds per-node lifecycle states into a rig-level lifecycle state.
|
|
97
65
|
*
|
|
@@ -142,12 +110,15 @@ export declare class PsProjectionService {
|
|
|
142
110
|
* predicate's `needs_input` signal. Optional: absent → the signal
|
|
143
111
|
* contributes false (honest degrade), never a guess. */
|
|
144
112
|
private readonly agentActivity;
|
|
113
|
+
/** The cached pane reading, so the count sees a prompt only the pane shows, as the seat row does. */
|
|
114
|
+
private readonly structuralActivity;
|
|
145
115
|
private periodicSnapshotActive;
|
|
146
116
|
private periodicSnapshotIntervalSeconds;
|
|
147
117
|
constructor(deps: {
|
|
148
118
|
db: Database.Database;
|
|
149
119
|
seatActivity?: SeatActivityService;
|
|
150
120
|
agentActivity?: AgentActivityStore;
|
|
121
|
+
structuralActivity?: Pick<SeatStructuralActivityService, "getStructuralActivity">;
|
|
151
122
|
});
|
|
152
123
|
setPeriodicSnapshotState(active: boolean, intervalSeconds: number): void;
|
|
153
124
|
getEntries(filter?: RigArchiveFilter): PsEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ps-projection.d.ts","sourceRoot":"","sources":["../../src/domain/ps-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ps-projection.d.ts","sourceRoot":"","sources":["../../src/domain/ps-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE5F,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAA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iBG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAItE;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D;;6DAEyD;IACzD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;IAC1D,qGAAqG;IACrG,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAsE;IACzG,OAAO,CAAC,sBAAsB,CAAS;IACvC,OAAO,CAAC,+BAA+B,CAAK;gBAEhC,IAAI,EAAE;QAChB,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;QAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;QAAC,aAAa,CAAC,EAAE,kBAAkB,CAAC;QAC9F,kBAAkB,CAAC,EAAE,IAAI,CAAC,6BAA6B,EAAE,uBAAuB,CAAC,CAAC;KACnF;IAOD,wBAAwB,CAAC,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI;IAKxE,UAAU,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,EAAE;CAmJjD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAEtG;AAED,wBAAgB,2BAA2B,CACzC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,oBAAoB,EAAE,MAAM,GAC3B,kBAAkB,CAOpB"}
|
|
@@ -1,57 +1,7 @@
|
|
|
1
1
|
import { identityVerdictConfirmsSessionMissing } from "./types.js";
|
|
2
|
-
import { countAssignedWorkForEntry, getNodeInventoryForAllRigs, readAssignedWorkBySession, } from "./node-inventory.js";
|
|
2
|
+
import { countAssignedWorkForEntry, seatNeedsAttention, arbitratedNeedsInputSignal, hookOrPaneActivity, getNodeInventoryForAllRigs, readAssignedWorkBySession, } from "./node-inventory.js";
|
|
3
3
|
import { archiveWhereClause } from "./rig-repository.js";
|
|
4
|
-
|
|
5
|
-
* chrome > hooks > self-report). Sampling carries no needs-input evidence. */
|
|
6
|
-
const NEEDS_INPUT_RUNGS = ["needs-input-chrome", "lifecycle-hooks", "self-report"];
|
|
7
|
-
/**
|
|
8
|
-
* OPR.0.4.4.21 — THE rig-rollup attention predicate (one predicate, one
|
|
9
|
-
* count; mirrors + extends the CLI's per-node `needsAttention`). A seat
|
|
10
|
-
* needs attention iff ANY of:
|
|
11
|
-
* - lifecycle `attention_required`
|
|
12
|
-
* - startup `attention_required`/`failed` — counted DIRECTLY from
|
|
13
|
-
* startupStatus; `latestError` may legitimately be null here
|
|
14
|
-
* - `needs_input`: the ARBITRATED seat state is the first answer when it has one
|
|
15
|
-
* (`arbitratedNeedsInput` — the same oracle the per-seat row renders, pane chrome
|
|
16
|
-
* included), and the hook store's live `needs_input` is the fallback when the
|
|
17
|
-
* arbitrated signal is `null` (stale hooks arrive as `unknown` and contribute
|
|
18
|
-
* nothing — never guessed). The rig total and the seat row must not disagree
|
|
19
|
-
* about the same seat.
|
|
20
|
-
* - a held seat (`heldReason` present)
|
|
21
|
-
* - a recorded startup error (`latestError` present)
|
|
22
|
-
*/
|
|
23
|
-
export function seatNeedsAttention(entry, activity, arbitratedNeedsInput = null) {
|
|
24
|
-
return entry.lifecycleState === "attention_required"
|
|
25
|
-
|| entry.startupStatus === "attention_required"
|
|
26
|
-
|| entry.startupStatus === "failed"
|
|
27
|
-
|| (arbitratedNeedsInput ?? activity?.state === "needs_input")
|
|
28
|
-
|| entry.heldReason != null
|
|
29
|
-
|| entry.latestError != null;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* #180 review — the arbitrated needs-input answer is TRI-STATE; collapsing it to
|
|
33
|
-
* `needsInput.count > 0` treats `count: 0` as a definite "no" even when no source said
|
|
34
|
-
* "no". `count: 0` is also the default when no authoritative rung reported needs-input:
|
|
35
|
-
* a Codex seat (hooks at `trial`), a generic/Pi/OMP seat (sampling floor only), a seat
|
|
36
|
-
* with no declaration, or a Claude seat whose declared rungs have not reported (after a
|
|
37
|
-
* daemon restart, or once its hook rung is downgraded). A live `PermissionRequest` in
|
|
38
|
-
* the hook store must still count there. Rules:
|
|
39
|
-
* - count > 0 → true (the service only reports a
|
|
40
|
-
* positive count from an authoritative source)
|
|
41
|
-
* - count is 0 AND needs-input evidence from an authoritative rung supplied it → false
|
|
42
|
-
* (an observed clear legitimately supersedes a stale hook)
|
|
43
|
-
* - otherwise → null (let the hook store decide).
|
|
44
|
-
* A declared rung is a capability, not an observation that the seat is clear.
|
|
45
|
-
*/
|
|
46
|
-
export function arbitratedNeedsInputSignal(state) {
|
|
47
|
-
if (!state)
|
|
48
|
-
return null;
|
|
49
|
-
if (state.needsInput.count > 0)
|
|
50
|
-
return true;
|
|
51
|
-
const observedClear = state.needsInputEvidence != null
|
|
52
|
-
&& NEEDS_INPUT_RUNGS.includes(state.needsInputEvidence.rung);
|
|
53
|
-
return observedClear ? false : null;
|
|
54
|
-
}
|
|
4
|
+
export { seatNeedsAttention, arbitratedNeedsInputSignal } from "./node-inventory.js";
|
|
55
5
|
/**
|
|
56
6
|
* Folds per-node lifecycle states into a rig-level lifecycle state.
|
|
57
7
|
*
|
|
@@ -124,12 +74,15 @@ export class PsProjectionService {
|
|
|
124
74
|
* predicate's `needs_input` signal. Optional: absent → the signal
|
|
125
75
|
* contributes false (honest degrade), never a guess. */
|
|
126
76
|
agentActivity;
|
|
77
|
+
/** The cached pane reading, so the count sees a prompt only the pane shows, as the seat row does. */
|
|
78
|
+
structuralActivity;
|
|
127
79
|
periodicSnapshotActive = false;
|
|
128
80
|
periodicSnapshotIntervalSeconds = 0;
|
|
129
81
|
constructor(deps) {
|
|
130
82
|
this.db = deps.db;
|
|
131
83
|
this.seatActivity = deps.seatActivity ?? null;
|
|
132
84
|
this.agentActivity = deps.agentActivity ?? null;
|
|
85
|
+
this.structuralActivity = deps.structuralActivity ?? null;
|
|
133
86
|
}
|
|
134
87
|
setPeriodicSnapshotState(active, intervalSeconds) {
|
|
135
88
|
this.periodicSnapshotActive = active;
|
|
@@ -221,8 +174,9 @@ export class PsProjectionService {
|
|
|
221
174
|
// OPR.0.4.4.21 — attention fold, same inventory pass. `needs_input` is
|
|
222
175
|
// read from the ARBITRATED seat state first — the same oracle the
|
|
223
176
|
// per-seat row renders (`activityState` on node-inventory), which also
|
|
224
|
-
// sees pane chrome a hook-silent gated seat never reports. The
|
|
225
|
-
//
|
|
177
|
+
// sees pane chrome a hook-silent gated seat never reports. The served
|
|
178
|
+
// activity (the hook store, else the cached pane reading, as the seat row
|
|
179
|
+
// reads it) is the fallback when the arbitrated signal is `null` — service
|
|
226
180
|
// unwired, session not in the ladder, or a `count: 0` that no authoritative
|
|
227
181
|
// needs-input evidence supplied (#180 review; discussion #879); `now` keeps its
|
|
228
182
|
// staleness honest (stale hooks come back `unknown` and contribute
|
|
@@ -236,9 +190,14 @@ export class PsProjectionService {
|
|
|
236
190
|
&& typeof this.seatActivity.getSeatStateBySession === "function"
|
|
237
191
|
? this.seatActivity.getSeatStateBySession(session)
|
|
238
192
|
: null;
|
|
239
|
-
const
|
|
193
|
+
const hook = this.agentActivity && session
|
|
240
194
|
? this.agentActivity.getLatestForNode({ sessionName: session, now: nowDate })
|
|
241
195
|
: null;
|
|
196
|
+
// The row's served activity: a live hook, else the cached pane reading. A confirmed-missing session serves
|
|
197
|
+
// neither, as on the row.
|
|
198
|
+
const structural = this.structuralActivity && session ? this.structuralActivity.getStructuralActivity(session) : null;
|
|
199
|
+
const activity = identityVerdictConfirmsSessionMissing(node.identityVerdict) ? null
|
|
200
|
+
: hookOrPaneActivity(hook, structural)?.activity ?? hook;
|
|
242
201
|
if (seatNeedsAttention(node, activity, arbitratedNeedsInputSignal(arbitrated)))
|
|
243
202
|
attentionCount++;
|
|
244
203
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ps-projection.js","sourceRoot":"","sources":["../../src/domain/ps-projection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qCAAqC,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAE1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAyB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ps-projection.js","sourceRoot":"","sources":["../../src/domain/ps-projection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qCAAqC,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,GAE1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAyB,MAAM,qBAAqB,CAAC;AA4DhF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAErF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAgC;IACtE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,oBAAoB,CAAC;QAAE,OAAO,oBAAoB,CAAC;IAEpF,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC;IACtE,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC;IAErC,IAAI,YAAY,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IAClD,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE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AAM,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LoadResult } from "./gateway/human-registry.js";
|
|
2
|
+
export declare function makeTopologyDestinationCheck(deps: {
|
|
3
|
+
findRigsByName: (name: string) => unknown[];
|
|
4
|
+
loadHumanRegistry: () => LoadResult;
|
|
5
|
+
}): (sessionRef: string) => boolean;
|
|
6
|
+
//# sourceMappingURL=queue-destination-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-destination-check.d.ts","sourceRoot":"","sources":["../../src/domain/queue-destination-check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAU9D,wBAAgB,4BAA4B,CAAC,IAAI,EAAE;IACjD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;IAC5C,iBAAiB,EAAE,MAAM,UAAU,CAAC;CACrC,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAkBlC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// The queue's production destination check: which session refs a queue row may be addressed to. Startup wires it into
|
|
2
|
+
// QueueRepository as validateRig; anything that must know whether a row would be accepted, without writing one, uses the
|
|
3
|
+
// same check (QueueRepository.acceptsDestination).
|
|
4
|
+
import { isHumanSeatSessionRef, parseSessionName } from "./session-name.js";
|
|
5
|
+
import { resolveExternal } from "./gateway/external-admission.js";
|
|
6
|
+
// PL-004 Phase A revision (R1): topology-backed validateRig.
|
|
7
|
+
// Reject `<member>@<unknown-rig>` shapes against the rig registry.
|
|
8
|
+
// Bare ids without `@` are also rejected
|
|
9
|
+
// (no canonical rig binding).
|
|
10
|
+
// OPR.0.4.6.MH1 FR-8: this gate is the ARCHETYPE consumer of the shared
|
|
11
|
+
// parse contract — human-seat classification BEFORE parse, then the
|
|
12
|
+
// greedy first-@ rig (so "member@rig@x" looks up rig "rig@x", misses,
|
|
13
|
+
// and rejects with the same unknown_destination_rig as ever — BR-1).
|
|
14
|
+
export function makeTopologyDestinationCheck(deps) {
|
|
15
|
+
return (sessionRef) => {
|
|
16
|
+
const parsed = parseSessionName(sessionRef);
|
|
17
|
+
// M1 A4b — @external entity-admission (checked BEFORE the human-CLASS bare-admit,
|
|
18
|
+
// which A2 also makes true for <local>@external): a queue row destinationed to
|
|
19
|
+
// <local>@external is admitted ONLY if the human is REGISTERED (or it is a literal
|
|
20
|
+
// scheme address); an unregistered entity is REFUSED (the 4b site carries the
|
|
21
|
+
// entity-level teaching via externalAdmissionTeaching). Admission is the gateway's
|
|
22
|
+
// job, never the classifier's (arch 8cd30094).
|
|
23
|
+
if (parsed.kind === "external") {
|
|
24
|
+
const reg = deps.loadHumanRegistry();
|
|
25
|
+
const entities = reg.ok ? reg.entities.map((e) => ({ entityId: e.entityId, address: e.address })) : [];
|
|
26
|
+
return resolveExternal(parsed.local, entities).kind !== "unregistered";
|
|
27
|
+
}
|
|
28
|
+
if (isHumanSeatSessionRef(sessionRef))
|
|
29
|
+
return true;
|
|
30
|
+
if (parsed.kind !== "canonical")
|
|
31
|
+
return false;
|
|
32
|
+
return deps.findRigsByName(parsed.rig).length > 0;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=queue-destination-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-destination-check.js","sourceRoot":"","sources":["../../src/domain/queue-destination-check.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,yHAAyH;AACzH,mDAAmD;AACnD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,6DAA6D;AAC7D,mEAAmE;AACnE,yCAAyC;AACzC,8BAA8B;AAC9B,wEAAwE;AACxE,oEAAoE;AACpE,sEAAsE;AACtE,qEAAqE;AACrE,MAAM,UAAU,4BAA4B,CAAC,IAG5C;IACC,OAAO,CAAC,UAAkB,EAAW,EAAE;QACrC,MAAM,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC5C,kFAAkF;QAClF,+EAA+E;QAC/E,mFAAmF;QACnF,8EAA8E;QAC9E,mFAAmF;QACnF,+CAA+C;QAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACrC,MAAM,QAAQ,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACvG,OAAO,eAAe,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC;QACzE,CAAC;QACD,IAAI,qBAAqB,CAAC,UAAU,CAAC;YAAE,OAAO,IAAI,CAAC;QACnD,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW;YAAE,OAAO,KAAK,CAAC;QAC9C,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -11,8 +11,11 @@ export declare function resolveSessionNodeId(db: Database.Database, session: str
|
|
|
11
11
|
export declare function defaultResolveOrchestrator(db: Database.Database, session: string): string | null;
|
|
12
12
|
/** A rig's representative, the seat a person's message to "the rig" reaches: the rig's one
|
|
13
13
|
* delegation root, the node that delegates to others and that nothing delegates to, at its
|
|
14
|
-
* CURRENT canonical session binding.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* CURRENT canonical session binding. The name matches active rigs only, as the CLI's rig handles
|
|
15
|
+
* do, so an archived earlier generation of a relaunched rig doesn't make its name ambiguous. Null
|
|
16
|
+
* when no active rig or several have the name, when the rig has no such root or several, or when
|
|
17
|
+
* the root has no session; the caller falls back to its configured destination rather than guessing. */
|
|
17
18
|
export declare function resolveRigRepresentative(db: Database.Database, rigName: string): string | null;
|
|
19
|
+
/** The same delegation-root rule for a rig already known by id, so another rig with the same name doesn't matter. */
|
|
20
|
+
export declare function resolveRigRepresentativeById(db: Database.Database, rigId: string): string | null;
|
|
18
21
|
//# sourceMappingURL=queue-owner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-owner.d.ts","sourceRoot":"","sources":["../../src/domain/queue-owner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queue-owner.d.ts","sourceRoot":"","sources":["../../src/domain/queue-owner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C;;;sFAGsF;AACtF,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK1F;AAED;;;yEAGyE;AACzE,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAahG;AAED;;;;;yGAKyG;AACzG,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI9F;AAED,qHAAqH;AACrH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAchG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveCurrentSessionAddress } from "./session-registry.js";
|
|
1
2
|
/** The durable session→node binding (the session-registry precedent: latest sessions row
|
|
2
3
|
* for the canonical name). Canonical session names (dash form, `review-r2@rig`) and node
|
|
3
4
|
* logical ids (dotted form, `review.r2`) are INDEPENDENT identities — the live fleet has
|
|
@@ -6,7 +7,7 @@ export function resolveSessionNodeId(db, session) {
|
|
|
6
7
|
const row = db
|
|
7
8
|
.prepare("SELECT node_id FROM sessions WHERE session_name = ? ORDER BY id DESC LIMIT 1")
|
|
8
9
|
.get(session);
|
|
9
|
-
return row?.node_id ?? null;
|
|
10
|
+
return row?.node_id ?? resolveCurrentSessionAddress(db, session)?.nodeId ?? null;
|
|
10
11
|
}
|
|
11
12
|
/** Default orchestrator derivation: the destination's BOUND node → the source of its
|
|
12
13
|
* delegates_to edge → that parent node's CURRENT canonical session binding. A session
|
|
@@ -27,19 +28,24 @@ export function defaultResolveOrchestrator(db, session) {
|
|
|
27
28
|
}
|
|
28
29
|
/** A rig's representative, the seat a person's message to "the rig" reaches: the rig's one
|
|
29
30
|
* delegation root, the node that delegates to others and that nothing delegates to, at its
|
|
30
|
-
* CURRENT canonical session binding.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* CURRENT canonical session binding. The name matches active rigs only, as the CLI's rig handles
|
|
32
|
+
* do, so an archived earlier generation of a relaunched rig doesn't make its name ambiguous. Null
|
|
33
|
+
* when no active rig or several have the name, when the rig has no such root or several, or when
|
|
34
|
+
* the root has no session; the caller falls back to its configured destination rather than guessing. */
|
|
33
35
|
export function resolveRigRepresentative(db, rigName) {
|
|
34
|
-
const rigs = db.prepare("SELECT id FROM rigs WHERE name = ?").all(rigName);
|
|
36
|
+
const rigs = db.prepare("SELECT id FROM rigs WHERE name = ? AND archived_at IS NULL").all(rigName);
|
|
35
37
|
if (rigs.length !== 1)
|
|
36
38
|
return null;
|
|
39
|
+
return resolveRigRepresentativeById(db, rigs[0].id);
|
|
40
|
+
}
|
|
41
|
+
/** The same delegation-root rule for a rig already known by id, so another rig with the same name doesn't matter. */
|
|
42
|
+
export function resolveRigRepresentativeById(db, rigId) {
|
|
37
43
|
const roots = db
|
|
38
44
|
.prepare(`SELECT n.id AS nodeId FROM nodes n
|
|
39
45
|
WHERE n.rig_id = ?
|
|
40
46
|
AND EXISTS (SELECT 1 FROM edges e WHERE e.source_id = n.id AND e.kind = 'delegates_to')
|
|
41
47
|
AND NOT EXISTS (SELECT 1 FROM edges e WHERE e.target_id = n.id AND e.kind = 'delegates_to')`)
|
|
42
|
-
.all(
|
|
48
|
+
.all(rigId);
|
|
43
49
|
if (roots.length !== 1)
|
|
44
50
|
return null;
|
|
45
51
|
const row = db
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-owner.js","sourceRoot":"","sources":["../../src/domain/queue-owner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queue-owner.js","sourceRoot":"","sources":["../../src/domain/queue-owner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAGrE;;;sFAGsF;AACtF,MAAM,UAAU,oBAAoB,CAAC,EAAqB,EAAE,OAAe;IACzE,MAAM,GAAG,GAAG,EAAE;SACX,OAAO,CAAC,8EAA8E,CAAC;SACvF,GAAG,CAAC,OAAO,CAAoC,CAAC;IACnD,OAAO,GAAG,EAAE,OAAO,IAAI,4BAA4B,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,IAAI,IAAI,CAAC;AACnF,CAAC;AAED;;;yEAGyE;AACzE,MAAM,UAAU,0BAA0B,CAAC,EAAqB,EAAE,OAAe;IAC/E,MAAM,MAAM,GAAG,oBAAoB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,MAAM,GAAG,GAAG,EAAE;SACX,OAAO,CACN;;;;gBAIU,CACX;SACA,GAAG,CAAC,MAAM,CAA0C,CAAC;IACxD,OAAO,GAAG,EAAE,aAAa,IAAI,IAAI,CAAC;AACpC,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