clawborrator-cli 0.0.50 → 0.0.51
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 +20 -5
- package/package.json +1 -1
package/dist-bundled/claw.cjs
CHANGED
|
@@ -67830,7 +67830,7 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
67830
67830
|
const limitArg = String(opts.limit ?? "50").toLowerCase();
|
|
67831
67831
|
const historyLimit = limitArg === "all" ? 5e3 : limitArg === "0" ? 0 : Math.max(0, parseInt(limitArg, 10) || 0);
|
|
67832
67832
|
if (historyLimit > 0) {
|
|
67833
|
-
const kindsParam = opts.opMessages === false ? "&kinds=event" : "";
|
|
67833
|
+
const kindsParam = opts.opMessages === false ? "&kinds=event,file" : "";
|
|
67834
67834
|
try {
|
|
67835
67835
|
const tl = await api.get(`/api/v1/sessions/${encodeURIComponent(sessionId)}/timeline?limit=${historyLimit}${kindsParam}`);
|
|
67836
67836
|
if (tl.items.length > 0) {
|
|
@@ -67843,8 +67843,11 @@ var sessionAttach = new Command("attach").description("open a TUI on a session \
|
|
|
67843
67843
|
/* fromBacklog */
|
|
67844
67844
|
true
|
|
67845
67845
|
);
|
|
67846
|
-
} else {
|
|
67846
|
+
} else if (item.kind === "op-message") {
|
|
67847
67847
|
console.log(`${DIM2}[${shortTs(item.ts)}]${RESET2} ${GREEN}@${item.authorLogin}${RESET2} ${item.text}`);
|
|
67848
|
+
} else if (item.kind === "file") {
|
|
67849
|
+
const verb = item.action === "uploaded" ? `${GREEN}\u{1F4CE} uploaded${RESET2}` : `${RED}\u2717 deleted${RESET2}`;
|
|
67850
|
+
console.log(`${DIM2}[${shortTs(item.ts)}]${RESET2} ${BLUE}@${item.file.uploaderLogin}${RESET2} ${verb} ${BOLD2}${item.file.filename}${RESET2} ${DIM2}(${fmtBytes(item.file.size)} \xB7 fileId=${item.file.id})${RESET2}`);
|
|
67848
67851
|
}
|
|
67849
67852
|
}
|
|
67850
67853
|
console.log(`${DIM2}\u2500\u2500\u2500 live \u2500\u2500\u2500${RESET2}`);
|
|
@@ -68124,6 +68127,12 @@ function printInbound(msg, myLogin) {
|
|
|
68124
68127
|
if (!msg.connected) stopWorking();
|
|
68125
68128
|
break;
|
|
68126
68129
|
}
|
|
68130
|
+
case "file_event": {
|
|
68131
|
+
const verb = msg.action === "uploaded" ? `${GREEN}\u{1F4CE} uploaded${RESET2}` : `${RED}\u2717 deleted${RESET2}`;
|
|
68132
|
+
const f = msg.file;
|
|
68133
|
+
say(`${DIM2}[${ts()}]${RESET2} ${BLUE}@${f.uploaderLogin}${RESET2} ${verb} ${BOLD2}${f.filename}${RESET2} ${DIM2}(${fmtBytes(f.size)} \xB7 fileId=${f.id})${RESET2}`);
|
|
68134
|
+
break;
|
|
68135
|
+
}
|
|
68127
68136
|
case "ack":
|
|
68128
68137
|
break;
|
|
68129
68138
|
case "error":
|
|
@@ -68135,6 +68144,12 @@ function shortTs(iso) {
|
|
|
68135
68144
|
const d = new Date(iso);
|
|
68136
68145
|
return Number.isFinite(d.getTime()) ? d.toLocaleTimeString() : iso.slice(11, 19);
|
|
68137
68146
|
}
|
|
68147
|
+
function fmtBytes(n) {
|
|
68148
|
+
if (n < 1024) return `${n} B`;
|
|
68149
|
+
if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`;
|
|
68150
|
+
if (n < 1024 ** 3) return `${(n / 1024 / 1024).toFixed(1)} MB`;
|
|
68151
|
+
return `${(n / 1024 ** 3).toFixed(2)} GB`;
|
|
68152
|
+
}
|
|
68138
68153
|
function previewPayload(p) {
|
|
68139
68154
|
const text = p?.text ?? p?.preview ?? p?.outputPreview ?? "";
|
|
68140
68155
|
if (typeof text === "string" && text.length > 0) {
|
|
@@ -68543,7 +68558,7 @@ var sessionSharesCmd = new Command("shares").description("list users granted acc
|
|
|
68543
68558
|
console.log(` @${s.login.padEnd(20)} ${s.role.padEnd(9)} since ${s.createdAt}`);
|
|
68544
68559
|
}
|
|
68545
68560
|
});
|
|
68546
|
-
function
|
|
68561
|
+
function fmtBytes2(n) {
|
|
68547
68562
|
if (n < 1024) return `${n} B`;
|
|
68548
68563
|
if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KB`;
|
|
68549
68564
|
if (n < 1024 ** 3) return `${(n / 1024 / 1024).toFixed(1)} MB`;
|
|
@@ -68565,7 +68580,7 @@ var sessionFiles = new Command("files").description("list a session's file attac
|
|
|
68565
68580
|
const ts2 = f.uploadedAt.slice(0, 19).replace("T", " ");
|
|
68566
68581
|
const flag = f.deletedAt ? " [deleted]" : "";
|
|
68567
68582
|
const sha = f.sha256.slice(0, 12);
|
|
68568
|
-
console.log(`#${String(f.id).padStart(5)} ${ts2} ${
|
|
68583
|
+
console.log(`#${String(f.id).padStart(5)} ${ts2} ${fmtBytes2(f.size).padStart(8)} @${f.uploaderLogin.padEnd(20)} ${f.scope.padEnd(11)} sha=${sha}\u2026 ${f.filename}${flag}`);
|
|
68569
68584
|
}
|
|
68570
68585
|
});
|
|
68571
68586
|
var sessionFileRm = new Command("file-rm").description("delete a file by id. Soft-deletes the row; on-disk blob is swept once no live row references its sha. Prompter+ on the file's session.").argument("<fileId>", "file id (from `claw session files` output, the # column)").action(async (fileId) => {
|
|
@@ -68583,7 +68598,7 @@ var sessionFileRm = new Command("file-rm").description("delete a file by id. Sof
|
|
|
68583
68598
|
}
|
|
68584
68599
|
const refs = r.refsRemaining ?? 0;
|
|
68585
68600
|
if (r.blobDeleted) {
|
|
68586
|
-
console.log(`\u2717 deleted file #${id} \u2014 blob swept (${
|
|
68601
|
+
console.log(`\u2717 deleted file #${id} \u2014 blob swept (${fmtBytes2(r.freedBytes ?? 0)} freed; was the last reference)`);
|
|
68587
68602
|
} else {
|
|
68588
68603
|
console.log(`\u2717 deleted file #${id} \u2014 blob retained (${refs} other live reference${refs === 1 ? "" : "s"})`);
|
|
68589
68604
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawborrator-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
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",
|