@openrig/cli 0.6.6 → 0.6.8
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 +97 -28
- package/daemon/assets/claude-team-permissions.cjs +262 -0
- package/daemon/assets/onboarding/02-self-and-competent-action.md +20 -13
- 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/scripts/refocus-health.cjs +41 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +69 -12
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +13 -2
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +6 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +31 -4
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +24 -13
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +42 -0
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +6 -0
- package/daemon/assets/skills/rigs/SKILL.md +133 -0
- package/daemon/context-packs/help/help.md +48 -19
- 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 +239 -43
- package/daemon/context-packs/reference/getting-started.md +356 -212
- package/daemon/context-packs/reference/instance-layout.md +5 -0
- package/daemon/context-packs/reference/manifest.yaml +4 -1
- package/daemon/context-packs/reference/rig-spec.md +48 -20
- package/daemon/context-packs/reference/whats-new.md +96 -0
- 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 +13 -2
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +6 -0
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +3 -0
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +19 -12
- 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 +17 -16
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/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/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/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/SKILL.md +31 -4
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +24 -13
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
- 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 +42 -0
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +6 -0
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +23 -13
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +17 -0
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +2 -2
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +29 -11
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/pi-readiness.d.ts +15 -0
- package/daemon/dist/adapters/pi-readiness.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-readiness.js +90 -0
- package/daemon/dist/adapters/pi-readiness.js.map +1 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +1 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +13 -2
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +9 -6
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +4 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/096_rig_install_root.d.ts +3 -0
- package/daemon/dist/db/migrations/096_rig_install_root.d.ts.map +1 -0
- package/daemon/dist/db/migrations/096_rig_install_root.js +5 -0
- package/daemon/dist/db/migrations/096_rig_install_root.js.map +1 -0
- package/daemon/dist/db/migrations/097_thread_part_map.d.ts +3 -0
- package/daemon/dist/db/migrations/097_thread_part_map.d.ts.map +1 -0
- package/daemon/dist/db/migrations/097_thread_part_map.js +20 -0
- package/daemon/dist/db/migrations/097_thread_part_map.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +7 -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 +12 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +55 -30
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/agent-image-types.d.ts +1 -1
- package/daemon/dist/domain/agent-images/agent-image-types.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +6 -4
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/bundle-install-context.d.ts +2 -2
- package/daemon/dist/domain/bundle-install-context.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-install-context.js +16 -3
- package/daemon/dist/domain/bundle-install-context.js.map +1 -1
- package/daemon/dist/domain/bundle-types.d.ts +1 -1
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.d.ts +5 -0
- package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.js +8 -0
- package/daemon/dist/domain/chat-repository.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +5 -4
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.d.ts +3 -0
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +8 -1
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +34 -2
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +195 -107
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +4 -2
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +5 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +23 -6
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +57 -11
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/connections-projection.d.ts +4 -0
- package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/connections-projection.js +2 -0
- package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +7 -4
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.js +23 -6
- package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +2 -2
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +2 -2
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js +3 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts +39 -0
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/channel-map.js +114 -0
- package/daemon/dist/domain/gateway/slack/channel-map.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts +7 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +19 -2
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +24 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +105 -3
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +7 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +36 -0
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +1 -0
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +7 -2
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +35 -3
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +34 -7
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +268 -51
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +17 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +107 -24
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/socket-inbound.js +40 -0
- package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js +22 -2
- package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +14 -0
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js +27 -0
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
- package/daemon/dist/domain/generated-file-hygiene.d.ts.map +1 -1
- package/daemon/dist/domain/generated-file-hygiene.js +7 -4
- package/daemon/dist/domain/generated-file-hygiene.js.map +1 -1
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +5 -2
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
- package/daemon/dist/domain/markdown-address.js +23 -6
- package/daemon/dist/domain/markdown-address.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +50 -3
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +2 -2
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +30 -4
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +1 -0
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/pane-binding-observation.d.ts +1 -0
- package/daemon/dist/domain/pane-binding-observation.d.ts.map +1 -1
- package/daemon/dist/domain/pane-binding-observation.js +3 -1
- package/daemon/dist/domain/pane-binding-observation.js.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.d.ts +6 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +12 -0
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +54 -15
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +11 -9
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +15 -12
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-nudge-text.d.ts +4 -0
- package/daemon/dist/domain/queue-nudge-text.d.ts.map +1 -0
- package/daemon/dist/domain/queue-nudge-text.js +35 -0
- package/daemon/dist/domain/queue-nudge-text.js.map +1 -0
- package/daemon/dist/domain/queue-repository.d.ts +7 -0
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +50 -20
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +2 -2
- package/daemon/dist/domain/queue-retention.js +4 -4
- package/daemon/dist/domain/queue-wait-backoff.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wait-backoff.js +6 -2
- package/daemon/dist/domain/queue-wait-backoff.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +7 -2
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +15 -2
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +29 -6
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +5 -2
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +6 -2
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
- package/daemon/dist/domain/reply-to-choice.js +9 -6
- package/daemon/dist/domain/reply-to-choice.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +5 -1
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +17 -3
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +17 -11
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +3 -1
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +13 -4
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +6 -0
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +1 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +8 -4
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +19 -4
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +16 -6
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +9 -1
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/session-jsonl.d.ts.map +1 -1
- package/daemon/dist/domain/session-jsonl.js +10 -4
- package/daemon/dist/domain/session-jsonl.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +16 -21
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +70 -37
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-audit.d.ts +19 -0
- package/daemon/dist/domain/skill-audit.d.ts.map +1 -1
- package/daemon/dist/domain/skill-audit.js +97 -5
- package/daemon/dist/domain/skill-audit.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +11 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +145 -12
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/skill-mirror-drift.d.ts +6 -1
- package/daemon/dist/domain/skill-mirror-drift.d.ts.map +1 -1
- package/daemon/dist/domain/skill-mirror-drift.js +23 -12
- package/daemon/dist/domain/skill-mirror-drift.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +12 -32
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +4 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +14 -7
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +9 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +4 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +23 -11
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +21 -9
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +2 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/usage-samples-store.js +2 -2
- package/daemon/dist/domain/usage-samples-store.js.map +1 -1
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +42 -10
- package/daemon/dist/domain/usage-series.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +2 -0
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-due.d.ts +17 -0
- package/daemon/dist/domain/watchdog-due.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-due.js +45 -0
- package/daemon/dist/domain/watchdog-due.js.map +1 -0
- package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-scheduler.js +3 -7
- package/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +15 -5
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +1 -1
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.d.ts +6 -0
- package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.js +11 -0
- package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
- package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-validator.js +22 -1
- package/daemon/dist/domain/workflow-validator.js.map +1 -1
- package/daemon/dist/domain/workspace/project-catalog.js +1 -1
- package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
- package/daemon/dist/gateway-slack-surface.d.ts +1 -0
- package/daemon/dist/gateway-slack-surface.d.ts.map +1 -1
- package/daemon/dist/gateway-slack-surface.js +2 -1
- package/daemon/dist/gateway-slack-surface.js.map +1 -1
- package/daemon/dist/index.d.ts +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +7 -7
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/agent-images.js +5 -5
- package/daemon/dist/routes/agent-images.js.map +1 -1
- package/daemon/dist/routes/bootstrap-failure-response.d.ts +13 -0
- package/daemon/dist/routes/bootstrap-failure-response.d.ts.map +1 -0
- package/daemon/dist/routes/bootstrap-failure-response.js +52 -0
- package/daemon/dist/routes/bootstrap-failure-response.js.map +1 -0
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +23 -36
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/chat.d.ts.map +1 -1
- package/daemon/dist/routes/chat.js +16 -1
- package/daemon/dist/routes/chat.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +2 -0
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rigs.js +2 -2
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/seat.js +13 -13
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +11 -11
- 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 +15 -7
- package/daemon/dist/routes/skills.js.map +1 -1
- package/daemon/dist/routes/terminal-ws.js +15 -2
- package/daemon/dist/routes/terminal-ws.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +6 -4
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +5 -56
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +32 -7
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +9 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +10 -10
- package/daemon/docs/reference/agent-startup-guide.md +7 -2
- package/daemon/docs/reference/bundle-formats.md +6 -4
- package/daemon/docs/reference/chain-file-convention.md +2 -2
- package/daemon/docs/reference/developing.md +1 -1
- package/daemon/docs/reference/edge-types.md +1 -1
- package/daemon/docs/reference/getting-started.md +356 -212
- package/daemon/docs/reference/help.md +48 -19
- package/daemon/docs/reference/instance-layout.md +5 -0
- package/daemon/docs/reference/non-interruptive-mode.md +7 -4
- package/daemon/docs/reference/project-workspace.md +2 -2
- package/daemon/docs/reference/publishing-a-rig-bundle.md +15 -10
- package/daemon/docs/reference/refocus-channel.md +14 -2
- package/daemon/docs/reference/rig-bundle.md +39 -19
- package/daemon/docs/reference/rig-spec.md +48 -20
- package/daemon/docs/reference/rosters.md +2 -1
- package/daemon/docs/reference/schemas/registry-entry.v1.schema.json +1 -1
- package/daemon/docs/reference/sdlc-conventions.md +4 -2
- package/daemon/docs/reference/slack-app-setup.md +69 -9
- package/daemon/docs/reference/topology-naming.md +74 -0
- package/daemon/docs/reference/whats-new.md +96 -0
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +6 -0
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +3 -0
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +19 -12
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +17 -16
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +60 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +105 -19
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +5 -2
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +44 -0
- package/dist/build-info.js +3 -3
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +11 -3
- package/dist/cli-error.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/agent-image.js +2 -2
- package/dist/commands/agent-image.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +5 -4
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +21 -1
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +12 -2
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/doctor.d.ts +3 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +14 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +42 -0
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +4 -3
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +114 -8
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/package.d.ts.map +1 -1
- package/dist/commands/package.js +6 -3
- package/dist/commands/package.js.map +1 -1
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +6 -5
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/proof.js +1 -1
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +6 -3
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore-packet.d.ts.map +1 -1
- package/dist/commands/restore-packet.js +6 -4
- package/dist/commands/restore-packet.js.map +1 -1
- package/dist/commands/scope.js +6 -6
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/setup.d.ts +6 -15
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +121 -332
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +12 -1
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/slack.d.ts +5 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +143 -6
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/stream.js +1 -1
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/terminal.d.ts +33 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +30 -12
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/tui.js +4 -4
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts +1 -1
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +4 -3
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +30 -18
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.js +1 -1
- package/dist/config-store.js.map +1 -1
- package/dist/front-door.d.ts.map +1 -1
- package/dist/front-door.js +4 -2
- package/dist/front-door.js.map +1 -1
- package/dist/herdr-launch-config.d.ts +3 -0
- package/dist/herdr-launch-config.d.ts.map +1 -0
- package/dist/herdr-launch-config.js +37 -0
- package/dist/herdr-launch-config.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/launch-plan-guard.d.ts +27 -0
- package/dist/launch-plan-guard.d.ts.map +1 -0
- package/dist/launch-plan-guard.js +73 -0
- package/dist/launch-plan-guard.js.map +1 -0
- package/dist/lib/bundle-source.d.ts +2 -0
- package/dist/lib/bundle-source.d.ts.map +1 -1
- package/dist/lib/bundle-source.js +12 -1
- package/dist/lib/bundle-source.js.map +1 -1
- package/dist/lib/context-git.d.ts +2 -0
- package/dist/lib/context-git.d.ts.map +1 -1
- package/dist/lib/context-git.js +55 -5
- package/dist/lib/context-git.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +3 -2
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +97 -9
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/templates.d.ts.map +1 -1
- package/dist/lib/scope/templates.js +28 -24
- package/dist/lib/scope/templates.js.map +1 -1
- package/dist/provider-auth.d.ts +32 -0
- package/dist/provider-auth.d.ts.map +1 -0
- package/dist/provider-auth.js +128 -0
- package/dist/provider-auth.js.map +1 -0
- package/dist/terminal-window.d.ts +19 -0
- package/dist/terminal-window.d.ts.map +1 -0
- package/dist/terminal-window.js +513 -0
- package/dist/terminal-window.js.map +1 -0
- package/package.json +2 -2
- package/tui/dist/commands/registry.js +2 -2
- 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 +1 -0
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/connections/connections-model.d.ts +5 -0
- package/tui/dist/connections/connections-model.d.ts.map +1 -1
- package/tui/dist/connections/connections-model.js +1 -1
- package/tui/dist/connections/connections-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +5 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/execution/workflow-model.d.ts.map +1 -1
- package/tui/dist/execution/workflow-model.js +3 -1
- package/tui/dist/execution/workflow-model.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 +3 -1
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/main.js +39 -15
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/page-read.js +1 -1
- package/tui/dist/page-read.js.map +1 -1
- package/tui/dist/pending-address.d.ts +7 -0
- package/tui/dist/pending-address.d.ts.map +1 -0
- package/tui/dist/pending-address.js +11 -0
- package/tui/dist/pending-address.js.map +1 -0
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +10 -6
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/scopes-model.js +4 -4
- package/tui/dist/socket-server.d.ts +3 -1
- package/tui/dist/socket-server.d.ts.map +1 -1
- package/tui/dist/socket-server.js +6 -0
- package/tui/dist/socket-server.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +40 -13
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/stylize.js +1 -1
- package/tui/dist/stylize.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts +5 -0
- package/tui/dist/terminals/open-window.d.ts.map +1 -0
- package/tui/dist/terminals/open-window.js +55 -0
- package/tui/dist/terminals/open-window.js.map +1 -0
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +16 -17
- package/tui/dist/terminals/terminal-model.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-HHSvwF97.js → index-D5n8EwkG.js} +1 -1
- package/ui/dist/index.html +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -2,50 +2,24 @@ import { Command } from "commander";
|
|
|
2
2
|
import { execSync } from "node:child_process";
|
|
3
3
|
import { readFileSync, writeFileSync, existsSync, accessSync, constants, mkdirSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { homedir } from "node:os";
|
|
6
|
+
import { shellQuote } from "../cross-host-executor.js";
|
|
5
7
|
import { fileURLToPath } from "node:url";
|
|
6
8
|
import { parseDocument } from "yaml";
|
|
7
9
|
import { runDoctorChecks } from "./doctor.js";
|
|
8
|
-
import { formatDaemonHostForUrl } from "../client.js";
|
|
9
10
|
import { ConfigStore } from "../config-store.js";
|
|
10
|
-
import { CMUX_SETTINGS_DISCLOSURE_PATH, isCmuxSocketControlCompatible, readCmuxSocketControlModeFromText, resolveCmuxSettingsPath, upsertCmuxSocketControlMode, } from "../cmux-config.js";
|
|
11
11
|
import { buildTmuxControlFailure, probeTmuxControl } from "../tmux-health.js";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
if (configToml === null)
|
|
16
|
-
return { kind: "openai-login" };
|
|
17
|
-
let config;
|
|
18
|
-
try {
|
|
19
|
-
config = parseToml(configToml);
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
return { kind: "openai-login", unresolved: "config.toml could not be parsed" };
|
|
23
|
-
}
|
|
24
|
-
if (Object.hasOwn(config, "profile")) {
|
|
25
|
-
return { kind: "openai-login", unresolved: "config.toml selects a legacy profile, which is not resolved here" };
|
|
26
|
-
}
|
|
27
|
-
const providerId = config["model_provider"];
|
|
28
|
-
const providers = config["model_providers"];
|
|
29
|
-
if (typeof providerId !== "string" || !providers || typeof providers !== "object" || !Object.hasOwn(providers, providerId)) {
|
|
30
|
-
return { kind: "openai-login" };
|
|
31
|
-
}
|
|
32
|
-
const entry = providers[providerId];
|
|
33
|
-
if (!entry || typeof entry !== "object")
|
|
34
|
-
return { kind: "openai-login" };
|
|
35
|
-
const { requires_openai_auth: requiresOpenAiAuth, env_key: envKey } = entry;
|
|
36
|
-
if (requiresOpenAiAuth !== false || typeof envKey !== "string" || !/^[A-Za-z_][A-Za-z0-9_]*$/.test(envKey)) {
|
|
37
|
-
return { kind: "openai-login" };
|
|
38
|
-
}
|
|
39
|
-
return { kind: "env-key", providerId, envKey };
|
|
40
|
-
}
|
|
12
|
+
import { checkClaudeAuth, checkCodexAuth } from "../provider-auth.js";
|
|
13
|
+
// Preserve the setup module's existing selector export.
|
|
14
|
+
export { selectCodexProviderAuth } from "../provider-auth.js";
|
|
41
15
|
const DEFAULT_COMMAND_TIMEOUT_MS = 30_000;
|
|
42
16
|
const INSTALL_COMMAND_TIMEOUT_MS = 5 * 60_000;
|
|
43
|
-
const
|
|
44
|
-
const CMUX_READY_DELAY_MS = 1_000;
|
|
17
|
+
const HERDR_INSTALL_COMMAND = "curl -fsSL https://herdr.dev/install.sh | sh";
|
|
45
18
|
const CORE_STEP_IDS = [
|
|
46
19
|
"brew",
|
|
47
20
|
"tmux_install",
|
|
48
|
-
"
|
|
21
|
+
"herdr_install",
|
|
22
|
+
"ghostty_install",
|
|
49
23
|
"claude_install",
|
|
50
24
|
"claude_auth",
|
|
51
25
|
"codex_install",
|
|
@@ -55,11 +29,9 @@ const CORE_STEP_IDS = [
|
|
|
55
29
|
];
|
|
56
30
|
const FULL_EXTRA_STEP_IDS = ["jq_install", "gh_install"];
|
|
57
31
|
const BREW_PLATFORM_SKIP = "Skipped: Homebrew setup path is only used on macOS.";
|
|
58
|
-
|
|
59
|
-
/** Steps the real run skips off macOS, with the message it gives (cmux is a macOS app installed via Homebrew). */
|
|
32
|
+
/** Homebrew is only used by the macOS setup path. Herdr also installs on Linux. */
|
|
60
33
|
const NON_DARWIN_DRY_RUN_SKIPS = {
|
|
61
34
|
brew: BREW_PLATFORM_SKIP,
|
|
62
|
-
cmux_install: BREW_UNAVAILABLE_SKIP,
|
|
63
35
|
};
|
|
64
36
|
const BASE_RUNTIME_CONFIG_DISCLOSURE = [
|
|
65
37
|
// OPR.0.4.8.2 agnostic rip-out: OpenRig no longer writes ~/.claude/settings.json — the global
|
|
@@ -74,7 +46,7 @@ const BASE_RUNTIME_CONFIG_DISCLOSURE = [
|
|
|
74
46
|
scope: "project",
|
|
75
47
|
runtime: "claude-code",
|
|
76
48
|
path: ".claude/settings.local.json",
|
|
77
|
-
purpose: "Apply context-collector statusLine config and the acceptEdits floor fragment.
|
|
49
|
+
purpose: "Apply context-collector statusLine config and the acceptEdits floor fragment. The team and kernel launch defaults pass allow/ask lists per launch and save none; a selected Claude settings fragment can merge native settings, rules included; the harness-native permissions are the control surface.",
|
|
78
50
|
},
|
|
79
51
|
{
|
|
80
52
|
scope: "project",
|
|
@@ -89,12 +61,6 @@ const BASE_RUNTIME_CONFIG_DISCLOSURE = [
|
|
|
89
61
|
purpose: "Pre-trust managed workspaces and apply selected Codex config runtime-resource fragments.",
|
|
90
62
|
},
|
|
91
63
|
];
|
|
92
|
-
const DARWIN_RUNTIME_CONFIG_DISCLOSURE = {
|
|
93
|
-
scope: "global",
|
|
94
|
-
runtime: "cmux",
|
|
95
|
-
path: CMUX_SETTINGS_DISCLOSURE_PATH,
|
|
96
|
-
purpose: "Set cmux socket control to an OpenRig-compatible automation mode.",
|
|
97
|
-
};
|
|
98
64
|
export function defaultDeps() {
|
|
99
65
|
return {
|
|
100
66
|
exec: (cmd, opts) => execSync(cmd, {
|
|
@@ -116,89 +82,74 @@ export function defaultDeps() {
|
|
|
116
82
|
function installCommand(deps, cmd) {
|
|
117
83
|
return deps.exec(cmd, { timeoutMs: INSTALL_COMMAND_TIMEOUT_MS });
|
|
118
84
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
for (
|
|
85
|
+
/** Probe without starting a server or taking over the installing terminal. */
|
|
86
|
+
function findHerdrCommand(deps) {
|
|
87
|
+
const env = deps.env ?? process.env;
|
|
88
|
+
const installDir = env["HERDR_INSTALL_DIR"] ?? path.join(env["HOME"] ?? homedir(), ".local", "bin");
|
|
89
|
+
for (const command of ["herdr", shellQuote(path.join(installDir, "herdr"))]) {
|
|
124
90
|
try {
|
|
125
|
-
deps.exec(
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
catch {
|
|
129
|
-
if (index < attempts - 1) {
|
|
130
|
-
await sleep(CMUX_READY_DELAY_MS);
|
|
131
|
-
}
|
|
91
|
+
deps.exec(`${command} --version`);
|
|
92
|
+
return command;
|
|
132
93
|
}
|
|
94
|
+
catch { /* Try the installer's default path if it is not on PATH. */ }
|
|
133
95
|
}
|
|
134
|
-
return
|
|
96
|
+
return null;
|
|
135
97
|
}
|
|
136
|
-
|
|
137
|
-
if (platform !== "darwin")
|
|
138
|
-
return
|
|
139
|
-
const settingsPath = resolveCmuxSettingsPath();
|
|
140
|
-
const settingsText = deps.readFile(settingsPath);
|
|
141
|
-
const currentMode = readCmuxSocketControlModeFromText(settingsText);
|
|
142
|
-
if (currentMode.error) {
|
|
143
|
-
return false;
|
|
98
|
+
function installHerdr(deps, platform) {
|
|
99
|
+
if (platform !== "darwin" && platform !== "linux") {
|
|
100
|
+
return { id: "herdr_install", status: "skipped", message: "Automatic herdr installation is supported on macOS and Linux." };
|
|
144
101
|
}
|
|
102
|
+
let command = findHerdrCommand(deps);
|
|
103
|
+
const present = command !== null;
|
|
145
104
|
try {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
catch {
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
const shellReady = await waitForCmuxCapabilities(deps, 1);
|
|
156
|
-
if (shellReady) {
|
|
157
|
-
try {
|
|
158
|
-
deps.exec("cmux reload-config");
|
|
105
|
+
if (!command) {
|
|
106
|
+
installCommand(deps, HERDR_INSTALL_COMMAND);
|
|
107
|
+
command = findHerdrCommand(deps);
|
|
108
|
+
if (!command)
|
|
109
|
+
throw new Error("The installer returned, but the herdr binary could not be verified.");
|
|
159
110
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
deps.exec("open -a /Applications/cmux.app");
|
|
111
|
+
return {
|
|
112
|
+
id: "herdr_install",
|
|
113
|
+
status: present ? "pass" : "applied",
|
|
114
|
+
message: `${present ? "Found" : "Installed"} herdr (${command}). No terminal or view was opened.`,
|
|
115
|
+
...(command !== "herdr" ? { fixHint: `Use ${command} when opening the view, or add its directory to your shell PATH.` } : {}),
|
|
116
|
+
};
|
|
167
117
|
}
|
|
168
|
-
catch {
|
|
169
|
-
|
|
118
|
+
catch (err) {
|
|
119
|
+
return {
|
|
120
|
+
id: "herdr_install", status: "warn",
|
|
121
|
+
message: `Could not install or verify herdr: ${err.message}`,
|
|
122
|
+
reason: "The OpenRig view can use plain tmux without herdr. Existing cmux workflows remain available.",
|
|
123
|
+
fixHint: `Retry \`${HERDR_INSTALL_COMMAND}\`, or follow https://herdr.dev/docs/install/.`,
|
|
124
|
+
};
|
|
170
125
|
}
|
|
171
|
-
return waitForCmuxCapabilities(deps);
|
|
172
126
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
catch {
|
|
191
|
-
return "skipped";
|
|
192
|
-
}
|
|
127
|
+
/** The installing agent asks once; only an explicit Yes installs the optional Mac terminal. */
|
|
128
|
+
function installGhostty(deps, platform, choice) {
|
|
129
|
+
const id = "ghostty_install";
|
|
130
|
+
if (platform !== "darwin")
|
|
131
|
+
return { id, status: "skipped", message: "The Ghostty offer is for macOS; existing Linux terminals remain available." };
|
|
132
|
+
if (choice === false)
|
|
133
|
+
return { id, status: "skipped", message: "Ghostty declined (--no-ghostty). Terminal.app remains available." };
|
|
134
|
+
const home = (deps.env ?? process.env)["HOME"] ?? homedir();
|
|
135
|
+
const locations = ["/Applications/Ghostty.app", path.join(home, "Applications/Ghostty.app")];
|
|
136
|
+
if (locations.some(deps.exists))
|
|
137
|
+
return { id, status: "pass", message: "Ghostty is already installed. No terminal was opened." };
|
|
138
|
+
if (choice !== true)
|
|
139
|
+
return {
|
|
140
|
+
id, status: "skipped",
|
|
141
|
+
message: "Installing agent: ask once, 'Install Ghostty for the OpenRig view?'",
|
|
142
|
+
fixHint: "On Yes, rerun rig setup with --ghostty, preserving earlier choices such as --no-herdr. On No, use --no-ghostty; Terminal.app remains available. The person types no command.",
|
|
143
|
+
};
|
|
193
144
|
try {
|
|
194
|
-
|
|
195
|
-
if (!
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return data.available ? "available" : "unavailable";
|
|
145
|
+
installCommand(deps, "brew install --cask ghostty");
|
|
146
|
+
if (!locations.some(deps.exists))
|
|
147
|
+
throw new Error("The installer returned, but Ghostty.app was not found.");
|
|
148
|
+
return { id, status: "applied", message: "Installed Ghostty. No terminal was opened." };
|
|
199
149
|
}
|
|
200
|
-
catch {
|
|
201
|
-
return "
|
|
150
|
+
catch (err) {
|
|
151
|
+
return { id, status: "fail", message: `Could not install or verify Ghostty: ${err.message}`,
|
|
152
|
+
fixHint: "Check Homebrew and https://ghostty.org/docs/install/binary. Terminal.app remains available; no view was opened." };
|
|
202
153
|
}
|
|
203
154
|
}
|
|
204
155
|
// Slice-03 Lane B (OPR.0.4.8) onboarding RECORD path. RULING-C (b4913ed4): the v1 onboarding menu
|
|
@@ -255,7 +206,7 @@ export function recordPermissionPolicyStep(deps, choice, specPath) {
|
|
|
255
206
|
id: "policy_record",
|
|
256
207
|
status: "fail",
|
|
257
208
|
message: "No existing rig spec to record the policy into.",
|
|
258
|
-
reason: "The onboarding menu records a policy choice into an EXISTING spec only. A new install has no spec, so nothing is written —
|
|
209
|
+
reason: "The onboarding menu records a policy choice into an EXISTING spec only. A new install has no spec, so nothing is written — team seats keep the team default.",
|
|
259
210
|
fixHint: "Point --spec at an existing rig.yaml (or a directory containing one), then re-run `rig setup --policy`.",
|
|
260
211
|
};
|
|
261
212
|
}
|
|
@@ -290,12 +241,18 @@ export function recordPermissionPolicyStep(deps, choice, specPath) {
|
|
|
290
241
|
export async function runSetup(deps, opts) {
|
|
291
242
|
const profile = opts.full ? "full" : "core";
|
|
292
243
|
const platform = deps.platform ?? process.platform;
|
|
293
|
-
const runtimeConfig =
|
|
244
|
+
const runtimeConfig = [...BASE_RUNTIME_CONFIG_DISCLOSURE];
|
|
294
245
|
const stepIds = opts.full ? [...CORE_STEP_IDS, ...FULL_EXTRA_STEP_IDS] : [...CORE_STEP_IDS];
|
|
295
246
|
const steps = [];
|
|
296
247
|
if (opts.dryRun) {
|
|
297
248
|
for (const id of stepIds) {
|
|
298
|
-
const platformSkip =
|
|
249
|
+
const platformSkip = id === "herdr_install" && opts.herdr === false ? "Skipped: herdr installation declined (--no-herdr)."
|
|
250
|
+
: id === "herdr_install" && !["darwin", "linux"].includes(platform) ? "Automatic herdr installation is supported on macOS and Linux."
|
|
251
|
+
: id === "ghostty_install" ? (platform !== "darwin" ? "The Ghostty offer is for macOS."
|
|
252
|
+
: opts.ghostty === false ? "Ghostty declined (--no-ghostty)."
|
|
253
|
+
: opts.ghostty === true ? "Dry run: Ghostty installation would be attempted."
|
|
254
|
+
: "Dry run: the installing agent offers Ghostty once; only Yes installs it.")
|
|
255
|
+
: platform !== "darwin" ? NON_DARWIN_DRY_RUN_SKIPS[id] : undefined;
|
|
299
256
|
steps.push({ id, status: "skipped", message: platformSkip ?? `Dry run: ${id} would be attempted.` });
|
|
300
257
|
}
|
|
301
258
|
if (opts.policy !== undefined) {
|
|
@@ -324,7 +281,7 @@ export async function runSetup(deps, opts) {
|
|
|
324
281
|
id: "brew",
|
|
325
282
|
status: "fail",
|
|
326
283
|
message: "Homebrew not found.",
|
|
327
|
-
reason: "Homebrew is required to install tmux
|
|
284
|
+
reason: "Homebrew is required to install tmux on macOS.",
|
|
328
285
|
fixHint: "Install Homebrew: https://brew.sh",
|
|
329
286
|
});
|
|
330
287
|
}
|
|
@@ -358,129 +315,11 @@ export async function runSetup(deps, opts) {
|
|
|
358
315
|
else {
|
|
359
316
|
steps.push({ id: "tmux_install", status: "pass", message: "tmux available." });
|
|
360
317
|
}
|
|
361
|
-
// 3. cmux
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
steps.push({
|
|
367
|
-
id: "cmux_install",
|
|
368
|
-
status: "fail",
|
|
369
|
-
message: "cmux settings file is unreadable.",
|
|
370
|
-
reason: `OpenRig could not parse ${CMUX_SETTINGS_DISCLOSURE_PATH}: ${socketMode.error}`,
|
|
371
|
-
fixHint: "Repair or remove the cmux settings file, then rerun `rig setup`.",
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
else if (platform === "darwin" && !isCmuxSocketControlCompatible(socketMode.mode)) {
|
|
375
|
-
if (await tryEnableCmuxControl(deps, platform)) {
|
|
376
|
-
const daemonCmuxAfter = await probeDaemonCmuxStatus(opts.doctorDeps);
|
|
377
|
-
if (daemonCmuxAfter === "unavailable") {
|
|
378
|
-
steps.push({
|
|
379
|
-
id: "cmux_install",
|
|
380
|
-
status: "fail",
|
|
381
|
-
message: "OpenRig updated cmux settings, but the running daemon still cannot control cmux.",
|
|
382
|
-
reason: "The cmux settings file is now compatible, so the remaining blocker is in the live daemon/cmux session state.",
|
|
383
|
-
fixHint: "Restart the daemon with `rig daemon start`, then rerun `rig doctor` to confirm cmux daemon control.",
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
else {
|
|
387
|
-
steps.push({
|
|
388
|
-
id: "cmux_install",
|
|
389
|
-
status: "applied",
|
|
390
|
-
message: "Normalized cmux socket control to automation mode in ~/.config/cmux/settings.json.",
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
else {
|
|
395
|
-
steps.push({
|
|
396
|
-
id: "cmux_install",
|
|
397
|
-
status: "fail",
|
|
398
|
-
message: "cmux shell control works, but OpenRig could not normalize cmux socket control.",
|
|
399
|
-
reason: "OpenRig needs a compatible cmux socket control mode so the daemon can open CMUX surfaces reliably.",
|
|
400
|
-
fixHint: `Set automation.socketControlMode to "automation" in ${CMUX_SETTINGS_DISCLOSURE_PATH}, then rerun \`rig setup\` or \`rig doctor\`.`,
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
else if (daemonCmuxBefore === "unavailable") {
|
|
405
|
-
steps.push({
|
|
406
|
-
id: "cmux_install",
|
|
407
|
-
status: "fail",
|
|
408
|
-
message: "cmux shell control works, but the running daemon still cannot control cmux.",
|
|
409
|
-
reason: "Current cmux settings already look compatible, so the remaining blocker is outside the cmux settings file OpenRig can repair automatically.",
|
|
410
|
-
fixHint: "Run `rig doctor` for the exact daemon cmux diagnosis, then restart the daemon after clearing the underlying blocker.",
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
steps.push({ id: "cmux_install", status: "pass", message: "cmux available." });
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
try {
|
|
419
|
-
deps.exec("cmux --help");
|
|
420
|
-
if (await tryEnableCmuxControl(deps, platform)) {
|
|
421
|
-
const daemonCmuxAfter = await probeDaemonCmuxStatus(opts.doctorDeps);
|
|
422
|
-
if (daemonCmuxAfter === "unavailable") {
|
|
423
|
-
steps.push({
|
|
424
|
-
id: "cmux_install",
|
|
425
|
-
status: "fail",
|
|
426
|
-
message: "OpenRig enabled cmux socket control, but the running daemon still cannot control cmux.",
|
|
427
|
-
reason: "The cmux app and settings are now in place, so the remaining blocker is in the live daemon/cmux session state.",
|
|
428
|
-
fixHint: "Restart the daemon with `rig daemon start`, then rerun `rig doctor` to confirm cmux daemon control.",
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
steps.push({
|
|
433
|
-
id: "cmux_install",
|
|
434
|
-
status: "applied",
|
|
435
|
-
message: "Enabled cmux socket control in ~/.config/cmux/settings.json.",
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
else {
|
|
440
|
-
steps.push({
|
|
441
|
-
id: "cmux_install",
|
|
442
|
-
status: platform === "darwin" ? "fail" : "warn",
|
|
443
|
-
message: "cmux installed but control unavailable.",
|
|
444
|
-
reason: "Open CMUX workflows need cmux socket control to be enabled.",
|
|
445
|
-
fixHint: platform === "darwin"
|
|
446
|
-
? `Set automation.socketControlMode to "automation" in ${CMUX_SETTINGS_DISCLOSURE_PATH}, then rerun \`rig setup\` or \`rig doctor\`.`
|
|
447
|
-
: "Open cmux, approve any first-run prompts, and rerun `rig setup` or `rig doctor`.",
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
catch {
|
|
452
|
-
if (!brewOk) {
|
|
453
|
-
steps.push({ id: "cmux_install", status: "skipped", message: BREW_UNAVAILABLE_SKIP });
|
|
454
|
-
}
|
|
455
|
-
else {
|
|
456
|
-
try {
|
|
457
|
-
installCommand(deps, "brew install --cask cmux");
|
|
458
|
-
if (await tryEnableCmuxControl(deps, platform) || await waitForCmuxCapabilities(deps, 1)) {
|
|
459
|
-
steps.push({ id: "cmux_install", status: "applied", message: "Installed cmux with Homebrew." });
|
|
460
|
-
}
|
|
461
|
-
else {
|
|
462
|
-
steps.push({
|
|
463
|
-
id: "cmux_install",
|
|
464
|
-
status: platform === "darwin" ? "fail" : "warn",
|
|
465
|
-
message: "Installed cmux, but control is still unavailable.",
|
|
466
|
-
reason: "Open CMUX workflows need the cmux app to expose socket control after installation.",
|
|
467
|
-
fixHint: "Open cmux, approve any first-run prompts, and rerun `rig setup` or `rig doctor`.",
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
catch (err) {
|
|
472
|
-
steps.push({
|
|
473
|
-
id: "cmux_install",
|
|
474
|
-
status: "fail",
|
|
475
|
-
message: `Failed to install cmux: ${err.message}`,
|
|
476
|
-
reason: "Open CMUX workflows stay unavailable until the cmux app and CLI are installed.",
|
|
477
|
-
fixHint: "Retry `brew install --cask cmux` after connectivity stabilizes, or install cmux manually.",
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
// 4. tmux config
|
|
318
|
+
// 3. Herdr is the default view provider. Leave optional cmux installations untouched.
|
|
319
|
+
steps.push(opts.herdr === false
|
|
320
|
+
? { id: "herdr_install", status: "skipped", message: "Skipped: herdr installation declined (--no-herdr)." }
|
|
321
|
+
: installHerdr(deps, platform));
|
|
322
|
+
steps.push(installGhostty(deps, platform, opts.ghostty));
|
|
484
323
|
// 4. Claude Code runtime
|
|
485
324
|
let claudeInstalled = false;
|
|
486
325
|
try {
|
|
@@ -505,29 +344,8 @@ export async function runSetup(deps, opts) {
|
|
|
505
344
|
});
|
|
506
345
|
}
|
|
507
346
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
deps.exec("claude auth status");
|
|
511
|
-
steps.push({ id: "claude_auth", status: "pass", message: "Claude Code authentication available." });
|
|
512
|
-
}
|
|
513
|
-
catch (err) {
|
|
514
|
-
steps.push({
|
|
515
|
-
id: "claude_auth",
|
|
516
|
-
status: "fail",
|
|
517
|
-
message: `Claude Code is installed but not ready to launch: ${err.message}`,
|
|
518
|
-
reason: "Claude Code seats cannot launch until the Claude CLI is logged in and usable.",
|
|
519
|
-
fixHint: "Run `claude auth login` or open `claude` once to complete authentication, then rerun `rig setup`.",
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
else {
|
|
524
|
-
steps.push({
|
|
525
|
-
id: "claude_auth",
|
|
526
|
-
status: "skipped",
|
|
527
|
-
message: "Skipped: Claude Code is not installed.",
|
|
528
|
-
reason: "Authentication cannot be checked until the Claude Code CLI is installed.",
|
|
529
|
-
});
|
|
530
|
-
}
|
|
347
|
+
const { name: claudeName, fix: claudeFix, ...claudeAuth } = checkClaudeAuth(deps, claudeInstalled);
|
|
348
|
+
steps.push({ id: claudeName, ...claudeAuth, ...(claudeFix ? { fixHint: claudeFix } : {}) });
|
|
531
349
|
// 5. Codex runtime
|
|
532
350
|
let codexInstalled = false;
|
|
533
351
|
try {
|
|
@@ -552,52 +370,8 @@ export async function runSetup(deps, opts) {
|
|
|
552
370
|
});
|
|
553
371
|
}
|
|
554
372
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const codexAuth = selectCodexProviderAuth(deps.readFile(path.join(resolveCodexHome(env).codexHome, "config.toml")));
|
|
558
|
-
if (codexAuth.kind === "env-key") {
|
|
559
|
-
if (env[codexAuth.envKey]?.trim()) {
|
|
560
|
-
steps.push({
|
|
561
|
-
id: "codex_auth",
|
|
562
|
-
status: "pass",
|
|
563
|
-
message: `Codex provider "${codexAuth.providerId}" does not use an OpenAI login, and its credential variable ${codexAuth.envKey} is set. This confirms a local credential is available, not that the provider accepts it or that managed seats receive it.`,
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
else {
|
|
567
|
-
steps.push({
|
|
568
|
-
id: "codex_auth",
|
|
569
|
-
status: "fail",
|
|
570
|
-
message: `Codex provider "${codexAuth.providerId}" needs ${codexAuth.envKey}, which is not set in this environment.`,
|
|
571
|
-
reason: "Codex seats using this provider cannot authenticate without that variable.",
|
|
572
|
-
fixHint: `Export ${codexAuth.envKey} in the environment that runs rig setup and the OpenRig daemon, then rerun \`rig setup\`.`,
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
try {
|
|
578
|
-
deps.exec("codex login status");
|
|
579
|
-
steps.push({ id: "codex_auth", status: "pass", message: "Codex authentication available." });
|
|
580
|
-
}
|
|
581
|
-
catch (err) {
|
|
582
|
-
const unresolved = codexAuth.unresolved ? ` (${codexAuth.unresolved}, so the OpenAI login was checked)` : "";
|
|
583
|
-
steps.push({
|
|
584
|
-
id: "codex_auth",
|
|
585
|
-
status: "fail",
|
|
586
|
-
message: `Codex is installed but not ready to launch${unresolved}: ${err.message}`,
|
|
587
|
-
reason: "Codex seats cannot launch until the Codex CLI is logged in and usable.",
|
|
588
|
-
fixHint: "Run `codex login` and complete authentication, then rerun `rig setup`.",
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
else {
|
|
594
|
-
steps.push({
|
|
595
|
-
id: "codex_auth",
|
|
596
|
-
status: "skipped",
|
|
597
|
-
message: "Skipped: Codex is not installed.",
|
|
598
|
-
reason: "Authentication cannot be checked until the Codex CLI is installed.",
|
|
599
|
-
});
|
|
600
|
-
}
|
|
373
|
+
const { name: codexName, fix: codexFix, ...codexAuth } = checkCodexAuth(deps, codexInstalled);
|
|
374
|
+
steps.push({ id: codexName, ...codexAuth, ...(codexFix ? { fixHint: codexFix } : {}) });
|
|
601
375
|
// 6. tmux config
|
|
602
376
|
const TMUX_CONF = `${process.env["HOME"] ?? "~"}/.tmux.conf`;
|
|
603
377
|
const MANAGED_MARKER = "# OpenRig managed block";
|
|
@@ -662,7 +436,14 @@ export async function runSetup(deps, opts) {
|
|
|
662
436
|
let verification;
|
|
663
437
|
if (!opts.dryRun && opts.doctorDeps) {
|
|
664
438
|
const doctorDeps = opts.doctorDeps;
|
|
665
|
-
|
|
439
|
+
// Reuse the post-install facts above; do not repeat login probes during verification.
|
|
440
|
+
const providerChecks = steps
|
|
441
|
+
.filter((step) => ["claude_install", "claude_auth", "codex_install", "codex_auth"].includes(step.id))
|
|
442
|
+
.map(({ id, status, fixHint, ...check }) => ({
|
|
443
|
+
name: id, status: status === "applied" ? "pass" : status,
|
|
444
|
+
...check, ...(fixHint ? { fix: fixHint } : {}),
|
|
445
|
+
}));
|
|
446
|
+
const doctor = runDoctorChecks(doctorDeps, providerChecks);
|
|
666
447
|
const asyncResults = await Promise.all(doctor.asyncChecks);
|
|
667
448
|
const allDoctorChecks = [...doctor.checks, ...asyncResults];
|
|
668
449
|
verification = {
|
|
@@ -725,19 +506,20 @@ export function goldenPathNextSteps() {
|
|
|
725
506
|
" 3. rig status Read the kernel boot state; rig ps --nodes --rig kernel checks its seats",
|
|
726
507
|
" Started is not ready. The view may open while agents finish starting; report their actual state",
|
|
727
508
|
" For an existing kernel or blocked startup: rig context get reference/getting-started.md#incomplete-setup-and-restart",
|
|
728
|
-
" 4.
|
|
729
|
-
"
|
|
730
|
-
" rig terminal open saved:kernel --
|
|
509
|
+
" 4. Show the person OpenRig: open the OpenRig TUI and operator for them now. Say so first; it's the next step, not a question",
|
|
510
|
+
" It opens a NEW terminal tab/window, or a space in their current Herdr, and preserves this terminal",
|
|
511
|
+
" rig terminal open saved:kernel --window --json (TUI and operator, advisor on its own tab; herdr, otherwise plain tmux)",
|
|
731
512
|
" rig context get reference/getting-started.md#open-the-kernel-conversations",
|
|
732
|
-
"
|
|
513
|
+
" If they said not now: give the command to open it later. Over headless SSH: ask the person to open a new terminal/tab and give the exact connection/attach command",
|
|
514
|
+
" Herdr needs a terminal the person can see; switching the shared TUI to :terminals does not open one",
|
|
733
515
|
" No, SSH and headless use are fine background outcomes; do not report an unseen window as opened",
|
|
734
|
-
"
|
|
735
|
-
"
|
|
736
|
-
"
|
|
737
|
-
"
|
|
738
|
-
"
|
|
739
|
-
"
|
|
740
|
-
"
|
|
516
|
+
" On a desktop, no copying or typing for the person; check the result notes, not just CLI success",
|
|
517
|
+
" On a Mac, offer Ghostty once: on Yes run rig setup --ghostty; preserve earlier choices such as --no-herdr",
|
|
518
|
+
" On No use --no-ghostty; Terminal.app remains available",
|
|
519
|
+
" Setup installs herdr by default; use --no-herdr if the person declines. Plain tmux remains available",
|
|
520
|
+
" Only if the window cannot open: rig tui --shared is the dashboard-only fallback, not the operator's conversation",
|
|
521
|
+
" If opening fails, inspect any new surface before retrying; report the error and finish the local action",
|
|
522
|
+
" Do not replace a failed desktop action with commands for the person to copy or type",
|
|
741
523
|
" 5. Installing agent: ask the person's goal and project folder, then hand them to the ready operator",
|
|
742
524
|
" Find operator.agent with rig ps --nodes --rig kernel --json; use its canonicalSessionName with rig send",
|
|
743
525
|
" Send the goal and folder, or have the person type them in the operator pane; show where it answers",
|
|
@@ -765,13 +547,17 @@ export function goldenPathNextSteps() {
|
|
|
765
547
|
* skip-line phrasing, NO pre-selected default, and `Standard` carries the ⭐ recommendation marker.
|
|
766
548
|
* REGISTER RULE (pm-lead): factual + version-neutral — never "treacherous"/editorializing/
|
|
767
549
|
* founder-internal wording. Recording is a thought, never a gate — `rig up` always works bare.
|
|
550
|
+
* 0.6.7: the question, the deliberate-none line and the skip line now state the team launch default
|
|
551
|
+
* (#893) that ships with 0.6.6, matching docs/reference/getting-started.md and the
|
|
552
|
+
* applying-a-permission-policy skill. The labels, marker and register are unchanged.
|
|
768
553
|
*/
|
|
769
554
|
export function permissionPolicyMenuLines() {
|
|
770
555
|
return [
|
|
771
|
-
"Before team launch, your agent
|
|
772
|
-
"
|
|
773
|
-
"
|
|
774
|
-
"
|
|
556
|
+
"Before team launch, your agent recommends keeping the team default (reuse an existing explicit choice):",
|
|
557
|
+
" Claude team seats with no policy or explicit seat choice run ordinary rig commands, project reads and common tests without prompts; lifecycle commands such as rig up and rig down still ask.",
|
|
558
|
+
" Only if you want more, it offers once: Remember these selected OpenRig commands in your native settings for this project?",
|
|
559
|
+
" Yes / No — keep the team default. No answer leaves settings unchanged too.",
|
|
560
|
+
" A remembered allowance can cover all rig verbs, but Claude team seats still ask before lifecycle commands; not global YOLO or authority to invent work.",
|
|
775
561
|
" Personal project scope unless you explicitly choose user-wide sessions. On Yes, the agent adds native rules, preserving stricter rules.",
|
|
776
562
|
" Procedure: rig context get skills/applying-a-permission-policy/SKILL.md",
|
|
777
563
|
" Undo: ask your agent to remove only the OpenRig command allowances added by this setup.",
|
|
@@ -783,12 +569,12 @@ export function permissionPolicyMenuLines() {
|
|
|
783
569
|
" Standard ⭐ The recommended balanced built-in policy.",
|
|
784
570
|
" Open The least restrictive built-in policy.",
|
|
785
571
|
" YOLO Mode The full-bypass built-in policy.",
|
|
786
|
-
" No policy — deliberate choice (recorded)",
|
|
572
|
+
" No policy — deliberate choice (recorded): the floor, without the team allowances",
|
|
787
573
|
"",
|
|
788
|
-
" If you skip:
|
|
574
|
+
" If you skip: nothing is recorded; team seats launch with the team default unless a seat choice or named Codex profile applies",
|
|
789
575
|
"",
|
|
790
576
|
" To record a choice into an existing spec:",
|
|
791
|
-
" rig setup --policy <locked|standard|open|yolo|none> --spec <path>",
|
|
577
|
+
" rig setup --policy <locked|standard|open|yolo|auto|none> --spec <path>",
|
|
792
578
|
];
|
|
793
579
|
}
|
|
794
580
|
export function setupCommand(depsOverride) {
|
|
@@ -797,12 +583,15 @@ export function setupCommand(depsOverride) {
|
|
|
797
583
|
.option("--dry-run", "Show the plan without making changes")
|
|
798
584
|
.option("--json", "Machine-readable JSON output")
|
|
799
585
|
.option("--full", "Install broader operator workstation tools")
|
|
586
|
+
.option("--no-herdr", "Skip the default herdr installation; the OpenRig view can use plain tmux")
|
|
587
|
+
.option("--ghostty", "Install Ghostty on macOS after the person accepts the offer")
|
|
588
|
+
.option("--no-ghostty", "Decline Ghostty; Terminal.app remains available on macOS")
|
|
800
589
|
.option("--policy <name>", `Record a deliberate permission-policy choice into an existing spec (${POLICY_CHOICES.join("|")})`)
|
|
801
590
|
.option("--spec <path>", "Existing rig spec (file or directory) to record the --policy choice into")
|
|
802
591
|
.action(async (opts) => {
|
|
803
592
|
const deps = depsOverride ?? defaultDeps();
|
|
804
593
|
const doctorDeps = opts.dryRun ? undefined : buildDefaultDoctorDeps(deps);
|
|
805
|
-
const result = await runSetup(deps, { dryRun: opts.dryRun, full: opts.full, policy: opts.policy, specPath: opts.spec, doctorDeps });
|
|
594
|
+
const result = await runSetup(deps, { dryRun: opts.dryRun, full: opts.full, policy: opts.policy, specPath: opts.spec, herdr: opts.herdr, ghostty: opts.ghostty, doctorDeps });
|
|
806
595
|
if (opts.json) {
|
|
807
596
|
console.log(JSON.stringify({ ...result, nextSteps: goldenPathNextSteps() }, null, 2));
|
|
808
597
|
if (!opts.dryRun && !result.ready)
|
|
@@ -840,7 +629,7 @@ export function setupCommand(depsOverride) {
|
|
|
840
629
|
console.log(` Fix: ${step.fixHint}`);
|
|
841
630
|
}
|
|
842
631
|
console.log("Only the harnesses selected for your project need a login; an unused harness does not.");
|
|
843
|
-
console.log("Run `rig doctor`
|
|
632
|
+
console.log("Run `rig doctor` to recheck the system and provider authentication.");
|
|
844
633
|
}
|
|
845
634
|
// Keep the conversation route available even after a dry run or incomplete setup,
|
|
846
635
|
// before the optional menu so a short output read still includes the handoff.
|