@herbertgao/pi-extensions 2026.11.13 → 2026.11.14

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 (175) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +4 -4
  3. package/node_modules/@herbertgao/pi-inline-skill-commands/README.md +6 -2
  4. package/node_modules/@herbertgao/pi-inline-skill-commands/package.json +1 -1
  5. package/node_modules/@herbertgao/pi-inline-skill-commands/src/index.ts +41 -15
  6. package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +10 -0
  7. package/node_modules/@herbertgao/pi-subagents/README.md +37 -7
  8. package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +113 -34
  9. package/node_modules/@herbertgao/pi-subagents/package.json +9 -4
  10. package/node_modules/@herbertgao/pi-subagents/skills/workflow-authoring/SKILL.md +147 -0
  11. package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +48 -32
  12. package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +16 -8
  13. package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +16 -6
  14. package/node_modules/@herbertgao/pi-subagents/src/index.ts +99 -7
  15. package/node_modules/@herbertgao/pi-subagents/src/mention.ts +5 -7
  16. package/node_modules/@herbertgao/pi-subagents/src/settings.ts +26 -0
  17. package/node_modules/@herbertgao/pi-subagents/src/structured-output.ts +13 -5
  18. package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +55 -8
  19. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-card-redraw.ts +86 -0
  20. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-card.ts +5 -5
  21. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-dialog.ts +478 -115
  22. package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-menu.ts +77 -6
  23. package/node_modules/@herbertgao/pi-subagents/src/workflow/agent-detail.ts +148 -0
  24. package/node_modules/@herbertgao/pi-subagents/src/workflow/host.ts +88 -14
  25. package/node_modules/@herbertgao/pi-subagents/src/workflow/journal.ts +8 -0
  26. package/node_modules/@herbertgao/pi-subagents/src/workflow/json-schema.ts +507 -57
  27. package/node_modules/@herbertgao/pi-subagents/src/workflow/progress.ts +41 -11
  28. package/node_modules/@herbertgao/pi-subagents/src/workflow/runtime.ts +106 -34
  29. package/node_modules/@herbertgao/pi-subagents/src/workflow/task.ts +43 -5
  30. package/node_modules/@herbertgao/pi-subagents/src/workflow/tool-description.ts +93 -153
  31. package/node_modules/@herbertgao/pi-subagents/src/workflow/worker-source.ts +283 -71
  32. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +288 -177
  33. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  34. package/node_modules/@pi-plugins/fast-mode/package.json +7 -7
  35. package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
  36. package/node_modules/pi-lens/CHANGELOG.md +132 -0
  37. package/node_modules/pi-lens/README.md +2 -0
  38. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +1 -0
  39. package/node_modules/pi-lens/dist/{chunk-LGH2HHZG.js → chunk-25CAONWT.js} +36 -25
  40. package/node_modules/pi-lens/dist/{chunk-ZQSSO7LO.js → chunk-2DWNYVUN.js} +3 -3
  41. package/node_modules/pi-lens/dist/{chunk-YCR6ZYTE.js → chunk-2RQREVGO.js} +1 -1
  42. package/node_modules/pi-lens/dist/{chunk-VWEBZ2JV.js → chunk-2XALJI2K.js} +40 -40
  43. package/node_modules/pi-lens/dist/{chunk-PQXUZYTQ.js → chunk-2YQ5LI7R.js} +4 -4
  44. package/node_modules/pi-lens/dist/{chunk-VSQT6IHZ.js → chunk-35UJUF27.js} +18 -4
  45. package/node_modules/pi-lens/dist/{chunk-OLWGYBYT.js → chunk-3IWMNN2S.js} +17 -17
  46. package/node_modules/pi-lens/dist/chunk-3UTDLQWO.js +88 -0
  47. package/node_modules/pi-lens/dist/chunk-3Z7Z3B7V.js +27 -0
  48. package/node_modules/pi-lens/dist/{chunk-UNP6Y4JV.js → chunk-4E4OCW3L.js} +16 -16
  49. package/node_modules/pi-lens/dist/{chunk-37IDWT6O.js → chunk-4GLSO2EM.js} +13 -11
  50. package/node_modules/pi-lens/dist/{chunk-QV3JPCMK.js → chunk-5HVDD7IA.js} +1 -1
  51. package/node_modules/pi-lens/dist/{chunk-ZRQMENT4.js → chunk-62PIU4TO.js} +1 -1
  52. package/node_modules/pi-lens/dist/{chunk-3TSMQZG6.js → chunk-6MDWNZ7E.js} +2 -2
  53. package/node_modules/pi-lens/dist/{chunk-WLD6BGON.js → chunk-6MWX2J5H.js} +4 -0
  54. package/node_modules/pi-lens/dist/{chunk-SCU62JLX.js → chunk-6MZLS6CK.js} +7 -7
  55. package/node_modules/pi-lens/dist/{chunk-B42AIWPJ.js → chunk-7BWPQZHE.js} +3 -3
  56. package/node_modules/pi-lens/dist/{chunk-I3NZVAMN.js → chunk-7JMEPY6P.js} +10 -10
  57. package/node_modules/pi-lens/dist/{chunk-7DPXUPRF.js → chunk-7ORBRDFY.js} +2 -2
  58. package/node_modules/pi-lens/dist/{chunk-6E5QLMWI.js → chunk-7WAQ3K26.js} +23 -23
  59. package/node_modules/pi-lens/dist/{chunk-2H5GHZKC.js → chunk-AB26NAHA.js} +7 -7
  60. package/node_modules/pi-lens/dist/{chunk-BBSDJTOV.js → chunk-AFSG6YUB.js} +13 -13
  61. package/node_modules/pi-lens/dist/{chunk-XDNWR7SG.js → chunk-ALTHJUZO.js} +2 -2
  62. package/node_modules/pi-lens/dist/{chunk-UN72ZAJ5.js → chunk-AOEVZXR6.js} +9 -9
  63. package/node_modules/pi-lens/dist/{chunk-HRLF35WL.js → chunk-ARTCVE6I.js} +9 -9
  64. package/node_modules/pi-lens/dist/{chunk-LQQNFCQJ.js → chunk-B2QO7GHY.js} +1 -1
  65. package/node_modules/pi-lens/dist/{chunk-I2FYOZNW.js → chunk-BJGWP4UX.js} +10 -10
  66. package/node_modules/pi-lens/dist/{chunk-G53LBDNU.js → chunk-BKJ6WZKP.js} +6 -6
  67. package/node_modules/pi-lens/dist/{chunk-P5MSLVUW.js → chunk-BQ72NQQM.js} +11 -11
  68. package/node_modules/pi-lens/dist/{chunk-K7O6AHSJ.js → chunk-BWGNVM33.js} +11 -11
  69. package/node_modules/pi-lens/dist/{chunk-ADYQRETD.js → chunk-BYIEU4E4.js} +2 -2
  70. package/node_modules/pi-lens/dist/{chunk-7ZVTFLCC.js → chunk-CDAJQBKJ.js} +11 -11
  71. package/node_modules/pi-lens/dist/{chunk-BKWFDWYM.js → chunk-D3UQWOCB.js} +16 -16
  72. package/node_modules/pi-lens/dist/{chunk-3PAS2ERX.js → chunk-DHFJS2I4.js} +8 -8
  73. package/node_modules/pi-lens/dist/{chunk-KNSOA43J.js → chunk-DKXIUGNA.js} +2 -2
  74. package/node_modules/pi-lens/dist/{chunk-LOEJFTF2.js → chunk-DLGJYQML.js} +2 -2
  75. package/node_modules/pi-lens/dist/{chunk-VGRGW4UL.js → chunk-DNJJVKJZ.js} +31 -31
  76. package/node_modules/pi-lens/dist/{chunk-5HBQL7DH.js → chunk-EBXCYEII.js} +3 -3
  77. package/node_modules/pi-lens/dist/chunk-EH6EHFW2.js +73 -0
  78. package/node_modules/pi-lens/dist/{chunk-W26QZ3OM.js → chunk-EKQDQPX6.js} +10 -10
  79. package/node_modules/pi-lens/dist/{chunk-TWEOJE3D.js → chunk-EXHSWN3P.js} +844 -377
  80. package/node_modules/pi-lens/dist/{chunk-4IZZEN63.js → chunk-F7BFIENK.js} +33 -33
  81. package/node_modules/pi-lens/dist/{chunk-ZI7YHV6I.js → chunk-FD4LJQ6Y.js} +5 -5
  82. package/node_modules/pi-lens/dist/{chunk-RIH3UBK4.js → chunk-GFCPPCNR.js} +11 -11
  83. package/node_modules/pi-lens/dist/{chunk-5JB4WENL.js → chunk-GIK6VUCY.js} +1 -1
  84. package/node_modules/pi-lens/dist/{chunk-PPQHMSPH.js → chunk-GNK2IHVG.js} +15 -15
  85. package/node_modules/pi-lens/dist/{chunk-CXQYK4YT.js → chunk-H6DNTQ4V.js} +2 -2
  86. package/node_modules/pi-lens/dist/{chunk-NGNBJIUO.js → chunk-HERQPNY6.js} +8 -8
  87. package/node_modules/pi-lens/dist/{chunk-INBK3HIT.js → chunk-HFIFEH46.js} +3 -3
  88. package/node_modules/pi-lens/dist/{chunk-J2ZB5MDS.js → chunk-HKRESBMC.js} +20 -20
  89. package/node_modules/pi-lens/dist/{chunk-AZG5UJYY.js → chunk-HMXWZUQW.js} +1 -1
  90. package/node_modules/pi-lens/dist/{chunk-XSC3BCN3.js → chunk-HOWHAKXO.js} +6 -6
  91. package/node_modules/pi-lens/dist/{chunk-7CLWC2UH.js → chunk-HUWW77QY.js} +1 -1
  92. package/node_modules/pi-lens/dist/{chunk-KZ732ZVW.js → chunk-IO6P3NBP.js} +1 -1
  93. package/node_modules/pi-lens/dist/{chunk-7WKVCZI4.js → chunk-J7VNGHLN.js} +2 -2
  94. package/node_modules/pi-lens/dist/{chunk-QE7BJQ6K.js → chunk-JGCBMCCS.js} +8 -8
  95. package/node_modules/pi-lens/dist/{chunk-PFJLYRO3.js → chunk-KIQSNH3F.js} +34 -34
  96. package/node_modules/pi-lens/dist/{chunk-JGUDT5KD.js → chunk-KSQJBGRO.js} +5 -5
  97. package/node_modules/pi-lens/dist/{chunk-RJ3APNIP.js → chunk-KXKM2DFP.js} +4 -4
  98. package/node_modules/pi-lens/dist/chunk-L3Q72QGQ.js +25 -0
  99. package/node_modules/pi-lens/dist/{chunk-6GLMMGCX.js → chunk-LDPY22FS.js} +2 -2
  100. package/node_modules/pi-lens/dist/{chunk-3PO4YYOX.js → chunk-M3QGXGY4.js} +3793 -3814
  101. package/node_modules/pi-lens/dist/{chunk-NNEQOC3U.js → chunk-MET776XM.js} +9 -7
  102. package/node_modules/pi-lens/dist/{chunk-X33QECRJ.js → chunk-MKQFSW2Q.js} +2 -2
  103. package/node_modules/pi-lens/dist/{chunk-7U36VQL6.js → chunk-MKW7ZUTT.js} +3 -3
  104. package/node_modules/pi-lens/dist/{chunk-PQF6YGYB.js → chunk-N2U644ZW.js} +4 -18
  105. package/node_modules/pi-lens/dist/{chunk-DI4AZZNY.js → chunk-NAACKIKT.js} +2 -2
  106. package/node_modules/pi-lens/dist/{chunk-O6LCSHHI.js → chunk-NHHS5T52.js} +1 -1
  107. package/node_modules/pi-lens/dist/{chunk-DCA2MXVQ.js → chunk-NIZKGBOU.js} +51 -27
  108. package/node_modules/pi-lens/dist/{chunk-PKWEBMCA.js → chunk-NNDZ7DOP.js} +194 -111
  109. package/node_modules/pi-lens/dist/{chunk-Q7J3JYJ2.js → chunk-NZ7NSKIW.js} +13 -13
  110. package/node_modules/pi-lens/dist/{chunk-S6MCMD27.js → chunk-OG3UCAHV.js} +3 -3
  111. package/node_modules/pi-lens/dist/{chunk-3QXFUP6T.js → chunk-OHTHVILU.js} +12 -12
  112. package/node_modules/pi-lens/dist/{chunk-NHA5K226.js → chunk-P7EV5ISR.js} +17 -2
  113. package/node_modules/pi-lens/dist/{chunk-L6BDRYUK.js → chunk-PVV27TOX.js} +5 -5
  114. package/node_modules/pi-lens/dist/{chunk-HIRBC72R.js → chunk-Q32RJDYC.js} +4 -4
  115. package/node_modules/pi-lens/dist/{chunk-QE5DJ7MX.js → chunk-Q4UQNTLB.js} +4 -4
  116. package/node_modules/pi-lens/dist/{chunk-SDYLT45T.js → chunk-QQGZY2BR.js} +2 -2
  117. package/node_modules/pi-lens/dist/{chunk-QMWKSYWB.js → chunk-S247BOH2.js} +4 -4
  118. package/node_modules/pi-lens/dist/{chunk-ARTYCUGF.js → chunk-S7KUDW73.js} +121 -18
  119. package/node_modules/pi-lens/dist/{chunk-6CFSDLHE.js → chunk-SJ2SR432.js} +17 -17
  120. package/node_modules/pi-lens/dist/{chunk-CQY2HEH7.js → chunk-SL4G67AP.js} +2 -2
  121. package/node_modules/pi-lens/dist/{chunk-LVLPA32Q.js → chunk-T2D2WWP6.js} +48 -11
  122. package/node_modules/pi-lens/dist/{chunk-HIJ4CHFF.js → chunk-T7KHGEJ5.js} +3 -3
  123. package/node_modules/pi-lens/dist/{chunk-74AMPWNC.js → chunk-TABDCX35.js} +2 -2
  124. package/node_modules/pi-lens/dist/chunk-TFSBHRL2.js +25 -0
  125. package/node_modules/pi-lens/dist/{chunk-KNJH6WJQ.js → chunk-TQKWR5AZ.js} +7 -7
  126. package/node_modules/pi-lens/dist/chunk-TWAQFMLW.js +110 -0
  127. package/node_modules/pi-lens/dist/{chunk-TKOFTLGB.js → chunk-UARVPNAU.js} +33 -33
  128. package/node_modules/pi-lens/dist/chunk-UWBD3JMH.js +56 -0
  129. package/node_modules/pi-lens/dist/{chunk-K4Z7MK6T.js → chunk-VEF3GFOL.js} +15 -15
  130. package/node_modules/pi-lens/dist/{chunk-4DAHGU3V.js → chunk-W2JPGW7Q.js} +27 -25
  131. package/node_modules/pi-lens/dist/{chunk-CZJGAOKL.js → chunk-W2YHHNY3.js} +7 -7
  132. package/node_modules/pi-lens/dist/{chunk-R4L7KZ7R.js → chunk-WA6U2URH.js} +9 -9
  133. package/node_modules/pi-lens/dist/{chunk-OZQQ3AIR.js → chunk-WAK2AXQQ.js} +9 -9
  134. package/node_modules/pi-lens/dist/{chunk-DFKOA74L.js → chunk-WH6O4IFD.js} +10 -10
  135. package/node_modules/pi-lens/dist/{chunk-27JQHK7Y.js → chunk-WJ7GY5WJ.js} +1 -1
  136. package/node_modules/pi-lens/dist/{chunk-KXGTLAUW.js → chunk-WWZLT6AM.js} +2 -2
  137. package/node_modules/pi-lens/dist/{chunk-O2MHF7QM.js → chunk-XRLZ75YY.js} +38 -38
  138. package/node_modules/pi-lens/dist/chunk-XWWFESYZ.js +27 -0
  139. package/node_modules/pi-lens/dist/chunk-XZSXSM4K.js +27 -0
  140. package/node_modules/pi-lens/dist/{chunk-C5PLBTNR.js → chunk-Y2LIOCA7.js} +1 -1
  141. package/node_modules/pi-lens/dist/{chunk-AXAR5ZW2.js → chunk-YIEHUKX2.js} +84 -169
  142. package/node_modules/pi-lens/dist/{chunk-B2OXE4AH.js → chunk-YOMLAKU6.js} +182 -180
  143. package/node_modules/pi-lens/dist/{chunk-MOAVEPC4.js → chunk-YV7XVYSJ.js} +11 -11
  144. package/node_modules/pi-lens/dist/{chunk-ZULZS2I6.js → chunk-ZVQUYCBU.js} +996 -365
  145. package/node_modules/pi-lens/dist/index.js +4911 -2376
  146. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +8 -8
  147. package/node_modules/pi-lens/dist/mcp/cli.js +40 -40
  148. package/node_modules/pi-lens/dist/mcp/server.js +321 -234
  149. package/node_modules/pi-lens/dist/mcp/worker.js +58 -58
  150. package/node_modules/pi-lens/dist/probes/installer.js +21 -21
  151. package/node_modules/pi-lens/docs/ci-bot-pr-checks.md +18 -9
  152. package/node_modules/pi-lens/docs/ci.md +7 -0
  153. package/node_modules/pi-lens/docs/defect-shapes.md +43 -28
  154. package/node_modules/pi-lens/docs/globalconfig.md +1 -0
  155. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +15 -0
  156. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +3 -3
  157. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +3 -2
  158. package/node_modules/pi-lens/docs/module-report-read-symbol.md +6 -2
  159. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +3 -2
  160. package/node_modules/pi-lens/docs/pi-lens-orchestration.md +2 -1
  161. package/node_modules/pi-lens/docs/pi-lens-subagent.md +2 -1
  162. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  163. package/node_modules/pi-lens/docs/settings.md +1 -0
  164. package/node_modules/pi-lens/docs/usage.md +1 -0
  165. package/node_modules/pi-lens/package.json +1 -1
  166. package/package.json +7 -5
  167. package/node_modules/pi-lens/dist/chunk-2H7NFZ4Q.js +0 -25
  168. package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +0 -56
  169. package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +0 -27
  170. package/node_modules/pi-lens/dist/chunk-H5API74E.js +0 -67
  171. package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +0 -27
  172. package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +0 -88
  173. package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +0 -73
  174. package/node_modules/pi-lens/dist/chunk-MJRGPEQ5.js +0 -25
  175. package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +0 -27
