@openrig/cli 0.6.13 → 0.6.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -6
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +11 -3
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +12 -32
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +17 -5
- package/daemon/context-packs/reference/getting-started.md +93 -16
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/whats-new.md +64 -93
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +11 -3
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +12 -32
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/tmux.js +1 -1
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/domain/claim-service.d.ts +9 -18
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +83 -0
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +2 -2
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +20 -14
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/fresh-occupant-relation.d.ts.map +1 -1
- package/daemon/dist/domain/fresh-occupant-relation.js +2 -1
- package/daemon/dist/domain/fresh-occupant-relation.js.map +1 -1
- package/daemon/dist/domain/topology-converge.d.ts +1 -0
- package/daemon/dist/domain/topology-converge.d.ts.map +1 -1
- package/daemon/dist/domain/topology-converge.js +1 -0
- package/daemon/dist/domain/topology-converge.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +4 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/wake-resolve-service.d.ts +1 -0
- package/daemon/dist/domain/wake-resolve-service.d.ts.map +1 -1
- package/daemon/dist/domain/wake-resolve-service.js +10 -0
- package/daemon/dist/domain/wake-resolve-service.js.map +1 -1
- package/daemon/dist/domain/wake-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/wake-resolver.js +7 -0
- package/daemon/dist/domain/wake-resolver.js.map +1 -1
- package/daemon/dist/routes/compaction.js +1 -1
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/sessions.js +35 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +6 -4
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +2 -5
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/getting-started.md +93 -16
- package/daemon/docs/reference/quickstart.md +187 -0
- package/daemon/docs/reference/whats-new.md +64 -93
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +7 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +28 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +13 -3
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +1 -0
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +5 -4
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +1 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +39 -16
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/reconcile-session.d.ts.map +1 -1
- package/dist/commands/reconcile-session.js +25 -4
- package/dist/commands/reconcile-session.js.map +1 -1
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +8 -1
- package/dist/commands/ui.js.map +1 -1
- package/dist/config-store.d.ts +2 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +5 -0
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +11 -3
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/front-door.d.ts.map +1 -1
- package/dist/front-door.js +3 -1
- package/dist/front-door.js.map +1 -1
- package/dist/local-daemon-owner.d.ts +28 -0
- package/dist/local-daemon-owner.d.ts.map +1 -0
- package/dist/local-daemon-owner.js +98 -0
- package/dist/local-daemon-owner.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+
OpenRig runs a team of coding agents (Claude Code, Codex and others) on your project, each in its own terminal. You
|
|
4
|
+
talk to one agent, and it hands work to the others. The team keeps its tasks and messages between sessions.
|
|
5
|
+
|
|
6
|
+
Most people let their coding agent set it up. This page explains what happens either way, so nothing is a black
|
|
7
|
+
box, and shows how to do each step by hand if you'd rather.
|
|
8
|
+
|
|
9
|
+
## How the pieces fit
|
|
10
|
+
|
|
11
|
+
- **`rig`** is the command you and your agents use. It comes from the npm package `@openrig/cli`.
|
|
12
|
+
- **The daemon** is a small background service on your machine. It keeps tasks, messages and state in a local
|
|
13
|
+
database. `rig daemon start` starts it.
|
|
14
|
+
- **tmux** runs each agent in its own terminal session. Agents keep running when you close a window, and one agent
|
|
15
|
+
can type into another's terminal.
|
|
16
|
+
- **The kernel** is OpenRig's own small team, which starts with the daemon. You talk to its **operator**, which
|
|
17
|
+
starts and runs teams for you. Its **advisor** helps you think through what you want.
|
|
18
|
+
- **Your team** (a *rig*) is the set of agents that work on your project, such as `starter`.
|
|
19
|
+
- **The OpenRig view** is a terminal window with the operator and, beside it or on another page, a dashboard of your
|
|
20
|
+
agents.
|
|
21
|
+
|
|
22
|
+
## What you need
|
|
23
|
+
|
|
24
|
+
- macOS or Linux. On Windows, use WSL2 ([one person's working setup](getting-started.md#wsl2-a-reported-working-setup)).
|
|
25
|
+
- Node.js 22 or 24 (on Apple silicon, Node.js 22) and tmux.
|
|
26
|
+
- Claude Code or Codex, signed in. One is enough to start.
|
|
27
|
+
|
|
28
|
+
If `node --version` does not show a supported version, first check your existing Node installation and PATH.
|
|
29
|
+
Ask your coding agent to help use the toolchain already on your machine. On a Mac, a shared Homebrew installation
|
|
30
|
+
may belong to another user; do not change its ownership to complete this setup. After correcting PATH or installing
|
|
31
|
+
Node, open a new terminal and check `node --version` and `npx --version` before continuing.
|
|
32
|
+
|
|
33
|
+
## The quick way: let your coding agent do it
|
|
34
|
+
|
|
35
|
+
In your project folder, add OpenRig's `rigs` skill to the agent you use:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
# Claude Code
|
|
39
|
+
npx skills add https://github.com/mvschwarz/openrig/tree/<release-tag>/skills/rigs --skill rigs --agent claude-code
|
|
40
|
+
# Codex
|
|
41
|
+
npx skills add https://github.com/mvschwarz/openrig/tree/<release-tag>/skills/rigs --skill rigs --agent codex
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For a new install, use the latest release's tag, for example `v0.6.14`. If OpenRig is already installed, use the tag
|
|
45
|
+
that matches `rig --version`, or upgrade first. If the command fails with `npx: command not found`, Node.js isn't
|
|
46
|
+
installed or isn't on your PATH yet (see above). Then type `/rigs` in Claude Code, or `$rigs` in Codex, and say what
|
|
47
|
+
you want built.
|
|
48
|
+
|
|
49
|
+
The skill has your agent work through the steps below in order. It says what it will run and change before it runs
|
|
50
|
+
it, and it asks before installing anything on your system. It finishes when you're talking to the operator.
|
|
51
|
+
|
|
52
|
+
## What happens, step by step
|
|
53
|
+
|
|
54
|
+
Each step shows the command, so you can run it yourself.
|
|
55
|
+
|
|
56
|
+
### 1. Install the `rig` command
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
npm install -g @openrig/cli
|
|
60
|
+
rig --version
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This installs the CLI globally under your npm prefix. `rig --version` prints the version and a commit, such as
|
|
64
|
+
`0.6.12 (9e5382dd)`. With npm 11 or later, an `npm warn install-scripts` line is expected: it means only the
|
|
65
|
+
Node.js and SQLite check was skipped.
|
|
66
|
+
|
|
67
|
+
### 2. Set up the tools around it
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
rig setup --providers claude # or codex, or both
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Add `--dry-run` first to see the plan without changing anything. Setup does four things:
|
|
74
|
+
- it checks Node.js, tmux and your sign-in;
|
|
75
|
+
- it installs a missing tmux (with Homebrew on macOS, if you have it) or the coding agent you chose;
|
|
76
|
+
- it installs Herdr, a terminal workspace app the OpenRig view can use, unless you add `--no-herdr`;
|
|
77
|
+
- it adds an OpenRig block to `~/.tmux.conf` (mouse support and longer scrollback).
|
|
78
|
+
|
|
79
|
+
It doesn't start anything. It ends with a summary of what's done and what still needs you. A missing sign-in shows
|
|
80
|
+
there: run `claude auth login` or `codex login`, then carry on.
|
|
81
|
+
|
|
82
|
+
### 3. Start OpenRig
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
rig daemon start
|
|
86
|
+
rig status
|
|
87
|
+
rig ps --nodes --rig kernel
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The daemon starts and boots the kernel with the coding agents you're signed in to, or both if you're signed in to both.
|
|
91
|
+
|
|
92
|
+
**What starting OpenRig changes, for the coding agents you use** (paths are the usual defaults):
|
|
93
|
+
- **For Codex:** hooks and trust in `~/.codex/config.toml`, when OpenRig or a Codex agent starts.
|
|
94
|
+
- **For Claude Code:** workspace trust in `~/.claude.json`, and activity hooks in the project's
|
|
95
|
+
`.claude/settings.local.json`, plus a status line unless you already have your own.
|
|
96
|
+
- **For both:** small discovery skills in `~/.claude/skills` and `~/.agents/skills`.
|
|
97
|
+
- **Kernel access:** by default the kernel gets broader permissions than a project team gets by default. On Codex
|
|
98
|
+
that's full access with no approval prompts. On Claude Code, its file tools, web fetches and operational commands,
|
|
99
|
+
including reads under your home folder, run without asking. A permission policy, per-agent choice or Codex profile
|
|
100
|
+
changes that.
|
|
101
|
+
|
|
102
|
+
OpenRig doesn't guarantee it can preserve or roll back these files, so back them up first. [Everything OpenRig writes, and why](../../README.md#what-openrig-changes-on-your-machine).
|
|
103
|
+
|
|
104
|
+
Started isn't the same as ready. `rig status` shows a `Kernel:` line, and `rig ps --nodes --rig kernel` shows each
|
|
105
|
+
kernel agent's state. They can take a moment after the daemon is up.
|
|
106
|
+
|
|
107
|
+
### 4. Open the OpenRig view
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
rig terminal open saved:kernel --window
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**What you'll see:**
|
|
114
|
+
- **Where it opens:** a new terminal window or tab. If your agent is already running inside Herdr, it opens a new
|
|
115
|
+
Herdr space instead. It uses Herdr when installed, plain tmux otherwise.
|
|
116
|
+
- **Layout:** in a narrow window, or when the width can't be measured, the operator fills the first page. From 120
|
|
117
|
+
columns, the dashboard and the operator share it. The advisor has its own tab.
|
|
118
|
+
- **On a Mac:** you may be asked to let your terminal app be controlled. Allowing it is fine.
|
|
119
|
+
- **Over SSH or with no display:** the window can't open. The command says why and, where it can, prints a command
|
|
120
|
+
to run in a new terminal. Otherwise your agent works out the exact command to join the operator.
|
|
121
|
+
|
|
122
|
+
You're installed when you're talking to the operator.
|
|
123
|
+
|
|
124
|
+
### 5. Start your first team
|
|
125
|
+
|
|
126
|
+
Tell the operator what you want built, and in which folder. It recommends one of three teams:
|
|
127
|
+
- `starter`: a builder and a reviewer, for one bounded change;
|
|
128
|
+
- `workshop`: a lead, a builder, QA and a reviewer, for ongoing work in one repository;
|
|
129
|
+
- `factory`: seven agents, for sustained product work.
|
|
130
|
+
|
|
131
|
+
Before it starts one, it tells you what starting a team in your folder changes: managed guidance in `AGENTS.md` or
|
|
132
|
+
`CLAUDE.md`, plus the team's skills. Then it waits for your yes. As shipped, `starter` uses both Claude Code and
|
|
133
|
+
Codex. With only one of them, ask the operator to adapt it.
|
|
134
|
+
|
|
135
|
+
By hand, from your repository:
|
|
136
|
+
|
|
137
|
+
```sh
|
|
138
|
+
rig up starter --cwd . --plan # check what it would start
|
|
139
|
+
rig up starter --cwd .
|
|
140
|
+
rig ps --nodes --rig starter
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
If an agent stops at a sign-in, trust or permission prompt, `rig up` reports `Status: partial` and names the prompt.
|
|
144
|
+
Answer it in that agent's terminal, then run the `rig seat continue <seat>` command it prints. The team is ready
|
|
145
|
+
for work once its agents show as ready in `rig ps --nodes --rig starter`.
|
|
146
|
+
|
|
147
|
+
### 6. Give the team work, and stop it
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
rig send dev-build@starter 'Fix <one useful thing>. Ask dev-review to check it, and record the result and how I can try it.'
|
|
151
|
+
rig queue list --destination dev-build@starter
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The builder records the work as a task, so you can follow it with `rig queue`. When you're done, `rig down starter`
|
|
155
|
+
stops that team. `rig daemon stop` stops the background service and leaves agent sessions running.
|
|
156
|
+
|
|
157
|
+
## The one-command install
|
|
158
|
+
|
|
159
|
+
Instead of steps 1 and 2:
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
curl -fsSL https://openrig.dev/install.sh | sh -s -- --dry-run # shows the plan and changes nothing
|
|
163
|
+
curl -fsSL https://openrig.dev/install.sh | sh
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
It checks Node.js and npm, installs the latest `@openrig/cli`, then runs `rig setup`. It doesn't know which coding agent
|
|
167
|
+
you use, so it checks and may install both. For just one, use steps 1 and 2. If a sign-in is missing, setup reports
|
|
168
|
+
it as the step to finish: sign in, then continue at step 3.
|
|
169
|
+
|
|
170
|
+
## What these words mean
|
|
171
|
+
|
|
172
|
+
- **Rig:** a team of agents, started with one command. Your first one is usually `starter`.
|
|
173
|
+
- **Seat:** one agent's role and address in a team, such as `dev-build@starter`.
|
|
174
|
+
- **Harness:** the software around the model that an agent runs in: Claude Code, Codex or Pi.
|
|
175
|
+
- **Kernel:** OpenRig's own small team, which starts with OpenRig. It isn't your project's team.
|
|
176
|
+
- **Operator:** the kernel's agent you talk to first. It recommends a team for your goal and starts it when you say
|
|
177
|
+
yes.
|
|
178
|
+
- **Advisor:** the kernel's agent for thinking through what you want before a team starts. It has its own tab.
|
|
179
|
+
- **OpenRig view:** the terminal view that opens on the operator. In a wide window the dashboard sits beside it;
|
|
180
|
+
otherwise, or when the width can't be measured, the dashboard is on its own page. `saved:kernel` in
|
|
181
|
+
`rig terminal open saved:kernel` is the name of this saved view.
|
|
182
|
+
|
|
183
|
+
## More
|
|
184
|
+
|
|
185
|
+
- **Every detail of setup:** troubleshooting, permissions, headless and SSH use, and what can stop the view from
|
|
186
|
+
opening. See the [setup reference](getting-started.md).
|
|
187
|
+
- **Stuck?** Run `rig context get help`, or read [Help](help.md).
|
|
@@ -1,116 +1,87 @@
|
|
|
1
|
-
# What changed in OpenRig 0.6.
|
|
1
|
+
# What changed in OpenRig 0.6.14
|
|
2
2
|
|
|
3
|
-
This note is for an agent on an install that was just upgraded to 0.6.
|
|
4
|
-
0.6.
|
|
3
|
+
This note is for an agent on an install that was just upgraded to 0.6.14. It lists only what behaves differently from
|
|
4
|
+
0.6.13 and what to do about it. For everything OpenRig can do, read the capability map:
|
|
5
5
|
`rig context get onboarding-width/public-what-you-can-do.md`. Each release replaces this file, so
|
|
6
6
|
`rig context get reference/whats-new.md` describes the installed version once the upgraded daemon is running. Without
|
|
7
7
|
a running daemon, read `$OPENRIG_HOME/reference/whats-new.md`. The daemon refreshes that copy when it starts, so right
|
|
8
|
-
after an upgrade it can still hold the previous version's note.
|
|
8
|
+
after an upgrade it can still hold the previous version's note. Coming from 0.6.12 or earlier, also read 0.6.13's
|
|
9
|
+
release notes: its changes and migration `117` arrive with this upgrade.
|
|
9
10
|
|
|
10
11
|
## After the upgrade
|
|
11
12
|
|
|
12
|
-
- **Restart the daemon** (`rig daemon stop`, then `rig daemon start`).
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **The bundled openrig-core plugin goes from 0.1.13 to 0.1.14.** Generated Claude hook commands in a project's
|
|
17
|
-
`.claude/settings.local.json` call the daemon's Node by its absolute path; existing bare-`node` entries refresh on
|
|
18
|
-
their own, and a person's wrapper is kept. The plugin's own manifest hooks still call bare `node`.
|
|
19
|
-
- **Seats pick up some changes only at their next launch:** a Pi seat's `effort` (sent as `--thinking`), a managed
|
|
20
|
-
Claude seat's `EDITOR`, `VISUAL`, `DISPLAY`, `XAUTHORITY` and `WAYLAND_DISPLAY`, and the shipped agent specs' role
|
|
21
|
-
file as the seat's role. Use `rig seat launch <seat> --fresh --stop --reason "<why>"` only when the person wants it
|
|
22
|
-
now; don't relaunch a working team just to pick these up.
|
|
23
|
-
- **Slack recovery's first pass after the upgrade** scans tracked threads inside the seven-day window once from their
|
|
24
|
-
root. Replies that already landed aren't delivered twice; recovered ones land as late rows that never answer a
|
|
25
|
-
decision.
|
|
13
|
+
- **Restart the daemon** (`rig daemon stop`, then `rig daemon start`). No migration runs. One setting is added,
|
|
14
|
+
`transport.local_user_guard`, off by default (see below).
|
|
15
|
+
- **The bundled openrig-core plugin goes from 0.1.14 to 0.1.15.** Installed copies are replaced and carry refocus's own
|
|
16
|
+
notes lookup.
|
|
26
17
|
|
|
27
18
|
## Output that changed shape
|
|
28
19
|
|
|
29
|
-
- **`rig
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- **`rig
|
|
34
|
-
|
|
35
|
-
`hint`). It's a heuristic: `unknown` means unknown.
|
|
36
|
-
- **`rig provider status`** rows carry a sign-in fact (`usable`, `needs sign-in`, `unknown`; JSON `signIn`). A
|
|
37
|
-
signed-in Claude login never reads better than `unknown`. A signed-out Codex login reports `not_signed_in`, not
|
|
38
|
-
`rpc_error`.
|
|
39
|
-
- **`rig provider status`** (with `provider.usage_windows` on) Codex rows keep their last reading across a daemon
|
|
40
|
-
restart as history (`retained: "before_restart"`), labelled "kept from before the daemon restarted; not a current
|
|
41
|
-
reading", with availability unknown until a fresh read. Rows add `accountHistory` (`linked`, or `unknown`; every
|
|
42
|
-
Claude row is `unknown`), `lastObservedExhausted`, `retained` and, on an inactive account, `savedProfile: "not
|
|
43
|
-
linked"`. A window whose reset has passed gains `expectation`: planning, not a reading. Run `rig provider status
|
|
44
|
-
--refresh` before telling anyone an account has room.
|
|
45
|
-
- **`rig send`** can refuse with `caller_cancelled` (HTTP 409, `sent: false`, `inputPhase: "not_reached"`) when its
|
|
46
|
-
caller went away before input started.
|
|
47
|
-
- **`rig seat restart --keep-conversation`** reports name a Codex startup screen: `Codex startup gate (<kind>): …`, and
|
|
48
|
-
JSON gains `codexNoDaemonFlag`, `processMode` (always `unknown` for now) and `account.startupGateKind`.
|
|
49
|
-
- **`rig restore-check`**'s hook check can read `ready_with_caveats` where it read green; the exit code is still 0.
|
|
50
|
-
- **`GET /api/attention`** adds `queue-update:<qitemId>` items and a `"queue updates"` source.
|
|
51
|
-
- **The node-detail API's `targetPath`** names the file a guidance block is really in, or `""`; `declaredTarget` and
|
|
52
|
-
`effectiveTarget` are new.
|
|
53
|
-
- **`rig grow --json`'s `rigId`** is the resolved id, and `rig grow` and `rig remove` can return `rig_ambiguous`.
|
|
54
|
-
- **The one-line installer** ends with `INSTALLED, SETUP NOT COMPLETE (exit N)` when `rig setup` isn't ready.
|
|
20
|
+
- **`rig ask --wake`** on a seat whose runtime isn't Claude or Codex prints `Wake runtime '<runtime>' … is not
|
|
21
|
+
supported. Supported runtimes are claude and codex.` A `member@rig` target exits 2 (the daemon refuses it); a raw-id
|
|
22
|
+
`--runtime` value exits 1 (the CLI refuses it). No wake starts.
|
|
23
|
+
- **`/healthz`** gains `euid`, the daemon's effective user ID, beside `pid`, whether or not the Mac check is on.
|
|
24
|
+
- **`rig compact`** (manual) waits up to 240 seconds for its result, up from 180, because preparation now has 180
|
|
25
|
+
seconds, up from 120.
|
|
55
26
|
|
|
56
27
|
## Seats and restore
|
|
57
28
|
|
|
58
|
-
- **A
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- **
|
|
67
|
-
|
|
68
|
-
- **
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
## Sends, wakes and the queue
|
|
72
|
-
|
|
73
|
-
- **A send whose caller went away** types nothing, then or later, if no input had started.
|
|
74
|
-
- **An old numbered menu in a Codex pane's scrollback** no longer blocks a send when a complete empty input box sits
|
|
75
|
-
below the status row.
|
|
76
|
-
- **An OMP seat** whose turn ended with a typed transient provider failure (408, 429, 500, 502, 503, 504 or 529) can
|
|
77
|
-
take an ordinary `rig send` retry; nothing retries on its own.
|
|
78
|
-
- **Parked rows for one seat that fall due in the same pass** arrive as one message naming each row.
|
|
79
|
-
- **A stuck-item finding on a person's item that an agent closed** goes to that agent, not the person.
|
|
80
|
-
- **`rig queue list --state "pending, in-progress"`** matches both states.
|
|
29
|
+
- **A seat that refuses every send with "Managed pane identity unavailable or changed; no input written."** because an
|
|
30
|
+
older OpenRig never recorded its tmux pane can be repaired in place: `rig reconcile-session <seat>
|
|
31
|
+
--repair-missing-pane --no-launch`. It fills only the missing pane and keeps the session, resume token and occupant
|
|
32
|
+
generation; the result names the same session, with continuity unverified. It refuses, writing nothing, with
|
|
33
|
+
`repair_not_applicable` (the binding already has a pane), `pane_ambiguous` (more than one pane or window),
|
|
34
|
+
`pane_missing` (no PID), `guard_target_changed`, `guard_operation_in_progress`, `typing_guard_enabled` or
|
|
35
|
+
`repair_timed_out`. Against an older daemon it reads `repair_missing_pane_unsupported` and never adopts. It records no
|
|
36
|
+
event.
|
|
37
|
+
- **A manual `rig compact` whose preparation stops at an ordinary approval** keeps waiting within its deadline instead
|
|
38
|
+
of giving up. OpenRig never answers the approval: the person, or an agent allowed to, answers it.
|
|
39
|
+
- **Refocus resolves each ancestor's notes file itself** (`NOTES.md`, then `MISSION_NOTES.md`) instead of starting `rig
|
|
40
|
+
scope resolve-notes` per ancestor. Its output, budgets and settings are unchanged.
|
|
81
41
|
|
|
82
42
|
## New things you can do
|
|
83
43
|
|
|
84
|
-
- **
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- **See which model a seat was using:** `rig ps --nodes`, `rig roster show`, `rig roster find`.
|
|
90
|
-
- **Use a rig name in `rig grow` and `rig remove`.**
|
|
91
|
-
- **Slack:** missed messages in mapped channels, recent threads and relayed channels are recovered; `rig slack status`
|
|
92
|
-
shows a line per channel and a thread line.
|
|
44
|
+
- **Repair a missing pane without adopting:** `rig reconcile-session <seat> --repair-missing-pane --no-launch`.
|
|
45
|
+
- **Point a person at a page written for them:** `docs/reference/quickstart.md` ("Getting started") is the first-use
|
|
46
|
+
page, with a glossary. `docs/reference/getting-started.md` is now titled "OpenRig setup reference" and opens with what
|
|
47
|
+
the agent doing the setup needs; its sections and anchors are unchanged, so `rig context get
|
|
48
|
+
reference/getting-started.md#…` lookups still work.
|
|
93
49
|
|
|
94
50
|
## Off by default
|
|
95
51
|
|
|
96
|
-
- **
|
|
97
|
-
|
|
52
|
+
- **A Mac local-user check.** On a Mac shared by several accounts, `rig config set transport.local_user_guard true` (or
|
|
53
|
+
`OPENRIG_TRANSPORT_LOCAL_USER_GUARD=true` in the CLI's environment) makes the CLI refuse a local daemon another account
|
|
54
|
+
runs. It compares the PID and effective UID the daemon reports in `/healthz` with two `ps` readings and a second
|
|
55
|
+
health response, and refuses only when they agree on another account; the refusal names `rig daemon start --port
|
|
56
|
+
<unused-port>`. Missing, disagreeing or timed-out evidence, and an older daemon without `euid`, keep today's
|
|
57
|
+
behaviour. No daemon restart is needed. Explicit `OPENRIG_URL` targets and registered remote hosts keep their routing,
|
|
58
|
+
later browser or TUI connections aren't checked, and with it on `sudo rig …` against a user-owned daemon refuses. It
|
|
59
|
+
isn't authentication: it trusts the daemon's own report. Details: `rig context get
|
|
60
|
+
reference/getting-started.md#optional-mac-local-user-check`.
|
|
98
61
|
|
|
99
62
|
## What to stop doing
|
|
100
63
|
|
|
101
|
-
- **Don't
|
|
102
|
-
|
|
103
|
-
- **Don't
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
64
|
+
- **Don't use plain `rig reconcile-session` to fix a launched seat's missing pane.** It adopts the seat into a new
|
|
65
|
+
session with no resume token; use `--repair-missing-pane --no-launch`.
|
|
66
|
+
- **Don't abandon a manual `rig compact` because preparation hit an approval.** Answer it, or ask the person to, within
|
|
67
|
+
the 180 seconds.
|
|
68
|
+
- **Don't try `rig ask --wake` on a Pi or custom seat.** Use `rig ask` without `--wake` to search what it said, or send
|
|
69
|
+
to the live seat.
|
|
70
|
+
|
|
71
|
+
## Known gaps in 0.6.14
|
|
72
|
+
|
|
73
|
+
- **The compaction and refocus fixes** are tested without a native compaction or a loaded machine: confirm a
|
|
74
|
+
compaction by its restore request or the drop in context, and check that a restored seat is really working.
|
|
75
|
+
- **The pane repair refuses while typing protection is on.** The compaction refusal for a protected seat whose pane
|
|
76
|
+
isn't recorded still suggests plain `rig reconcile-session <seat> --no-launch`, which adopts. For a running launched
|
|
77
|
+
seat whose pane was never recorded, use `rig reconcile-session <seat> --repair-missing-pane --no-launch` instead;
|
|
78
|
+
it needs typing protection off, so turn protection off only if the person agrees. A delivery held from before the
|
|
79
|
+
repair can still refuse.
|
|
80
|
+
- **`rig context get reference/quickstart.md` doesn't resolve:** the page isn't in the reference context pack. Read it
|
|
81
|
+
from the package's `docs/reference/` or the repository.
|
|
108
82
|
- **On a Mac with more than one user account,** a second user's `rig` commands can reach the first user's daemon on
|
|
109
|
-
its default port (7433)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- **One Slack app across machines** hasn't run on two real machines, and Slack recovery doesn't catch up older open
|
|
115
|
-
threads.
|
|
116
|
-
- **`rig seat set-cwd`** checks the new folder once; switch promptly.
|
|
83
|
+
its default port (7433) unless `transport.local_user_guard` is on. The check trusts the daemon's own report, identity
|
|
84
|
+
can change between the check and the connection, and direct HTTP clients aren't covered.
|
|
85
|
+
- **0.6.13's other known gaps still apply:** a fresh in-place Claude handover can report ready early when the screen,
|
|
86
|
+
pane or process can't be read or proven; one Slack app across machines hasn't run on two real machines, and Slack
|
|
87
|
+
recovery doesn't catch up older open threads; `rig seat set-cwd` checks the new folder once.
|
package/dist/build-info.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// GENERATED by scripts/build-package.sh — the packaged build-identity stamp.
|
|
2
2
|
export const BUILD_INFO = {
|
|
3
|
-
semver: "0.6.
|
|
4
|
-
commit: "
|
|
3
|
+
semver: "0.6.14",
|
|
4
|
+
commit: "df1c1517f03a403fb468523be1c563d489209a1d",
|
|
5
5
|
dirty: false,
|
|
6
|
-
builtAt: "2026-10-
|
|
6
|
+
builtAt: "2026-10-21T05:06:10Z",
|
|
7
7
|
};
|
|
8
8
|
export function stampFields(info = BUILD_INFO) {
|
|
9
9
|
if (!info.commit) return {};
|
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type LocalDaemonOwner } from "./local-daemon-owner.js";
|
|
2
|
+
export { ForeignLocalDaemonError } from "./local-daemon-owner.js";
|
|
1
3
|
export declare function terminalAuthHeaders(): Record<string, string>;
|
|
2
4
|
/** The header carrying the caller's seat identity, derived ONCE at the transport chokepoint. */
|
|
3
5
|
export declare const SENDER_IDENTITY_HEADER = "X-OpenRig-Session";
|
|
@@ -59,6 +61,7 @@ interface DaemonRequestOptions {
|
|
|
59
61
|
headers?: Record<string, string>;
|
|
60
62
|
}
|
|
61
63
|
interface DaemonClientOptions {
|
|
64
|
+
ownerProbe?: (baseUrl: string, timeoutMs?: number) => Promise<LocalDaemonOwner>;
|
|
62
65
|
fetchImpl?: typeof fetch;
|
|
63
66
|
timeoutMs?: number;
|
|
64
67
|
}
|
|
@@ -66,6 +69,7 @@ export declare class DaemonClient {
|
|
|
66
69
|
readonly baseUrl: string;
|
|
67
70
|
private fetchImpl;
|
|
68
71
|
private timeoutMs;
|
|
72
|
+
private ownerProbe;
|
|
69
73
|
/** Set by remoteDaemonClient; absent origin is labelled explicitly on remote requests. */
|
|
70
74
|
originSelfHostId?: string;
|
|
71
75
|
remoteTarget: boolean;
|
|
@@ -73,6 +77,9 @@ export declare class DaemonClient {
|
|
|
73
77
|
private originUnknown;
|
|
74
78
|
private identityHeaders;
|
|
75
79
|
constructor(baseUrl?: string, options?: DaemonClientOptions);
|
|
80
|
+
/** Shared with raw CLI data readers. Constructor URLs alone do not establish explicit intent. */
|
|
81
|
+
localOwnerCheckEnabled(): boolean;
|
|
82
|
+
assertLocalOwner(timeoutMs?: number): Promise<void>;
|
|
76
83
|
get<T = unknown>(path: string, options?: DaemonRequestOptions): Promise<DaemonResponse<T>>;
|
|
77
84
|
getText(path: string, options?: DaemonRequestOptions): Promise<DaemonResponse<string>>;
|
|
78
85
|
post<T = unknown>(path: string, body?: unknown, options?: DaemonRequestOptions): Promise<DaemonResponse<T>>;
|
|
@@ -84,5 +91,4 @@ export declare class DaemonClient {
|
|
|
84
91
|
private requestJson;
|
|
85
92
|
private requestText;
|
|
86
93
|
}
|
|
87
|
-
export {};
|
|
88
94
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|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B,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;YAoDL,WAAW;YAgBX,WAAW;CAK1B"}
|
package/dist/client.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
+
import { assessLocalDaemonOwner, ForeignLocalDaemonError } from "./local-daemon-owner.js";
|
|
3
|
+
export { ForeignLocalDaemonError } from "./local-daemon-owner.js";
|
|
2
4
|
import path from "node:path";
|
|
3
5
|
import { ConfigStore } from "./config-store.js";
|
|
4
6
|
import { getOpenRigHome, readOpenRigEnv } from "./openrig-compat.js";
|
|
@@ -126,6 +128,7 @@ export class DaemonClient {
|
|
|
126
128
|
baseUrl;
|
|
127
129
|
fetchImpl = fetch;
|
|
128
130
|
timeoutMs = 5_000;
|
|
131
|
+
ownerProbe;
|
|
129
132
|
/** Set by remoteDaemonClient; absent origin is labelled explicitly on remote requests. */
|
|
130
133
|
originSelfHostId;
|
|
131
134
|
remoteTarget = false;
|
|
@@ -191,8 +194,30 @@ export class DaemonClient {
|
|
|
191
194
|
}
|
|
192
195
|
}
|
|
193
196
|
this.fetchImpl = options?.fetchImpl ?? fetch;
|
|
197
|
+
this.ownerProbe = options?.ownerProbe ?? ((url, timeoutMs) => assessLocalDaemonOwner(url, { fetchImpl: this.fetchImpl, timeoutMs }));
|
|
194
198
|
this.timeoutMs = options?.timeoutMs ?? 5_000;
|
|
195
199
|
}
|
|
200
|
+
/** Shared with raw CLI data readers. Constructor URLs alone do not establish explicit intent. */
|
|
201
|
+
localOwnerCheckEnabled() {
|
|
202
|
+
if (this.remoteTarget)
|
|
203
|
+
return false;
|
|
204
|
+
const explicit = readOpenRigEnv("OPENRIG_URL", "RIGGED_URL");
|
|
205
|
+
if (explicit && explicit.replace(/\/+$/, "") === this.baseUrl.replace(/\/+$/, ""))
|
|
206
|
+
return false;
|
|
207
|
+
let enabled = false;
|
|
208
|
+
try {
|
|
209
|
+
enabled = new ConfigStore().resolveWithSource("transport.local_user_guard").value === true;
|
|
210
|
+
}
|
|
211
|
+
catch { /* Unreadable owner evidence/config is not a new default-on refusal. */ }
|
|
212
|
+
return enabled;
|
|
213
|
+
}
|
|
214
|
+
async assertLocalOwner(timeoutMs = 1000) {
|
|
215
|
+
if (!this.localOwnerCheckEnabled())
|
|
216
|
+
return;
|
|
217
|
+
const owner = await this.ownerProbe(this.baseUrl, timeoutMs);
|
|
218
|
+
if (owner.state === "foreign")
|
|
219
|
+
throw new ForeignLocalDaemonError(this.baseUrl, owner);
|
|
220
|
+
}
|
|
196
221
|
async get(path, options) {
|
|
197
222
|
return this.requestJson(path, { method: "GET" }, options);
|
|
198
223
|
}
|
|
@@ -236,6 +261,9 @@ export class DaemonClient {
|
|
|
236
261
|
}, options);
|
|
237
262
|
}
|
|
238
263
|
async fetch(path, init, options, consumeResponse) {
|
|
264
|
+
// Diagnostic health/status remains reachable even for a known foreign listener.
|
|
265
|
+
if (path.split("?")[0] !== "/healthz")
|
|
266
|
+
await this.assertLocalOwner();
|
|
239
267
|
const timeoutMs = options?.timeoutMs ?? this.timeoutMs;
|
|
240
268
|
if (options?.signal)
|
|
241
269
|
init = { ...init, signal: options.signal };
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,MAAM,UAAU,mBAAmB;IACjC,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC;AAED,gGAAgG;AAChG,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,gBAAyB;IAC7D,MAAM,OAAO,GAAG,cAAc,CAAC,sBAAsB,EAAE,qBAAqB,CAAC,EAAE,IAAI,EAAE,CAAC;IACtF,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,yEAAyE;IAC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K,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA2E9C,wBAAgB,UAAU,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../../src/commands/ask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA2E9C,wBAAgB,UAAU,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAmO7D"}
|
package/dist/commands/ask.js
CHANGED
|
@@ -58,8 +58,11 @@ Examples:
|
|
|
58
58
|
|
|
59
59
|
Exit codes:
|
|
60
60
|
0 Success
|
|
61
|
-
1 Daemon not running,
|
|
62
|
-
|
|
61
|
+
1 Daemon not running, the rig is unknown or ambiguous, or --runtime or
|
|
62
|
+
--wake-timeout is invalid
|
|
63
|
+
2 Failed to fetch data from daemon; the --wake seat has no such tenure, or its
|
|
64
|
+
tenure isn't Claude or Codex or has no resume token; or the wake failed or
|
|
65
|
+
timed out`);
|
|
63
66
|
const getDeps = () => depsOverride ?? {
|
|
64
67
|
lifecycleDeps: realDeps(),
|
|
65
68
|
clientFactory: (url) => new DaemonClient(url),
|
|
@@ -81,7 +84,7 @@ Exit codes:
|
|
|
81
84
|
return;
|
|
82
85
|
}
|
|
83
86
|
let token = target;
|
|
84
|
-
let runtime = opts.runtime
|
|
87
|
+
let runtime = opts.runtime ?? "claude";
|
|
85
88
|
if (target.includes("@")) {
|
|
86
89
|
const status = await getDaemonStatus(deps.lifecycleDeps);
|
|
87
90
|
// B8-1b chokepoint (missed-site fix): the shared guard renders the epistemic
|
|
@@ -113,6 +116,13 @@ Exit codes:
|
|
|
113
116
|
token = resolution.token;
|
|
114
117
|
runtime = resolution.runtime;
|
|
115
118
|
}
|
|
119
|
+
if (runtime === "claude-code")
|
|
120
|
+
runtime = "claude";
|
|
121
|
+
if (runtime !== "claude" && runtime !== "codex") {
|
|
122
|
+
console.error(`Wake runtime '${runtime || "unknown"}' is not supported. Supported runtimes are claude and codex.`);
|
|
123
|
+
process.exitCode = 1;
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
116
126
|
const runner = deps.wakeRunner ?? defaultWakeRunner;
|
|
117
127
|
const fileLocator = deps.wakeFileLocator ?? defaultWakeFileLocator;
|
|
118
128
|
const outcome = await runWake({ runner, fileLocator }, { question, token, runtime, timeoutMs });
|