@linzumi/cli 0.0.23-beta → 0.0.24-beta

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 +29 -14
  2. package/dist/index.js +15 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -32,8 +32,20 @@ starts that hot-reload app on your computer, creates the shared support
32
32
  channel, starts a Linzumi Codex session in a work thread, and opens the
33
33
  browser editor pointed at the demo app.
34
34
 
35
+ Terms:
36
+
37
+ - **Bootstrapper Codex**: the outer Codex started by the pasted command. It
38
+ sets up Linzumi and local processes, but does not edit the demo app.
39
+ - **Linzumi Commander**: the long-running local bridge started with
40
+ `linzumi commander`; it owns the secure tunnel, trusted folder, browser
41
+ editor, and inner Codex launch.
42
+ - **Linzumi Codex session**: the inner agent running inside the Linzumi thread;
43
+ it edits `/tmp/hello_linzumi` and posts progress.
44
+ - **Human**: the workspace owner who opens the one-time login link and watches
45
+ the work in `#general` and `#linzumi-support`.
46
+
35
47
  The snippet uses automatic command approval and full local process access
36
- because the bootstrapper must start a real runner and browser editor on this
48
+ because the bootstrapper must start a real Linzumi Commander and browser editor on this
37
49
  computer. It is intentionally not the dangerous sandbox-bypass mode.
38
50
 
39
51
  Today, your AI coding agent has two homes, both bad.
@@ -104,7 +116,7 @@ stays available for compatibility. The bootstrap agent will confirm your
104
116
  email and workspace choice up front, ask for the emailed code after signup
105
117
  sends it, say hello to `@sean` in the shared support channel,
106
118
  generate `/tmp/hello_linzumi`, start its hot-reload Node server, start the
107
- runner for that folder, start a Linzumi Codex session in a work thread, and
119
+ Commander for that folder, start a Linzumi Codex session in a work thread, and
108
120
  open the browser editor. The Linzumi Codex session then adds confetti to the
109
121
  demo page while you watch. Workspace names are plain display names from 2 to
110
122
  100 characters; Linzumi generates the URL-safe workspace slug.
@@ -118,24 +130,27 @@ npx -y @linzumi/cli@latest signup --email alice@example.com --workspace-name "Al
118
130
  npx -y @linzumi/cli@latest claim --pending <pending_id> --code <XXXX-XXXX>
119
131
  npx -y @linzumi/cli@latest channel post <support_channel_id> "Hello @sean, starting this launch run."
120
132
  npx -y @linzumi/cli@latest thread new "Hello Linzumi confetti" --message "Preparing the Hello Linzumi demo. Next I will generate /tmp/hello_linzumi, start its hot-reload server bound to 0.0.0.0 on port 8787, and ask Linzumi Codex to add confetti when the page loads."
133
+ commander_id="hello-linzumi-commander-${thread_id%%-*}"
121
134
  npx -y @linzumi/cli@latest init-hello-linzumi-demo-app --parent-dir /tmp --name hello_linzumi --host 0.0.0.0 --port 8787 --reset --json
122
135
  (cd /tmp/hello_linzumi && npm run dev > /tmp/hello_linzumi/dev.log 2>&1 &)
123
- npx -y @linzumi/cli@latest agent runner /tmp/hello_linzumi \
124
- --runner-id hello-linzumi-agent \
136
+ npx -y @linzumi/cli@latest commander /tmp/hello_linzumi \
137
+ --runner-id "$commander_id" \
125
138
  --allowed-cwd /tmp/hello_linzumi \
126
139
  --forward-port 8787 \
127
140
  --sandbox danger-full-access \
128
141
  --approval-policy never
129
142
  ```
130
143
 
131
- The agent-owned runner reads `~/.linzumi/agent-token.json`, uses the
144
+ The agent-owned Commander reads `~/.linzumi/agent-token.json`, uses the
132
145
  workspace/channel scope from the approval flow, trusts only the selected
133
146
  folder, advertises the explicit preview port, and listens only to the
134
- approving human unless `--listen-user` is explicitly passed. The bootstrap
135
- agent waits for `Runner connected:` before starting Codex in the Linzumi
147
+ approving human unless `--listen-user` is explicitly passed. Use a unique
148
+ Commander id per launch thread; Linzumi stores trusted-folder config per
149
+ Commander id, so reusing an old fixed id can pick up stale allowed-cwd config.
150
+ The bootstrap agent waits for `Runner connected:` before starting Codex in the Linzumi
136
151
  thread.
137
152
 
138
- By default, the runner downloads the Linzumi-approved `code-server`
153
+ By default, the Commander downloads the Linzumi-approved `code-server`
139
154
  runtime for your platform and verifies its checksum before enabling the
140
155
  browser editor. Linux editor launches are wrapped with `bubblewrap`
141
156
  (`bwrap`) for filesystem confinement.
@@ -146,20 +161,20 @@ workspace. The claim also provisions `#linzumi-support`, a shared channel
146
161
  connected to Linzumi's workspace so our team can see setup issues from our
