@openrig/cli 0.7.14 → 0.7.16
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 +5 -5
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/README.md +28 -7
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +8 -5
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +13 -4
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +10 -0
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +12 -13
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +1 -1
- package/daemon/assets/skills/rigs/SKILL.md +105 -30
- 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 +127 -16
- package/daemon/context-packs/reference/getting-started.md +17 -15
- package/daemon/context-packs/reference/manifest.yaml +4 -1
- package/daemon/context-packs/reference/product-journey-sdlc.md +348 -0
- package/daemon/context-packs/reference/rig-spec.md +92 -4
- package/daemon/context-packs/reference/whats-new.md +355 -5
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +8 -5
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +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 +13 -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/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-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/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/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/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/CHANGELOG.md +10 -0
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +12 -13
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +3 -3
- 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/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/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/SKILL.md +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.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +6 -3
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +2 -0
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +28 -11
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +15 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +88 -31
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +2 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +93 -36
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts +3 -0
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +99 -51
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +2 -1
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +15 -9
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +4 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +133 -75
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +10 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +42 -7
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/daemon-shutdown.d.ts +3 -0
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +6 -0
- 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 +6 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/165_run_bound_activity_grants.d.ts +4 -0
- package/daemon/dist/db/migrations/165_run_bound_activity_grants.d.ts.map +1 -0
- package/daemon/dist/db/migrations/165_run_bound_activity_grants.js +14 -0
- package/daemon/dist/db/migrations/165_run_bound_activity_grants.js.map +1 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.d.ts +14 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.d.ts.map +1 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.js +54 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.js.map +1 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.d.ts +5 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.d.ts.map +1 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.js +25 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.js.map +1 -0
- package/daemon/dist/domain/activity-grants.d.ts +36 -3
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
- package/daemon/dist/domain/activity-grants.js +188 -7
- package/daemon/dist/domain/activity-grants.js.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.d.ts +2 -0
- package/daemon/dist/domain/applied-launch-observation-store.d.ts.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.js +27 -16
- package/daemon/dist/domain/applied-launch-observation-store.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts +1 -3
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +3 -1
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +11 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +85 -38
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-filesystem-preflight.d.ts +33 -0
- package/daemon/dist/domain/codex-filesystem-preflight.d.ts.map +1 -0
- package/daemon/dist/domain/codex-filesystem-preflight.js +255 -0
- package/daemon/dist/domain/codex-filesystem-preflight.js.map +1 -0
- package/daemon/dist/domain/codex-member-permissions.d.ts +25 -2
- package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.js +72 -18
- package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +13 -0
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.js +37 -30
- package/daemon/dist/domain/codex-network-default.js.map +1 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts +6 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.js +30 -9
- package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +59 -13
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/destination-successor.d.ts +3 -0
- package/daemon/dist/domain/destination-successor.d.ts.map +1 -0
- package/daemon/dist/domain/destination-successor.js +49 -0
- package/daemon/dist/domain/destination-successor.js.map +1 -0
- package/daemon/dist/domain/execution-candidate-reader.d.ts +15 -5
- package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -1
- package/daemon/dist/domain/execution-candidate-reader.js +36 -25
- package/daemon/dist/domain/execution-candidate-reader.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +34 -11
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +3 -3
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +4 -0
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +11 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +3 -0
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +4 -0
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +2 -1
- 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 +36 -2
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts +5 -0
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts +3 -0
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +58 -11
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/hosts/fleet-scopes.d.ts +111 -0
- package/daemon/dist/domain/hosts/fleet-scopes.d.ts.map +1 -0
- package/daemon/dist/domain/hosts/fleet-scopes.js +231 -0
- package/daemon/dist/domain/hosts/fleet-scopes.js.map +1 -0
- package/daemon/dist/domain/hosts/read-through.d.ts +1 -1
- package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/read-through.js +4 -0
- package/daemon/dist/domain/hosts/read-through.js.map +1 -1
- package/daemon/dist/domain/native-permission-store.d.ts +40 -0
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +115 -29
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +11 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +25 -4
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +33 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +143 -4
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +214 -30
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +3 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +6 -0
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/permission-account.d.ts.map +1 -1
- package/daemon/dist/domain/permission-account.js +8 -6
- package/daemon/dist/domain/permission-account.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts +2 -1
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.d.ts +62 -0
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.d.ts.map +1 -0
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.js +117 -0
- package/daemon/dist/domain/permission-policy/persisted-restore-posture.js.map +1 -0
- package/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -1
- package/daemon/dist/domain/policies/context-usage-threshold.js +5 -1
- package/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -1
- package/daemon/dist/domain/policies/types.d.ts +2 -0
- package/daemon/dist/domain/policies/types.d.ts.map +1 -1
- package/daemon/dist/domain/queue-destination-check.d.ts +2 -0
- package/daemon/dist/domain/queue-destination-check.d.ts.map +1 -1
- package/daemon/dist/domain/queue-destination-check.js +8 -11
- package/daemon/dist/domain/queue-destination-check.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +29 -16
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +61 -55
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +6 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts +4 -4
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +30 -16
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +12 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +27 -7
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/receiver-context.js +1 -1
- package/daemon/dist/domain/receiver-context.js.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +3 -2
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +10 -0
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
- package/daemon/dist/domain/reply-to-choice.js +23 -0
- package/daemon/dist/domain/reply-to-choice.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +5 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +31 -6
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +88 -98
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +6 -0
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +21 -4
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +65 -14
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +6 -0
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +14 -8
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/rig-edge-ops.js +1 -1
- package/daemon/dist/domain/rig-edge-ops.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +8 -3
- 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 +21 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +19 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +69 -12
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runner-grant-launch.d.ts +16 -0
- package/daemon/dist/domain/runner-grant-launch.d.ts.map +1 -0
- package/daemon/dist/domain/runner-grant-launch.js +86 -0
- package/daemon/dist/domain/runner-grant-launch.js.map +1 -0
- package/daemon/dist/domain/runtime-adapter.d.ts +17 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +21 -3
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +91 -4
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-attempts.d.ts +50 -0
- package/daemon/dist/domain/seat-handover-attempts.d.ts.map +1 -0
- package/daemon/dist/domain/seat-handover-attempts.js +75 -0
- package/daemon/dist/domain/seat-handover-attempts.js.map +1 -0
- package/daemon/dist/domain/seat-handover-service.d.ts +64 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +450 -35
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +3 -0
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +34 -2
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +47 -2
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +53 -3
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-home-record-types.d.ts +16 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.js +2 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts +173 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record.js +317 -0
- package/daemon/dist/domain/seat-runtime-home-record.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +7 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +62 -2
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts +16 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.js +178 -1
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +2 -0
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +16 -0
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +1 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +7 -3
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +3 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +7 -3
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/skill-discovery.js +2 -1
- package/daemon/dist/domain/skill-discovery.js.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.d.ts +3 -0
- package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.js +5 -0
- package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +5 -0
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +9 -0
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +19 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +81 -39
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/sync-site-wrap.d.ts +13 -1
- package/daemon/dist/domain/sync-site-wrap.d.ts.map +1 -1
- package/daemon/dist/domain/sync-site-wrap.js +38 -0
- package/daemon/dist/domain/sync-site-wrap.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +17 -12
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +37 -1
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +3 -1
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +5 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +4 -0
- 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 +13 -8
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +11 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +35 -0
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +7 -0
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +202 -91
- 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 +116 -26
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +12 -7
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +34 -2
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +6 -3
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +44 -27
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/scopes.d.ts.map +1 -1
- package/daemon/dist/routes/scopes.js +102 -19
- 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 +50 -2
- 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 +63 -16
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +116 -18
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +36 -2
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/watchdog.d.ts.map +1 -1
- package/daemon/dist/routes/watchdog.js +7 -1
- 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 +22 -4
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +132 -46
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +88 -1
- package/daemon/docs/reference/bundle-formats.md +6 -4
- package/daemon/docs/reference/daemon-http-clients.md +3 -1
- package/daemon/docs/reference/developing.md +1 -1
- package/daemon/docs/reference/gateway-participants.md +5 -3
- package/daemon/docs/reference/getting-started.md +17 -15
- package/daemon/docs/reference/harness-runner-contract.md +27 -1
- package/daemon/docs/reference/health-diagnosis.md +5 -3
- package/daemon/docs/reference/keeping-a-watch.md +14 -9
- package/daemon/docs/reference/quickstart.md +2 -2
- package/daemon/docs/reference/rig-spec.md +92 -4
- package/daemon/docs/reference/rosters.md +26 -0
- package/daemon/docs/reference/seat-delivery.md +7 -1
- package/daemon/docs/reference/slack-app-setup.md +4 -0
- package/daemon/docs/reference/whats-new.md +355 -5
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +13 -4
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +7 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +2 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +8 -0
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +18 -1
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/ps.d.ts +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +13 -6
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +6 -2
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/roster.d.ts +4 -2
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/roster.js +2 -2
- package/dist/commands/roster.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 +198 -11
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +31 -6
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +2 -0
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +4 -0
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +25 -1
- package/dist/commands/workflow.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +10 -5
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +7 -3
- package/dist/lib/work-install.js.map +1 -1
- package/dist/mcp-http.d.ts +3 -0
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +13 -0
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +9 -2
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +269 -76
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +1 -0
- package/tui/dist/commands/registry.js.map +1 -1
- package/tui/dist/connected-assistants.js +1 -1
- package/tui/dist/connected-assistants.js.map +1 -1
- package/tui/dist/crash-cart/start-daemon.d.ts.map +1 -1
- package/tui/dist/crash-cart/start-daemon.js +4 -2
- package/tui/dist/crash-cart/start-daemon.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +9 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +40 -0
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +12 -0
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/main.js +7 -3
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/page-read.d.ts.map +1 -1
- package/tui/dist/page-read.js +2 -1
- package/tui/dist/page-read.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +8 -2
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/fleet-scopes-model.d.ts +73 -0
- package/tui/dist/scopes/fleet-scopes-model.d.ts.map +1 -0
- package/tui/dist/scopes/fleet-scopes-model.js +102 -0
- package/tui/dist/scopes/fleet-scopes-model.js.map +1 -0
- package/tui/dist/scopes/scopes-model.d.ts +2 -0
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +7 -4
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/sections.d.ts.map +1 -1
- package/tui/dist/sections.js +5 -0
- package/tui/dist/sections.js.map +1 -1
- package/tui/dist/startup.d.ts +5 -0
- package/tui/dist/startup.d.ts.map +1 -1
- package/tui/dist/startup.js +12 -0
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +12 -5
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/types.d.ts +16 -1
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/index-BX8TUZ0E.css +32 -0
- package/ui/dist/assets/{index-BOYrLyfQ.js → index-BvUEh33d.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-DqSRu4OY.css +0 -32
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { codexEnvelopeArgs } from "../domain/codex-rebuild-permissions.js";
|
|
2
|
-
import {
|
|
2
|
+
import { codexMemberLaunch, observeCodexEnvelope, readProfileFingerprint } from "../domain/codex-member-permissions.js";
|
|
3
|
+
import { codexPolicyWarning, resolveCodexFilesystemHome, verifyCodexFilesystemPolicy } from "../domain/codex-filesystem-preflight.js";
|
|
3
4
|
import { operationalLaunchArg } from "./kernel-authority.js";
|
|
4
5
|
import nodePath from "node:path";
|
|
5
6
|
import fs from "node:fs";
|
|
@@ -77,6 +78,10 @@ export class CodexRuntimeAdapter {
|
|
|
77
78
|
// the real probe by default.
|
|
78
79
|
verifyProfilePreflight;
|
|
79
80
|
profileFingerprint;
|
|
81
|
+
verifyFilesystemPolicy;
|
|
82
|
+
// A handover checks the exact binding before retiring its predecessor. Consume
|
|
83
|
+
// that result once at dispatch, rather than repeat a refusal after cutover.
|
|
84
|
+
filesystemPreflight = new WeakMap();
|
|
80
85
|
// #69: whether the installed Codex supports --no-daemon. Startup wires the real probe;
|
|
81
86
|
// absent (unit tests, other embedders) keeps the existing invocation unchanged.
|
|
82
87
|
detectDaemonSupport;
|
|
@@ -130,6 +135,7 @@ export class CodexRuntimeAdapter {
|
|
|
130
135
|
this.codexHome = deps.codexHome;
|
|
131
136
|
this.seatHome = deps.seatHome;
|
|
132
137
|
this.profileFingerprint = deps.profileFingerprint ?? readProfileFingerprint;
|
|
138
|
+
this.verifyFilesystemPolicy = deps.verifyFilesystemPolicy ?? verifyCodexFilesystemPolicy;
|
|
133
139
|
this.launchPath = deps.launchPath;
|
|
134
140
|
this.detectDaemonSupport = deps.detectDaemonSupport;
|
|
135
141
|
this.readNetworkDefault = deps.readNetworkDefault;
|
|
@@ -164,7 +170,9 @@ export class CodexRuntimeAdapter {
|
|
|
164
170
|
/** The home a seat's Codex uses: its own from its member or rig `env:`, else the daemon's explicit CODEX_HOME. Undefined
|
|
165
171
|
* keeps the legacy OS/PID home behavior. */
|
|
166
172
|
homeFor(binding) {
|
|
167
|
-
|
|
173
|
+
const selected = this.ownHome(binding) ?? this.codexHome;
|
|
174
|
+
return binding?.codexPermissions && "filesystem" in binding.codexPermissions
|
|
175
|
+
? selected ?? resolveCodexFilesystemHome(undefined, this.fs.homedir) : selected;
|
|
168
176
|
}
|
|
169
177
|
/** Only the seat's own CODEX_HOME, undefined when it declares none. Probes and readers get it as an extra argument
|
|
170
178
|
* only when it's set, so a seat without one calls them exactly as before. */
|
|
@@ -172,7 +180,7 @@ export class CodexRuntimeAdapter {
|
|
|
172
180
|
return binding?.accountHome ?? (binding?.nodeId ? this.seatHome?.(binding.nodeId, binding.accountHome === null) : undefined);
|
|
173
181
|
}
|
|
174
182
|
ownHomeCommandOpt(binding) {
|
|
175
|
-
const own = this.ownHome(binding);
|
|
183
|
+
const own = binding.codexPermissions && "filesystem" in binding.codexPermissions ? this.homeFor(binding) : this.ownHome(binding);
|
|
176
184
|
return own ? { codexHome: own } : {};
|
|
177
185
|
}
|
|
178
186
|
ownHomeOpt(binding) {
|
|
@@ -342,7 +350,8 @@ export class CodexRuntimeAdapter {
|
|
|
342
350
|
// Codex's "continue without trusting" choice writes no state, so an existing install with no hooks.state entry for any
|
|
343
351
|
// of OpenRig's hooks may be an unrecorded skip, or an older install that never granted them. OpenRig trusts its own
|
|
344
352
|
// exact shipped hooks there as on a first install (#17). Any recorded choice for one of them, or a layer it can't read,
|
|
345
|
-
// leaves native review in place. A proven owned grant may renew its content approval
|
|
353
|
+
// leaves native review in place. A proven owned grant may renew its content approval, and its declarations when a new
|
|
354
|
+
// shipped bundle changes them and every approval still matches OpenRig's own record.
|
|
346
355
|
const firstInstall = !this.fs.exists(cacheRoot) && !layers.some(layer => layer.state === "read"
|
|
347
356
|
&& Object.hasOwn((parseToml(layer.content).plugins ?? {}), CODEX_CORE_PLUGIN_KEY));
|
|
348
357
|
const noOwnHookChoice = (read) => {
|
|
@@ -366,11 +375,18 @@ export class CodexRuntimeAdapter {
|
|
|
366
375
|
const planned = planOwnedCodexContentApproval({ configPath, content, layers: currentLayers, shipped, installed: cachedDir, freshGrant });
|
|
367
376
|
if (!planned)
|
|
368
377
|
return;
|
|
378
|
+
for (const [key, hash] of Object.entries(planned.trustedHashes))
|
|
379
|
+
content = upsertCodexHookTrust(content, key, hash);
|
|
380
|
+
// The declaration writer ends the file with one newline; keep the owner's own ending.
|
|
381
|
+
if (content !== before)
|
|
382
|
+
content = content.replace(/\n*$/, /\n*$/.exec(before)?.[0] ?? "");
|
|
369
383
|
for (const [key, hash] of Object.entries(planned.hashes))
|
|
370
384
|
content = upsertCodexHookTrust(content, key, hash, "trusted_content_hash");
|
|
371
385
|
// The line writer must not alter examples in strings or duplicate quoted keys.
|
|
372
386
|
try {
|
|
373
387
|
const expected = parseToml(before);
|
|
388
|
+
for (const [key, hash] of Object.entries(planned.trustedHashes))
|
|
389
|
+
expected.hooks.state[key].trusted_hash = hash;
|
|
374
390
|
for (const [key, hash] of Object.entries(planned.hashes))
|
|
375
391
|
expected.hooks.state[key].trusted_content_hash = hash;
|
|
376
392
|
if (!isDeepStrictEqual(parseToml(content), expected))
|
|
@@ -379,8 +395,10 @@ export class CodexRuntimeAdapter {
|
|
|
379
395
|
catch {
|
|
380
396
|
return;
|
|
381
397
|
} // Leave native review and owner bytes intact for unsupported TOML spellings.
|
|
382
|
-
|
|
383
|
-
|
|
398
|
+
// A concurrent native choice wins: in this file, or in any layer the plan read (a layer appearing, changing,
|
|
399
|
+
// disappearing or becoming unreadable counts).
|
|
400
|
+
if (this.fs.readFile(configPath) !== before || !isDeepStrictEqual(readLayers(), currentLayers))
|
|
401
|
+
return;
|
|
384
402
|
if (content !== before)
|
|
385
403
|
this.fs.writeFile(configPath, content);
|
|
386
404
|
recordOwnedCodexApproval(configPath, planned.approval);
|
|
@@ -821,6 +839,39 @@ export class CodexRuntimeAdapter {
|
|
|
821
839
|
}
|
|
822
840
|
return { delivered, failed, ...(warnings.length ? { warnings } : {}) };
|
|
823
841
|
}
|
|
842
|
+
/** No managed config writes, pane input, termination or bindings change here. */
|
|
843
|
+
async preflightLaunch(binding) {
|
|
844
|
+
const decision = await this.checkFilesystemPolicy(binding);
|
|
845
|
+
if (!decision)
|
|
846
|
+
return { ok: true };
|
|
847
|
+
if (!decision.ok)
|
|
848
|
+
return decision;
|
|
849
|
+
const profile = await this.checkProfileLoad(binding);
|
|
850
|
+
if (!profile.ok)
|
|
851
|
+
return profile;
|
|
852
|
+
this.filesystemPreflight.set(binding, decision);
|
|
853
|
+
return decision.verified ? { ok: true } : { ok: true, warnings: [codexPolicyWarning(decision.reason)] };
|
|
854
|
+
}
|
|
855
|
+
async checkFilesystemPolicy(binding) {
|
|
856
|
+
if (!binding.codexPermissions || !("filesystem" in binding.codexPermissions))
|
|
857
|
+
return undefined;
|
|
858
|
+
try {
|
|
859
|
+
return await this.verifyFilesystemPolicy({ permissions: binding.codexPermissions, cwd: binding.cwd,
|
|
860
|
+
codexHome: this.homeFor(binding), launchPath: this.launchPath, launchWrapper: binding.launchWrapper,
|
|
861
|
+
codexConfigProfile: binding.codexConfigProfile?.trim() || undefined });
|
|
862
|
+
}
|
|
863
|
+
catch {
|
|
864
|
+
return { ok: true, verified: false, reason: "Native Codex configuration reader failed" };
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
async checkProfileLoad(binding) {
|
|
868
|
+
const profile = binding.codexConfigProfile?.trim();
|
|
869
|
+
if (!profile)
|
|
870
|
+
return { ok: true };
|
|
871
|
+
const own = this.ownHome(binding);
|
|
872
|
+
const probe = await (own ? this.verifyProfilePreflight(profile, binding.cwd, own) : this.verifyProfilePreflight(profile, binding.cwd));
|
|
873
|
+
return probe.ok ? { ok: true } : { ok: false, error: `${probe.error}${probe.migrationHint ? `\n Fix: ${probe.migrationHint}` : ""}` };
|
|
874
|
+
}
|
|
824
875
|
async launchHarness(binding, opts) {
|
|
825
876
|
if (binding.accountHome !== undefined && !this.seatLaunchEnvironment) {
|
|
826
877
|
return { ok: false, error: "Isolated account-home launch support is unavailable; no agent started." };
|
|
@@ -840,6 +891,7 @@ export class CodexRuntimeAdapter {
|
|
|
840
891
|
if (!prepared.ok)
|
|
841
892
|
return prepared;
|
|
842
893
|
const { modelArg, effortArg, appliedLaunch, postureArg, queueStateDirArg, gitDirArg, seatFolderArg, daemonArg, networkArg, loginShellArg } = prepared;
|
|
894
|
+
const policyNotice = appliedLaunch.reason?.startsWith("policy not verified:") ? { warnings: [appliedLaunch.reason] } : {};
|
|
843
895
|
// Fork branch: `codex fork <parent_thread_id>`. Captures the NEW thread id
|
|
844
896
|
// post-fork. Parent thread id is NOT persisted onto the new seat record
|
|
845
897
|
// (identity-honesty bedrock).
|
|
@@ -881,7 +933,7 @@ export class CodexRuntimeAdapter {
|
|
|
881
933
|
// without a token and the handover's readiness checks still decide success. Any other fork
|
|
882
934
|
// keeps its unsent context pending for `rig seat continue`, which verifies the child first.
|
|
883
935
|
if (opts.forkSource.pendingIdAllowed)
|
|
884
|
-
return { ok: true, appliedLaunch };
|
|
936
|
+
return { ok: true, appliedLaunch, ...policyNotice };
|
|
885
937
|
return {
|
|
886
938
|
ok: false,
|
|
887
939
|
error: "codex fork: could not capture new post-fork thread id",
|
|
@@ -889,7 +941,7 @@ export class CodexRuntimeAdapter {
|
|
|
889
941
|
forkIdentityPending: true,
|
|
890
942
|
};
|
|
891
943
|
}
|
|
892
|
-
return { ok: true, resumeToken: threadId, resumeType: "codex_id", appliedLaunch };
|
|
944
|
+
return { ok: true, resumeToken: threadId, resumeType: "codex_id", appliedLaunch, ...policyNotice };
|
|
893
945
|
}
|
|
894
946
|
// OPR.0.4.8.2: one posture decision (codexPostureArg) for the fresh launch too — YOLO forces
|
|
895
947
|
// -s danger-full-access (overrides even a named profile); otherwise the named profile, or
|
|
@@ -916,16 +968,16 @@ export class CodexRuntimeAdapter {
|
|
|
916
968
|
const verification = await this.verifyResumeLaunch(binding.tmuxSession, updatePrompt, { resumeToken: opts.resumeToken, ...this.ownHomeOpt(binding) });
|
|
917
969
|
if (!verification.ok)
|
|
918
970
|
return verification;
|
|
919
|
-
return { ok: true, resumeToken: opts.resumeToken, resumeType: "codex_id", appliedLaunch,
|
|
971
|
+
return { ok: true, resumeToken: opts.resumeToken, resumeType: "codex_id", appliedLaunch, ...policyNotice,
|
|
920
972
|
...(verification.resumedProcess ? { resumedProcess: verification.resumedProcess } : {}) };
|
|
921
973
|
}
|
|
922
974
|
const threadId = await this.captureFreshThreadId(binding, updatePrompt);
|
|
923
975
|
if (updatePrompt.failure)
|
|
924
976
|
return updatePrompt.failure;
|
|
925
977
|
if (threadId) {
|
|
926
|
-
return { ok: true, resumeToken: threadId, resumeType: "codex_id", appliedLaunch };
|
|
978
|
+
return { ok: true, resumeToken: threadId, resumeType: "codex_id", appliedLaunch, ...policyNotice };
|
|
927
979
|
}
|
|
928
|
-
return { ok: true, appliedLaunch };
|
|
980
|
+
return { ok: true, appliedLaunch, ...policyNotice };
|
|
929
981
|
}
|
|
930
982
|
/** The command launchHarness would type to resume `resumeToken`, wrapped in the seat launch environment,
|
|
931
983
|
* for a caller that runs it itself (a respawned direct-native pane). Nothing is sent to the pane. */
|
|
@@ -947,7 +999,8 @@ export class CodexRuntimeAdapter {
|
|
|
947
999
|
catch {
|
|
948
1000
|
return { ok: false, error: "launch_wrapper unavailable; no agent started." };
|
|
949
1001
|
}
|
|
950
|
-
return { ok: true, command, core, appliedLaunch: prepared.appliedLaunch
|
|
1002
|
+
return { ok: true, command, core, appliedLaunch: prepared.appliedLaunch,
|
|
1003
|
+
...(prepared.appliedLaunch.reason?.startsWith("policy not verified:") ? { warnings: [prepared.appliedLaunch.reason] } : {}) };
|
|
951
1004
|
}
|
|
952
1005
|
/** Type a command buildResumeCommand built into the pane's shell, then verify the resume as launchHarness
|
|
953
1006
|
* does. Nothing is prepared again, so the command runs exactly as it was built and checked. */
|
|
@@ -1000,6 +1053,11 @@ export class CodexRuntimeAdapter {
|
|
|
1000
1053
|
/** Launch flags shared by fresh, fork and resume, decided once per launch. With `running`, the probed and
|
|
1001
1054
|
* prepared parts come from the running Codex instead, and no Codex process is started to decide them. */
|
|
1002
1055
|
async prepareLaunch(binding, name, running, opts) {
|
|
1056
|
+
const checkedBeforeCutover = this.filesystemPreflight.get(binding);
|
|
1057
|
+
const decision = checkedBeforeCutover ?? await this.checkFilesystemPolicy(binding);
|
|
1058
|
+
this.filesystemPreflight.delete(binding);
|
|
1059
|
+
if (decision && !decision.ok)
|
|
1060
|
+
return decision;
|
|
1003
1061
|
// The config write and, for a seat that selected openrig-core, its install run as one step under the config lock, so
|
|
1004
1062
|
// concurrent launches never interleave them. An unselected seat's launch never installs.
|
|
1005
1063
|
// A seat with its own CODEX_HOME gets OpenRig's managed config (hooks, feature flag) and plugin in that home.
|
|
@@ -1022,44 +1080,43 @@ export class CodexRuntimeAdapter {
|
|
|
1022
1080
|
const effortArg = effort ? ` -c ${shellQuote(`model_reasoning_effort="${effort}"`)}` : "";
|
|
1023
1081
|
const profile = binding.codexConfigProfile?.trim();
|
|
1024
1082
|
const profileArg = profile ? ` -p ${shellQuote(profile)}` : "";
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1083
|
+
const filesystemPermissions = binding.codexPermissions && "filesystem" in binding.codexPermissions ? binding.codexPermissions : undefined;
|
|
1084
|
+
// An authored filesystem policy always wins over a stale observed legacy envelope. Legacy rebuilds keep their carry behavior.
|
|
1085
|
+
const memberChoice = binding.codexPermissions && (!binding.codexRebuildPermissions || filesystemPermissions) ? codexMemberLaunch(binding.codexPermissions) : undefined;
|
|
1086
|
+
const envelope = memberChoice ? undefined : binding.codexRebuildPermissions;
|
|
1087
|
+
const posture = memberChoice ? profileArg + memberChoice.args : envelope
|
|
1029
1088
|
? profileArg + codexEnvelopeArgs(envelope)
|
|
1030
1089
|
: codexPostureArg(profileArg, process.env, binding.launchPosture);
|
|
1031
|
-
const appliedLaunch = envelope ? observeCodexEnvelope(envelope) : observeCodexSandbox(posture);
|
|
1090
|
+
const appliedLaunch = memberChoice?.observation ?? (envelope ? observeCodexEnvelope(envelope) : observeCodexSandbox(posture));
|
|
1091
|
+
if (decision && !decision.verified)
|
|
1092
|
+
appliedLaunch.reason = codexPolicyWarning(decision.reason);
|
|
1032
1093
|
// The seat's envelope is not full access, so a policy's full_bypass extras don't follow it.
|
|
1033
|
-
const postureArg = posture + operationalLaunchArg(this.runtime,
|
|
1094
|
+
const postureArg = posture + operationalLaunchArg(this.runtime, memberChoice ? { ...binding, kernelAuthority: false, launchPosture: undefined } : binding);
|
|
1034
1095
|
if (running) {
|
|
1035
1096
|
// The running Codex already loaded its profile; drift in -p is the caller's to compare.
|
|
1036
1097
|
// Its own --add-dirs, git dirs included, carry over as they ran; none are resolved again. They follow the
|
|
1037
1098
|
// conversation id, as on every resume, so the resume proof reads the id even when a dir has a space.
|
|
1038
1099
|
return { ok: true, model, modelArg, effort, effortArg, profile, appliedLaunch, postureArg,
|
|
1039
1100
|
queueStateDirArg: "",
|
|
1040
|
-
gitDirArg: running.addDirs.map((dir) => ` --add-dir ${shellQuote(dir)}`).join(""),
|
|
1101
|
+
gitDirArg: (filesystemPermissions ? [] : running.addDirs).map((dir) => ` --add-dir ${shellQuote(dir)}`).join(""),
|
|
1041
1102
|
seatFolderArg: "",
|
|
1042
1103
|
daemonOptOut: running.daemonOptOut, daemonArg: running.daemonOptOut ? " --no-daemon" : "",
|
|
1043
|
-
networkArg: running.networkOverride ? ` -c ${shellQuote(CODEX_NETWORK_DEFAULT_OVERRIDE)}` : "",
|
|
1104
|
+
networkArg: !filesystemPermissions && running.networkOverride ? ` -c ${shellQuote(CODEX_NETWORK_DEFAULT_OVERRIDE)}` : "",
|
|
1044
1105
|
loginShellArg: running.nonLoginShell ? codexNonLoginShellArg : "" };
|
|
1045
1106
|
}
|
|
1046
1107
|
// OPR.0.3.4.7 — profile-LOAD probe before launch/resume. A legacy
|
|
1047
1108
|
// [profiles.<name>] table or invalid TOML must fail BEFORE the opaque
|
|
1048
1109
|
// `codex -p <profile> resume` failure. An absent .config.toml passes
|
|
1049
1110
|
// (Codex default-layers it; advisor Option B).
|
|
1050
|
-
if (profile) {
|
|
1051
|
-
const
|
|
1052
|
-
if (!
|
|
1053
|
-
return
|
|
1054
|
-
ok: false,
|
|
1055
|
-
error: `${probeResult.error}${probeResult.migrationHint ? `\n Fix: ${probeResult.migrationHint}` : ""}`,
|
|
1056
|
-
};
|
|
1057
|
-
}
|
|
1111
|
+
if (profile && !checkedBeforeCutover) {
|
|
1112
|
+
const loaded = await this.checkProfileLoad(binding);
|
|
1113
|
+
if (!loaded.ok)
|
|
1114
|
+
return loaded;
|
|
1058
1115
|
}
|
|
1059
1116
|
// Codex rejects writable --add-dir roots under a read-only sandbox. Only
|
|
1060
1117
|
// suppress OpenRig's generated roots when later project layers cannot make it writable.
|
|
1061
1118
|
// A seat envelope states its sandbox: read-only gets no generated roots; workspace-write keeps them.
|
|
1062
|
-
const suppressAutoAddDirs =
|
|
1119
|
+
const suppressAutoAddDirs = memberChoice ? memberChoice.suppressAutoAddDirs
|
|
1063
1120
|
: Boolean(!binding.codexRebuildPermissions && profile && posture === profileArg && this.profileRemainsReadOnly(profile, binding.cwd, home));
|
|
1064
1121
|
// Issue #121: fresh, resume and fork get the same git metadata dirs, so a restored or forked seat can still commit.
|
|
1065
1122
|
// A rebuild keeps the writable roots its observed envelope names instead.
|
|
@@ -1068,7 +1125,7 @@ export class CodexRuntimeAdapter {
|
|
|
1068
1125
|
// The seat's own topology folder, so it can keep its LEARNED.md and recap: the same launches and the same suppression.
|
|
1069
1126
|
const seatFolder = binding.codexRebuildPermissions || suppressAutoAddDirs ? undefined : this.prepareSeatFolder?.(name);
|
|
1070
1127
|
const seatFolderArg = seatFolder ? ` --add-dir ${shellQuote(seatFolder)}` : "";
|
|
1071
|
-
const teamWorkspaceArg = !envelope && binding.teamPermissionDefault && !profile
|
|
1128
|
+
const teamWorkspaceArg = !memberChoice && !envelope && binding.teamPermissionDefault && !profile
|
|
1072
1129
|
&& appliedLaunch.state === "observed" && appliedLaunch.value === "workspace-write"
|
|
1073
1130
|
? codexTeamWorkspaceArg(this.prepareTeamWorkspace, name) : "";
|
|
1074
1131
|
const queueStateDirArg = binding.codexRebuildPermissions || suppressAutoAddDirs
|
|
@@ -1082,7 +1139,7 @@ export class CodexRuntimeAdapter {
|
|
|
1082
1139
|
const daemonOptOut = daemonSupport?.kind === "supported";
|
|
1083
1140
|
const daemonArg = daemonOptOut ? " --no-daemon" : "";
|
|
1084
1141
|
// #275: on the plain floor, network access unless Codex reports an opt-out or policy. An envelope states its own.
|
|
1085
|
-
const networkArg = envelope ? ""
|
|
1142
|
+
const networkArg = memberChoice || envelope ? ""
|
|
1086
1143
|
: await codexNetworkDefaultArg(own && this.readNetworkDefault ? ((cwd) => this.readNetworkDefault(cwd, own)) : this.readNetworkDefault, appliedLaunch, binding.cwd, name);
|
|
1087
1144
|
// The launch facts keep the probed daemon choice, so a printed recovery command can repeat it; no probe, no fact.
|
|
1088
1145
|
const launchFacts = daemonSupport ? { ...appliedLaunch, daemonOptOut } : appliedLaunch;
|