@herbertgao/pi-extensions 2026.11.11 → 2026.11.13

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 (262) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +13 -11
  3. package/THIRD_PARTY_NOTICES.md +3 -3
  4. package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +10 -0
  5. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -4
  6. package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -4
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +22 -15
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +22 -8
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +0 -29
  10. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +5 -2
  11. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +60 -39
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +3 -2
  13. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +0 -40
  14. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-parse.ts +4 -1
  15. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +21 -3
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +15 -0
  17. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  18. package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
  19. package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
  20. package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
  21. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +2 -2
  22. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +1 -1
  23. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/animate.md +17 -0
  24. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique-rubric.md +496 -0
  25. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +12 -504
  26. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/motion-reviewer.md +29 -0
  27. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/hooks.md +3 -3
  28. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-comp.md +24 -0
  29. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-world.md +20 -0
  30. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +5 -34
  31. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/typeset.md +6 -0
  32. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
  33. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
  34. package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +17 -18
  35. package/node_modules/@herbertgao/pi-inline-skill-commands/LICENSE +21 -0
  36. package/node_modules/@herbertgao/pi-inline-skill-commands/README.md +33 -0
  37. package/node_modules/@herbertgao/pi-inline-skill-commands/package.json +53 -0
  38. package/node_modules/@herbertgao/pi-inline-skill-commands/src/index.ts +213 -0
  39. package/node_modules/pi-antigravity/README.md +58 -9
  40. package/node_modules/pi-antigravity/docs/reader-guarantees.md +35 -0
  41. package/node_modules/pi-antigravity/package.json +15 -6
  42. package/node_modules/pi-antigravity/src/client/client.ts +63 -14
  43. package/node_modules/pi-antigravity/src/client/enterprise.ts +150 -0
  44. package/node_modules/pi-antigravity/src/client/index.ts +1 -0
  45. package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +7 -0
  46. package/node_modules/pi-antigravity/src/features/generate-image.ts +56 -2
  47. package/node_modules/pi-antigravity/src/features/read-url-content.ts +124 -0
  48. package/node_modules/pi-antigravity/src/image/image.ts +16 -2
  49. package/node_modules/pi-antigravity/src/index.ts +145 -2
  50. package/node_modules/pi-antigravity/src/models/discovery.ts +3 -4
  51. package/node_modules/pi-antigravity/src/models/grouping.ts +39 -15
  52. package/node_modules/pi-antigravity/src/models/models.ts +126 -14
  53. package/node_modules/pi-antigravity/src/stream/stream.ts +189 -30
  54. package/node_modules/pi-antigravity/src/types/types.ts +30 -1
  55. package/node_modules/pi-antigravity/src/usage/usage.ts +58 -0
  56. package/node_modules/pi-antigravity/src/utils/address.ts +180 -0
  57. package/node_modules/pi-antigravity/src/utils/credits.ts +149 -0
  58. package/node_modules/pi-antigravity/src/utils/html.ts +31 -0
  59. package/node_modules/pi-antigravity/src/utils/index.ts +2 -0
  60. package/node_modules/pi-antigravity/src/utils/security.ts +172 -13
  61. package/node_modules/pi-antigravity/src/utils/text.ts +66 -0
  62. package/node_modules/pi-antigravity/src/utils/util.ts +5 -4
  63. package/node_modules/pi-antigravity/src/web-fetch/document.ts +83 -0
  64. package/node_modules/pi-antigravity/src/web-fetch/fences.ts +24 -0
  65. package/node_modules/pi-antigravity/src/web-fetch/header.ts +97 -0
  66. package/node_modules/pi-antigravity/src/web-fetch/index.ts +3 -0
  67. package/node_modules/pi-antigravity/src/web-fetch/inspect.ts +328 -0
  68. package/node_modules/pi-antigravity/src/web-fetch/limits.ts +4 -0
  69. package/node_modules/pi-antigravity/src/web-fetch/markdown.ts +744 -0
  70. package/node_modules/pi-antigravity/src/web-fetch/mdn.ts +164 -0
  71. package/node_modules/pi-antigravity/src/web-fetch/media.ts +11 -0
  72. package/node_modules/pi-antigravity/src/web-fetch/metadata.ts +9 -0
  73. package/node_modules/pi-antigravity/src/web-fetch/representation.ts +93 -0
  74. package/node_modules/pi-antigravity/src/web-fetch/save.ts +71 -0
  75. package/node_modules/pi-antigravity/src/web-fetch/sites.ts +138 -0
  76. package/node_modules/pi-antigravity/src/web-fetch/vendor.d.ts +9 -0
  77. package/node_modules/pi-antigravity/src/web-fetch/web-fetch.ts +957 -0
  78. package/node_modules/pi-antigravity/tsconfig.json +2 -2
  79. package/node_modules/pi-commandcode-provider/CHANGELOG.md +10 -0
  80. package/node_modules/pi-commandcode-provider/README.md +2 -2
  81. package/node_modules/pi-commandcode-provider/package.json +1 -1
  82. package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +15 -9
  83. package/node_modules/pi-commandcode-provider/src/oauth.ts +69 -12
  84. package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
  85. package/node_modules/pi-lens/CHANGELOG.md +172 -0
  86. package/node_modules/pi-lens/README.md +103 -217
  87. package/node_modules/pi-lens/dist/{chunk-KXDQD34C.js → chunk-27JQHK7Y.js} +1 -1
  88. package/node_modules/pi-lens/dist/{chunk-W6VLB6LL.js → chunk-2APSZHHI.js} +61 -3
  89. package/node_modules/pi-lens/dist/{chunk-5EEWCJG7.js → chunk-2H5GHZKC.js} +8 -8
  90. package/node_modules/pi-lens/dist/{chunk-TS5EIWEF.js → chunk-2H7NFZ4Q.js} +11 -11
  91. package/node_modules/pi-lens/dist/{chunk-6GWCYEP7.js → chunk-37IDWT6O.js} +64 -16
  92. package/node_modules/pi-lens/dist/{chunk-OEPWTSUG.js → chunk-3PAS2ERX.js} +8 -8
  93. package/node_modules/pi-lens/dist/{chunk-ET3DSSFZ.js → chunk-3PO4YYOX.js} +9 -17
  94. package/node_modules/pi-lens/dist/{chunk-C6V2DSZZ.js → chunk-3QXFUP6T.js} +11 -11
  95. package/node_modules/pi-lens/dist/{chunk-HWMNTQBJ.js → chunk-3TSMQZG6.js} +32 -11
  96. package/node_modules/pi-lens/dist/{chunk-QY6J2FTK.js → chunk-4DAHGU3V.js} +15 -14
  97. package/node_modules/pi-lens/dist/{chunk-PCREZ4HJ.js → chunk-4IZZEN63.js} +33 -34
  98. package/node_modules/pi-lens/dist/{chunk-OYXD2MOM.js → chunk-5HBQL7DH.js} +2 -2
  99. package/node_modules/pi-lens/dist/{chunk-B4FAFEBP.js → chunk-5JB4WENL.js} +1 -1
  100. package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +56 -0
  101. package/node_modules/pi-lens/dist/{chunk-GHATCG2A.js → chunk-6CFSDLHE.js} +22 -18
  102. package/node_modules/pi-lens/dist/{chunk-FVQKX5KI.js → chunk-6E5QLMWI.js} +24 -22
  103. package/node_modules/pi-lens/dist/{chunk-AVBEPUCD.js → chunk-6GLMMGCX.js} +2 -2
  104. package/node_modules/pi-lens/dist/{chunk-YTXFNCVN.js → chunk-74AMPWNC.js} +2 -2
  105. package/node_modules/pi-lens/dist/{chunk-K2GV34T2.js → chunk-7CLWC2UH.js} +26 -37
  106. package/node_modules/pi-lens/dist/{chunk-MOEWCPMC.js → chunk-7DPXUPRF.js} +2 -2
  107. package/node_modules/pi-lens/dist/{chunk-7BEADGAZ.js → chunk-7U36VQL6.js} +2 -2
  108. package/node_modules/pi-lens/dist/{chunk-PPYUBO6Y.js → chunk-7WKVCZI4.js} +1 -1
  109. package/node_modules/pi-lens/dist/{chunk-ILC2B7IJ.js → chunk-7ZVTFLCC.js} +10 -10
  110. package/node_modules/pi-lens/dist/{chunk-IT7MFVGP.js → chunk-ADYQRETD.js} +2 -2
  111. package/node_modules/pi-lens/dist/{chunk-NCDH2JB7.js → chunk-ARTYCUGF.js} +25 -10
  112. package/node_modules/pi-lens/dist/{chunk-Z6WTLVUL.js → chunk-AXAR5ZW2.js} +225 -104
  113. package/node_modules/pi-lens/dist/{chunk-PK3GDU4M.js → chunk-AZG5UJYY.js} +1 -1
  114. package/node_modules/pi-lens/dist/{chunk-NRVWLTOY.js → chunk-B2OXE4AH.js} +60 -21
  115. package/node_modules/pi-lens/dist/{chunk-ORYQGVC3.js → chunk-B42AIWPJ.js} +2 -2
  116. package/node_modules/pi-lens/dist/{chunk-IC4L65U7.js → chunk-BBSDJTOV.js} +12 -13
  117. package/node_modules/pi-lens/dist/{chunk-HJWF7CGW.js → chunk-BKWFDWYM.js} +16 -16
  118. package/node_modules/pi-lens/dist/{chunk-D2ZYRI7M.js → chunk-C5PLBTNR.js} +1 -1
  119. package/node_modules/pi-lens/dist/{chunk-SRXYSLMW.js → chunk-CQY2HEH7.js} +1 -1
  120. package/node_modules/pi-lens/dist/{chunk-7424ANRU.js → chunk-CXQYK4YT.js} +1 -1
  121. package/node_modules/pi-lens/dist/{chunk-HYR25MV3.js → chunk-CZJGAOKL.js} +8 -7
  122. package/node_modules/pi-lens/dist/{chunk-DIIDMDZU.js → chunk-DCA2MXVQ.js} +11 -11
  123. package/node_modules/pi-lens/dist/{chunk-K2LD6YNH.js → chunk-DFKOA74L.js} +9 -9
  124. package/node_modules/pi-lens/dist/{chunk-AYDE7RFV.js → chunk-DI4AZZNY.js} +2 -2
  125. package/node_modules/pi-lens/dist/{chunk-6EXGCXM5.js → chunk-G53LBDNU.js} +99 -5
  126. package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +27 -0
  127. package/node_modules/pi-lens/dist/{chunk-5KLRCUDT.js → chunk-H5API74E.js} +6 -6
  128. package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +27 -0
  129. package/node_modules/pi-lens/dist/{chunk-JRSS6KM4.js → chunk-HIJ4CHFF.js} +2 -2
  130. package/node_modules/pi-lens/dist/{chunk-3MHY4BQY.js → chunk-HIRBC72R.js} +4 -4
  131. package/node_modules/pi-lens/dist/{chunk-F7AMFFVK.js → chunk-HRLF35WL.js} +8 -8
  132. package/node_modules/pi-lens/dist/{chunk-HSTN27NR.js → chunk-I2FYOZNW.js} +9 -9
  133. package/node_modules/pi-lens/dist/{chunk-5FDUKJZO.js → chunk-I3NZVAMN.js} +9 -9
  134. package/node_modules/pi-lens/dist/{chunk-NZINZCHB.js → chunk-INBK3HIT.js} +3 -3
  135. package/node_modules/pi-lens/dist/{chunk-PXGVB2CY.js → chunk-J2ZB5MDS.js} +20 -18
  136. package/node_modules/pi-lens/dist/{chunk-HYDJUVOE.js → chunk-JGUDT5KD.js} +4 -4
  137. package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +88 -0
  138. package/node_modules/pi-lens/dist/{chunk-AZXTLZHE.js → chunk-K4Z7MK6T.js} +169 -165
  139. package/node_modules/pi-lens/dist/{chunk-WTSQKJAR.js → chunk-K7O6AHSJ.js} +10 -10
  140. package/node_modules/pi-lens/dist/{chunk-S6ZQFPOX.js → chunk-KNJH6WJQ.js} +6 -6
  141. package/node_modules/pi-lens/dist/{chunk-SUIZOCSY.js → chunk-KNSOA43J.js} +1 -1
  142. package/node_modules/pi-lens/dist/{chunk-3QMLB4TI.js → chunk-KXGTLAUW.js} +2 -2
  143. package/node_modules/pi-lens/dist/{chunk-OHEUOWYT.js → chunk-KZ732ZVW.js} +1 -1
  144. package/node_modules/pi-lens/dist/{chunk-G3LR6V6N.js → chunk-L6BDRYUK.js} +19 -17
  145. package/node_modules/pi-lens/dist/{chunk-OVPR3GQ6.js → chunk-LGH2HHZG.js} +24 -6
  146. package/node_modules/pi-lens/dist/{chunk-3R3Z54J7.js → chunk-LOEJFTF2.js} +1 -1
  147. package/node_modules/pi-lens/dist/{chunk-HGEE5LDW.js → chunk-LQQNFCQJ.js} +1 -1
  148. package/node_modules/pi-lens/dist/chunk-LVLPA32Q.js +810 -0
  149. package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +73 -0
  150. package/node_modules/pi-lens/dist/{chunk-Z2W5YJBW.js → chunk-MJRGPEQ5.js} +11 -11
  151. package/node_modules/pi-lens/dist/{chunk-3EIZMRXI.js → chunk-MOAVEPC4.js} +10 -10
  152. package/node_modules/pi-lens/dist/{chunk-TOOXNL6M.js → chunk-NGNBJIUO.js} +7 -7
  153. package/node_modules/pi-lens/dist/{chunk-AGEQRJ5A.js → chunk-NHA5K226.js} +1 -1
  154. package/node_modules/pi-lens/dist/{chunk-YLW26OHX.js → chunk-NNEQOC3U.js} +31 -59
  155. package/node_modules/pi-lens/dist/{chunk-ZWZD4TJ5.js → chunk-O2MHF7QM.js} +35 -36
  156. package/node_modules/pi-lens/dist/{chunk-PTJXMYRY.js → chunk-OLWGYBYT.js} +15 -16
  157. package/node_modules/pi-lens/dist/{chunk-JKAVKTMY.js → chunk-OZQQ3AIR.js} +17 -20
  158. package/node_modules/pi-lens/dist/{chunk-6JLNZ6DP.js → chunk-P5MSLVUW.js} +10 -10
  159. package/node_modules/pi-lens/dist/{chunk-OF2YGDUE.js → chunk-PFJLYRO3.js} +37 -38
  160. package/node_modules/pi-lens/dist/chunk-PKWEBMCA.js +2957 -0
  161. package/node_modules/pi-lens/dist/{chunk-JLMS7EMD.js → chunk-PPQHMSPH.js} +16 -15
  162. package/node_modules/pi-lens/dist/{chunk-6EIV3H7O.js → chunk-PQF6YGYB.js} +12 -5
  163. package/node_modules/pi-lens/dist/{chunk-VU2PRGRI.js → chunk-PQXUZYTQ.js} +4 -4
  164. package/node_modules/pi-lens/dist/{chunk-MV6ST2KT.js → chunk-Q7J3JYJ2.js} +13 -12
  165. package/node_modules/pi-lens/dist/{chunk-BMMRLJA4.js → chunk-QE5DJ7MX.js} +27 -10
  166. package/node_modules/pi-lens/dist/{chunk-IZ36G463.js → chunk-QE7BJQ6K.js} +7 -7
  167. package/node_modules/pi-lens/dist/{chunk-E5SSUV2A.js → chunk-QMWKSYWB.js} +4 -4
  168. package/node_modules/pi-lens/dist/{chunk-QJ4T73J5.js → chunk-QV3JPCMK.js} +1 -1
  169. package/node_modules/pi-lens/dist/{chunk-3PMLYGJN.js → chunk-R4L7KZ7R.js} +5 -5
  170. package/node_modules/pi-lens/dist/{chunk-7ZVEFWOE.js → chunk-RIH3UBK4.js} +10 -10
  171. package/node_modules/pi-lens/dist/{chunk-T5EGSBM2.js → chunk-RJ3APNIP.js} +3 -3
  172. package/node_modules/pi-lens/dist/{chunk-AAIVSSUU.js → chunk-S6MCMD27.js} +35 -12
  173. package/node_modules/pi-lens/dist/{chunk-SF7KSXB5.js → chunk-SCU62JLX.js} +6 -6
  174. package/node_modules/pi-lens/dist/{chunk-FDLGJFAE.js → chunk-SDYLT45T.js} +3 -3
  175. package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +27 -0
  176. package/node_modules/pi-lens/dist/{chunk-Y7XMKBFP.js → chunk-TKOFTLGB.js} +34 -26
  177. package/node_modules/pi-lens/dist/chunk-TQWRH25U.js +35 -0
  178. package/node_modules/pi-lens/dist/{chunk-DZSQXG66.js → chunk-TWEOJE3D.js} +277 -62
  179. package/node_modules/pi-lens/dist/{chunk-R67WQ5RY.js → chunk-UN72ZAJ5.js} +8 -8
  180. package/node_modules/pi-lens/dist/{chunk-AD7JDEI6.js → chunk-UNP6Y4JV.js} +16 -16
  181. package/node_modules/pi-lens/dist/{chunk-D6ANA6YU.js → chunk-VGRGW4UL.js} +63 -55
  182. package/node_modules/pi-lens/dist/{chunk-DFAY7JUN.js → chunk-VSQT6IHZ.js} +2 -2
  183. package/node_modules/pi-lens/dist/{chunk-7T64QA5D.js → chunk-VWEBZ2JV.js} +39 -38
  184. package/node_modules/pi-lens/dist/{chunk-HRQTYU2T.js → chunk-W26QZ3OM.js} +1 -1
  185. package/node_modules/pi-lens/dist/{chunk-2HWVG3IM.js → chunk-XDNWR7SG.js} +2 -2
  186. package/node_modules/pi-lens/dist/{chunk-75TVYCQW.js → chunk-XSC3BCN3.js} +5 -5
  187. package/node_modules/pi-lens/dist/{chunk-ME6MF2N2.js → chunk-YCR6ZYTE.js} +1 -1
  188. package/node_modules/pi-lens/dist/{chunk-LD7SXICE.js → chunk-ZI7YHV6I.js} +5 -5
  189. package/node_modules/pi-lens/dist/{chunk-E3PNZDPH.js → chunk-ZQSSO7LO.js} +33 -1
  190. package/node_modules/pi-lens/dist/{chunk-T6PPK3T6.js → chunk-ZULZS2I6.js} +385 -407
  191. package/node_modules/pi-lens/dist/index.js +6508 -5413
  192. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +9 -9
  193. package/node_modules/pi-lens/dist/mcp/cli.js +39 -38
  194. package/node_modules/pi-lens/dist/mcp/server.js +602 -345
  195. package/node_modules/pi-lens/dist/mcp/worker.js +57 -58
  196. package/node_modules/pi-lens/dist/probes/installer.js +19 -17
  197. package/node_modules/pi-lens/docs/architecture.md +113 -0
  198. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +2 -2
  199. package/node_modules/pi-lens/docs/ci.md +18 -4
  200. package/node_modules/pi-lens/docs/defect-shapes.md +41 -3
  201. package/node_modules/pi-lens/docs/dependencies.md +10 -10
  202. package/node_modules/pi-lens/docs/features.md +3 -3
  203. package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -1
  204. package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +19 -0
  205. package/node_modules/pi-lens/docs/language-coverage.md +39 -0
  206. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +10 -4
  207. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
  208. package/node_modules/pi-lens/docs/pi-lens-fixer.md +4 -0
  209. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -1
  210. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +4 -5
  211. package/node_modules/pi-lens/docs/pi-lens-subagent.md +5 -2
  212. package/node_modules/pi-lens/docs/prose-standard.md +112 -0
  213. package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
  214. package/node_modules/pi-lens/docs/usage.md +50 -0
  215. package/node_modules/pi-lens/package.json +1 -1
  216. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
  217. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
  218. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
  219. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
  220. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
  221. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
  222. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
  223. package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
  224. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
  225. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
  226. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
  227. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
  228. package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
  229. package/node_modules/pi-web-access/CHANGELOG.md +29 -0
  230. package/node_modules/pi-web-access/README.md +35 -15
  231. package/node_modules/pi-web-access/anysearch.ts +7 -3
  232. package/node_modules/pi-web-access/autom.ts +196 -0
  233. package/node_modules/pi-web-access/cloro.ts +254 -0
  234. package/node_modules/pi-web-access/curator-page.ts +7 -1
  235. package/node_modules/pi-web-access/curator-server.ts +3 -0
  236. package/node_modules/pi-web-access/dist/index.js +12931 -12111
  237. package/node_modules/pi-web-access/dist/mcp-cli.js +1188 -416
  238. package/node_modules/pi-web-access/domain-filter-normalization.ts +30 -0
  239. package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +144 -34
  240. package/node_modules/pi-web-access/duckduckgo.ts +11 -3
  241. package/node_modules/pi-web-access/extract.ts +60 -4
  242. package/node_modules/pi-web-access/gemini-search.ts +25 -5
  243. package/node_modules/pi-web-access/index.ts +9 -1
  244. package/node_modules/pi-web-access/package.json +2 -2
  245. package/node_modules/pi-web-access/page-query.ts +12 -3
  246. package/node_modules/pi-web-access/specstream.ts +276 -0
  247. package/node_modules/pi-web-access/tool-activation.ts +21 -6
  248. package/node_modules/pi-web-access/utils.ts +4 -0
  249. package/node_modules/pi-web-access/video-extract.ts +2 -2
  250. package/node_modules/pi-web-access/web-tool-core.ts +24 -5
  251. package/node_modules/pi-web-access/youtube-extract.ts +2 -2
  252. package/package.json +13 -7
  253. package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +0 -72
  254. package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +0 -28
  255. package/node_modules/pi-lens/dist/chunk-7M64NTAK.js +0 -38
  256. package/node_modules/pi-lens/dist/chunk-BEIPWPVR.js +0 -1037
  257. package/node_modules/pi-lens/dist/chunk-D7OEGXDX.js +0 -2417
  258. package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +0 -89
  259. package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +0 -28
  260. package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +0 -56
  261. package/node_modules/pi-lens/dist/chunk-YLHJWAQS.js +0 -256
  262. package/node_modules/pi-lens/dist/chunk-YULIERZW.js +0 -27
