claude-code-session-manager 0.42.0 → 0.43.0

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/index.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
9
  <link href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Geist:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
10
- <script type="module" crossorigin src="./assets/index-D4ga1iZ5.js"></script>
10
+ <script type="module" crossorigin src="./assets/index-6w1gIeyB.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="./assets/monaco-editor-BW5C4Iv1.js">
12
12
  <link rel="stylesheet" crossorigin href="./assets/monaco-editor-BTnBOi8r.css">
13
13
  <link rel="stylesheet" crossorigin href="./assets/index-CxGY-V5G.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-session-manager",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "Local cockpit for the Claude Code CLI — multi-tab terminal, full config surface, scheduler, voice dictation, and live observability.",
5
5
  "type": "module",
6
6
  "main": "src/main/index.cjs",
@@ -377,16 +377,43 @@ function parsePrdBodyDepFragments(body) {
377
377
  */
378
378
  function checkDeps(queueEntry, allJobs, prdBody) {
379
379
  const bySlug = new Map(allJobs.map((j) => [j.slug, j]));
380
+ // A PRD's filename carries the allocator's `NN-` prefix, but `dependsOn:` is
381
+ // authored with the bare name (the author cannot know the number that will
382
+ // be issued). Resolve exact slug first, then bare-name — identical rule to
383
+ // schedulerBatch.pickForProject's rowsForDep, which MUST agree with this
384
+ // function (see the missing-row note below).
385
+ const rowsByBareSlug = new Map();
386
+ for (const j of allJobs) {
387
+ const bare = String(j.slug ?? '').replace(/^\d+-/, '');
388
+ if (!rowsByBareSlug.has(bare)) rowsByBareSlug.set(bare, []);
389
+ rowsByBareSlug.get(bare).push(j);
390
+ }
391
+ const rowsForDep = (slug) => {
392
+ const exact = bySlug.get(slug);
393
+ if (exact) return [exact];
394
+ return rowsByBareSlug.get(String(slug ?? '').replace(/^\d+-/, '')) ?? [];
395
+ };
380
396
 
381
397
  // 1. Queue-level dependsOn (explicit).
382
398
  const queueDeps = Array.isArray(queueEntry.dependsOn) ? queueEntry.dependsOn : [];
383
399
  for (const depSlug of queueDeps) {
384
- const dep = bySlug.get(depSlug);
385
- if (!dep) {
386
- return { ok: false, reason: `dependsOn: "${depSlug}" not found in queue` };
387
- }
388
- if (dep.status !== 'completed') {
389
- return { ok: false, reason: `dependsOn: "${depSlug}" is ${dep.status} (need completed)` };
400
+ const deps = rowsForDep(depSlug);
401
+ // A dep with NO row is SATISFIED, not unmet. Completed rows are retired to
402
+ // history shards and their PRD is archived, so absence is the normal
403
+ // end-state of a finished dependency — exactly how pickForProject reads it.
404
+ //
405
+ // This used to return deps_unmet, which put the two halves of the
406
+ // scheduler in direct contradiction: the picker treated a missing dep as
407
+ // done and fired the job, then this check treated the same missing dep as
408
+ // unmet and downgraded the finished run back to pending — an infinite
409
+ // re-run, one full billed claude -p per cycle. It also silently dropped
410
+ // real work: PRDs 854 and 857 each ran to exit 0, were downgraded on a
411
+ // bare dep name that never matched any row, and ended up on disk with no
412
+ // queue row at all.
413
+ if (deps.length === 0) continue;
414
+ const unfinished = deps.find((d) => d.status !== 'completed');
415
+ if (unfinished) {
416
+ return { ok: false, reason: `dependsOn: "${depSlug}" is ${unfinished.status} (need completed)` };
390
417
  }
391
418
  }
392
419