@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
@@ -0,0 +1,254 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { activityMonitor } from "./activity.ts";
3
+ import { normalizeDomain } from "./domain-filter-normalization.ts";
4
+ import type { SearchOptions, SearchResponse } from "./perplexity.ts";
5
+ import { formatSearchResultsAsAnswer } from "./search-answer-formatting.ts";
6
+ import { normalizeSearchResultCount } from "./search-result-count-normalization.ts";
7
+ import { hasCredentialSource, redactCredential, resolveCredential } from "./credential-source.ts";
8
+ import { fetchWithCredentialRedirects, getWebSearchConfigPath, resolveProviderApiUrl } from "./utils.ts";
9
+
10
+ // cloro monitor API: https://cloro.dev/docs/api-reference/endpoint/monitor-google
11
+ const CLORO_GOOGLE_URL = "https://api.cloro.dev/v1/monitor/google";
12
+ const CLORO_AIMODE_URL = "https://api.cloro.dev/v1/monitor/aimode";
13
+ const CLORO_BING_AIMODE_URL = "https://api.cloro.dev/v1/monitor/bing/aimode";
14
+ const CONFIG_PATH = getWebSearchConfigPath();
15
+ // cloro scrapes the live page during the request, so allow more time than a plain search index.
16
+ const SEARCH_TIMEOUT_MS = 120_000;
17
+ // The API has no default country and requires one on every request.
18
+ const COUNTRY = "US";
19
+ const MODES = ["google", "aimode", "bing_aimode"] as const;
20
+ type CloroMode = typeof MODES[number];
21
+
22
+ interface WebSearchConfig {
23
+ cloroBaseUrl?: unknown;
24
+ cloroApiKey?: unknown;
25
+ cloroMode?: unknown;
26
+ }
27
+
28
+ // Google organic results carry title/link/snippet; Google and Bing AI Mode sources carry label/url/description.
29
+ interface CloroEntry {
30
+ title?: unknown;
31
+ link?: unknown;
32
+ snippet?: unknown;
33
+ label?: unknown;
34
+ url?: unknown;
35
+ description?: unknown;
36
+ }
37
+
38
+ interface CloroResult {
39
+ entries: CloroEntry[];
40
+ text?: string;
41
+ }
42
+
43
+ let cachedConfig: WebSearchConfig | null = null;
44
+
45
+ function loadConfig(): WebSearchConfig {
46
+ if (cachedConfig) return cachedConfig;
47
+ if (!existsSync(CONFIG_PATH)) {
48
+ cachedConfig = {};
49
+ return cachedConfig;
50
+ }
51
+ const raw = readFileSync(CONFIG_PATH, "utf-8");
52
+ let parsed: unknown;
53
+ try {
54
+ parsed = JSON.parse(raw);
55
+ } catch (err) {
56
+ const message = err instanceof Error ? err.message : String(err);
57
+ throw new Error(`Failed to parse ${CONFIG_PATH}: ${message}`);
58
+ }
59
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
60
+ throw new Error(`Invalid config in ${CONFIG_PATH}: expected a JSON object`);
61
+ }
62
+ cachedConfig = parsed as WebSearchConfig;
63
+ return cachedConfig;
64
+ }
65
+
66
+ function getMode(): CloroMode {
67
+ const value = loadConfig().cloroMode;
68
+ if (value === undefined) return "google";
69
+ if (typeof value !== "string" || !MODES.includes(value as CloroMode)) {
70
+ throw new Error(`cloroMode in ${CONFIG_PATH} must be one of: ${MODES.join(", ")}`);
71
+ }
72
+ return value as CloroMode;
73
+ }
74
+
75
+ async function getApiKey(signal?: AbortSignal): Promise<string | null> {
76
+ return resolveCredential({
77
+ provider: "cloro",
78
+ configuredValue: loadConfig().cloroApiKey,
79
+ environmentValue: process.env.CLORO_API_KEY,
80
+ signal,
81
+ });
82
+ }
83
+
84
+ async function requireApiKey(signal?: AbortSignal): Promise<string> {
85
+ const apiKey = await getApiKey(signal);
86
+ if (!apiKey) {
87
+ throw new Error(
88
+ "cloro API key not found. Either:\n" +
89
+ ` 1. Create ${CONFIG_PATH} with { "cloroApiKey": "your-key" }\n` +
90
+ " 2. Set CLORO_API_KEY environment variable\n" +
91
+ "Get a key at https://dashboard.cloro.dev/api-keys",
92
+ );
93
+ }
94
+ return apiKey;
95
+ }
96
+
97
+ interface DomainFilters {
98
+ include: string[];
99
+ exclude: string[];
100
+ }
101
+
102
+ function parseDomainFilter(domainFilter: string[] | undefined): DomainFilters {
103
+ const filters: DomainFilters = { include: [], exclude: [] };
104
+ for (const raw of domainFilter ?? []) {
105
+ const domain = normalizeDomain(raw);
106
+ if (!domain) continue;
107
+ const target = raw.trim().startsWith("-") ? filters.exclude : filters.include;
108
+ if (!target.includes(domain)) target.push(domain);
109
+ }
110
+ return filters;
111
+ }
112
+
113
+ function passesDomainFilters(url: URL, filters: DomainFilters): boolean {
114
+ if (filters.include.length === 0 && filters.exclude.length === 0) return true;
115
+ const hostname = url.hostname.toLowerCase();
116
+ const matches = (domain: string) => hostname === domain || hostname.endsWith(`.${domain}`);
117
+ if (filters.exclude.some(matches)) return false;
118
+ return filters.include.length === 0 || filters.include.some(matches);
119
+ }
120
+
121
+ function buildQuery(query: string, filters: DomainFilters): string {
122
+ const parts = [query];
123
+ if (filters.include.length === 1) parts.push(`site:${filters.include[0]}`);
124
+ if (filters.include.length > 1) parts.push(`(${filters.include.map(domain => `site:${domain}`).join(" OR ")})`);
125
+ for (const domain of filters.exclude) parts.push(`-site:${domain}`);
126
+ return parts.join(" ");
127
+ }
128
+
129
+ // cloro returns a Google /goto redirect, or an empty link, when it has not resolved the destination yet.
130
+ function isUnresolvedGoogleRedirect(url: URL): boolean {
131
+ const hostname = url.hostname.toLowerCase();
132
+ return url.pathname === "/goto" && (hostname === "google.com" || hostname.endsWith(".google.com"));
133
+ }
134
+
135
+ function errorMessage(err: unknown): string {
136
+ return err instanceof Error ? err.message : String(err);
137
+ }
138
+
139
+ function invalidResponse(message: string): Error {
140
+ return new Error(`cloro returned invalid response: ${message}`);
141
+ }
142
+
143
+ function parseResponse(value: unknown, mode: CloroMode): CloroResult {
144
+ if (!value || typeof value !== "object" || Array.isArray(value)) throw invalidResponse("expected an object envelope");
145
+ const envelope = value as Record<string, unknown>;
146
+ // Failures arrive as { "success": false, "error": { "code": "...", "message": "..." } }.
147
+ const error = envelope.error as Record<string, unknown> | undefined;
148
+ if (error && typeof error === "object" && typeof error.message === "string" && error.message.trim()) {
149
+ throw invalidResponse(error.message.trim());
150
+ }
151
+ const result = envelope.result;
152
+ if (!result || typeof result !== "object" || Array.isArray(result)) throw invalidResponse("expected result object");
153
+ const fields = result as Record<string, unknown>;
154
+ if (mode === "google") {
155
+ if (!Array.isArray(fields.organicResults)) throw invalidResponse("expected result.organicResults array");
156
+ return { entries: fields.organicResults as CloroEntry[] };
157
+ }
158
+ // The request asks for markdown, which keeps list and bold formatting. Plain text is the fallback.
159
+ const answer = typeof fields.markdown === "string" && fields.markdown.trim() ? fields.markdown : fields.text;
160
+ if (typeof answer !== "string") throw invalidResponse("expected result.markdown or result.text string");
161
+ return { entries: Array.isArray(fields.sources) ? fields.sources as CloroEntry[] : [], text: answer.trim() };
162
+ }
163
+
164
+ export function isCloroAvailable(): boolean {
165
+ return hasCredentialSource({ provider: "cloro", configuredValue: loadConfig().cloroApiKey, environmentValue: process.env.CLORO_API_KEY });
166
+ }
167
+
168
+ // Neither endpoint takes a date filter in this request shape, so `recencyFilter` is not applied.
169
+ export async function searchWithCloro(query: string, options: SearchOptions = {}): Promise<SearchResponse> {
170
+ const mode = getMode();
171
+ const apiKey = await requireApiKey(options.signal);
172
+ const numResults = normalizeSearchResultCount(options.numResults);
173
+ const filters = parseDomainFilter(options.domainFilter);
174
+ // Google Search gets the domain filters as site: clauses. Google and Bing AI Mode get the plain prompt, and
175
+ // their sources are filtered locally below. One Google request returns one results page, trimmed to numResults locally.
176
+ const endpoint = mode === "google" ? CLORO_GOOGLE_URL : mode === "aimode" ? CLORO_AIMODE_URL : CLORO_BING_AIMODE_URL;
177
+ const body = mode === "google"
178
+ ? { query: buildQuery(query, filters), country: COUNTRY }
179
+ : { prompt: query, country: COUNTRY, include: { markdown: true } };
180
+ const activityId = activityMonitor.logStart({ type: "api", query });
181
+ const timeoutSignal = AbortSignal.timeout(SEARCH_TIMEOUT_MS);
182
+ let response: Response;
183
+ let parsed: CloroResult;
184
+ try {
185
+ response = await fetchWithCredentialRedirects(resolveProviderApiUrl("cloro", endpoint, loadConfig().cloroBaseUrl), {
186
+ method: "POST",
187
+ headers: {
188
+ Accept: "application/json",
189
+ Authorization: `Bearer ${apiKey}`,
190
+ "Content-Type": "application/json",
191
+ "User-Agent": "pi-web-access",
192
+ },
193
+ body: JSON.stringify(body),
194
+ signal: options.signal ? AbortSignal.any([timeoutSignal, options.signal]) : timeoutSignal,
195
+ }, ["Authorization"]);
196
+ if (!response.ok) {
197
+ const errorText = await response.text();
198
+ throw new Error(`cloro error ${response.status}: ${redactCredential(errorText, apiKey).slice(0, 300)}`);
199
+ }
200
+ let rawData: unknown;
201
+ try {
202
+ rawData = await response.json();
203
+ } catch (err) {
204
+ // Only a parse failure is invalid JSON; a dropped connection or timeout keeps its own classification.
205
+ if (!(err instanceof SyntaxError)) throw err;
206
+ throw new Error(`cloro returned invalid JSON: ${errorMessage(err)}`);
207
+ }
208
+ parsed = parseResponse(rawData, mode);
209
+ } catch (err) {
210
+ if (options.signal?.aborted) {
211
+ activityMonitor.logComplete(activityId, 0);
212
+ throw new Error("Aborted");
213
+ }
214
+ const message = errorMessage(err);
215
+ const providerTimeout = timeoutSignal.aborted || (err instanceof Error && err.name === "TimeoutError");
216
+ const outgoing = providerTimeout
217
+ ? new Error(`cloro request timed out after ${Math.round(SEARCH_TIMEOUT_MS / 1000)}s`)
218
+ : (() => {
219
+ const redactedMessage = redactCredential(message, apiKey);
220
+ if (redactedMessage === message && err instanceof Error) return err;
221
+ const redactedError = new Error(redactedMessage);
222
+ if (err instanceof Error) redactedError.name = err.name;
223
+ return redactedError;
224
+ })();
225
+ activityMonitor.logError(activityId, redactCredential(errorMessage(outgoing), apiKey));
226
+ throw outgoing;
227
+ }
228
+ activityMonitor.logComplete(activityId, response.status);
229
+ const results: SearchResponse["results"] = [];
230
+ for (const entry of parsed.entries) {
231
+ if (!entry || typeof entry !== "object") continue;
232
+ const link = mode === "google" ? entry.link : entry.url;
233
+ if (typeof link !== "string" || !link) continue;
234
+ let resultUrl: URL;
235
+ try {
236
+ resultUrl = new URL(link);
237
+ } catch {
238
+ continue;
239
+ }
240
+ if (resultUrl.protocol !== "http:" && resultUrl.protocol !== "https:") continue;
241
+ if (isUnresolvedGoogleRedirect(resultUrl)) continue;
242
+ if (!passesDomainFilters(resultUrl, filters)) continue;
243
+ const title = mode === "google" ? entry.title : entry.label;
244
+ const snippet = mode === "google" ? entry.snippet : entry.description;
245
+ results.push({
246
+ title: typeof title === "string" && title.trim() ? title.trim() : `Source ${results.length + 1}`,
247
+ url: resultUrl.href,
248
+ snippet: typeof snippet === "string" ? snippet : "",
249
+ });
250
+ if (results.length >= numResults) break;
251
+ }
252
+ const answer = parsed.text || formatSearchResultsAsAnswer(results);
253
+ return { answer, results };
254
+ }
@@ -59,6 +59,9 @@ function buildProviderButtons(
59
59
  { value: "searchapi", label: "SearchApi", available: available.searchapi },
60
60
  { value: "outcrawl", label: "Outcrawl", available: available.outcrawl },
61
61
  { value: "sofya", label: "Sofya", available: available.sofya },
62
+ { value: "cloro", label: "cloro", available: available.cloro },
63
+ { value: "autom", label: "Autom", available: available.autom },
64
+ { value: "specstream", label: "SpecStream", available: available.specstream },
62
65
  { value: "tabstack", label: "Tabstack", available: available.tabstack },
63
66
  { value: "deepseek", label: "DeepSeek", available: available.deepseek },
64
67
  ];
