clawborrator-cli 0.0.15 → 0.0.17
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 +16 -5
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -6897,6 +6897,12 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
6897
6897
|
console.error("error: not logged in. run `claw login`.");
|
|
6898
6898
|
process.exit(2);
|
|
6899
6899
|
}
|
|
6900
|
+
let myLogin = null;
|
|
6901
|
+
try {
|
|
6902
|
+
const me = await api.get("/api/v1/me");
|
|
6903
|
+
myLogin = me.githubLogin;
|
|
6904
|
+
} catch {
|
|
6905
|
+
}
|
|
6900
6906
|
const UUID_RE2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
6901
6907
|
let sessionId = ref;
|
|
6902
6908
|
if (!UUID_RE2.test(sessionId)) {
|
|
@@ -6945,7 +6951,7 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
6945
6951
|
const i = pendingPerms.findIndex((p) => p.requestId === msg.requestId);
|
|
6946
6952
|
if (i >= 0) pendingPerms.splice(i, 1);
|
|
6947
6953
|
}
|
|
6948
|
-
printInbound(msg);
|
|
6954
|
+
printInbound(msg, myLogin);
|
|
6949
6955
|
if (msg.type === "subscribed") {
|
|
6950
6956
|
mySubscription = true;
|
|
6951
6957
|
console.log(`${DIM}attached as ${BOLD}${msg.role}${RESET}${DIM}. type for prompt \xB7 @other <text> to route \xB7 /m <text> for op-msg \xB7 /y /n on permissions \xB7 /q to quit${RESET}`);
|
|
@@ -7056,12 +7062,12 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
7056
7062
|
ws.close(1e3, "sigint");
|
|
7057
7063
|
});
|
|
7058
7064
|
});
|
|
7059
|
-
function printInbound(msg) {
|
|
7065
|
+
function printInbound(msg, myLogin) {
|
|
7060
7066
|
switch (msg.type) {
|
|
7061
7067
|
case "subscribed":
|
|
7062
7068
|
break;
|
|
7063
7069
|
case "event": {
|
|
7064
|
-
renderEvent(msg.event);
|
|
7070
|
+
renderEvent(msg.event, myLogin);
|
|
7065
7071
|
break;
|
|
7066
7072
|
}
|
|
7067
7073
|
case "op_message": {
|
|
@@ -7099,13 +7105,14 @@ function previewPayload(p) {
|
|
|
7099
7105
|
}
|
|
7100
7106
|
return JSON.stringify(p).slice(0, 240);
|
|
7101
7107
|
}
|
|
7102
|
-
function renderEvent(ev) {
|
|
7108
|
+
function renderEvent(ev, myLogin) {
|
|
7103
7109
|
const ts2 = shortTs(ev.ts);
|
|
7104
7110
|
const p = ev.payload || {};
|
|
7105
7111
|
if (ev.kind === "chat") {
|
|
7106
7112
|
if (ev.type === "prompt") {
|
|
7107
7113
|
const text = String(p.text ?? p.prompt ?? "").trim() || JSON.stringify(p).slice(0, 200);
|
|
7108
7114
|
const source = String(p.source ?? "cli");
|
|
7115
|
+
if (source === "operator" && myLogin && p.authorLogin === myLogin) return;
|
|
7109
7116
|
const label = source === "operator" ? `${BOLD}@${String(p.authorLogin ?? "remote")} \u203A${RESET}` : `${BOLD}(cli) \u203A${RESET}`;
|
|
7110
7117
|
console.log(`${DIM}[${ts2}]${RESET} ${label} ${text}`);
|
|
7111
7118
|
return;
|
|
@@ -7119,6 +7126,10 @@ function renderEvent(ev) {
|
|
|
7119
7126
|
}
|
|
7120
7127
|
if (ev.type === "reply") {
|
|
7121
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
|
+
}
|
|
7122
7133
|
const tag = p.chatId ? `${AMBER}claude${RESET} ${DIM}(reply to ${String(p.chatId).slice(0, 8)})${RESET}` : `${AMBER}claude${RESET}`;
|
|
7123
7134
|
console.log(`${DIM}[${ts2}]${RESET} ${tag} ${text}`);
|
|
7124
7135
|
return;
|
|
@@ -7646,7 +7657,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
|
|
|
7646
7657
|
|
|
7647
7658
|
// src/index.ts
|
|
7648
7659
|
var program2 = new Command();
|
|
7649
|
-
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.
|
|
7660
|
+
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.17");
|
|
7650
7661
|
program2.addCommand(loginCmd);
|
|
7651
7662
|
program2.addCommand(logoutCmd);
|
|
7652
7663
|
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.17",
|
|
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",
|