clawborrator-cli 0.2.4 → 0.2.5

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.
@@ -68642,7 +68642,7 @@ var sessionMessages = new Command("messages").alias("msgs").description("dump op
68642
68642
  }
68643
68643
  printPagedHasMore(data, opts.json);
68644
68644
  });
68645
- var sessionArchive = new Command("archive").description("soft-delete a session (sets archivedAt). Note: register-time reconnect unarchives, so a session whose UUID is still in a project's .claude/clawborrator/session.json will resurrect on its next start.").argument("<ref>", "session UUID or @routingName").action(async (ref) => {
68645
+ var sessionArchive = new Command("archive").description("soft-delete a session (sets archivedAt). Note: register-time reconnect unarchives, so a session whose UUID is still in a project's .claude/clawborrator/identity.json will resurrect on its next start.").argument("<ref>", "session UUID or @routingName").action(async (ref) => {
68646
68646
  const id = await resolveSessionId(ref);
68647
68647
  const r = await api.post(
68648
68648
  `/api/v1/sessions/${encodeURIComponent(id)}/archive`,
@@ -69345,6 +69345,25 @@ var desktopList = new Command("list").alias("ls").description("list desktop daem
69345
69345
  console.log(`${dot} ${d.machineId.slice(0, 8)} ${host.padEnd(24)} v${ver.padEnd(8)} last-seen ${fmtAgo4(d.lastSeenAt)}`);
69346
69346
  }
69347
69347
  });
69348
+ var desktopDelete = new Command("delete").description("hard-delete a desktop daemon registration. Revokes any tokens stamped with this machine_id (today: clawborrator-supervisor app tokens) and unmanages any sessions whose managed_by_machine_id matches (the session row survives as unmanaged; destroy it separately if you want it gone). Closes the live /supervisor WS if connected.").argument("<machineId>", "desktop machine id (from `claw desktop list`)").option("--yes", "skip the confirmation prompt").action(async (machineId, opts) => {
69349
+ if (!opts.yes) {
69350
+ process.stdout.write(`Hard-delete desktop ${machineId} and revoke its associated tokens? [y/N] `);
69351
+ const answer = await new Promise((res) => {
69352
+ process.stdin.once("data", (d) => res(d.toString().trim().toLowerCase()));
69353
+ });
69354
+ if (answer !== "y" && answer !== "yes") {
69355
+ console.log("cancelled");
69356
+ return;
69357
+ }
69358
+ }
69359
+ const out = await api.delete(
69360
+ `/api/v1/desktops/${encodeURIComponent(machineId)}`
69361
+ );
69362
+ console.log(`\u2713 deleted desktop ${machineId}`);
69363
+ console.log(` tokens revoked: ${out.tokensRevoked}`);
69364
+ console.log(` sessions unmanaged: ${out.sessionsUnmanaged}`);
69365
+ if (out.wsClosed) console.log(` closed the live /supervisor WS`);
69366
+ });
69348
69367
  var desktopCreate = new Command("create-session").description("ask a desktop daemon to spawn a managed CC session in a folder").argument("<machineId>", "desktop machine id (from `claw desktop list`)").argument("<folder>", "absolute path on the desktop where CC should be spawned").option("--routing-name <name>", "optional routing name for the new session (e.g. @frontend)").option("--flag <flag...>", "extra CLI flag to pass to claude. Repeat for multiple. Use one argv slot per --flag (e.g. --flag --model --flag opus, or --flag --model=opus). Reference: https://code.claude.com/docs/en/cli-reference#cli-flags").option("--manual-start", "do NOT auto-press Enter on startup; operator answers prompts via screenshot PIP / `claw session input`").action(async (machineId, folder, opts) => {
69349
69368
  const body = { folder };
69350
69369
  if (opts.routingName) body.routingName = opts.routingName;
@@ -69356,7 +69375,7 @@ var desktopCreate = new Command("create-session").description("ask a desktop dae
69356
69375
  );
69357
69376
  console.log(`\u2713 session created: ${out.sessionId}`);
69358
69377
  });
69359
- var desktopCmd = new Command("desktop").description("inspect + control desktop daemons (clawborrator-supervisor)").addCommand(desktopList).addCommand(desktopCreate);
69378
+ var desktopCmd = new Command("desktop").description("inspect + control desktop daemons (clawborrator-supervisor)").addCommand(desktopList).addCommand(desktopDelete).addCommand(desktopCreate);
69360
69379
  function fmtAgo4(iso) {
69361
69380
  const ms = Date.now() - new Date(iso).getTime();
69362
69381
  if (ms < 6e4) return Math.max(1, Math.floor(ms / 1e3)) + "s ago";
@@ -69367,7 +69386,7 @@ function fmtAgo4(iso) {
69367
69386
 
69368
69387
  // src/index.ts
69369
69388
  var program2 = new Command();
69370
- program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.1");
69389
+ program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.5");
69371
69390
  program2.addCommand(loginCmd);
69372
69391
  program2.addCommand(logoutCmd);
69373
69392
  program2.addCommand(whoamiCmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawborrator-cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
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",