clawborrator-cli 0.2.0 → 0.2.3

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 CHANGED
@@ -96,6 +96,15 @@ claw session prune --dry-run # find duplicate-routing-name row
96
96
  claw session delete @backend --hard # permanent (cascades events / op-messages / shares)
97
97
  ```
98
98
 
99
+ Managed-session control (works against sessions spawned by a desktop daemon):
100
+
101
+ ```bash
102
+ claw session kill @backend # kill the CC process; keep the session row
103
+ claw session restart @backend # kill + respawn; new pid, same session row
104
+ claw session screenshot @backend # one frame of the rendered terminal (vt100 → text)
105
+ claw session input @backend "hello\r" # type bytes into the PTY (escape sequences ok)
106
+ ```
107
+
99
108
  `<ref>` in any subcommand accepts the session UUID, the `@routingName`
100
109
  for sessions you own, or `@owner/routingName` for sessions shared with
101
110
  you.
@@ -166,7 +175,7 @@ reach other peers.
166
175
  Anyone can also call your agent over the
167
176
  [A2A protocol](https://a2a-protocol.org) at
168
177
  `/api/a2a/v1/agents/<owner>/<slug>` — see the
169
- [A2A bridge reference](https://next.clawborrator.com/demos/a2a-docs/).
178
+ [A2A bridge reference](https://next.clawborrator.com/demos/a2a/#reference).
170
179
 
171
180
  ### Webhooks
172
181
 
@@ -187,6 +196,48 @@ Verification recipes for Node + Python and the full event catalog
187
196
  live at the
188
197
  [webhooks reference](https://next.clawborrator.com/demos/webhooks/).
189
198
 
199
+ ### App tokens (SPA OAuth shortcut)
200
+
201
+ Browser SPAs authenticate via the SPA OAuth + PKCE flow and store
202
+ their `cw_app_…` token in `localStorage`. For dev you usually don't
203
+ want to walk the full OAuth round-trip every time — the CLI can mint
204
+ an app token directly off your existing CLI session:
205
+
206
+ ```bash
207
+ claw apps mint "my-spa" # mint a cw_app_… app token
208
+ claw apps list # list active app tokens
209
+ claw apps list --all # include revoked
210
+ claw apps revoke <id> # revoke (use --yes to skip the confirm)
211
+
212
+ claw apps test-oauth # walk the SPA OAuth+PKCE flow end-to-end
213
+ # as a debug tool — mints a real app token
214
+ # via the redirect-callback path
215
+ ```
216
+
217
+ `apps mint` is the dev shortcut; `apps test-oauth` is the real flow
218
+ exercised end-to-end (useful when the redirect or the exchange step
219
+ is misbehaving). Both produce identical tokens.
220
+
221
+ ### Desktop daemons
222
+
223
+ If you (or operators you share with) are running the
224
+ [`clawborrator-supervisor`](https://github.com/clawborrator/desktop_v1)
225
+ desktop daemon, the hub knows about it and you can ask it to spawn
226
+ managed CC sessions remotely:
227
+
228
+ ```bash
229
+ claw desktop list # daemons registered for the current user
230
+ claw desktop create-session <machineId> <folder> # spawn CC on that machine in <folder>
231
+ # --routing-name <name> pin the routingName
232
+ # --auto-enter / --no-auto-enter
233
+ # --extra-flag <flag> passed to claude (repeatable)
234
+ ```
235
+
236
+ The daemon mints the channel token server-side, drops a `.mcp.json`
237
+ into the folder, and spawns CC. Once it registers, it shows up in
238
+ `claw session list` like any other session — and `claw session kill`
239
+ / `restart` / `screenshot` / `input` operate on it.
240
+
190
241
  ### Auth
191
242
 
192
243
  ```bash
@@ -274,13 +325,8 @@ peer.
274
325
 
275
326
  ## Where to look next
276
327
 
277
- - **Hub home & demos:** <https://next.clawborrator.com/>
278
- - **REST API (OpenAPI):** <https://next.clawborrator.com/api/http-docs>
279
- - **WebSocket (AsyncAPI):** <https://next.clawborrator.com/api/ws-docs>
280
- - **Webhook reference:** <https://next.clawborrator.com/demos/webhooks/>
281
- - **A2A bridge reference:** <https://next.clawborrator.com/demos/a2a-docs/>
328
+ - **Hub home:** <https://next.clawborrator.com/>
282
329
  - **CLI source / issues:** <https://github.com/clawborrator/cli_v1>