@@ -9,7 +9,7 @@ import {
9
9
  normalizeMessage,
10
10
  sanitizeCorrelationId,
11
11
  stableFindingId
12
- } from "./chunk-DFAY7JUN.js";
12
+ } from "./chunk-VSQT6IHZ.js";
13
13
  import {
14
14
  mapWithConcurrency
15
15
  } from "./chunk-XIMYZ3JA.js";
@@ -41,24 +41,23 @@ import {
41
41
  resolveLspServerCwd,
42
42
  serverTraits,
43
43
  withLspProjectCodePermission
44
- } from "./chunk-Z6WTLVUL.js";
44
+ } from "./chunk-AXAR5ZW2.js";
45
45
  import {
46
46
  findLocalOpengrepConfig
47
- } from "./chunk-PPYUBO6Y.js";
47
+ } from "./chunk-7WKVCZI4.js";
48
48
  import {
49
49
  emitBounded
50
- } from "./chunk-5EEWCJG7.js";
50
+ } from "./chunk-2H5GHZKC.js";
51
51
  import {
52
- loadProjectSnapshot,
53
- readJsonCache
54
- } from "./chunk-YLW26OHX.js";
52
+ loadProjectSnapshot
53
+ } from "./chunk-NNEQOC3U.js";
55
54
  import {
56
55
  acquireWorkspaceSweepHold,
57
56
  configureLspServiceLifecycle,
58
57
  getOwnedLspService,
59
58
  peekOwnedLspService,
60
59
  resetOwnedLspService
61
- } from "./chunk-HGEE5LDW.js";
60
+ } from "./chunk-LQQNFCQJ.js";
62
61
  import {
63
62
  RUNTIME_CONFIG,
64
63
  collectForwardImportMtimes,
@@ -73,31 +72,37 @@ import {
73
72
  lineTextAt,
74
73
  pathBirthtimeMs,
75
74
  scanDocumentContent
76
- } from "./chunk-NCDH2JB7.js";
75
+ } from "./chunk-ARTYCUGF.js";
77
76
  import {
78
77
  js_yaml_default
79
- } from "./chunk-E3PNZDPH.js";
78
+ } from "./chunk-ZQSSO7LO.js";
80
79
  import {
81
80
  EXTENSION_TO_LSP_ID,
82
81
  lspLanguageId,
83
82
  resolveFilenameLanguage
84
- } from "./chunk-AYDE7RFV.js";
83
+ } from "./chunk-DI4AZZNY.js";
85
84
  import {
86
85
  diagnosticsIpcPathForCwd,
87
86
  requestWarmCodeActions,
88
87
  requestWarmDiagnostics
89
- } from "./chunk-HWMNTQBJ.js";
88
+ } from "./chunk-3TSMQZG6.js";
89
+ import {
90
+ semanticFor
91
+ } from "./chunk-2APSZHHI.js";
90
92
  import {
91
93
  findLocalZizmorConfig,
92
94
  logSessionStart
93
- } from "./chunk-NRVWLTOY.js";
95
+ } from "./chunk-B2OXE4AH.js";
94
96
  import {
95
97
  findLocalBinUpwards,
96
98
  isProjectLocalBinPath
97
- } from "./chunk-OVPR3GQ6.js";
99
+ } from "./chunk-LGH2HHZG.js";
100
+ import {
101
+ readJsonCache
102
+ } from "./chunk-TQWRH25U.js";
98
103
  import {
99
104
  getLspCapableKinds
100
- } from "./chunk-75TVYCQW.js";
105
+ } from "./chunk-XSC3BCN3.js";
101
106
  import {
102
107
  createGenerationMap,
103
108
  createGenerationSource,
@@ -116,19 +121,19 @@ import {
116
121
  sampleProcessTreeCpuPercent,
117
122
  selectLivePeerInstances,
118
123
  windowsExe
119
- } from "./chunk-ET3DSSFZ.js";
124
+ } from "./chunk-3PO4YYOX.js";
120
125
  import {
121
126
  createSingleFlight
122
- } from "./chunk-B4FAFEBP.js";
127
+ } from "./chunk-5JB4WENL.js";
123
128
  import {
124
129
  SPECIAL_FILENAMES,
125
130
  getLanguageId,
126
131
  isJstsFactFile
127
- } from "./chunk-SRXYSLMW.js";
132
+ } from "./chunk-CQY2HEH7.js";
128
133
  import {
129
134
  PathKeyedMap,
130
135
  detectFileRole
131
- } from "./chunk-6EIV3H7O.js";
136
+ } from "./chunk-PQF6YGYB.js";
132
137
  import {
133
138
  CONTENT_HASH_MAX_BYTES,
134
139
  hashContentBytes,
@@ -146,7 +151,7 @@ import {
146
151
  withDeadline,
147
152
  withTimeout,
148
153
  writeFileAtomic
149
- } from "./chunk-HRQTYU2T.js";
154
+ } from "./chunk-W26QZ3OM.js";
150
155
  import {
151
156
  compareOrdinal,
152
157
  incrementDegradationCount,
@@ -154,7 +159,7 @@ import {
154
159
  recordDegradation,
155
160
  recordDegradationOnce,
156
161
  truncateForLedger
157
- } from "./chunk-AGEQRJ5A.js";
162
+ } from "./chunk-NHA5K226.js";
158
163
  import {
159
164
  freshnessFromMtime
160
165
  } from "./chunk-S26LC76R.js";
