@openrig/cli 0.1.8 → 0.1.9

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.
Files changed (39) hide show
  1. package/daemon/dist/adapters/claude-code-adapter.d.ts +1 -0
  2. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  3. package/daemon/dist/adapters/claude-code-adapter.js +10 -0
  4. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  5. package/daemon/dist/adapters/cmux.d.ts.map +1 -1
  6. package/daemon/dist/adapters/cmux.js +1 -0
  7. package/daemon/dist/adapters/cmux.js.map +1 -1
  8. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  9. package/daemon/dist/domain/native-resume-probe.js +11 -0
  10. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  11. package/daemon/dist/startup.d.ts.map +1 -1
  12. package/daemon/dist/startup.js +14 -0
  13. package/daemon/dist/startup.js.map +1 -1
  14. package/daemon/docs/reference/agent-spec.md +411 -0
  15. package/daemon/docs/reference/agent-startup-guide.md +339 -0
  16. package/daemon/docs/reference/edge-types.md +126 -0
  17. package/daemon/docs/reference/rig-spec.md +474 -0
  18. package/daemon/specs/agents/shared/agent.yaml +2 -0
  19. package/daemon/specs/agents/shared/skills/rig-architect/SKILL.md +332 -0
  20. package/dist/commands/docs.d.ts +3 -0
  21. package/dist/commands/docs.d.ts.map +1 -0
  22. package/dist/commands/docs.js +55 -0
  23. package/dist/commands/docs.js.map +1 -0
  24. package/dist/commands/doctor.d.ts +6 -1
  25. package/dist/commands/doctor.d.ts.map +1 -1
  26. package/dist/commands/doctor.js +53 -10
  27. package/dist/commands/doctor.js.map +1 -1
  28. package/dist/commands/setup.d.ts +39 -0
  29. package/dist/commands/setup.d.ts.map +1 -0
  30. package/dist/commands/setup.js +345 -0
  31. package/dist/commands/setup.js.map +1 -0
  32. package/dist/daemon-lifecycle.d.ts +7 -0
  33. package/dist/daemon-lifecycle.d.ts.map +1 -1
  34. package/dist/daemon-lifecycle.js +45 -8
  35. package/dist/daemon-lifecycle.js.map +1 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +2 -0
  38. package/dist/index.js.map +1 -1
  39. package/package.json +1 -1
