@kilogent/runner-dev 0.1.3 → 0.1.4

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 (3) hide show
  1. package/README.md +37 -11
  2. package/dist/cli.js +1348 -195
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -5,7 +5,8 @@ workspace.
5
5
 
6
6
  Crew agents don't run in the cloud. They run **on your machine**, in your checkouts, with your
7
7
  tools. This daemon is what makes that happen: it watches the job queues of the Ships you assign it
8
- to, claims work oldest-first, and executes each job as a headless Claude session.
8
+ to, claims work oldest-first, and executes each job as a headless agent session on the engine the
9
+ agent runs on.
9
10
 
10
11
  ```bash
11
12
  npm i -g @kilogent/runner
@@ -30,13 +31,26 @@ each publishes only a `latest` tag, and a machine changes environment by install
30
31
  | | |
31
32
  |---|---|
32
33
  | **Node.js** | 20 or newer |
33
- | **Claude Code** | the `claude` CLI on your `PATH` ([install](https://claude.com/claude-code)) |
34
+ | **An engine CLI** | the CLI of every engine your agents run on, on your `PATH` — see [Engines](#engines) |
34
35
  | **git / gh** | only if your agents work on GitHub repositories |
35
36
  | **A Lumi Crew account** | with at least one Ship — [app.kilogent.com](https://app.kilogent.com) |
36
37
 
37
38
  The daemon is a *client*. It signs in as you, and every write it makes is checked server-side
38
39
  against your Ship membership. No service-account key ever touches your machine.
39
40
 
41
+ ## Engines
42
+
43
+ An agent runs on an **engine** — the CLI that actually holds the session. The daemon spawns the
44
+ engine's binary per job, and `doctor` checks that every engine a Ship's agents use is installed.
45
+
46
+ | Engine | Binary | Credential |
47
+ |---|---|---|
48
+ | Claude Code | `claude` ([install](https://claude.com/claude-code)) | a `claude setup-token`, pasted once per Ship in the Crew app |
49
+ | Codex CLI | `codex` ([install](https://developers.openai.com/codex)) | a **machine sign-in**: a captain picks this machine in the Crew app, the daemon runs `codex login --device-auth`, and the captain approves the code on a phone. The login stays on this machine — see [Credentials](#credentials). |
50
+
51
+ Each engine's binary can be overridden with `CREW_<ENGINE>_BIN` (`CREW_CLAUDE_BIN`), which is also
52
+ how the test suites substitute a deterministic fake.
53
+
40
54
  ## Connect a machine
41
55
 
42
56
  ```bash
@@ -113,7 +127,7 @@ from a hang.
113
127
  ### `doctor`
114
128
 
115
129
  Run this first when something isn't working. Everything it checks used to be discovered *inside a
116
- running job*, surfacing as a failed task on your board minutes later: a missing `claude` binary,
130
+ running job*, surfacing as a failed task on your board minutes later: a missing engine binary,
117
131
  unsaved Ship credentials, a machine no captain approved. It checks Node ≥ 20, your stored session,
118
132
  per-Ship approval and credentials, the engine binary, `git`/`gh` when an agent uses GitHub, server
119
133
  reachability, the background service, whether that service still points at a CLI that exists, and
@@ -162,8 +176,8 @@ kilogent-runner config list # what is set, and what
162
176
  The machine number is a ceiling, not a total: three Ships at `2` each on a machine set to `3` will
163
177
  never run more than three sessions. A Ship with no number of its own may use the whole machine.
164
178
 
165
- Each job is a separate `claude` process with its own empty working directory, so they don't share
166
- state — but they do share your CPU, your RAM and your Claude usage window. Start at 2 and watch a
179
+ Each job is a separate engine process with its own empty working directory, so they don't share
180
+ state — but they do share your CPU, your RAM and your subscription's usage window. Start at 2 and watch a
167
181
  real job before going higher. Restart the daemon (`kilogent-runner service restart`) to pick up a change.
168
182
 
169
183
  ## MCP servers that run on this machine
@@ -246,12 +260,23 @@ always as a warning — being out of date never fails the preflight.
246
260
 
247
261
  ## Credentials
248
262
 
249
- Agent-session credentials — the Claude token and, if your agents use GitHub, a token for that — are
250
- **not** stored on this machine. A captain saves them once per Ship in the Crew app's Ship Settings,
251
- and the daemon fetches them at job time, injects them into the session environment, and redacts them
252
- from the transcript before upload. `kilogent-runner doctor` tells you when a Ship is missing them.
263
+ Agent-session credentials — a pasted engine token and, if your agents use GitHub, a token for that —
264
+ are **not** stored on this machine. A captain saves them once per Ship in the Crew app's Ship
265
+ Settings, and the daemon fetches them at job time, injects them into the session environment, and
266
+ redacts them from the transcript before upload. `kilogent-runner doctor` tells you when a Ship is
267
+ missing them.
268
+
269
+ **Machine sign-ins are the exception, on purpose.** An engine whose account has no static token
270
+ (Codex on a ChatGPT plan: its login rotates a refresh token on every use, so a copy on a second
271
+ machine kills the first) is signed in ON ONE MACHINE. The daemon keeps that login in a private
272
+ directory, `~/.kilogent-runner/engines/<engine>/<ship>/<credential>/`, refreshes it itself, and
273
+ never sends it anywhere. Jobs on that credential run on this machine only; the daemon runs one
274
+ session per sign-in at a time. Deleting the credential in the app signs this machine out and removes
275
+ the directory; so does removing the machine from the Ship, and `kilogent-runner uninstall --purge`.
276
+ `doctor` reports each sign-in this machine holds and whether the engine still accepts it.
253
277
 
254
- The only thing stored locally is your own session, in `~/.kilogent-runner/config.json` (mode `0600`).
278
+ The only other thing stored locally is your own session, in `~/.kilogent-runner/config.json`
279
+ (mode `0600`).
255
280
 
256
281
  ## Uninstalling
257
282
 
@@ -305,7 +330,8 @@ claiming from one queue.
305
330
  | Var | Effect |
306
331
  |---|---|
307
332
  | `LUMI_RUNNER_HOME` | Config + log directory (default `~/.kilogent-runner`) |
308
- | `CREW_CLAUDE_BIN` | Path to the Claude binary (default: `claude` from `PATH`) |
333
+ | `CREW_<ENGINE>_BIN` | Path to an engine's binary, e.g. `CREW_CLAUDE_BIN`, `CREW_CODEX_BIN` (default: the engine's own name from `PATH`) |
334
+ | `CREW_MACHINE_LOGIN_TIMEOUT_MS` | How long a machine sign-in may wait for approval before it is reported expired (default: 16 minutes; a test seam) |
309
335
  | `CREW_NO_NOTIFY` | Force desktop notifications off, whatever the config says (they are off by default) |
310
336
  | `CREW_NO_POWER` | Disable sleep inhibition |
311
337
  | `LUMI_RUNNER_REGISTRY` | npm registry to check for updates (default `https://registry.npmjs.org`) |