clawborrator-cli 0.0.14 → 0.0.16
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 +14 -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;
|
|
@@ -7276,6 +7283,8 @@ var sessionList = new Command("list").alias("ls").description("list sessions you
|
|
|
7276
7283
|
console.log(" recent hook/chat: claw session events <ref>");
|
|
7277
7284
|
console.log(" operator-to-op chat: claw session messages <ref>");
|
|
7278
7285
|
console.log(" <ref> = UUID, @owner/slug, @slug, or bare slug");
|
|
7286
|
+
console.log(" (PowerShell tip: use the bare-slug form \u2014 `@driver` is parsed as");
|
|
7287
|
+
console.log(" a splatting operator and stripped before reaching the CLI)");
|
|
7279
7288
|
});
|
|
7280
7289
|
var sessionInfo = new Command("info").description("show metadata for a single session").argument("<ref>", "session UUID or @routingName").action(async (ref) => {
|
|
7281
7290
|
const id = await resolveSessionId(ref);
|
|
@@ -7644,7 +7653,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
|
|
|
7644
7653
|
|
|
7645
7654
|
// src/index.ts
|
|
7646
7655
|
var program2 = new Command();
|
|
7647
|
-
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.
|
|
7656
|
+
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.16");
|
|
7648
7657
|
program2.addCommand(loginCmd);
|
|
7649
7658
|
program2.addCommand(logoutCmd);
|
|
7650
7659
|
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.16",
|
|
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",
|