clawborrator-cli 0.0.52 → 0.0.53
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/README.md +3 -0
- package/dist-bundled/claw.cjs +12 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,10 +79,13 @@ claw session events @backend --kind chat # transcript history (--limit / -
|
|
|
79
79
|
claw session messages @backend # operator-to-operator chat (op-messages)
|
|
80
80
|
claw session files @backend # list file attachments on a session
|
|
81
81
|
claw session file-rm 42 # delete a file by id (refcount-sweeps blob if last ref)
|
|
82
|
+
# Tip: any prompt that mentions fileId=N will auto-clone the file into
|
|
83
|
+
# the recipient's session — files follow conversations across agents.
|
|
82
84
|
|
|
83
85
|
claw session prompt @backend "deploy to staging" # fire-and-forget
|
|
84
86
|
claw session prompt @backend "@MRIIOT/rust-expert what is a lifetime?" # public-agent dispatch
|
|
85
87
|
claw session prompt @backend "@alice/frontend ..." # cross-account peer (if shared)
|
|
88
|
+
claw session prompt @backend "@MRIIOT/api-expert read fileId=42" # mention a fileId — hub auto-clones into recipient's session
|
|
86
89
|
|
|
87
90
|
claw session share @backend alice --role prompter # grant access (viewer | prompter | approver)
|
|
88
91
|
claw session shares @backend # list current shares
|
package/dist-bundled/claw.cjs
CHANGED
|
@@ -68529,13 +68529,22 @@ var sessionDelete = new Command("delete").description("hard-delete a single sess
|
|
|
68529
68529
|
const sweep = r.blobsSwept && r.blobsSwept > 0 ? ` \xB7 swept ${r.blobsSwept} blob${r.blobsSwept === 1 ? "" : "s"} (${r.bytesFreed ?? 0} bytes freed)` : "";
|
|
68530
68530
|
console.log(`\u2717 deleted ${r.sessionId} (events / op-messages / shares / files cascaded)${sweep}`);
|
|
68531
68531
|
});
|
|
68532
|
-
var sessionPrompt = new Command("prompt").description('send a one-shot prompt to a session\'s live Claude. Fire-and-forget \u2014 to find the eventual reply, run `claw session events <ref> --kind=chat --type=reply` (or `claw route <peer> "..."` for ask-mode that blocks for the answer).').argument("<ref>", "session UUID or @routingName").argument("<text>", "prompt text \u2014 quote multi-word").
|
|
68532
|
+
var sessionPrompt = new Command("prompt").description('send a one-shot prompt to a session\'s live Claude. Fire-and-forget \u2014 to find the eventual reply, run `claw session events <ref> --kind=chat --type=reply` (or `claw route <peer> "..."` for ask-mode that blocks for the answer). Use `--attach <fileId>` (repeatable) to attach files structurally \u2014 equivalent to inlining `fileId=N` tokens but cleaner; the receiving session sees the rewritten ids in its prompt text after forward-clone.').argument("<ref>", "session UUID or @routingName").argument("<text>", "prompt text \u2014 quote multi-word; may be empty if --attach is supplied").option("--attach <fileId>", "fileId to attach (repeatable). Each upload happens via POST /api/v1/sessions/<ref>/files first; this flag references an existing fileId.", (v, prev = []) => {
|
|
68533
|
+
const n = Number.parseInt(v, 10);
|
|
68534
|
+
if (!Number.isInteger(n) || n < 1) throw new Error(`--attach expects a positive integer fileId, got: ${v}`);
|
|
68535
|
+
return [...prev, n];
|
|
68536
|
+
}).action(async (ref, text, opts) => {
|
|
68533
68537
|
const id = await resolveSessionId(ref);
|
|
68538
|
+
const attachments = opts.attach && opts.attach.length > 0 ? opts.attach : void 0;
|
|
68539
|
+
const body = { text };
|
|
68540
|
+
if (attachments) body.attachments = attachments;
|
|
68534
68541
|
const out = await api.post(
|
|
68535
68542
|
`/api/v1/sessions/${encodeURIComponent(id)}/prompt`,
|
|
68536
|
-
|
|
68543
|
+
body
|
|
68537
68544
|
);
|
|
68538
|
-
|
|
68545
|
+
const attachNote = attachments ? ` \xB7 ${attachments.length} attachment(s): ${attachments.join(", ")}` : "";
|
|
68546
|
+
const routeNote = out.routedToAgent ? ` \xB7 routed to @${out.routedToAgent}` : "";
|
|
68547
|
+
console.log(`\u2713 delivered (chatId=${out.chatId})${routeNote}${attachNote}`);
|
|
68539
68548
|
});
|
|
68540
68549
|
var VALID_ROLES = ["viewer", "prompter", "approver"];
|
|
68541
68550
|
var sessionShareCmd = new Command("share").description("grant another GitHub user access to a session. role defaults to prompter (viewer = read-only events; prompter = + send prompts/op-messages; approver = + resolve permission requests).").argument("<ref>", "session UUID or @routingName").argument("<login>", "GitHub login of the user to share with (with or without leading @)").option("--role <role>", `viewer | prompter | approver`, "prompter").action(async (ref, login, opts) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawborrator-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "claw — command-line client for clawborrator. Attach to remote Claude Code sessions, send prompts, resolve permission gates, route across sessions, manage public agents and webhooks. Auth via GitHub OAuth + PKCE.",
|
|
6
6
|
"license": "MIT",
|