@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/README.md
CHANGED
|
@@ -14,13 +14,24 @@ It's the open-source system behind my AI civilization experiments.
|
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
|
-
**Start here:** [the guided first-use path](docs/reference/getting-started.md): install,
|
|
17
|
+
**Start here:** [the guided first-use path](docs/reference/getting-started.md): install, talk to the kernel operator, then choose a team for your first useful change.
|
|
18
18
|
|
|
19
19
|
Not setting this up today? Get the next walkthrough and occasional OpenRig updates → https://openrig.dev/follow
|
|
20
20
|
|
|
21
21
|
## Install and first run
|
|
22
22
|
|
|
23
|
-
Requires Node.js 22 or 24 and tmux, on macOS or Linux. On Linux, the distribution's own Node.js can be older (Ubuntu 24.04's is 18); install a supported version with [nvm](https://github.com/nvm-sh/nvm) (`nvm install 22`) or NodeSource. On a Mac with Apple silicon, use Node.js 22 ([compatibility history](docs/releases/v0.5.15.md#known-compatibility-limitation)).
|
|
23
|
+
Requires Node.js 22 or 24 and tmux, on macOS or Linux. On Linux, the distribution's own Node.js can be older (Ubuntu 24.04's is 18); install a supported version with [nvm](https://github.com/nvm-sh/nvm) (`nvm install 22`) or NodeSource. On a Mac with Apple silicon, use Node.js 22 ([compatibility history](docs/releases/v0.5.15.md#known-compatibility-limitation)). On Windows, use WSL2, the Windows route OpenRig supports; native Windows isn't supported. OpenRig's automated tests don't run on WSL2 yet; see [one user's working setup](docs/reference/getting-started.md#wsl2-a-reported-working-setup). Launching a rig writes provider hooks and workspace trust settings. Before running the commands below, read [what OpenRig changes on your machine](#what-openrig-changes-on-your-machine) and back up the relevant files.
|
|
24
|
+
|
|
25
|
+
**One command.** This runs OpenRig's install script from the `v0.6.8` release. It checks Node.js and npm, installs the latest published `@openrig/cli` with `npm install -g`, runs the Node.js and SQLite check, then runs `rig setup --dry-run` and `rig setup`. The first line prints that plan and changes nothing:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.6.8/scripts/install.sh | sh -s -- --dry-run
|
|
29
|
+
curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.6.8/scripts/install.sh | sh
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If a provider isn't signed in yet, the last step reports `FAILED [4/4]`, and `rig setup` lists the sign-in under "Some steps need attention". If the only remaining failures are provider sign-ins, the install steps finished; sign in to each selected provider as below and continue.
|
|
33
|
+
|
|
34
|
+
**Or step by step:**
|
|
24
35
|
|
|
25
36
|
```bash
|
|
26
37
|
npm install -g @openrig/cli
|
|
@@ -31,32 +42,83 @@ To install with Bun instead, run `bun add -g @openrig/cli`. OpenRig still runs o
|
|
|
31
42
|
|
|
32
43
|
npm 11 and later can skip that postinstall script and print `npm warn install-scripts` naming `@openrig/cli`. That's expected: the CLI still works, and only the Node.js and SQLite check was skipped. To run it yourself, use `node "$(npm root -g)/@openrig/cli/scripts/check-abi.mjs"`; `rig doctor` checks the Node.js version only.
|
|
33
44
|
|
|
34
|
-
Choose the working account you already have: **Claude Code, Codex, or both**. Reuse an explicit choice; no second subscription is required. `rig setup --dry-run` previews the broader setup
|
|
45
|
+
Choose the working account you already have: **Claude Code, Codex, or both**. Reuse an explicit choice; no second subscription is required. `rig setup --dry-run` previews the broader setup; applying `rig setup` checks both harnesses and installs a missing one, plus Herdr unless declined with `--no-herdr`. On macOS, the installing agent offers Ghostty once. Setup leaves an existing cmux installation alone. It is optional for the [selected-provider path](docs/reference/getting-started.md#choose-your-providers).
|
|
46
|
+
|
|
47
|
+
A team seat with no permission policy, per-seat choice or (for Codex) named profile launches with OpenRig's [team default](docs/reference/rig-spec.md#team-launch-defaults): Claude runs ordinary `rig` commands, project reads and common tests without prompting, while lifecycle commands such as `rig up` and `rig down` still ask; Codex also gets the OpenRig workspace and its pod's state directory as writable directories. Before launching, your agent recommends keeping that default, and offers to remember selected OpenRig commands in your native settings only if you want that, at personal project scope unless you explicitly choose user-wide sessions. It is not global YOLO or permission to invent work. On Yes, the agent [adds and verifies native rules](docs/reference/getting-started.md#have-your-agent-configure-permissions); No or no answer keeps the team default and leaves settings unchanged. An existing explicit choice is reused. Say “Undo the OpenRig command allowances added by this setup” to remove only its additions.
|
|
35
48
|
|
|
36
|
-
|
|
49
|
+
If permission prompts are slowing you down, consider the
|
|
50
|
+
[workshop bundle](https://openrig.dev/rigs/workshop). It ships with broad access
|
|
51
|
+
and [non-interruptive mode](docs/reference/non-interruptive-mode.md): its agents
|
|
52
|
+
bypass permission prompts and supported harness warning dialogs. The listing
|
|
53
|
+
and before-install view explain that access before you choose it.
|
|
37
54
|
|
|
38
55
|
Check `tmux -V` and only your selected CLI/login: `claude --version` plus
|
|
39
56
|
`claude auth status`, or `codex --version` plus `codex login status`. If needed,
|
|
40
57
|
sign in once with `claude auth login` or `codex login`; do not install or log in
|
|
41
58
|
to an unused provider.
|
|
42
59
|
|
|
60
|
+
### Your agent opens OpenRig for you
|
|
61
|
+
|
|
62
|
+
After installing, your agent opens the OpenRig TUI and the operator for you. To get back to them later, ask your
|
|
63
|
+
agent for OpenRig or your agents in any words. After checking the selected login, it runs:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
rig daemon start # if stopped
|
|
67
|
+
rig terminal open saved:kernel --window
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`--window` opens a new terminal tab or window itself, or a space in your current
|
|
71
|
+
Herdr session. Below 120 measured columns,
|
|
72
|
+
the **operator** fills the first page; from 120, the dashboard and operator share
|
|
73
|
+
it equally. The advisor has a separate tab or tmux window.
|
|
74
|
+
An installing agent can run it from its shell on the daemon's
|
|
75
|
+
desktop; the person copies nothing. It uses Herdr when installed, otherwise
|
|
76
|
+
the same layout in plain tmux, and preserves existing conversations. `rig tui`
|
|
77
|
+
is the team dashboard. Installation is finished when you are talking to the
|
|
78
|
+
operator; if you choose to talk later, that handoff remains pending.
|
|
79
|
+
|
|
80
|
+
If setup stops, read the named step: missing tools and selected-provider logins
|
|
81
|
+
need their specific setup action. A harness permission rule, sandbox or automatic
|
|
82
|
+
permission decision can also block the installing agent's command. The agent
|
|
83
|
+
should name the command and reported reason, then help you resolve that specific
|
|
84
|
+
step within your chosen permissions. A permission refusal is not an OpenRig
|
|
85
|
+
installation result.
|
|
86
|
+
|
|
87
|
+
The desktop may need an Automation approval; SSH/headless sessions may have no
|
|
88
|
+
display. Herdr can show first-run panels, and an 80×24 window can cramp the view.
|
|
89
|
+
Follow [the OpenRig view checks and next steps](docs/reference/getting-started.md#what-can-interrupt-installation-and-the-openrig-view).
|
|
90
|
+
Herdr is visible only inside a terminal you can see. Changing the shared TUI to
|
|
91
|
+
`:terminals` does not open that terminal. The agent checks the visible window when
|
|
92
|
+
it has desktop access and says what it could not verify otherwise. Over headless
|
|
93
|
+
SSH, it asks you to open a new terminal window or tab and gives the exact connection
|
|
94
|
+
and attachment command for the current view. If you choose a manual attachment
|
|
95
|
+
after a failure,
|
|
96
|
+
ask the installing agent for the exact command using your current operator
|
|
97
|
+
session; run that in a new terminal window.
|
|
98
|
+
|
|
43
99
|
The kernel's operator helps you pick a first team. It asks what you want to build,
|
|
44
100
|
recommends one of three, and fits it to the providers you have.
|
|
45
101
|
|
|
46
|
-
| Team |
|
|
102
|
+
| Team | Talk to | Agents and purpose |
|
|
47
103
|
| --- | --- | --- |
|
|
48
|
-
| `starter` |
|
|
49
|
-
| `workshop` | A lead,
|
|
50
|
-
| `factory` | Seven: a lead,
|
|
104
|
+
| `starter` | `dev-build@starter` | A Claude Code builder and Codex reviewer for one bounded change |
|
|
105
|
+
| `workshop` | `orch-lead@workshop` | A lead, builder, QA and reviewer for ongoing work in one repository; a rig bundle the operator installs from its pinned listing |
|
|
106
|
+
| `factory` | `orch-lead@factory` | Seven: a lead, advisor, build, QA, design and two independent reviewers for sustained product work |
|
|
51
107
|
|
|
52
108
|
As shipped, `starter` uses both Claude Code and Codex. With only one of them, ask
|
|
53
109
|
the kernel operator to adapt it: it writes a copy of the team for your providers
|
|
54
|
-
under the same name.
|
|
110
|
+
under the same name. [The naming guide](docs/reference/topology-naming.md) explains
|
|
111
|
+
how their pods and roles grow and how to name your own team. `first-project` is
|
|
112
|
+
starter's old name and still starts it,
|
|
113
|
+
unless you already have a rig named `first-project` or `starter`: then it refuses
|
|
114
|
+
and names the `rig up <name> --existing` command that brings that rig back.
|
|
55
115
|
Show the selected runtime, configured model and command before launch; confirm the
|
|
56
116
|
account supports the model instead of silently falling back. The kernel starts
|
|
57
117
|
automatically and selects from available authenticated providers independently of
|
|
58
118
|
these teams. A missing unused provider is not a setup requirement.
|
|
59
119
|
|
|
120
|
+
To launch the starter yourself instead (the manual path, without the operator):
|
|
121
|
+
|
|
60
122
|
```bash
|
|
61
123
|
cd /path/to/your/repository
|
|
62
124
|
rig specs preview starter --kind rig
|
|
@@ -64,9 +126,7 @@ rig up starter --cwd . --plan
|
|
|
64
126
|
rig up starter --cwd .
|
|
65
127
|
```
|
|
66
128
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
The kernel provides separate operational support and the shared dashboard. To detach without stopping the dashboard, press Ctrl-b then d; `rig tui --shared` returns to that view. Plain `rig tui` opens an independent view. Closing a viewing terminal does not mean you should relaunch the team.
|
|
129
|
+
To see your agents, use `rig terminal open saved:kernel --window`. If that window cannot open, `rig tui --shared` is the named dashboard-only fallback; it does not show the operator conversation. The installing agent should resolve or explain the window failure, not finish by suggesting a command for you to type. Closing a viewing terminal does not mean you should relaunch the team.
|
|
70
130
|
|
|
71
131
|
Check project-seat readiness with `rig ps --nodes --rig starter` and resolve any authentication, trust or permission prompt before assigning work. If a seat stopped at such a prompt before its startup context arrived, `rig ps` shows the `rig seat continue <seat>` command that delivers it once the prompt is answered. Then give the builder one bounded outcome from your repository:
|
|
72
132
|
|
|
@@ -99,11 +159,11 @@ using a published package, since repository guidance can be ahead of npm.
|
|
|
99
159
|
| When | What changes and why |
|
|
100
160
|
| --- | --- |
|
|
101
161
|
| **npm installation** | Installs the CLI (`rig` and `openrig-tui`), bundled components and dependencies under your npm prefix (with Bun, under Bun's global directory). OpenRig's postinstall checks the Node.js version and that the SQLite module loads; Bun may block this script. It does not run daemon or provider setup. |
|
|
102
|
-
| **`rig setup`** | Attempts missing tools and writes an OpenRig block in `~/.tmux.conf` for mouse support and scrollback.
|
|
103
|
-
| **Daemon startup** | Creates/updates instance state under `OPENRIG_HOME` (normally `~/.openrig`), including its database and managed plugin resources. Seeds the `openrig-skills` discovery skill in `~/.claude/skills` and `~/.agents/skills`, subject to existing version ownership. With `runtime.codex.hooks_enabled` enabled (the default), writes Codex hook configuration and trust records as described below—even before a rig launches. |
|
|
104
|
-
| **Rig/seat launch and attachment** | Creates tmux sessions, supplies seat identity and daemon connection environment, and projects selected guidance, skills, plugins and runtime resources into the workspace. Managed startup pre-trusts the workspace. Claude context collection can also be provisioned for attached sessions and refreshed during monitoring. In a Git repository, newly created files under `.codex/plugins/openrig-core/` are added to the repository's Git `info/exclude` inside an `# BEGIN OpenRig generated files` block; new `AGENTS.md`, `CLAUDE.md` and `CLAUDE.local.md` files stay visible with a warning. |
|
|
162
|
+
| **`rig setup`** | Attempts missing tools and writes an OpenRig block in `~/.tmux.conf` for mouse support and scrollback. Installs herdr by default on macOS and Linux unless declined with `--no-herdr`; an unavailable herdr install is a warning. On macOS the installing agent offers Ghostty, and `--ghostty` attempts it after acceptance. Existing cmux settings are left unchanged. `--full` adds workstation tools. `--dry-run` shows setup's plan without applying it. |
|
|
163
|
+
| **Daemon startup** | Creates/updates instance state under `OPENRIG_HOME` (normally `~/.openrig`), including its database and managed plugin resources. Seeds the `openrig-skills` discovery skill, the `refocusing` skill and the person-facing `rigs` skill in `~/.claude/skills` and `~/.agents/skills`, subject to existing version ownership. With `runtime.codex.hooks_enabled` enabled (the default), writes Codex hook configuration and trust records as described below—even before a rig launches. |
|
|
164
|
+
| **Rig/seat launch and attachment** | Creates tmux sessions, supplies seat identity and daemon connection environment, and projects selected guidance, skills, plugins and runtime resources into the workspace. Managed startup pre-trusts the workspace. Claude context collection can also be provisioned for attached sessions and refreshed during monitoring. In a Git repository, newly created files under `.codex/plugins/shared:openrig-core/` (or the unqualified `.codex/plugins/openrig-core/`) are added to the repository's Git `info/exclude` inside an `# BEGIN OpenRig generated files` block; new `AGENTS.md`, `CLAUDE.md` and `CLAUDE.local.md` files stay visible with a warning. |
|
|
105
165
|
| **Bundle install** (`rig bundle install`, or `rig up` with a `.rigbundle` or GitHub link) | Writes the bundle's files into the install target: `--target`, or the current directory for `rig up` and for a GitHub link. `rig bundle install` with a local archive needs `--target`. Routes its declared skills, plugins and context packs into your libraries. A GitHub link's archive is kept under `OPENRIG_HOME/bundle-imports/`, and installs are recorded in `OPENRIG_HOME/bundle-audit.jsonl`. A bundle that carries a project creates it under `workspace.projects_root` and records it, with the rig's association, in the workspace catalog. |
|
|
106
|
-
| **Explicit permission configuration** | The built-in bootstrap does **not** add `rig` command allow rules. Agent-guided setup recommends
|
|
166
|
+
| **Explicit permission configuration** | The built-in bootstrap does **not** add `rig` command allow rules to your settings files; a team seat with no permission policy, per-seat choice or (for Codex) named profile gets the per-launch [team default](docs/reference/rig-spec.md#team-launch-defaults) instead. Agent-guided setup recommends keeping it and requires your actual answer before the agent [adds remembered rules at your chosen scope](docs/reference/getting-started.md#have-your-agent-configure-permissions). No/no answer keeps the team default and preserves settings; existing choices and stricter rules remain relevant. Broader access is separate. |
|
|
107
167
|
|
|
108
168
|
The provider files are separate from instance state. Here `~` means the daemon
|
|
109
169
|
user's home; changing `OPENRIG_HOME` alone does not isolate provider configuration.
|
|
@@ -114,7 +174,8 @@ user's home; changing `OPENRIG_HOME` alone does not isolate provider configurati
|
|
|
114
174
|
writes `HOME/.claude.json`, and also `<CLAUDE_CONFIG_DIR>/.claude.json` when the
|
|
115
175
|
daemon has that variable set. In the workspace, `.claude/settings.local.json` receives
|
|
116
176
|
the context collector's `statusLine` command and selected activity hooks;
|
|
117
|
-
|
|
177
|
+
the collector script lives under `.openrig/`, and the activity-hook relay under
|
|
178
|
+
the instance's `state/claude-activity-hooks/`. Selected settings/MCP resources can also
|
|
118
179
|
change that settings file and `.mcp.json`. The shared settings resource sets
|
|
119
180
|
`permissions.defaultMode` to `acceptEdits` and enables Exa/Context7 MCP entries;
|
|
120
181
|
selected MCP resources configure those external services. Built-in bootstrap
|
|
@@ -124,8 +185,9 @@ user's home; changing `OPENRIG_HOME` alone does not isolate provider configurati
|
|
|
124
185
|
`~/.codex/config.toml`). Startup enables hooks, adds the OpenRig activity relay
|
|
125
186
|
commands and pre-writes trust hashes for those commands. Seat startup adds
|
|
126
187
|
`trust_level = "trusted"` for the workspace; selected config resources can
|
|
127
|
-
add MCP settings.
|
|
128
|
-
|
|
188
|
+
add MCP settings. Managed launches pass `-c check_for_update_on_startup=false`,
|
|
189
|
+
which writes no config; a recognized update notice that still appears can be
|
|
190
|
+
skipped, recording the skipped version in Codex's cache; this is not an update install.
|
|
129
191
|
|
|
130
192
|
Activity relays send event type/subtype, seat/runtime identity, timestamps and
|
|
131
193
|
native session identity to the configured OpenRig daemon's `/api/activity/hooks`
|
|
@@ -148,11 +210,16 @@ answer in time, the launch is left unchanged.
|
|
|
148
210
|
Fresh Codex launches also add writable access to the workspace's `.git` and the
|
|
149
211
|
pod's shared queue-state directory with `--add-dir`; the shared root comes from
|
|
150
212
|
`OPENRIG_SHARED_DOCS_ROOT` or `~/.openrig/shared-docs`.
|
|
213
|
+
A team seat with no permission policy, per-seat choice or (for Codex) named
|
|
214
|
+
profile also gets the per-launch team default: Claude gets `--settings` allowing
|
|
215
|
+
ordinary `rig` commands, project reads and common tests, with a session-only
|
|
216
|
+
PreToolUse hook that asks before lifecycle commands, and Codex also gets the
|
|
217
|
+
OpenRig workspace root as a writable directory. Neither writes a permission file.
|
|
151
218
|
Seats of the rig named `kernel` launch with an operational default instead,
|
|
152
219
|
unless a permission policy, a per-seat choice or (for Codex) a named profile
|
|
153
|
-
applies: Claude in `acceptEdits` with a per-launch allow list for its file tools
|
|
154
|
-
and operational commands (including reads under your home folder),
|
|
155
|
-
`-s danger-full-access -a never`. Neither writes a permission file.
|
|
220
|
+
applies: Claude in `acceptEdits` with a per-launch allow list for its file tools,
|
|
221
|
+
web fetches and operational commands (including reads under your home folder),
|
|
222
|
+
and Codex with `-s danger-full-access -a never`. Neither writes a permission file.
|
|
156
223
|
YOLO is **off by default**. An explicitly selected full-bypass policy selects
|
|
157
224
|
Claude's `--dangerously-skip-permissions` or Codex's
|
|
158
225
|
`-s danger-full-access -a never`. The legacy environment-only `OPENRIG_YOLO=1`
|
|
@@ -261,7 +328,7 @@ With herdr installed and connected, open the starter's terminals together:
|
|
|
261
328
|
rig terminal open starter --provider herdr
|
|
262
329
|
```
|
|
263
330
|
|
|
264
|
-
For cmux, use `--provider cmux`. In the TUI, a rig's detail view has
|
|
331
|
+
For cmux, use `--provider cmux`. In the TUI, a rig's detail view has an `Open terminals ▸ rig <name>` link that opens a terminal view of the running seats of that rig (in a new window or tab, or the current Herdr session), laid out with herdr when installed, otherwise plain tmux; with herdr that is up to 16 seats per tab, in a workspace named after the rig. A seat it can't attach is reported as absent or degraded. The underlying sessions remain accessible through tmux. See the [terminal workspace guide](docs/reference/getting-started.md#share-the-dashboard-and-return-to-it) for setup and returning to an existing view.
|
|
265
332
|
|
|
266
333
|
## Key Concepts
|
|
267
334
|
|
|
@@ -360,7 +427,9 @@ seat, plugin, and release lifecycle actions remain agent-owned.
|
|
|
360
427
|
longer supported. Node 26 and other versions are untested. On a Mac with Apple
|
|
361
428
|
silicon, use Node.js 22: see the [compatibility history](docs/releases/v0.5.15.md#known-compatibility-limitation).
|
|
362
429
|
- tmux
|
|
363
|
-
- macOS or Linux.
|
|
430
|
+
- macOS or Linux. On Windows, use WSL2, the Windows route OpenRig supports; native
|
|
431
|
+
Windows isn't supported. OpenRig's automated tests don't run on WSL2 yet; one user's
|
|
432
|
+
working setup is in the [getting-started guide](docs/reference/getting-started.md#wsl2-a-reported-working-setup)
|
|
364
433
|
|
|
365
434
|
Optional:
|
|
366
435
|
- herdr or cmux for terminal workspaces showing the agents together
|
|
@@ -368,9 +437,9 @@ Optional:
|
|
|
368
437
|
|
|
369
438
|
## Setup and Troubleshooting
|
|
370
439
|
|
|
371
|
-
- `rig setup` attempts core machine preparation:
|
|
372
|
-
- `rig setup --full` attempts a broader operator workstation setup (jq, gh) on top of core.
|
|
373
|
-
- `rig doctor` inspects current system health and helps diagnose problems after setup. Use it when something stops working or after machine changes.
|
|
440
|
+
- `rig setup` attempts core machine preparation: it installs a missing Claude Code or Codex and writes tmux defaults. It installs Herdr by default on macOS and Linux; use `--no-herdr` if you decline it. On macOS it also installs a missing tmux with an existing Homebrew; elsewhere install tmux yourself (setup only checks it). On a Mac, the installing agent offers Ghostty once; accepting uses `rig setup --ghostty`, and declining leaves Terminal.app available. Existing cmux settings are preserved. It reports what it tried and what actually succeeded. If something fails, it gives the local agent enough context to finish the job.
|
|
441
|
+
- `rig setup --full` attempts a broader operator workstation setup (jq, gh, via Homebrew, so macOS only) on top of core.
|
|
442
|
+
- `rig doctor` inspects current system health and helps diagnose problems after setup. Use it when something stops working or after machine changes. It shares setup's local provider login checks. These do not prove provider acceptance or a working agent; also inspect `rig ps --nodes --rig <rig>`.
|
|
374
443
|
|
|
375
444
|
Both commands support `--json` for agent-driven workflows.
|
|
376
445
|
|
|
@@ -378,7 +447,7 @@ Before setup or managed launch, review [what OpenRig changes on your machine](#w
|
|
|
378
447
|
|
|
379
448
|
Already-running adopted sessions may need restart before they pick up newly written runtime config.
|
|
380
449
|
|
|
381
|
-
**For agents:** First ask which available provider(s) the user wants, reusing an explicit choice. Recommend the working account they already have and follow the selected-provider guide above. Offer core setup (`rig setup`) or the fuller workstation path (`rig setup --full`) only when they want those additional tools. Inspect the result with `--json` and use `rig doctor` to finish any remaining machine-specific issues. When OpenRig itself misbehaves, read [docs/reference/help.md](docs/reference/help.md) (installed agents can run `rig context get help`; the same text is at [openrig.dev/help/agents](https://www.openrig.dev/help/agents)): it covers the next step, known problems, and how to reach the team if you're still stuck.
|
|
450
|
+
**For agents:** First ask which available provider(s) the user wants, reusing an explicit choice. Recommend the working account they already have and follow the selected-provider guide above. Offer core setup (`rig setup`) or the fuller workstation path (`rig setup --full`) only when they want those additional tools. Inspect the result with `--json` and use `rig doctor` to finish any remaining machine-specific issues. Then start the daemon if it is stopped, open the OpenRig TUI and operator for them (say so, then run `rig terminal open saved:kernel --window --json`; no commands for the person to copy), and hand the person's goal and project folder to the kernel operator ([installing-agent handoff](docs/reference/getting-started.md#installing-agent-handoff)). Installation is finished when the person is talking to the operator; don't implement the project yourself. When OpenRig itself misbehaves, read [docs/reference/help.md](docs/reference/help.md) (installed agents can run `rig context get help`; the same text is at [openrig.dev/help/agents](https://www.openrig.dev/help/agents)): it covers the next step, known problems, and how to reach the team if you're still stuck.
|
|
382
451
|
|
|
383
452
|
## Comparison with Claude Managed Agents
|
|
384
453
|
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Session-only Claude PreToolUse helper. The launcher supplies the kernel or team
|
|
4
|
+
// lists; this file never reads or writes a person's permission settings.
|
|
5
|
+
// This is command convenience, not containment (test runners can execute code).
|
|
6
|
+
const { basename, isAbsolute } = require("node:path");
|
|
7
|
+
|
|
8
|
+
function scanQuotes(text, keepDouble = false, initial = "", arithmetic = 0) {
|
|
9
|
+
let out = "", state = initial, start = 0, arithmeticStart = 0, wordStarted = Boolean(initial);
|
|
10
|
+
const spans = [];
|
|
11
|
+
for (let i = 0; i < text.length; i++) {
|
|
12
|
+
const c = text[i];
|
|
13
|
+
if (state === "'") { if (c === "'") { state = ""; spans.push([start, i]); out += "'"; } continue; }
|
|
14
|
+
if (state === '"') {
|
|
15
|
+
if (c === "\\") { if (keepDouble) out += c + (text[i + 1] || ""); i++; continue; }
|
|
16
|
+
if (c === '"') { state = ""; spans.push([start, i]); out += '"'; continue; }
|
|
17
|
+
if (keepDouble) out += c;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (c === "\\") { out += c + (text[i + 1] || ""); i++; wordStarted = true; continue; }
|
|
21
|
+
if (c === "'" || c === '"') { state = c; start = i; out += c; wordStarted = true; continue; }
|
|
22
|
+
if (arithmetic) {
|
|
23
|
+
if (c === "(") arithmetic++;
|
|
24
|
+
if (c === ")" && --arithmetic === 0) spans.push([arithmeticStart, i]);
|
|
25
|
+
out += c;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (c === "#" && !wordStarted) {
|
|
29
|
+
const end = text.indexOf("\n", i);
|
|
30
|
+
spans.push([i, end === -1 ? text.length : end]);
|
|
31
|
+
i = end === -1 ? text.length : end - 1;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (c === "(" && text[i + 1] === "(") {
|
|
35
|
+
arithmetic = 2; arithmeticStart = i; out += "(("; i++; continue;
|
|
36
|
+
}
|
|
37
|
+
wordStarted = !/[\s;&|()<>]/.test(c);
|
|
38
|
+
out += c;
|
|
39
|
+
}
|
|
40
|
+
if (state) spans.push([start, text.length]);
|
|
41
|
+
if (arithmetic) spans.push([arithmeticStart, text.length]);
|
|
42
|
+
return { text: out, spans, state, arithmetic };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Split heredoc bodies off the command text. Quoted delimiters ('EOF', "EOF") make a literal body that never runs;
|
|
46
|
+
// an unquoted delimiter's body still expands substitutions, so it is returned for substitution checks only.
|
|
47
|
+
// Only operators outside quotes, comments and arithmetic can start a heredoc.
|
|
48
|
+
// A missing closing delimiter leaves the remaining text in place for conservative ask detection.
|
|
49
|
+
function splitHeredocs(cmd) {
|
|
50
|
+
const lines = cmd.split("\n");
|
|
51
|
+
const main = [];
|
|
52
|
+
const expanding = [];
|
|
53
|
+
// Quote state carries across lines: a double-quoted commit message can span several lines, and a `<<` after its
|
|
54
|
+
// closing quote is still an operator. Heredoc bodies are skipped, so they never change the state.
|
|
55
|
+
let carry = "", arithmetic = 0;
|
|
56
|
+
for (let i = 0; i < lines.length; i++) {
|
|
57
|
+
const line = lines[i];
|
|
58
|
+
main.push(line);
|
|
59
|
+
const scanned = scanQuotes(line, false, carry, arithmetic);
|
|
60
|
+
const { spans } = scanned;
|
|
61
|
+
carry = scanned.state;
|
|
62
|
+
arithmetic = scanned.arithmetic;
|
|
63
|
+
const found = [...line.matchAll(/(?<!<)<<(-?)(?!<)\s*(?:'([^']+)'|"([^"]+)"|\\?([A-Za-z_][A-Za-z0-9_]*))/g)]
|
|
64
|
+
.filter(m => !spans.some(([a, b]) => m.index >= a && m.index <= b));
|
|
65
|
+
let j = i;
|
|
66
|
+
for (const m of found) {
|
|
67
|
+
const delim = m[2] || m[3] || m[4];
|
|
68
|
+
const quoted = Boolean(m[2] || m[3] || m[0].includes("\\"));
|
|
69
|
+
const end = lines.findIndex((l, k) => k > j && (m[1] ? l.replace(/^\t+/, "") : l) === delim);
|
|
70
|
+
if (end === -1) continue;
|
|
71
|
+
const body = lines.slice(j + 1, end).join("\n");
|
|
72
|
+
if (!quoted) expanding.push(body);
|
|
73
|
+
j = end;
|
|
74
|
+
}
|
|
75
|
+
i = j;
|
|
76
|
+
}
|
|
77
|
+
return { main: main.join("\n"), expanding };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Bodies of $( ... ) (balanced) and `...`; the text must already have single-quoted strings removed.
|
|
81
|
+
function substitutions(text) {
|
|
82
|
+
const out = [];
|
|
83
|
+
const t = text.replace(/\\[`$]/g, "");
|
|
84
|
+
for (let i = 0; i < t.length; i++) {
|
|
85
|
+
if (t[i] === "$" && t[i + 1] === "(") {
|
|
86
|
+
let depth = 1, k = i + 2;
|
|
87
|
+
for (; k < t.length && depth; k++) { if (t[k] === "(") depth++; else if (t[k] === ")") depth--; }
|
|
88
|
+
out.push(t.slice(i + 2, depth ? k : k - 1));
|
|
89
|
+
i = k - 1;
|
|
90
|
+
} else if (t[i] === "`") {
|
|
91
|
+
const k = t.indexOf("`", i + 1);
|
|
92
|
+
if (k === -1) { out.push(t.slice(i + 1)); break; }
|
|
93
|
+
out.push(t.slice(i + 1, k));
|
|
94
|
+
i = k;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Decode literal shell words without executing anything. Keep command boundaries
|
|
101
|
+
// for lifecycle asks, but never allow an entire compound/expanding command.
|
|
102
|
+
function words(command, comments = true) {
|
|
103
|
+
const commands = [];
|
|
104
|
+
let tokens = [], word = "", started = false, literal = true, quote = "", simple = true, rawWord = "";
|
|
105
|
+
const flush = () => {
|
|
106
|
+
if (started) tokens.push({ value: word, literal, assignment: /^[A-Za-z_][A-Za-z0-9_]*=/.test(rawWord) });
|
|
107
|
+
word = ""; rawWord = ""; started = false; literal = true;
|
|
108
|
+
};
|
|
109
|
+
const boundary = () => { flush(); if (tokens.length) commands.push(tokens); tokens = []; };
|
|
110
|
+
for (let i = 0; i < command.length; i++) {
|
|
111
|
+
const c = command[i];
|
|
112
|
+
if (quote || !/\s/.test(c)) rawWord += c;
|
|
113
|
+
if (quote === "'") {
|
|
114
|
+
if (c === "'") quote = ""; else word += c;
|
|
115
|
+
} else if (c === "\\" && quote !== "'") {
|
|
116
|
+
const next = command[++i];
|
|
117
|
+
if (next === undefined) { simple = false; literal = false; break; }
|
|
118
|
+
if (next !== "\n") word += quote === '"' && !'$`"\\'.includes(next) ? "\\" + next : next;
|
|
119
|
+
started = true;
|
|
120
|
+
} else if (quote === '"') {
|
|
121
|
+
if (c === '"') quote = "";
|
|
122
|
+
else { word += c; if (c === "$" || c === "`") { literal = false; simple = false; } }
|
|
123
|
+
} else if (c === "'" || c === '"') {
|
|
124
|
+
quote = c; started = true;
|
|
125
|
+
} else if (comments && c === "#" && !started) {
|
|
126
|
+
while (i + 1 < command.length && command[i + 1] !== "\n") i++;
|
|
127
|
+
} else if (";&|\n()<>".includes(c)) {
|
|
128
|
+
boundary(); simple = false;
|
|
129
|
+
} else if (/\s/.test(c)) flush();
|
|
130
|
+
else {
|
|
131
|
+
started = true; word += c;
|
|
132
|
+
if ("$`*?[]{}~".includes(c)) { literal = false; simple = false; }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (quote) { literal = false; simple = false; }
|
|
136
|
+
boundary();
|
|
137
|
+
return { commands, simple: simple && commands.length === 1 };
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function normalize(tokens, forAllow = false) {
|
|
141
|
+
const result = [...tokens];
|
|
142
|
+
while (result.length) {
|
|
143
|
+
const first = result[0];
|
|
144
|
+
if (first.assignment) {
|
|
145
|
+
// These can change the executable or inject startup code. Ask detection
|
|
146
|
+
// still looks through them; an allowance leaves them to native checks.
|
|
147
|
+
if (forAllow && /^(?:PATH|LD_[A-Za-z0-9_]*|DYLD_[A-Za-z0-9_]*|NODE_OPTIONS|BASH_ENV|ENV)=/.test(first.value)) return [];
|
|
148
|
+
result.shift();
|
|
149
|
+
}
|
|
150
|
+
else if (first.literal && ["env", "command", "exec"].includes(basename(first.value))) {
|
|
151
|
+
if (forAllow && first.value.includes("/") && !isAbsolute(first.value)) return [];
|
|
152
|
+
// command -v/-V inspects an executable rather than wrapping its execution.
|
|
153
|
+
if (basename(first.value) === "command" && ["-v", "-V"].includes(result[1]?.value)) break;
|
|
154
|
+
result.shift();
|
|
155
|
+
if (result[0]?.value === "--") result.shift();
|
|
156
|
+
// Other wrapper options (including sudo) stay with native checks.
|
|
157
|
+
} else break;
|
|
158
|
+
}
|
|
159
|
+
if (!result[0]?.literal) return [];
|
|
160
|
+
const executable = result[0].value;
|
|
161
|
+
if (forAllow && executable.includes("/") && !isAbsolute(executable)) return [];
|
|
162
|
+
result[0] = { value: basename(executable), literal: true };
|
|
163
|
+
if (/\/(?:node_modules\/\.bin)\/(vitest|jest)$/.test(executable)) {
|
|
164
|
+
result.unshift({ value: "npx", literal: true });
|
|
165
|
+
}
|
|
166
|
+
if (result[0].value === "rig") {
|
|
167
|
+
// Host selection does not change the lifecycle being requested.
|
|
168
|
+
while (result[1]?.literal && /^--host(?:=|$)/.test(result[1].value)) {
|
|
169
|
+
if (result[1].value === "--host") {
|
|
170
|
+
if (!result[2] || (forAllow && !result[2].literal)) return [];
|
|
171
|
+
result.splice(1, 2);
|
|
172
|
+
} else result.splice(1, 1);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return result;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function prefixEnd(tokens, prefix) {
|
|
179
|
+
let i = 0;
|
|
180
|
+
for (const part of prefix) {
|
|
181
|
+
// Commander accepts separators before a subcommand, including at root.
|
|
182
|
+
// A separator AFTER the lifecycle prefix still terminates help options.
|
|
183
|
+
while (prefix[0] === "rig" && i > 0 && tokens[i]?.literal && tokens[i].value === "--") i++;
|
|
184
|
+
if (!tokens[i]?.literal || tokens[i].value !== part) return undefined;
|
|
185
|
+
i++;
|
|
186
|
+
}
|
|
187
|
+
return i;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function prefixes(rules) {
|
|
191
|
+
return rules.flatMap(rule => {
|
|
192
|
+
const match = /^Bash\((.+):\*\)$/.exec(rule);
|
|
193
|
+
return match ? [match[1].split(" ")] : [];
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function helpOnly(tokens, prefixLength) {
|
|
198
|
+
// A separator before a subcommand also makes its remaining words operands.
|
|
199
|
+
// For example, the CLI dispatches `rig -- down --help` on a rig named --help.
|
|
200
|
+
if (tokens.slice(1, prefixLength).some(t => t.value === "--")) return false;
|
|
201
|
+
const args = tokens.slice(prefixLength);
|
|
202
|
+
// A help-looking option value or text after -- is not a help invocation.
|
|
203
|
+
// Commander also accepts help before positional arguments.
|
|
204
|
+
const help = args.findIndex(t => ["--help", "-h"].includes(t.value));
|
|
205
|
+
return help !== -1 && args.every(t => t.literal)
|
|
206
|
+
&& args.slice(0, help).every(t => !t.value.startsWith("-"));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function decide(command, policy, depth = 0) {
|
|
210
|
+
if (depth > 4) return undefined;
|
|
211
|
+
const { main, expanding } = splitHeredocs(command);
|
|
212
|
+
// Substitutions in double quotes and unquoted heredocs still execute. Literal
|
|
213
|
+
// multiline strings and quoted heredocs are data, not lifecycle invocations.
|
|
214
|
+
for (const source of [scanQuotes(main, true).text, ...expanding]) {
|
|
215
|
+
for (const inner of substitutions(source)) {
|
|
216
|
+
if (decide(inner, policy, depth + 1) === "ask") return "ask";
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const parsed = words(main.trim());
|
|
220
|
+
const asks = prefixes(policy.ask);
|
|
221
|
+
const askExecutables = new Set(asks.map(prefix => prefix[0]));
|
|
222
|
+
// Retain comment text for asks too: a # inside backticks or ${...} must not
|
|
223
|
+
// hide a later command. Keep the comment-aware scan as well, so quotes in a
|
|
224
|
+
// real comment cannot swallow the following line. Allow parsing is unchanged.
|
|
225
|
+
for (const command of [...parsed.commands, ...words(main.trim(), false).commands]) {
|
|
226
|
+
// ponytail: ask conservatively at every word position rather than owning a
|
|
227
|
+
// second shell grammar for wrappers/control flow. Unquoted prose may ask;
|
|
228
|
+
// quoted messages remain single words, and literal heredoc bodies are gone.
|
|
229
|
+
for (let i = 0; i < command.length; i++) {
|
|
230
|
+
if (!command[i].literal || !askExecutables.has(basename(command[i].value))) continue;
|
|
231
|
+
const tokens = normalize(command.slice(i));
|
|
232
|
+
for (const prefix of asks) {
|
|
233
|
+
const end = prefixEnd(tokens, prefix);
|
|
234
|
+
if (end !== undefined && !helpOnly(tokens, end)) return "ask";
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const tokens = normalize(parsed.commands[0] || [], true);
|
|
239
|
+
if (!parsed.simple || tokens.some(t => !t.literal)) return undefined;
|
|
240
|
+
return prefixes(policy.allow).some(prefix => prefixEnd(tokens, prefix) !== undefined) ? "allow" : undefined;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
module.exports = { decide };
|
|
244
|
+
if (require.main === module) {
|
|
245
|
+
let raw = "";
|
|
246
|
+
process.stdin.setEncoding("utf8");
|
|
247
|
+
process.stdin.on("data", chunk => { raw += chunk; });
|
|
248
|
+
process.stdin.on("end", () => {
|
|
249
|
+
try {
|
|
250
|
+
const input = JSON.parse(raw);
|
|
251
|
+
if (input.tool_name !== "Bash" || typeof input.tool_input?.command !== "string") return;
|
|
252
|
+
const policy = JSON.parse(Buffer.from(process.argv[2], "base64").toString("utf8"));
|
|
253
|
+
const decision = decide(input.tool_input.command, policy);
|
|
254
|
+
if (decision) process.stdout.write(JSON.stringify({ hookSpecificOutput: {
|
|
255
|
+
hookEventName: "PreToolUse", permissionDecision: decision,
|
|
256
|
+
permissionDecisionReason: decision === "ask"
|
|
257
|
+
? "This rig lifecycle command needs confirmation. Use --help or -h to read its help."
|
|
258
|
+
: "This command matches the OpenRig session launch allowance.",
|
|
259
|
+
} }));
|
|
260
|
+
} catch { /* No decision: retain Claude's own permission handling. */ }
|
|
261
|
+
});
|
|
262
|
+
}
|
|
@@ -50,19 +50,26 @@ Keep the kernel for a normal install. `rig daemon start --no-kernel` is for auto
|
|
|
50
50
|
omit its startup, including the operator that helps the person start a team.
|
|
51
51
|
Read `rig status` and `rig ps --nodes --rig kernel`: started is not ready. The view may open
|
|
52
52
|
while agents finish starting; report their actual state and use the guide's existing recovery routes when needed.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Keep the queue worker off the first view and accessible through the TUI. Reuse
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
`
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
Right after OpenRig is installed or started, and whenever the person wants to see their agents or OpenRig again,
|
|
54
|
+
open the OpenRig TUI and operator for them: say so, then run `rig terminal open saved:kernel --window --json` on the
|
|
55
|
+
daemon's desktop. Don't wait for particular words. The command opens a new terminal tab/window using
|
|
56
|
+
installed herdr, otherwise plain tmux; inside Herdr it opens a space there. It preserves existing conversations. The default view
|
|
57
|
+
needs no YAML edit. Below 120 measured columns (or unknown width), show the operator alone first; from 120,
|
|
58
|
+
show dashboard and operator equally side by side. The advisor always has a separate tab or tmux window.
|
|
59
|
+
This applies to Claude-only, Codex-only and mixed kernels.
|
|
60
|
+
Keep the queue worker off the first view and accessible through the TUI. Reuse existing conversations and accounts.
|
|
61
|
+
Inspect the result and visible content using authorized desktop tools, or report that visibility is unconfirmed.
|
|
62
|
+
Herdr is visible only inside a terminal the person can see. Creating a workspace or switching the shared TUI
|
|
63
|
+
to `:terminals` does not open that terminal. A window request or CLI success alone is not visual proof. On a
|
|
64
|
+
desktop, do not finish by showing a table or suggesting a command instead of opening the requested view.
|
|
65
|
+
Only if the window cannot open, `rig tui --shared` is the named dashboard-only fallback, not the operator's
|
|
66
|
+
conversation. Explain the failure and help with the chosen fallback; do not attach in your own terminal.
|
|
67
|
+
Over headless SSH, explain that no visible terminal opened; tell the person to open a new terminal window or
|
|
68
|
+
tab and give one complete connection and attachment command using the current Herdr endpoint, as in the guide.
|
|
69
|
+
No, SSH and headless use are valid background outcomes. If the person chooses a manual operator attachment after
|
|
70
|
+
a failure, find the `operator.agent` row with `rig ps --nodes --rig kernel --json`. Give the exact
|
|
71
|
+
`env -u TMUX tmux attach-session -t '=<canonicalSessionName>'` with the observed name filled in for a new terminal
|
|
72
|
+
on the same host and user (over SSH, connect there first). Ctrl-b, then d detaches without stopping it.
|
|
66
73
|
Ask the person's goal and project folder, then hand them to the ready operator; do not implement the project yourself.
|
|
67
74
|
Find the `operator.agent` row with `rig ps --nodes --rig kernel --json` and use its `canonicalSessionName` with
|
|
68
75
|
`rig send <canonicalSessionName> 'This is the agent that installed OpenRig. The person will answer in your pane. Goal: <goal>. Project folder: <absolute path>.'`,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fs = require("node:fs");
|
|
3
|
+
const path = require("node:path");
|
|
4
|
+
const crypto = require("node:crypto");
|
|
5
|
+
const { spawnSync } = require("node:child_process");
|
|
6
|
+
|
|
7
|
+
// One issue per failure episode, after three unsuccessful attempts. Retrying an
|
|
8
|
+
// uncertain stream write uses the same id; a successful delivery starts afresh.
|
|
9
|
+
function recordRefocusResult({ home, seat, identity, failed }) {
|
|
10
|
+
if (!seat || !identity) return;
|
|
11
|
+
const key = crypto.createHash("sha256").update(JSON.stringify([seat, identity])).digest("hex");
|
|
12
|
+
const file = path.join(home, "refocus", `${key}.health.json`);
|
|
13
|
+
try {
|
|
14
|
+
let state;
|
|
15
|
+
try { state = JSON.parse(fs.readFileSync(file, "utf8")); } catch { state = {}; }
|
|
16
|
+
if (!failed && !state.failures) return;
|
|
17
|
+
state = failed
|
|
18
|
+
? { ...state, failures: Number(state.failures || 0) + 1, issueId: state.issueId || `refocus-${crypto.randomUUID()}` }
|
|
19
|
+
: { failures: 0 };
|
|
20
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
21
|
+
// Persist the id before contacting the daemon, including timeout/unknown outcomes.
|
|
22
|
+
fs.writeFileSync(file, JSON.stringify(state), { mode: 0o600 });
|
|
23
|
+
if (state.failures < 3 || state.reportedAt) return;
|
|
24
|
+
const result = spawnSync("rig", [
|
|
25
|
+
"stream", "emit", "--source", seat, "--id", state.issueId,
|
|
26
|
+
"--hint-type", "issue", "--hint-tags", "issue,refocus",
|
|
27
|
+
"--body", `Refocus failed on ${state.failures} consecutive attempts for ${seat}. Orientation remains unverified; inspect this seat's refocus hook diagnostics.`,
|
|
28
|
+
"--json",
|
|
29
|
+
], { encoding: "utf8", timeout: Math.max(1, Math.min(1_500, 4_500 - Math.floor(process.uptime() * 1_000))), maxBuffer: 64 * 1024, env: process.env });
|
|
30
|
+
if (!result.error && result.status === 0) {
|
|
31
|
+
state.reportedAt = new Date().toISOString();
|
|
32
|
+
fs.writeFileSync(file, JSON.stringify(state), { mode: 0o600 });
|
|
33
|
+
} else {
|
|
34
|
+
process.stderr.write("refocus: issue-stream report unconfirmed; retained for the next failed attempt\n");
|
|
35
|
+
}
|
|
36
|
+
} catch (error) {
|
|
37
|
+
process.stderr.write(`refocus: failure accounting unavailable: ${error.message}\n`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = { recordRefocusResult };
|