@staff0rd/assist 0.1218.0 → 0.1220.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.
Files changed (92) hide show
  1. package/dist/.build-files +86 -86
  2. package/dist/{addActivity-4AZB5FNU.js → addActivity-VWYYD3S7.js} +3 -3
  3. package/dist/{addPhase-LNPXIYPK.js → addPhase-AQRCH2ZL.js} +4 -4
  4. package/dist/{advise-MTBFUXTQ.js → advise-J6HQWJUY.js} +4 -4
  5. package/dist/{askCheck-SX5W2VA4.js → askCheck-OM2V2ILE.js} +8 -8
  6. package/dist/{askDesign-SZ7K6CGJ.js → askDesign-67H56MMG.js} +2 -2
  7. package/dist/{branch-VE22QM2F.js → branch-K45GT7M6.js} +4 -4
  8. package/dist/built-version +1 -1
  9. package/dist/{chunk-5PVYAAPY.js → chunk-2NSFICTL.js} +1 -1
  10. package/dist/{chunk-2KN7ASRE.js → chunk-2PJELPWT.js} +1 -1
  11. package/dist/{chunk-AEKCC6KD.js → chunk-3SPX33RA.js} +2 -2
  12. package/dist/{chunk-TLJTRWSR.js → chunk-4BZ52VZL.js} +1 -1
  13. package/dist/{chunk-3RPXIPH5.js → chunk-4TOFIAJQ.js} +2 -2
  14. package/dist/{chunk-4RFTQWCL.js → chunk-4TP22QIG.js} +1 -1
  15. package/dist/{chunk-VOZOQ7ZU.js → chunk-6VHSP7OM.js} +6 -6
  16. package/dist/{chunk-3ODUG247.js → chunk-B6XZ72DY.js} +1 -1
  17. package/dist/{chunk-3FMGNYHM.js → chunk-BEVDTMKB.js} +1 -1
  18. package/dist/{chunk-INQATDX5.js → chunk-BXAQOMRA.js} +1 -1
  19. package/dist/{chunk-2CRZID7T.js → chunk-DQ6HCKXN.js} +11 -37
  20. package/dist/{chunk-ATKBOUCC.js → chunk-ESNGXPOL.js} +8 -8
  21. package/dist/{chunk-ZKBD7ZIP.js → chunk-FSYH5PZU.js} +1 -1
  22. package/dist/{chunk-XE57ISQA.js → chunk-GKKYQHKI.js} +1 -1
  23. package/dist/{chunk-RV5U5FUG.js → chunk-GKQV27WM.js} +19 -26
  24. package/dist/{chunk-YBVGYTVF.js → chunk-HFONOHA7.js} +1 -1
  25. package/dist/{chunk-S4NSHQQ3.js → chunk-KE6SKMNG.js} +1 -1
  26. package/dist/{chunk-6C255DOU.js → chunk-LADJTWTG.js} +179 -69
  27. package/dist/{chunk-T6WF6NZA.js → chunk-LQBZP7T2.js} +1 -1
  28. package/dist/{chunk-7Q7JIS5A.js → chunk-MN5WFVKQ.js} +1 -1
  29. package/dist/{chunk-MBSMCUTL.js → chunk-MRHAE5BG.js} +1 -1
  30. package/dist/{chunk-CUQ7A4YH.js → chunk-N7MOTWGW.js} +1 -1
  31. package/dist/{chunk-RKNMJQF6.js → chunk-NBUBXIUE.js} +3 -3
  32. package/dist/{chunk-NGG4N5VZ.js → chunk-NHJ4GUTW.js} +1 -1
  33. package/dist/{chunk-G5IRYDTJ.js → chunk-OETJO2XU.js} +5 -5
  34. package/dist/{chunk-HANSK4D3.js → chunk-OX6NROSP.js} +1 -1
  35. package/dist/{chunk-R3BKXOWM.js → chunk-PKEIJJ5G.js} +2 -2
  36. package/dist/{chunk-SLTINDT7.js → chunk-QUHEM3YC.js} +3 -3
  37. package/dist/{chunk-NWCNDJBK.js → chunk-QVHBQTYZ.js} +1 -1
  38. package/dist/{chunk-V23C35QR.js → chunk-QZXHLY6L.js} +2 -2
  39. package/dist/{chunk-KPVSCQHQ.js → chunk-R2SOOESA.js} +2 -2
  40. package/dist/{chunk-HOZ7ATOX.js → chunk-RJPUT3MG.js} +1 -1
  41. package/dist/{chunk-TGCXWMNU.js → chunk-TJYDNLJX.js} +2 -2
  42. package/dist/{chunk-YYLGARCU.js → chunk-UDEVQEM5.js} +1 -1
  43. package/dist/{chunk-JEWWWHLD.js → chunk-UIVH3UTB.js} +1 -1
  44. package/dist/{chunk-PIPTIJL2.js → chunk-UQS4CK75.js} +1 -1
  45. package/dist/{chunk-EN57YHHK.js → chunk-VE2MTM7N.js} +1 -1
  46. package/dist/{chunk-24WESUC2.js → chunk-W5B7I3PC.js} +1 -1
  47. package/dist/{chunk-ORIIRECU.js → chunk-WXBTLN2E.js} +1 -1
  48. package/dist/{chunk-2VQGIVEV.js → chunk-XEB7KYZ7.js} +2 -2
  49. package/dist/{chunk-7QTQJKJU.js → chunk-ZYM4VXQ2.js} +1 -1
  50. package/dist/{cliHook-66JBCEHG.js → cliHook-RXBTCBJ7.js} +7 -7
  51. package/dist/{cliHookCheck-6VEZGNQI.js → cliHookCheck-WTR47R4A.js} +3 -3
  52. package/dist/{codexHook-5LK4N2AU.js → codexHook-TCFGH5KU.js} +9 -9
  53. package/dist/commands/extension/extension/updates.json +2 -2
  54. package/dist/commands/sessions/web/bundle.js +434 -434
  55. package/dist/{commit-YWSX4PND.js → commit-I7G3RGBD.js} +5 -5
  56. package/dist/{doctorNodes-MR5C4FAF.js → doctorNodes-VGLOJC5D.js} +5 -5
  57. package/dist/{done-6SQ4ZFU5.js → done-4774MHRU.js} +5 -5
  58. package/dist/{editHook-ZJBYDJ7A.js → editHook-TLWOG7DB.js} +7 -7
  59. package/dist/{fixConflict-CK6BZSOB.js → fixConflict-SBQVCQBA.js} +5 -5
  60. package/dist/index.js +52 -52
  61. package/dist/{launchMode-2AV2GQZV.js → launchMode-ZBTDVC2G.js} +15 -15
  62. package/dist/{list-B53EGB5N.js → list-7HBHDDY4.js} +6 -6
  63. package/dist/{migrate-EQEBYLSV.js → migrate-XRW3GOM6.js} +4 -4
  64. package/dist/{next-G5K5TM3V.js → next-KO3JPKVQ.js} +14 -14
  65. package/dist/{phaseDone-X77US4BL.js → phaseDone-HZ2ZXRC2.js} +6 -6
  66. package/dist/{piHook-PHJVAO43.js → piHook-WYM2A7MI.js} +7 -7
  67. package/dist/{propose-V4APKP64.js → propose-XOVJL7GW.js} +5 -5
  68. package/dist/{refine-U245OW2L.js → refine-XPMFZ2IO.js} +16 -16
  69. package/dist/{restartDaemon-CN5I6QIB.js → restartDaemon-PXTMQOXH.js} +2 -2
  70. package/dist/{restartNode-Y4IHGBFW.js → restartNode-W5JQG2DP.js} +5 -5
  71. package/dist/{review-RWWCSIRN.js → review-DCBA33AZ.js} +5 -5
  72. package/dist/{reviewPrComments-MKPSQ6BR.js → reviewPrComments-J23PK2NG.js} +5 -5
  73. package/dist/{rewindPhase-SZFVC6W5.js → rewindPhase-3K5VYYKU.js} +9 -9
  74. package/dist/{run-FYD73JOG.js → run-3C4RNIML.js} +12 -12
  75. package/dist/{run-JXWKKDT5.js → run-4HYNSV6Y.js} +12 -12
  76. package/dist/{runDaemon-5SPXM7TW.js → runDaemon-GVJJULUB.js} +33 -25
  77. package/dist/{runParallelPhase-VXN3OZXF.js → runParallelPhase-KPCQWPFK.js} +8 -8
  78. package/dist/{runRefine-MDYWKJ3O.js → runRefine-UDPQU3IX.js} +16 -16
  79. package/dist/{scan-VAQU6SGK.js → scan-7Y747MSA.js} +3 -3
  80. package/dist/{schemaConfirm-6TEMFXGX.js → schemaConfirm-JFXCNJFJ.js} +3 -3
  81. package/dist/{schemaLock-WKR3Y542.js → schemaLock-O6HASHR4.js} +3 -3
  82. package/dist/{schemaUnlock-BYFQUMQ2.js → schemaUnlock-5J3T4HRU.js} +3 -3
  83. package/dist/{search-RGWI5N3E.js → search-R23JJROM.js} +6 -6
  84. package/dist/{show-AF3AHY3O.js → show-BASBE5KD.js} +4 -4
  85. package/dist/{show-MPJ5KOKQ.js → show-UDZ6MAMB.js} +4 -4
  86. package/dist/{signExtension-AHXRV5XT.js → signExtension-HUVMD5L7.js} +1 -1
  87. package/dist/{update-V46T4YOF.js → update-WO2VDF3U.js} +2 -2
  88. package/dist/{updateNode-3EH44S2Z.js → updateNode-MCSGOTEQ.js} +5 -5
  89. package/dist/{updatePlan-JPQNCN43.js → updatePlan-4ORF5MXV.js} +5 -5
  90. package/dist/{web-2RV7AVAP.js → web-GHQMEWL3.js} +18 -18
  91. package/dist/{web-PPEZAIVF.js → web-RM4RBFSW.js} +18 -18
  92. package/package.json +1 -1
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-6MXYEGDK.js";
23
23
  import {
24
24
  harnessAdapter
25
- } from "./chunk-6C255DOU.js";
25
+ } from "./chunk-LADJTWTG.js";
26
26
  import "./chunk-MRUIXQXS.js";
