@usebitl/cli 0.1.6 → 0.1.8

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.6";
470
+ const v = "0.1.8";
471
471
  return v ? { "x-bitl-client": v } : {};
472
472
  }
473
473
  function resolveTarget(home = bitlHome()) {