@usebitl/cli 0.1.7 → 0.1.9
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/adapters/bitl-hook.mjs +13 -0
- package/adapters/dist/core.mjs +1 -1
- package/dist/chunks/{chunk-NSV54EH7.mjs → chunk-J2A2UUOE.mjs} +2 -2
- package/dist/chunks/{src-7PXGOHYD.mjs → src-YSXYJABQ.mjs} +1 -1
- package/dist/cli.mjs +3 -3
- package/package.json +1 -1
- package/web/assets/index-BqtWjy33.js +9 -0
- package/web/assets/index-P_OV048r.css +2 -0
- package/web/index.html +2 -2
- package/web/sw.js +1 -1
- package/web/assets/index-CGAu1lky.js +0 -9
- package/web/assets/index-D4irERRN.css +0 -2
package/adapters/bitl-hook.mjs
CHANGED
|
@@ -56,6 +56,18 @@ function watchAgyPermission(payload) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Claude Code agent view (`claude agents`): the daemon keeps pre-warmed sessions parked as spares (CLAUDE_BG_SOURCE=spare).
|
|
61
|
+
* A parked spare fires SessionStart but gets no prompt until a task is dispatched to it, and is retired after an hour idle
|
|
62
|
+
* without a SessionEnd reaching us — so its start would sit on the board as an empty card. Drop only the start: if a task
|
|
63
|
+
* is dispatched later, its first prompt creates the card.
|
|
64
|
+
*/
|
|
65
|
+
const isParkedSpareStart = (source, payload) =>
|
|
66
|
+
source === 'claude-code' &&
|
|
67
|
+
payload?.hook_event_name === 'SessionStart' &&
|
|
68
|
+
process.env.CLAUDE_CODE_SESSION_KIND === 'bg' &&
|
|
69
|
+
process.env.CLAUDE_BG_SOURCE === 'spare';
|
|
70
|
+
|
|
59
71
|
async function main() {
|
|
60
72
|
const receivedAt = new Date().toISOString(); // when the hook ran (not when it reached the server)
|
|
61
73
|
const source = argValue('--source') ?? 'claude-code';
|
|
@@ -72,6 +84,7 @@ async function main() {
|
|
|
72
84
|
const event = argValue('--event');
|
|
73
85
|
if (event && payload && typeof payload === 'object' && payload.hook_event_name === undefined) payload.hook_event_name = event;
|
|
74
86
|
if (source === 'antigravity' && event === 'PreToolUse') watchAgyPermission(payload);
|
|
87
|
+
if (isParkedSpareStart(source, payload)) return;
|
|
75
88
|
await sendRecord({ source, receivedAt, payload });
|
|
76
89
|
}
|
|
77
90
|
|
package/adapters/dist/core.mjs
CHANGED
|
@@ -20060,7 +20060,7 @@ function removeCloudLogin(home = bitlHome()) {
|
|
|
20060
20060
|
rmSync(cloudKeyPath(home), { force: true });
|
|
20061
20061
|
}
|
|
20062
20062
|
function clientVersionHeader() {
|
|
20063
|
-
const v = "0.1.
|
|
20063
|
+
const v = "0.1.9";
|
|
20064
20064
|
return v ? { "x-bitl-client": v } : {};
|
|
20065
20065
|
}
|
|
20066
20066
|
function resolveTarget(home = bitlHome()) {
|
|
@@ -20117,7 +20117,7 @@ async function latestVersion(home, now) {
|
|
|
20117
20117
|
return latest;
|
|
20118
20118
|
}
|
|
20119
20119
|
var updateCommand = (install = process.env.BITL_INSTALL) => install === "npx" ? "npx @usebitl/cli@latest start" : "npm i -g @usebitl/cli";
|
|
20120
|
-
async function checkCliUpdate(current = "0.1.
|
|
20120
|
+
async function checkCliUpdate(current = "0.1.9", opts = {}) {
|
|
20121
20121
|
if (!current || process.env.BITL_NO_UPDATE_CHECK === "1") return void 0;
|
|
20122
20122
|
const latest = await latestVersion(opts.home ?? bitlHome(), opts.now ?? Date.now());
|
|
20123
20123
|
if (!latest || compareVersions(latest, current) <= 0) return void 0;
|
package/dist/cli.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
unwrapMasterKey,
|
|
22
22
|
verifyPublicKey,
|
|
23
23
|
wrapMasterKey
|
|
24
|
-
} from "./chunks/chunk-
|
|
24
|
+
} from "./chunks/chunk-J2A2UUOE.mjs";
|
|
25
25
|
|
|
26
26
|
// ../src/index.ts
|
|
27
27
|
import { homedir as homedir2 } from "node:os";
|
|
@@ -451,7 +451,7 @@ async function logout() {
|
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
// ../src/update.ts
|
|
454
|
-
async function updateNotice(current = "0.1.
|
|
454
|
+
async function updateNotice(current = "0.1.9") {
|
|
455
455
|
const u = await checkCliUpdate(current);
|
|
456
456
|
return u && `${t("update.available", { ...u })}
|
|
457
457
|
${t("update.changelog")}`;
|
|
@@ -605,7 +605,7 @@ async function main(argv) {
|
|
|
605
605
|
if (String(typeof warning === "string" ? warning : warning.message).startsWith("SQLite is an experimental feature")) return;
|
|
606
606
|
emitWarning(warning, ...rest2);
|
|
607
607
|
});
|
|
608
|
-
const { startServer } = await import("./chunks/src-
|
|
608
|
+
const { startServer } = await import("./chunks/src-YSXYJABQ.mjs");
|
|
609
609
|
await startServer();
|
|
610
610
|
console.log(t("start.pair", { url: localPairUrl() }));
|
|
611
611
|
return;
|
package/package.json
CHANGED