@@ -1,26 +1,27 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
+ findCommandOnPath,
3
4
  resolveToolCwd
4
- } from "./chunk-LVLPA32Q.js";
5
+ } from "./chunk-T2D2WWP6.js";
5
6
  import {
6
7
  allAvailableGlobalBinDirs,
7
8
  installArgs,
8
9
  pmBinary,
9
10
  resolveNodePackageManager
10
- } from "./chunk-LGH2HHZG.js";
11
+ } from "./chunk-25CAONWT.js";
11
12
  import {
12
13
  probeToolAsync
13
- } from "./chunk-KXGTLAUW.js";
14
- import {
15
- registerBackgroundWriteDrain
16
- } from "./chunk-UYXV5NIS.js";
14
+ } from "./chunk-WWZLT6AM.js";
17
15
  import {
18
16
  TRANSIENT_MAX_COOLDOWN_MS,
19
17
  classifyProbeFailure,
20
18
  createAvailabilityLatch,
21
19
  logAvailabilityDecision,
22
20
  startHostStallSampler
23
- } from "./chunk-6GLMMGCX.js";
21
+ } from "./chunk-LDPY22FS.js";
22
+ import {
23
+ registerBackgroundWriteDrain
24
+ } from "./chunk-UYXV5NIS.js";
24
25
  import {
25
26
  acquireBoundedPidFileLock,
26
27
  acquireQuarantinePidFileLock,
@@ -40,7 +41,7 @@ import {
40
41
  startGenerationHeartbeat,
41
42
  tryAcquireGeneration,
42
43
  windowsExe
43
- } from "./chunk-3PO4YYOX.js";
44
+ } from "./chunk-M3QGXGY4.js";
44
45
  import {
45
46
  hashContentBytes
46
47
  } from "./chunk-CIA7X2PZ.js";