147
162
  side; the bootstrap agent posts a hello there with the printed
148
163
  `support_channel_id`.
149
- Keep demo work in task threads; use the support channel when signup, runner,
164
+ Keep demo work in task threads; use the support channel when signup, Commander,
150
165
  preview, or browser-editor setup gets stuck.
151
166
 
152
- Once the runner is online, the bootstrap agent can ask Linzumi to start
167
+ Once the Commander is online, the bootstrap agent can ask Linzumi to start
153
168
  Codex and open the browser editor for the same thread and folder:
154
169
 
155
170
  ```bash
156
171
  npx -y @linzumi/cli@latest codex start <thread_id> \
157
- --runner hello-linzumi-agent \
172
+ --runner "$commander_id" \
158
173
  --cwd /tmp/hello_linzumi \
159
174
  --work-description "Work only in /tmp/hello_linzumi. Add tasteful confetti when the Hello Linzumi page loads, keep the hot-reload app working on port 8787, and post the exact files changed."
160
175
 
161
176
  npx -y @linzumi/cli@latest editor open <thread_id> \
162
- --runner hello-linzumi-agent \
177
+ --runner "$commander_id" \
163
178
  --cwd /tmp/hello_linzumi
164
179
  ```
165
180
 
@@ -261,7 +276,7 @@ intentionally. Every action is auditable from the thread.
261
276
  ## Pinning a version
262
277
 
263
278
  ```bash
264
- npm install -g @linzumi/cli@0.0.23-beta
279
+ npm install -g @linzumi/cli@0.0.24-beta
265
280
  linzumi --version
266
281
  ```
267
282
 
@@ -284,7 +299,7 @@ linzumi connect \
284
299
  ### All the flags
285
300
 
286
301
  ```text
287
- --agent-token-file <path> Agent token cache for `linzumi agent runner`
302
+ --agent-token-file <path> Agent token cache for `linzumi commander`
288
303
  --oauth-callback-host <ip> Sign-in callback host your browser can reach
289
304
  --codex-bin <path> Codex executable, default `codex`
290
305
  --model <name> Model requested for Codex sessions and labelled in Linzumi
package/dist/index.js CHANGED
@@ -8397,7 +8397,7 @@ async function main(args) {
8397
8397
  process.stdout.write(connectGuideText());
8398
8398
  return;
8399
8399
  case "version":
8400
- process.stdout.write(`linzumi 0.0.23-beta
8400
+ process.stdout.write(`linzumi 0.0.24-beta
8401
8401
  `);
8402
8402
  return;
8403
8403
  case "auth":