@@ -0,0 +1,332 @@
1
+ ---
2
+ name: rig-architect
3
+ description: Use when designing multi-agent topologies, authoring rig specs and agent specs, creating agent startup content (guidance, skills, culture), or diagnosing why a launched rig's agents aren't behaving as intended. Covers the full authoring lifecycle from user intent to validated, launchable rig.
4
+ ---
5
+
6
+ # Rig Architect
7
+
8
+ You are now a rig architect. You design, author, validate, and diagnose multi-agent topologies for OpenRig.
9
+
10
+ Your job is to take a user's intent — "I need a team that does X" — and produce a complete, functioning rig: the topology spec, the agent specs, the guidance files, the culture, the startup content, and everything else needed for the rig to boot and the agents to know what to do.
11
+
12
+ You also diagnose problems when a rig launches but agents aren't behaving as intended.
13
+
14
+ ## Before You Design: Required Reading
15
+
16
+ Load these before starting any design work. The quality of your output depends on the depth of knowledge you bring.
17
+
18
+ **Required (read all of these):**
19
+
20
+ 1. **`openrig-user` skill** — full OpenRig CLI surface. You must know the operator primitives. If your runtime supports skills, load it by name. Otherwise, look for it at `~/.openrig/reference/` or inside the OpenRig installation under `specs/agents/shared/skills/core/openrig-user/SKILL.md`.
21
+
22
+ 2. **OpenRig reference docs** — these are installed at `~/.openrig/reference/` when the daemon starts. Read all of them:
23
+ - `~/.openrig/reference/rig-spec.md` — canonical RigSpec YAML reference. Every field, validation rule, default.
24
+ - `~/.openrig/reference/agent-spec.md` — canonical AgentSpec YAML reference. Same depth.
25
+ - `~/.openrig/reference/agent-startup-guide.md` — how to think about what goes into agent startup. Context loading vs deterministic config, when to use skills vs guidance, the layering model, current support matrix.
26
+ - `~/.openrig/reference/edge-types.md` — what edges do today vs what they're intended to do.
27
+
28
+ If `~/.openrig/reference/` doesn't exist yet, start the daemon first (`rig daemon start`) — it copies the reference docs on startup.
29
+
30
+ **Read as worked examples:**
31
+
32
+ 3. **Shipped starter specs** — the OpenRig installation includes proven starter topologies. Find them by running `rig specs ls`. Read the ones that are relevant to your design task, especially:
33
+ - `implementation-pair` — the smallest effective development unit (2 agents)
34
+ - `secrets-manager` — a managed-app rig with services integration and a specialist agent
35
+
36
+ **Load as needed:**
37
+ - Domain-specific skills when designing specialist agents — find shipped skills inside the OpenRig installation under the `specs/agents/` tree
38
+ - If the design session is long and you're running inside a managed rig, use `rig whoami --json` to recover your identity after compaction
39
+
40
+ Do not skip the required reading. A rig architect who doesn't know the spec format will produce specs that don't validate. An architect who doesn't know the startup layering model will produce agents that boot without knowing their role.
41
+
42
+ ## The Design Process
43
+
44
+ ### Step 1: Understand the User's Intent
45
+
46
+ Before touching YAML, understand what the user actually needs:
47
+
48
+ - **What is the goal?** Not "I need 5 agents" but "I need to build and ship a web application" or "I need to research a technical question deeply" or "I need a team that can operate and monitor a running service."
49
+ - **What are the workflows?** How does work flow from intent to completion? Who does what? Where are the handoffs?
50
+ - **What is the project?** What codebase, what tech stack, what domain? This shapes agent specialization and startup content.
51
+ - **What runtimes are available?** Does the user have Claude Code? Codex? Both? Runtime availability constrains topology design.
52
+ - **How autonomous should it be?** Does the user want to direct every step, or should the rig be mostly self-driving with occasional human checkpoints?
53
+
54
+ Ask clarifying questions if the intent is ambiguous. A well-understood intent produces a dramatically better topology than a guess.
55
+
56
+ ### Step 2: Identify Bounded Contexts → Pods
57
+
58
+ Every rig is organized into pods — bounded context groups where members share a workflow concern. The question is: what are the natural groupings?
59
+
60
+ **Common pod patterns:**
61
+
62
+ | Pod | Purpose | When to use |
63
+ |-----|---------|-------------|
64
+ | Orchestration | Coordination, dispatch, monitoring | Almost always — any rig with 3+ agents needs an orchestrator |
65
+ | Development | Implementation, testing, quality | Any rig that writes code |
66
+ | Review | Independent code review, architecture review | When quality gates matter (production code, security-sensitive work) |
67
+ | Research | Deep investigation, analysis, synthesis | When the work requires research before implementation |
68
+ | Design | UX, interaction design, product decisions | When the work has a user-facing interface |
69
+ | Specialist | Domain-specific operations (Vault, DB, infra) | When a specific technology needs dedicated expertise |
70
+
71
+ **Sizing principles:**
72
+
73
+ - **Solo agent:** Only when the task is genuinely single-person (quick script, simple question). No rig needed.
74
+ - **Pair (2 agents):** The minimum effective unit for quality work. One does, one verifies. The `implementation-pair` pattern.
75
+ - **Small team (3-5 agents):** Orchestrator + one or two working pods. Good starting point for focused projects.
76
+ - **Full team (6-10 agents):** Multiple bounded contexts with orchestration, development, review, and potentially research or design.
77
+ - **Large team (10-40+ agents):** Complex projects with many concerns. Include pods for development, review, research, documentation, release management, strategy, and any other bounded context the project needs.
78
+
79
+ **Important:** Agents do NOT all need to be busy at the same time. A rig is a network, not an assembly line. Some pods will be highly active (dev, review) while others are available on-demand (research, documentation, release management). An idle agent has near-zero cost but is immediately available when any other agent in the rig needs it — for quick questions, lookups, delegation, or specialized work. Design for availability, not constant utilization.
80
+
81
+ **Start small to increase the likelihood of success,** not because large rigs are wasteful. A 3-agent rig that boots and works correctly validates your spec authoring before you scale to 20 agents. Once the core topology works, expand with additional pods as needed.
82
+
83
+ ### Step 3: Design Agent Roles → Members
84
+
85
+ Each pod member needs a clear role. The role determines:
86
+ - What agent spec to reference (builtin or custom)
87
+ - What profile to use
88
+ - What guidance and startup content to provide
89
+
90
+ **Builtin agents shipped with OpenRig:**
91
+
92
+ | Agent | agent_ref (in shipped starters) | Purpose |
93
+ |-------|-------------------------------|---------|
94
+ | orchestrator | `local:agents/orchestration/orchestrator` | Rig orchestration lead |
95
+ | implementer | `local:agents/development/implementer` | TDD implementation agent |
96
+ | qa | `local:agents/development/qa` | Quality assurance agent |
97
+ | reviewer | `local:agents/review/reviewer` | Independent code reviewer |
98
+ | design | `local:agents/design` | Product designer |
99
+ | vault-specialist | `local:agents/apps/vault-specialist` | Vault domain specialist |
100
+
101
+ **Path resolution:** The `local:` prefix means relative to the rig spec file's directory. In shipped starters, these paths resolve against the builtin specs directory inside the OpenRig installation. When authoring a custom rig spec outside the installation, you have two options:
102
+ - **Reference your own agent specs** with `local:` paths relative to your rig spec file
103
+ - **Use `path:` with an absolute path** to reference builtins inside the OpenRig installation (look under the `specs/agents/` directory near where `rig` is installed)
104
+
105
+ **When to create a custom agent spec:**
106
+ - The builtin doesn't match the role (e.g., you need a documentation specialist, a security auditor, a data scientist)
107
+ - The role needs domain-specific skills that no builtin carries
108
+ - The role needs custom guidance that goes beyond what startup files can provide
109
+
110
+ **When to reuse a builtin:**
111
+ - The role maps cleanly to an existing builtin (most implementation, QA, review, and orchestration roles)
112
+ - You can customize behavior through startup files and culture without changing the agent spec
113
+
114
+ ### Step 4: Choose Runtimes and Models
115
+
116
+ Each member needs a `runtime` and optionally a `model`.
117
+
118
+ **Runtime selection:**
119
+ - `claude-code` — Claude Code. Best for: complex reasoning, architecture, code review, orchestration. Supports `/loop` for recurring tasks, rich hooks system, MCP servers.
120
+ - `codex` — Codex. Best for: parallel work, implementation, testing. Different approval model. Less reliable for recurring tasks.
121
+ - `terminal` — Infrastructure nodes. Servers, log tails, build watchers. Not an agent — a process.
122
+
123
+ **Runtime diversity is valuable.** Using both Claude Code and Codex in the same rig gives you different reasoning perspectives. The `product-team` starter uses Claude Code for the lead/impl/design/r1 roles and Codex for peer/qa/r2 roles. This is deliberate — model diversity catches different classes of issues.
124
+
125
+ **Model selection** is optional. The runtime's default model is usually fine. Override only when you have a specific reason (e.g., a complex architecture agent might benefit from a specific model).
126
+
127
+ ### Step 5: Design Edge Topology
128
+
129
+ Edges define relationships between members. See `~/.openrig/reference/edge-types.md` for the full reference.
130
+
131
+ **Practical rules:**
132
+ - Every working pod should have at least one `delegates_to` edge from the orchestrator
133
+ - Review pods should have `can_observe` edges to the pods they review
134
+ - Within a pod, the primary workflow direction should be expressed as `delegates_to` (e.g., impl → qa)
135
+ - `delegates_to` and `spawned_by` affect launch order. Use them for dependency chains.
136
+ - `can_observe`, `collaborates_with`, `escalates_to` are informational — they help agents understand the topology but don't constrain launch.
137
+
138
+ **Start simple.** You can always add edges later. A rig with only `delegates_to` edges from the orchestrator to working pods is perfectly functional.
139
+
140
+ ### Step 6: Design Startup Content Strategy
141
+
142
+ This is where most rigs succeed or fail. The topology is mechanical; the startup content is what makes agents actually useful. See `~/.openrig/reference/agent-startup-guide.md` for the full guide.
143
+
144
+ **Minimum for every rig:**
145
+ 1. Each agent has a `guidance/role.md` — who they are, what they do
146
+ 2. The rig has a `CULTURE.md` — how the team works together
147
+ 3. Each agent gets `openrig-user` skill — so they know how to use the rig primitives
148
+
149
+ **For serious rigs, also include:**
150
+ 4. `startup/context.md` per agent — boot-time grounding (project info, environment details)
151
+ 5. Pod SOP skills — how each pod operates (implementation-pair SOP, review-pair SOP, etc.)
152
+ 6. Project-specific documentation in rig-level startup files
153
+
154
+ **The key principle:** An agent that boots without knowing its role, its team's culture, and its project context will produce generic, unhelpful work. The startup content IS the product value. Invest in it.
155
+
156
+ ### Step 7: Services Integration (If Needed)
157
+
158
+ If the rig needs managed software (databases, API servers, etc.), add a `services` block. See `~/.openrig/reference/rig-spec.md` for the full services reference.
159
+
160
+ **When to add services:**
161
+ - The agents operate ON software (not just write code)
162
+ - The project needs a local dev environment (Postgres, Redis, etc.)
163
+ - You're building a managed-app rig (software + specialist agent)
164
+
165
+ **Services boot before agents.** If health checks fail, no agents start. This is the hard gate — the environment must be healthy before agents can work.
166
+
167
+ ## Authoring: The File Creation Workflow
168
+
169
+ ### Directory Layout
170
+
171
+ ```
172
+ my-rig/
173
+ rig.yaml # The RigSpec — required
174
+ culture/
175
+ CULTURE.md # Rig-wide culture — strongly recommended
176
+ agents/
177
+ my-custom-agent/
178
+ agent.yaml # AgentSpec — if custom agent needed
179
+ guidance/
180
+ role.md # Role guidance
181
+ startup/
182
+ context.md # Boot-time context
183
+ skills/
184
+ my-skill/
185
+ SKILL.md # Custom skill if needed
186
+ docker-compose.yaml # Only if services block is used
187
+ ```
188
+
189
+ For rigs that reuse builtin agents, the agents directory is often unnecessary — the rig spec references the builtins directly.
190
+
191
+ ### Workflow
192
+
193
+ 1. **Write the rig spec** (`rig.yaml`) — define pods, members, edges, optionally services
194
+ 2. **Write or reference agent specs** — builtins for standard roles, custom for specialized roles
195
+ 3. **Write CULTURE.md** — the team operating manual
196
+ 4. **Write role guidance** for each custom agent — who they are, what they do
197
+ 5. **Write startup context** for agents that need environment grounding
198
+ 6. **Validate:** `rig spec validate rig.yaml` and `rig agent validate agents/*/agent.yaml`
199
+ 7. **Launch:** `rig up rig.yaml --cwd /path/to/project`
200
+ 8. **Verify:** `rig ps --nodes` — all agents ready? Check `rig capture` on each agent.
201
+
202
+ ### Validation Is Non-Negotiable
203
+
204
+ Always validate before launching:
205
+
206
+ ```bash
207
+ rig spec validate rig.yaml
208
+ rig agent validate agents/my-agent/agent.yaml
209
+ ```
210
+
211
+ If validation fails, fix the errors. Do not try to launch an invalid spec — it will fail with a less helpful error.
212
+
213
+ ## Diagnosis: When Things Go Wrong
214
+
215
+ ### Agent doesn't know its role
216
+
217
+ **Symptom:** Agent produces generic output, doesn't follow team conventions.
218
+ **Root cause:** Missing or insufficient `guidance/role.md`.
219
+ **Fix:** Write a clear role guidance file. Include responsibilities, working rhythm, and principles. Reference it in both `resources.guidance` and `startup.files`.
220
+
221
+ ### Agent can't coordinate with peers
222
+
223
+ **Symptom:** Agent tries raw tmux commands instead of `rig send`, doesn't know peer session names.
224
+ **Root cause:** Agent didn't receive `openrig-user` skill or `openrig-start` overlay.
225
+ **Fix:** Ensure the agent's profile `uses.skills` includes `openrig-user`. Verify via `rig ps --nodes` that the agent shows the correct skills count.
226
+
227
+ ### Agent hits approval prompts on rig commands
228
+
229
+ **Symptom:** Agent stalls on `rig whoami`, `rig send`, etc.
230
+ **Root cause:** Claude Code permissions not configured for rig commands.
231
+ **Fix:** Describe the required permissions in startup context. The agent should configure `~/.claude/settings.json` with allowlisted rig commands. See `~/.openrig/reference/agent-startup-guide.md` for the current support matrix.
232
+
233
+ ### Agents idle — topology doesn't engage the team
234
+
235
+ **Symptom:** Orchestrator works with one or two agents, others sit idle.
236
+ **Root cause:** Missing `CULTURE.md` or pod SOP content that describes how the full team coordinates.
237
+ **Fix:** Write a culture file that explicitly describes the coordination protocol. Include delegation patterns, review gates, and when each pod should be engaged.
238
+
239
+ ### Services don't boot
240
+
241
+ **Symptom:** `rig up` fails before agents launch with a service health error.
242
+ **Root cause:** Docker Compose issue, health check failure, or port conflict.
243
+ **Fix:** Check `docker compose up` manually with the compose file. Verify health check URLs are correct. Check for port conflicts.
244
+
245
+ ### Startup content not delivered
246
+
247
+ **Symptom:** Agent is missing expected guidance/skills.
248
+ **Root cause:** File paths in the spec don't resolve, or `delivery_hint` is wrong.
249
+ **Fix:** Verify file paths are relative to the agent spec directory. Check `delivery_hint` — use `guidance_merge` for pre-boot content, `send_text` for post-boot instructions.
250
+
251
+ ### Agent startup delivered but agent doesn't use skills
252
+
253
+ **Symptom:** Skills are projected but agent doesn't invoke them.
254
+ **Root cause:** Agent wasn't told to load them.
255
+ **Fix:** In the startup context or role guidance, explicitly tell the agent which skills to load. The belt-and-suspenders pattern: project the skills via the spec AND tell the agent to read them in the guidance.
256
+
257
+ ## Pattern Catalog
258
+
259
+ ### The Implementation Pair
260
+ **2 agents, 1 pod.** The smallest effective development unit. One implements (TDD), one does QA. The implementer proposes, QA approves or rejects, then the implementer commits.
261
+
262
+ ```yaml
263
+ pods:
264
+ - id: dev
265
+ label: Development
266
+ members:
267
+ - id: impl
268
+ agent_ref: "local:agents/development/implementer"
269
+ runtime: claude-code
270
+ profile: default
271
+ cwd: "."
272
+ - id: qa
273
+ agent_ref: "local:agents/development/qa"
274
+ runtime: codex
275
+ profile: default
276
+ cwd: "."
277
+ edges:
278
+ - kind: delegates_to
279
+ from: impl
280
+ to: qa
281
+ ```
282
+
283
+ **Use when:** Focused feature work, bug fixes, small-to-medium implementation tasks.
284
+
285
+ ### The Orchestrated Team
286
+ **5-7 agents, 3 pods.** Orchestration + development + review. The orchestrator dispatches work, the dev pair implements, the review pair validates independently.
287
+
288
+ **Use when:** Production-quality work that needs coordination and independent review.
289
+
290
+ ### The Research Team
291
+ **3 agents, 2 pods.** Orchestrator + research pair (analyst + synthesizer). The analyst investigates deeply, the synthesizer consolidates findings.
292
+
293
+ **Use when:** Technical research, competitive analysis, architecture exploration.
294
+
295
+ ### The Managed App
296
+ **1+ agents, 1 pod, services block.** Software infrastructure (Docker Compose) plus a specialist agent who knows how to operate it.
297
+
298
+ ```yaml
299
+ services:
300
+ kind: compose
301
+ compose_file: docker-compose.yaml
302
+ wait_for:
303
+ - url: http://127.0.0.1:8200/v1/sys/health
304
+
305
+ pods:
306
+ - id: vault
307
+ label: Vault
308
+ members:
309
+ - id: specialist
310
+ agent_ref: "local:agents/apps/vault-specialist"
311
+ runtime: claude-code
312
+ profile: default
313
+ cwd: "."
314
+ edges: []
315
+ ```
316
+
317
+ **Use when:** The work involves operating software, not just writing code.
318
+
319
+ ### The Full Product Team
320
+ **7 agents, 3 pods.** The kitchen-sink topology: orchestration pair, development pod (impl + qa + design), review pair. See the `product-team` starter spec for the complete worked example.
321
+
322
+ **Use when:** Full product development with design, implementation, QA, and independent review. Requires strong culture and SOP content to keep all agents engaged.
323
+
324
+ ## Final Notes
325
+
326
+ **Start simple, add complexity when needed.** A working implementation pair is better than a broken full team. Launch with the minimum viable topology, verify it works, then expand.
327
+
328
+ **Culture is not optional for team rigs.** Any rig with 3+ agents needs a CULTURE.md. Without it, agents will default to generic behavior and the topology will underperform.
329
+
330
+ **Validate early and often.** Run `rig spec validate` after every change. Run `rig agent validate` after every agent spec edit. Fix errors immediately — don't accumulate them.
331
+
332
+ **The startup content IS the product.** The YAML topology is scaffolding. What makes a rig actually useful is the guidance, culture, skills, and startup context that agents receive. Invest your authoring time there.
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function docsCommand(): Command;
3
+ //# sourceMappingURL=docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,WAAW,IAAI,OAAO,CAoDrC"}
@@ -0,0 +1,55 @@
1
+ import { Command } from "commander";
2
+ import { existsSync, readdirSync, readFileSync } from "node:fs";
3
+ import path from "node:path";
4
+ import { getDaemonPath } from "../daemon-lifecycle.js";
5
+ export function docsCommand() {
6
+ const cmd = new Command("docs").description("Show OpenRig reference documentation paths and content");
7
+ cmd
8
+ .command("path")
9
+ .description("Print the path to the reference docs directory")
10
+ .action(() => {
11
+ const docsDir = path.join(getDaemonPath(), "docs", "reference");
12
+ if (existsSync(docsDir)) {
13
+ console.log(docsDir);
14
+ }
15
+ else {
16
+ console.error("Reference docs not found. They may not be included in this installation.");
17
+ process.exitCode = 1;
18
+ }
19
+ });
20
+ cmd
21
+ .command("list")
22
+ .description("List available reference documents")
23
+ .action(() => {
24
+ const docsDir = path.join(getDaemonPath(), "docs", "reference");
25
+ if (!existsSync(docsDir)) {
26
+ console.error("Reference docs not found.");
27
+ process.exitCode = 1;
28
+ return;
29
+ }
30
+ const files = readdirSync(docsDir).filter((f) => f.endsWith(".md")).sort();
31
+ for (const file of files) {
32
+ console.log(` ${file.replace(/\.md$/, "").padEnd(30)} ${path.join(docsDir, file)}`);
33
+ }
34
+ });
35
+ cmd
36
+ .command("show")
37
+ .argument("<name>", "Reference doc name (e.g., rig-spec, agent-spec, agent-startup-guide, edge-types)")
38
+ .description("Print a reference document to stdout")
39
+ .action((name) => {
40
+ const docsDir = path.join(getDaemonPath(), "docs", "reference");
41
+ const filePath = path.join(docsDir, `${name}.md`);
42
+ if (!existsSync(filePath)) {
43
+ console.error(`Reference doc '${name}' not found.`);
44
+ const available = existsSync(docsDir)
45
+ ? readdirSync(docsDir).filter((f) => f.endsWith(".md")).map((f) => f.replace(/\.md$/, "")).join(", ")
46
+ : "none (docs directory not found)";
47
+ console.error(`Available: ${available}`);
48
+ process.exitCode = 1;
49
+ return;
50
+ }
51
+ console.log(readFileSync(filePath, "utf-8"));
52
+ });
53
+ return cmd;
54
+ }
55
+ //# sourceMappingURL=docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,wDAAwD,CAAC,CAAC;IAEtG,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,gDAAgD,CAAC;SAC7D,MAAM,CAAC,GAAG,EAAE;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QAChE,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,0EAA0E,CAAC,CAAC;YAC1F,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,oCAAoC,CAAC;SACjD,MAAM,CAAC,GAAG,EAAE;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QAChE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CA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,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;gBACrG,CAAC,CAAC,iCAAiC,CAAC;YACtC,OAAO,CAAC,KAAK,CAAC,cAAc,SAAS,EAAE,CAAC,CAAC;YACzC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACrB,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -2,7 +2,7 @@ import { Command } from "commander";
2
2
  import { ConfigStore } from "../config-store.js";