@@ -50,20 +51,20 @@ import {
50
51
  projectTrustDenialReason,
51
52
  writeFileAtomic,
52
53
  writeFileAtomicAsync
53
- } from "./chunk-W26QZ3OM.js";
54
+ } from "./chunk-EKQDQPX6.js";
54
55
  import {
55
56
  getDegradationLedgerGeneration,
56
57
  incrementDegradationCount,
57
58
  logExtension,
58
59
  recordDegradationOnce
59
- } from "./chunk-NHA5K226.js";
60
+ } from "./chunk-P7EV5ISR.js";
60
61
  import {
61
62
  createNdjsonLogger,
62
63
  getGlobalPiLensLogDir,
63
64
  getMaxLogSizeMB,
64
65
  isTestMode,
65
66
  isToolInstallDisabled
66
- } from "./chunk-7CLWC2UH.js";
67
+ } from "./chunk-HUWW77QY.js";
67
68
  import {
68
69
  BoundedLruCache,
69
70
  findLocalToolConfig,
@@ -71,57 +72,27 @@ import {
71
72
  isUnderDir,
72
73
  realpathOrResolve,
73
74
  toPosix
74
- } from "./chunk-WLD6BGON.js";
75
+ } from "./chunk-6MWX2J5H.js";
75
76
  import {
76
77
  __require
77
78
  } from "./chunk-NXL4FFQQ.js";
78
79
 
79
80
  // dist/clients/installer/index.js
80
- import { existsSync, readFileSync as readFileSync2, statSync as statSync2, unlinkSync, writeFileSync } from "node:fs";
81
+ import { existsSync, readFileSync as readFileSync2, statSync, unlinkSync, writeFileSync } from "node:fs";
81
82
  import fs2 from "node:fs/promises";
82
83
  import { randomUUID } from "node:crypto";
83
84
  import https from "node:https";
84
85
  import { createRequire } from "node:module";
85
86
  import os from "node:os";
86
- import path4 from "node:path";
87
-
88
- // dist/clients/command-path.js
89
- import { statSync } from "node:fs";
90
- import * as path from "node:path";
91
- function findCommandOnPath(command, isWindows) {
92
- const pathEnv = process.env.PATH || process.env.Path || process.env.path || "";
93
- const dirs = pathEnv.split(path.delimiter);
94
- const names = isWindows ? [command, `${command}.exe`, `${command}.cmd`, `${command}.bat`] : [command];
95
- for (const dir of dirs) {
96
- if (!dir)
97
- continue;
98
- for (const name of names) {
99
- const candidate = isWindows ? path.join(dir, name) : `${dir}${path.sep}${name}`;
100
- try {
101
- const stat = statSync(candidate);
102
- if (!stat.isFile() || stat.size === 0)
103
- continue;
104
- if (isUntrustedProjectPath(candidate)) {
105
- recordProjectCommandRefusal(candidate);
106
- continue;
107
- }
108
- return candidate;
109
- } catch {
110
- }
111
- }
112
- }
113
- return null;
114
- }
115
-
116
- // dist/clients/installer/index.js
87
+ import path3 from "node:path";
117
88
  import { createGunzip } from "node:zlib";
118
89
 
119
90
  // dist/clients/durable-store.js
120
91
  import * as fs from "node:fs";
121
92
  import fsp from "node:fs/promises";
