@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.
@@ -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
 
@@ -467,7 +467,7 @@ function readCloudConfig(home = bitlHome()) {
467
467
  }
468
468
  }
469
469
  function clientVersionHeader() {
470
- const v = "0.1.7";
470
+ const v = "0.1.9";
471
471
  return v ? { "x-bitl-client": v } : {};
472
472
  }
473
473
  function resolveTarget(home = bitlHome()) {
@@ -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.7";
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.7", opts = {}) {
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;
@@ -10,7 +10,7 @@ import {
10
10
  checkCliUpdate,
11
11
  parseWireRecord,
12
12
  sessionKey
13
- } from "./chunk-NSV54EH7.mjs";
13
+ } from "./chunk-J2A2UUOE.mjs";
14
14
 
15
15
  // ../../../node_modules/.pnpm/bn.js@4.12.5/node_modules/bn.js/lib/bn.js
16
16
  var require_bn = __commonJS({
package/dist/cli.mjs CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  unwrapMasterKey,
22
22
  verifyPublicKey,
23
23
  wrapMasterKey
24
- } from "./chunks/chunk-NSV54EH7.mjs";
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.7") {
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-7PXGOHYD.mjs");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usebitl/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "BITL — see which of your AI coding agents (Claude Code, Codex, Antigravity) are waiting for you. Local board or usebitl.com",
5
5
  "type": "module",
6
6
  "bin": {