@openrig/cli 0.3.1 → 0.3.3-rc.0
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/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +8 -8
- package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux-transport.js +51 -9
- package/daemon/dist/adapters/cmux-transport.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +34 -5
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +68 -1
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +141 -2
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts +5 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts.map +1 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.js +5 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.js.map +1 -1
- package/daemon/dist/db/migrations/041_rig_policy.d.ts +32 -0
- package/daemon/dist/db/migrations/041_rig_policy.d.ts.map +1 -0
- package/daemon/dist/db/migrations/041_rig_policy.js +47 -0
- package/daemon/dist/db/migrations/041_rig_policy.js.map +1 -0
- package/daemon/dist/db/migrations/042_rig_archive.d.ts +16 -0
- package/daemon/dist/db/migrations/042_rig_archive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/042_rig_archive.js +21 -0
- package/daemon/dist/db/migrations/042_rig_archive.js.map +1 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.js +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.js +2 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +27 -0
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +86 -6
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/bundle-agent-images-router.d.ts +95 -0
- package/daemon/dist/domain/bundle-agent-images-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-agent-images-router.js +140 -0
- package/daemon/dist/domain/bundle-agent-images-router.js.map +1 -0
- package/daemon/dist/domain/bundle-assembler.d.ts +18 -1
- package/daemon/dist/domain/bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-assembler.js +11 -1
- package/daemon/dist/domain/bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/bundle-audit.d.ts +89 -0
- package/daemon/dist/domain/bundle-audit.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-audit.js +87 -0
- package/daemon/dist/domain/bundle-audit.js.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.d.ts +57 -0
- package/daemon/dist/domain/bundle-conflict-detector.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.js +49 -0
- package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts +100 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.js +158 -0
- package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -0
- package/daemon/dist/domain/bundle-plugins-router.d.ts +69 -0
- package/daemon/dist/domain/bundle-plugins-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-plugins-router.js +87 -0
- package/daemon/dist/domain/bundle-plugins-router.js.map +1 -0
- package/daemon/dist/domain/bundle-skills-router.d.ts +62 -0
- package/daemon/dist/domain/bundle-skills-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-skills-router.js +90 -0
- package/daemon/dist/domain/bundle-skills-router.js.map +1 -0
- package/daemon/dist/domain/bundle-types.d.ts +106 -0
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-types.js +375 -0
- package/daemon/dist/domain/bundle-types.js.map +1 -1
- package/daemon/dist/domain/bundle-workflow-specs-router.d.ts +94 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.js +144 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts +5 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +28 -15
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/graph-projection.d.ts +6 -0
- package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
- package/daemon/dist/domain/graph-projection.js +6 -0
- package/daemon/dist/domain/graph-projection.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +7 -7
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +18 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +98 -0
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +12 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +25 -1
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +16 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +11 -1
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +10 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +4 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +28 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +67 -1
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +37 -1
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +99 -2
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +4 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +16 -7
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.d.ts +1 -1
- package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +12 -10
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts +48 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.js +96 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts +46 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.js +171 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts +145 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.js +52 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts +58 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.js +211 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.js.map +1 -0
- package/daemon/dist/domain/rig-repository.d.ts +28 -2
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +40 -3
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +177 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +414 -55
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +19 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +30 -12
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts +1 -0
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +4 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +79 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-activity-service.js +123 -0
- package/daemon/dist/domain/seat-activity-service.js.map +1 -0
- package/daemon/dist/domain/session-transport.d.ts +15 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +8 -3
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +12 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +23 -0
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-service.js +19 -0
- package/daemon/dist/domain/spec-library-service.js.map +1 -1
- package/daemon/dist/domain/topology-converge.d.ts +97 -0
- package/daemon/dist/domain/topology-converge.d.ts.map +1 -0
- package/daemon/dist/domain/topology-converge.js +70 -0
- package/daemon/dist/domain/topology-converge.js.map +1 -0
- package/daemon/dist/domain/types.d.ts +85 -3
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +8 -0
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +1 -0
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +9 -1
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +41 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +63 -0
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +7 -0
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +156 -3
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.d.ts +197 -0
- package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/workspace-doctor.js +448 -0
- package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +11 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +966 -7
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/config.d.ts.map +1 -1
- package/daemon/dist/routes/config.js +19 -2
- package/daemon/dist/routes/config.js.map +1 -1
- package/daemon/dist/routes/info.d.ts +3 -0
- package/daemon/dist/routes/info.d.ts.map +1 -0
- package/daemon/dist/routes/info.js +20 -0
- package/daemon/dist/routes/info.js.map +1 -0
- package/daemon/dist/routes/ps.js +4 -1
- package/daemon/dist/routes/ps.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +18 -0
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +97 -5
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rig-policy.d.ts +9 -0
- package/daemon/dist/routes/rig-policy.d.ts.map +1 -0
- package/daemon/dist/routes/rig-policy.js +174 -0
- package/daemon/dist/routes/rig-policy.js.map +1 -0
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +134 -4
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +26 -3
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/up.d.ts +25 -0
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +70 -3
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/workspace.d.ts.map +1 -1
- package/daemon/dist/routes/workspace.js +80 -1
- package/daemon/dist/routes/workspace.js.map +1 -1
- package/daemon/dist/server.d.ts +10 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +11 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +46 -4
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/getting-started.md +69 -0
- package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +28 -4
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +361 -15
- package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +2 -2
- package/daemon/specs/rigs/launch/conveyor/rig.yaml +1 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +13 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/add.d.ts +4 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +115 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/archive.d.ts +10 -0
- package/dist/commands/archive.d.ts.map +1 -0
- package/dist/commands/archive.js +68 -0
- package/dist/commands/archive.js.map +1 -0
- package/dist/commands/bootstrap.js +2 -2
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +123 -2
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/config-init-workspace.d.ts.map +1 -1
- package/dist/commands/config-init-workspace.js +40 -5
- package/dist/commands/config-init-workspace.js.map +1 -1
- package/dist/commands/discover.js +2 -2
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/down.d.ts +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +91 -3
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +72 -10
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +6 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +103 -5
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/rig-policy.d.ts +48 -0
- package/dist/commands/rig-policy.d.ts.map +1 -0
- package/dist/commands/rig-policy.js +429 -0
- package/dist/commands/rig-policy.js.map +1 -0
- package/dist/commands/scope.d.ts +6 -0
- package/dist/commands/scope.d.ts.map +1 -0
- package/dist/commands/scope.js +659 -0
- package/dist/commands/scope.js.map +1 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +11 -0
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +7 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +28 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +35 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/unarchive.d.ts +10 -0
- package/dist/commands/unarchive.d.ts.map +1 -0
- package/dist/commands/unarchive.js +53 -0
- package/dist/commands/unarchive.js.map +1 -0
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +97 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +4 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow.d.ts +9 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +141 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/commands/workspace.d.ts +20 -0
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +140 -10
- package/dist/commands/workspace.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +48 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +57 -2
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/scope/dot-id.d.ts +43 -0
- package/dist/lib/scope/dot-id.d.ts.map +1 -0
- package/dist/lib/scope/dot-id.js +165 -0
- package/dist/lib/scope/dot-id.js.map +1 -0
- package/dist/lib/scope/scope-fs.d.ts +79 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -0
- package/dist/lib/scope/scope-fs.js +468 -0
- package/dist/lib/scope/scope-fs.js.map +1 -0
- package/dist/lib/scope/templates.d.ts +38 -0
- package/dist/lib/scope/templates.d.ts.map +1 -0
- package/dist/lib/scope/templates.js +109 -0
- package/dist/lib/scope/templates.js.map +1 -0
- package/dist/lib/scope/types.d.ts +61 -0
- package/dist/lib/scope/types.d.ts.map +1 -0
- package/dist/lib/scope/types.js +38 -0
- package/dist/lib/scope/types.js.map +1 -0
- package/dist/lib/scope-templates/backlog-deprecation.md +26 -0
- package/dist/lib/scope-templates/backlog-tech-debt.md +22 -0
- package/dist/lib/scope-templates/bug-fix.md +30 -0
- package/dist/lib/scope-templates/mission-notes.md +97 -0
- package/dist/lib/scope-templates/mission-placeholder.md +20 -0
- package/dist/lib/scope-templates/mission-release.md +25 -0
- package/dist/lib/scope-templates/placeholder.md +30 -0
- package/dist/lib/scope-templates/release-feature.md +26 -0
- package/dist/lib/scope-templates/research.md +22 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +29 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/release-surface/affected-skills.d.ts +49 -0
- package/dist/release-surface/affected-skills.d.ts.map +1 -0
- package/dist/release-surface/affected-skills.js +153 -0
- package/dist/release-surface/affected-skills.js.map +1 -0
- package/dist/release-surface/extract-surface.d.ts +23 -0
- package/dist/release-surface/extract-surface.d.ts.map +1 -0
- package/dist/release-surface/extract-surface.js +193 -0
- package/dist/release-surface/extract-surface.js.map +1 -0
- package/dist/release-surface/generate.d.ts +2 -0
- package/dist/release-surface/generate.d.ts.map +1 -0
- package/dist/release-surface/generate.js +51 -0
- package/dist/release-surface/generate.js.map +1 -0
- package/dist/release-surface/surface-diff.d.ts +40 -0
- package/dist/release-surface/surface-diff.d.ts.map +1 -0
- package/dist/release-surface/surface-diff.js +212 -0
- package/dist/release-surface/surface-diff.js.map +1 -0
- package/package.json +2 -2
- package/ui/dist/assets/index-CrJgCmkX.js +552 -0
- package/ui/dist/index.html +1 -1
- package/ui/dist/assets/index-Rl3ZBrUg.js +0 -547
|
@@ -12,22 +12,121 @@ This is not the config-layer or builder guide. Use the substrate control-plane g
|
|
|
12
12
|
and experimental overlays. Use the OpenRig builder guidance when changing OpenRig behavior,
|
|
13
13
|
doctrine, or release posture.
|
|
14
14
|
|
|
15
|
+
## Coordination primitives — when to use which
|
|
16
|
+
|
|
17
|
+
Three coordination surfaces, used together for forward-momentum work. Internalize this
|
|
18
|
+
on first read — it shapes every turn you take in a rig.
|
|
19
|
+
|
|
20
|
+
### `rig send <seat> "<text>"` — intra-pod direct messaging / nudges
|
|
21
|
+
|
|
22
|
+
Use when you need to ask a quick question or give a teammate context that does not
|
|
23
|
+
carry handoff semantics. **NOT for durable work.** NOT for state that must survive
|
|
24
|
+
across turns. The message lands in the target's pane; there is no durable queue
|
|
25
|
+
record. The CLI prints `Sent to ...` (and `Verified: yes/no` with `--verify`); read
|
|
26
|
+
the receipt and move on.
|
|
27
|
+
|
|
28
|
+
Example:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
rig send velocity-guard@openrig-velocity "Heads up — filing per-commit handoff on slice-22 Bug 1 BONUS at tip 6b8673b6." --verify
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### `rig queue create --source <X> --destination <Y> --tags <...> --body "<...>"` — durable work item
|
|
35
|
+
|
|
36
|
+
Use for any substantive work that must not fall through chat — slice handoffs,
|
|
37
|
+
guard verdicts, QA results, full-tip reviews, multi-item batches. Survives agent
|
|
38
|
+
restarts. Tracked in the daemon SQLite schema. Surfaces in Project / queue views
|
|
39
|
+
+ in the destination seat's inbox. Tag with mission / slice / gate / checkpoint
|
|
40
|
+
so future-you (and any peer) can find it.
|
|
41
|
+
|
|
42
|
+
Body discipline: substantive bodies go through a temp-file pattern, not inline
|
|
43
|
+
`--body` with raw backticks — `rig queue create` body parsing breaks on
|
|
44
|
+
unescaped backticks and rejects flag-like tokens.
|
|
45
|
+
|
|
46
|
+
Example:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
rig queue create \
|
|
50
|
+
--source redo-driver-2@openrig-velocity \
|
|
51
|
+
--destination redo-guard-2@openrig-velocity \
|
|
52
|
+
--tags "mission:release-0.3.2,slice:22-rig-up-paper-cut-fix-round,gate:guard,handoff:per-commit,checkpoint:bug-1-bonus" \
|
|
53
|
+
--body "$(cat /tmp/per-commit-body.txt)"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `rig queue handoff <qitem-id> --to <next> ...` — hot-potato handoff
|
|
57
|
+
|
|
58
|
+
Use when you have completed your turn on a qitem and the work moves to the next
|
|
59
|
+
owner. **This is forward momentum.** The ball passes to the destination seat;
|
|
60
|
+
chain-of-record (the prior qitem id) is preserved so the verdict trail is intact;
|
|
61
|
+
tags carry the phase boundary forward (e.g. `gate:guard` → `gate:qa`).
|
|
62
|
+
|
|
63
|
+
Example:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
rig queue handoff qitem-20260601012431-d78aa805 \
|
|
67
|
+
--to velocity-qa@openrig-velocity \
|
|
68
|
+
--tags "mission:release-0.3.2,slice:22-rig-up-paper-cut-fix-round,gate:qa,handoff:adversarial-dogfood"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### §1b doctrine — turn ends by passing the ball
|
|
72
|
+
|
|
73
|
+
**A turn ends by passing the ball, never by going idle holding the slice waiting
|
|
74
|
+
on a confirmation the process does not include.** If the work was authorized, the
|
|
75
|
+
per-commit guard + adversarial QA + orch heavy-verify are the guardrails — not an
|
|
76
|
+
operator pre-commit gate. Do the authorized work and pass the ball.
|
|
77
|
+
|
|
78
|
+
Valid pauses are only:
|
|
79
|
+
|
|
80
|
+
- A genuine blocker — file a blocked-state qitem against the blocking peer or
|
|
81
|
+
surface explicitly to orch.
|
|
82
|
+
- A scope-or-architecture question that requires owner input and changes the
|
|
83
|
+
plan — surface to orch with the specific decision needed.
|
|
84
|
+
|
|
85
|
+
Implementing already-authorized work is neither of these. Proceed without
|
|
86
|
+
phantom-gating on an imagined "next prompt" or "operator confirmation" that the
|
|
87
|
+
process does not require.
|
|
88
|
+
|
|
89
|
+
### Anti-patterns
|
|
90
|
+
|
|
91
|
+
- Using `rig send` for durable work → use `rig queue create` instead. Sends do
|
|
92
|
+
not survive restarts and do not show up in queue/project views.
|
|
93
|
+
- Idle-holding a slice for an imagined "next prompt" or "operator confirmation"
|
|
94
|
+
that the process does not require → pass the ball via `rig queue handoff` and
|
|
95
|
+
proceed to the next slice or stand by for the inbound verdict. See the §1b
|
|
96
|
+
doctrine above.
|
|
97
|
+
- Hand-coding `rigx queue` for new work → `rig queue` is the daemon-backed
|
|
98
|
+
canonical surface since the 2026-05-11 host-CLI fix. `rigx queue` is a
|
|
99
|
+
recovery-only fallback; qitems written via `rigx queue` are invisible to
|
|
100
|
+
daemon-backed reads and break fleet-wide routing discipline.
|
|
101
|
+
- Inlining a multi-line / backtick-heavy body into `rig queue create --body`
|
|
102
|
+
→ write the body to `/tmp/<descriptive-name>.txt` first, then
|
|
103
|
+
`--body "$(cat /tmp/<file>.txt)"`. The body parser does not tolerate raw
|
|
104
|
+
backticks or flag-like tokens inline.
|
|
105
|
+
|
|
15
106
|
## Runtime-Gated Coordination Primitives
|
|
16
107
|
|
|
17
|
-
OpenRig v0.
|
|
18
|
-
`
|
|
19
|
-
/ `
|
|
108
|
+
OpenRig v0.3.1 is published publicly as `@openrig/cli@0.3.1` and GitHub Release
|
|
109
|
+
`v0.3.1`. It includes the bundled PL-004 Coordination Primitive System: Phase A
|
|
110
|
+
`rig stream` / `rig queue`, Phase B `rig project` / `rig view`, Phase C
|
|
111
|
+
`rig watchdog`, and Phase D `rig workflow` / `workflow-keepalive`.
|
|
20
112
|
|
|
21
|
-
|
|
22
|
-
|
|
113
|
+
These are shipped product surfaces in v0.3.x, but they require a compatible
|
|
114
|
+
v0.3.x daemon and matching SQLite schema at runtime — the installed package
|
|
115
|
+
version is not automatically the version of the daemon serving you. If a
|
|
116
|
+
coordination command behaves unexpectedly, confirm the running daemon with
|
|
117
|
+
`rig whoami --json` and daemon status before assuming a product bug.
|
|
23
118
|
|
|
24
119
|
Default posture:
|
|
25
120
|
|
|
26
121
|
- Treat daemon `rig queue`, `rig stream`, `rig project`, `rig view`, `rig watchdog`, and
|
|
27
122
|
`rig workflow` as the product coordination surfaces when the active daemon is v0.2.0 or newer.
|
|
28
|
-
- **CANONICAL SURFACE NOTE (2026-05-11)**: `rig queue` (daemon-backed SQLite)
|
|
29
|
-
canonical
|
|
30
|
-
|
|
123
|
+
- **CANONICAL SURFACE NOTE (2026-05-11)**: `rig queue` (daemon-backed SQLite) became
|
|
124
|
+
the canonical queue-routing surface when the 2026-05-11 host-CLI fix landed. The
|
|
125
|
+
coordination model is now load-bearing at the top of this skill — see
|
|
126
|
+
"Coordination primitives — when to use which" above for the send / queue /
|
|
127
|
+
queue-handoff usage model and the §1b doctrine. Auxiliary queue verbs:
|
|
128
|
+
`rig queue update / show / list` complement `rig queue create / handoff`
|
|
129
|
+
for in-flight inspection and state mutation.
|
|
31
130
|
- Use temporary substrate overlays such as `rigx queue`, `rigx stream`, `rigx project`, and
|
|
32
131
|
`rigx view-proto` only where the current OpenRig workstream explicitly says that legacy/control
|
|
33
132
|
layer is still in use. For queue specifically, `rigx queue` is recovery-only fallback;
|
|
@@ -38,6 +137,186 @@ Default posture:
|
|
|
38
137
|
- Do not perform daemon stop/start, production DB copy/mutation, release, publish, or other
|
|
39
138
|
consequence-boundary actions unless the operator/workstream has granted that specific gate.
|
|
40
139
|
|
|
140
|
+
## First-user workspace setup
|
|
141
|
+
|
|
142
|
+
When booting into a rig on a host where the workspace is unset, gap-ridden, or
|
|
143
|
+
points at a stale layout, address that before substantive project work. The
|
|
144
|
+
shipped surface is small + bounded — reach for the canonical commands rather
|
|
145
|
+
than improvising.
|
|
146
|
+
|
|
147
|
+
### Detect workspace state at boot
|
|
148
|
+
|
|
149
|
+
Agent-actionable when the daemon is reachable.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
rig workspace validate --json
|
|
153
|
+
rig workspace validate <path> --kind <user|project|knowledge|lab|delivery> --json
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`rig workspace validate` walks the workspace root and emits a structured
|
|
157
|
+
frontmatter-gap report against the v0 contract. Exit code is non-zero when
|
|
158
|
+
gaps exist (operators chain into hygiene fix loops). Default root is the
|
|
159
|
+
current directory; pass a positional path to validate elsewhere. `--kind`
|
|
160
|
+
scopes the contract to a specific workspace kind; omit for a kind-agnostic
|
|
161
|
+
structural check.
|
|
162
|
+
|
|
163
|
+
If `rig workspace validate` reports a non-zero `gapCount` OR the workspace
|
|
164
|
+
root is unset / unwritable, the workspace needs instantiation — see the next
|
|
165
|
+
section.
|
|
166
|
+
|
|
167
|
+
### Instantiate the canonical workspace scaffold
|
|
168
|
+
|
|
169
|
+
Agent-actionable. Idempotent on existing dirs without `--force`.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
rig config init-workspace
|
|
173
|
+
rig config init-workspace --root <path>
|
|
174
|
+
rig config init-workspace --dry-run --json
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
`rig config init-workspace` scaffolds the canonical workspace layout at the
|
|
178
|
+
configured `workspace.root` (default `~/.openrig/workspace`):
|
|
179
|
+
|
|
180
|
+
- `missions/` — release missions + slices
|
|
181
|
+
- `artifacts/` — work artifacts produced inside the workspace
|
|
182
|
+
- `evidence/` — non-dogfood evidence (release evidence, proof packets, etc.)
|
|
183
|
+
- `progress/` — progress index + per-mission rails
|
|
184
|
+
- `field-notes/` — operator + agent observations
|
|
185
|
+
- `specs/` — spec library (rig + agent + workflow YAML lives here)
|
|
186
|
+
- `dogfood-evidence/` — dogfood proof packets + run artifacts
|
|
187
|
+
|
|
188
|
+
The scaffold seeds one example mission (`getting-started`) with multiple
|
|
189
|
+
slices, and drops a workspace README.md + STEERING.md so a fresh install has
|
|
190
|
+
browsable Project content. `--root <path>` targets a non-default root for
|
|
191
|
+
this call; `--dry-run` reports what would be created without writing.
|
|
192
|
+
`--force` overwrites existing FILES but never deletes
|
|
193
|
+
directories — operator content is safe.
|
|
194
|
+
|
|
195
|
+
### Redirect the workspace root
|
|
196
|
+
|
|
197
|
+
Operator-gated when persistent. Agent-actionable when one-shot via env-var.
|
|
198
|
+
|
|
199
|
+
For a single command:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
OPENRIG_WORKSPACE_ROOT=<path> rig <command> ...
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
For a persistent host-level redirect, the operator changes the config file or
|
|
206
|
+
runs the setter:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
rig config set workspace.root <path>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
ConfigStore precedence: `OPENRIG_WORKSPACE_ROOT` env > config-file
|
|
213
|
+
`workspace.root` > built-in default `~/.openrig/workspace`. The same
|
|
214
|
+
precedence governs `OPENRIG_WORKSPACE_SPECS_ROOT` → `workspace.specs_root`
|
|
215
|
+
(default `<workspace_root>/specs`).
|
|
216
|
+
|
|
217
|
+
Prefer the env-var form for one-shot redirects (transparent to operators);
|
|
218
|
+
reserve `rig config set` for changes the operator owns.
|
|
219
|
+
|
|
220
|
+
### Build a workspace from scratch
|
|
221
|
+
|
|
222
|
+
Agent-actionable. Same surface as the canonical scaffold above; the
|
|
223
|
+
`workspace.root` cascade handles non-existent host paths.
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
rig config init-workspace --root /path/to/new/workspace
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The command creates the root dir if missing (idempotent: existing root +
|
|
230
|
+
populated subdirs is a no-op). Run
|
|
231
|
+
`rig workspace validate /path/to/new/workspace --json` after to confirm the
|
|
232
|
+
contract holds.
|
|
233
|
+
|
|
234
|
+
### Create a workflow inside an existing workspace
|
|
235
|
+
|
|
236
|
+
Authoring is operator-or-agent; validation + instantiation are
|
|
237
|
+
agent-actionable.
|
|
238
|
+
|
|
239
|
+
Workflow spec files live at:
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
<workspace_root>/specs/workflows/<name>.yaml
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`<workspace_root>` resolves via the ConfigStore precedence named above.
|
|
246
|
+
There is no `rig workflow create` verb in v0.3.x — the spec YAML is authored
|
|
247
|
+
directly. Template by hand from the documented schema, or copy a built-in
|
|
248
|
+
starter from `<openrig install>/dist/builtins/workflow-specs/` and adapt.
|
|
249
|
+
Once written:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
rig workflow validate <workspace_root>/specs/workflows/<name>.yaml --json
|
|
253
|
+
|
|
254
|
+
rig workflow instantiate <workspace_root>/specs/workflows/<name>.yaml \
|
|
255
|
+
--root-objective "<one-line objective for the run>" \
|
|
256
|
+
--created-by <your-session>@<your-rig> \
|
|
257
|
+
--json
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Both `--root-objective <text>` and `--created-by <session>` are REQUIRED
|
|
261
|
+
on `instantiate` — omitting either yields a Commander required-option
|
|
262
|
+
error before the daemon is contacted. `--entry-owner <session>` is an
|
|
263
|
+
optional override for the entry-step owner; default routing is per the
|
|
264
|
+
workflow spec.
|
|
265
|
+
|
|
266
|
+
`validate` returns a structured ok/error report; `instantiate` creates a
|
|
267
|
+
workflow instance + entry-step qitem. Inspect existing surface state with:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
rig workflow specs --json # list registered specs (built-in + operator-authored)
|
|
271
|
+
rig workflow list --json # list active workflow instances
|
|
272
|
+
rig workflow show <instanceId> --json
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## v0.3.x Starter, Workspace, And Plugin Surfaces
|
|
276
|
+
|
|
277
|
+
OpenRig v0.3.0 adds `rig agent-image`, `rig context-pack`, `rig workspace`, and
|
|
278
|
+
`rig config init-workspace`. It also shifts fresh-user starter guidance toward
|
|
279
|
+
`product-team` for human-directed work and `conveyor` for workflow-oriented
|
|
280
|
+
work. Treat `demo` as legacy/test content unless a task specifically asks for
|
|
281
|
+
the old demo spec.
|
|
282
|
+
|
|
283
|
+
OpenRig v0.3.1 adds public package/source surfaces for Plugin Primitive v0,
|
|
284
|
+
Claude Auto-Compaction Policy, migration `040_workflow_specs_diagnostic`,
|
|
285
|
+
Library Explorer finishing, Settings Destination Explorer, Dashboard/For You
|
|
286
|
+
vellum refresh, storytelling adapter, and action outcome + inline error UX.
|
|
287
|
+
|
|
288
|
+
`rig plugin` is read-only at v0:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
rig plugin list
|
|
292
|
+
rig plugin show <id>
|
|
293
|
+
rig plugin used-by <id>
|
|
294
|
+
rig plugin validate <path>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
There is no `rig plugin install` verb in v0.3.1. Plugin installation remains
|
|
298
|
+
explicit operator copy/symlink to `$OPENRIG_HOME/plugins/<plugin-id>/`.
|
|
299
|
+
|
|
300
|
+
Claude auto-compaction policy is opt-in default-off. The v0.3.1 package and
|
|
301
|
+
this host's active daemon ship `policies.claude_compaction.*` ConfigStore keys,
|
|
302
|
+
but no behavior changes unless the operator enables the policy.
|
|
303
|
+
|
|
304
|
+
Known v0.3.0/v0.3.1 caveats:
|
|
305
|
+
- `rig down` now accepts a rig name or id (symmetric with `rig up`): the earlier
|
|
306
|
+
name-to-404 caveat (the D1 path) is resolved in v0.3.3. An ambiguous name
|
|
307
|
+
matching more than one active rig is refused with the matching ids; re-run
|
|
308
|
+
with `rig down <id>`.
|
|
309
|
+
- `rig queue` / `rig view` JSON and limit compatibility drift is an open
|
|
310
|
+
follow-up from host-adoption proof; treat it as a compatibility caveat, not a
|
|
311
|
+
daemon-health failure.
|
|
312
|
+
- Queue/view JSON/limit drift is now refined as a wrapper-layer routing issue,
|
|
313
|
+
not a daemon-layer issue; use human-readable output for affected wrapper
|
|
314
|
+
commands until v0.3.2.
|
|
315
|
+
- First v0.3.1 daemon start hit a plugin-vendor fallback health-probe timeout;
|
|
316
|
+
controlled retry succeeded. Manual retry is the current workaround.
|
|
317
|
+
- Topology mobile drawer restoration and plugin source-label taxonomy are
|
|
318
|
+
v0.3.2 carry-forwards.
|
|
319
|
+
|
|
41
320
|
## Core Loop
|
|
42
321
|
|
|
43
322
|
Most work in OpenRig reduces to this loop:
|
|
@@ -102,6 +381,12 @@ rig whoami --node-id <id>
|
|
|
102
381
|
|
|
103
382
|
If the daemon is unreachable but identity can still be inferred, `--json` may return a partial result instead of crashing.
|
|
104
383
|
|
|
384
|
+
`WhoamiResult` (v0.3.3+) carries a required `peersNote` field with three pointers
|
|
385
|
+
the agent can use to navigate the rest of the rig from a cold start. The
|
|
386
|
+
human-formatted CLI output preserves the literal `Peers:` line prefix verbatim
|
|
387
|
+
(parser/test compatibility) and surfaces the clarifier in-band beneath it; the
|
|
388
|
+
JSON form exposes `peersNote` directly for programmatic consumers.
|
|
389
|
+
|
|
105
390
|
## Inventory and Monitoring
|
|
106
391
|
|
|
107
392
|
```bash
|
|
@@ -149,13 +434,31 @@ rig send <session> "message"
|
|
|
149
434
|
rig send <session> "message" --verify
|
|
150
435
|
rig send <session> "message" --force
|
|
151
436
|
rig send <session> "message" --json
|
|
437
|
+
rig send <session> --body-file <path> [--verify]
|
|
438
|
+
rig send <session> --body-file - [--verify]
|
|
152
439
|
```
|
|
153
440
|
|
|
154
441
|
Use `--verify` when you want delivery evidence. Use `--force` only when you intentionally want to bypass activity-risk checks.
|
|
155
442
|
|
|
443
|
+
`--body-file <path>` reads the message body from a file; `--body-file -` reads
|
|
444
|
+
from stdin. Use either form to kill the backtick-shell-corruption class for
|
|
445
|
+
substantive bodies (the inline positional `"message"` form is fine for short
|
|
446
|
+
plain text). `--body-file` is mutually exclusive with the positional body
|
|
447
|
+
argument.
|
|
448
|
+
|
|
449
|
+
`--verify` delivery outcomes (v0.3.3+):
|
|
450
|
+
- `delivered` — text + Enter both succeeded and capture re-confirmed the body landed.
|
|
451
|
+
- `rendered-unconfirmed` — text + Enter both succeeded but capture could not re-confirm the body (TUI redraw race or scroll). The message landed; the post-send re-check could not prove it. Treat as landed-but-unconfirmable, NOT failure.
|
|
452
|
+
- `failed` — the send transport itself failed.
|
|
453
|
+
|
|
454
|
+
The legacy `Verified: yes/no` line is preserved verbatim (parser/test
|
|
455
|
+
compatibility). A new `Delivery: <outcome>` line carries the named outcome
|
|
456
|
+
above.
|
|
457
|
+
|
|
156
458
|
Observed operator nuance for `--verify`:
|
|
157
|
-
- `Sent to ...` + `Verified: yes` = strong positive delivery evidence.
|
|
158
|
-
- `Sent to ...` + `Verified: no` =
|
|
459
|
+
- `Sent to ...` + `Verified: yes` (`Delivery: delivered`) = strong positive delivery evidence.
|
|
460
|
+
- `Sent to ...` + `Verified: no` + `Delivery: rendered-unconfirmed` = the message landed; capture could not re-prove it. Don't blind-retry — check reply / `rig capture` / transcript before sending again.
|
|
461
|
+
- `Sent to ...` + `Verified: no` + `Delivery: failed` = send-transport failure.
|
|
159
462
|
- no `Sent to ...` line or a hard error = send failure.
|
|
160
463
|
|
|
161
464
|
When you get `Verified: no`, do not immediately retry blindly. First check one of:
|
|
@@ -270,15 +573,37 @@ rig requirements <spec> [--json]
|
|
|
270
573
|
### Tear a rig down
|
|
271
574
|
|
|
272
575
|
```bash
|
|
273
|
-
rig down <
|
|
274
|
-
rig down <
|
|
275
|
-
rig down <
|
|
276
|
-
rig down <
|
|
277
|
-
rig down <
|
|
576
|
+
rig down <rig> # <rig> = rig name or id (active rig)
|
|
577
|
+
rig down <rig> --snapshot
|
|
578
|
+
rig down <rig> --delete
|
|
579
|
+
rig down <rig> --force
|
|
580
|
+
rig down <rig> --json
|
|
278
581
|
```
|
|
279
582
|
|
|
280
583
|
If `--snapshot` succeeds, human output includes the restore hint.
|
|
281
584
|
|
|
585
|
+
### Archive a stopped rig (recoverable) — v0.3.3+
|
|
586
|
+
|
|
587
|
+
```bash
|
|
588
|
+
rig archive <rig> [--json]
|
|
589
|
+
rig unarchive <rig> [--json]
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
`rig archive` marks a stopped rig as archived (sets `archivedAt`) without
|
|
593
|
+
discarding it. The rig is preserved for later restoration via `rig unarchive`,
|
|
594
|
+
which clears `archivedAt` and returns the rig to the active set.
|
|
595
|
+
|
|
596
|
+
Archive vs delete:
|
|
597
|
+
- `rig down --delete` — permanent removal; not recoverable.
|
|
598
|
+
- `rig archive` — recoverable; the rig is hidden from the default active view but its record + snapshots are preserved.
|
|
599
|
+
|
|
600
|
+
Visibility in `rig ps`:
|
|
601
|
+
- `rig ps` — active rigs only (default).
|
|
602
|
+
- `rig ps --include-archived` — includes archived rigs, marked with `*`.
|
|
603
|
+
|
|
604
|
+
SSE events `rig.archived` / `rig.unarchived` drive Project / dashboard updates;
|
|
605
|
+
consumers that depend on the rig list should subscribe rather than poll.
|
|
606
|
+
|
|
282
607
|
### Environment services
|
|
283
608
|
|
|
284
609
|
```bash
|
|
@@ -491,6 +816,27 @@ rig shrink <rigId> <podRef> [--json]
|
|
|
491
816
|
rig unclaim <sessionRef> [--json]
|
|
492
817
|
```
|
|
493
818
|
|
|
819
|
+
### Add a member to an existing pod — v0.3.3+
|
|
820
|
+
|
|
821
|
+
```bash
|
|
822
|
+
rig add <rig> <member-fragment-path> [--json]
|
|
823
|
+
rig add-member <rig> <member-fragment-path> [--json]
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
`rig add` (alias `rig add-member`) is the top-level verb for the `add_member`
|
|
827
|
+
converge op. It adds a single member to an existing pod from a YAML/JSON member
|
|
828
|
+
fragment file. The fragment must declare the target pod; the daemon resolves
|
|
829
|
+
the pod by that declared identity, validates the member, runs preflight, and
|
|
830
|
+
launches the member in place.
|
|
831
|
+
|
|
832
|
+
HTTP outcomes:
|
|
833
|
+
- `201` — member added; per-node launch state included in the response.
|
|
834
|
+
- `400` — `validation_failed` or `preflight_failed` (the fragment or its launch posture is rejected before any state change).
|
|
835
|
+
- `409` — `member_conflict` (a member with that identity already exists in the pod).
|
|
836
|
+
|
|
837
|
+
Use `rig add` when you want additive growth inside a pod without re-running
|
|
838
|
+
the full `rig expand` pod-fragment path or rebuilding the rig.
|
|
839
|
+
|
|
494
840
|
## Specs and Validation
|
|
495
841
|
|
|
496
842
|
### Validate specs
|
|
@@ -53,7 +53,7 @@ states.
|
|
|
53
53
|
|
|
54
54
|
**Failed resume is FAILED loudly.** No automatic fresh fallback. Fresh
|
|
55
55
|
launch is **explicit follow-up only.** This is enforced architecturally
|
|
56
|
-
at the daemon level (per `architecture.md`
|
|
56
|
+
at the daemon level (per `docs/as-built/architecture/architecture-rules-and-event-system.md` rule 15).
|
|
57
57
|
|
|
58
58
|
The locked restore-outcome vocabulary:
|
|
59
59
|
|
|
@@ -113,4 +113,4 @@ different claims; don't conflate.
|
|
|
113
113
|
- `openrig-user` skill — CLI surface for `rig up / down / restore / etc.`
|
|
114
114
|
- `openrig-operator` skill — operator-level discipline for OpenRig itself
|
|
115
115
|
- `seat-continuity-and-handover` skill — occupant-creation modes for restore (`resume` / `rebuild` / `fresh` / `failed`)
|
|
116
|
-
- `openrig/docs/as-built/architecture.md` (product reference doc) — daemon enforcement of restore-honesty rule
|
|
116
|
+
- `openrig/docs/as-built/architecture/lifecycle-snapshot-restore.md` (product reference doc) — daemon enforcement of restore-honesty rule
|
package/dist/client.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface DaemonResponse<T = unknown> {
|
|
|
7
7
|
}
|
|
8
8
|
interface DaemonRequestOptions {
|
|
9
9
|
timeoutMs?: number;
|
|
10
|
+
/** Per-call header overrides (e.g., `Authorization: Bearer ...`). */
|
|
11
|
+
headers?: Record<string, string>;
|
|
10
12
|
}
|
|
11
13
|
interface DaemonClientOptions {
|
|
12
14
|
fetchImpl?: typeof fetch;
|
|
@@ -23,6 +25,7 @@ export declare class DaemonClient {
|
|
|
23
25
|
postText<T = unknown>(path: string, text: string, contentType?: string, extraHeaders?: Record<string, string>, options?: DaemonRequestOptions): Promise<DaemonResponse<T>>;
|
|
24
26
|
postExpectText(path: string, body?: unknown, options?: DaemonRequestOptions): Promise<DaemonResponse<string>>;
|
|
25
27
|
delete<T = unknown>(path: string, options?: DaemonRequestOptions): Promise<DaemonResponse<T>>;
|
|
28
|
+
put<T = unknown>(path: string, body?: unknown, options?: DaemonRequestOptions): Promise<DaemonResponse<T>>;
|
|
26
29
|
private fetch;
|
|
27
30
|
private requestJson;
|
|
28
31
|
private requestText;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,CAAC;CACT;AAED,UAAU,oBAAoB;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,CAAC;CACT;AAED,UAAU,oBAAoB;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,UAAU,mBAAmB;IAC3B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,YAAY;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,SAAS,CAAS;gBAEd,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;IAkBrD,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAI1F,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAItF,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAQ3G,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,SAAc,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAQ/K,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAQ7G,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAO7F,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;YAUlG,KAAK;YAkBL,WAAW;YAMX,WAAW;CAK1B"}
|
package/dist/client.js
CHANGED
|
@@ -57,7 +57,19 @@ export class DaemonClient {
|
|
|
57
57
|
}, options);
|
|
58
58
|
}
|
|
59
59
|
async delete(path, options) {
|
|
60
|
-
return this.requestJson(path, {
|
|
60
|
+
return this.requestJson(path, {
|
|
61
|
+
method: "DELETE",
|
|
62
|
+
headers: options?.headers,
|
|
63
|
+
}, options);
|
|
64
|
+
}
|
|
65
|
+
async put(path, body, options) {
|
|
66
|
+
const baseHeaders = body !== undefined ? { "Content-Type": "application/json" } : {};
|
|
67
|
+
const headers = { ...baseHeaders, ...(options?.headers ?? {}) };
|
|
68
|
+
return this.requestJson(path, {
|
|
69
|
+
method: "PUT",
|
|
70
|
+
headers,
|
|
71
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
72
|
+
}, options);
|
|
61
73
|
}
|
|
62
74
|
async fetch(path, init, options) {
|
|
63
75
|
const timeoutMs = options?.timeoutMs ?? this.timeoutMs;
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAiB9C,wBAAgB,gBAAgB,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAoHnE"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { DaemonClient } from "../client.js";
|
|
4
|
+
import { getDaemonStatus, getDaemonUrl } from "../daemon-lifecycle.js";
|
|
5
|
+
import { realDeps } from "./daemon.js";
|
|
6
|
+
export function addMemberCommand(depsOverride) {
|
|
7
|
+
const cmd = new Command("add").description("Add a member to an existing pod in a running rig");
|
|
8
|
+
const getDeps = () => depsOverride ?? { lifecycleDeps: realDeps(), clientFactory: (url) => new DaemonClient(url) };
|
|
9
|
+
cmd
|
|
10
|
+
.argument("<rig-id>", "ID of the target rig")
|
|
11
|
+
.argument("<pod-namespace>", "Namespace of the existing pod to add the member to")
|
|
12
|
+
.argument("<member-fragment-path>", "Path to YAML/JSON member fragment file (spec snake_case fields)")
|
|
13
|
+
.option("--json", "JSON output for agents")
|
|
14
|
+
.option("--rig-root <path>", "Root directory for agent resolution")
|
|
15
|
+
.action(async (rigId, podNamespace, fragmentPath, opts) => {
|
|
16
|
+
const deps = getDeps();
|
|
17
|
+
const status = await getDaemonStatus(deps.lifecycleDeps);
|
|
18
|
+
if (status.state !== "running" || status.healthy === false) {
|
|
19
|
+
console.error("Daemon not running. Start it with: rig daemon start");
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let fileContent;
|
|
24
|
+
try {
|
|
25
|
+
fileContent = readFileSync(fragmentPath, "utf-8");
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
console.error(`Cannot read file: ${fragmentPath}`);
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
let member;
|
|
33
|
+
let edges;
|
|
34
|
+
try {
|
|
35
|
+
// Dynamic import to avoid bundling yaml at module load (matches expand).
|
|
36
|
+
const { parse } = await import("yaml");
|
|
37
|
+
const parsed = (parse(fileContent) ?? {});
|
|
38
|
+
if (parsed["member"] && typeof parsed["member"] === "object" && !Array.isArray(parsed["member"])) {
|
|
39
|
+
// Wrapper form: { member: {...}, edges?: [...] }.
|
|
40
|
+
member = parsed["member"];
|
|
41
|
+
edges = parsed["edges"];
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// Bare member form. Lift any top-level `edges:` out as pod-local edges
|
|
45
|
+
// so they are NOT silently dropped (the schema ignores unknown member
|
|
46
|
+
// fields). The rest is the member.
|
|
47
|
+
const { edges: bareEdges, ...rest } = parsed;
|
|
48
|
+
member = rest;
|
|
49
|
+
edges = bareEdges;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
console.error("Invalid YAML/JSON in member fragment file");
|
|
54
|
+
process.exitCode = 1;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// A PRESENT-but-non-array edges field is an honest error, never silently
|
|
58
|
+
// omitted (governance FM2 no-silent-drop).
|
|
59
|
+
if (edges !== undefined && edges !== null && !Array.isArray(edges)) {
|
|
60
|
+
console.error("Invalid member fragment: 'edges' must be an array of { from, to, kind }.");
|
|
61
|
+
process.exitCode = 1;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const body = { member };
|
|
65
|
+
if (Array.isArray(edges))
|
|
66
|
+
body["edges"] = edges;
|
|
67
|
+
if (opts.rigRoot)
|
|
68
|
+
body["rigRoot"] = opts.rigRoot;
|
|
69
|
+
const client = deps.clientFactory(getDaemonUrl(status));
|
|
70
|
+
const res = await client.post(`/api/rigs/${encodeURIComponent(rigId)}/pods/${encodeURIComponent(podNamespace)}/members`, body);
|
|
71
|
+
const data = res.data;
|
|
72
|
+
if (opts.json) {
|
|
73
|
+
console.log(JSON.stringify(data, null, 2));
|
|
74
|
+
// Non-zero if the HTTP failed OR the new node did not fully launch.
|
|
75
|
+
if (res.status >= 400 || (data.ok && data.result !== undefined && data.result.node.status !== "launched")) {
|
|
76
|
+
process.exitCode = 1;
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (res.status >= 400 || !data.ok) {
|
|
81
|
+
// Honest 3-part error: the daemon's message already says what failed /
|
|
82
|
+
// why / what to do (pod_not_found lists pods; member_conflict suggests a
|
|
83
|
+
// new id); validation/preflight surface the specific field errors.
|
|
84
|
+
const msg = data.message
|
|
85
|
+
?? (data.errors && data.errors.length > 0 ? data.errors.join("; ") : data.error)
|
|
86
|
+
?? `Add member failed (HTTP ${res.status})`;
|
|
87
|
+
console.error(msg);
|
|
88
|
+
process.exitCode = 1;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const node = data.result.node;
|
|
92
|
+
const icon = node.status === "launched" ? "OK" : "FAIL";
|
|
93
|
+
const session = node.sessionName ? ` (${node.sessionName})` : "";
|
|
94
|
+
const error = node.error ? ` - ${node.error}` : "";
|
|
95
|
+
console.log(`Added member to rig ${rigId}`);
|
|
96
|
+
console.log(` Pod: ${data.result.podNamespace}`);
|
|
97
|
+
console.log(` Member: [${icon}] ${node.logicalId}${session}${error}`);
|
|
98
|
+
const persistedEdges = data.result.edges ?? [];
|
|
99
|
+
if (persistedEdges.length > 0) {
|
|
100
|
+
console.log(" Edges:");
|
|
101
|
+
for (const e of persistedEdges)
|
|
102
|
+
console.log(` ${e.from} ${e.kind} ${e.to}`);
|
|
103
|
+
}
|
|
104
|
+
if (data.result.warnings && data.result.warnings.length > 0) {
|
|
105
|
+
console.log("");
|
|
106
|
+
for (const w of data.result.warnings)
|
|
107
|
+
console.log(` Warning: ${w}`);
|
|
108
|
+
}
|
|
109
|
+
if (node.status !== "launched") {
|
|
110
|
+
process.exitCode = 1;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
return cmd;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=add.js.map
|