clawborrator-cli 0.0.19 → 0.0.21

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.
@@ -6946,7 +6946,7 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
6946
6946
  return;
6947
6947
  }
6948
6948
  if (msg.type === "permission_request") {
6949
- pendingPerms.push({ requestId: msg.requestId, tool: msg.tool });
6949
+ pendingPerms.push({ requestId: msg.requestId, tool: msg.tool, sessionId: msg.sessionId });
6950
6950
  } else if (msg.type === "permission_resolved") {
6951
6951
  const i = pendingPerms.findIndex((p) => p.requestId === msg.requestId);
6952
6952
  if (i >= 0) pendingPerms.splice(i, 1);
@@ -6985,7 +6985,8 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
6985
6985
  const decision = text === "/y" || text === "/yes" ? "allow" : "deny";
6986
6986
  const approval = {
6987
6987
  type: "approval",
6988
- sessionId,
6988
+ sessionId: pending.sessionId,
6989
+ // owner of the permission, may not be `sessionId`
6989
6990
  requestId: pending.requestId,
6990
6991
  decision
6991
6992
  };
@@ -7045,7 +7046,16 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
7045
7046
  console.error(`${RED}error: no session ${targetRef} (try \`claw session list\` in another terminal)${RESET}`);
7046
7047
  return;
7047
7048
  }
7048
- const out2 = { type: "prompt", sessionId: match.id, text: promptText };
7049
+ const out2 = {
7050
+ type: "prompt",
7051
+ sessionId: match.id,
7052
+ text: promptText,
7053
+ // Source-session tag so the hub can persist the eventual
7054
+ // reply against THIS session's events history and surface
7055
+ // it to source Claude via channel notification (the same
7056
+ // shape route_to_peer's reply path uses).
7057
+ sourceSessionId: sessionId
7058
+ };
7049
7059
  ws.send(JSON.stringify(out2));
7050
7060
  console.log(`${DIM}[${ts()}]${RESET} ${AMBER}\u2192 prompt \u2192 ${targetRef}${RESET} ${promptText}`);
7051
7061
  } catch (e) {
@@ -7708,7 +7718,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
7708
7718
 
7709
7719
  // src/index.ts
7710
7720
  var program2 = new Command();
7711
- program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.19");
7721
+ program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.21");
7712
7722
  program2.addCommand(loginCmd);
7713
7723
  program2.addCommand(logoutCmd);
7714
7724
  program2.addCommand(whoamiCmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawborrator-cli",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "description": "claw — command-line client for clawborrator hub_v1. Manages PATs, channel tokens, sessions, cross-session routing, and webhooks; ships an inline TUI for live multi-operator session attach.",
6
6
  "license": "MIT",