@@ -8452,6 +8452,7 @@ function parseCommand(args) {
8452
8452
  case "agent":
8453
8453
  return rest[0] === "runner" ? { command: "agentRunner", args: rest.slice(1) } : { command: "agent", args: rest };
8454
8454
  case "agent-runner":
8455
+ case "commander":
8455
8456
  return { command: "agentRunner", args: rest };
8456
8457
  case "signup":
8457
8458
  case "claim":
@@ -8686,7 +8687,7 @@ async function parseAgentRunnerArgs(args, deps = {
8686
8687
  }
8687
8688
  rejectAgentRunnerTargetingFlags(values);
8688
8689
  if (cwdArg !== undefined && values.has("cwd")) {
8689
- throw new Error("linzumi agent runner accepts either <folder> or --cwd, not both");
8690
+ throw new Error("linzumi commander accepts either <folder> or --cwd, not both");
8690
8691
  }
8691
8692
  const tokenFilePath = stringValue3(values, "agent-token-file") ?? defaultAgentTokenFilePath();
8692
8693
  const tokenFile = readStoredAgentTokenFile(tokenFilePath, deps.readTextFile);
@@ -8752,14 +8753,14 @@ function readAgentTokenTextFile(path) {
8752
8753
  function rejectAgentRunnerTargetingFlags(values) {
8753
8754
  const unsupportedFlags = ["workspace", "channel", "token", "auth-file", "oauth-callback-host"].filter((flag) => values.has(flag));
8754
8755
  if (unsupportedFlags.length > 0) {
8755
- throw new Error(`linzumi agent runner uses the claimed agent token scope; remove ${unsupportedFlags.map((flag) => `--${flag}`).join(", ")}.`);
8756
+ throw new Error(`linzumi commander uses the claimed agent token scope; remove ${unsupportedFlags.map((flag) => `--${flag}`).join(", ")}.`);
8756
8757
  }
8757
8758
  }
8758
8759
  function requiredStoredAgentChannel(channelId) {
8759
8760
  if (channelId !== undefined) {
8760
8761
  return channelId;
8761
8762
  }
8762
- throw new Error("agent token file is missing channelId; rerun linzumi claim before starting an agent runner");
8763
+ throw new Error("agent token file is missing channelId; rerun linzumi claim before starting a Commander");
8763
8764
  }
8764
8765
  function requiredStoredOwnerUsername(ownerUsername) {
8765
8766
  if (ownerUsername !== undefined) {
@@ -8817,7 +8818,7 @@ async function parseRunnerArgs(args, deps = {
8817
8818
  process.exit(0);
8818
8819
  }
8819
8820
  if (values.get("version") === true) {
8820
- process.stdout.write(`linzumi 0.0.23-beta
8821
+ process.stdout.write(`linzumi 0.0.24-beta
8821
8822
  `);
8822
8823
  process.exit(0);
8823
8824
  }
@@ -9039,7 +9040,7 @@ Usage:
9039
9040
  linzumi inbox <thread_id> --since-last
9040
9041
  linzumi done <thread_id> --message <message>
9041
9042
  linzumi init-hello-linzumi-demo-app
9042
- linzumi agent runner <folder> [options]
9043
+ linzumi commander <folder> [options]
9043
9044
  linzumi start <folder> [options]
9044
9045
  linzumi paths list|add|remove [path]
9045
9046
  linzumi connect --kandan-url <ws-url> --workspace <slug> --channel <slug> [options]
@@ -9081,7 +9082,7 @@ Examples:
9081
9082
  linzumi post thr_abc123 "PR is open"
9082
9083
  linzumi done thr_abc123 --message "Done: https://github.com/example/repo/pull/1"
9083
9084
  linzumi init-hello-linzumi-demo-app
9084
- linzumi agent runner ~/code/my-app --runner-id launch-agent-runner
9085
+ linzumi commander ~/code/my-app --runner-id launch-commander
9085
9086
  linzumi start ~/
9086
9087
  linzumi start ~/code/my-app
9087
9088
  linzumi connect --workspace <your-workspace> --channel <your-channel> --launch-tui
@@ -9173,13 +9174,14 @@ Examples:
9173
9174
  `;
9174
9175
  }
9175
9176
  function agentRunnerHelpText() {
9176
- return `Linzumi agent-owned local runner
9177
+ return `Linzumi Commander
9177
9178
 
9178
9179
  Usage:
9180
+ linzumi commander <folder> [options]
9179
9181
  linzumi agent runner <folder> [options]
9180
9182
 
9181
9183
  What it does:
9182
- Starts this computer as the claimed agent's scoped local runner. The command
9184
+ Starts this computer as the claimed agent's scoped Linzumi Commander. The command
9183
9185
  reads ~/.linzumi/agent-token.json, uses its workspace/channel scope, trusts
9184
9186
  only the selected folder by default, and listens only to the owning human
9185
9187
  recorded during claim unless --listen-user is passed.
@@ -9187,7 +9189,7 @@ What it does:
9187
9189
  Options:
9188
9190
  --agent-token-file <path> Agent token cache, default ~/.linzumi/agent-token.json
9189
9191
  --kandan-url <ws-url> Kandan websocket base URL. Defaults deterministically from the stored apiUrl.
9190
- --runner-id <id> Stable local runner id
9192
+ --runner-id <id> Stable Commander id
9191
9193
  --codex-bin <path> Codex executable, default codex
9192
9194
  --code-server-bin <path> Custom development code-server executable. By default Kandan installs the approved editor runtime.
9193
9195
  --listen-user <user> Human whose replies Codex may accept, default owner from claim
@@ -9197,11 +9199,11 @@ Options:
9197
9199
  --approval-policy <value> Approval-policy metadata shown in Kandan
9198
9200
  --forward-port <ports> Comma-separated local TCP ports Kandan may expose as previews
9199
9201
  --allowed-cwd <paths> Override the selected folder with comma-separated trusted roots
9200
- --fast Mark this runner as low-latency/fast in Kandan
9202
+ --fast Mark this Commander as low-latency/fast in Linzumi
9201
9203
 
9202
9204
  Examples:
9203
- linzumi agent runner "$PWD" --runner-id hello-world-agent
9204
- linzumi agent runner ~/code/my-app --kandan-url ws://127.0.0.1:4162 --runner-id local-qa-agent
9205
+ linzumi commander "$PWD" --runner-id hello-world-commander
9206
+ linzumi commander ~/code/my-app --kandan-url ws://127.0.0.1:4162 --runner-id local-qa-commander
9205
9207
  `;
9206
9208
  }
9207
9209
  function connectGuideText() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linzumi/cli",
3
- "version": "0.0.23-beta",
3
+ "version": "0.0.24-beta",
4
4
  "description": "Linzumi CLI — point a Codex agent at the real code on your laptop, with your team watching and steering from shared threads.",
5
5
  "type": "module",
6
6
  "bin": {