clawborrator-cli 0.0.37 → 0.0.38
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 +29 -1
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -67636,6 +67636,23 @@ function stopWorking() {
|
|
|
67636
67636
|
}
|
|
67637
67637
|
refreshPrompt();
|
|
67638
67638
|
}
|
|
67639
|
+
var routeWatchdog = null;
|
|
67640
|
+
var ROUTE_WATCHDOG_MS = 6e4;
|
|
67641
|
+
function armRouteWatchdog() {
|
|
67642
|
+
if (routeWatchdog) clearTimeout(routeWatchdog);
|
|
67643
|
+
routeWatchdog = setTimeout(() => {
|
|
67644
|
+
routeWatchdog = null;
|
|
67645
|
+
say(`${DIM2}[${ts()}]${RESET2} ${RED}\u26A0 no peer reply within 60s${RESET2} ${DIM2}\u2014 peer's Claude may have denied the reply tool${RESET2}`);
|
|
67646
|
+
stopWorking();
|
|
67647
|
+
}, ROUTE_WATCHDOG_MS);
|
|
67648
|
+
routeWatchdog.unref();
|
|
67649
|
+
}
|
|
67650
|
+
function disarmRouteWatchdog() {
|
|
67651
|
+
if (routeWatchdog) {
|
|
67652
|
+
clearTimeout(routeWatchdog);
|
|
67653
|
+
routeWatchdog = null;
|
|
67654
|
+
}
|
|
67655
|
+
}
|
|
67639
67656
|
function say(line) {
|
|
67640
67657
|
if (!process.stdout.isTTY || !rlRef) {
|
|
67641
67658
|
console.log(line);
|
|
@@ -67927,6 +67944,7 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
67927
67944
|
ws.send(JSON.stringify(out2));
|
|
67928
67945
|
say(`${DIM2}[${ts()}]${RESET2} ${AMBER}\u2192 prompt \u2192 ${peerSessionId.slice(0, 8)}\u2026${RESET2} ${promptText}`);
|
|
67929
67946
|
startWorking();
|
|
67947
|
+
armRouteWatchdog();
|
|
67930
67948
|
return;
|
|
67931
67949
|
}
|
|
67932
67950
|
(async () => {
|
|
@@ -67973,6 +67991,7 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
67973
67991
|
ws.send(JSON.stringify(out2));
|
|
67974
67992
|
say(`${DIM2}[${ts()}]${RESET2} ${AMBER}\u2192 prompt \u2192 ${targetRef}${RESET2} ${promptText}`);
|
|
67975
67993
|
startWorking();
|
|
67994
|
+
armRouteWatchdog();
|
|
67976
67995
|
} catch (e) {
|
|
67977
67996
|
sayErr(`${RED}error: ${e?.message ?? String(e)}${RESET2}`);
|
|
67978
67997
|
}
|
|
@@ -68112,6 +68131,15 @@ function renderEventBody(ev, ts2, p, myLogin) {
|
|
|
68112
68131
|
const text = String(p.text ?? "").trim();
|
|
68113
68132
|
const tag2 = p.source === "peer-reply" && p.peerLogin ? `${AMBER}${String(p.peerLogin)} answered${RESET2}` : p.chatId ? `${AMBER}claude${RESET2} ${DIM2}(reply to ${String(p.chatId).slice(0, 8)})${RESET2}` : `${AMBER}claude${RESET2}`;
|
|
68114
68133
|
emitChatLine(`${DIM2}[${ts2}]${RESET2} ${tag2}`, renderMarkdown(text));
|
|
68134
|
+
if (p.source === "peer-reply") disarmRouteWatchdog();
|
|
68135
|
+
return;
|
|
68136
|
+
}
|
|
68137
|
+
if (ev.type === "peer-timeout") {
|
|
68138
|
+
const peer = String(p.peerLogin ?? p.peerSessionId ?? "?");
|
|
68139
|
+
const peerShort = peer.length > 36 ? peer.slice(0, 8) + "\u2026" : peer;
|
|
68140
|
+
say(`${DIM2}[${ts2}]${RESET2} ${RED}\u26A0 ${peerShort} did not reply${RESET2} ${DIM2}\u2014 peer's Claude may have denied the reply tool${RESET2}`);
|
|
68141
|
+
disarmRouteWatchdog();
|
|
68142
|
+
stopWorking();
|
|
68115
68143
|
return;
|
|
68116
68144
|
}
|
|
68117
68145
|
say(`${DIM2}[${ts2}]${RESET2} ${AMBER}[chat:${ev.type}]${RESET2} ${previewPayload(p)}`);
|
|
@@ -68675,7 +68703,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
|
|
|
68675
68703
|
|
|
68676
68704
|
// src/index.ts
|
|
68677
68705
|
var program2 = new Command();
|
|
68678
|
-
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.
|
|
68706
|
+
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.38");
|
|
68679
68707
|
program2.addCommand(loginCmd);
|
|
68680
68708
|
program2.addCommand(logoutCmd);
|
|
68681
68709
|
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.38",
|
|
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",
|