27
27
  import "./chunk-YLQAQHRT.js";
28
28
  import "./chunk-HRQ7LBXR.js";
@@ -41,7 +41,7 @@ import {
41
41
  import "./chunk-XA3VSUG6.js";
42
42
  import "./chunk-GVVK5XFZ.js";
43
43
  import "./chunk-EOOPPGMZ.js";
44
- import "./chunk-RV5U5FUG.js";
44
+ import "./chunk-GKQV27WM.js";
45
45
  import "./chunk-YS46IJ4M.js";
46
46
  import "./chunk-XSDG7HTJ.js";
47
47
  import "./chunk-GRXFWFGP.js";
@@ -2,8 +2,8 @@ import {
2
2
  createBranch,
3
3
  generateBranchSlug,
4
4
  isConciseSlug
5
- } from "./chunk-T6WF6NZA.js";
6
- import "./chunk-ORIIRECU.js";
5
+ } from "./chunk-LQBZP7T2.js";
6
+ import "./chunk-WXBTLN2E.js";
7
7
  import "./chunk-OZNYQOQK.js";
8
8
  import "./chunk-2T5HRFWP.js";
9
9
  import "./chunk-WM5GLHOH.js";
@@ -15,7 +15,7 @@ import "./chunk-EKKGNYON.js";
15
15
  import "./chunk-WPRXBDFP.js";
