clawborrator-cli 0.2.11 → 0.2.13

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.
@@ -68828,7 +68828,7 @@ var sessionKill = new Command("kill").description("kill the CC process for a man
68828
68828
  await api.post(`/api/v1/sessions/${encodeURIComponent(id)}/kill`, {});
68829
68829
  console.log(`\u2717 killed CC process for ${id.slice(0, 8)}\u2026`);
68830
68830
  });
68831
- var sessionRestart = new Command("restart").description("kill + respawn the CC process for a managed session").argument("<ref>", "session UUID, @routingName, or @owner/slug").action(async (ref) => {
68831
+ var sessionRestart = new Command("restart").description("kill + respawn the CC process for a managed session \u2014 destroy + create. Fresh sessionId, history erased, channel token rotated. Use `claw session reset` for the soft variant on sessions opted into preserveSessionId.").argument("<ref>", "session UUID, @routingName, or @owner/slug").action(async (ref) => {
68832
68832
  const id = await resolveSessionId(ref, { destructive: true });
68833
68833
  const out = await api.post(
68834
68834
  `/api/v1/sessions/${encodeURIComponent(id)}/restart`,
@@ -68836,6 +68836,16 @@ var sessionRestart = new Command("restart").description("kill + respawn the CC p
68836
68836
  );
68837
68837
  console.log(`\u21BA restarted: ${out.sessionId}`);
68838
68838
  });
68839
+ var sessionReset = new Command("reset").description("soft-restart a managed session \u2014 preserves sessionId, history, channel token, and webhook/agent pins. Requires preserveSessionId=true on the session row. Pass --hard to force the destroy+create path (equivalent to `claw session restart`).").argument("<ref>", "session UUID, @routingName, or @owner/slug").option("--hard", "force a hard reset: destroy + create. Sessionid changes, history erased, channel token rotated.").action(async (ref, opts) => {
68840
+ const id = await resolveSessionId(ref, { destructive: true });
68841
+ const path = opts.hard ? `/api/v1/sessions/${encodeURIComponent(id)}/restart` : `/api/v1/sessions/${encodeURIComponent(id)}/soft-restart`;
68842
+ const out = await api.post(path, {});
68843
+ if (opts.hard) {
68844
+ console.log(`\u{1F4A5} hard reset: ${out.sessionId}`);
68845
+ } else {
68846
+ console.log(`\u21BA reset (sessionId preserved): ${out.sessionId}`);
68847
+ }
68848
+ });
68839
68849
  var sessionScreenshot = new Command("screenshot").description("print the current rendered terminal frame for a managed session").argument("<ref>", "session UUID, @routingName, or @owner/slug").action(async (ref) => {
68840
68850
  const id = await resolveSessionId(ref);
68841
68851
  const out = await api.get(
@@ -68853,7 +68863,7 @@ var sessionInput = new Command("input").description("type bytes into a managed s
68853
68863
  );
68854
68864
  console.error(`\u2713 wrote ${out.wrote ?? payload.length} bytes`);
68855
68865
  });
68856
- var sessionCmd = new Command("session").description("manage Claude Code sessions registered with this hub").addCommand(sessionList).addCommand(sessionInfo).addCommand(sessionAttach).addCommand(sessionEvents).addCommand(sessionMessages).addCommand(sessionArchive).addCommand(sessionPrune).addCommand(sessionPrompt).addCommand(sessionDelete).addCommand(sessionShareCmd).addCommand(sessionSharesCmd).addCommand(sessionUnshareCmd).addCommand(sessionFiles).addCommand(sessionFileRm).addCommand(sessionKill).addCommand(sessionRestart).addCommand(sessionScreenshot).addCommand(sessionInput);
68866
+ var sessionCmd = new Command("session").description("manage Claude Code sessions registered with this hub").addCommand(sessionList).addCommand(sessionInfo).addCommand(sessionAttach).addCommand(sessionEvents).addCommand(sessionMessages).addCommand(sessionArchive).addCommand(sessionPrune).addCommand(sessionPrompt).addCommand(sessionDelete).addCommand(sessionShareCmd).addCommand(sessionSharesCmd).addCommand(sessionUnshareCmd).addCommand(sessionFiles).addCommand(sessionFileRm).addCommand(sessionKill).addCommand(sessionRestart).addCommand(sessionReset).addCommand(sessionScreenshot).addCommand(sessionInput);
68857
68867
 
68858
68868
  // src/commands/token.ts
68859
68869
  var import_node_fs2 = require("node:fs");
@@ -68977,9 +68987,12 @@ var probeCmd = new Command("probe").description("fan-out the same prompt to many
68977
68987
  });
68978
68988
 
68979
68989
  // src/commands/webhook.ts
68980
- var webhookAdd = new Command("add").description("register a webhook subscription").requiredOption("--url <url>", "https://\u2026 target endpoint").requiredOption("--events <csv>", 'comma-separated event types (or "*" for all)').option("--routing-name <handle>", "narrow to events for one session by routing name (e.g. @orchard-viper). Stable across managed-session restart / autoStart-respawn / kill+restart cycles, where sessionId would churn.").action(async (opts) => {
68990
+ var webhookAdd = new Command("add").description("register a webhook subscription").requiredOption("--url <url>", "https://\u2026 target endpoint").requiredOption("--events <csv>", 'comma-separated event types (or "*" for all)').option("--session <sessionId>", "narrow to one specific session by UUID. Durable for unmanaged sessions and managed sessions with preserveSessionId=true; goes silent on impermanent managed restarts (sessionId churns).").option("--routing-name <handle>", "narrow by routing name (e.g. @orchard-viper). Stable across managed-session restart / autoStart-respawn / kill+restart cycles. Combine with --session to AND-narrow.").action(async (opts) => {
68981
68991
  const events = opts.events.split(",").map((s) => s.trim()).filter(Boolean);
68982
68992
  const filters = {};
68993
+ if (opts.session) {
68994
+ filters.sessionId = opts.session;
68995
+ }
68983
68996
  if (opts.routingName) {
68984
68997
  filters.routingName = opts.routingName.startsWith("@") ? opts.routingName : "@" + opts.routingName;
68985
68998
  }
@@ -69420,7 +69433,7 @@ function fmtAgo4(iso) {
69420
69433
 
69421
69434
  // src/index.ts
69422
69435
  var program2 = new Command();
69423
- program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.11");
69436
+ program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.2.13");
69424
69437
  program2.addCommand(loginCmd);
69425
69438
  program2.addCommand(logoutCmd);
69426
69439
  program2.addCommand(whoamiCmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawborrator-cli",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
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",