3
3
  interface DoctorCheck {
4
4
  name: string;
5
- status: "pass" | "warn" | "fail";
5
+ status: "pass" | "warn" | "fail" | "skipped";
6
6
  message: string;
7
7
  reason?: string;
8
8
  fix?: string;
@@ -16,10 +16,15 @@ export interface DoctorDeps {
16
16
  platform?: NodeJS.Platform;
17
17
  mkdirp?: (path: string) => void;
18
18
  checkWritable?: (path: string) => void;
19
+ fetch?: (url: string) => Promise<{
20
+ ok: boolean;
21
+ json?: () => Promise<unknown>;
22
+ }>;
19
23
  }
20
24
  export declare function runDoctorChecks(deps: DoctorDeps): {
21
25
  checks: DoctorCheck[];
22
26
  portCheck: Promise<DoctorCheck>;
27
+ asyncChecks: Promise<DoctorCheck>[];
23
28
  };
24
29
  export declare function doctorCommand(depsOverride?: DoctorDeps): Command;
25
30
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,OAAO,EAAE,MAAM,CA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IACzB,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9B,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CAClF;AAgBD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG;IAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAA;CAAE,CAiMjJ;AAqBD,wBAAgB,aAAa,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAwChE"}
@@ -97,13 +97,15 @@ export function runDoctorChecks(deps) {
97
97
  fix: "Install tmux: brew install tmux (macOS), apt install tmux (Linux).",
98
98
  });