16
16
  import "./chunk-TBHJ7JDT.js";
17
17
  import "./chunk-6MXYEGDK.js";
18
- import "./chunk-6C255DOU.js";
18
+ import "./chunk-LADJTWTG.js";
19
19
  import "./chunk-MRUIXQXS.js";
20
20
  import "./chunk-YLQAQHRT.js";
21
21
  import "./chunk-HRQ7LBXR.js";
@@ -31,7 +31,7 @@ import "./chunk-LKZ7J5AK.js";
31
31
  import "./chunk-XA3VSUG6.js";
32
32
  import "./chunk-GVVK5XFZ.js";
33
33
  import "./chunk-EOOPPGMZ.js";
34
- import "./chunk-RV5U5FUG.js";
34
+ import "./chunk-GKQV27WM.js";
35
35
  import "./chunk-YS46IJ4M.js";
36
36
  import "./chunk-XSDG7HTJ.js";
37
37
  import "./chunk-GRXFWFGP.js";
@@ -1 +1 @@
1
- 0.1218.0
1
+ 0.1220.0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  harnessAdapter,
3
3
  parseRolloutEntry
4
- } from "./chunk-6C255DOU.js";
4
+ } from "./chunk-LADJTWTG.js";
5
5
  import {
6
6
  resolveCapability
7
7
  } from "./chunk-QC6JEJEO.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-6MXYEGDK.js";
