clawborrator-cli 0.2.9 → 0.2.10

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.
@@ -68522,13 +68522,14 @@ function buildSessionListQs(opts) {
68522
68522
  if (opts.all) qs.set("archived", "true");
68523
68523
  return qs.toString() ? "?" + qs : "";
68524
68524
  }
68525
- function printSessionListRow(s) {
68526
- const dot = s.connected ? "\u25CF" : "\u25CB";
68525
+ function printSessionListRow(s, onlineMachineIds) {
68526
+ const managedOnline = !!s.managedBy?.machineId && onlineMachineIds.has(s.managedBy.machineId);
68527
+ const dot = s.connected ? "\u25CF" : managedOnline ? "\u25D0" : "\u25CB";
68527
68528
  const slug = s.routingName ?? "";
68528
68529
  const qualified = slug ? `@${s.startedByLogin}/${slug.replace(/^@/, "")}` : "(no routing name)";
68529
68530
  const where = s.cwd ? ` ${s.cwd}` : "";
68530
68531
  const role = s.role.padEnd(8);
68531
- const seen = s.connected ? "online" : `offline \xB7 ${fmtAgo(s.lastSeenAt)}`;
68532
+ const seen = s.connected ? "online" : managedOnline ? `in-flight \xB7 ${fmtAgo(s.lastSeenAt)}` : `offline \xB7 ${fmtAgo(s.lastSeenAt)}`;
68532
68533
  const arch = s.archivedAt ? " \xB7 ARCHIVED" : "";
68533
68534
  console.log(`${dot} ${qualified.padEnd(28)} ${role}${where} [${seen}]${arch}`);
68534
68535
  console.log(` id: ${s.id}`);
@@ -68543,19 +68544,31 @@ function printSessionListFooter() {
68543
68544
  console.log(" a splatting operator and stripped before reaching the CLI)");
68544
68545
  }
68545
68546
  var sessionList = new Command("list").alias("ls").description("list sessions you can see").option("--connected", "only sessions whose channel WS is currently open").option("--all", "include archived sessions").action(async (opts) => {
68546
- const data = await api.get(
68547
- "/api/v1/sessions" + buildSessionListQs(opts)
68547
+ const [data, desktops] = await Promise.all([
68548
+ api.get("/api/v1/sessions" + buildSessionListQs(opts)),
68549
+ api.get("/api/v1/desktops").catch(() => ({ items: [] }))
68550
+ ]);
68551
+ const onlineMachineIds = new Set(
68552
+ desktops.items.filter((d) => d.online).map((d) => d.machineId)
68548
68553
  );
68549
68554
  if (data.items.length === 0) {
68550
68555
  console.log("no sessions");
68551
68556
  return;
68552
68557
  }
68553
- for (const s of data.items) printSessionListRow(s);
68558
+ for (const s of data.items) printSessionListRow(s, onlineMachineIds);
68554
68559
  printSessionListFooter();
68555
68560
  });
68556
68561
  var sessionInfo = new Command("info").description("show metadata for a single session").argument("<ref>", "session UUID or @routingName").action(async (ref) => {
68557
68562
  const id = await resolveSessionId(ref);
68558
- const s = await api.get(`/api/v1/sessions/${encodeURIComponent(id)}`);
68563
+ const [s, desktops] = await Promise.all([
68564
+ api.get(`/api/v1/sessions/${encodeURIComponent(id)}`),
68565
+ api.get("/api/v1/desktops").catch(() => ({ items: [] }))
68566
+ ]);
68567
+ const onlineMachineIds = new Set(
68568
+ desktops.items.filter((d) => d.online).map((d) => d.machineId)
68569
+ );
68570
+ const managedOnline = !!s.managedBy?.machineId && onlineMachineIds.has(s.managedBy.machineId);
68571
+ const statusLabel = s.connected ? "connected" : managedOnline ? "in-flight (daemon online, no channel)" : "offline";
68559
68572
  console.log(`session : ${s.id}`);
68560
68573
  console.log(`routing : ${s.routingName ?? "(none)"}`);
68561
68574
  console.log(`owner : @${s.startedByLogin}`);
@@ -68565,7 +68578,7 @@ var sessionInfo = new Command("info").description("show metadata for a single se
68565
68578
  console.log(`channel v: ${s.channelVersion ?? "?"}`);
68566
68579
  console.log(`started : ${s.startedAt}`);
68567
68580
  console.log(`last seen: ${s.lastSeenAt}`);
68568
- console.log(`status : ${s.connected ? "connected" : "offline"}${s.archivedAt ? " \xB7 ARCHIVED" : ""}`);
68581
+ console.log(`status : ${statusLabel}${s.archivedAt ? " \xB7 ARCHIVED" : ""}`);
68569
68582
  if (s.managedBy?.machineId) {
68570
68583
  const ver = s.managedBy.daemonVersion ? ` (daemon ${s.managedBy.daemonVersion})` : "";
68571
68584
  console.log(`managed : ${s.managedBy.machineId}${ver}`);
@@ -69405,7 +69418,7 @@ function fmtAgo4(iso) {
69405
69418
 
69406
69419
  // src/index.ts
69407
69420
  var program2 = new Command();
69408
- program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.9");
69421
+ program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.10");
69409
69422
  program2.addCommand(loginCmd);
69410
69423
  program2.addCommand(logoutCmd);
69411
69424
  program2.addCommand(whoamiCmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawborrator-cli",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
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",