283
- - **Hub source:** <https://github.com/clawborrator/hub_v1>
284
330
 
285
331
  The CLI is a thin shell over the hub's REST + WebSocket surface — anything
286
332
  `claw` does you can do directly from any HTTP client. Wire types live in
@@ -68551,6 +68551,20 @@ var sessionInfo = new Command("info").description("show metadata for a single se
68551
68551
  console.log(`started : ${s.startedAt}`);
68552
68552
  console.log(`last seen: ${s.lastSeenAt}`);
68553
68553
  console.log(`status : ${s.connected ? "connected" : "offline"}${s.archivedAt ? " \xB7 ARCHIVED" : ""}`);
68554
+ if (s.managedBy?.machineId) {
68555
+ const ver = s.managedBy.daemonVersion ? ` (daemon ${s.managedBy.daemonVersion})` : "";
68556
+ console.log(`managed : ${s.managedBy.machineId}${ver}`);
68557
+ console.log(`autoStart: ${s.autoStart ? "ON" : "OFF"}`);
68558
+ const ae = s.autoEnter === void 0 ? "?" : s.autoEnter ? "ON (auto)" : "OFF (manual)";
68559
+ console.log(`autoEnter: ${ae}`);
68560
+ const flags = s.extraFlags;
68561
+ if (flags === void 0) console.log("flags : ?");
68562
+ else if (flags.length === 0) console.log("flags : (none)");
68563
+ else console.log(`flags : ${flags.join(" ")}`);
68564
+ }
68565
+ if (s.agentHandle) {
68566
+ console.log(`agent : ${s.agentHandle}`);
68567
+ }
68554
68568
  });
68555
68569
  function buildEventsQs(opts) {
68556
68570
  const qs = new URLSearchParams({ limit: opts.limit ?? "200" });
@@ -68676,7 +68690,7 @@ var sessionDelete = new Command("delete").description("hard-delete a single sess
68676
68690
  `/api/v1/sessions/${encodeURIComponent(id)}?hard=true`
68677
68691
  );
68678
68692
  const sweep = r.blobsSwept && r.blobsSwept > 0 ? ` \xB7 swept ${r.blobsSwept} blob${r.blobsSwept === 1 ? "" : "s"} (${r.bytesFreed ?? 0} bytes freed)` : "";
68679
- console.log(`\u2717 deleted ${r.sessionId} (events / op-messages / shares / files cascaded)${sweep}`);
68693
+ console.log(`\u2717 deleted ${r.sessionId} (events / op-messages / shares / files / permission_requests / reply_chunks / any agent + agent_query_log cascaded)${sweep}`);
68680
68694
  });
68681
68695
  var sessionPrompt = new Command("prompt").description('send a one-shot prompt to a session\'s live Claude. Fire-and-forget \u2014 to find the eventual reply, run `claw session events <ref> --kind=chat --type=reply` (or `claw route <peer> "..."` for ask-mode that blocks for the answer). Use `--attach <fileId>` (repeatable) to attach files structurally \u2014 equivalent to inlining `fileId=N` tokens but cleaner; the receiving session sees the rewritten ids in its prompt text after forward-clone.').argument("<ref>", "session UUID or @routingName").argument("<text>", "prompt text \u2014 quote multi-word; may be empty if --attach is supplied").option("--attach <fileId>", "fileId to attach (repeatable). Each upload happens via POST /api/v1/sessions/<ref>/files first; this flag references an existing fileId.", (v, prev = []) => {
68682
68696
  const n = Number.parseInt(v, 10);
@@ -69353,7 +69367,7 @@ function fmtAgo4(iso) {
69353
69367
 
69354
69368
  // src/index.ts
69355
69369
  var program2 = new Command();
69356
- program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.0");
69370
+ program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.1");
69357
69371
  program2.addCommand(loginCmd);
69358
69372
  program2.addCommand(logoutCmd);
69359
69373
  program2.addCommand(whoamiCmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawborrator-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "claw — command-line client for clawborrator. Attach to remote Claude Code sessions, send prompts, resolve permission gates, route across sessions, manage public agents and webhooks. Auth via GitHub OAuth + PKCE.",
6
6
  "license": "MIT",