5
5
  import {
6
6
  harnessAdapter
7
- } from "./chunk-6C255DOU.js";
7
+ } from "./chunk-LADJTWTG.js";
8
8
  import {
9
9
  activeHarness
10
10
  } from "./chunk-K4DJEFDZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  checkoutPr
3
- } from "./chunk-MBSMCUTL.js";
3
+ } from "./chunk-MRHAE5BG.js";
4
4
  import {
5
5
  launchBlocker
6
6
  } from "./chunk-24YN3552.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-3DNFNT2L.js";
20
20
  import {
21
21
  harnessAdapter
22
- } from "./chunk-6C255DOU.js";
22
+ } from "./chunk-LADJTWTG.js";
23
23
 
24
24
  // src/commands/launchPrSkill.ts
25
25
  import chalk from "chalk";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3DLJJ7YO.js";
4
4
  import {
5
5
  package_default
6
- } from "./chunk-PIPTIJL2.js";
6
+ } from "./chunk-UQS4CK75.js";
7
7
  import {
8
8
  loadConfig
9
9
  } from "./chunk-YS46IJ4M.js";
@@ -16,7 +16,7 @@ import {
16
16
  codexRolloutMeta,
17
17
  deriveHistoryFields,
18
18
  readCodexHeadLines
19
- } from "./chunk-6C255DOU.js";
19
+ } from "./chunk-LADJTWTG.js";
20
20
  import {
21
21
  resolveHarness
22
22
  } from "./chunk-XZSATLYY.js";
@@ -26,7 +26,7 @@ import {
26
26
  import {
27
27
  NODE_VERSION_KEY,
28
28
  declaredNode
29
- } from "./chunk-RV5U5FUG.js";
29
+ } from "./chunk-GKQV27WM.js";
30
30
  import {
31
31
  resolveCurrentOrigin
32
32
  } from "./chunk-GRXFWFGP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  authoredPhases
3
- } from "./chunk-3ODUG247.js";
3
+ } from "./chunk-B6XZ72DY.js";
4
4
 
5
5
  // src/commands/backlog/resolvePlan.ts
6
6
  function resolvePlan(item) {
@@ -15,16 +15,16 @@ import {
15
15
  import {
16
16
  createBranch,
17
17
  generateBranchSlug
18
- } from "./chunk-T6WF6NZA.js";
18
+ } from "./chunk-LQBZP7T2.js";
19
19
  import {
20
20
  inWebSession
21
21
  } from "./chunk-HKGCLAZ7.js";
22
22
  import {
23
23
  executePhase
24
- } from "./chunk-SLTINDT7.js";
24
+ } from "./chunk-QUHEM3YC.js";
25
25
  import {
26
26
  backlogPhaseActivity
27
- } from "./chunk-3FMGNYHM.js";
27
+ } from "./chunk-BEVDTMKB.js";
28
28
  import {
29
29
  awaitHarness
30
30
  } from "./chunk-ZYK7V4PG.js";
@@ -59,10 +59,10 @@ import {
59
59
  import {
60
60
  buildReviewPhase,
61
61
  resolveReviewPhase
62
- } from "./chunk-S4NSHQQ3.js";
62
+ } from "./chunk-KE6SKMNG.js";
63
63
  import {
64
64
  resolvePlan
65
- } from "./chunk-4RFTQWCL.js";
65
+ } from "./chunk-4TP22QIG.js";
66
66
  import {
67
67
  findOneItem,
68
68
  getOrigin,
@@ -86,7 +86,7 @@ import {
86
86
  import {
87
87
  harnessAdapter,
88
88
  withoutResumeSession
89
- } from "./chunk-6C255DOU.js";
89
+ } from "./chunk-LADJTWTG.js";
90
90
  import {
91
91
  buildFeature
92
92
  } from "./chunk-LKZ7J5AK.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  REVIEW_PHASE_NAME
3
- } from "./chunk-CUQ7A4YH.js";
3
+ } from "./chunk-N7MOTWGW.js";
4
4
 
5
5
  // src/commands/backlog/authoredPhases.ts
6
6
  function authoredPhases(plan) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  REVIEW_PHASE_NAME
3
- } from "./chunk-CUQ7A4YH.js";
3
+ } from "./chunk-N7MOTWGW.js";
4
4
  import {
5
5
  phaseSessions
6
6
  } from "./chunk-XEHE4IC2.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4CP23TT2.js";
