clawborrator-cli 0.0.35 → 0.0.37
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 +26 -6
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -67748,7 +67748,12 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
67748
67748
|
console.log(`${DIM2}\u2500\u2500\u2500 history (${tl.items.length} item${tl.items.length === 1 ? "" : "s"}) \u2500\u2500\u2500${RESET2}`);
|
|
67749
67749
|
for (const item of tl.items) {
|
|
67750
67750
|
if (item.kind === "event") {
|
|
67751
|
-
renderEvent(
|
|
67751
|
+
renderEvent(
|
|
67752
|
+
item.event,
|
|
67753
|
+
myLogin,
|
|
67754
|
+
/* fromBacklog */
|
|
67755
|
+
true
|
|
67756
|
+
);
|
|
67752
67757
|
} else {
|
|
67753
67758
|
console.log(`${DIM2}[${shortTs(item.ts)}]${RESET2} ${GREEN}@${item.authorLogin}${RESET2} ${item.text}`);
|
|
67754
67759
|
}
|
|
@@ -68010,7 +68015,16 @@ function printInbound(msg, myLogin) {
|
|
|
68010
68015
|
break;
|
|
68011
68016
|
}
|
|
68012
68017
|
case "presence": {
|
|
68013
|
-
|
|
68018
|
+
const list3 = msg.attached.map((l) => "@" + l).join(", ") || "(empty)";
|
|
68019
|
+
let line;
|
|
68020
|
+
if (msg.joined) {
|
|
68021
|
+
line = `${GREEN}+ @${msg.joined} joined${RESET2}${DIM2} (attached: ${list3})${RESET2}`;
|
|
68022
|
+
} else if (msg.left) {
|
|
68023
|
+
line = `${AMBER}- @${msg.left} left${RESET2}${DIM2} (attached: ${list3})${RESET2}`;
|
|
68024
|
+
} else {
|
|
68025
|
+
line = `${DIM2}presence: ${list3}${RESET2}`;
|
|
68026
|
+
}
|
|
68027
|
+
say(`${DIM2}[${ts()}]${RESET2} ${line}`);
|
|
68014
68028
|
break;
|
|
68015
68029
|
}
|
|
68016
68030
|
case "channel_status": {
|
|
@@ -68051,12 +68065,12 @@ function maybeDebugDump(p) {
|
|
|
68051
68065
|
say(` ${DIM2}${line}${RESET2}`);
|
|
68052
68066
|
}
|
|
68053
68067
|
}
|
|
68054
|
-
function renderEvent(ev, myLogin) {
|
|
68068
|
+
function renderEvent(ev, myLogin, fromBacklog = false) {
|
|
68055
68069
|
const ts2 = shortTs(ev.ts);
|
|
68056
68070
|
const p = ev.payload || {};
|
|
68057
|
-
if (ev.kind === "chat" && ev.type === "prompt") {
|
|
68071
|
+
if (!fromBacklog && ev.kind === "chat" && ev.type === "prompt") {
|
|
68058
68072
|
const src = String(p.source ?? "");
|
|
68059
|
-
if (src === "operator" && myLogin && p.authorLogin === myLogin) return;
|
|
68073
|
+
if ((src === "operator" || src === "operator-route") && myLogin && p.authorLogin === myLogin) return;
|
|
68060
68074
|
}
|
|
68061
68075
|
try {
|
|
68062
68076
|
renderEventBody(ev, ts2, p, myLogin);
|
|
@@ -68072,6 +68086,12 @@ function renderEventBody(ev, ts2, p, myLogin) {
|
|
|
68072
68086
|
if (ev.type === "prompt") {
|
|
68073
68087
|
const text = String(p.text ?? p.prompt ?? "").trim() || JSON.stringify(p).slice(0, 200);
|
|
68074
68088
|
const source = String(p.source ?? "cli");
|
|
68089
|
+
if (source === "operator-route") {
|
|
68090
|
+
const peer = String(p.peerLogin ?? p.peerSessionId ?? "?");
|
|
68091
|
+
const peerShort = peer.length > 36 ? peer.slice(0, 8) + "\u2026" : peer;
|
|
68092
|
+
say(`${DIM2}[${ts2}]${RESET2} ${AMBER}\u2192 prompt \u2192 ${peerShort}${RESET2} ${text}`);
|
|
68093
|
+
return;
|
|
68094
|
+
}
|
|
68075
68095
|
const label = source === "operator" ? `${BOLD2}@${String(p.authorLogin ?? "remote")} \u203A${RESET2}` : `${BOLD2}(cli) \u203A${RESET2}`;
|
|
68076
68096
|
say(`${DIM2}[${ts2}]${RESET2} ${label} ${text}`);
|
|
68077
68097
|
return;
|
|
@@ -68655,7 +68675,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
|
|
|
68655
68675
|
|
|
68656
68676
|
// src/index.ts
|
|
68657
68677
|
var program2 = new Command();
|
|
68658
|
-
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.
|
|
68678
|
+
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.37");
|
|
68659
68679
|
program2.addCommand(loginCmd);
|
|
68660
68680
|
program2.addCommand(logoutCmd);
|
|
68661
68681
|
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.37",
|
|
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",
|