122
- function readLocked(path5) {
93
+ function readLocked(path4) {
123
94
  try {
124
- return fs.readFileSync(path5, "utf8");
95
+ return fs.readFileSync(path4, "utf8");
125
96
  } catch {
126
97
  return void 0;
127
98
  }
@@ -154,9 +125,9 @@ function commitDurableStore(options) {
154
125
  }
155
126
  return committed;
156
127
  }
157
- async function readLockedAsync(path5) {
128
+ async function readLockedAsync(path4) {
158
129
  try {
159
- return await fsp.readFile(path5, "utf8");
130
+ return await fsp.readFile(path4, "utf8");
160
131
  } catch (error) {
161
132
  if (error.code === "ENOENT")
162
133
  return void 0;
@@ -194,8 +165,8 @@ async function commitDurableStoreAsync(options) {
194
165
  }
195
166
 
196
167
  // dist/clients/sessionstart-logger.js
197
- import * as path2 from "node:path";
198
- var SESSIONSTART_LOG_FILE = path2.join(getGlobalPiLensLogDir(), "sessionstart.log");
168
+ import * as path from "node:path";
169
+ var SESSIONSTART_LOG_FILE = path.join(getGlobalPiLensLogDir(), "sessionstart.log");
199
170
  var writer = createNdjsonLogger({
200
171
  filePath: SESSIONSTART_LOG_FILE,
201
172
  maxBytes: getMaxLogSizeMB() * 1024 * 1024,
@@ -208,10 +179,10 @@ function logSessionStart(message) {
208
179
  }
209
180
 
210
181
  // dist/clients/zizmor-config.js
211
- import * as path3 from "node:path";
182
+ import * as path2 from "node:path";
212
183
  var LOCAL_ZIZMOR_CONFIG_NAMES = [
213
- path3.join(".github", "zizmor.yml"),
214
- path3.join(".github", "zizmor.yaml"),
184
+ path2.join(".github", "zizmor.yml"),
185
+ path2.join(".github", "zizmor.yaml"),
215
186
  "zizmor.yml",
216
187
  "zizmor.yaml"
217
188
  ];
@@ -220,7 +191,7 @@ function findLocalZizmorConfig(startDir) {
220
191
  }
221
192
  function isZizmorAuditTarget(filePath) {
222
193
  const normalized = toPosix(filePath);
223
- const base = path3.basename(normalized).toLowerCase();
194
+ const base = path2.basename(normalized).toLowerCase();
224
195
  if (/(^|\/)\.github\/workflows\/[^/]+\.ya?ml$/i.test(normalized))
225
196
  return true;
226
197
  if (base === "action.yml" || base === "action.yaml")
@@ -366,10 +337,10 @@ async function resolveGitHubToken(envKeys = ["GITHUB_TOKEN", "GH_TOKEN"], option
366
337
 
367
338
  // dist/clients/installer/index.js
368
339
  var _installerRequire = createRequire(import.meta.url);
369
- var TOOLS_DIR = path4.join(getGlobalPiLensDir(), "tools");
340
+ var TOOLS_DIR = path3.join(getGlobalPiLensDir(), "tools");
370
341
  var USER_BASE_PROBE_TIMEOUT_MS = 5e3;
371
342
  var ARCHIVE_COMMAND_TIMEOUT_MS = 12e4;
372
- var INSTALL_LOCK_PATH = path4.join(TOOLS_DIR, ".install.lock");
343
+ var INSTALL_LOCK_PATH = path3.join(TOOLS_DIR, ".install.lock");
373
344
  var INSTALL_LOCK_GENERATIONS = `${INSTALL_LOCK_PATH}s`;
374
345
  var activeInstallLocks = /* @__PURE__ */ new Set();
375
346
  var installLockExitCleanupRegistered = false;
@@ -386,7 +357,7 @@ function legacyInstallLockIsStale(maxAgeMs) {
386
357
  return expired || Number.isInteger(owner.pid) && owner.pid > 0 && !realIsPidAlive(owner.pid);
387
358
  } catch {
388
359
  try {
389
- return Date.now() - statSync2(INSTALL_LOCK_PATH).mtimeMs > maxAgeMs;
360
+ return Date.now() - statSync(INSTALL_LOCK_PATH).mtimeMs > maxAgeMs;
390
361
  } catch {
391
362
  return false;
392
363
  }
@@ -496,7 +467,7 @@ async function acquireInstallLock() {
496
467
  };
497
468
  }
498
469
  var GLOBAL_HOME_DIR = getGlobalPiLensDir();
499
- var GITHUB_BIN_DIR = path4.join(GLOBAL_HOME_DIR, "bin");
470
+ var GITHUB_BIN_DIR = path3.join(GLOBAL_HOME_DIR, "bin");
500
471
  var GITHUB_BIN_DIR_PINNED = Boolean(process.env.PI_LENS_HOME?.trim());
501
472
  function assertManagedBinDirInsidePinnedHome(toolId) {
502
473
  if (!GITHUB_BIN_DIR_PINNED)
@@ -928,7 +899,7 @@ var TOOLS = [
928
899
  repo: "hadolint/hadolint",
929
900
  assetMatch: (platform, arch) => {
930
901
  if (platform === "linux")
931
- return arch === "arm64" ? "linux.aarch64" : "linux.x86_64";
902
+ return arch === "arm64" ? "linux-arm64" : "linux-x86_64";
932
903
  if (platform === "darwin")
933
904
  return arch === "arm64" ? "macos-arm64" : "macos-x86_64";
934
905
  if (platform === "win32")
@@ -947,6 +918,15 @@ var TOOLS = [
947
918
  binaryName: "helm",
948
919
  github: {
949
920
  repo: "helm/helm",
921
+ // The GitHub release holds only `.asc` signatures (#5643); the
922
+ // archives are served from get.helm.sh under the same names.
923
+ derivedAsset: (tagName, assetSubstring) => {
924
+ const name = `helm-${tagName}-${assetSubstring}`;
925
+ return {
926
+ name,
927
+ browser_download_url: `https://get.helm.sh/${name}`
928
+ };
929
+ },
950
930
  assetMatch: (platform, arch) => {
951
931
  const cpu = arch === "arm64" ? "arm64" : "amd64";
952
932
  if (platform === "linux")
@@ -975,13 +955,14 @@ var TOOLS = [
975
955
  repo: "opengrep/opengrep",
976
956
  assetMatch: (platform, arch) => {
977
957
  if (platform === "linux")
978
- return arch === "arm64" ? "opengrep_manylinux_aarch64" : "opengrep_manylinux_x86";
958
+ return arch === "arm64" ? "opengrep_linux_aarch64" : "opengrep_linux_x86";
979
959
  if (platform === "darwin")
980
960
  return arch === "arm64" ? "opengrep_osx_arm64" : "opengrep_osx_x86";
981
961
  if (platform === "win32")
982
- return "opengrep_windows_x86.exe";
962
+ return "opengrep_windows_x86.zip";
983
963
  return void 0;
984
- }
964
+ },
965
+ bundleArchiveDlls: true
985
966
  }
986
967
  },
987
968
  {
@@ -1152,7 +1133,7 @@ var TOOLS = [
1152
1133
  if (platform === "darwin")
1153
1134
  return arch === "arm64" ? "darwin_arm64" : "darwin_amd64";
1154
1135
  if (platform === "win32")
1155
- return arch === "arm64" ? "windows_arm64.exe" : "windows_amd64.exe";
1136
+ return "windows_amd64.exe";
1156
1137
  return void 0;
1157
1138
  }
1158
1139
  // bare binary, no archive
@@ -1559,7 +1540,11 @@ var TOOLS = [
1559
1540
  binaryName: "tflint",
1560
1541
  github: {
1561
1542
  repo: "terraform-linters/tflint",
1562
- assetMatch: archAssetMatch(OS_ARCH_ZIP_ASSETS),
1543
+ // No windows_arm64 build upstream (#5624): x64 via emulation.
1544
+ assetMatch: archAssetMatch({
1545
+ ...OS_ARCH_ZIP_ASSETS,
1546
+ win32: { x64: "windows_amd64.zip", arm64: "windows_amd64.zip" }
1547
+ }),
1563
1548
  binaryInArchive: "tflint"
1564
1549
  }
1565
1550
  },
@@ -1685,13 +1670,12 @@ var TOOLS = [
1685
1670
  github: {
1686
1671
  repo: "vale-cli/vale",
1687
1672
  assetMatch: (platform, arch) => {
1688
- const version = "3.14.2";
1689
1673
  if (platform === "linux")
1690
- return arch === "arm64" ? `vale_${version}_Linux_arm64.tar.gz` : `vale_${version}_Linux_64-bit.tar.gz`;
1674
+ return arch === "arm64" ? "_Linux_arm64.tar.gz" : "_Linux_64-bit.tar.gz";
1691
1675
  if (platform === "darwin")
1692
- return arch === "arm64" ? `vale_${version}_macOS_arm64.tar.gz` : `vale_${version}_macOS_64-bit.tar.gz`;
1676
+ return arch === "arm64" ? "_macOS_arm64.tar.gz" : "_macOS_64-bit.tar.gz";
1693
1677
  if (platform === "win32")
1694
- return `vale_${version}_Windows_64-bit.zip`;
1678
+ return "_Windows_64-bit.zip";
1695
1679
  return void 0;
1696
1680
  },
1697
1681
  binaryInArchive: "vale"
@@ -1707,7 +1691,16 @@ var TOOLS = [
1707
1691
  binaryName: "terraform-ls",
1708
1692
  github: {
1709
1693
  repo: "hashicorp/terraform-ls",
1710
- hashiCorpReleaseProduct: "terraform-ls",
1694
+ derivedAsset: (tagName, assetSubstring) => {
1695
+ const version = tagName.replace(/^v/, "").trim();
1696
+ if (!version)
1697
+ return void 0;
1698
+ const name = `terraform-ls_${version}_${assetSubstring}`;
1699
+ return {
1700
+ name,
1701
+ browser_download_url: `https://releases.hashicorp.com/terraform-ls/${version}/${name}`
1702
+ };
1703
+ },
1711
1704
  assetMatch: archAssetMatch(OS_ARCH_ZIP_ASSETS),
1712
1705
  binaryInArchive: "terraform-ls"
1713
1706
  }
@@ -1916,7 +1909,7 @@ var resolvedPathCache = new BoundedLruCache(256);
1916
1909
  function resetResolvedPathCache() {
1917
1910
  resolvedPathCache.clear();
1918
1911
  }
1919
- var PROBE_CACHE_PATH = path4.join(getGlobalPiLensDir(), "probe-cache.json");
1912
+ var PROBE_CACHE_PATH = path3.join(getGlobalPiLensDir(), "probe-cache.json");
1920
1913
  var PROBE_CACHE_LOCK_STALE_MS = 18e4;
1921
1914
  var PROBE_CACHE_TTL_MS = 24 * 60 * 60 * 1e3;
1922
1915
  var PROBE_CACHE_TRANSIENT_COOLDOWN_MS = TRANSIENT_MAX_COOLDOWN_MS;
@@ -1931,6 +1924,7 @@ var _probeCacheRetryAttempt = 0;
1931
1924
  var _probeCacheChangeGeneration = 0;
1932
1925
  var _probeCacheChanges = /* @__PURE__ */ new Map();
1933
1926
  var _probeCacheChangeVersions = /* @__PURE__ */ new Map();
1927
+ var _probeCacheUpdatesPending = /* @__PURE__ */ new Set();
1934
1928
  async function readProbeCache() {
1935
1929
  if (_probeCache !== null)
1936
1930
  return _probeCache;
@@ -2083,6 +2077,7 @@ async function flushProbeCache() {
2083
2077
  }
2084
2078
  }
2085
2079
  async function settleProbeCacheForTests() {
2080
+ await Promise.allSettled(_probeCacheUpdatesPending);
2086
2081
  const result = await flushProbeCache();
2087
2082
  if (result === "idle" || result === "written")
2088
2083
  return void 0;
@@ -2137,27 +2132,34 @@ async function checkProbeCache(toolId) {
2137
2132
  return void 0;
2138
2133
  }
2139
2134
  }
2140
- async function updateProbeCache(toolId, resolvedPath, transient = false) {
2141
- try {
2142
- const stat = await fs2.stat(resolvedPath);
2143
- const cache = await readProbeCache();
2144
- const entry = {
2145
- path: resolvedPath,
2146
- mtimeMs: stat.mtimeMs,
2147
- sizeBytes: stat.size,
2148
- cachedAt: Date.now(),
2149
- ...transient && { transient: true }
2150
- };
2151
- cache[toolId] = entry;
2152
- markProbeCacheChange(toolId, entry);
2153
- } catch {
2154
- }
2135
+ function updateProbeCache(toolId, resolvedPath, transient = false) {
2136
+ const pending = (async () => {
2137
+ try {
2138
+ const stat = await fs2.stat(resolvedPath);
2139
+ const cache = await readProbeCache();
2140
+ const entry = {
2141
+ path: resolvedPath,
2142
+ mtimeMs: stat.mtimeMs,
2143
+ sizeBytes: stat.size,
2144
+ cachedAt: Date.now(),
2145
+ ...transient && { transient: true }
2146
+ };
2147
+ cache[toolId] = entry;
2148
+ markProbeCacheChange(toolId, entry);
2149
+ } catch {
2150
+ }
2151
+ })();
2152
+ _probeCacheUpdatesPending.add(pending);
2153
+ void pending.finally(() => _probeCacheUpdatesPending.delete(pending));
2154
+ return pending;
2155
2155
  }
2156
2156
  function resetProbeCacheStateForTesting() {
2157
+ const unsettled = _probeCacheUpdatesPending.size;
2157
2158
  _probeCache = null;
2158
2159
  _probeCacheDirty = false;
2159
2160
  _probeCacheChanges.clear();
2160
2161
  _probeCacheChangeVersions.clear();
2162
+ _probeCacheUpdatesPending.clear();
2161
2163
  _probeCacheChangeGeneration = 0;
2162
2164
  _probeCacheRetryAttempt = 0;
2163
2165
  resetResolvedPathCache();
@@ -2172,6 +2174,7 @@ function resetProbeCacheStateForTesting() {
2172
2174
  clearTimeout(_probeCacheFlushTimer);
2173
2175
  _probeCacheFlushTimer = null;
2174
2176
  }
2177
+ return unsettled;
2175
2178
  }
2176
2179
  function _peekEnsureInFlightForTesting() {
2177
2180
  return ensureInFlight;
@@ -2195,7 +2198,7 @@ async function isSpawnableCommand(command) {
2195
2198
  const namesPath = installerPlatform() === "win32" ? /[\\/]/.test(command) : command.includes("/");
2196
2199
  if (namesPath) {
2197
2200
  try {
2198
- const stat = statSync2(command);
2201
+ const stat = statSync(command);
2199
2202
  return stat.isFile() && stat.size > 0;
2200
2203
  } catch {
2201
2204
  return false;
@@ -2226,17 +2229,17 @@ function packageEntryVerification(tool) {
2226
2229
  return tool.verification === "package-entry" ? tool.packageName : void 0;
2227
2230
  }
2228
2231
  async function verifyNpmPackageEntry(binPath, packageName) {
2229
- const nodeModulesDir = path4.dirname(path4.dirname(binPath));
2232
+ const nodeModulesDir = path3.dirname(path3.dirname(binPath));
2230
2233
  const pinned = parsePinnedVersion(packageName);
2231
2234
  const bareName = pinned ? packageName.slice(0, -(pinned.length + 1)) : packageName;
2232
- const packageDir = path4.join(nodeModulesDir, ...bareName.split("/"));
2233
- const shimName = path4.basename(binPath).replace(/\.(cmd|exe|ps1|bat)$/i, "").toLowerCase();
2235
+ const packageDir = path3.join(nodeModulesDir, ...bareName.split("/"));
2236
+ const shimName = path3.basename(binPath).replace(/\.(cmd|exe|ps1|bat)$/i, "").toLowerCase();
2234
2237
  const fail = (reason) => {
2235
2238
  logSessionStart(`auto-install verify: failed for ${binPath} (check=package-entry, kind=${reason})`);
2236
2239
  return false;
2237
2240
  };
2238
2241
  try {
2239
- const shim = statSync2(binPath);
2242
+ const shim = statSync(binPath);
2240
2243
  if (!shim.isFile() || shim.size === 0)
2241
2244
  return fail("shim-not-a-file");
2242
2245
  } catch {
@@ -2244,7 +2247,7 @@ async function verifyNpmPackageEntry(binPath, packageName) {
2244
2247
  }
2245
2248
  let manifest;
2246
2249
  try {
2247
- manifest = JSON.parse(await fs2.readFile(path4.join(packageDir, "package.json"), "utf8"));
2250
+ manifest = JSON.parse(await fs2.readFile(path3.join(packageDir, "package.json"), "utf8"));
2248
2251
  } catch {
2249
2252
  return fail("package-json-unreadable");
2250
2253
  }
@@ -2262,7 +2265,7 @@ async function verifyNpmPackageEntry(binPath, packageName) {
2262
2265
  return fail("package-json-no-entry");
2263
2266
  }
2264
2267
  try {
2265
- const stat = statSync2(path4.join(packageDir, entry));
2268
+ const stat = statSync(path3.join(packageDir, entry));
2266
2269
  if (!stat.isFile() || stat.size === 0)
2267
2270
  return fail("entry-not-a-file");
2268
2271
  } catch {
@@ -2399,7 +2402,7 @@ async function getAllToolStatuses(toolIds) {
2399
2402
  continue;
2400
2403
  }
2401
2404
  }
2402
- const localBase = path4.join(TOOLS_DIR, "node_modules", ".bin", tool.binaryName || tool.id);
2405
+ const localBase = path3.join(TOOLS_DIR, "node_modules", ".bin", tool.binaryName || tool.id);
2403
2406
  const localPath = installerPlatform() === "win32" ? `${localBase}.cmd` : localBase;
2404
2407
  try {
2405
2408
  await fs2.access(localPath);
@@ -2426,9 +2429,9 @@ async function getArchiveTreeBundlePath(tool) {
2426
2429
  if (tool.installStrategy !== "archive" || tool.archive?.launcher) {
2427
2430
  return void 0;
2428
2431
  }
2429
- const extractDir = path4.join(TOOLS_DIR, tool.id);
2432
+ const extractDir = path3.join(TOOLS_DIR, tool.id);
2430
2433
  const treeMarker = tool.archive && resolveTreeMarker(tool.archive);
2431
- const marker = treeMarker ? path4.join(extractDir, ...treeMarker.split("/")) : extractDir;
2434
+ const marker = treeMarker ? path3.join(extractDir, ...treeMarker.split("/")) : extractDir;
2432
2435
  try {
2433
2436
  await fs2.access(marker);
2434
2437
  return extractDir;
@@ -2449,14 +2452,14 @@ function resolvePlatformPackageBinary(tool) {
2449
2452
  const fromMain = createRequire(mainPkgJson);
2450
2453
  let pkgDir;
2451
2454
  try {
2452
- pkgDir = path4.dirname(fromMain.resolve(`${platformPkg}/package.json`));
2455
+ pkgDir = path3.dirname(fromMain.resolve(`${platformPkg}/package.json`));
2453
2456
  } catch {
2454
- pkgDir = path4.dirname(_installerRequire.resolve(`${platformPkg}/package.json`));
2457
+ pkgDir = path3.dirname(_installerRequire.resolve(`${platformPkg}/package.json`));
2455
2458
  }
2456
2459
  const isWin = installerPlatform() === "win32";
2457
2460
  for (const bin of spec.binaries) {
2458
2461
  for (const name of isWin ? [`${bin}.exe`, bin] : [bin]) {
2459
- const candidate = path4.join(pkgDir, name);
2462
+ const candidate = path3.join(pkgDir, name);
2460
2463
  if (existsSync(candidate))
2461
2464
  return candidate;
2462
2465
  }
@@ -2494,7 +2497,7 @@ async function getToolPathResolved(toolId, onTransient, storeOnly) {
2494
2497
  if (seen)
2495
2498
  lastManagedInstallVersion.set(toolId, seen);
2496
2499
  } : void 0;
2497
- const localBase = path4.join(TOOLS_DIR, "node_modules", ".bin", tool.binaryName || tool.id);
2500
+ const localBase = path3.join(TOOLS_DIR, "node_modules", ".bin", tool.binaryName || tool.id);
2498
2501
  if (installerPlatform() === "win32") {
2499
2502
  const cmdPath = `${localBase}.cmd`;
2500
2503
  try {
@@ -2579,11 +2582,11 @@ async function getToolPathResolved(toolId, onTransient, storeOnly) {
2579
2582
  async function findGitHubToolPath(binaryName) {
2580
2583
  const isWindows = process.platform === "win32";
2581
2584
  const candidates = isWindows ? [
2582
- path4.join(GITHUB_BIN_DIR, `${binaryName}.exe`),
2583
- path4.join(GITHUB_BIN_DIR, `${binaryName}.bat`),
2584
- path4.join(GITHUB_BIN_DIR, `${binaryName}.cmd`),
2585
- path4.join(GITHUB_BIN_DIR, binaryName)
2586
- ] : [path4.join(GITHUB_BIN_DIR, binaryName)];
2585
+ path3.join(GITHUB_BIN_DIR, `${binaryName}.exe`),
2586
+ path3.join(GITHUB_BIN_DIR, `${binaryName}.bat`),
2587
+ path3.join(GITHUB_BIN_DIR, `${binaryName}.cmd`),
2588
+ path3.join(GITHUB_BIN_DIR, binaryName)
2589
+ ] : [path3.join(GITHUB_BIN_DIR, binaryName)];
2587
2590
  for (const candidate of candidates) {
2588
2591
  try {
2589
2592
  await fs2.access(candidate);
@@ -2660,9 +2663,9 @@ async function findNpmGlobalToolPath(binaryName, onTransient, verificationArgs =
2660
2663
  const binDirs = await getNpmGlobalBinCandidates(onTransient);
2661
2664
  for (const dir of binDirs) {
2662
2665
  const candidates = isWindows ? [
2663
- path4.join(dir, `${binaryName}.cmd`),
2664
- path4.join(dir, `${binaryName}.exe`)
2665
- ] : [path4.join(dir, binaryName)];
2666
+ path3.join(dir, `${binaryName}.cmd`),
2667
+ path3.join(dir, `${binaryName}.exe`)
2668
+ ] : [path3.join(dir, binaryName)];
2666
2669
  const verified = await firstVerifiedBinary(candidates, onTransient, verificationArgs, verificationTimeoutMs);
2667
2670
  if (verified)
2668
2671
  return verified;
@@ -2675,7 +2678,7 @@ async function getNpmGlobalBinCandidates(onTransient) {
2675
2678
  const add = (value) => {
2676
2679
  if (!value)
2677
2680
  return;
2678
- const normalized = path4.resolve(value.trim());
2681
+ const normalized = path3.resolve(value.trim());
2679
2682
  if (!normalized)
2680
2683
  return;
2681
2684
  if (seen.has(normalized))
@@ -2684,9 +2687,9 @@ async function getNpmGlobalBinCandidates(onTransient) {
2684
2687
  dirs.push(normalized);
2685
2688
  };
2686
2689
  if (process.platform === "win32") {
2687
- add(path4.join(process.env.APPDATA || "", "npm"));
2690
+ add(path3.join(process.env.APPDATA || "", "npm"));
2688
2691
  } else {
2689
- add(path4.join(os.homedir(), ".npm-global", "bin"));
2692
+ add(path3.join(os.homedir(), ".npm-global", "bin"));
2690
2693
  }
2691
2694
  for (const dir of await allAvailableGlobalBinDirs(onTransient)) {
2692
2695
  add(dir);
@@ -2696,8 +2699,8 @@ async function getNpmGlobalBinCandidates(onTransient) {
2696
2699
  async function findPipUserToolPath(binaryName, onTransient, verificationArgs = ["--version"], verificationTimeoutMs = 1e4, piLensPrefixesOnly = false) {
2697
2700
  const isWindows = installerPlatform() === "win32";
2698
2701
  const userBaseCandidates = [
2699
- path4.join(getGlobalPiLensDir(), "pip-tools"),
2700
- path4.join(getGlobalPiLensDir(), "pip-user"),
2702
+ path3.join(getGlobalPiLensDir(), "pip-tools"),
2703
+ path3.join(getGlobalPiLensDir(), "pip-user"),
2701
2704
  ...piLensPrefixesOnly ? [] : await getPythonUserBaseCandidates()
2702
2705
  ];
2703
2706
  for (const userBase of userBaseCandidates) {
@@ -2710,17 +2713,17 @@ async function findPipUserToolPath(binaryName, onTransient, verificationArgs = [
2710
2713
  continue;
2711
2714
  if (!/^python\d+$/i.test(entry.name))
2712
2715
  continue;
2713
- scriptDirs.push(path4.join(userBase, entry.name, "Scripts"));
2716
+ scriptDirs.push(path3.join(userBase, entry.name, "Scripts"));
2714
2717
  }
2715
2718
  } catch {
2716
2719
  }
2717
2720
  }
2718
2721
  for (const dir of scriptDirs) {
2719
2722
  const candidates = isWindows ? [
2720
- path4.join(dir, `${binaryName}.exe`),
2721
- path4.join(dir, `${binaryName}.cmd`),
2722
- path4.join(dir, binaryName)
2723
- ] : [path4.join(dir, binaryName)];
2723
+ path3.join(dir, `${binaryName}.exe`),
2724
+ path3.join(dir, `${binaryName}.cmd`),
2725
+ path3.join(dir, binaryName)
2726
+ ] : [path3.join(dir, binaryName)];
2724
2727
  const verified = await firstVerifiedBinary(candidates, onTransient, verificationArgs, verificationTimeoutMs);
2725
2728
  if (verified)
2726
2729
  return verified;
@@ -2756,7 +2759,7 @@ async function getPythonUserBaseCandidates() {
2756
2759
  candidates.push(normalized);
2757
2760
  };
2758
2761
  if (process.platform === "win32") {
2759
- add(path4.join(process.env.APPDATA || "", "Python"));
2762
+ add(path3.join(process.env.APPDATA || "", "Python"));
2760
2763
  }
2761
2764
  const probes = process.platform === "win32" ? [
2762
2765
  { command: "py", args: ["-m", "site", "--user-base"] },
@@ -2895,7 +2898,7 @@ async function installGitHubTool(tool, prefetchedRelease) {
2895
2898
  logSessionStart(`github-install ${tool.id}: release metadata has no assets array`);
2896
2899
  return void 0;
2897
2900
  }
2898
- const asset = pickReleaseAsset(releaseJson.assets, assetSubstring) ?? deriveHashiCorpReleaseAsset(tool, releaseJson.tag_name, assetSubstring);
2901
+ const asset = pickReleaseAsset(releaseJson.assets, assetSubstring) ?? deriveReleaseAsset(tool, releaseJson.tag_name, assetSubstring);
2899
2902
  if (!asset) {
2900
2903
  logSessionStart(`github-install ${tool.id}: no asset matched "${assetSubstring}"`);
2901
2904
  return void 0;
@@ -2915,7 +2918,7 @@ async function installGitHubTool(tool, prefetchedRelease) {
2915
2918
  const binaryName = tool.binaryName ?? tool.id;
2916
2919
  const isWindows = platform === "win32";
2917
2920
  const finalBinaryName = getGitHubInstalledBinaryName(binaryName, platform, asset.name);
2918
- let destPath = path4.join(GITHUB_BIN_DIR, finalBinaryName);
2921
+ let destPath = path3.join(GITHUB_BIN_DIR, finalBinaryName);
2919
2922
  const assetName = asset.name;
2920
2923
  const launcherRuntime = launcherForGitHubAsset(spec, assetName);
2921
2924
  if (launcherRuntime && !await isCommandAvailable(launcherRuntime, ["--version"])) {
@@ -2925,13 +2928,13 @@ async function installGitHubTool(tool, prefetchedRelease) {
2925
2928
  try {
2926
2929
  assertManagedBinDirInsidePinnedHome(tool.id);
2927
2930
  if (launcherRuntime) {
2928
- const assetPath = path4.join(GITHUB_BIN_DIR, `${tool.id}${assetName.endsWith(".phar") ? ".phar" : ".jar"}`);
2931
+ const assetPath = path3.join(GITHUB_BIN_DIR, `${tool.id}${assetName.endsWith(".phar") ? ".phar" : ".jar"}`);
2929
2932
  await writeFileAtomicAsync(assetPath, assetBuffer, {
2930
2933
  bestEffort: false,
2931
2934
  mode: 488
2932
2935
  });
2933
2936
  const launcherName = isWindows ? `${binaryName}.bat` : binaryName;
2934
- destPath = path4.join(GITHUB_BIN_DIR, launcherName);
2937
+ destPath = path3.join(GITHUB_BIN_DIR, launcherName);
2935
2938
  const runtimeTarget = assetName.endsWith(".phar") ? `${tool.id}.phar` : `${tool.id}.jar`;
2936
2939
  const command = isWindows ? `@echo off\r
2937
2940
  ${launcherRuntime} "%~dp0${runtimeTarget}" %*\r
@@ -2956,9 +2959,9 @@ exec ${launcherRuntime} "$(dirname "$0")/${runtimeTarget}" "$@"
2956
2959
  mode: 488
2957
2960
  });
2958
2961
  } else if (assetName.endsWith(".tar.gz") || assetName.endsWith(".tar.xz")) {
2959
- const tmpArchive = path4.join(GITHUB_BIN_DIR, `_tmp_${assetName}`);
2962
+ const tmpArchive = path3.join(GITHUB_BIN_DIR, `_tmp_${assetName}`);
2960
2963
  await fs2.writeFile(tmpArchive, assetBuffer);
2961
- const tmpDir = path4.join(GITHUB_BIN_DIR, `_tmp_extract_${tool.id}`);
2964
+ const tmpDir = path3.join(GITHUB_BIN_DIR, `_tmp_extract_${tool.id}`);
2962
2965
  await fs2.mkdir(tmpDir, { recursive: true });
2963
2966
  const extracted = await runCommand("tar", ["xf", tmpArchive, "-C", tmpDir], GITHUB_BIN_DIR);
2964
2967
  await fs2.rm(tmpArchive, { force: true });
@@ -2979,9 +2982,9 @@ exec ${launcherRuntime} "$(dirname "$0")/${runtimeTarget}" "$@"
2979
2982
  if (!isWindows)
2980
2983
  await fs2.chmod(destPath, 488);
2981
2984
  } else if (assetName.endsWith(".zip")) {
2982
- const tmpArchive = path4.join(GITHUB_BIN_DIR, `_tmp_${assetName}`);
2985
+ const tmpArchive = path3.join(GITHUB_BIN_DIR, `_tmp_${assetName}`);
2983
2986
  await fs2.writeFile(tmpArchive, assetBuffer);
2984
- const tmpDir = path4.join(GITHUB_BIN_DIR, `_tmp_extract_${tool.id}`);
2987
+ const tmpDir = path3.join(GITHUB_BIN_DIR, `_tmp_extract_${tool.id}`);
2985
2988
  await fs2.mkdir(tmpDir, { recursive: true });
2986
2989
  const extracted = isWindows ? await runCommand("powershell", [
2987
2990
  "-NoProfile",
@@ -3001,6 +3004,14 @@ exec ${launcherRuntime} "$(dirname "$0")/${runtimeTarget}" "$@"
3001
3004
  logSessionStart(`github-install ${tool.id}: binary candidates ${JSON.stringify(getArchiveBinaryCandidates(archiveBinaryName, platform, assetName))} not found in zip ${assetName}`);
3002
3005
  return void 0;
3003
3006
  }
3007
+ if (spec.bundleArchiveDlls) {
3008
+ const siblingDir = path3.dirname(srcBinary);
3009
+ for (const entry of await fs2.readdir(siblingDir)) {
3010
+ if (entry.toLowerCase().endsWith(".dll")) {
3011
+ await fs2.rename(path3.join(siblingDir, entry), path3.join(GITHUB_BIN_DIR, entry));
3012
+ }
3013
+ }
3014
+ }
3004
3015
  await fs2.rename(srcBinary, destPath);
3005
3016
  await fs2.rm(tmpDir, { recursive: true, force: true });
3006
3017
  if (!isWindows)
@@ -3023,7 +3034,7 @@ exec ${launcherRuntime} "$(dirname "$0")/${runtimeTarget}" "$@"
3023
3034
  }
3024
3035
  try {
3025
3036
  const extraBuffer = await httpsGet(extraAsset.browser_download_url);
3026
- await writeFileAtomicAsync(path4.join(GITHUB_BIN_DIR, extraName), extraBuffer, { bestEffort: false, mode: 488 });
3037
+ await writeFileAtomicAsync(path3.join(GITHUB_BIN_DIR, extraName), extraBuffer, { bestEffort: false, mode: 488 });
3027
3038
  logSessionStart(`github-install ${tool.id}: installed extra asset ${extraName} (${extraBuffer.length} bytes)`);
3028
3039
  } catch (err) {
3029
3040
  logSessionStart(`github-install ${tool.id}: extra asset ${extraName} download failed: ${err.message}`);
@@ -3038,7 +3049,7 @@ async function findFirstFileRecursive(dir, names) {
3038
3049
  const wanted = new Set(names.map((name) => name.toLowerCase()));
3039
3050
  const entries = await fs2.readdir(dir, { withFileTypes: true });
3040
3051
  for (const entry of entries) {
3041
- const full = path4.join(dir, entry.name);
3052
+ const full = path3.join(dir, entry.name);
3042
3053
  if (entry.isDirectory()) {
3043
3054
  const found = await findFirstFileRecursive(full, names);
3044
3055
  if (found)
@@ -3167,7 +3178,7 @@ async function isManagedToolPresent(toolId) {
3167
3178
  if (!tool.packageName)
3168
3179
  return false;
3169
3180
  try {
3170
- await fs2.access(path4.join(TOOLS_DIR, "node_modules", tool.packageName, "package.json"));
3181
+ await fs2.access(path3.join(TOOLS_DIR, "node_modules", tool.packageName, "package.json"));
3171
3182
  return true;
3172
3183
  } catch {
3173
3184
  return false;
@@ -3454,7 +3465,7 @@ async function refreshPinnedManagedTool(tool, known) {
3454
3465
  };
3455
3466
  }
3456
3467
  function resolveManagedNpmBinPath(binaryName) {
3457
- const binBase = path4.join(TOOLS_DIR, "node_modules", ".bin", binaryName);
3468
+ const binBase = path3.join(TOOLS_DIR, "node_modules", ".bin", binaryName);
3458
3469
  return installerPlatform() === "win32" ? `${binBase}.cmd` : binBase;
3459
3470
  }
3460
3471
  function invalidateManagedToolResolution(toolId) {
@@ -3492,10 +3503,10 @@ async function installMavenTool(tool) {
3492
3503
  try {
3493
3504
  await fs2.mkdir(GITHUB_BIN_DIR, { recursive: true });
3494
3505
  assertManagedBinDirInsidePinnedHome(tool.id);
3495
- const jarPath = path4.join(GITHUB_BIN_DIR, `${tool.id}.jar`);
3506
+ const jarPath = path3.join(GITHUB_BIN_DIR, `${tool.id}.jar`);
3496
3507
  await writeFileAtomicAsync(jarPath, jarBuffer, { bestEffort: false });
3497
3508
  const launcherName = isWindows ? `${binaryName}.bat` : binaryName;
3498
- const launcherPath = path4.join(GITHUB_BIN_DIR, launcherName);
3509
+ const launcherPath = path3.join(GITHUB_BIN_DIR, launcherName);
3499
3510
  if (isWindows) {
3500
3511
  await writeFileAtomicAsync(launcherPath, `@echo off\r
3501
3512
  java -jar "%~dp0${tool.id}.jar" %*\r
@@ -3535,9 +3546,9 @@ async function stripExtractedArchiveRoot(dir, components) {
3535
3546
  const [entry] = entries;
3536
3547
  if (entries.length !== 1 || !entry?.isDirectory())
3537
3548
  return false;
3538
- const root = path4.join(dir, entry.name);
3549
+ const root = path3.join(dir, entry.name);
3539
3550
  for (const child of await fs2.readdir(root))
3540
- await fs2.rename(path4.join(root, child), path4.join(dir, child));
3551
+ await fs2.rename(path3.join(root, child), path3.join(dir, child));
3541
3552
  await fs2.rm(root, { recursive: true, force: true });
3542
3553
  }
3543
3554
  return true;
@@ -3587,7 +3598,7 @@ function runtimeHomeVerdict(runtime) {
3587
3598
  const names = windows ? [`${runtime}.exe`, runtime] : [runtime];
3588
3599
  return names.some((name) => {
3589
3600
  try {
3590
- const stat = statSync2(path4.join(root, home.dir, name));
3601
+ const stat = statSync(path3.join(root, home.dir, name));
3591
3602
  return stat.isFile() && stat.size > 0 && (windows || (stat.mode & 73) !== 0);
3592
3603
  } catch {
3593
3604
  return false;
@@ -3632,9 +3643,9 @@ async function installArchiveTool(tool) {
3632
3643
  const extractName = tool.id;
3633
3644
  const tmpExtractName = `${extractName}.refresh-tmp`;
3634
3645
  const archiveName = `${tool.id}.download.${archiveKind === "zip" ? "zip" : "tgz"}`;
3635
- const extractDir = path4.join(TOOLS_DIR, extractName);
3636
- const tmpExtractDir = path4.join(TOOLS_DIR, tmpExtractName);
3637
- const tmpArchive = path4.join(TOOLS_DIR, archiveName);
3646
+ const extractDir = path3.join(TOOLS_DIR, extractName);
3647
+ const tmpExtractDir = path3.join(TOOLS_DIR, tmpExtractName);
3648
+ const tmpArchive = path3.join(TOOLS_DIR, archiveName);
3638
3649
  try {
3639
3650
  await fs2.mkdir(TOOLS_DIR, { recursive: true });
3640
3651
  await fs2.rm(tmpExtractDir, { recursive: true, force: true });
@@ -3680,7 +3691,7 @@ async function installArchiveTool(tool) {
3680
3691
  }
3681
3692
  if (!spec.launcher) {
3682
3693
  const treeMarker = resolveTreeMarker(spec, platform);
3683
- const tmpMarker = treeMarker ? path4.join(tmpExtractDir, ...treeMarker.split("/")) : tmpExtractDir;
3694
+ const tmpMarker = treeMarker ? path3.join(tmpExtractDir, ...treeMarker.split("/")) : tmpExtractDir;
3684
3695
  try {
3685
3696
  await fs2.access(tmpMarker);
3686
3697
  } catch {
@@ -3696,7 +3707,7 @@ async function installArchiveTool(tool) {
3696
3707
  return extractDir;
3697
3708
  }
3698
3709
  const launcherParts = spec.launcher.split("/").map((p) => p);
3699
- const tmpInnerLauncher = path4.join(tmpExtractDir, ...launcherParts);
3710
+ const tmpInnerLauncher = path3.join(tmpExtractDir, ...launcherParts);
3700
3711
  const tmpResolvedInner = isWindows ? `${tmpInnerLauncher}.bat` : tmpInnerLauncher;
3701
3712
  try {
3702
3713
  await fs2.access(tmpResolvedInner);
@@ -3722,10 +3733,10 @@ async function installArchiveTool(tool) {
3722
3733
  await fs2.mkdir(GITHUB_BIN_DIR, { recursive: true });
3723
3734
  assertManagedBinDirInsidePinnedHome(tool.id);
3724
3735
  await swapExtractedDir(tool.id, tmpExtractDir, extractDir);
3725
- const innerLauncher = path4.join(extractDir, ...launcherParts);
3736
+ const innerLauncher = path3.join(extractDir, ...launcherParts);
3726
3737
  const resolvedInner = isWindows ? `${innerLauncher}.bat` : innerLauncher;
3727
3738
  const launcherName = isWindows ? `${binaryName}.bat` : binaryName;
3728
- const shimPath = path4.join(GITHUB_BIN_DIR, launcherName);
3739
+ const shimPath = path3.join(GITHUB_BIN_DIR, launcherName);
3729
3740
  if (isWindows) {
3730
3741
  await writeFileAtomicAsync(shimPath, `@echo off\r
3731
3742
  call "${resolvedInner}" %*\r
@@ -3781,7 +3792,7 @@ async function installNpmTool(toolId, packageName, binaryName, verificationArgs
3781
3792
  };
3782
3793
  try {
3783
3794
  await fs2.mkdir(TOOLS_DIR, { recursive: true });
3784
- const packageJsonPath = path4.join(TOOLS_DIR, "package.json");
3795
+ const packageJsonPath = path3.join(TOOLS_DIR, "package.json");
3785
3796
  try {
3786
3797
  await fs2.access(packageJsonPath);
3787
3798
  } catch {
@@ -3829,7 +3840,7 @@ async function installNpmTool(toolId, packageName, binaryName, verificationArgs
3829
3840
  if (!outcome.ok) {
3830
3841
  throw new Error(`Failed to install ${packageName}: ${outcome.stderr}`);
3831
3842
  }
3832
- const binBase = path4.join(TOOLS_DIR, "node_modules", ".bin", binaryName);
3843
+ const binBase = path3.join(TOOLS_DIR, "node_modules", ".bin", binaryName);
3833
3844
  const binPath = installerPlatform() === "win32" ? `${binBase}.cmd` : binBase;
3834
3845
  if (installerPlatform() !== "win32") {
3835
3846
  try {
@@ -3871,7 +3882,7 @@ async function installNpmTool(toolId, packageName, binaryName, verificationArgs
3871
3882
  if (!isValid) {
3872
3883
  logSessionStart(`auto-install ${packageName}: installed but verification failed, cleaning up`);
3873
3884
  try {
3874
- const packagePath = path4.join(TOOLS_DIR, "node_modules", packageName);
3885
+ const packagePath = path3.join(TOOLS_DIR, "node_modules", packageName);
3875
3886
  await fs2.rm(packagePath, { recursive: true, force: true });
3876
3887
  await fs2.rm(binBase, { force: true });
3877
3888
  if (isWindows) {
@@ -3899,7 +3910,7 @@ function pipCommandCandidates() {
3899
3910
  return process.platform === "win32" ? ["pip", "py", "python"] : ["pip3", "pip", "python3", "python"];
3900
3911
  }
3901
3912
  function pipScriptsDir(base, platform = installerPlatform()) {
3902
- return path4.join(base, platform === "win32" ? "Scripts" : "bin");
3913
+ return path3.join(base, platform === "win32" ? "Scripts" : "bin");
3903
3914
  }
3904
3915
  var pipPep668LoggedRefusals = createGenerationMap("installer-pep668-log");
3905
3916
  async function pipConstraintEnvFor(toolId) {
@@ -3907,8 +3918,8 @@ async function pipConstraintEnvFor(toolId) {
3907
3918
  if (!constraints || constraints.length === 0)
3908
3919
  return {};
3909
3920
  const directories = [
3910
- path4.join(getGlobalPiLensDir(), "pip-constraints"),
3911
- path4.join(os.tmpdir(), "pi-lens-pip-constraints")
3921
+ path3.join(getGlobalPiLensDir(), "pip-constraints"),
3922
+ path3.join(os.tmpdir(), "pi-lens-pip-constraints")
3912
3923
  ];
3913
3924
  const directory = directories.find((candidate) => !/\s/.test(candidate));
3914
3925
  if (!directory) {
@@ -3919,9 +3930,9 @@ async function pipConstraintEnvFor(toolId) {
3919
3930
  });
3920
3931
  return {};
3921
3932
  }
3922
- const file = path4.join(directory, `${toolId}.txt`);
3933
+ const file = path3.join(directory, `${toolId}.txt`);
3923
3934
  try {
3924
- await fs2.mkdir(path4.dirname(file), { recursive: true });
3935
+ await fs2.mkdir(path3.dirname(file), { recursive: true });
3925
3936
  await writeFileAtomicAsync(file, `${constraints.join("\n")}
3926
3937
  `, {
3927
3938
  bestEffort: false
@@ -4016,7 +4027,7 @@ ${interpreterProbe.stderr}`.match(/^Python\s+([0-9]+(?:\.[0-9]+){1,2})/m)?.[1];
4016
4027
  return void 0;
4017
4028
  }
4018
4029
  const currentPath = process.env.PATH || process.env.Path || "";
4019
- const separator = isWindows ? ";" : path4.delimiter;
4030
+ const separator = isWindows ? ";" : path3.delimiter;
4020
4031
  if (!currentPath.toLowerCase().split(separator).includes(binDir.toLowerCase())) {
4021
4032
  const updatedPath = `${binDir}${separator}${currentPath}`;
4022
4033
  process.env.PATH = updatedPath;
@@ -4025,7 +4036,7 @@ ${interpreterProbe.stderr}`.match(/^Python\s+([0-9]+(?:\.[0-9]+){1,2})/m)?.[1];
4025
4036
  }
4026
4037
  const names = isWindows ? [`${binaryName}.exe`, `${binaryName}.cmd`, binaryName] : [binaryName];
4027
4038
  for (const name of names) {
4028
- const candidate = path4.join(binDir, name);
4039
+ const candidate = path3.join(binDir, name);
4029
4040
  try {
4030
4041
  await fs2.access(candidate);
4031
4042
  return candidate;
@@ -4043,7 +4054,7 @@ ${interpreterProbe.stderr}`.match(/^Python\s+([0-9]+(?:\.[0-9]+){1,2})/m)?.[1];
4043
4054
  "--value",
4044
4055
  "PIPX_BIN_DIR"
4045
4056
  ]);
4046
- const binDir = location.status === 0 && location.stdout.trim() ? location.stdout.trim() : path4.join(os.homedir(), ".local", "bin");
4057
+ const binDir = location.status === 0 && location.stdout.trim() ? location.stdout.trim() : path3.join(os.homedir(), ".local", "bin");
4047
4058
  const binaryPath = await addBinToPath(binDir);
4048
4059
  if (binaryPath)
4049
4060
  return succeeded("pipx", binaryPath);
@@ -4054,10 +4065,10 @@ ${interpreterProbe.stderr}`.match(/^Python\s+([0-9]+(?:\.[0-9]+){1,2})/m)?.[1];
4054
4065
  const pythonCandidates = pipCandidates.filter(({ command }) => command === "python3" || command === "python" || command === "py");
4055
4066
  const pythonAvailability = await Promise.all(pythonCandidates.map(({ command }) => isCommandAvailable(command)));
4056
4067
  const availablePythonCandidates = pythonCandidates.filter((_, index) => pythonAvailability[index]);
4057
- const venvRoot = path4.join(getGlobalPiLensDir(), "pip-tools");
4068
+ const venvRoot = path3.join(getGlobalPiLensDir(), "pip-tools");
4058
4069
  for (const candidate of availablePythonCandidates) {
4059
4070
  const venvBin = pipScriptsDir(venvRoot, installerPlatform());
4060
- let venvPip = path4.join(venvBin, isWindows ? "pip.exe" : "pip");
4071
+ let venvPip = path3.join(venvBin, isWindows ? "pip.exe" : "pip");
4061
4072
  try {
4062
4073
  await fs2.access(venvPip);
4063
4074
  } catch {
@@ -4071,7 +4082,7 @@ ${interpreterProbe.stderr}`.match(/^Python\s+([0-9]+(?:\.[0-9]+){1,2})/m)?.[1];
4071
4082
  try {
4072
4083
  await fs2.access(venvPip);
4073
4084
  } catch {
4074
- venvPip = path4.join(venvBin, isWindows ? "pip.cmd" : "pip3");
4085
+ venvPip = path3.join(venvBin, isWindows ? "pip.cmd" : "pip3");
4075
4086
  try {
4076
4087
  await fs2.access(venvPip);
4077
4088
  } catch {
@@ -4107,7 +4118,7 @@ ${interpreterProbe.stderr}`.match(/^Python\s+([0-9]+(?:\.[0-9]+){1,2})/m)?.[1];
4107
4118
  }
4108
4119
  if (!userRefused)
4109
4120
  throw new Error(`pip install failed: ${candidateErrors.join(" | ") || "unknown error"}`);
4110
- const privateBase = path4.join(getGlobalPiLensDir(), "pip-user");
4121
+ const privateBase = path3.join(getGlobalPiLensDir(), "pip-user");
4111
4122
  const privateEnv = { ...process.env, PYTHONUSERBASE: privateBase };
4112
4123
  for (const candidate of pipCandidates) {
4113
4124
  const args = candidate.command === "pip" || candidate.command === "pip3" ? [...verb, "--user", "--break-system-packages", packageName] : [
@@ -4159,7 +4170,7 @@ async function stampInstallResolution(toolId) {
4159
4170
  return;
4160
4171
  try {
4161
4172
  const resolutionId = lastInstallResolutionId.get(toolId);
4162
- const refresh = await import("./chunk-J2ZB5MDS.js");
4173
+ const refresh = await import("./chunk-HKRESBMC.js");
4163
4174
  await refresh.stampManagedToolInstall(toolId, resolutionId);
4164
4175
  } catch {
4165
4176
  }
@@ -4172,7 +4183,7 @@ async function finishInstallAttempt(toolId, ok, startedAt) {
4172
4183
  if (ok) {
4173
4184
  resetSafeSpawnWindowsCommandCache();
4174
4185
  try {
4175
- const { resetMadgeManagedPathMemo } = await import("./chunk-5YJXF2IS.js");
4186
+ const { resetMadgeManagedPathMemo } = await import("./chunk-UWBD3JMH.js");
4176
4187
  resetMadgeManagedPathMemo();
4177
4188
  } catch (err) {
4178
4189
  logSessionStart(`auto-install ${toolId}: madge memo reset failed: ${err.message}`);
@@ -4202,7 +4213,7 @@ async function installTool(toolId, ownsLock) {
4202
4213
  return false;
4203
4214
  const npmPath = await installNpmTool(tool.id, tool.packageName, tool.binaryName, tool.checkArgs, getToolVerificationTimeout(tool), packageEntryVerification(tool), ownsLock);
4204
4215
  if (npmPath !== void 0) {
4205
- await import("./chunk-J2ZB5MDS.js").then((m) => m.stampManagedToolInstalled(tool.id, tool.packageName)).catch(() => {
4216
+ await import("./chunk-HKRESBMC.js").then((m) => m.stampManagedToolInstalled(tool.id, tool.packageName)).catch(() => {
4206
4217
  });
4207
4218
  }
4208
4219
  return finishInstallAttempt(tool.id, npmPath !== void 0, startedAt);
@@ -4445,10 +4456,10 @@ async function ensureToolResolved(toolId, opts) {
4445
4456
  }
4446
4457
  }
4447
4458
  async function getToolEnvironment() {
4448
- const localBin = path4.join(TOOLS_DIR, "node_modules", ".bin");
4459
+ const localBin = path3.join(TOOLS_DIR, "node_modules", ".bin");
4449
4460
  const currentPath = process.env.PATH || process.env.Path || process.env.path || "";
4450
4461
  const separator = process.platform === "win32" ? ";" : ":";
4451
- const nodeDir = path4.dirname(process.execPath);
4462
+ const nodeDir = path3.dirname(process.execPath);
4452
4463
  const withNode = nodeDir ? `${nodeDir}${separator}${currentPath}` : currentPath;
4453
4464
  const augmentedPath = `${GITHUB_BIN_DIR}${separator}${localBin}${separator}${withNode}`;
4454
4465
  const env = {
@@ -4463,12 +4474,12 @@ async function getToolEnvironment() {
4463
4474
  async function checkAllTools() {
4464
4475
  const results = [];
4465
4476
  for (const tool of TOOLS) {
4466
- const path5 = await getToolPath(tool.id);
4477
+ const path4 = await getToolPath(tool.id);
4467
4478
  results.push({
4468
4479
  id: tool.id,
4469
4480
  name: tool.name,
4470
- installed: path5 !== void 0,
4471
- path: path5
4481
+ installed: path4 !== void 0,
4482
+ path: path4
4472
4483
  });
4473
4484
  }
4474
4485
  return results;
@@ -4548,27 +4559,19 @@ function isAssetSidecar(name) {
4548
4559
  function pickReleaseAsset(assets, assetSubstring) {
4549
4560
  return assets.find((a) => a.name === assetSubstring) ?? assets.find((a) => a.name.includes(assetSubstring) && !isAssetSidecar(a.name));
4550
4561
  }
4551
- function deriveHashiCorpReleaseAsset(tool, tagName, assetSubstring) {
4552
- const product = tool.github?.hashiCorpReleaseProduct;
4553
- if (!product || !tagName)
4554
- return void 0;
4555
- const version = tagName.replace(/^v/, "").trim();
4556
- if (!version)
4562
+ function deriveReleaseAsset(tool, tagName, assetSubstring) {
4563
+ if (!tagName)
4557
4564
  return void 0;
4558
- const assetName = `${product}_${version}_${assetSubstring}`;
4559
- return {
4560
- name: assetName,
4561
- browser_download_url: `https://releases.hashicorp.com/${product}/${version}/${assetName}`
4562
- };
4565
+ return tool.github?.derivedAsset?.(tagName, assetSubstring);
4563
4566
  }
4564
- function resolveDerivedHashiCorpReleaseAsset(toolId, tagName, platform, arch) {
4567
+ function resolveDerivedReleaseAsset(toolId, tagName, platform, arch) {
4565
4568
  const tool = TOOLS.find((t) => t.id === toolId);
4566
4569
  if (!tool)
4567
4570
  return void 0;
4568
4571
  const assetSubstring = tool.github?.assetMatch(platform, arch);
4569
4572
  if (!assetSubstring)
4570
4573
  return void 0;
4571
- return deriveHashiCorpReleaseAsset(tool, tagName, assetSubstring);
4574
+ return deriveReleaseAsset(tool, tagName, assetSubstring);
4572
4575
  }
4573
4576
 
4574
4577
  export {
@@ -4579,7 +4582,6 @@ export {
4579
4582
  commitDurableStore,
4580
4583
  commitDurableStoreAsync,
4581
4584
  logSessionStart,
4582
- findCommandOnPath,
4583
4585
  getManagedToolsDir,
4584
4586
  TOOLS,
4585
4587
  getToolVerificationTimeout,
@@ -4632,5 +4634,5 @@ export {
4632
4634
  resolveGitHubInstalledBinaryName,
4633
4635
  resolveGitHubArchiveBinaryCandidates,
4634
4636
  pickReleaseAsset,
4635
- resolveDerivedHashiCorpReleaseAsset
4637
+ resolveDerivedReleaseAsset
4636
4638
  };