4
4
  import {
5
5
  declaredNode
6
- } from "./chunk-RV5U5FUG.js";
6
+ } from "./chunk-GKQV27WM.js";
7
7
  import {
8
8
  stopDaemon
9
9
  } from "./chunk-EU5YCR2M.js";
@@ -22,8 +22,9 @@ import {
22
22
  expandTilde
23
23
  } from "./chunk-LKDW2GWH.js";
24
24
  import {
25
+ findNodePin,
25
26
  loginShellCommand
26
- } from "./chunk-6C255DOU.js";
27
+ } from "./chunk-LADJTWTG.js";
27
28
  import {
28
29
  daemonLog
29
30
  } from "./chunk-MRUIXQXS.js";
@@ -31,7 +32,7 @@ import {
31
32
  NODE_VERSION_KEY,
32
33
  declaredNode,
33
34
  resolveNodeSpec
34
- } from "./chunk-RV5U5FUG.js";
35
+ } from "./chunk-GKQV27WM.js";
35
36
  import {
36
37
  getCachedOrigin
37
38
  } from "./chunk-XSDG7HTJ.js";
@@ -189,7 +190,7 @@ ${output}` : "";
189
190
  }
190
191
 
191
192
  // src/commands/sessions/daemon/worktree/installPaths.ts
192
- import { resolve as resolve2 } from "path";
193
+ import { resolve } from "path";
193
194
 
194
195
  // src/commands/sessions/daemon/worktree/enclosingPaths.ts
195
196
  import { isAbsolute, relative } from "path";
@@ -262,33 +263,6 @@ function quoteForPosixShell(value) {
262
263
  return `'${value.replaceAll("'", `'\\''`)}'`;
263
264
  }
264
265
 
265
- // src/commands/sessions/daemon/worktree/findNodePin.ts
266
- import { existsSync as existsSync3, readFileSync } from "fs";
267
- import { dirname as dirname2, join as join3, resolve } from "path";
268
- var PIN_FILES = [".node-version", ".nvmrc"];
269
- function readPin(file) {
270
- if (!existsSync3(file)) return void 0;
271
- try {
272
- return readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).find((line) => line && !line.startsWith("#"));
273
- } catch {
274
- return void 0;
275
- }
276
- }
277
- function findNodePin(dir, root) {
278
- const top = resolve(root);
279
- let current = resolve(dir);
280
- for (; ; ) {
281
- for (const name of PIN_FILES) {
282
- const file = join3(current, name);
283
- const spec = readPin(file);
284
- if (spec) return { file, spec };
285
- }
286
- const parent = dirname2(current);
287
- if (current === top || parent === current) return void 0;
288
- current = parent;
289
- }
290
- }
291
-
292
266
  // src/commands/sessions/daemon/worktree/resolveInstallNode.ts