@@ -171,7 +176,7 @@ import {
171
176
  nonNegativeIntEnv,
172
177
  phaseFinished,
173
178
  phaseStarted
174
- } from "./chunk-K2GV34T2.js";
179
+ } from "./chunk-7CLWC2UH.js";
175
180
  import {
176
181
  BoundedFifoMap,
177
182
  BoundedLruCache,
@@ -4055,7 +4060,7 @@ async function importTargetsToAnnounce(cwd, importers, onScope) {
4055
4060
  reason: `resolved the imports of ${CREATED_IMPORT_SCAN_MAX_FILES} of ${importers.length} files in one diagnostics call`
4056
4061
  });
4057
4062
  }
4058
- const { extractForwardImports } = await import("./chunk-PTJXMYRY.js");
4063
+ const { extractForwardImports } = await import("./chunk-OLWGYBYT.js");
4059
4064
  const targets = /* @__PURE__ */ new Set();
4060
4065
  const reexports = /* @__PURE__ */ new Map();
4061
4066
  let resolved2 = 0;
@@ -4418,7 +4423,7 @@ function isZizmorIgnoreSuppressed(d, content) {
4418
4423
  const ruleId = String(d.code ?? "").toLowerCase();
4419
4424
  return match[1].split(",").map((s) => s.trim().toLowerCase()).includes(ruleId);
4420
4425
  }