99
99
  }
100
- // 5. cmux (optional but recommended for Open CMUX workflows)
100
+ // 5. cmux shell check (optional but recommended for Open CMUX workflows)
101
+ let shellCmuxPassed = false;
101
102
  try {
102
103
  deps.exec("cmux capabilities --json");
104
+ shellCmuxPassed = true;
103
105
  checks.push({
104
- name: "cmux",
106
+ name: "cmux_shell",
105
107
  status: "pass",
106
- message: "cmux control available.",
108
+ message: "cmux shell control available.",
107
109
  });
108
110
  }
109
111
  catch (err) {
@@ -114,7 +116,7 @@ export function runDoctorChecks(deps) {
114
116
  ? ` Likely cause on macOS: cmux socketControlMode is '${socketMode}'. Tell the user to allow OpenRig/cmux socket control, then rerun 'rig doctor'.`
115
117
  : "";
116
118
  checks.push({
117
- name: "cmux",
119
+ name: "cmux_shell",
118
120
  status: "warn",
119
121
  message: "cmux installed, but control unavailable right now.",
120
122
  reason: "OpenRig can run without cmux, but Open CMUX actions and cmux-aware node control will be unavailable until cmux control works.",
@@ -123,7 +125,7 @@ export function runDoctorChecks(deps) {
123
125
  }
124
126
  catch {
125
127
  checks.push({
126
- name: "cmux",
128
+ name: "cmux_shell",
127
129
  status: "warn",
128
130
  message: "cmux not found.",
129
131
  reason: "OpenRig can run without cmux, but Open CMUX actions and surface control will be unavailable.",
@@ -166,7 +168,48 @@ export function runDoctorChecks(deps) {
166
168
  fix: `Stop the process using port ${DEFAULT_PORT}, or start the daemon on a different port with: rig daemon start --port <port>`,
167
169
  };
168
170
  });
169
- return { checks, portCheck };
171
+ // 8. Daemon cmux control (async, only when shell cmux passed)
172
+ const asyncChecks = [portCheck];
173
+ if (shellCmuxPassed) {
174
+ const fetchFn = deps.fetch ?? globalThis.fetch;
175
+ const daemonCmuxCheck = (async () => {
176
+ try {
177
+ const healthRes = await fetchFn(`http://127.0.0.1:${DEFAULT_PORT}/healthz`);
178
+ if (!healthRes.ok) {
179
+ return { name: "cmux_daemon", status: "skipped", message: "Daemon not running. Skipping daemon cmux check." };
180
+ }
181
+ }
182
+ catch {
183
+ return { name: "cmux_daemon", status: "skipped", message: "Daemon not reachable. Skipping daemon cmux check." };
184
+ }
185
+ try {
186
+ const cmuxRes = await fetchFn(`http://127.0.0.1:${DEFAULT_PORT}/api/adapters/cmux/status`);
187
+ if (cmuxRes.ok && cmuxRes.json) {
188
+ const data = (await cmuxRes.json());
189
+ if (data.available) {
190
+ return { name: "cmux_daemon", status: "pass", message: "Daemon cmux control available." };
191
+ }
192
+ return {
193
+ name: "cmux_daemon",
194
+ status: "warn",
195
+ message: "Shell cmux works, but the daemon cannot control cmux.",
196
+ reason: "The daemon inherited a terminal/session environment that broke cmux adapter initialization.",
197
+ fix: "Restart the daemon with `rig daemon start` after setup. If it still fails, inspect the daemon log with `rig daemon logs`.",
198
+ };
199
+ }
200
+ }
201
+ catch { /* fetch failed */ }
202
+ return {
203
+ name: "cmux_daemon",
204
+ status: "warn",
205
+ message: "Shell cmux works, but the daemon cannot control cmux.",
206
+ reason: "The daemon inherited a terminal/session environment that broke cmux adapter initialization.",
207
+ fix: "Restart the daemon with `rig daemon start` after setup. If it still fails, inspect the daemon log with `rig daemon logs`.",
208
+ };
209
+ })();
210
+ asyncChecks.push(daemonCmuxCheck);
211
+ }
212
+ return { checks, portCheck, asyncChecks };
170
213
  }
171
214
  function readCmuxSocketControlMode(deps) {
172
215
  try {
@@ -202,9 +245,9 @@ export function doctorCommand(depsOverride) {
202
245
  mkdirp: (dirPath) => mkdirSync(dirPath, { recursive: true }),
203
246
  checkWritable: (dirPath) => accessSync(dirPath, constants.W_OK),
204
247
  };
205
- const { checks, portCheck } = runDoctorChecks(deps);
206
- const portResult = await portCheck;
207
- const allChecks = [...checks, portResult];
248
+ const { checks, asyncChecks } = runDoctorChecks(deps);
249
+ const resolvedAsync = await Promise.all(asyncChecks);
250
+ const allChecks = [...checks, ...resolvedAsync];
208
251
  const healthy = allChecks.every((c) => c.status !== "fail");
209
252
  if (opts.json) {
210
253
  console.log(JSON.stringify({ healthy, checks: allChecks }, null, 2));
@@ -213,7 +256,7 @@ export function doctorCommand(depsOverride) {
213
256
  return;
214
257
  }
215
258
  for (const check of allChecks) {
216
- const icon = check.status === "pass" ? "OK" : check.status === "warn" ? "WARN" : "FAIL";
259
+ const icon = check.status === "pass" ? "OK" : check.status === "warn" ? "WARN" : check.status === "skipped" ? "SKIP" : "FAIL";
217
260
  console.log(` [${icon}] ${check.name}: ${check.message}`);
218
261
  if (check.reason)
219
262
  console.log(` Why: ${check.reason}`);
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAqBhE,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAChC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACxB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,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AAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;YAC9H,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3D,IAAI,KAAK,CAAC,MAAM;gBAAE,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7D,IAAI,KAAK,CAAC,GAAG;gBAAE,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;QAC1E,IAAI,CAAC,OAAO;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { Command } from "commander";
2
+ import { type DoctorDeps } from "./doctor.js";
3
+ export interface SetupStep {
4
+ id: string;
5
+ status: "pass" | "applied" | "warn" | "fail" | "skipped";
6
+ message: string;
7
+ reason?: string;
8
+ fixHint?: string;
9
+ }
10
+ export interface VerificationCheck {
11
+ name: string;
12
+ status: "pass" | "warn" | "fail" | "skipped";
13
+ message: string;
14
+ reason?: string;
15
+ fix?: string;
16
+ }
17
+ export interface SetupResult {
18
+ profile: "core" | "full";
19
+ platform: string;
20
+ ready: boolean;
21
+ steps: SetupStep[];
22
+ verification?: {
23
+ checks: VerificationCheck[];
24
+ };
25
+ }
26
+ export interface SetupDeps {
27
+ exec: (cmd: string) => string;
28
+ readFile: (path: string) => string | null;
29
+ writeFile: (path: string, content: string) => void;
30
+ exists: (path: string) => boolean;
31
+ platform?: NodeJS.Platform;
32
+ }
33
+ export declare function runSetup(deps: SetupDeps, opts: {
34
+ dryRun?: boolean;
35
+ full?: boolean;
36
+ doctorDeps?: DoctorDeps;
37
+ }): Promise<SetupResult>;
38
+ export declare function setupCommand(depsOverride?: SetupDeps): Command;
39
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAI/D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE;QACb,MAAM,EAAE,iBAAiB,EAAE,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,CAAC,GAAG,EAAE,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