clawborrator-cli 0.0.16 → 0.0.18
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.
- package/dist-bundled/claw.cjs +22 -8
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -7126,6 +7126,10 @@ function renderEvent(ev, myLogin) {
|
|
|
7126
7126
|
}
|
|
7127
7127
|
if (ev.type === "reply") {
|
|
7128
7128
|
const text = String(p.text ?? "").trim();
|
|
7129
|
+
if (p.source === "peer-reply" && p.peerLogin) {
|
|
7130
|
+
console.log(`${DIM}[${ts2}]${RESET} ${AMBER}${String(p.peerLogin)} answered${RESET} ${text}`);
|
|
7131
|
+
return;
|
|
7132
|
+
}
|
|
7129
7133
|
const tag = p.chatId ? `${AMBER}claude${RESET} ${DIM}(reply to ${String(p.chatId).slice(0, 8)})${RESET}` : `${AMBER}claude${RESET}`;
|
|
7130
7134
|
console.log(`${DIM}[${ts2}]${RESET} ${tag} ${text}`);
|
|
7131
7135
|
return;
|
|
@@ -7577,19 +7581,29 @@ var peersCmd = new Command("peers").description("list your sessions reachable fo
|
|
|
7577
7581
|
console.log(`${dot} ${p.routingName.padEnd(20)} ${p.online ? "online" : "offline"}${where}`);
|
|
7578
7582
|
}
|
|
7579
7583
|
});
|
|
7580
|
-
var routeCmd = new Command("route").description("send a one-shot prompt to a peer session").argument("<peer>", "
|
|
7584
|
+
var routeCmd = new Command("route").description("send a one-shot prompt to a peer session; ask mode (default) blocks for the reply, tell mode is fire-and-forget").argument("<peer>", "routingName (e.g. @foo, foo, @owner/foo)").argument("<prompt>", "text to send (quote it to keep spaces)").option("--mode <mode>", "ask | tell", "ask").action(async (peer, prompt, opts) => {
|
|
7581
7585
|
const mode = opts.mode === "tell" ? "tell" : "ask";
|
|
7582
7586
|
const out = await api.post(
|
|
7583
7587
|
`/api/v1/peers/${encodeURIComponent(peer)}/route`,
|
|
7584
7588
|
{ prompt, mode }
|
|
7585
7589
|
);
|
|
7586
|
-
console.log(`\u2713 routed to ${peer}`);
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
if (mode === "ask") {
|
|
7591
|
-
console.log(" (reply correlation arrives in channel Phase D \u2014 for now poll `claw session attach` to watch)");
|
|
7590
|
+
console.log(`\u2713 routed to ${peer} (chatId ${out.chatId.slice(0, 8)}\u2026)`);
|
|
7591
|
+
if (mode === "tell") {
|
|
7592
|
+
console.log(" mode: tell (fire-and-forget). Watch the reply in `claw session attach` if needed.");
|
|
7593
|
+
return;
|
|
7592
7594
|
}
|
|
7595
|
+
if (out.ok && out.reply !== void 0) {
|
|
7596
|
+
console.log("");
|
|
7597
|
+
console.log(out.reply);
|
|
7598
|
+
return;
|
|
7599
|
+
}
|
|
7600
|
+
if (out.timedOut) {
|
|
7601
|
+
console.error(`error: ${out.error}`);
|
|
7602
|
+
console.error(" (the peer may still answer later \u2014 `claw session events " + peer + "` will show it if it lands)");
|
|
7603
|
+
process.exit(2);
|
|
7604
|
+
}
|
|
7605
|
+
console.error(`error: ${out.error ?? "no reply"}`);
|
|
7606
|
+
process.exit(2);
|
|
7593
7607
|
});
|
|
7594
7608
|
var probeCmd = new Command("probe").description("fan-out the same prompt to many peers in parallel").argument("<prompt>", "text to send (quote it)").option("--peers <csv>", "comma-separated routing names; default = all online peers").action(async (prompt, opts) => {
|
|
7595
7609
|
const peerList = opts.peers ? opts.peers.split(",").map((s) => s.trim()).filter(Boolean) : null;
|
|
@@ -7653,7 +7667,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
|
|
|
7653
7667
|
|
|
7654
7668
|
// src/index.ts
|
|
7655
7669
|
var program2 = new Command();
|
|
7656
|
-
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.
|
|
7670
|
+
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.18");
|
|
7657
7671
|
program2.addCommand(loginCmd);
|
|
7658
7672
|
program2.addCommand(logoutCmd);
|
|
7659
7673
|
program2.addCommand(whoamiCmd);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawborrator-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
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",
|