clawborrator-cli 0.2.5 → 0.2.7

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.
@@ -68865,22 +68865,25 @@ var tokenMint = new Command("mint").description("create a new channel token").re
68865
68865
  prose(" claude --dangerously-load-development-channels server:clawborrator");
68866
68866
  }
68867
68867
  });
68868
- var tokenList = new Command("list").alias("ls").description("list channel tokens for the current user").action(async () => {
68869
- const data = await api.get("/api/v1/tokens");
68868
+ var tokenList = new Command("list").alias("ls").description("list this user's active tokens \u2014 both channel (ck_live_\u2026) and app (cw_app_\u2026). Pass --all to include revoked rows.").option("--all", "include revoked tokens").action(async (opts) => {
68869
+ const qs = opts.all ? "?includeRevoked=true" : "";
68870
+ const data = await api.get("/api/v1/tokens" + qs);
68870
68871
  if (data.items.length === 0) {
68871
- console.log("no active channel tokens");
68872
+ console.log("no active tokens");
68872
68873
  return;
68873
68874
  }
68874
68875
  for (const t of data.items) {
68875
68876
  const used = t.lastUsedAt ? `last used ${fmtAgo2(t.lastUsedAt)}` : "never used";
68876
- console.log(`${t.id.toString().padStart(3)} ${t.prefix}\u2026 ${t.name.padEnd(28)} ${used}`);
68877
+ const status = t.revokedAt ? " REVOKED" : "";
68878
+ const mach = t.machineId ? ` mach=${t.machineId.slice(0, 12)}\u2026` : "";
68879
+ console.log(`${t.id.toString().padStart(3)} ${t.kind.padEnd(7)} ${t.prefix}\u2026 ${t.name.padEnd(28)} ${used}${mach}${status}`);
68877
68880
  }
68878
68881
  });
68879
- var tokenRevoke = new Command("revoke").description("revoke a channel token by id").argument("<id>", "token id (from `claw token list`)").action(async (id) => {
68882
+ var tokenRevoke = new Command("revoke").description("revoke a token by id (channel or app)").argument("<id>", "token id (from `claw token list`)").action(async (id) => {
68880
68883
  await api.delete(`/api/v1/tokens/${encodeURIComponent(id)}`);
68881
68884
  console.log(`\u2713 token ${id} revoked`);
68882
68885
  });
68883
- var tokenCmd = new Command("token").description("mint, list, and revoke channel tokens").addCommand(tokenMint).addCommand(tokenList).addCommand(tokenRevoke);
68886
+ var tokenCmd = new Command("token").description("mint channel tokens; list/revoke channel + app tokens").addCommand(tokenMint).addCommand(tokenList).addCommand(tokenRevoke);
68884
68887
  function fmtAgo2(iso) {
68885
68888
  const ms = Date.now() - new Date(iso).getTime();
68886
68889
  if (ms < 6e4) return Math.max(1, Math.floor(ms / 1e3)) + "s ago";
@@ -69332,7 +69335,7 @@ var appsTestOauth = new Command("test-oauth").description("walk the full SPA OAu
69332
69335
  var appsCmd = new Command("apps").description("manage SPA app tokens (kind=app, `cw_app_\u2026`) \u2014 mint, list, revoke, and end-to-end-test the SPA OAuth+PKCE flow").addCommand(appsMint).addCommand(appsList).addCommand(appsRevoke).addCommand(appsTestOauth);
69333
69336
 
69334
69337
  // src/commands/desktop.ts
69335
- var desktopList = new Command("list").alias("ls").description("list desktop daemons registered for the current user").action(async () => {
69338
+ var desktopList = new Command("list").alias("ls").description("list desktop daemons registered for the current user. Prints the full machineId so it can be passed verbatim to `claw desktop delete`.").action(async () => {
69336
69339
  const data = await api.get("/api/v1/desktops");
69337
69340
  if (data.items.length === 0) {
69338
69341
  console.log("no registered desktops");
@@ -69342,7 +69345,7 @@ var desktopList = new Command("list").alias("ls").description("list desktop daem
69342
69345
  const dot = d.online ? "\u25CF" : "\u25CB";
69343
69346
  const host = d.hostname ?? "(unknown host)";
69344
69347
  const ver = d.daemonVersion ?? "?";
69345
- console.log(`${dot} ${d.machineId.slice(0, 8)} ${host.padEnd(24)} v${ver.padEnd(8)} last-seen ${fmtAgo4(d.lastSeenAt)}`);
69348
+ console.log(`${dot} ${d.machineId} ${host.padEnd(24)} v${ver.padEnd(8)} last-seen ${fmtAgo4(d.lastSeenAt)}`);
69346
69349
  }
69347
69350
  });
69348
69351
  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) => {
@@ -69386,7 +69389,7 @@ function fmtAgo4(iso) {
69386
69389
 
69387
69390
  // src/index.ts
69388
69391
  var program2 = new Command();
69389
- program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.5");
69392
+ program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.7");
69390
69393
  program2.addCommand(loginCmd);
69391
69394
  program2.addCommand(logoutCmd);
69392
69395
  program2.addCommand(whoamiCmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawborrator-cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
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",