@openrig/cli 0.7.0 → 0.7.2
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 +9 -8
- 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/hooks/claude.json +11 -11
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +9 -8
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +2 -2
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +9 -6
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +1 -1
- package/daemon/assets/plugins/openrig-core/skills/delegating-work/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +13 -8
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +19 -4
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +254 -52
- package/daemon/assets/skills/rigs/SKILL.md +42 -10
- package/daemon/context-packs/help/help.md +6 -0
- 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 +271 -38
- package/daemon/context-packs/reference/acp-agents.md +77 -0
- package/daemon/context-packs/reference/getting-started.md +145 -14
- package/daemon/context-packs/reference/manifest.yaml +6 -3
- package/daemon/context-packs/reference/rig-spec.md +175 -5
- package/daemon/context-packs/reference/whats-new.md +275 -113
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +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 +19 -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 +18 -3
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +2 -2
- 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/SKILL.md +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 +13 -8
- 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 +254 -52
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/LICENSE.txt +201 -0
- package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +13 -29
- package/daemon/context-packs/skills/process/agent-browser/SKILL.md +7 -7
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/LICENSE.txt +201 -0
- package/daemon/context-packs/skills/process/dogfood/SKILL.md +6 -2
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/LICENSE.txt +21 -0
- package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +6 -2
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/test-driven-development/LICENSE.txt +21 -0
- package/daemon/context-packs/skills/process/test-driven-development/SKILL.md +5 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/verification-before-completion/LICENSE.txt +21 -0
- package/daemon/context-packs/skills/process/verification-before-completion/SKILL.md +5 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +3 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/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 +4 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +138 -41
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +9 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +37 -11
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +10 -4
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +59 -14
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +54 -16
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +664 -117
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +25 -2
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +122 -9
- 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 +46 -2
- package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +13 -2
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +11 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +81 -31
- 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/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-server.d.ts +3 -0
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +11 -2
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +53 -4
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +225 -40
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +7 -0
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/daemon/dist/adapters/yolo-mode.js +8 -0
- package/daemon/dist/adapters/yolo-mode.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/codex-auth-surface.d.ts +2 -0
- package/daemon/dist/codex-auth-surface.d.ts.map +1 -0
- package/daemon/dist/codex-auth-surface.js +2 -0
- package/daemon/dist/codex-auth-surface.js.map +1 -0
- 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 +98 -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/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/132_seat_runtime_switches.d.ts +10 -0
- package/daemon/dist/db/migrations/132_seat_runtime_switches.d.ts.map +1 -0
- package/daemon/dist/db/migrations/132_seat_runtime_switches.js +46 -0
- package/daemon/dist/db/migrations/132_seat_runtime_switches.js.map +1 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.d.ts +8 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.js +25 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.js.map +1 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.d.ts +3 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.d.ts.map +1 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.js +21 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.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/db/migrations/136_node_launch_recipe.d.ts +9 -0
- package/daemon/dist/db/migrations/136_node_launch_recipe.d.ts.map +1 -0
- package/daemon/dist/db/migrations/136_node_launch_recipe.js +11 -0
- package/daemon/dist/db/migrations/136_node_launch_recipe.js.map +1 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.d.ts +3 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.d.ts.map +1 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.js +8 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.js.map +1 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.d.ts +3 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.js +5 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.js.map +1 -0
- package/daemon/dist/domain/active-occupant.d.ts +3 -0
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +6 -2
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.d.ts +3 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +6 -2
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +13 -4
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +14 -2
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts +3 -0
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +35 -6
- 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 +19 -1
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +68 -20
- 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 +24 -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 +133 -8
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +513 -64
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts +4 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.js +23 -12
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -1
- package/daemon/dist/domain/claude-credential-precedence.d.ts +33 -0
- package/daemon/dist/domain/claude-credential-precedence.d.ts.map +1 -0
- package/daemon/dist/domain/claude-credential-precedence.js +62 -0
- package/daemon/dist/domain/claude-credential-precedence.js.map +1 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts +44 -5
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +159 -39
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/claude-permission-rules.d.ts +10 -0
- package/daemon/dist/domain/claude-permission-rules.d.ts.map +1 -0
- package/daemon/dist/domain/claude-permission-rules.js +41 -0
- package/daemon/dist/domain/claude-permission-rules.js.map +1 -0
- package/daemon/dist/domain/claude-seat-token.d.ts +30 -0
- package/daemon/dist/domain/claude-seat-token.d.ts.map +1 -0
- package/daemon/dist/domain/claude-seat-token.js +78 -0
- package/daemon/dist/domain/claude-seat-token.js.map +1 -0
- package/daemon/dist/domain/codex-auth.d.ts +148 -0
- package/daemon/dist/domain/codex-auth.d.ts.map +1 -0
- package/daemon/dist/domain/codex-auth.js +506 -0
- package/daemon/dist/domain/codex-auth.js.map +1 -0
- package/daemon/dist/domain/codex-daemon-support.d.ts +2 -1
- package/daemon/dist/domain/codex-daemon-support.d.ts.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.js +3 -2
- package/daemon/dist/domain/codex-daemon-support.js.map +1 -1
- package/daemon/dist/domain/codex-git-add-dirs.d.ts +1 -1
- package/daemon/dist/domain/codex-git-add-dirs.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +2 -1
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.js +3 -2
- package/daemon/dist/domain/codex-network-default.js.map +1 -1
- 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-team-workspace.d.ts +5 -0
- package/daemon/dist/domain/codex-team-workspace.d.ts.map +1 -1
- package/daemon/dist/domain/codex-team-workspace.js +37 -0
- package/daemon/dist/domain/codex-team-workspace.js.map +1 -1
- package/daemon/dist/domain/community-harness-first-input.d.ts +7 -0
- package/daemon/dist/domain/community-harness-first-input.d.ts.map +1 -0
- package/daemon/dist/domain/community-harness-first-input.js +16 -0
- package/daemon/dist/domain/community-harness-first-input.js.map +1 -0
- 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 +29 -2
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +51 -5
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +6 -0
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -0
- package/daemon/dist/domain/compaction-restore-notice.js +27 -0
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -0
- 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.map +1 -1
- package/daemon/dist/domain/context-monitor.js +2 -1
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts +14 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.js +57 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +6 -1
- 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 +15 -4
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +26 -13
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +1 -1
- 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 +12 -8
- package/daemon/dist/domain/execution-view.js.map +1 -1
- 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/gateway/delivery-rules-engine.d.ts +3 -0
- package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/delivery-rules-engine.js +1 -1
- package/daemon/dist/domain/gateway/delivery-rules-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +32 -0
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +71 -4
- 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 +3 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +58 -9
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +6 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +15 -6
- package/daemon/dist/domain/gateway/slack/message.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 +1 -3
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +22 -22
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +8 -7
- 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/hot-potato-enforcer.d.ts +1 -1
- package/daemon/dist/domain/human-questions.d.ts +2 -0
- 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.d.ts +5 -1
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot.js +34 -4
- 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/managed-restore-read-access.d.ts +20 -0
- package/daemon/dist/domain/managed-restore-read-access.d.ts.map +1 -0
- package/daemon/dist/domain/managed-restore-read-access.js +77 -0
- package/daemon/dist/domain/managed-restore-read-access.js.map +1 -0
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
- package/daemon/dist/domain/markdown-address.js +21 -2
- package/daemon/dist/domain/markdown-address.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 +24 -3
- 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 +121 -8
- package/daemon/dist/domain/mission-control/mission-control-write-contract.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 +42 -6
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/native-permission-store.d.ts +7 -2
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +13 -8
- package/daemon/dist/domain/native-permission-store.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 +60 -2
- 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 +9 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +174 -44
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +53 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +137 -45
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +11 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +49 -8
- 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/parent-session-env.d.ts +1 -1
- package/daemon/dist/domain/parent-session-env.d.ts.map +1 -1
- package/daemon/dist/domain/parent-session-env.js +3 -1
- package/daemon/dist/domain/parent-session-env.js.map +1 -1
- package/daemon/dist/domain/parked-query.d.ts +3 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +1 -0
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/permission-account.d.ts +31 -0
- package/daemon/dist/domain/permission-account.d.ts.map +1 -0
- package/daemon/dist/domain/permission-account.js +116 -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/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/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 +2 -0
- package/daemon/dist/domain/policies/mode-scheduled-end.d.ts.map +1 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.js +5 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +8 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +15 -1
- 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/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 +14 -2
- 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/judgments.d.ts +7 -4
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +12 -8
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.d.ts +6 -1
- package/daemon/dist/domain/proof/source-watch.d.ts.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +241 -35
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts +12 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-auth-status-reader.js +4 -4
- package/daemon/dist/domain/provider/claude-auth-status-reader.js.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts +32 -0
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-seat-switch.js +136 -0
- package/daemon/dist/domain/provider/claude-seat-switch.js.map +1 -0
- package/daemon/dist/domain/provider/claude-token-usage.d.ts +34 -0
- package/daemon/dist/domain/provider/claude-token-usage.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-token-usage.js +168 -0
- package/daemon/dist/domain/provider/claude-token-usage.js.map +1 -0
- package/daemon/dist/domain/provider/provider-account-readings.d.ts +7 -6
- package/daemon/dist/domain/provider/provider-account-readings.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-account-readings.js +31 -10
- package/daemon/dist/domain/provider/provider-account-readings.js.map +1 -1
- package/daemon/dist/domain/provider/provider-collect.d.ts +3 -0
- package/daemon/dist/domain/provider/provider-collect.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-collect.js +3 -2
- package/daemon/dist/domain/provider/provider-collect.js.map +1 -1
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts +1 -1
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-seat-accounts.js +29 -2
- package/daemon/dist/domain/provider/provider-seat-accounts.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.d.ts +38 -4
- package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +147 -5
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +109 -4
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-signals.d.ts +3 -0
- package/daemon/dist/domain/provider/provider-signals.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-signals.js +7 -2
- package/daemon/dist/domain/provider/provider-signals.js.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +61 -5
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.d.ts +4 -0
- package/daemon/dist/domain/provider/reactive-tap.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.js +3 -0
- package/daemon/dist/domain/provider/reactive-tap.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/provider/usage-across-hosts.d.ts.map +1 -1
- package/daemon/dist/domain/provider/usage-across-hosts.js +8 -2
- package/daemon/dist/domain/provider/usage-across-hosts.js.map +1 -1
- package/daemon/dist/domain/provider/usage-windows.d.ts +2 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts.map +1 -1
- package/daemon/dist/domain/provider/usage-windows.js +4 -0
- package/daemon/dist/domain/provider/usage-windows.js.map +1 -1
- 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-owner.d.ts +15 -3
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +38 -5
- 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-repository.d.ts +72 -24
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +346 -102
- 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 +79 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +16 -3
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +87 -11
- package/daemon/dist/domain/queue-stuck-sweep.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.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +108 -34
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +3 -0
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +5 -1
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- 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.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +2 -3
- 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 +39 -2
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +266 -35
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts +7 -2
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +28 -7
- 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/resume-metadata-refresher.d.ts +11 -2
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +32 -14
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +5 -1
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +3 -1
- package/daemon/dist/domain/resume-token-capture.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-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +1 -0
- package/daemon/dist/domain/rig-expansion-service.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 +28 -3
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +261 -2
- 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 +20 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +81 -9
- 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 +14 -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 +29 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +71 -3
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +424 -48
- 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 +3 -0
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +90 -3
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/running-name-guard.d.ts.map +1 -1
- package/daemon/dist/domain/running-name-guard.js +2 -1
- package/daemon/dist/domain/running-name-guard.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +37 -2
- 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/runtime-switch-materials.d.ts +77 -0
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -0
- package/daemon/dist/domain/runtime-switch-materials.js +253 -0
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -0
- package/daemon/dist/domain/scope/scope-approve.d.ts +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 +8 -2
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +30 -5
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +27 -2
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +91 -8
- 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 +66 -11
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +8 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +75 -5
- package/daemon/dist/domain/seat-handover-service.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 +29 -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 +6 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +9 -5
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +98 -7
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +261 -25
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +9 -2
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +27 -7
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-dir.d.ts +17 -0
- package/daemon/dist/domain/seat-runtime-dir.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-dir.js +27 -0
- package/daemon/dist/domain/seat-runtime-dir.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-home.d.ts +42 -0
- package/daemon/dist/domain/seat-runtime-home.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home.js +89 -0
- package/daemon/dist/domain/seat-runtime-home.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +220 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-switch-service.js +593 -0
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -0
- 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-skills-pointer.d.ts +5 -0
- package/daemon/dist/domain/seat-skills-pointer.d.ts.map +1 -0
- package/daemon/dist/domain/seat-skills-pointer.js +15 -0
- package/daemon/dist/domain/seat-skills-pointer.js.map +1 -0
- package/daemon/dist/domain/seat-status-service.d.ts +40 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +59 -3
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +3 -0
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +6 -0
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/service-orchestrator.d.ts +7 -0
- package/daemon/dist/domain/service-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/service-orchestrator.js +4 -0
- package/daemon/dist/domain/service-orchestrator.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +4 -0
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +13 -0
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +71 -22
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +376 -93
- 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 +17 -2
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/skill-discovery.js +44 -5
- package/daemon/dist/domain/skill-discovery.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts +4 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +4 -1
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +4 -3
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +6 -5
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +29 -2
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +279 -25
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +1 -0
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +1 -0
- 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-reader-actions.d.ts +49 -0
- package/daemon/dist/domain/stream-reader-actions.d.ts.map +1 -0
- package/daemon/dist/domain/stream-reader-actions.js +104 -0
- package/daemon/dist/domain/stream-reader-actions.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 +41 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +63 -5
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +8 -28
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +117 -64
- 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/rex-adapter.d.ts +42 -0
- package/daemon/dist/domain/terminal/rex-adapter.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-adapter.js +228 -0
- package/daemon/dist/domain/terminal/rex-adapter.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-layout.d.ts +26 -0
- package/daemon/dist/domain/terminal/rex-layout.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-layout.js +21 -0
- package/daemon/dist/domain/terminal/rex-layout.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-transport.d.ts +43 -0
- package/daemon/dist/domain/terminal/rex-transport.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-transport.js +176 -0
- package/daemon/dist/domain/terminal/rex-transport.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +15 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +14 -5
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +51 -27
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts +2 -0
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/tile-attach.js +42 -0
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -0
- package/daemon/dist/domain/terminal/tile-layout.d.ts +32 -0
- package/daemon/dist/domain/terminal/tile-layout.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/tile-layout.js +36 -0
- package/daemon/dist/domain/terminal/tile-layout.js.map +1 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +11 -6
- 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 +119 -2
- 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.js +2 -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 +73 -1
- 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/wake-recovery.d.ts +16 -0
- package/daemon/dist/domain/wake-recovery.d.ts.map +1 -0
- package/daemon/dist/domain/wake-recovery.js +31 -0
- package/daemon/dist/domain/wake-recovery.js.map +1 -0
- package/daemon/dist/domain/watchdog-delivery.js +1 -1
- package/daemon/dist/domain/watchdog-delivery.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 +63 -7
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +190 -21
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +23 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +46 -13
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +7 -3
- 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 +16 -7
- package/daemon/dist/domain/workflow-projector.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 +30 -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 +7 -1
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts +5 -0
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +8 -1
- package/daemon/dist/lib/pane-envelope.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.map +1 -1
- package/daemon/dist/routes/activity.js +15 -0
- 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 +19 -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 +31 -10
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +22 -0
- package/daemon/dist/routes/context-packs.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/mission-control.d.ts.map +1 -1
- package/daemon/dist/routes/mission-control.js +7 -3
- 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 +170 -3
- 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 +154 -13
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/require-sender-identity.d.ts +10 -8
- package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
- package/daemon/dist/routes/require-sender-identity.js +13 -11
- package/daemon/dist/routes/require-sender-identity.js.map +1 -1
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +77 -10
- 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 +38 -12
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/runtime-switch-custody.d.ts +21 -0
- package/daemon/dist/routes/runtime-switch-custody.d.ts.map +1 -0
- package/daemon/dist/routes/runtime-switch-custody.js +55 -0
- package/daemon/dist/routes/runtime-switch-custody.js.map +1 -0
- package/daemon/dist/routes/scope-approve.js +2 -2
- package/daemon/dist/routes/scope-approve.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 +109 -10
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +14 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/skills.d.ts.map +1 -1
- package/daemon/dist/routes/skills.js +54 -1
- package/daemon/dist/routes/skills.js.map +1 -1
- package/daemon/dist/routes/startup.js +15 -5
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/stream.d.ts.map +1 -1
- package/daemon/dist/routes/stream.js +86 -14
- 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/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +55 -5
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +5 -0
- 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/seat-recap-store-surface.d.ts +1 -1
- package/daemon/dist/seat-recap-store-surface.d.ts.map +1 -1
- package/daemon/dist/seat-recap-store-surface.js +1 -1
- package/daemon/dist/seat-recap-store-surface.js.map +1 -1
- package/daemon/dist/server.d.ts +4 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +5 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/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 +5 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +160 -49
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +14 -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 +27 -2
- 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 +68 -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-gateway.yaml +15 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openclaw.yaml +16 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +70 -0
- package/daemon/docs/reference/community-harness-presets.md +194 -0
- package/daemon/docs/reference/getting-started.md +145 -14
- package/daemon/docs/reference/health-diagnosis.md +13 -0
- package/daemon/docs/reference/help.md +6 -0
- package/daemon/docs/reference/keeping-a-watch.md +21 -0
- package/daemon/docs/reference/operation-correlation.md +9 -0
- package/daemon/docs/reference/project-workspace.md +24 -0
- package/daemon/docs/reference/publishing-a-rig-bundle.md +11 -0
- package/daemon/docs/reference/quickstart.md +1 -1
- package/daemon/docs/reference/refocus-channel.md +6 -4
- package/daemon/docs/reference/rig-spec.md +175 -5
- package/daemon/docs/reference/sdlc-conventions.md +3 -1
- package/daemon/docs/reference/seat-delivery.md +89 -7
- package/daemon/docs/reference/slack-app-setup.md +4 -2
- 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 +141 -0
- package/daemon/docs/reference/topology-naming.md +1 -1
- package/daemon/docs/reference/whats-new.md +275 -113
- package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +0 -3
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +19 -4
- package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +18 -3
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +2 -2
- package/daemon/specs/agents/shared/skills/process/agent-browser/LICENSE.txt +201 -0
- package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +13 -29
- package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +7 -7
- package/daemon/specs/agents/shared/skills/process/dogfood/LICENSE.txt +201 -0
- package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +6 -2
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/LICENSE.txt +21 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +6 -2
- package/daemon/specs/agents/shared/skills/process/test-driven-development/LICENSE.txt +21 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +5 -1
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/LICENSE.txt +21 -0
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +5 -1
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +53 -10
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +3 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +12 -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/client.d.ts +15 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +30 -8
- 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/attach.js +1 -1
- 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 +41 -11
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +8 -0
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +6 -0
- package/dist/commands/chatroom.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 +38 -3
- package/dist/commands/compact-plan.js.map +1 -1
- package/dist/commands/compact.js +1 -1
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +7 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +29 -23
- 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 +93 -5
- 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/env.d.ts.map +1 -1
- package/dist/commands/env.js +3 -0
- package/dist/commands/env.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 +98 -0
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/fork.d.ts.map +1 -1
- package/dist/commands/fork.js +19 -2
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +2 -1
- 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 +1 -1
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/launch.js +2 -2
- 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/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 +70 -2
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +33 -2
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +273 -24
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +12 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +50 -47
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +4 -2
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +178 -45
- 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/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 +336 -11
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +62 -55
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +24 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +160 -7
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +137 -3
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +18 -25
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +4 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stream-outcome.d.ts +742 -0
- package/dist/commands/stream-outcome.d.ts.map +1 -0
- package/dist/commands/stream-outcome.js +118 -0
- package/dist/commands/stream-outcome.js.map +1 -0
- package/dist/commands/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +86 -2
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/terminal.d.ts +5 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +42 -11
- 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/up.d.ts.map +1 -1
- package/dist/commands/up.js +82 -31
- package/dist/commands/up.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/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 +15 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +86 -4
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +4 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +73 -21
- package/dist/daemon-lifecycle.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/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.map +1 -1
- package/dist/host-bindings.js +16 -9
- 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/codex-auth.d.ts +1 -147
- package/dist/lib/codex-auth.d.ts.map +1 -1
- package/dist/lib/codex-auth.js +2 -505
- package/dist/lib/codex-auth.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 +1163 -436
- package/dist/mcp-server.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-rex.d.ts +6 -0
- package/dist/terminal-window-rex.d.ts.map +1 -0
- package/dist/terminal-window-rex.js +129 -0
- package/dist/terminal-window-rex.js.map +1 -0
- package/dist/terminal-window.d.ts +3 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +68 -28
- 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 +3 -1
- 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 +2 -0
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +22 -3
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +9 -4
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +13 -7
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/live.d.ts.map +1 -1
- package/tui/dist/live.js +6 -4
- package/tui/dist/live.js.map +1 -1
- package/tui/dist/main.js +15 -1
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +10 -3
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts +9 -5
- package/tui/dist/terminals/open-window.d.ts.map +1 -1
- package/tui/dist/terminals/open-window.js +29 -12
- package/tui/dist/terminals/open-window.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts +2 -1
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +5 -4
- package/tui/dist/terminals/terminal-model.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 +25 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/usage/usage-model.d.ts.map +1 -1
- package/tui/dist/usage/usage-model.js +5 -3
- package/tui/dist/usage/usage-model.js.map +1 -1
- package/ui/dist/assets/{index-CVgod3Pm.js → index-DLP1ipGq.js} +92 -92
- package/ui/dist/index.html +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { codexEnvelopeArgs } from "../domain/codex-rebuild-permissions.js";
|
|
1
2
|
import { operationalLaunchArg } from "./kernel-authority.js";
|
|
2
3
|
import nodePath from "node:path";
|
|
3
4
|
import fs from "node:fs";
|
|
@@ -5,6 +6,7 @@ import { createHash } from "node:crypto";
|
|
|
5
6
|
import { execFile } from "node:child_process";
|
|
6
7
|
import { createRequire } from "node:module";
|
|
7
8
|
import os from "node:os";
|
|
9
|
+
import { isDeepStrictEqual } from "node:util";
|
|
8
10
|
import { parse as parseToml } from "smol-toml";
|
|
9
11
|
import { codexPostureArg } from "./yolo-mode.js";
|
|
10
12
|
import { resolveConcreteHint } from "../domain/runtime-adapter.js";
|
|
@@ -14,7 +16,7 @@ import { assessNativeResumeProbe, buildCodexResumeCore, hasCodexUpdateHeader } f
|
|
|
14
16
|
import { unknownDaemonSupportMessage } from "../domain/codex-daemon-support.js";
|
|
15
17
|
import { CODEX_NETWORK_DEFAULT_OVERRIDE, codexNetworkDefaultArg } from "../domain/codex-network-default.js";
|
|
16
18
|
import { resolveCodexGitAddDirs } from "../domain/codex-git-add-dirs.js";
|
|
17
|
-
import { mergeManagedBlock } from "../domain/managed-blocks.js";
|
|
19
|
+
import { isPerSeatRoleGuidance, mergeManagedBlock, perSeatRoleSkipWarning } from "../domain/managed-blocks.js";
|
|
18
20
|
import { excludeNewGeneratedFiles } from "../domain/generated-file-hygiene.js";
|
|
19
21
|
import { codexQueueStateRoot, codexTeamWorkspaceArg } from "../domain/codex-team-workspace.js";
|
|
20
22
|
import { shellQuote } from "./shell-quote.js";
|
|
@@ -31,7 +33,9 @@ const defaultCodexCli = (args, env) => new Promise((resolve) => {
|
|
|
31
33
|
});
|
|
32
34
|
// Codex's hook trust recipe (the key and hash Codex records for a trusted hook), kept in one script.
|
|
33
35
|
const codexHookTrust = createRequire(import.meta.url)("../../assets/plugins/openrig-core/hooks/scripts/codex-hook-trust.cjs");
|
|
34
|
-
import { listNativeProcesses, observeCodexPaneProcess, observeCodexForkProcess, verifyPaneIdleShell } from "../domain/native-process-lineage.js";
|
|
36
|
+
import { listNativeProcesses, observeCodexPaneProcess, observeCodexForkProcess, verifyCodexPaneProcess, verifyPaneIdleShell } from "../domain/native-process-lineage.js";
|
|
37
|
+
import { recordSeatSkillWrite, seatPluginSkillsLossNote, seatProjectionComplete, seatSkillWriteRefusal } from "../domain/seat-skill-storage.js";
|
|
38
|
+
import { codexPluginContentHash, planOwnedCodexContentApproval, recordOwnedCodexApproval } from "../domain/codex-owned-plugin-trust.js";
|
|
35
39
|
// The managed resume check's poll window: a quick phase, then an extended one for a slow boot.
|
|
36
40
|
const RESUME_QUICK_ATTEMPTS = 6;
|
|
37
41
|
const RESUME_EXTENDED_ATTEMPTS = 24;
|
|
@@ -54,6 +58,10 @@ export class CodexRuntimeAdapter {
|
|
|
54
58
|
sleep;
|
|
55
59
|
resolveHomeDirByPid;
|
|
56
60
|
codexHome;
|
|
61
|
+
/** A seat's own CODEX_HOME from its member or rig `env:`, when it declares one. */
|
|
62
|
+
seatHome;
|
|
63
|
+
/** One thread-id resolver per Codex home its seats use, the daemon's included. */
|
|
64
|
+
threadResolvers = new Map();
|
|
57
65
|
launchPath;
|
|
58
66
|
// Housekeeping B1 fixback (guard-blocking, arch HK-AR-1 = whole-probe DI):
|
|
59
67
|
// the Codex profile-LOAD probe is an injectable dep in the adapter's
|
|
@@ -68,9 +76,11 @@ export class CodexRuntimeAdapter {
|
|
|
68
76
|
// #275: Codex's own answer on whether the plain floor may get network access. Startup wires the
|
|
69
77
|
// real reader; absent keeps every invocation unchanged.
|
|
70
78
|
readNetworkDefault;
|
|
71
|
-
// Issue #121: git metadata dirs for the
|
|
79
|
+
// Issue #121: git metadata dirs for the `--add-dir`s of fresh, resume and fork (a linked worktree's `.git` is a file).
|
|
72
80
|
// Default = the real resolver; tests may inject a controlled one.
|
|
73
81
|
resolveGitAddDirs;
|
|
82
|
+
// The seat's own topology folder for the `--add-dir`s of fresh, resume and fork. Absent: none is added.
|
|
83
|
+
prepareSeatFolder;
|
|
74
84
|
prepareTeamWorkspace;
|
|
75
85
|
resolveManagedConfigSettings;
|
|
76
86
|
resolveHooksEnabled;
|
|
@@ -88,6 +98,7 @@ export class CodexRuntimeAdapter {
|
|
|
88
98
|
// so each of those runs its whole setup under this one lock, one after another.
|
|
89
99
|
configLock = Promise.resolve();
|
|
90
100
|
codexSystemConfigDir;
|
|
101
|
+
/** Build the Codex launch adapter with injectable filesystem, process, and CLI seams for isolated checks. */
|
|
91
102
|
constructor(deps) {
|
|
92
103
|
this.resolveCorePluginDir = deps.resolveCorePluginDir;
|
|
93
104
|
this.resolveCorePluginSelected = deps.resolveCorePluginSelected;
|
|
@@ -97,9 +108,11 @@ export class CodexRuntimeAdapter {
|
|
|
97
108
|
this.resolveManagedConfigSettings = deps.resolveManagedConfigSettings;
|
|
98
109
|
this.resolveHooksEnabled = deps.resolveHooksEnabled;
|
|
99
110
|
this.prepareTeamWorkspace = deps.prepareTeamWorkspace;
|
|
111
|
+
this.prepareSeatFolder = deps.prepareSeatFolder;
|
|
100
112
|
this.seatLaunchEnvironment = deps.seatLaunchEnvironment;
|
|
101
113
|
this.fs = deps.fsOps;
|
|
102
114
|
this.codexHome = deps.codexHome;
|
|
115
|
+
this.seatHome = deps.seatHome;
|
|
103
116
|
this.launchPath = deps.launchPath;
|
|
104
117
|
this.detectDaemonSupport = deps.detectDaemonSupport;
|
|
105
118
|
this.readNetworkDefault = deps.readNetworkDefault;
|
|
@@ -107,28 +120,63 @@ export class CodexRuntimeAdapter {
|
|
|
107
120
|
this.activityRelayPath = deps.activityRelayPath;
|
|
108
121
|
this.listProcesses = deps.listProcesses ?? defaultListProcesses;
|
|
109
122
|
this.resolveHomeDirByPid = deps.resolveHomeDirByPid ?? defaultResolveHomeDirByPid;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
114
|
-
this.readThreadIdByPid = deps.readThreadIdByPid ?? ((pid, identity) => identity === undefined
|
|
115
|
-
? this.readThreadIdFromLogs(pid) : threadIdResolver.resolveForkChild(pid, identity));
|
|
123
|
+
// A seat with its own CODEX_HOME logs its threads there, so each read names the home it searches.
|
|
124
|
+
this.readThreadIdByPid = deps.readThreadIdByPid ?? ((pid, identity, home) => identity === undefined
|
|
125
|
+
? this.readThreadIdFromLogs(pid, home) : this.threadResolverFor(home).resolveForkChild(pid, identity));
|
|
116
126
|
// A just-launched resume may log only inside its start second, so this reads like a fork child's ("by-process").
|
|
117
127
|
this.readResumeEvidence = deps.readResumeEvidence ?? (deps.readThreadIdByPid
|
|
118
|
-
? async (pid, identity) => {
|
|
119
|
-
const threadId = (await deps.readThreadIdByPid(pid, identity))?.trim();
|
|
128
|
+
? async (pid, identity, home) => {
|
|
129
|
+
const threadId = (await deps.readThreadIdByPid(pid, identity, home))?.trim();
|
|
120
130
|
return threadId ? { threadId } : { reason: "no_log_row" };
|
|
121
131
|
}
|
|
122
|
-
: async (pid, identity) => {
|
|
132
|
+
: async (pid, identity, home) => {
|
|
123
133
|
let reason;
|
|
124
|
-
const threadId = (await
|
|
134
|
+
const threadId = (await this.threadResolverFor(home).resolveForkChild(pid, identity, (d) => { reason = d.reason; }))?.trim();
|
|
125
135
|
return threadId ? { threadId } : { reason: reason ?? "no_log_row" };
|
|
126
136
|
});
|
|
127
137
|
this.resumeProofWindowMs = deps.resumeProofWindowMs ?? RESUME_QUICK_ATTEMPTS * RESUME_QUICK_SLEEP_MS + RESUME_EXTENDED_ATTEMPTS * RESUME_EXTENDED_SLEEP_MS;
|
|
128
138
|
this.readinessSettings = deps.readinessSettings;
|
|
129
139
|
this.sleep = deps.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
130
|
-
this.verifyProfilePreflight = deps.verifyProfilePreflight
|
|
131
|
-
|
|
140
|
+
this.verifyProfilePreflight = deps.verifyProfilePreflight ?? ((profile, cwd, home) => {
|
|
141
|
+
const selected = home ?? this.codexHome;
|
|
142
|
+
return defaultProfilePreflight(profile, selected ? { cwd, codexHome: selected, launchPath: this.launchPath } : undefined);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/** The home a seat's Codex uses: its own from its member or rig `env:`, else the daemon's explicit CODEX_HOME. Undefined
|
|
146
|
+
* keeps the legacy OS/PID home behavior. */
|
|
147
|
+
homeFor(binding) {
|
|
148
|
+
return this.ownHome(binding) ?? this.codexHome;
|
|
149
|
+
}
|
|
150
|
+
/** Only the seat's own CODEX_HOME, undefined when it declares none. Probes and readers get it as an extra argument
|
|
151
|
+
* only when it's set, so a seat without one calls them exactly as before. */
|
|
152
|
+
ownHome(binding) {
|
|
153
|
+
return binding?.nodeId ? this.seatHome?.(binding.nodeId) : undefined;
|
|
154
|
+
}
|
|
155
|
+
ownHomeCommandOpt(binding) {
|
|
156
|
+
const own = this.ownHome(binding);
|
|
157
|
+
return own ? { codexHome: own } : {};
|
|
158
|
+
}
|
|
159
|
+
ownHomeOpt(binding) {
|
|
160
|
+
const own = this.ownHome(binding);
|
|
161
|
+
return own ? { home: own } : {};
|
|
162
|
+
}
|
|
163
|
+
/** A thread id read for this seat's process, in the seat's own home when it declares one. */
|
|
164
|
+
readThreadIdForSeat(binding, pid, identity) {
|
|
165
|
+
const own = this.ownHome(binding);
|
|
166
|
+
if (own)
|
|
167
|
+
return this.readThreadIdByPid(pid, identity, own);
|
|
168
|
+
return identity === undefined ? this.readThreadIdByPid(pid) : this.readThreadIdByPid(pid, identity);
|
|
169
|
+
}
|
|
170
|
+
/** The thread-id resolver for one Codex home (undefined: the daemon's), kept so its process-home cache is reused. */
|
|
171
|
+
threadResolverFor(home) {
|
|
172
|
+
const selected = home ?? this.codexHome;
|
|
173
|
+
let resolver = this.threadResolvers.get(selected ?? "");
|
|
174
|
+
if (!resolver) {
|
|
175
|
+
resolver = new CodexThreadIdResolver({ defaultHome: this.fs.homedir ?? os.homedir(), codexHome: selected,
|
|
176
|
+
resolveHomeDirByPid: this.resolveHomeDirByPid });
|
|
177
|
+
this.threadResolvers.set(selected ?? "", resolver);
|
|
178
|
+
}
|
|
179
|
+
return resolver;
|
|
132
180
|
}
|
|
133
181
|
/**
|
|
134
182
|
* Bring the Codex config.toml to the state OpenRig-managed seats need: feature flag,
|
|
@@ -137,8 +185,8 @@ export class CodexRuntimeAdapter {
|
|
|
137
185
|
* them: a rig with no Codex seat leaves the user's config alone. A failure warns and does
|
|
138
186
|
* not block the launch.
|
|
139
187
|
*/
|
|
140
|
-
async ensureManagedConfig() {
|
|
141
|
-
return this.withConfigLock(() => this.applyManagedConfig());
|
|
188
|
+
async ensureManagedConfig(home) {
|
|
189
|
+
return this.withConfigLock(() => this.applyManagedConfig(home));
|
|
142
190
|
}
|
|
143
191
|
/** Run `task` after every earlier config setup on this adapter has finished, whatever its outcome. */
|
|
144
192
|
withConfigLock(task) {
|
|
@@ -146,16 +194,16 @@ export class CodexRuntimeAdapter {
|
|
|
146
194
|
this.configLock = run.catch(() => undefined);
|
|
147
195
|
return run;
|
|
148
196
|
}
|
|
149
|
-
async applyManagedConfig() {
|
|
197
|
+
async applyManagedConfig(home) {
|
|
150
198
|
if (!this.resolveManagedConfigSettings)
|
|
151
199
|
return undefined;
|
|
152
200
|
try {
|
|
153
201
|
const { enabled, codexVersion } = await this.resolveManagedConfigSettings();
|
|
154
|
-
this.ensureCodexFeatureFlag(enabled, { codexVersion });
|
|
202
|
+
this.ensureCodexFeatureFlag(enabled, { codexVersion }, home);
|
|
155
203
|
if (enabled)
|
|
156
|
-
this.ensureCodexActivityHooks();
|
|
204
|
+
this.ensureCodexActivityHooks(home);
|
|
157
205
|
else
|
|
158
|
-
this.removeCodexActivityHooks();
|
|
206
|
+
this.removeCodexActivityHooks(home);
|
|
159
207
|
return { hooksEnabled: enabled };
|
|
160
208
|
}
|
|
161
209
|
catch (err) {
|
|
@@ -183,11 +231,11 @@ export class CodexRuntimeAdapter {
|
|
|
183
231
|
}
|
|
184
232
|
/**
|
|
185
233
|
* Install the vendored openrig-core plugin into Codex through Codex's own commands, so a seat that selected it gets its
|
|
186
|
-
* refocus and skills, trusting
|
|
234
|
+
* refocus and skills, trusting exact shipped hooks on first install and renewing proven owned content approvals. It runs only when the person's config
|
|
187
235
|
* doesn't disable the plugin (codexCorePluginEnablement), and only when the installed version differs from the vendored
|
|
188
|
-
* one. Codex owns its plugin cache;
|
|
236
|
+
* one. Codex owns its plugin cache; its immutable legacy trust baseline is never rewritten.
|
|
189
237
|
*/
|
|
190
|
-
async ensureCodexCorePlugin() {
|
|
238
|
+
async ensureCodexCorePlugin(home) {
|
|
191
239
|
const report = (outcome, reason) => {
|
|
192
240
|
if (outcome !== "current")
|
|
193
241
|
console.error(`[openrig] codex core plugin ${outcome}: ${reason}`);
|
|
@@ -228,8 +276,17 @@ export class CodexRuntimeAdapter {
|
|
|
228
276
|
});
|
|
229
277
|
if (!matchesShipped(pluginDir))
|
|
230
278
|
return report("skipped", "vendored hook files differ from this daemon's shipped plugin; existing choices are left alone");
|
|
231
|
-
|
|
232
|
-
const
|
|
279
|
+
// Installation retains the hook-file predicate; any approval requires the complete shipped tree.
|
|
280
|
+
const matchesShippedTree = (dir) => {
|
|
281
|
+
try {
|
|
282
|
+
return codexPluginContentHash(dir, true) === codexPluginContentHash(shipped, true);
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
const codexHome = nodePath.dirname(this.resolveCodexConfigPath(home));
|
|
289
|
+
const readLayers = () => codexReadableConfigLayers(codexHome, this.codexSystemConfigDir).map((layer) => {
|
|
233
290
|
if (!this.fs.exists(layer.path))
|
|
234
291
|
return { ...layer, state: "absent" };
|
|
235
292
|
try {
|
|
@@ -239,6 +296,7 @@ export class CodexRuntimeAdapter {
|
|
|
239
296
|
return { ...layer, state: "unreadable", reason: error.message };
|
|
240
297
|
}
|
|
241
298
|
});
|
|
299
|
+
const layers = readLayers();
|
|
242
300
|
const enablement = codexCorePluginEnablement(layers);
|
|
243
301
|
if (enablement.decision !== "allow")
|
|
244
302
|
return report("skipped", enablement.reason);
|
|
@@ -263,11 +321,44 @@ export class CodexRuntimeAdapter {
|
|
|
263
321
|
const cachedDir = nodePath.join(cacheRoot, version);
|
|
264
322
|
const cached = this.fs.exists(cachedDir);
|
|
265
323
|
// Codex's "continue without trusting" choice writes no state. An existing install/configuration may therefore be a
|
|
266
|
-
// decline even with no hooks.state entry.
|
|
267
|
-
//
|
|
324
|
+
// decline even with no hooks.state entry. Absent grants still stay under native review. A proven owned grant may
|
|
325
|
+
// renew its content approval; an unrecorded skip of that exact owned upgrade cannot be distinguished from pending approval.
|
|
268
326
|
const firstInstall = !this.fs.exists(cacheRoot) && !layers.some(layer => layer.state === "read"
|
|
269
327
|
&& Object.hasOwn((parseToml(layer.content).plugins ?? {}), CODEX_CORE_PLUGIN_KEY));
|
|
328
|
+
const renewContentApproval = (freshGrant = false) => {
|
|
329
|
+
const configPath = this.resolveCodexConfigPath(home);
|
|
330
|
+
const currentLayers = readLayers();
|
|
331
|
+
if (codexCorePluginEnablement(currentLayers).decision !== "allow")
|
|
332
|
+
return;
|
|
333
|
+
const before = this.fs.readFile(configPath);
|
|
334
|
+
const currentSource = recordedMarketplaceSource(before);
|
|
335
|
+
if (currentSource == null || canonical(currentSource) !== canonical(pluginsDir) || !userLayerEnablesCorePlugin(before))
|
|
336
|
+
return;
|
|
337
|
+
let content = before;
|
|
338
|
+
const planned = planOwnedCodexContentApproval({ configPath, content, layers: currentLayers, shipped, installed: cachedDir, freshGrant });
|
|
339
|
+
if (!planned)
|
|
340
|
+
return;
|
|
341
|
+
for (const [key, hash] of Object.entries(planned.hashes))
|
|
342
|
+
content = upsertCodexHookTrust(content, key, hash, "trusted_content_hash");
|
|
343
|
+
// The line writer must not alter examples in strings or duplicate quoted keys.
|
|
344
|
+
try {
|
|
345
|
+
const expected = parseToml(before);
|
|
346
|
+
for (const [key, hash] of Object.entries(planned.hashes))
|
|
347
|
+
expected.hooks.state[key].trusted_content_hash = hash;
|
|
348
|
+
if (!isDeepStrictEqual(parseToml(content), expected))
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
catch {
|
|
352
|
+
return;
|
|
353
|
+
} // Leave native review and owner bytes intact for unsupported TOML spellings.
|
|
354
|
+
if (this.fs.readFile(configPath) !== before)
|
|
355
|
+
return; // A concurrent native choice wins.
|
|
356
|
+
if (content !== before)
|
|
357
|
+
this.fs.writeFile(configPath, content);
|
|
358
|
+
recordOwnedCodexApproval(configPath, planned.approval);
|
|
359
|
+
};
|
|
270
360
|
if (cached && recorded !== undefined && userLayerEnablesCorePlugin(userConfig)) {
|
|
361
|
+
renewContentApproval();
|
|
271
362
|
return report("current", `${CODEX_CORE_PLUGIN_KEY} ${version} is installed and registered`);
|
|
272
363
|
}
|
|
273
364
|
const manifestPath = nodePath.join(pluginsDir, CODEX_MARKETPLACE_MANIFEST_PATH);
|
|
@@ -285,10 +376,12 @@ export class CodexRuntimeAdapter {
|
|
|
285
376
|
const installed = await this.runCodexCli(["plugin", "add", CODEX_CORE_PLUGIN_KEY], env);
|
|
286
377
|
if (installed.status !== 0)
|
|
287
378
|
return report("skipped", `codex plugin add failed: ${(installed.stderr || installed.stdout).trim() || `exit ${installed.status}`}`);
|
|
288
|
-
//
|
|
289
|
-
//
|
|
290
|
-
|
|
291
|
-
|
|
379
|
+
// First install grants declarations; Codex0.164 also requires full-bundle content approval. Existing declaration
|
|
380
|
+
// choices are never rewritten. No cache files or native baseline files are rewritten here.
|
|
381
|
+
let freshGrants = 0;
|
|
382
|
+
const grantLayers = readLayers();
|
|
383
|
+
if (firstInstall && codexCorePluginEnablement(grantLayers).decision === "allow" && matchesShippedTree(cachedDir)) {
|
|
384
|
+
let content = this.fs.readFile(this.resolveCodexConfigPath(home));
|
|
292
385
|
const hookManifest = JSON.parse(fs.readFileSync(nodePath.join(shipped, "hooks/codex.json"), "utf8"));
|
|
293
386
|
for (const [event, groups] of Object.entries(hookManifest.hooks)) {
|
|
294
387
|
groups.forEach((group, groupIndex) => group.hooks.forEach((handler, handlerIndex) => {
|
|
@@ -303,13 +396,15 @@ export class CodexRuntimeAdapter {
|
|
|
303
396
|
const value = doc;
|
|
304
397
|
return Object.hasOwn(value.hooks?.state ?? {}, key) || Object.values(doc).some(hasChoice);
|
|
305
398
|
};
|
|
306
|
-
if (!hasChoice(parseToml(content)) && !
|
|
399
|
+
if (!hasChoice(parseToml(content)) && !grantLayers.some(layer => layer.state === "read" && hasChoice(parseToml(layer.content)))) {
|
|
307
400
|
content = upsertCodexHookTrust(content, key, hash);
|
|
401
|
+
freshGrants++;
|
|
308
402
|
}
|
|
309
403
|
}));
|
|
310
404
|
}
|
|
311
|
-
this.fs.writeFile(this.resolveCodexConfigPath(), content);
|
|
405
|
+
this.fs.writeFile(this.resolveCodexConfigPath(home), content);
|
|
312
406
|
}
|
|
407
|
+
renewContentApproval(freshGrants === 6);
|
|
313
408
|
return report("installed", `${CODEX_CORE_PLUGIN_KEY} ${version} through Codex's own install (${enablement.reason})`);
|
|
314
409
|
}
|
|
315
410
|
/**
|
|
@@ -342,14 +437,14 @@ export class CodexRuntimeAdapter {
|
|
|
342
437
|
* that lived inside the auto-injected activity-hook provisioning path
|
|
343
438
|
* pre-rip (plugin-primitive Phase 3a slice 3.1).
|
|
344
439
|
*/
|
|
345
|
-
ensureCodexFeatureFlag(enabled, opts) {
|
|
440
|
+
ensureCodexFeatureFlag(enabled, opts, home) {
|
|
346
441
|
if (!enabled)
|
|
347
442
|
return;
|
|
348
443
|
if (!opts?.codexVersion)
|
|
349
444
|
return;
|
|
350
445
|
if (isCodex013xOrLater(opts.codexVersion))
|
|
351
446
|
return;
|
|
352
|
-
const configPath = this.resolveCodexConfigPath();
|
|
447
|
+
const configPath = this.resolveCodexConfigPath(home);
|
|
353
448
|
const existing = this.fs.exists(configPath) ? this.fs.readFile(configPath) : "";
|
|
354
449
|
const updated = upsertCodexHooksFeature(existing);
|
|
355
450
|
if (updated !== existing) {
|
|
@@ -378,7 +473,7 @@ export class CodexRuntimeAdapter {
|
|
|
378
473
|
* codex TUI launch lacks that context and may not deliver SessionStart — not how OpenRig
|
|
379
474
|
* launches seats.)
|
|
380
475
|
*/
|
|
381
|
-
ensureCodexActivityHooks() {
|
|
476
|
+
ensureCodexActivityHooks(home) {
|
|
382
477
|
const relay = this.activityRelayPath;
|
|
383
478
|
if (!relay || !this.fs.exists(relay)) {
|
|
384
479
|
if (relay) {
|
|
@@ -386,8 +481,15 @@ export class CodexRuntimeAdapter {
|
|
|
386
481
|
}
|
|
387
482
|
return;
|
|
388
483
|
}
|
|
389
|
-
const configPath = this.resolveCodexConfigPath();
|
|
484
|
+
const configPath = this.resolveCodexConfigPath(home);
|
|
390
485
|
const existing = this.fs.exists(configPath) ? this.fs.readFile(configPath) : "";
|
|
486
|
+
// A Codex home that keeps its hooks in hooks.json gets OpenRig's there too: Codex warns when one layer mixes both
|
|
487
|
+
// formats. Without a hooks.json, the inline config.toml block below is unchanged.
|
|
488
|
+
const hooksPath = nodePath.join(nodePath.dirname(configPath), "hooks.json");
|
|
489
|
+
if (this.fs.exists(hooksPath)) {
|
|
490
|
+
this.ensureCodexJsonActivityHooks(existing, configPath, hooksPath, relay);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
391
493
|
const withHooks = upsertCodexActivityHooks(existing, relay);
|
|
392
494
|
if (withHooks !== existing) {
|
|
393
495
|
this.fs.mkdirp(nodePath.dirname(configPath));
|
|
@@ -406,6 +508,75 @@ export class CodexRuntimeAdapter {
|
|
|
406
508
|
this.fs.writeFile(configPath, trusted);
|
|
407
509
|
}
|
|
408
510
|
}
|
|
511
|
+
/**
|
|
512
|
+
* OpenRig's activity hooks in an existing hooks.json: one marked group per event (statusMessage "OpenRig activity"),
|
|
513
|
+
* replaced where it already is or appended after the user's groups, so their positions (and the trust Codex keys by
|
|
514
|
+
* position) don't move. OpenRig's own inline block from an earlier launch moves out of config.toml; the user's hooks,
|
|
515
|
+
* in either file, stay where they are. Trust is written for exactly our groups, keyed by the hooks.json path. A file
|
|
516
|
+
* OpenRig can't read as hooks is left untouched, with a warning.
|
|
517
|
+
*/
|
|
518
|
+
ensureCodexJsonActivityHooks(existing, configPath, hooksPath, relay) {
|
|
519
|
+
const original = this.fs.readFile(hooksPath);
|
|
520
|
+
let document;
|
|
521
|
+
try {
|
|
522
|
+
document = parseCodexHooksJson(original);
|
|
523
|
+
}
|
|
524
|
+
catch (err) {
|
|
525
|
+
console.error(`[openrig] codex activity hooks skipped: ${hooksPath} can't be read as hooks (${err.message}); left untouched`);
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
const command = `node "${relay}"`;
|
|
529
|
+
const keySource = canonicalCodexHookSource(hooksPath);
|
|
530
|
+
const stripped = upsertCodexFeaturesHooksEnabled(stripCodexActivityHooks(existing));
|
|
531
|
+
let before = null;
|
|
532
|
+
let expected = null;
|
|
533
|
+
try {
|
|
534
|
+
before = parseToml(existing);
|
|
535
|
+
expected = parseToml(stripped);
|
|
536
|
+
}
|
|
537
|
+
catch (err) {
|
|
538
|
+
console.error(`[openrig] codex activity hooks skipped: ${configPath} can't be read as TOML (${err.message}); left untouched`);
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
if (!expected)
|
|
542
|
+
return;
|
|
543
|
+
const inlineSource = canonicalCodexHookSource(configPath);
|
|
544
|
+
let config = stripped;
|
|
545
|
+
for (const event of OPENRIG_ACTIVITY_HOOK_EVENTS) {
|
|
546
|
+
const groups = document.hooks[event] ?? [];
|
|
547
|
+
const found = groups.findIndex(isOpenRigActivityGroup);
|
|
548
|
+
const groupIndex = found < 0 ? groups.length : found;
|
|
549
|
+
groups[groupIndex] = openRigActivityGroup(command);
|
|
550
|
+
document.hooks[event] = groups;
|
|
551
|
+
const { key, hash } = computeCodexHookTrust(event, { keySource, command, timeoutSec: 5, groupIndex, statusMessage: OPENRIG_ACTIVITY_STATUS });
|
|
552
|
+
config = upsertCodexHookTrust(config, key, hash);
|
|
553
|
+
// A person's disable of OpenRig's inline hook moves with it; an existing choice at the new key is kept as it is.
|
|
554
|
+
const inlineIndex = openRigInlineGroupIndex(before, event);
|
|
555
|
+
const disabled = inlineIndex >= 0
|
|
556
|
+
&& codexHookStateOf(before)[`${inlineSource}:${CODEX_HOOK_EVENT_KEY_LABEL[event]}:${inlineIndex}:0`]?.enabled === false;
|
|
557
|
+
if (disabled)
|
|
558
|
+
config = upsertCodexHookDisabled(config, key);
|
|
559
|
+
const state = ((expected.hooks ??= {}).state ??= {});
|
|
560
|
+
state[key] = { ...state[key], trusted_hash: hash, ...(disabled ? { enabled: false } : {}) };
|
|
561
|
+
}
|
|
562
|
+
// The line writers must give exactly the planned fields in valid TOML (they don't read every TOML spelling);
|
|
563
|
+
// otherwise neither file changes, and OpenRig's old inline block, if any, stays working.
|
|
564
|
+
try {
|
|
565
|
+
if (!isDeepStrictEqual(parseToml(config), expected))
|
|
566
|
+
throw new Error("its trust records couldn't be written exactly");
|
|
567
|
+
}
|
|
568
|
+
catch (err) {
|
|
569
|
+
console.error(`[openrig] codex activity hooks skipped: ${configPath}: ${err.message}; left untouched`);
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
const json = `${JSON.stringify(document, null, 2)}\n`;
|
|
573
|
+
if (json !== original)
|
|
574
|
+
this.fs.writeFile(hooksPath, json);
|
|
575
|
+
if (config !== existing) {
|
|
576
|
+
this.fs.mkdirp(nodePath.dirname(configPath));
|
|
577
|
+
this.fs.writeFile(configPath, config);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
409
580
|
/**
|
|
410
581
|
* OPR.0.4.3.33 — compute + splice Codex's `[hooks.state."<key>"] trusted_hash` for our 4
|
|
411
582
|
* authored activity hooks into `content`. `key_source` is the canonicalized config path
|
|
@@ -426,9 +597,15 @@ export class CodexRuntimeAdapter {
|
|
|
426
597
|
// absolute path is the honest best guess; a canonicalization delta is fail-safe (gate reappears).
|
|
427
598
|
}
|
|
428
599
|
const command = `node "${relay}"`;
|
|
600
|
+
// upsertCodexActivityHooks has just written our marked block. Codex keys by the
|
|
601
|
+
// group's position among this event's groups, not its position inside our block.
|
|
602
|
+
// Count only the groups before the marker: a person's groups after it do not
|
|
603
|
+
// move ours, and their trust/disable records must not be written as ours.
|
|
604
|
+
const prefix = parseToml(content.slice(0, content.indexOf(OPENRIG_ACTIVITY_HOOKS_BEGIN)));
|
|
429
605
|
let next = content;
|
|
430
606
|
for (const event of OPENRIG_ACTIVITY_HOOK_EVENTS) {
|
|
431
|
-
const
|
|
607
|
+
const groupIndex = prefix.hooks?.[event]?.length ?? 0;
|
|
608
|
+
const { key, hash } = computeCodexHookTrust(event, { keySource, command, timeoutSec: 5, groupIndex });
|
|
432
609
|
next = upsertCodexHookTrust(next, key, hash);
|
|
433
610
|
}
|
|
434
611
|
return next;
|
|
@@ -440,19 +617,56 @@ export class CodexRuntimeAdapter {
|
|
|
440
617
|
* Removes ONLY the managed block — preserves any user-owned hooks and leaves [features].hooks
|
|
441
618
|
* (the Codex 0.139 default) intact. Idempotent; no-op when the config or the block is absent.
|
|
442
619
|
*/
|
|
443
|
-
removeCodexActivityHooks() {
|
|
444
|
-
const configPath = this.resolveCodexConfigPath();
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
620
|
+
removeCodexActivityHooks(home) {
|
|
621
|
+
const configPath = this.resolveCodexConfigPath(home);
|
|
622
|
+
const hooksPath = nodePath.join(nodePath.dirname(configPath), "hooks.json");
|
|
623
|
+
const existing = this.fs.exists(configPath) ? this.fs.readFile(configPath) : null;
|
|
624
|
+
let updated = existing === null ? null : stripCodexActivityHooks(existing);
|
|
625
|
+
if (this.fs.exists(hooksPath)) {
|
|
626
|
+
// Only OpenRig's groups leave. Codex keys trust and disables by position, so each later group's state moves with it.
|
|
627
|
+
try {
|
|
628
|
+
const original = this.fs.readFile(hooksPath);
|
|
629
|
+
const document = parseCodexHooksJson(original);
|
|
630
|
+
const keySource = canonicalCodexHookSource(hooksPath);
|
|
631
|
+
let config = updated ?? "";
|
|
632
|
+
const expected = parseToml(config);
|
|
633
|
+
for (const event of OPENRIG_ACTIVITY_HOOK_EVENTS) {
|
|
634
|
+
const groups = document.hooks[event];
|
|
635
|
+
if (!groups)
|
|
636
|
+
continue;
|
|
637
|
+
const kept = groups.flatMap((group, index) => isOpenRigActivityGroup(group) ? [] : [index]);
|
|
638
|
+
if (kept.length === groups.length)
|
|
639
|
+
continue;
|
|
640
|
+
const prefix = `${keySource}:${CODEX_HOOK_EVENT_KEY_LABEL[event]}:`;
|
|
641
|
+
const newIndexOf = (index) => { const at = kept.indexOf(index); return at < 0 ? null : at; };
|
|
642
|
+
config = rekeyCodexHookStateText(config, prefix, newIndexOf);
|
|
643
|
+
if (expected.hooks?.state)
|
|
644
|
+
expected.hooks.state = rekeyCodexHookState(expected.hooks.state, prefix, newIndexOf);
|
|
645
|
+
if (kept.length > 0)
|
|
646
|
+
document.hooks[event] = kept.map((index) => groups[index]);
|
|
647
|
+
else
|
|
648
|
+
delete document.hooks[event];
|
|
649
|
+
}
|
|
650
|
+
if (!isDeepStrictEqual(withoutEmptyHookTables(parseToml(config)), withoutEmptyHookTables(expected))) {
|
|
651
|
+
throw new Error("its hooks' trust records couldn't be moved exactly");
|
|
652
|
+
}
|
|
653
|
+
const json = `${JSON.stringify(document, null, 2)}\n`;
|
|
654
|
+
if (json !== original)
|
|
655
|
+
this.fs.writeFile(hooksPath, json);
|
|
656
|
+
if (updated !== null)
|
|
657
|
+
updated = config;
|
|
658
|
+
}
|
|
659
|
+
catch (err) {
|
|
660
|
+
console.error(`[openrig] codex activity hook removal skipped for ${hooksPath}: ${err.message}; left untouched`);
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
if (existing !== null && updated !== null && updated !== existing) {
|
|
450
664
|
this.fs.writeFile(configPath, updated);
|
|
451
665
|
}
|
|
452
666
|
}
|
|
453
667
|
async listInstalled(binding) {
|
|
454
668
|
const results = [];
|
|
455
|
-
const skillsDir = nodePath.join(binding.cwd, ".agents", "skills");
|
|
669
|
+
const skillsDir = binding.seatSkillsRoot ?? nodePath.join(binding.cwd, ".agents", "skills");
|
|
456
670
|
if (this.fs.exists(skillsDir) && this.fs.listFiles) {
|
|
457
671
|
for (const file of this.fs.listFiles(skillsDir)) {
|
|
458
672
|
results.push({ effectiveId: file, category: "skill", installedPath: nodePath.join(skillsDir, file) });
|
|
@@ -471,7 +685,7 @@ export class CodexRuntimeAdapter {
|
|
|
471
685
|
continue;
|
|
472
686
|
}
|
|
473
687
|
try {
|
|
474
|
-
const didProject = this.projectEntry(entry, binding.cwd, warnings);
|
|
688
|
+
const didProject = this.projectEntry(entry, binding.cwd, warnings, binding.seatSkillsRoot, binding.seatSkillsRefused, this.homeFor(binding));
|
|
475
689
|
if (didProject) {
|
|
476
690
|
projected.push(entry.effectiveId);
|
|
477
691
|
}
|
|
@@ -498,7 +712,7 @@ export class CodexRuntimeAdapter {
|
|
|
498
712
|
for (const file of files) {
|
|
499
713
|
try {
|
|
500
714
|
const content = this.fs.readFile(file.absolutePath);
|
|
501
|
-
const hint = file.deliveryHint === "auto" ? this.detectDeliveryHint(file.path, content) : file.deliveryHint;
|
|
715
|
+
const hint = file.deliveryHint === "auto" ? this.detectDeliveryHint(file.path, content, file.orientation) : file.deliveryHint;
|
|
502
716
|
switch (hint) {
|
|
503
717
|
case "guidance_merge": {
|
|
504
718
|
const targetPath = nodePath.join(binding.cwd, "AGENTS.md");
|
|
@@ -508,9 +722,18 @@ export class CodexRuntimeAdapter {
|
|
|
508
722
|
break;
|
|
509
723
|
}
|
|
510
724
|
case "skill_install": {
|
|
511
|
-
const targetDir = nodePath.join(binding.cwd, ".agents", "skills", nodePath.basename(nodePath.dirname(file.absolutePath)));
|
|
725
|
+
const targetDir = nodePath.join(binding.seatSkillsRoot ?? nodePath.join(binding.cwd, ".agents", "skills"), nodePath.basename(nodePath.dirname(file.absolutePath)));
|
|
726
|
+
const skillTarget = nodePath.join(targetDir, nodePath.basename(file.path));
|
|
727
|
+
// OPR.0.7.0.13: never write through a link out of the seat's storage.
|
|
728
|
+
const refusal = binding.seatSkillsRoot ? binding.seatSkillsRefused ?? seatSkillWriteRefusal(binding.seatSkillsRoot, skillTarget) : undefined;
|
|
729
|
+
if (refusal) {
|
|
730
|
+
warnings.push(`skill_install: ${refusal}`);
|
|
731
|
+
continue;
|
|
732
|
+
}
|
|
512
733
|
this.fs.mkdirp(targetDir);
|
|
513
|
-
this.fs.writeFile(
|
|
734
|
+
this.fs.writeFile(skillTarget, content);
|
|
735
|
+
if (binding.seatSkillsRoot)
|
|
736
|
+
recordSeatSkillWrite(binding.seatSkillsRoot, skillTarget, file.absolutePath, content);
|
|
514
737
|
break;
|
|
515
738
|
}
|
|
516
739
|
case "send_text": {
|
|
@@ -548,7 +771,7 @@ export class CodexRuntimeAdapter {
|
|
|
548
771
|
const prepared = await this.prepareLaunch(binding, opts.name, undefined, { installCorePlugin: !opts.resumeToken });
|
|
549
772
|
if (!prepared.ok)
|
|
550
773
|
return prepared;
|
|
551
|
-
const { modelArg, effortArg, appliedLaunch, postureArg, queueStateDirArg, daemonArg, networkArg } = prepared;
|
|
774
|
+
const { modelArg, effortArg, appliedLaunch, postureArg, queueStateDirArg, gitDirArg, seatFolderArg, daemonArg, networkArg } = prepared;
|
|
552
775
|
// Fork branch: `codex fork <parent_thread_id>`. Captures the NEW thread id
|
|
553
776
|
// post-fork. Parent thread id is NOT persisted onto the new seat record
|
|
554
777
|
// (identity-honesty bedrock).
|
|
@@ -567,7 +790,9 @@ export class CodexRuntimeAdapter {
|
|
|
567
790
|
// -s danger-full-access on every seat; otherwise the named profile, or OpenRig's explicit
|
|
568
791
|
// -s workspace-write floor flag.
|
|
569
792
|
// 0.5.2-07 A2-3: the FORK path threads the SPEC model too (fork-instantiate reverted it before).
|
|
570
|
-
|
|
793
|
+
// The git dirs and the seat folder follow the parent id: ps flattens argv, so a path with a space placed before the
|
|
794
|
+
// id would be read as the id when the fork is verified.
|
|
795
|
+
const cmd = `codex${daemonArg}${postureArg}${networkArg}${modelArg}${effortArg} fork${queueStateDirArg} ${shellQuote(parentId)}${gitDirArg}${seatFolderArg}`;
|
|
571
796
|
const textResult = await this.tmux.sendShellCommand(binding.tmuxSession, await this.seatCommand(binding, cmd));
|
|
572
797
|
if (!textResult.ok) {
|
|
573
798
|
return { ok: false, error: `Failed to send launch command: ${textResult.message}` };
|
|
@@ -601,15 +826,11 @@ export class CodexRuntimeAdapter {
|
|
|
601
826
|
// OPR.0.4.8.2: one posture decision (codexPostureArg) for the fresh launch too — YOLO forces
|
|
602
827
|
// -s danger-full-access (overrides even a named profile); otherwise the named profile, or
|
|
603
828
|
// OpenRig's explicit -s workspace-write floor flag.
|
|
604
|
-
// Issue #121: only the fresh launch adds git metadata dirs; resume and fork never did.
|
|
605
|
-
const gitDirArg = opts.resumeToken
|
|
606
|
-
? ""
|
|
607
|
-
: (await this.resolveGitAddDirs(binding.cwd)).map((dir) => ` --add-dir ${shellQuote(dir)}`).join("");
|
|
608
829
|
const cmd = opts.resumeToken
|
|
609
830
|
// 0.5.2-07 A2-3: the pod-aware RESUME path threads the SPEC model too (reverted before — the
|
|
610
831
|
// grounding map assumed codex parity with the claude adapter, but only fresh emitted -m).
|
|
611
832
|
? this.resumeCore(prepared, opts.resumeToken, binding)
|
|
612
|
-
: `codex${daemonArg}${postureArg}${networkArg} -C ${shellQuote(binding.cwd)}${gitDirArg}${queueStateDirArg}${modelArg}${effortArg}`;
|
|
833
|
+
: `codex${daemonArg}${postureArg}${networkArg} -C ${shellQuote(binding.cwd)}${gitDirArg}${seatFolderArg}${queueStateDirArg}${modelArg}${effortArg}`;
|
|
613
834
|
const textResult = await this.tmux.sendShellCommand(binding.tmuxSession, await this.seatCommand(binding, cmd));
|
|
614
835
|
if (!textResult.ok) {
|
|
615
836
|
return { ok: false, error: `Failed to send launch command: ${textResult.message}` };
|
|
@@ -618,7 +839,7 @@ export class CodexRuntimeAdapter {
|
|
|
618
839
|
if (updatePrompt.failure)
|
|
619
840
|
return updatePrompt.failure;
|
|
620
841
|
if (opts.resumeToken) {
|
|
621
|
-
const verification = await this.verifyResumeLaunch(binding.tmuxSession, updatePrompt, { resumeToken: opts.resumeToken });
|
|
842
|
+
const verification = await this.verifyResumeLaunch(binding.tmuxSession, updatePrompt, { resumeToken: opts.resumeToken, ...this.ownHomeOpt(binding) });
|
|
622
843
|
if (!verification.ok)
|
|
623
844
|
return verification;
|
|
624
845
|
return { ok: true, resumeToken: opts.resumeToken, resumeType: "codex_id", appliedLaunch,
|
|
@@ -646,31 +867,36 @@ export class CodexRuntimeAdapter {
|
|
|
646
867
|
}
|
|
647
868
|
/** Type a command buildResumeCommand built into the pane's shell, then verify the resume as launchHarness
|
|
648
869
|
* does. Nothing is prepared again, so the command runs exactly as it was built and checked. */
|
|
649
|
-
async sendResumeCommand(tmuxSession, command, resumeToken) {
|
|
870
|
+
async sendResumeCommand(tmuxSession, command, resumeToken, nodeId, home) {
|
|
650
871
|
const textResult = await this.tmux.sendShellCommand(tmuxSession, command);
|
|
651
872
|
if (!textResult.ok)
|
|
652
873
|
return { ok: false, error: `Failed to send launch command: ${textResult.message}` };
|
|
653
|
-
return this.verifyResumeInPane(tmuxSession, resumeToken);
|
|
874
|
+
return this.verifyResumeInPane(tmuxSession, resumeToken, nodeId, home);
|
|
654
875
|
}
|
|
655
876
|
/** launchHarness's resume verification for a resume the caller started itself: dismiss a skippable update
|
|
656
|
-
* prompt, then require a proven resumed conversation (never process-alive alone).
|
|
657
|
-
|
|
877
|
+
* prompt, then require a proven resumed conversation (never process-alive alone). The proof reads `home` when the
|
|
878
|
+
* caller read it from the running Codex, else the seat's own CODEX_HOME when `nodeId` names a seat that declares one,
|
|
879
|
+
* where its resumed Codex logs. */
|
|
880
|
+
async verifyResumeInPane(tmuxSession, resumeToken, nodeId, home) {
|
|
658
881
|
const updatePrompt = { handled: false };
|
|
659
882
|
await this.dismissSkippableCodexUpdatePrompt(tmuxSession, updatePrompt);
|
|
660
883
|
if (updatePrompt.failure)
|
|
661
884
|
return updatePrompt.failure;
|
|
662
|
-
return this.verifyResumeLaunch(tmuxSession, updatePrompt, { resumeToken });
|
|
885
|
+
return this.verifyResumeLaunch(tmuxSession, updatePrompt, { resumeToken, ...(home ? { home } : this.ownHomeOpt({ nodeId })) });
|
|
663
886
|
}
|
|
664
887
|
/** Launch flags shared by fresh, fork and resume, decided once per launch. With `running`, the probed and
|
|
665
888
|
* prepared parts come from the running Codex instead, and no Codex process is started to decide them. */
|
|
666
889
|
async prepareLaunch(binding, name, running, opts) {
|
|
667
890
|
// The config write and, for a seat that selected openrig-core, its install run as one step under the config lock, so
|
|
668
891
|
// concurrent launches never interleave them. An unselected seat's launch never installs.
|
|
892
|
+
// A seat with its own CODEX_HOME gets OpenRig's managed config (hooks, feature flag) and plugin in that home.
|
|
893
|
+
const home = this.homeFor(binding);
|
|
894
|
+
const own = this.ownHome(binding);
|
|
669
895
|
await this.withConfigLock(async () => {
|
|
670
|
-
const managed = await this.applyManagedConfig();
|
|
896
|
+
const managed = await this.applyManagedConfig(home);
|
|
671
897
|
if (opts.installCorePlugin && managed?.hooksEnabled && this.resolveCorePluginSelected?.(binding.nodeId)) {
|
|
672
898
|
try {
|
|
673
|
-
await this.ensureCodexCorePlugin();
|
|
899
|
+
await this.ensureCodexCorePlugin(home);
|
|
674
900
|
}
|
|
675
901
|
catch (err) {
|
|
676
902
|
console.error(`[openrig] runtime setup warning: ${err.message}`);
|
|
@@ -683,13 +909,22 @@ export class CodexRuntimeAdapter {
|
|
|
683
909
|
const effortArg = effort ? ` -c ${shellQuote(`model_reasoning_effort="${effort}"`)}` : "";
|
|
684
910
|
const profile = binding.codexConfigProfile?.trim();
|
|
685
911
|
const profileArg = profile ? ` -p ${shellQuote(profile)}` : "";
|
|
686
|
-
const posture =
|
|
687
|
-
|
|
912
|
+
const posture = binding.codexRebuildPermissions
|
|
913
|
+
? profileArg + codexEnvelopeArgs(binding.codexRebuildPermissions)
|
|
914
|
+
: codexPostureArg(profileArg, process.env, binding.launchPosture);
|
|
915
|
+
const appliedLaunch = binding.codexRebuildPermissions
|
|
916
|
+
? { runtime: "codex", axis: "sandbox", state: "observed", value: binding.codexRebuildPermissions.sandboxPolicy.type,
|
|
917
|
+
reason: "emitted_launch_arguments", ...(binding.codexRebuildPermissions.approvalPolicy === "never" ? { approvalPolicy: "never" } : {}) }
|
|
918
|
+
: observeCodexSandbox(posture);
|
|
688
919
|
const postureArg = posture + operationalLaunchArg(this.runtime, binding);
|
|
689
920
|
if (running) {
|
|
690
921
|
// The running Codex already loaded its profile; drift in -p is the caller's to compare.
|
|
922
|
+
// Its own --add-dirs, git dirs included, carry over as they ran; none are resolved again. They follow the
|
|
923
|
+
// conversation id, as on every resume, so the resume proof reads the id even when a dir has a space.
|
|
691
924
|
return { ok: true, model, modelArg, effort, effortArg, profile, appliedLaunch, postureArg,
|
|
692
|
-
queueStateDirArg:
|
|
925
|
+
queueStateDirArg: "",
|
|
926
|
+
gitDirArg: running.addDirs.map((dir) => ` --add-dir ${shellQuote(dir)}`).join(""),
|
|
927
|
+
seatFolderArg: "",
|
|
693
928
|
daemonOptOut: running.daemonOptOut, daemonArg: running.daemonOptOut ? " --no-daemon" : "",
|
|
694
929
|
networkArg: running.networkOverride ? ` -c ${shellQuote(CODEX_NETWORK_DEFAULT_OVERRIDE)}` : "" };
|
|
695
930
|
}
|
|
@@ -698,7 +933,7 @@ export class CodexRuntimeAdapter {
|
|
|
698
933
|
// `codex -p <profile> resume` failure. An absent .config.toml passes
|
|
699
934
|
// (Codex default-layers it; advisor Option B).
|
|
700
935
|
if (profile) {
|
|
701
|
-
const probeResult = await this.verifyProfilePreflight(profile, binding.cwd);
|
|
936
|
+
const probeResult = await (own ? this.verifyProfilePreflight(profile, binding.cwd, own) : this.verifyProfilePreflight(profile, binding.cwd));
|
|
702
937
|
if (!probeResult.ok) {
|
|
703
938
|
return {
|
|
704
939
|
ok: false,
|
|
@@ -706,32 +941,48 @@ export class CodexRuntimeAdapter {
|
|
|
706
941
|
};
|
|
707
942
|
}
|
|
708
943
|
}
|
|
709
|
-
|
|
944
|
+
// Codex rejects writable --add-dir roots under a read-only sandbox. Only
|
|
945
|
+
// suppress OpenRig's generated roots when later project layers cannot make it writable.
|
|
946
|
+
const suppressAutoAddDirs = Boolean(!binding.codexRebuildPermissions && profile
|
|
947
|
+
&& posture === profileArg && this.profileRemainsReadOnly(profile, binding.cwd, home));
|
|
948
|
+
// Issue #121: fresh, resume and fork get the same git metadata dirs, so a restored or forked seat can still commit.
|
|
949
|
+
// A rebuild keeps the writable roots its observed envelope names instead.
|
|
950
|
+
const gitDirArg = binding.codexRebuildPermissions || suppressAutoAddDirs
|
|
951
|
+
? "" : (await this.resolveGitAddDirs(binding.cwd)).map((dir) => ` --add-dir ${shellQuote(dir)}`).join("");
|
|
952
|
+
// The seat's own topology folder, so it can keep its LEARNED.md and recap: the same launches and the same suppression.
|
|
953
|
+
const seatFolder = binding.codexRebuildPermissions || suppressAutoAddDirs ? undefined : this.prepareSeatFolder?.(name);
|
|
954
|
+
const seatFolderArg = seatFolder ? ` --add-dir ${shellQuote(seatFolder)}` : "";
|
|
955
|
+
const teamWorkspaceArg = !binding.codexRebuildPermissions && binding.teamPermissionDefault && !profile
|
|
710
956
|
&& appliedLaunch.state === "observed" && appliedLaunch.value === "workspace-write"
|
|
711
957
|
? codexTeamWorkspaceArg(this.prepareTeamWorkspace, name) : "";
|
|
712
|
-
const queueStateDirArg =
|
|
958
|
+
const queueStateDirArg = binding.codexRebuildPermissions || suppressAutoAddDirs
|
|
959
|
+
? "" : teamWorkspaceArg || this.buildQueueStateAddDirArg(name);
|
|
713
960
|
// #69: one daemon-support decision for this launch, for the Codex the seat pane runs
|
|
714
961
|
// (its cwd, the launch PATH), applied to fresh, fork and resume.
|
|
715
|
-
const daemonSupport = this.detectDaemonSupport ? await this.detectDaemonSupport(binding.cwd) : undefined;
|
|
962
|
+
const daemonSupport = this.detectDaemonSupport ? await (own ? this.detectDaemonSupport(binding.cwd, own) : this.detectDaemonSupport(binding.cwd)) : undefined;
|
|
716
963
|
if (daemonSupport?.kind === "unknown") {
|
|
717
964
|
return { ok: false, error: unknownDaemonSupportMessage(daemonSupport.detail) };
|
|
718
965
|
}
|
|
719
966
|
const daemonOptOut = daemonSupport?.kind === "supported";
|
|
720
967
|
const daemonArg = daemonOptOut ? " --no-daemon" : "";
|
|
721
968
|
// #275: on the plain floor, network access unless Codex reports an opt-out or policy.
|
|
722
|
-
const networkArg =
|
|
969
|
+
const networkArg = binding.codexRebuildPermissions ? ""
|
|
970
|
+
: await codexNetworkDefaultArg(own && this.readNetworkDefault ? ((cwd) => this.readNetworkDefault(cwd, own)) : this.readNetworkDefault, appliedLaunch, binding.cwd, name);
|
|
723
971
|
// The launch facts keep the probed daemon choice, so a printed recovery command can repeat it; no probe, no fact.
|
|
724
972
|
const launchFacts = daemonSupport ? { ...appliedLaunch, daemonOptOut } : appliedLaunch;
|
|
725
|
-
return { ok: true, model, modelArg, effort, effortArg, profile, appliedLaunch: launchFacts, postureArg, queueStateDirArg, daemonOptOut, daemonArg, networkArg };
|
|
973
|
+
return { ok: true, model, modelArg, effort, effortArg, profile, appliedLaunch: launchFacts, postureArg, queueStateDirArg, gitDirArg, seatFolderArg, daemonOptOut, daemonArg, networkArg };
|
|
726
974
|
}
|
|
727
975
|
resumeCore(prepared, resumeToken, binding) {
|
|
728
|
-
const { profile, queueStateDirArg, model, postureArg, networkArg, daemonOptOut, effort } = prepared;
|
|
729
|
-
|
|
976
|
+
const { profile, queueStateDirArg, gitDirArg, seatFolderArg, model, postureArg, networkArg, daemonOptOut, effort } = prepared;
|
|
977
|
+
// The git dirs and the seat folder follow the conversation id, as on a fork, so the resume proof reads the id even
|
|
978
|
+
// from a path with a space.
|
|
979
|
+
return buildCodexResumeCore(resumeToken, profile, false, queueStateDirArg.trim() || undefined, binding.launchPosture, model, `${postureArg}${networkArg}`, daemonOptOut, effort)
|
|
980
|
+
+ gitDirArg + seatFolderArg;
|
|
730
981
|
}
|
|
731
982
|
async seatCommand(binding, cmd) {
|
|
732
983
|
return this.seatLaunchEnvironment
|
|
733
|
-
? await this.seatLaunchEnvironment.command(binding.tmuxSession, cmd, { codexCwd: binding.cwd, nodeId: binding.nodeId, generation: binding.launchGeneration, runtime: this.runtime })
|
|
734
|
-
: this.launchCommand(cmd);
|
|
984
|
+
? await this.seatLaunchEnvironment.command(binding.tmuxSession, cmd, { codexCwd: binding.cwd, nodeId: binding.nodeId, generation: binding.launchGeneration, runtime: this.runtime, ...this.ownHomeCommandOpt(binding) })
|
|
985
|
+
: this.launchCommand(cmd, this.homeFor(binding));
|
|
735
986
|
}
|
|
736
987
|
buildQueueStateAddDirArg(sessionName) {
|
|
737
988
|
const sharedDocsRoot = process.env.OPENRIG_SHARED_DOCS_ROOT?.trim()
|
|
@@ -739,6 +990,81 @@ export class CodexRuntimeAdapter {
|
|
|
739
990
|
const root = codexQueueStateRoot(sessionName, sharedDocsRoot);
|
|
740
991
|
return root ? ` --add-dir ${shellQuote(root)}` : "";
|
|
741
992
|
}
|
|
993
|
+
/**
|
|
994
|
+
* Return true only when visible config proves a read-only profile within Codex's default project root.
|
|
995
|
+
* Unknown markers or unreadable layers retain the generated roots for native launch handling.
|
|
996
|
+
*/
|
|
997
|
+
profileRemainsReadOnly(profile, cwd, home = this.codexHome) {
|
|
998
|
+
const root = home ?? nodePath.join(this.fs.homedir ?? os.homedir(), ".codex");
|
|
999
|
+
const path = nodePath.join(root, `${profile}.config.toml`);
|
|
1000
|
+
const userPath = nodePath.join(root, "config.toml");
|
|
1001
|
+
if (!this.fs.exists(path))
|
|
1002
|
+
return false;
|
|
1003
|
+
try {
|
|
1004
|
+
const value = parseToml(this.fs.readFile(path));
|
|
1005
|
+
if (value.sandbox_mode !== "read-only" || value.default_permissions !== undefined || !nodePath.isAbsolute(cwd))
|
|
1006
|
+
return false;
|
|
1007
|
+
// A custom marker set may change the project boundary; leave the prior
|
|
1008
|
+
// generated roots in place unless this default-marker scan proves it.
|
|
1009
|
+
if (value.project_root_markers !== undefined)
|
|
1010
|
+
return false;
|
|
1011
|
+
// Codex merges fixed system/user/legacy-managed layers before choosing
|
|
1012
|
+
// project markers. Any visible override or unreadable layer keeps roots.
|
|
1013
|
+
for (const fixedPath of [
|
|
1014
|
+
nodePath.join(this.codexSystemConfigDir, "config.toml"),
|
|
1015
|
+
userPath,
|
|
1016
|
+
nodePath.join(this.codexSystemConfigDir, "managed_config.toml"),
|
|
1017
|
+
]) {
|
|
1018
|
+
if (!this.fs.exists(fixedPath))
|
|
1019
|
+
continue;
|
|
1020
|
+
const fixed = parseToml(this.fs.readFile(fixedPath));
|
|
1021
|
+
if (fixed.default_permissions !== undefined || fixed.project_root_markers !== undefined)
|
|
1022
|
+
return false;
|
|
1023
|
+
}
|
|
1024
|
+
// Codex's default root is the nearest .git file or a .git directory
|
|
1025
|
+
// containing HEAD. When none exists, Codex uses cwd itself.
|
|
1026
|
+
let projectRoot = nodePath.normalize(cwd);
|
|
1027
|
+
for (let dir = projectRoot;;) {
|
|
1028
|
+
const marker = nodePath.join(dir, ".git");
|
|
1029
|
+
if (this.fs.exists(marker)) {
|
|
1030
|
+
if (!this.fs.statMode)
|
|
1031
|
+
return false;
|
|
1032
|
+
const kind = this.fs.statMode(marker) & fs.constants.S_IFMT;
|
|
1033
|
+
// statMode may expose permission bits alone; that cannot prove a file.
|
|
1034
|
+
if (kind !== fs.constants.S_IFREG && kind !== fs.constants.S_IFDIR)
|
|
1035
|
+
return false;
|
|
1036
|
+
if (kind === fs.constants.S_IFREG || this.fs.exists(nodePath.join(marker, "HEAD"))) {
|
|
1037
|
+
projectRoot = dir;
|
|
1038
|
+
break;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
const parent = nodePath.dirname(dir);
|
|
1042
|
+
if (parent === dir)
|
|
1043
|
+
break;
|
|
1044
|
+
dir = parent;
|
|
1045
|
+
}
|
|
1046
|
+
// Trust can exclude a closer project file, leaving a writable ancestor active.
|
|
1047
|
+
// Keep roots if any visible applicable ancestor could make the launch writable.
|
|
1048
|
+
for (let dir = nodePath.normalize(cwd);;) {
|
|
1049
|
+
const projectPath = nodePath.join(dir, ".codex", "config.toml");
|
|
1050
|
+
// At the home ancestor this is the user config, which loaded before the profile.
|
|
1051
|
+
if (projectPath !== userPath && this.fs.exists(projectPath)) {
|
|
1052
|
+
const project = parseToml(this.fs.readFile(projectPath));
|
|
1053
|
+
if (project.default_permissions !== undefined)
|
|
1054
|
+
return false;
|
|
1055
|
+
if (project.sandbox_mode !== undefined && project.sandbox_mode !== "read-only")
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1058
|
+
if (dir === projectRoot)
|
|
1059
|
+
return true;
|
|
1060
|
+
dir = nodePath.dirname(dir);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
catch {
|
|
1064
|
+
// Preflight owns profile errors; unreadable user or project state keeps prior roots.
|
|
1065
|
+
return false;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
742
1068
|
async captureProbeScreen(target) {
|
|
743
1069
|
// Current readiness belongs to the rendered screen. Scrollback may retain
|
|
744
1070
|
// dismissed prompts, loading headers, or refusals from earlier attempts.
|
|
@@ -756,11 +1082,21 @@ export class CodexRuntimeAdapter {
|
|
|
756
1082
|
}
|
|
757
1083
|
const paneCommand = await this.tmux.getPaneCommand(binding.tmuxSession);
|
|
758
1084
|
const paneContent = await this.captureProbeScreen(binding.tmuxSession);
|
|
759
|
-
|
|
1085
|
+
let probe = assessNativeResumeProbe({
|
|
760
1086
|
runtime: "codex",
|
|
761
1087
|
paneCommand,
|
|
762
1088
|
paneContent,
|
|
763
1089
|
});
|
|
1090
|
+
if (probe.code === "returned_to_shell" || probe.code === "awaiting_runtime") {
|
|
1091
|
+
const process = await verifyCodexPaneProcess({ target: binding.tmuxSession, tmux: this.tmux,
|
|
1092
|
+
listProcesses: this.listProcesses });
|
|
1093
|
+
if (process) {
|
|
1094
|
+
const currentPaneCommand = await this.tmux.getPaneCommand(binding.tmuxSession);
|
|
1095
|
+
const currentPaneContent = await this.captureProbeScreen(binding.tmuxSession);
|
|
1096
|
+
probe = assessNativeResumeProbe({ runtime: "codex", paneCommand: currentPaneCommand,
|
|
1097
|
+
paneContent: currentPaneContent, codexProcessVerified: true });
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
764
1100
|
if (probe.code === "returned_to_shell") {
|
|
765
1101
|
const isIdleShell = await verifyPaneIdleShell({
|
|
766
1102
|
target: binding.tmuxSession,
|
|
@@ -789,7 +1125,7 @@ export class CodexRuntimeAdapter {
|
|
|
789
1125
|
return null;
|
|
790
1126
|
// Gate PID logs by process start time, then re-observe the whole foreground
|
|
791
1127
|
// chain. Neither a reused PID nor a replacement pane proves this child.
|
|
792
|
-
const child = (await this.
|
|
1128
|
+
const child = (await this.readThreadIdForSeat(binding, before.process.pid, before.process.startedAt))?.trim();
|
|
793
1129
|
if (!child || child === parentToken)
|
|
794
1130
|
return null;
|
|
795
1131
|
const after = await observeCodexForkProcess(input);
|
|
@@ -863,16 +1199,16 @@ export class CodexRuntimeAdapter {
|
|
|
863
1199
|
return observation ? JSON.stringify([paneCommand, observation.fingerprint]) : null;
|
|
864
1200
|
}
|
|
865
1201
|
ensureManagedBootstrap(binding) {
|
|
866
|
-
this.provisionWorkspaceTrust(binding.cwd ?? null);
|
|
1202
|
+
this.provisionWorkspaceTrust(binding.cwd ?? null, this.homeFor(binding));
|
|
867
1203
|
}
|
|
868
|
-
projectEntry(entry, cwd, warnings) {
|
|
869
|
-
if (entry.category === "runtime_resource" && this.applyRuntimeResource(entry)) {
|
|
1204
|
+
projectEntry(entry, cwd, warnings, seatSkillsRoot, seatSkillsRefused, home) {
|
|
1205
|
+
if (entry.category === "runtime_resource" && this.applyRuntimeResource(entry, home)) {
|
|
870
1206
|
return true;
|
|
871
1207
|
}
|
|
872
1208
|
if (entry.category === "guidance" && entry.mergeStrategy === "managed_block") {
|
|
873
1209
|
const targetPath = nodePath.join(cwd, "AGENTS.md");
|
|
874
1210
|
const content = this.fs.readFile(entry.absolutePath);
|
|
875
|
-
return this.mergeGuidance(targetPath, entry.effectiveId, content, warnings);
|
|
1211
|
+
return this.mergeGuidance(targetPath, entry.effectiveId, content, warnings, entry.absolutePath);
|
|
876
1212
|
}
|
|
877
1213
|
// HG-1.3 plugin runtime applicability filter (per DESIGN.md §5.1):
|
|
878
1214
|
// - explicit pluginType="claude" → skip Codex projection
|
|
@@ -881,9 +1217,23 @@ export class CodexRuntimeAdapter {
|
|
|
881
1217
|
if (entry.category === "plugin" && !this.pluginAppliesToCodex(entry)) {
|
|
882
1218
|
return false;
|
|
883
1219
|
}
|
|
884
|
-
const targetDir = this.resolveTargetDir(entry, cwd);
|
|
1220
|
+
const targetDir = this.resolveTargetDir(entry, cwd, seatSkillsRoot);
|
|
885
1221
|
if (!targetDir)
|
|
886
1222
|
return true;
|
|
1223
|
+
// OPR.0.7.0.13: never write through a link out of the seat's storage.
|
|
1224
|
+
// A refused seat storage refuses every skill meant for it, named; otherwise each destination is checked.
|
|
1225
|
+
const refusal = seatSkillsRoot && entry.category === "skill"
|
|
1226
|
+
? seatSkillsRefused ?? seatSkillWriteRefusal(seatSkillsRoot, nodePath.join(targetDir, "SKILL.md")) : undefined;
|
|
1227
|
+
if (refusal) {
|
|
1228
|
+
warnings.push(`${entry.effectiveId}: ${refusal}`);
|
|
1229
|
+
return false;
|
|
1230
|
+
}
|
|
1231
|
+
// OPR.0.7.0.13: destinations refused below (a link on the way); an entry with any is reported incomplete, not projected.
|
|
1232
|
+
const notProjected = [];
|
|
1233
|
+
// OPR.0.7.0.13: a skill written to the seat's own storage is recorded, so cleanup and restore know it as OpenRig's.
|
|
1234
|
+
const record = seatSkillsRoot && entry.category === "skill"
|
|
1235
|
+
? (dest, src, content) => recordSeatSkillWrite(seatSkillsRoot, dest, src, content)
|
|
1236
|
+
: () => { };
|
|
887
1237
|
this.fs.mkdirp(targetDir);
|
|
888
1238
|
let isDir = false;
|
|
889
1239
|
if (this.fs.listFiles) {
|
|
@@ -899,10 +1249,26 @@ export class CodexRuntimeAdapter {
|
|
|
899
1249
|
const createdFiles = [];
|
|
900
1250
|
try {
|
|
901
1251
|
if (isDir && this.fs.listFiles) {
|
|
1252
|
+
let skippedPluginSkills = 0;
|
|
902
1253
|
for (const file of this.fs.listFiles(entry.absolutePath)) {
|
|
1254
|
+
// OPR.0.7.0.13: a seat with its own storage gets a selected plugin's bundled skills there, through its loadout, so
|
|
1255
|
+
// the project's copy of the plugin leaves its skills out; its manifest, hooks and settings are copied as before.
|
|
1256
|
+
if (seatSkillsRoot && entry.category === "plugin" && file.split(/[\\/]/)[0] === "skills") {
|
|
1257
|
+
skippedPluginSkills++;
|
|
1258
|
+
continue;
|
|
1259
|
+
}
|
|
903
1260
|
const src = nodePath.join(entry.absolutePath, file);
|
|
904
1261
|
const dest = nodePath.join(targetDir, file);
|
|
1262
|
+
// OPR.0.7.0.13: each destination in a seat's storage is checked before it's recorded, written or re-moded, so a
|
|
1263
|
+
// helper folder or file found to be a link is not written through (the identical-content, mode-only branch included).
|
|
1264
|
+
const refusedDest = seatSkillsRoot && entry.category === "skill" ? seatSkillWriteRefusal(seatSkillsRoot, dest) : undefined;
|
|
1265
|
+
if (refusedDest) {
|
|
1266
|
+
warnings.push(`${entry.effectiveId}: ${refusedDest}`);
|
|
1267
|
+
notProjected.push(dest);
|
|
1268
|
+
continue;
|
|
1269
|
+
}
|
|
905
1270
|
const content = this.fs.readFile(src);
|
|
1271
|
+
record(dest, src, content);
|
|
906
1272
|
// Reconcile mode even when the content write is skipped: a byte-identical dest
|
|
907
1273
|
// projected earlier may still carry the wrong (default) mode.
|
|
908
1274
|
if (this.fs.exists(dest) && hashContent(content) === hashContent(this.fs.readFile(dest))) {
|
|
@@ -916,10 +1282,19 @@ export class CodexRuntimeAdapter {
|
|
|
916
1282
|
createdFiles.push(dest);
|
|
917
1283
|
this.preserveMode(src, dest);
|
|
918
1284
|
}
|
|
1285
|
+
const pluginLoss = seatSkillsRefused ? seatPluginSkillsLossNote(entry.effectiveId, skippedPluginSkills, seatSkillsRefused) : undefined;
|
|
1286
|
+
if (pluginLoss)
|
|
1287
|
+
warnings.push(pluginLoss);
|
|
919
1288
|
}
|
|
920
1289
|
else {
|
|
921
|
-
const content = this.fs.readFile(entry.absolutePath);
|
|
922
1290
|
const destFile = nodePath.join(targetDir, nodePath.basename(entry.absolutePath));
|
|
1291
|
+
const refusedFile = seatSkillsRoot && entry.category === "skill" ? seatSkillWriteRefusal(seatSkillsRoot, destFile) : undefined;
|
|
1292
|
+
if (refusedFile) {
|
|
1293
|
+
warnings.push(`${entry.effectiveId}: ${refusedFile}`);
|
|
1294
|
+
return false;
|
|
1295
|
+
}
|
|
1296
|
+
const content = this.fs.readFile(entry.absolutePath);
|
|
1297
|
+
record(destFile, entry.absolutePath, content);
|
|
923
1298
|
if (this.fs.exists(destFile) && hashContent(content) === hashContent(this.fs.readFile(destFile))) {
|
|
924
1299
|
this.preserveMode(entry.absolutePath, destFile);
|
|
925
1300
|
return true;
|
|
@@ -935,7 +1310,7 @@ export class CodexRuntimeAdapter {
|
|
|
935
1310
|
if (entry.category === "plugin")
|
|
936
1311
|
warnings.push(...excludeNewGeneratedFiles(cwd, createdFiles));
|
|
937
1312
|
}
|
|
938
|
-
return
|
|
1313
|
+
return seatProjectionComplete(entry.effectiveId, notProjected, warnings);
|
|
939
1314
|
}
|
|
940
1315
|
/**
|
|
941
1316
|
* Reapply the source file's permission bits to the projected dest. Plain
|
|
@@ -960,9 +1335,9 @@ export class CodexRuntimeAdapter {
|
|
|
960
1335
|
// auto: detect via .codex-plugin/plugin.json presence in the source tree
|
|
961
1336
|
return this.fs.exists(nodePath.join(entry.absolutePath, ".codex-plugin", "plugin.json"));
|
|
962
1337
|
}
|
|
963
|
-
resolveTargetDir(entry, cwd) {
|
|
1338
|
+
resolveTargetDir(entry, cwd, seatSkillsRoot) {
|
|
964
1339
|
switch (entry.category) {
|
|
965
|
-
case "skill": return nodePath.join(cwd, ".agents", "skills", entry.effectiveId);
|
|
1340
|
+
case "skill": return nodePath.join(seatSkillsRoot ?? nodePath.join(cwd, ".agents", "skills"), entry.effectiveId);
|
|
966
1341
|
case "guidance": return null; // handled via merge
|
|
967
1342
|
case "subagent": return nodePath.join(cwd, ".agents"); // .agents/{id}.yaml per preserved contract
|
|
968
1343
|
case "plugin": return nodePath.join(cwd, ".codex", "plugins", entry.effectiveId);
|
|
@@ -970,11 +1345,11 @@ export class CodexRuntimeAdapter {
|
|
|
970
1345
|
default: return null;
|
|
971
1346
|
}
|
|
972
1347
|
}
|
|
973
|
-
applyRuntimeResource(entry) {
|
|
1348
|
+
applyRuntimeResource(entry, home) {
|
|
974
1349
|
if (entry.resourceType !== "codex_config_fragment") {
|
|
975
1350
|
return false;
|
|
976
1351
|
}
|
|
977
|
-
const configPath = this.resolveCodexConfigPath();
|
|
1352
|
+
const configPath = this.resolveCodexConfigPath(home);
|
|
978
1353
|
this.fs.mkdirp(nodePath.dirname(configPath));
|
|
979
1354
|
const existing = this.fs.exists(configPath) ? this.fs.readFile(configPath) : "";
|
|
980
1355
|
const fragment = this.fs.readFile(entry.absolutePath);
|
|
@@ -995,14 +1370,17 @@ export class CodexRuntimeAdapter {
|
|
|
995
1370
|
* propagate the skip signal so ProjectionResult and StartupDeliveryResult
|
|
996
1371
|
* report honest counts.
|
|
997
1372
|
*/
|
|
998
|
-
mergeGuidance(targetPath, blockId, content, warnings) {
|
|
1373
|
+
mergeGuidance(targetPath, blockId, content, warnings, sourcePath) {
|
|
999
1374
|
// Mirrors Claude Code adapter: the `rig-role` managed block collides across
|
|
1000
1375
|
// pod-mates because the regenerator pairs (target-file × spec) without
|
|
1001
1376
|
// seat correlation. Per-seat role content is delivered through `send_text`
|
|
1002
1377
|
// startup instead. Refuse the merge loudly; silent skip would mask the
|
|
1003
1378
|
// collision. See ADR-0006.
|
|
1004
|
-
if (blockId
|
|
1005
|
-
console.log(`[openrig] skip: effectiveId is
|
|
1379
|
+
if (isPerSeatRoleGuidance(blockId, sourcePath)) {
|
|
1380
|
+
console.log(`[openrig] skip: effectiveId is ${blockId}, a seat's own role; per-seat delivery via send_text path required (target=${targetPath})`);
|
|
1381
|
+
const warning = perSeatRoleSkipWarning(blockId, targetPath);
|
|
1382
|
+
if (warning)
|
|
1383
|
+
warnings.push(warning);
|
|
1006
1384
|
return false;
|
|
1007
1385
|
}
|
|
1008
1386
|
mergeManagedBlock(this.fs, targetPath, blockId, content, {
|
|
@@ -1011,13 +1389,13 @@ export class CodexRuntimeAdapter {
|
|
|
1011
1389
|
});
|
|
1012
1390
|
return true;
|
|
1013
1391
|
}
|
|
1014
|
-
detectDeliveryHint(path, content) {
|
|
1015
|
-
return resolveConcreteHint(path, content);
|
|
1392
|
+
detectDeliveryHint(path, content, orientation) {
|
|
1393
|
+
return resolveConcreteHint(path, content, orientation);
|
|
1016
1394
|
}
|
|
1017
|
-
provisionWorkspaceTrust(cwd) {
|
|
1395
|
+
provisionWorkspaceTrust(cwd, home) {
|
|
1018
1396
|
if (!cwd)
|
|
1019
1397
|
return;
|
|
1020
|
-
const configPath = this.resolveCodexConfigPath();
|
|
1398
|
+
const configPath = this.resolveCodexConfigPath(home);
|
|
1021
1399
|
this.fs.mkdirp(nodePath.dirname(configPath));
|
|
1022
1400
|
let content = "";
|
|
1023
1401
|
try {
|
|
@@ -1032,8 +1410,8 @@ export class CodexRuntimeAdapter {
|
|
|
1032
1410
|
}
|
|
1033
1411
|
this.fs.writeFile(configPath, content);
|
|
1034
1412
|
}
|
|
1035
|
-
resolveCodexConfigPath() {
|
|
1036
|
-
const root =
|
|
1413
|
+
resolveCodexConfigPath(home = this.codexHome) {
|
|
1414
|
+
const root = home
|
|
1037
1415
|
?? nodePath.join(this.fs.homedir ?? os.homedir(), ".codex");
|
|
1038
1416
|
return nodePath.join(root, "config.toml");
|
|
1039
1417
|
}
|
|
@@ -1075,7 +1453,7 @@ export class CodexRuntimeAdapter {
|
|
|
1075
1453
|
if (shellPid) {
|
|
1076
1454
|
const codexPids = await this.findCodexDescendantPids(shellPid);
|
|
1077
1455
|
for (const codexPid of codexPids) {
|
|
1078
|
-
const threadId = await this.
|
|
1456
|
+
const threadId = await this.readThreadIdForSeat(binding, codexPid);
|
|
1079
1457
|
if (threadId)
|
|
1080
1458
|
return threadId;
|
|
1081
1459
|
}
|
|
@@ -1140,7 +1518,7 @@ export class CodexRuntimeAdapter {
|
|
|
1140
1518
|
const value = await this.withinDeadline(Promise.resolve().then(work), deadline);
|
|
1141
1519
|
return Date.now() >= deadline ? null : value;
|
|
1142
1520
|
}
|
|
1143
|
-
async proveResumedProcess(tmuxSession, resumeToken, deadline) {
|
|
1521
|
+
async proveResumedProcess(tmuxSession, resumeToken, deadline, home) {
|
|
1144
1522
|
if (!this.tmux.getPanePid)
|
|
1145
1523
|
return { kind: "unknown", reason: "the pane's process can't be read" };
|
|
1146
1524
|
if (Date.now() >= deadline)
|
|
@@ -1157,7 +1535,7 @@ export class CodexRuntimeAdapter {
|
|
|
1157
1535
|
}
|
|
1158
1536
|
let evidence;
|
|
1159
1537
|
try {
|
|
1160
|
-
evidence = await this.beforeResumeDeadline(() => this.readResumeEvidence(before.process.pid, before.process.startedAt), deadline);
|
|
1538
|
+
evidence = await this.beforeResumeDeadline(() => home ? this.readResumeEvidence(before.process.pid, before.process.startedAt, home) : this.readResumeEvidence(before.process.pid, before.process.startedAt), deadline);
|
|
1161
1539
|
}
|
|
1162
1540
|
catch (err) {
|
|
1163
1541
|
return { kind: "unknown", reason: `Codex's records couldn't be read (${err.message})` };
|
|
@@ -1257,6 +1635,27 @@ export class CodexRuntimeAdapter {
|
|
|
1257
1635
|
paneCommand,
|
|
1258
1636
|
paneContent,
|
|
1259
1637
|
});
|
|
1638
|
+
if (probe.code === "returned_to_shell" || probe.code === "awaiting_runtime") {
|
|
1639
|
+
const process = resumeToken
|
|
1640
|
+
? await this.beforeResumeDeadline(() => verifyCodexPaneProcess({ target: tmuxSession, tmux: this.tmux,
|
|
1641
|
+
listProcesses: this.listProcesses }), deadline)
|
|
1642
|
+
: await verifyCodexPaneProcess({ target: tmuxSession, tmux: this.tmux,
|
|
1643
|
+
listProcesses: this.listProcesses });
|
|
1644
|
+
if (process) {
|
|
1645
|
+
const current = resumeToken
|
|
1646
|
+
? await this.beforeResumeDeadline(async () => ({
|
|
1647
|
+
command: await this.tmux.getPaneCommand(tmuxSession),
|
|
1648
|
+
content: await this.captureProbeScreen(tmuxSession),
|
|
1649
|
+
}), deadline)
|
|
1650
|
+
: { command: await this.tmux.getPaneCommand(tmuxSession), content: await this.captureProbeScreen(tmuxSession) };
|
|
1651
|
+
if (!current)
|
|
1652
|
+
break;
|
|
1653
|
+
paneCommand = current.command;
|
|
1654
|
+
paneContent = current.content;
|
|
1655
|
+
lastPaneContent = paneContent;
|
|
1656
|
+
probe = assessNativeResumeProbe({ runtime: "codex", paneCommand, paneContent, codexProcessVerified: true });
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1260
1659
|
if (probe.code === "no_saved_session") {
|
|
1261
1660
|
return {
|
|
1262
1661
|
ok: false,
|
|
@@ -1290,15 +1689,17 @@ export class CodexRuntimeAdapter {
|
|
|
1290
1689
|
return { ok: true, resumeToken: undefined, resumeType: undefined };
|
|
1291
1690
|
}
|
|
1292
1691
|
if (probe.status === "resumed" && resumeToken) {
|
|
1293
|
-
const proof = await this.proveResumedProcess(tmuxSession, resumeToken, deadline);
|
|
1692
|
+
const proof = await this.proveResumedProcess(tmuxSession, resumeToken, deadline, opts?.home);
|
|
1294
1693
|
if (proof.kind === "match")
|
|
1295
1694
|
return { ok: true, resumeToken, resumeType: "codex_id", resumedProcess: proof.process };
|
|
1296
1695
|
if (proof.kind === "mismatch") {
|
|
1696
|
+
const detail = `Codex resume opened a different conversation: the resumed process's records name ${proof.threadId}, not the requested ${resumeToken}.`;
|
|
1297
1697
|
return {
|
|
1298
1698
|
ok: false,
|
|
1299
|
-
error:
|
|
1699
|
+
error: `${detail} The session was preserved; nothing was restarted.`,
|
|
1300
1700
|
recovery: "attention_required",
|
|
1301
1701
|
resumeMismatch: { opened: proof.threadId },
|
|
1702
|
+
resumeDetail: detail,
|
|
1302
1703
|
verifierInput: verifierInput(),
|
|
1303
1704
|
evidence: paneContent.split("\n").slice(-12).join("\n"),
|
|
1304
1705
|
};
|
|
@@ -1350,9 +1751,10 @@ export class CodexRuntimeAdapter {
|
|
|
1350
1751
|
// Report the newest screen observed; a resumed or booting one names no gate. The loop's own decisions above used
|
|
1351
1752
|
// lastUnresolved. The text follows the newest screen too, so an older gate's text never stands for a newer screen.
|
|
1352
1753
|
const shown = report && report.probe.status !== "resumed" && report.probe.code !== "awaiting_runtime" ? report : null;
|
|
1353
|
-
const
|
|
1354
|
-
? `Codex resume could not be proven within the resume window: ${unproven}
|
|
1754
|
+
const unprovenDetail = unproven && report?.probe.status === "resumed"
|
|
1755
|
+
? `Codex resume could not be proven within the resume window: ${unproven}.`
|
|
1355
1756
|
: null;
|
|
1757
|
+
const unprovenText = unprovenDetail ? `${unprovenDetail} The session was preserved; nothing was restarted.` : null;
|
|
1356
1758
|
const newestText = unprovenText ? unprovenText : shown ? shown.probe.detail
|
|
1357
1759
|
: report?.probe.status === "resumed" ? "Codex resume could not be confirmed: the last screen observed looked ready, but the resume check ended before proving a restored conversation."
|
|
1358
1760
|
: report ? report.probe.detail
|
|
@@ -1368,6 +1770,7 @@ export class CodexRuntimeAdapter {
|
|
|
1368
1770
|
// With a conversation to prove and no gate on the newest screen, the end is "not proven": whatever the last frame
|
|
1369
1771
|
// was (a boot, a ready screen, or no capture at all before the deadline), the resumed Codex may be running.
|
|
1370
1772
|
...(resumeToken && !shown ? { resumeUnproven: true } : {}),
|
|
1773
|
+
...(unprovenDetail ? { resumeDetail: unprovenDetail } : {}),
|
|
1371
1774
|
verifierInput: verifierInput(),
|
|
1372
1775
|
evidence: (report?.paneContent ?? lastPaneContent).split("\n").slice(-12).join("\n"),
|
|
1373
1776
|
};
|
|
@@ -1376,11 +1779,11 @@ export class CodexRuntimeAdapter {
|
|
|
1376
1779
|
const processes = await this.listProcesses();
|
|
1377
1780
|
return findCodexDescendantPids(processes, parentPid);
|
|
1378
1781
|
}
|
|
1379
|
-
async readThreadIdFromLogs(pid) {
|
|
1380
|
-
return readCodexThreadIdFromCandidateHomes(pid,
|
|
1782
|
+
async readThreadIdFromLogs(pid, home = this.codexHome) {
|
|
1783
|
+
return readCodexThreadIdFromCandidateHomes(pid, home ? [] : [await this.resolveHomeDirByPid(pid), this.fs.homedir, os.homedir()], (path) => this.fs.exists(path), home);
|
|
1381
1784
|
}
|
|
1382
|
-
launchCommand(command) {
|
|
1383
|
-
const env = [this.launchPath ? `PATH=${shellQuote(this.launchPath)}` : "",
|
|
1785
|
+
launchCommand(command, home = this.codexHome) {
|
|
1786
|
+
const env = [this.launchPath ? `PATH=${shellQuote(this.launchPath)}` : "", home ? `CODEX_HOME=${shellQuote(home)}` : ""].filter(Boolean);
|
|
1384
1787
|
return env.length ? `env ${env.join(" ")} ${command}` : command;
|
|
1385
1788
|
}
|
|
1386
1789
|
}
|
|
@@ -1484,11 +1887,11 @@ export function computeCodexHookTrust(event, input) {
|
|
|
1484
1887
|
* `[hooks.state."<key>"] trusted_hash = "<hash>"` record. Mirrors upsertCodexProjectTrust:
|
|
1485
1888
|
* find/create the exact table header, splice ONLY its `trusted_hash` line, leave every other
|
|
1486
1889
|
* `[hooks.state]` / `[projects]` entry and the managed hook block byte-identical. Same key+hash
|
|
1487
|
-
* ⇒ no-op. Only called for our authored inline or
|
|
1890
|
+
* ⇒ no-op. Only called for our authored inline or verified owned plugin keys (never blanket trust).
|
|
1488
1891
|
*/
|
|
1489
|
-
export function upsertCodexHookTrust(content, key, hash) {
|
|
1892
|
+
export function upsertCodexHookTrust(content, key, hash, field = "trusted_hash") {
|
|
1490
1893
|
const header = `[hooks.state.${JSON.stringify(key)}]`;
|
|
1491
|
-
const trustLine =
|
|
1894
|
+
const trustLine = `${field} = ${JSON.stringify(hash)}`;
|
|
1492
1895
|
const lines = content.length > 0 ? content.split("\n") : [];
|
|
1493
1896
|
const headerIndex = lines.findIndex((line) => line.trim() === header);
|
|
1494
1897
|
if (headerIndex === -1) {
|
|
@@ -1503,14 +1906,14 @@ export function upsertCodexHookTrust(content, key, hash) {
|
|
|
1503
1906
|
break;
|
|
1504
1907
|
}
|
|
1505
1908
|
}
|
|
1506
|
-
const hashIndex = lines.findIndex((line, index) => index > headerIndex && index < nextSectionIndex && line.trim().startsWith(
|
|
1909
|
+
const hashIndex = lines.findIndex((line, index) => index > headerIndex && index < nextSectionIndex && line.trim().startsWith(field));
|
|
1507
1910
|
if (hashIndex >= 0) {
|
|
1508
1911
|
lines[hashIndex] = trustLine;
|
|
1509
1912
|
}
|
|
1510
1913
|
else {
|
|
1511
1914
|
lines.splice(headerIndex + 1, 0, trustLine);
|
|
1512
1915
|
}
|
|
1513
|
-
return `${lines.join("\n").replace(/\n*$/, "\n")}`;
|
|
1916
|
+
return field === "trusted_content_hash" ? lines.join("\n") : `${lines.join("\n").replace(/\n*$/, "\n")}`;
|
|
1514
1917
|
}
|
|
1515
1918
|
export function isCodex013xOrLater(version) {
|
|
1516
1919
|
const match = /^(\d+)\.(\d+)/.exec(version);
|
|
@@ -1572,6 +1975,8 @@ function upsertCodexHooksFeature(content) {
|
|
|
1572
1975
|
}
|
|
1573
1976
|
// OPR.0.4.1.10 FR-A — config-layer activity-hook projection.
|
|
1574
1977
|
const OPENRIG_ACTIVITY_HOOKS_BEGIN = "# BEGIN OPENRIG MANAGED ACTIVITY HOOKS";
|
|
1978
|
+
/** The status Codex shows while OpenRig's hooks.json activity hook runs; it also marks the group as OpenRig's. */
|
|
1979
|
+
const OPENRIG_ACTIVITY_STATUS = "OpenRig activity";
|
|
1575
1980
|
const OPENRIG_ACTIVITY_HOOKS_END = "# END OPENRIG MANAGED ACTIVITY HOOKS";
|
|
1576
1981
|
const OPENRIG_ACTIVITY_HOOK_EVENTS = ["SessionStart", "UserPromptSubmit", "Stop", "PermissionRequest"];
|
|
1577
1982
|
/**
|
|
@@ -1598,6 +2003,148 @@ function upsertCodexActivityHooks(content, relayPath) {
|
|
|
1598
2003
|
const prefix = next.replace(/\n*$/, "");
|
|
1599
2004
|
return prefix.length > 0 ? `${prefix}\n\n${block}` : block;
|
|
1600
2005
|
}
|
|
2006
|
+
function canonicalCodexHookSource(path) {
|
|
2007
|
+
// Codex keys hook trust by the canonical source path; a file not on the real filesystem keeps its plain path.
|
|
2008
|
+
try {
|
|
2009
|
+
return fs.realpathSync.native(path);
|
|
2010
|
+
}
|
|
2011
|
+
catch {
|
|
2012
|
+
return path;
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
/** A hooks.json document as Codex reads it: `hooks` maps each event to matcher groups, each with a `hooks` list. */
|
|
2016
|
+
function parseCodexHooksJson(content) {
|
|
2017
|
+
const value = JSON.parse(content);
|
|
2018
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
2019
|
+
throw new Error("not a JSON object");
|
|
2020
|
+
const record = value;
|
|
2021
|
+
if (record.hooks === undefined)
|
|
2022
|
+
record.hooks = {};
|
|
2023
|
+
const hooks = record.hooks;
|
|
2024
|
+
if (hooks === null || typeof hooks !== "object" || Array.isArray(hooks)
|
|
2025
|
+
|| Object.values(hooks).some((groups) => !Array.isArray(groups)
|
|
2026
|
+
|| groups.some((group) => group === null || typeof group !== "object" || !Array.isArray(group.hooks)))) {
|
|
2027
|
+
throw new Error("expected hooks to map each event to matcher groups with a hooks list");
|
|
2028
|
+
}
|
|
2029
|
+
return record;
|
|
2030
|
+
}
|
|
2031
|
+
function openRigActivityGroup(command) {
|
|
2032
|
+
return { hooks: [{ type: "command", command, timeout: 5, statusMessage: OPENRIG_ACTIVITY_STATUS }] };
|
|
2033
|
+
}
|
|
2034
|
+
/** Where OpenRig's activity relay ships, in this install or an earlier one (the absolute path moves on upgrade). */
|
|
2035
|
+
const OPENRIG_ACTIVITY_RELAY_SUFFIX = "/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs";
|
|
2036
|
+
/** A hook command that runs OpenRig's own shipped activity relay, not a person's script that shares its name. */
|
|
2037
|
+
function isOpenRigRelayCommand(command) {
|
|
2038
|
+
const relay = typeof command === "string" ? /^node "(.*)"$/.exec(command)?.[1] : undefined;
|
|
2039
|
+
return relay !== undefined && relay.replaceAll("\\", "/").endsWith(OPENRIG_ACTIVITY_RELAY_SUFFIX);
|
|
2040
|
+
}
|
|
2041
|
+
/** OpenRig's own group, exactly as it authors it: no matcher, and one handler with only our fields, our status and
|
|
2042
|
+
* timeout, running OpenRig's shipped relay. Anything else is a person's group and is left alone. */
|
|
2043
|
+
function isOpenRigActivityGroup(group) {
|
|
2044
|
+
if (group === null || typeof group !== "object")
|
|
2045
|
+
return false;
|
|
2046
|
+
const { hooks, ...rest } = group;
|
|
2047
|
+
if (Object.keys(rest).length > 0 || !Array.isArray(hooks) || hooks.length !== 1)
|
|
2048
|
+
return false;
|
|
2049
|
+
const handler = hooks[0];
|
|
2050
|
+
if (handler === null || typeof handler !== "object")
|
|
2051
|
+
return false;
|
|
2052
|
+
const { type, command, timeout, statusMessage, ...extra } = handler;
|
|
2053
|
+
return Object.keys(extra).length === 0 && type === "command" && timeout === 5 && statusMessage === OPENRIG_ACTIVITY_STATUS
|
|
2054
|
+
&& isOpenRigRelayCommand(command);
|
|
2055
|
+
}
|
|
2056
|
+
function codexHookStateOf(document) {
|
|
2057
|
+
return document?.hooks?.state ?? {};
|
|
2058
|
+
}
|
|
2059
|
+
/** A parsed config without an empty `hooks.state`, or then an empty `hooks`: the text drops a table with its last
|
|
2060
|
+
* entry, and an empty table means the same as none. */
|
|
2061
|
+
function withoutEmptyHookTables(document) {
|
|
2062
|
+
const { hooks, ...rest } = document;
|
|
2063
|
+
if (hooks === undefined)
|
|
2064
|
+
return document;
|
|
2065
|
+
const { state, ...otherHooks } = hooks;
|
|
2066
|
+
const kept = state !== undefined && Object.keys(state).length > 0 ? hooks : otherHooks;
|
|
2067
|
+
return Object.keys(kept).length > 0 ? { ...rest, hooks: kept } : rest;
|
|
2068
|
+
}
|
|
2069
|
+
/** The index of OpenRig's inline group for `event` among a parsed config.toml's inline groups, or -1. */
|
|
2070
|
+
function openRigInlineGroupIndex(document, event) {
|
|
2071
|
+
const groups = document?.hooks?.[event];
|
|
2072
|
+
if (!Array.isArray(groups))
|
|
2073
|
+
return -1;
|
|
2074
|
+
return groups.findIndex((group) => {
|
|
2075
|
+
const handlers = group?.hooks;
|
|
2076
|
+
const handler = Array.isArray(handlers) && handlers.length === 1 ? handlers[0] : null;
|
|
2077
|
+
return !!handler && handler.type === "command" && Number(handler.timeout) === 5 && isOpenRigRelayCommand(handler.command);
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
2080
|
+
/** Write `enabled = false` into one `[hooks.state."<key>"]` table (the trust write creates it first). */
|
|
2081
|
+
function upsertCodexHookDisabled(content, key) {
|
|
2082
|
+
const header = `[hooks.state.${JSON.stringify(key)}]`;
|
|
2083
|
+
const lines = content.split("\n");
|
|
2084
|
+
const at = lines.findIndex((line) => line.trim() === header);
|
|
2085
|
+
if (at < 0)
|
|
2086
|
+
return `${content.replace(/\n*$/, "")}\n\n${header}\nenabled = false\n`;
|
|
2087
|
+
let end = lines.length;
|
|
2088
|
+
for (let i = at + 1; i < lines.length; i++)
|
|
2089
|
+
if (lines[i].trim().startsWith("[")) {
|
|
2090
|
+
end = i;
|
|
2091
|
+
break;
|
|
2092
|
+
}
|
|
2093
|
+
const enabledAt = lines.findIndex((line, i) => i > at && i < end && /^\s*enabled\s*=/.test(line));
|
|
2094
|
+
if (enabledAt >= 0)
|
|
2095
|
+
lines[enabledAt] = "enabled = false";
|
|
2096
|
+
else
|
|
2097
|
+
lines.splice(at + 1, 0, "enabled = false");
|
|
2098
|
+
return lines.join("\n");
|
|
2099
|
+
}
|
|
2100
|
+
/** The parsed `hooks.state` after an event's groups move (`newIndexOf`; null = the group left): a group's tables move with it. */
|
|
2101
|
+
function rekeyCodexHookState(state, prefix, newIndexOf) {
|
|
2102
|
+
const next = {};
|
|
2103
|
+
for (const [key, value] of Object.entries(state)) {
|
|
2104
|
+
const tail = key.startsWith(prefix) ? /^(\d+):(\d+)$/.exec(key.slice(prefix.length)) : null;
|
|
2105
|
+
if (!tail) {
|
|
2106
|
+
next[key] = value;
|
|
2107
|
+
continue;
|
|
2108
|
+
}
|
|
2109
|
+
const index = newIndexOf(Number(tail[1]));
|
|
2110
|
+
if (index !== null)
|
|
2111
|
+
next[`${prefix}${index}:${tail[2]}`] = value;
|
|
2112
|
+
}
|
|
2113
|
+
return next;
|
|
2114
|
+
}
|
|
2115
|
+
/** The same move on config.toml's text: rename each moved group's `[hooks.state."<key>"]` header, and drop a removed
|
|
2116
|
+
* group's table. Other spellings aren't touched; the caller compares the parsed result before writing. */
|
|
2117
|
+
function rekeyCodexHookStateText(content, prefix, newIndexOf) {
|
|
2118
|
+
const out = [];
|
|
2119
|
+
let dropping = false;
|
|
2120
|
+
for (const line of content.split("\n")) {
|
|
2121
|
+
const trimmed = line.trim();
|
|
2122
|
+
if (trimmed.startsWith("[")) {
|
|
2123
|
+
dropping = false;
|
|
2124
|
+
const quoted = /^\[hooks\.state\.(".*")\]$/.exec(trimmed)?.[1];
|
|
2125
|
+
let key;
|
|
2126
|
+
try {
|
|
2127
|
+
key = quoted ? JSON.parse(quoted) : undefined;
|
|
2128
|
+
}
|
|
2129
|
+
catch {
|
|
2130
|
+
key = undefined;
|
|
2131
|
+
}
|
|
2132
|
+
const tail = key?.startsWith(prefix) ? /^(\d+):(\d+)$/.exec(key.slice(prefix.length)) : null;
|
|
2133
|
+
if (tail) {
|
|
2134
|
+
const index = newIndexOf(Number(tail[1]));
|
|
2135
|
+
if (index === null) {
|
|
2136
|
+
dropping = true;
|
|
2137
|
+
continue;
|
|
2138
|
+
}
|
|
2139
|
+
out.push(`[hooks.state.${JSON.stringify(`${prefix}${index}:${tail[2]}`)}]`);
|
|
2140
|
+
continue;
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
if (!dropping)
|
|
2144
|
+
out.push(line);
|
|
2145
|
+
}
|
|
2146
|
+
return out.join("\n");
|
|
2147
|
+
}
|
|
1601
2148
|
/**
|
|
1602
2149
|
* OPR.0.4.1.10 B3 — remove the OpenRig-managed activity-hooks sentinel block (durable disable).
|
|
1603
2150
|
* Strips ONLY the BEGIN..END block (plus the leading blank-line separator it was appended with);
|