4421
- var blockOnErrorWhenAllowed = (d, { blockingAllowed }) => blockingAllowed && d.severity === 1 ? "blocking" : "warning";
4426
+ var blockOnErrorWhenAllowed = (d, { blockingAllowed }) => semanticFor(blockingAllowed && d.severity === 1 ? "error" : "warning");
4422
4427
  var AUXILIARY_LSP_PROFILES = [
4423
4428
  {
4424
4429
  serverId: "opengrep",
@@ -4511,8 +4516,7 @@ var AUXILIARY_LSP_PROFILES = [
4511
4516
  optInFlag: "lens-fallow",
4512
4517
  // Advisory in this cut: no `allowBlocking`, so even an ERROR-severity
4513
4518
  // finding stays a warning. fallow publishes unused-code findings as LSP
4514
- // HINT (severity 4, the editor's greyed-out tag), which the generic
4515
- // conversion would render as no semantic at all.
4519
+ // HINT (severity 4, the editor's greyed-out tag); those stay advisory too.
4516
4520
  semantic: () => "warning",
4517
4521
  defectClass: (d) => {
4518
4522
  const code = String(d.code ?? "");
@@ -8340,11 +8344,18 @@ function resolveTouchVerdict(input) {
8340
8344
  return { inconclusive: false };
8341
8345
  }
8342
8346
  const serverIds = [.../* @__PURE__ */ new Set([...notifyIds, ...waitIds])];
8343
- const reason = notifyIds.length > 0 && input.diagnosticsTimedOut ? "mixed" : notifyIds.length > 0 ? "notify-write" : "diagnostics-wait";
8347
+ const loadingIds = new Set(input.loadingServerIds ?? []);
8348
+ const failedIds = new Set(input.loadFailedServerIds ?? []);
8349
+ const lapsedNotReady = waitIds.length > 0 && waitIds.every((id) => loadingIds.has(id) || failedIds.has(id));
8350
+ const lapsedLoadFailed = lapsedNotReady && waitIds.some((id) => failedIds.has(id));
8351
+ const reason = notifyIds.length > 0 && input.diagnosticsTimedOut ? "mixed" : notifyIds.length > 0 ? "notify-write" : lapsedLoadFailed ? "server-load-failed" : lapsedNotReady ? "server-loading" : "diagnostics-wait";
8344
8352
  return {
8345
8353
  inconclusive: true,
8346
8354
  ...serverIds.length > 0 && { inconclusiveServerIds: serverIds },
8347
- inconclusiveReason: reason
8355
+ inconclusiveReason: reason,
8356
+ ...reason === "server-load-failed" && input.loadFailureDetail !== void 0 && {
8357
+ inconclusiveDetail: input.loadFailureDetail
8358
+ }
8348
8359
  };
8349
8360
  }
8350
8361
  var PRIMARY_UNAVAILABLE_CAUSE = {
@@ -8448,7 +8459,10 @@ function createDiskBindingCache() {
8448
8459
  import { basename } from "node:path";
8449
8460
  var CONFIG_FILE_SERVERS = /* @__PURE__ */ new Map([
8450
8461
  ["pyrightconfig.json", ["python"]],
8451
- ["pyproject.toml", ["python"]]
8462
+ ["pyproject.toml", ["python"]],
8463
+ ["Cargo.toml", ["rust"]],
8464
+ ["go.mod", ["go"]],
8465
+ ["go.work", ["go"]]
8452
8466
  ]);
8453
8467
  var SERVER_CONFIG_FILE_NAMES = [
8454
8468
  ...CONFIG_FILE_SERVERS.keys()
@@ -8652,7 +8666,7 @@ function resyncDocumentOnPastEof(filePath) {
8652
8666
  void (async () => {
8653
8667
  try {
8654
8668
  const [{ getOwnedLspService: getOwnedLspService2 }, content] = await Promise.all([
8655
- import("./chunk-OYXD2MOM.js"),
8669
+ import("./chunk-5HBQL7DH.js"),
8656
8670
  fs6.promises.readFile(filePath, "utf-8")
8657
8671
  ]);
8658
8672
  await getOwnedLspService2().openFile(filePath, content, { preserveDiagnostics: false });
@@ -11855,6 +11869,14 @@ var CLIENT_CAPABILITIES = {
11855
11869
  // implement" — the `window/workDoneProgress/create` handler below stays as
11856
11870
  // a defensive no-op in case a server ignores capabilities and asks anyway.
11857
11871
  window: {},
11872
+ // #5487: rust-analyzer announces `experimental/serverStatus` (health plus
11873
+ // `quiescent`) only to a client that asks for it here, and answers a pull
11874
+ // with an empty authoritative report while it is still loading. This is the
11875
+ // readiness signal `$/progress` would also carry, without the
11876
+ // `window.workDoneProgress` advertisement #974 withdrew. A server that does
11877
+ // not know the key ignores it (LSP `experimental` is opaque); the gate only
11878
+ // acts on a server that then sends the notification.
11879
+ experimental: { serverStatusNotification: true },
11858
11880
  workspace: {
11859
11881
  workspaceFolders: true,
11860
11882
  configuration: true,
@@ -11883,7 +11905,10 @@ var CLIENT_CAPABILITIES = {
11883
11905
  typeDefinition: { dynamicRegistration: false },
11884
11906
  implementation: { dynamicRegistration: false },
11885
11907
  references: { dynamicRegistration: false },
11886
- documentSymbol: { dynamicRegistration: false },
11908
+ documentSymbol: {
11909
+ dynamicRegistration: false,
11910
+ hierarchicalDocumentSymbolSupport: true
11911
+ },
11887
11912
  codeAction: {
11888
11913
  dynamicRegistration: false,
11889
11914
  dataSupport: true,
@@ -11979,6 +12004,7 @@ function disposeClientConnection(state4) {
11979
12004
  state4.connection.dispose();
11980
12005
  } catch {
11981
12006
  }
12007
+ state4.diagnosticEmitter.emit(SERVER_STATUS_CHANGED);
11982
12008
  }
11983
12009
  async function killProcessTree(proc, pid, options = {}) {
11984
12010
  if ((proc.exitCode != null || proc.signalCode != null) && !options.processExiting) {
@@ -12282,6 +12308,8 @@ function diagnosticsPublishedAtForPath(state4, normalizedPath) {
12282
12308
  return ts > 0 ? ts : void 0;
12283
12309
  }
12284
12310
  var PENDING_RECEIPT_DROPPED = "pending-receipt-dropped";
12311
+ var SERVER_STATUS_CHANGED = "server-status-changed";
12312
+ var SERVER_STATUS_MESSAGE_MAX_CHARS = 200;
12285
12313
  function noteOwnNoticeQueued(state4, normalizedPath, uri, sentVersion) {
12286
12314
  (state4.ownNoticeEchoes ??= /* @__PURE__ */ new Map()).set(normalizedPath, {
12287
12315
  uri,
@@ -12672,6 +12700,10 @@ function setupIncomingHandlers(state4, initialization, onDiagnosticsPublished) {
12672
12700
  if (newDiags.length === 0 && auxiliaryEmptyIsNotEvidence(state4, normalizedPath, docVersion)) {
12673
12701
  return;
12674
12702
  }
12703
+ if (newDiags.length === 0 && serverNotReady(state4)) {
12704
+ noteReadinessGate(state4);
12705
+ return;
12706
+ }
12675
12707
  onDiagnosticsPublished?.(state4.serverId);
12676
12708
  const fence = state4.diagnosticFences.get(normalizedPath);
12677
12709
  if (docVersion === void 0 && fence) {
@@ -12916,6 +12948,26 @@ function setupIncomingHandlers(state4, initialization, onDiagnosticsPublished) {
12916
12948
  delete state4.configLoadFailure;
12917
12949
  rebaselineForRulesRefresh(state4);
12918
12950
  });
12951
+ state4.connection.onNotification("experimental/serverStatus", (params) => {
12952
+ const quiescent = params?.quiescent;
12953
+ if (typeof quiescent !== "boolean")
12954
+ return;
12955
+ const failed = params?.health === "error";
12956
+ const message = failed && typeof params?.message === "string" ? params.message.slice(0, SERVER_STATUS_MESSAGE_MAX_CHARS) : void 0;
12957
+ const previous = state4.serverStatus;
12958
+ if (previous?.quiescent === quiescent && previous.failed === failed) {
12959
+ if (message !== void 0)
12960
+ previous.message = message;
12961
+ return;
12962
+ }
12963
+ state4.serverStatus = {
12964
+ quiescent,
12965
+ failed,
12966
+ ...message !== void 0 && { message },
12967
+ revision: (previous?.revision ?? 0) + 1
12968
+ };
12969
+ state4.diagnosticEmitter.emit(SERVER_STATUS_CHANGED);
12970
+ });
12919
12971
  let refreshRepullRunning = false;
12920
12972
  let refreshRepullRerunRequested = false;
12921
12973
  const runRefreshRepullPool = async () => {
@@ -13078,6 +13130,7 @@ async function pullDiagnosticSource(state4, filePath, budgetMs, identifier) {
13078
13130
  const generation = pullGenerationFor(state4, normalizedPath);
13079
13131
  const requestSequence = claimPullRequestSequence(state4, sourceKey);
13080
13132
  const requestStartedAt = Date.now();
13133
+ const statusAtSend = state4.serverStatus;
13081
13134
  const effectiveTimeoutMs = Math.max(1, Math.min(PULL_REQUEST_TIMEOUT_MS, budgetMs));
13082
13135
  const pullAbort = new AbortController();
13083
13136
  const pullSettlement = { cancelled: false };
@@ -13099,6 +13152,10 @@ async function pullDiagnosticSource(state4, filePath, budgetMs, identifier) {
13099
13152
  if (pullGenerationFor(state4, normalizedPath) !== generation || !isNewestPullRequest(state4, sourceKey, requestSequence)) {
13100
13153
  return { status: "unavailable" };
13101
13154
  }
13155
+ if (reportCarriesNothing(report) && !pullAnswerIsSettled(state4, statusAtSend)) {
13156
+ noteReadinessGate(state4);
13157
+ return { status: "unavailable" };
13158
+ }
13102
13159
  let primaryCount;
13103
13160
  if (report.kind === "unchanged") {
13104
13161
  primaryCount = pullSourceDiagnostics(state4, normalizedPath, identifier).length;
@@ -13386,6 +13443,117 @@ async function clientRequestWorkspaceDiagnostics(state4, budgetMs) {
13386
13443
  return void 0;
13387
13444
  }
13388
13445
  }
13446
+ function waitForQuiescence(state4, budgetMs) {
13447
+ if (state4.serverStatus?.quiescent !== false)
13448
+ return Promise.resolve(true);
13449
+ if (budgetMs <= 0 || !isClientAlive(state4))
13450
+ return Promise.resolve(false);
13451
+ return new Promise((resolve7) => {
13452
+ const finish = (ready) => {
13453
+ clearTimeout(timer);
13454
+ state4.diagnosticEmitter.off(SERVER_STATUS_CHANGED, onChange);
13455
+ resolve7(ready);
13456
+ };
13457
+ const onChange = () => {
13458
+ if (!isClientAlive(state4))
13459
+ finish(false);
13460
+ else if (state4.serverStatus?.quiescent !== false)
13461
+ finish(true);
13462
+ };
13463
+ const timer = setTimeout(() => finish(false), budgetMs);
13464
+ state4.diagnosticEmitter.on(SERVER_STATUS_CHANGED, onChange);
13465
+ });
13466
+ }
13467
+ var PULL_UNSETTLED = /* @__PURE__ */ Symbol("pull-unsettled");
13468
+ function pullAnswerIsSettled(state4, sentAt) {
13469
+ const now = state4.serverStatus;
13470
+ return sentAt?.revision === now?.revision && now?.quiescent !== false && now?.failed !== true;
13471
+ }
13472
+ function serverNotReady(state4) {
13473
+ return state4.serverStatus?.quiescent === false || !!state4.serverStatus?.failed;
13474
+ }
13475
+ function readinessBlockOf(state4) {
13476
+ if (!isClientAlive(state4))
13477
+ return void 0;
13478
+ const announced = state4.serverStatus;
13479
+ if (announced?.quiescent === false)
13480
+ return { reason: "server-loading" };
13481
+ if (announced?.failed) {
13482
+ return {
13483
+ reason: "server-load-failed",
13484
+ ...announced.message !== void 0 && { detail: announced.message }
13485
+ };
13486
+ }
13487
+ return void 0;
13488
+ }
13489
+ function reportCarriesNothing(report) {
13490
+ return (report.items?.length ?? 0) === 0;
13491
+ }
13492
+ async function pullDiagnosticsWhenReady(state4, filePath, budgetMs, deadlineAt) {
13493
+ let requestBudgetMs = budgetMs;
13494
+ let waitedForReadiness = false;
13495
+ for (; ; ) {
13496
+ if (state4.serverStatus?.quiescent === false) {
13497
+ waitedForReadiness = true;
13498
+ noteReadinessGate(state4);
13499
+ if (!await waitForQuiescence(state4, deadlineAt - Date.now())) {
13500
+ return PULL_UNSETTLED;
13501
+ }
13502
+ requestBudgetMs = deadlineAt - Date.now();
13503
+ }
13504
+ const sentAt = state4.serverStatus;
13505
+ const outcome = await clientRequestPullDiagnostics(state4, filePath, requestBudgetMs);
13506
+ if (outcome.status === "found")
13507
+ return outcome;
13508
+ const settled = pullAnswerIsSettled(state4, sentAt);
13509
+ if (!settled)
13510
+ waitedForReadiness = true;
13511
+ const retryAfterBeat = settled && waitedForReadiness && outcome.status === "unavailable" && isClientAlive(state4);
13512
+ if (settled && !retryAfterBeat)
13513
+ return outcome;
13514
+ if (state4.serverStatus?.failed && state4.serverStatus.quiescent !== false) {
13515
+ noteReadinessGate(state4);
13516
+ return PULL_UNSETTLED;
13517
+ }
13518
+ const remainingMs = deadlineAt - Date.now();
13519
+ if (remainingMs <= 0)
13520
+ return PULL_UNSETTLED;
13521
+ if (retryAfterBeat) {
13522
+ await new Promise((resolve7) => setTimeout(resolve7, Math.min(PULL_DIAGNOSTICS_RETRY_INTERVAL_MS, remainingMs)));
13523
+ }
13524
+ requestBudgetMs = deadlineAt - Date.now();
13525
+ }
13526
+ }
13527
+ function noteReadinessGate(state4) {
13528
+ const announced = state4.serverStatus;
13529
+ const loadFailed = announced?.failed === true && announced.quiescent !== false;
13530
+ emitBounded(
13531
+ "lsp_server_loading_gated",
13532
+ // A failed load is its own rising edge: a server that failed after it
13533
+ // finished loading still gets its record.
13534
+ loadFailed ? `${state4.serverId}:load-failed` : state4.serverId,
13535
+ {
13536
+ filePath: state4.root,
13537
+ durationMs: 0,
13538
+ metadata: {
13539
+ serverId: state4.serverId,
13540
+ quiescent: announced?.quiescent,
13541
+ revision: announced?.revision,
13542
+ ...loadFailed && {
13543
+ loadFailed: true,
13544
+ ...announced?.message !== void 0 && {
13545
+ message: announced.message
13546
+ }
13547
+ }
13548
+ }
13549
+ },
13550
+ {
13551
+ ledgerKind: "lsp-server-loading-gated",
13552
+ reason: loadFailed ? `${state4.serverId}: workspace failed to load${announced?.message ? ` (${announced.message})` : ""}` : `${state4.serverId}: pull held to the server's announced readiness`,
13553
+ risingEdgePer: "identity"
13554
+ }
13555
+ );
13556
+ }
13389
13557
  async function clientWaitForDiagnostics(state4, filePath, timeoutMs, options = {}) {
13390
13558
  const normalizedPath = normalizeMapKey(filePath);
13391
13559
  const minVersion = options.minVersion;
@@ -13400,7 +13568,11 @@ async function clientWaitForDiagnostics(state4, filePath, timeoutMs, options = {
13400
13568
  };
13401
13569
  if (state4.workspaceDiagnosticsSupport.mode === "pull") {
13402
13570
  const pullSettleStartedAt = Date.now();
13403
- let outcome = await clientRequestPullDiagnostics(state4, filePath, timeoutMs);
13571
+ const pullDeadlineAt = pullSettleStartedAt + timeoutMs;
13572
+ const firstPull = await pullDiagnosticsWhenReady(state4, filePath, timeoutMs, pullDeadlineAt);
13573
+ if (firstPull === PULL_UNSETTLED)
13574
+ return "deadline-expired";
13575
+ let outcome = firstPull;
13404
13576
  if (outcome.status === "found") {
13405
13577
  logTypeScriptPullSettle(state4, normalizedPath, Date.now() - pullSettleStartedAt, pullSettleSource);
13406
13578
  return "answered";
@@ -13905,6 +14077,7 @@ async function clientShutdownOnce(state4, options) {
13905
14077
  cancelDocumentNotifyQueues(state4);
13906
14078
  state4.projectIdentityProbedFiles?.clear();
13907
14079
  state4.watchQueue?.cancel();
14080
+ state4.diagnosticEmitter.emit(SERVER_STATUS_CHANGED);
13908
14081
  state4.diagnosticEmitter.removeAllListeners();
13909
14082
  let shutdownRequestTimedOut = false;
13910
14083
  let exitNotifyTimedOut = false;
@@ -14557,6 +14730,8 @@ async function createLSPClient(options) {
14557
14730
  checkAlive: () => checkProcessAlive(),
14558
14731
  /** #1277: cheap request round-trip proving the server still responds. */
14559
14732
  pingLiveness: (timeoutMs) => clientPingLiveness(state4, timeoutMs),
14733
+ /** #5487: the server announced it is still loading (see interface doc). */
14734
+ readinessBlock: () => readinessBlockOf(state4),
14560
14735
  /** #2358: the OS pid of the live server process (see interface doc). */
14561
14736
  getProcessPid: () => lspProcess.pid,
14562
14737
  notify: {
@@ -16023,20 +16198,22 @@ var ClientRegistry = class {
16023
16198
  recordLsp(server.id, root, "spawn_start");
16024
16199
  try {
16025
16200
  const projectCodeAllowed = this.analysisRootModeForFile(filePath) !== "adopted";
16026
- const spawned = await withLspProjectCodePermission(projectCodeAllowed, () => server.spawn(root, {
16201
+ let spawned = await withLspProjectCodePermission(projectCodeAllowed, () => server.spawn(root, {
16027
16202
  allowInstall,
16028
16203
  projectCodeAllowed,
16029
16204
  sessionRoot: this.sessionCwd ?? process.cwd()
16030
16205
  }));
16031
- if (this.isDestroyed) {
16206
+ const abortSpawn = (launched) => {
16032
16207
  try {
16033
- spawned?.process?.process?.kill();
16208
+ launched?.process?.process?.kill();
16034
16209
  } catch {
16035
16210
  }
16036
16211
  logSessionStart(`lsp spawn ${server.id}: aborted (service shut down mid-spawn)`);
16037
16212
  this.noteSpawnVerdict(key, "declined");
16038
16213
  return void 0;
16039
- }
16214
+ };
16215
+ if (this.isDestroyed)
16216
+ return abortSpawn(spawned);
16040
16217
  if (!spawned) {
16041
16218
  logSessionStart(`lsp spawn ${server.id}: unavailable (${Date.now() - startedAt}ms)`);
16042
16219
  recordLsp(server.id, root, "spawn_failed", Date.now() - startedAt);
@@ -16058,29 +16235,48 @@ var ClientRegistry = class {
16058
16235
  this.noteSpawnVerdict(key, "failed");
16059
16236
  return void 0;
16060
16237
  }
16061
- const override = getServerInitOverride(server.id, filePath);
16062
- const mergedInit = spawned.launchVariant === "classic" ? mergeInitializationOptions(override?.initializationOptions, spawned.initialization) : mergeInitializationOptions(spawned.initialization, override?.initializationOptions);
16063
- this.hooks.rearmFirstContact(server.id);
16064
- const client = await createLSPClient({
16065
- serverId: server.id,
16066
- process: spawned.process,
16067
- root,
16068
- sessionCwd: this.sessionCwd,
16069
- initialization: mergedInit,
16070
- initializeTimeoutMs: server.initializeTimeoutMs,
16071
- launchVariant: spawned.launchVariant,
16072
- settingsSection: server.settingsSection,
16073
- // #4764: the declared role travels with the client, so a failed server
16074
- // config can gate an auxiliary scanner's empty publications only.
16075
- role: server.role,
16076
- // #5131 round 2: the config-declared flag gates the echo hold; a
16077
- // built-in row with the same behaviour declares `echoesOwnNotice`.
16078
- custom: server.custom,
16079
- echoesOwnNotice: server.echoesOwnNotice,
16080
- onDiagnosticsPublished: (serverId) => {
16081
- this.hooks.noteDiagnosticsPublished(serverId);
16082
- }
16083
- });
16238
+ const connect = (launched) => {
16239
+ const override = getServerInitOverride(server.id, filePath);
16240
+ const mergedInit = launched.launchVariant === "classic" ? mergeInitializationOptions(override?.initializationOptions, launched.initialization) : mergeInitializationOptions(launched.initialization, override?.initializationOptions);
16241
+ this.hooks.rearmFirstContact(server.id);
16242
+ return createLSPClient({
16243
+ serverId: server.id,
16244
+ process: launched.process,
16245
+ root,
16246
+ sessionCwd: this.sessionCwd,
16247
+ initialization: mergedInit,
16248
+ initializeTimeoutMs: server.initializeTimeoutMs,
16249
+ launchVariant: launched.launchVariant,
16250
+ settingsSection: server.settingsSection,
16251
+ // #4764: the declared role travels with the client, so a failed server
16252
+ // config can gate an auxiliary scanner's empty publications only.
16253
+ role: server.role,
16254
+ // #5131 round 2: the config-declared flag gates the echo hold; a
16255
+ // built-in row with the same behaviour declares `echoesOwnNotice`.
16256
+ custom: server.custom,
16257
+ echoesOwnNotice: server.echoesOwnNotice,
16258
+ onDiagnosticsPublished: (serverId) => {
16259
+ this.hooks.noteDiagnosticsPublished(serverId);
16260
+ }
16261
+ });
16262
+ };
16263
+ let client;
16264
+ try {
16265
+ client = await connect(spawned);
16266
+ } catch (err) {
16267
+ const fallback = spawned.initializeFallback;
16268
+ if (!fallback)
16269
+ throw err;
16270
+ if (this.isDestroyed)
16271
+ return abortSpawn(void 0);
16272
+ const replacement = await withLspProjectCodePermission(projectCodeAllowed, () => fallback(err));
16273
+ if (!replacement)
16274
+ throw err;
16275
+ if (this.isDestroyed)
16276
+ return abortSpawn(replacement);
16277
+ spawned = replacement;
16278
+ client = await connect(spawned);
16279
+ }
16084
16280
  if (this.isDestroyed) {
16085
16281
  client.shutdown({ fast: true }).catch(() => {
16086
16282
  });
@@ -16712,7 +16908,7 @@ function createLazyImport(load) {
16712
16908
  }
16713
16909
 
16714
16910
  // dist/clients/lsp-lazy.js
16715
- var lazyLsp = createLazyImport(() => import("./chunk-3VWEZ6H2.js"));
16911
+ var lazyLsp = createLazyImport(() => import("./chunk-M2YMBT5G.js"));
16716
16912
  function warmLspService() {
16717
16913
  return lazyLsp.get();
16718
16914
  }
@@ -19530,6 +19726,9 @@ var LSPService = class _LSPService {
19530
19726
  let diagnosticsTimedOut = false;
19531
19727
  let diagnosticsUnansweredServerIds = [];
19532
19728
  let diagnosticsUnansweredPrimaryServerIds = [];
19729
+ const loadingExpiredServerIds = /* @__PURE__ */ new Set();
19730
+ const loadFailedExpiredServerIds = /* @__PURE__ */ new Set();
19731
+ let loadFailureDetail;
19533
19732
  const retractPrimaryTimeoutAttribution = () => {
19534
19733
  diagnosticsUnansweredPrimaryServerIds = [];
19535
19734
  diagnosticsUnansweredServerIds = diagnosticsUnansweredServerIds.filter((id) => !primaryServerIds.has(id));
@@ -19705,6 +19904,13 @@ var LSPService = class _LSPService {
19705
19904
  }) : entry.client.waitForDiagnostics(filePath, serverTimeout)).then((outcome) => {
19706
19905
  if (outcome === "deadline-expired" && !isAuxiliary(entry.info) && !isSilentOnCleanServer(entry)) {
19707
19906
  expiredWaitServerIds.add(entry.info.id);
19907
+ const block = entry.client.readinessBlock?.();
19908
+ if (block?.reason === "server-loading") {
19909
+ loadingExpiredServerIds.add(entry.info.id);
19910
+ } else if (block?.reason === "server-load-failed") {
19911
+ loadFailedExpiredServerIds.add(entry.info.id);
19912
+ loadFailureDetail ??= block.detail;
19913
+ }
19708
19914
  }
19709
19915
  return outcome;
19710
19916
  });
@@ -20155,7 +20361,10 @@ var LSPService = class _LSPService {
20155
20361
  primaryUnavailableCause: unanswered.cause,
20156
20362
  primaryNotifyWriteTimedOutServerIds,
20157
20363
  diagnosticsTimedOut,
20158
- diagnosticsUnansweredServerIds: diagnosticsUnansweredPrimaryServerIds
20364
+ diagnosticsUnansweredServerIds: diagnosticsUnansweredPrimaryServerIds,
20365
+ loadingServerIds: [...loadingExpiredServerIds],
20366
+ loadFailedServerIds: [...loadFailedExpiredServerIds],
20367
+ ...loadFailureDetail !== void 0 && { loadFailureDetail }
20159
20368
  });
20160
20369
  const inconclusive = verdict.inconclusive;
20161
20370
  const skippedAuxiliaries = collected !== void 0 ? await this.skippedAuxiliaryServerIds(filePath, clientScope, options, spawned) : { brokenSkippedServerIds: [], policySkippedServerIds: [] };
@@ -20252,6 +20461,9 @@ var LSPService = class _LSPService {
20252
20461
  result.inconclusiveServerIds = verdict.inconclusiveServerIds;
20253
20462
  }
20254
20463
  result.inconclusiveReason = verdict.inconclusiveReason;
20464
+ if (verdict.inconclusiveDetail !== void 0) {
20465
+ result.inconclusiveDetail = verdict.inconclusiveDetail;
20466
+ }
20255
20467
  if (verdict.disabledPrimaryServerIds) {
20256
20468
  result.disabledPrimaryServerIds = verdict.disabledPrimaryServerIds;
20257
20469
  }
@@ -20367,6 +20579,9 @@ var LSPService = class _LSPService {
20367
20579
  ...verdict.inconclusiveReason && {
20368
20580
  inconclusiveReason: verdict.inconclusiveReason
20369
20581
  },
20582
+ ...verdict.inconclusiveDetail !== void 0 && {
20583
+ inconclusiveDetail: verdict.inconclusiveDetail
20584
+ },
20370
20585
  // #1470: the touch's own honesty verdict, so a `cut_off` row in
20371
20586
  // `lsp_aux_wait_outcome` can be joined to the touch that produced it and
20372
20587
  // shown NOT to have claimed confirmation for that server's coverage.
@@ -21127,7 +21342,7 @@ var LSPService = class _LSPService {
21127
21342
  async codeAction(filePath, line, character, endLine, endCharacter) {
21128
21343
  const spawned = await this.getClientForFile(filePath, NAV_CLIENT_WAIT_TIMEOUT_MS);
21129
21344
  if (!spawned)
21130
- return [];
21345
+ return void 0;
21131
21346
  if (!spawned.client.getOperationSupport().codeAction) {
21132
21347
  throw new Error("__UNSUPPORTED__ Active LSP server does not advertise support for codeAction");
21133
21348
  }
@@ -1,18 +1,18 @@
1
1
  import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
2
  import {
3
3
  parseSymbolKey
4
- } from "./chunk-7BEADGAZ.js";
4
+ } from "./chunk-7U36VQL6.js";
5
5
  import {
6
6
  isTestRoleCollateral
7
- } from "./chunk-ME6MF2N2.js";
7
+ } from "./chunk-YCR6ZYTE.js";
8
8
  import "./chunk-3MED75HT.js";
9
- import "./chunk-ET3DSSFZ.js";
10
- import "./chunk-6EIV3H7O.js";
11
- import "./chunk-3R3Z54J7.js";
12
- import "./chunk-HRQTYU2T.js";
13
- import "./chunk-AGEQRJ5A.js";
9
+ import "./chunk-3PO4YYOX.js";
10
+ import "./chunk-PQF6YGYB.js";
11
+ import "./chunk-LOEJFTF2.js";
12
+ import "./chunk-W26QZ3OM.js";
13
+ import "./chunk-NHA5K226.js";
14
14
  import "./chunk-S26LC76R.js";
15
- import "./chunk-K2GV34T2.js";
15
+ import "./chunk-7CLWC2UH.js";
16
16
  import "./chunk-LJDODBBZ.js";
17
17
  import "./chunk-WLD6BGON.js";
18
18
  import "./chunk-NXL4FFQQ.js";