clawborrator-cli 0.0.12 → 0.0.13
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 +39 -2
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -6948,7 +6948,7 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
6948
6948
|
printInbound(msg);
|
|
6949
6949
|
if (msg.type === "subscribed") {
|
|
6950
6950
|
mySubscription = true;
|
|
6951
|
-
console.log(`${DIM}attached as ${BOLD}${msg.role}${RESET}${DIM}. type for prompt \xB7 /m <text> for op-msg \xB7 /y /n on permissions \xB7 /q to quit${RESET}`);
|
|
6951
|
+
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}`);
|
|
6952
6952
|
}
|
|
6953
6953
|
});
|
|
6954
6954
|
ws.on("close", (code, reason) => {
|
|
@@ -7011,6 +7011,43 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
7011
7011
|
console.log(`${DIM}unknown slash-command: ${text} (try /m /y /n /q)${RESET}`);
|
|
7012
7012
|
return;
|
|
7013
7013
|
}
|
|
7014
|
+
const xMatch = /^(@[A-Za-z0-9._\-/]+)\s+([\s\S]+)$/.exec(text);
|
|
7015
|
+
if (xMatch) {
|
|
7016
|
+
const targetRef = xMatch[1];
|
|
7017
|
+
const promptText = xMatch[2].trim();
|
|
7018
|
+
if (!promptText) {
|
|
7019
|
+
console.log(`${DIM}usage: ${targetRef} <prompt>${RESET}`);
|
|
7020
|
+
return;
|
|
7021
|
+
}
|
|
7022
|
+
(async () => {
|
|
7023
|
+
const needle = targetRef.startsWith("@") ? targetRef : "@" + targetRef;
|
|
7024
|
+
const slash = needle.indexOf("/");
|
|
7025
|
+
let ownerLogin = null;
|
|
7026
|
+
let slug;
|
|
7027
|
+
if (slash > 0) {
|
|
7028
|
+
ownerLogin = needle.slice(1, slash);
|
|
7029
|
+
slug = "@" + needle.slice(slash + 1).replace(/^@/, "");
|
|
7030
|
+
} else {
|
|
7031
|
+
slug = needle;
|
|
7032
|
+
}
|
|
7033
|
+
try {
|
|
7034
|
+
const data = await api.get("/api/v1/sessions");
|
|
7035
|
+
const match = data.items.find(
|
|
7036
|
+
(s) => s.routingName === slug && (ownerLogin === null || s.startedByLogin === ownerLogin)
|
|
7037
|
+
);
|
|
7038
|
+
if (!match) {
|
|
7039
|
+
console.error(`${RED}error: no session ${targetRef} (try \`claw session list\` in another terminal)${RESET}`);
|
|
7040
|
+
return;
|
|
7041
|
+
}
|
|
7042
|
+
const out2 = { type: "prompt", sessionId: match.id, text: promptText };
|
|
7043
|
+
ws.send(JSON.stringify(out2));
|
|
7044
|
+
console.log(`${DIM}[${ts()}]${RESET} ${AMBER}\u2192 prompt \u2192 ${targetRef}${RESET} ${promptText}`);
|
|
7045
|
+
} catch (e) {
|
|
7046
|
+
console.error(`${RED}error: ${e?.message ?? String(e)}${RESET}`);
|
|
7047
|
+
}
|
|
7048
|
+
})();
|
|
7049
|
+
return;
|
|
7050
|
+
}
|
|
7014
7051
|
const out = { type: "prompt", sessionId, text };
|
|
7015
7052
|
ws.send(JSON.stringify(out));
|
|
7016
7053
|
console.log(`${DIM}[${ts()}]${RESET} ${AMBER}\u2192 prompt${RESET} ${text}`);
|
|
@@ -7605,7 +7642,7 @@ var webhookCmd = new Command("webhook").description("manage webhook subscription
|
|
|
7605
7642
|
|
|
7606
7643
|
// src/index.ts
|
|
7607
7644
|
var program2 = new Command();
|
|
7608
|
-
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.
|
|
7645
|
+
program2.name("claw").description("clawborrator CLI \u2014 control your Claude Code sessions from the terminal").version("0.0.13");
|
|
7609
7646
|
program2.addCommand(loginCmd);
|
|
7610
7647
|
program2.addCommand(logoutCmd);
|
|
7611
7648
|
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.13",
|
|
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",
|