293
267
  var defaultDeps = {
294
268
  resolve: (spec) => resolveNodeSpec(spec),
@@ -492,7 +466,7 @@ function pathsProgress(paths, states, failures, onInstalling) {
492
466
 
493
467
  // src/commands/sessions/daemon/worktree/installPaths.ts
494
468
  function installPaths(worktreePath, paths, onSeeded, onInstalling) {
495
- const dirs = paths.map((rel) => resolve2(worktreePath, rel));
469
+ const dirs = paths.map((rel) => resolve(worktreePath, rel));
496
470
  const enclosing = enclosingPaths(dirs);
497
471
  const states = paths.map(() => "pending");
498
472
  const failures = paths.map(() => void 0);
@@ -558,8 +532,8 @@ function runInstall(worktreePath, clone, install, onSeeded, onInstalling = () =>
558
532
  }
559
533
 
560
534
  // src/commands/sessions/daemon/worktree/seedWorktree.ts
561
- import { copyFileSync, existsSync as existsSync4, mkdirSync } from "fs";
562
- import { dirname as dirname3, join as join4 } from "path";
535
+ import { copyFileSync, existsSync as existsSync3, mkdirSync } from "fs";
536
+ import { dirname as dirname2, join as join3 } from "path";
563
537
  function seedWorktree(worktreePath, clone, onSeeded = () => {
564
538
  }, onInstalling) {
565
539
  const cfg = worktreeConfigFor(clone);
@@ -568,11 +542,11 @@ function seedWorktree(worktreePath, clone, onSeeded = () => {
568
542
  }
569
543
  function copyConfigFiles(worktreePath, clone, copy) {
570
544
  for (const rel of copy) {
571
- const src = join4(clone, rel);
572
- if (!existsSync4(src)) continue;
573
- const dest = join4(worktreePath, rel);
545
+ const src = join3(clone, rel);
546
+ if (!existsSync3(src)) continue;
547
+ const dest = join3(worktreePath, rel);
574
548
  try {
575
- mkdirSync(dirname3(dest), { recursive: true });
549
+ mkdirSync(dirname2(dest), { recursive: true });
576
550
  copyFileSync(src, dest);
577
551
  daemonLog(`worktree ${worktreePath} seeded ${rel}`);
578
552
  } catch (error) {
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-JM57BCD6.js";
11
11
  import {
12
12
  firstBrokenHop
13
- } from "./chunk-JEWWWHLD.js";
13
+ } from "./chunk-UIVH3UTB.js";
14
14
  import {
15
15
  describePeerError,
16
16
  fetchPeerJson
@@ -40,7 +40,7 @@ import {
40
40
  resolveLinkTarget,
41
41
  usageWindowKey,
42
42
  watcherLogPath
43
- } from "./chunk-3RPXIPH5.js";
43
+ } from "./chunk-4TOFIAJQ.js";
44
44
  import {
45
45
  TRACE_HEADER,
46
46
  newTraceId
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  ASSIST_VERSION,
50
50
  PROTOCOL_VERSION
51
- } from "./chunk-TLJTRWSR.js";
51
+ } from "./chunk-4BZ52VZL.js";
52
52
  import {
53
53
  findLinkSpec
54
54
  } from "./chunk-6KSMPTXN.js";
@@ -85,7 +85,7 @@ import {
85
85
  } from "./chunk-UJBW7FVI.js";
86
86
  import {
87
87
  targetConversationEvents
88
- } from "./chunk-V23C35QR.js";
88
+ } from "./chunk-QZXHLY6L.js";
89
89
  import {
90
90
  configEntryLayers,
91
91
  ghFailure,
@@ -253,7 +253,7 @@ import {
253
253
  } from "./chunk-KDYJRHCI.js";
254
254
  import {
255
255
  rewindItemToPhase
256
- } from "./chunk-R3BKXOWM.js";
256
+ } from "./chunk-PKEIJJ5G.js";
257
257
  import {
258
258
  loadItemSummaries,
259
259
  phaseUsageTotals,
@@ -282,7 +282,7 @@ import {
282
282
  } from "./chunk-D2AUYB7K.js";
283
283
  import {
284
284
  resolveRewindPlan
285
- } from "./chunk-TGCXWMNU.js";
285
+ } from "./chunk-TJYDNLJX.js";
286
286
  import {
287
287
  deleteItem,
288
288
  getOrigin,
@@ -331,7 +331,7 @@ import {
331
331
  discoverSessionJsonlPaths,
332
332
  harnessAdapter,
333
333
  parseSessionFile
334
- } from "./chunk-6C255DOU.js";
334
+ } from "./chunk-LADJTWTG.js";
335
335
  import {
336
336
  harnessLabel
337
337
  } from "./chunk-XZSATLYY.js";
@@ -362,7 +362,7 @@ import {
362
362
  import {
363
363
  ensureDaemonRunning,
364
364
  restartDaemon
365
- } from "./chunk-INQATDX5.js";
365
+ } from "./chunk-BXAQOMRA.js";
366
366
  import {
367
367
  waitForBuild
368
368
  } from "./chunk-4CP23TT2.js";
@@ -14,7 +14,7 @@ import {
14
14
  isHello,
15
15
  linkVersionCheck,
16
16
  negotiateProtocol
17
- } from "./chunk-TLJTRWSR.js";
17
+ } from "./chunk-4BZ52VZL.js";
18
18
 
19
19
  // src/commands/sessions/nodes/probePeerHello.ts
20
20
  var HELLO_TIMEOUT_MS = 5e3;
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  currentExecutionIdentity,
6
6
  getSchemaSessionApprovalPath
7
- } from "./chunk-7Q7JIS5A.js";
7
+ } from "./chunk-MN5WFVKQ.js";
8
8
  import {
9
9
  closeDb,
10
10
  getDb,
@@ -100,36 +100,29 @@ function findInstalledNodes(search) {
100
100
  }
101
101
 
102
102
  // src/shared/nodeRuntime/nodeForRange.ts
103
- function nodeForRange(range, deps) {
104
- const current = deps.current.version.replace(/^v/, "");
105
- if (semver.satisfies(current, range))
106
- return {
107
- ok: true,
108
- node: {
109
- path: deps.current.path,
110
- binDir: dirname2(deps.current.path),
111
- version: current
112
- }
113
- };
103
+ function resolved(path, version) {
104
+ return { ok: true, node: { path, binDir: dirname2(path), version } };
105
+ }
106
+ function nodeForRange(range, deps, highest = false) {
107
+ const current = {
108
+ path: deps.current.path,
109
+ version: deps.current.version.replace(/^v/, "")
110
+ };
111
+ const currentFits = semver.satisfies(current.version, range);
112
+ if (currentFits && !highest) return resolved(current.path, current.version);
114
113
  const installed = findInstalledNodes(deps);
114
+ const candidates = currentFits ? [current, ...installed] : installed;
115
115
  const best = semver.maxSatisfying(
116
- installed.map((node) => node.version),
116
+ candidates.map((node) => node.version),
117
117
  range
118
118
  );
119
- const match = installed.find((node) => node.version === best);
119
+ const match = candidates.find((node) => node.version === best);
120
120
  if (!match)
121
121
  return {
122
122
  ok: false,
123
123
  error: `no installed node satisfies it (searched fnm, nvm and volta; found ${installed.map((node) => node.version).join(", ") || "none"})`
124
124
  };
125
- return {
126
- ok: true,
127
- node: {
128
- path: match.path,
129
- binDir: dirname2(match.path),
130
- version: match.version
131
- }
132
- };
125
+ return resolved(match.path, match.version);
133
126
  }
134
127
 
135
128
  // src/shared/nodeRuntime/resolveNodeSpec.ts
@@ -149,7 +142,7 @@ function defaultDeps() {
149
142
  function isPathSpec(spec) {
150
143
  return /[/\\]/.test(spec) || spec.startsWith("~");
151
144
  }
152
- function resolveNodeSpec(spec, deps = defaultDeps()) {
145
+ function resolveNodeSpec(spec, deps = defaultDeps(), highest = false) {
153
146
  const trimmed = spec.trim();
154
147
  if (isPathSpec(trimmed)) return nodeAtPath(trimmed, deps);
155
148
  const range = semver2.validRange(trimmed.replace(/^v/, ""));
@@ -158,12 +151,12 @@ function resolveNodeSpec(spec, deps = defaultDeps()) {
158
151
  ok: false,
159
152
  error: "not a node version (e.g. 24, 24.22.1) or a path to a node binary"
160
153
  };
161
- return nodeForRange(range, deps);
154
+ return nodeForRange(range, deps, highest);
162
155
  }
163
156
 
164
157
  // src/shared/nodeRuntime/declaredNode.ts
165
158
  var NODE_VERSION_KEY = "sessions.nodeVersion";
166
- var resolved = /* @__PURE__ */ new Map();
159
+ var resolved2 = /* @__PURE__ */ new Map();
167
160
  function readSpec() {
168
161
  try {
169
162
  return loadConfig().sessions?.nodeVersion?.trim() || void 0;
@@ -174,10 +167,10 @@ function readSpec() {
174
167
  function declaredNode() {
175
168
  const spec = readSpec();
176
169
  if (!spec) return void 0;
177
- let resolution = resolved.get(spec);
170
+ let resolution = resolved2.get(spec);
178
171
  if (!resolution) {
179
172
  resolution = resolveNodeSpec(spec);
180
- if (resolution.ok) resolved.set(spec, resolution);
173
+ if (resolution.ok) resolved2.set(spec, resolution);
181
174
  }
182
175
  return { spec, ...resolution };
183
176
  }
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-MA7HTHHM.js";
10
10
  import {
11
11
  previewAnswerWaitBlocker
12
- } from "./chunk-2KN7ASRE.js";
12
+ } from "./chunk-2PJELPWT.js";
13
13
  import {
14
14
  askQuestionEnabled
15
15
  } from "./chunk-IBPSXDUB.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  REVIEW_PHASE_NAME
3
- } from "./chunk-CUQ7A4YH.js";
3
+ } from "./chunk-N7MOTWGW.js";
4
4
 
5
5
  // src/commands/backlog/buildReviewPhase.ts
6
6
  function buildReviewPhase() {