@@ -1492,7 +1495,7 @@ const SCRIPT = `(function() {
1492
1495
  var token = DATA.sessionToken;
1493
1496
  var timeoutSec = DATA.timeout;
1494
1497
  var queries = Array.isArray(DATA.queries) ? DATA.queries : [];
1495
- var providers = ["auto", "all", "openai", "exa", "brave", "parallel", "parallel-mcp", "tinyfish", "search1api", "searchinfinity", "querit", "tavily", "firecrawl", "jina", "serpdive", "kagi", "bocha", "ollama", "searxng", "degoog", "duckduckgo", "perplexity", "gemini", "kimi", "anysearch", "xcrawl", "xai", "mistral", "brightdata", "serpbase", "serpapi", "serper", "serply", "valyu", "baizhi", "you", "zai", "keenable", "ceramic", "deepseek", "linkup", "ninerouter", "cloudflare", "searchapi", "outcrawl", "sofya", "tabstack"];
1498
+ var providers = ["auto", "all", "openai", "exa", "brave", "parallel", "parallel-mcp", "tinyfish", "search1api", "searchinfinity", "querit", "tavily", "firecrawl", "jina", "serpdive", "kagi", "bocha", "ollama", "searxng", "degoog", "duckduckgo", "perplexity", "gemini", "kimi", "anysearch", "xcrawl", "xai", "mistral", "brightdata", "serpbase", "serpapi", "serper", "serply", "valyu", "baizhi", "you", "zai", "keenable", "ceramic", "deepseek", "linkup", "ninerouter", "cloudflare", "searchapi", "outcrawl", "sofya", "cloro", "autom", "specstream", "tabstack"];
1496
1499
  var availProviders = DATA.availableProviders && typeof DATA.availableProviders === "object" ? DATA.availableProviders : {};
1497
1500
  var workflow = "summary-review";
1498
1501
  var initialDefaultProvider = typeof DATA.defaultProvider === "string" ? DATA.defaultProvider : "exa";
@@ -1741,6 +1744,9 @@ const SCRIPT = `(function() {
1741
1744
  if (provider === "searchapi") return "SearchApi";
1742
1745
  if (provider === "outcrawl") return "Outcrawl";
1743
1746
  if (provider === "sofya") return "Sofya";
1747
+ if (provider === "cloro") return "cloro";
1748
+ if (provider === "autom") return "Autom";
1749
+ if (provider === "specstream") return "SpecStream";
1744
1750
  if (provider === "deepseek") return "DeepSeek";
1745
1751
  return "Unknown";
1746
1752
  }
@@ -319,6 +319,9 @@ export function startCuratorServer(
319
319
  if (provider === "searchapi") return availableProviders.searchapi;
320
320
  if (provider === "outcrawl") return availableProviders.outcrawl;
321
321
  if (provider === "sofya") return availableProviders.sofya;
322
+ if (provider === "cloro") return availableProviders.cloro;
323
+ if (provider === "autom") return availableProviders.autom;
324
+ if (provider === "specstream") return availableProviders.specstream;
322
325
  if (provider === "deepseek") return availableProviders.deepseek;
323
326
  return false;
324
327
  }