@herbertgao/pi-extensions 2026.10.13 → 2026.10.15

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 (299) hide show
  1. package/README.md +16 -14
  2. package/THIRD_PARTY_NOTICES.md +3 -3
  3. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +2 -2
  4. package/node_modules/@herbertgao/pi-cc-extensions/README.md +2 -2
  5. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +1 -0
  6. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +3 -6
  7. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +22 -5
  8. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +44 -14
  9. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +1 -5
  10. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/index.ts +20 -5
  11. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +4 -1
  12. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +42 -18
  13. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/layout.ts +12 -3
  14. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +131 -0
  15. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +217 -113
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +12 -5
  17. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/subagent-notification.ts +556 -0
  18. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +50 -0
  19. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +11 -0
  20. package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/patch-keys.ts +4 -0
  21. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  22. package/node_modules/@juicesharp/rpiv-ask-user-question/README.md +1 -0
  23. package/node_modules/@juicesharp/rpiv-ask-user-question/ask-user-question.ts +27 -3
  24. package/node_modules/@juicesharp/rpiv-ask-user-question/config.ts +23 -0
  25. package/node_modules/@juicesharp/rpiv-ask-user-question/docs/configuration.md +15 -0
  26. package/node_modules/@juicesharp/rpiv-ask-user-question/docs/keyboard.md +9 -2
  27. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/de.json +7 -4
  28. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/en.json +8 -5
  29. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/es.json +7 -4
  30. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/fr.json +7 -4
  31. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt-BR.json +7 -4
  32. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt.json +7 -4
  33. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/ru.json +7 -4
  34. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/uk.json +7 -4
  35. package/node_modules/@juicesharp/rpiv-ask-user-question/locales/zh.json +7 -4
  36. package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +4 -3
  37. package/node_modules/@juicesharp/rpiv-ask-user-question/presentation.ts +11 -1
  38. package/node_modules/@juicesharp/rpiv-ask-user-question/state/build-questionnaire.ts +6 -0
  39. package/node_modules/@juicesharp/rpiv-ask-user-question/state/key-router.ts +49 -8
  40. package/node_modules/@juicesharp/rpiv-ask-user-question/state/questionnaire-session.ts +6 -0
  41. package/node_modules/@juicesharp/rpiv-ask-user-question/state/state-reducer.ts +13 -1
  42. package/node_modules/@juicesharp/rpiv-ask-user-question/state/state.ts +2 -0
  43. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-block-renderer.ts +19 -7
  44. package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-builder.ts +36 -7
  45. package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-copy.ts +13 -2
  46. package/node_modules/@juicesharp/rpiv-ask-user-question/view/tab-content-strategy.ts +24 -8
  47. package/node_modules/@juicesharp/rpiv-ask-user-question/view/transcript.ts +144 -0
  48. package/node_modules/@narumitw/pi-btw/README.md +8 -3
  49. package/node_modules/@narumitw/pi-btw/dist/index.ts +448 -182
  50. package/node_modules/@narumitw/pi-btw/dist/index.ts.map +4 -4
  51. package/node_modules/@narumitw/pi-btw/docs/core-alignment.md +10 -2
  52. package/node_modules/@narumitw/pi-btw/docs/main-context-runtime.md +45 -0
  53. package/node_modules/@narumitw/pi-btw/docs/workflows.md +48 -5
  54. package/node_modules/@narumitw/pi-btw/package.json +5 -5
  55. package/node_modules/@narumitw/pi-btw/src/btw.ts +39 -14
  56. package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +83 -63
  57. package/node_modules/@narumitw/pi-btw/src/import-main-updates.ts +84 -0
  58. package/node_modules/@narumitw/pi-btw/src/keybindings.ts +29 -4
  59. package/node_modules/@narumitw/pi-btw/src/main-context-snapshot.ts +125 -0
  60. package/node_modules/@narumitw/pi-btw/src/menu.ts +1 -0
  61. package/node_modules/@narumitw/pi-btw/src/side-thread.ts +66 -17
  62. package/node_modules/@narumitw/pi-btw/src/transcript-markdown.ts +5 -5
  63. package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +47 -6
  64. package/node_modules/@narumitw/pi-caffeinate/package.json +3 -3
  65. package/node_modules/pi-lens/CHANGELOG.md +440 -0
  66. package/node_modules/pi-lens/README.md +13 -3
  67. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +1 -0
  68. package/node_modules/pi-lens/dist/chunk-22Y2BM7H.js +23 -0
  69. package/node_modules/pi-lens/dist/{chunk-ATKJFDQN.js → chunk-27VWVB23.js} +12 -14
  70. package/node_modules/pi-lens/dist/{chunk-S2HEXIWI.js → chunk-2FYKETQJ.js} +10 -6
  71. package/node_modules/pi-lens/dist/{chunk-SRYEJNES.js → chunk-2LDMXL2M.js} +2 -2
  72. package/node_modules/pi-lens/dist/{chunk-ZHH37KZL.js → chunk-2SDHYHHO.js} +17 -17
  73. package/node_modules/pi-lens/dist/chunk-2Y6OJRSI.js +38 -0
  74. package/node_modules/pi-lens/dist/chunk-3SNDVPOR.js +507 -0
  75. package/node_modules/pi-lens/dist/{chunk-5OFV52AM.js → chunk-3WCEHYOI.js} +1 -1
  76. package/node_modules/pi-lens/dist/chunk-44X7VIKR.js +73 -0
  77. package/node_modules/pi-lens/dist/{chunk-DEL2U6CM.js → chunk-4FHUGDKU.js} +16 -14
  78. package/node_modules/pi-lens/dist/{chunk-CT4MN5IU.js → chunk-4ODSZ35Z.js} +353 -359
  79. package/node_modules/pi-lens/dist/{chunk-ZIVJBOO3.js → chunk-4U7GDSZQ.js} +2 -2
  80. package/node_modules/pi-lens/dist/chunk-54NIOJJZ.js +25 -0
  81. package/node_modules/pi-lens/dist/{chunk-N5FLEO7W.js → chunk-5DKE4HGX.js} +37 -37
  82. package/node_modules/pi-lens/dist/{chunk-P63GXC37.js → chunk-5LRUKYFA.js} +31 -4
  83. package/node_modules/pi-lens/dist/{chunk-HRNHZA3N.js → chunk-63NMUNYP.js} +12 -16
  84. package/node_modules/pi-lens/dist/{chunk-HWCCCQNX.js → chunk-6XSESGWD.js} +13 -6
  85. package/node_modules/pi-lens/dist/{chunk-UMS2MFPZ.js → chunk-72J27ICO.js} +2 -3
  86. package/node_modules/pi-lens/dist/{chunk-ED36RF6Y.js → chunk-7FLRUH6B.js} +1 -1
  87. package/node_modules/pi-lens/dist/chunk-7IYC4ENJ.js +297 -0
  88. package/node_modules/pi-lens/dist/chunk-7WWQAW5P.js +30 -0
  89. package/node_modules/pi-lens/dist/{chunk-3DA2JDOL.js → chunk-7ZS7MC24.js} +551 -203
  90. package/node_modules/pi-lens/dist/{chunk-WMYE35PX.js → chunk-AHWA4AKM.js} +7 -5
  91. package/node_modules/pi-lens/dist/{chunk-JW3YWBVB.js → chunk-AI3GP74G.js} +17 -19
  92. package/node_modules/pi-lens/dist/{chunk-AGSS7277.js → chunk-APFJKOP6.js} +6 -23
  93. package/node_modules/pi-lens/dist/{chunk-ZVUL7QYY.js → chunk-ASRAO7KG.js} +29 -32
  94. package/node_modules/pi-lens/dist/{chunk-BW5KFIQC.js → chunk-AWQWXSW4.js} +1 -0
  95. package/node_modules/pi-lens/dist/{chunk-TLX72JTG.js → chunk-CG5V25HX.js} +1 -1
  96. package/node_modules/pi-lens/dist/chunk-CKEQFGLT.js +32 -0
  97. package/node_modules/pi-lens/dist/{chunk-Y6GZHWSJ.js → chunk-COOUUC5W.js} +6 -6
  98. package/node_modules/pi-lens/dist/{chunk-XTBDCR27.js → chunk-CPZ5JJW6.js} +4 -4
  99. package/node_modules/pi-lens/dist/{chunk-RKKOYPRA.js → chunk-DS2USX5G.js} +13 -15
  100. package/node_modules/pi-lens/dist/chunk-EA2ZRG44.js +27 -0
  101. package/node_modules/pi-lens/dist/{chunk-GSLNCYGG.js → chunk-EDMLIW6W.js} +13 -14
  102. package/node_modules/pi-lens/dist/{chunk-2EECBNC5.js → chunk-EIKRZ32J.js} +75 -0
  103. package/node_modules/pi-lens/dist/chunk-EKNWOL2I.js +27 -0
  104. package/node_modules/pi-lens/dist/{chunk-R3T7CLQ2.js → chunk-ELZRSR5N.js} +41 -41
  105. package/node_modules/pi-lens/dist/{chunk-GMX5OS7B.js → chunk-EN5AM7PX.js} +11 -12
  106. package/node_modules/pi-lens/dist/{chunk-3RKP3FMS.js → chunk-EWXXLS26.js} +226 -24
  107. package/node_modules/pi-lens/dist/chunk-EX4EXBW7.js +37 -0
  108. package/node_modules/pi-lens/dist/{chunk-XHJBS436.js → chunk-EXVXBSGN.js} +25 -25
  109. package/node_modules/pi-lens/dist/{chunk-MZGQNL3Y.js → chunk-F7BO6FWH.js} +12 -13
  110. package/node_modules/pi-lens/dist/{chunk-V35JG4JB.js → chunk-FEDWAYDS.js} +152 -334
  111. package/node_modules/pi-lens/dist/{chunk-J64T55EI.js → chunk-FWZRGGGY.js} +73 -9
  112. package/node_modules/pi-lens/dist/{chunk-T57LYLZT.js → chunk-G224FADB.js} +1 -1
  113. package/node_modules/pi-lens/dist/chunk-G5UCJFT7.js +26 -0
  114. package/node_modules/pi-lens/dist/{chunk-LLJNQKQW.js → chunk-GLW3YDZZ.js} +20 -13
  115. package/node_modules/pi-lens/dist/{chunk-GXFV6MYU.js → chunk-GTDSYEA2.js} +72 -39
  116. package/node_modules/pi-lens/dist/{chunk-DUO2TU77.js → chunk-GYRZ72R4.js} +10 -4
  117. package/node_modules/pi-lens/dist/chunk-HYVXA3BB.js +49 -0
  118. package/node_modules/pi-lens/dist/{chunk-W66O5E25.js → chunk-IEBJF3PN.js} +13 -15
  119. package/node_modules/pi-lens/dist/{chunk-GAQ7OQG6.js → chunk-IL7K66ZQ.js} +83 -94
  120. package/node_modules/pi-lens/dist/{chunk-T7FEBKXN.js → chunk-JWOVP5BL.js} +7 -9
  121. package/node_modules/pi-lens/dist/{chunk-UBOQLVT2.js → chunk-K2GUZ4DN.js} +4 -4
  122. package/node_modules/pi-lens/dist/{chunk-5VSF4UUQ.js → chunk-K4SZB56V.js} +34 -39
  123. package/node_modules/pi-lens/dist/{chunk-7D6L4MTX.js → chunk-KCBRHV5E.js} +3 -3
  124. package/node_modules/pi-lens/dist/{chunk-GSM5UU7A.js → chunk-KFXCL4OV.js} +38 -28
  125. package/node_modules/pi-lens/dist/{chunk-J6MPGQTS.js → chunk-KJJAVH3X.js} +81 -15
  126. package/node_modules/pi-lens/dist/{chunk-BWD5EPKO.js → chunk-KPVLQHCZ.js} +4 -6
  127. package/node_modules/pi-lens/dist/{chunk-MPNJLASA.js → chunk-KX56K73G.js} +10 -13
  128. package/node_modules/pi-lens/dist/{chunk-AWSCPCN2.js → chunk-LMCTHJ2H.js} +19 -19
  129. package/node_modules/pi-lens/dist/{chunk-IWDLU6K3.js → chunk-MEFLGBCS.js} +4 -6
  130. package/node_modules/pi-lens/dist/{chunk-TOY6QKOH.js → chunk-MKPCELNI.js} +17 -17
  131. package/node_modules/pi-lens/dist/{chunk-POMLXPMY.js → chunk-N3PLNNCW.js} +1 -1
  132. package/node_modules/pi-lens/dist/chunk-N5FBM25N.js +22 -0
  133. package/node_modules/pi-lens/dist/{chunk-CYRKQRPM.js → chunk-NFNVDDGB.js} +2 -4
  134. package/node_modules/pi-lens/dist/{chunk-RMLC67LF.js → chunk-NLIVE7L6.js} +2 -30
  135. package/node_modules/pi-lens/dist/{chunk-24AKHFGP.js → chunk-OMJ3OFBJ.js} +6 -6
  136. package/node_modules/pi-lens/dist/{chunk-IQWN5JCP.js → chunk-OZNCKLOX.js} +13 -14
  137. package/node_modules/pi-lens/dist/chunk-P5XUGPIX.js +31 -0
  138. package/node_modules/pi-lens/dist/{chunk-2KXTHF3M.js → chunk-PJXNTPB2.js} +253 -33
  139. package/node_modules/pi-lens/dist/chunk-PKOXJIVT.js +88 -0
  140. package/node_modules/pi-lens/dist/{chunk-DGUKIYSI.js → chunk-PP2A5V2T.js} +8 -10
  141. package/node_modules/pi-lens/dist/{chunk-KAPJINKN.js → chunk-Q42LJANT.js} +2 -2
  142. package/node_modules/pi-lens/dist/{chunk-UZ2XCLYS.js → chunk-Q4BKKOVC.js} +8 -8
  143. package/node_modules/pi-lens/dist/{chunk-TIQ2PKDW.js → chunk-QT66NEYN.js} +4 -4
  144. package/node_modules/pi-lens/dist/{chunk-U44DJXQP.js → chunk-RCHO5W7M.js} +15 -18
  145. package/node_modules/pi-lens/dist/{chunk-YH5MVY2U.js → chunk-RG3MXTRI.js} +7 -7
  146. package/node_modules/pi-lens/dist/chunk-RG7OODGM.js +57 -0
  147. package/node_modules/pi-lens/dist/{chunk-OHKJ7PQF.js → chunk-RU34BA4D.js} +43 -39
  148. package/node_modules/pi-lens/dist/{chunk-JMYYOTQG.js → chunk-S26LC76R.js} +13 -1
  149. package/node_modules/pi-lens/dist/{chunk-XBJVAEEO.js → chunk-S55TEC7I.js} +3 -2
  150. package/node_modules/pi-lens/dist/{chunk-RVK72CZX.js → chunk-SJHC3BCZ.js} +1397 -481
  151. package/node_modules/pi-lens/dist/{chunk-IYNJ6YPZ.js → chunk-SNEUMLM7.js} +4 -4
  152. package/node_modules/pi-lens/dist/{chunk-S67KYG37.js → chunk-T4NGVFYI.js} +2 -2
  153. package/node_modules/pi-lens/dist/{chunk-YCWYO6TQ.js → chunk-THEXI2QO.js} +48 -45
  154. package/node_modules/pi-lens/dist/{chunk-AMERCH6V.js → chunk-TL2TCJYL.js} +15 -16
  155. package/node_modules/pi-lens/dist/{chunk-KUA4OJ5Y.js → chunk-TPYYEDP5.js} +823 -350
  156. package/node_modules/pi-lens/dist/{chunk-YNE3RP52.js → chunk-TVZRLTG6.js} +8 -1
  157. package/node_modules/pi-lens/dist/{chunk-ROYSX2S5.js → chunk-UCVMSOXF.js} +2 -2
  158. package/node_modules/pi-lens/dist/chunk-UL5SXQVX.js +32 -0
  159. package/node_modules/pi-lens/dist/{chunk-7HXE67BN.js → chunk-UO66IMVP.js} +2 -2
  160. package/node_modules/pi-lens/dist/{chunk-VOOAPROD.js → chunk-UVY4TOJH.js} +3 -3
  161. package/node_modules/pi-lens/dist/{chunk-RKBXZN3A.js → chunk-VIDEKABZ.js} +2 -2
  162. package/node_modules/pi-lens/dist/{chunk-2FN63LPV.js → chunk-VITFDI3O.js} +13 -14
  163. package/node_modules/pi-lens/dist/{chunk-6DLWKFEX.js → chunk-VUAVE3QC.js} +41 -42
  164. package/node_modules/pi-lens/dist/{chunk-FM4RDMKT.js → chunk-WUY4BZEP.js} +10 -12
  165. package/node_modules/pi-lens/dist/{chunk-SD4I7ZO4.js → chunk-X3UTCXAA.js} +43 -53
  166. package/node_modules/pi-lens/dist/chunk-XHDBJODR.js +45 -0
  167. package/node_modules/pi-lens/dist/{chunk-5IUSNGOC.js → chunk-XHLK33VM.js} +28 -21
  168. package/node_modules/pi-lens/dist/{chunk-3KAZU3VR.js → chunk-XI34NWDI.js} +2 -2
  169. package/node_modules/pi-lens/dist/{chunk-QBFBRV2B.js → chunk-XWFIHYCH.js} +4 -2
  170. package/node_modules/pi-lens/dist/{chunk-JUKMK5Y4.js → chunk-Y2TPADJR.js} +10 -11
  171. package/node_modules/pi-lens/dist/{chunk-EBC36LNN.js → chunk-Y5KTA2OB.js} +17 -17
  172. package/node_modules/pi-lens/dist/{chunk-HYGZEMX6.js → chunk-YKVDBNPO.js} +11 -5
  173. package/node_modules/pi-lens/dist/{chunk-KN35K52N.js → chunk-YSDPVDFC.js} +3 -3
  174. package/node_modules/pi-lens/dist/chunk-YWNO5Q4R.js +44 -0
  175. package/node_modules/pi-lens/dist/{chunk-US7ECLD7.js → chunk-YWWG4AQA.js} +119 -28
  176. package/node_modules/pi-lens/dist/{chunk-O4NWQT6I.js → chunk-YXDCRUKQ.js} +4 -4
  177. package/node_modules/pi-lens/dist/{chunk-XYURS6EN.js → chunk-YXGRRORB.js} +15 -17
  178. package/node_modules/pi-lens/dist/{chunk-IUE7SSKV.js → chunk-ZAPSUBLU.js} +13 -7
  179. package/node_modules/pi-lens/dist/{chunk-EUXZEFTV.js → chunk-ZPJM7DID.js} +3 -3
  180. package/node_modules/pi-lens/dist/{chunk-5HSRT26B.js → chunk-ZSUX7KEM.js} +16 -15
  181. package/node_modules/pi-lens/dist/index.js +37155 -32210
  182. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +11 -12
  183. package/node_modules/pi-lens/dist/mcp/cli.js +46 -45
  184. package/node_modules/pi-lens/dist/mcp/server.js +1210 -574
  185. package/node_modules/pi-lens/dist/mcp/worker.js +65 -65
  186. package/node_modules/pi-lens/dist/probes/installer.js +21 -23
  187. package/node_modules/pi-lens/docs/adr/0010-trace-validation-session-lifecycle.md +390 -0
  188. package/node_modules/pi-lens/docs/adr/README.md +1 -0
  189. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +5 -3
  190. package/node_modules/pi-lens/docs/configuration.md +9 -0
  191. package/node_modules/pi-lens/docs/engineering-principles.md +12 -0
  192. package/node_modules/pi-lens/docs/environment-variables.md +20 -0
  193. package/node_modules/pi-lens/docs/features.md +16 -1
  194. package/node_modules/pi-lens/docs/globalconfig.md +37 -8
  195. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +105 -12
  196. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +37 -18
  197. package/node_modules/pi-lens/docs/pi-lens-fixer.md +22 -1
  198. package/node_modules/pi-lens/docs/pi-lens-investigator.md +14 -0
  199. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +23 -10
  200. package/node_modules/pi-lens/docs/pi-lens-monitor.md +64 -8
  201. package/node_modules/pi-lens/docs/pi-lens-retro.md +2 -2
  202. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +48 -1
  203. package/node_modules/pi-lens/docs/pi-lens-subagent.md +8 -1
  204. package/node_modules/pi-lens/docs/release-qa-baseline.md +19 -7
  205. package/node_modules/pi-lens/docs/servercapabilities.md +47 -47
  206. package/node_modules/pi-lens/docs/settings.md +9 -5
  207. package/node_modules/pi-lens/docs/subagent-compat.md +1 -1
  208. package/node_modules/pi-lens/docs/usage.md +1 -0
  209. package/node_modules/pi-lens/package.json +6 -4
  210. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-return-value-in-generator-test.yml +17 -0
  211. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-js-test.yml +86 -0
  212. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-test.yml +86 -0
  213. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-numeric-parse-python-test.yml +15 -0
  214. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-return-value-in-generator.yml +9 -4
  215. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +119 -0
  216. package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +119 -0
  217. package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-numeric-parse-python.yml +13 -2
  218. package/node_modules/pi-lens/rules/rule-catalog.json +25 -1
  219. package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +15 -5
  220. package/node_modules/pi-lens/scripts/lib/is-main-module.mjs +27 -0
  221. package/node_modules/pi-lens/scripts/lib/scratch-home-env.mjs +21 -0
  222. package/node_modules/pi-lens/scripts/rpc-load-check.mjs +4 -6
  223. package/node_modules/pi-lens/scripts/warm-loader-cache.mjs +2 -5
  224. package/node_modules/pi-next-cue/package.json +4 -1
  225. package/node_modules/pi-typesafe/README.md +6 -6
  226. package/node_modules/pi-typesafe/dist/ask.js +9 -2
  227. package/node_modules/pi-typesafe/dist/auth.d.ts +3 -2
  228. package/node_modules/pi-typesafe/dist/auth.js +2 -2
  229. package/node_modules/pi-typesafe/dist/backends.d.ts +20 -5
  230. package/node_modules/pi-typesafe/dist/backends.js +32 -8
  231. package/node_modules/pi-typesafe/dist/batch.d.ts +1 -1
  232. package/node_modules/pi-typesafe/dist/batch.js +2 -2
  233. package/node_modules/pi-typesafe/dist/client.d.ts +1 -1
  234. package/node_modules/pi-typesafe/dist/client.js +24 -12
  235. package/node_modules/pi-typesafe/dist/credentials.d.ts +8 -6
  236. package/node_modules/pi-typesafe/dist/credentials.js +70 -16
  237. package/node_modules/pi-typesafe/dist/extension.js +118 -26
  238. package/node_modules/pi-typesafe/dist/index.d.ts +1 -1
  239. package/node_modules/pi-typesafe/dist/index.js +1 -1
  240. package/node_modules/pi-typesafe/dist/key-prompt.d.ts +1 -1
  241. package/node_modules/pi-typesafe/dist/key-prompt.js +6 -6
  242. package/node_modules/pi-typesafe/dist/login.d.ts +11 -10
  243. package/node_modules/pi-typesafe/dist/login.js +24 -21
  244. package/node_modules/pi-typesafe/dist/schema.d.ts +8 -8
  245. package/node_modules/pi-typesafe/dist/schema.js +29 -7
  246. package/node_modules/pi-typesafe/package.json +2 -2
  247. package/node_modules/pi-web-access/CHANGELOG.md +40 -0
  248. package/node_modules/pi-web-access/README.md +96 -22
  249. package/node_modules/pi-web-access/brave-rate-limit.ts +2 -2
  250. package/node_modules/pi-web-access/curator-page.ts +3 -1
  251. package/node_modules/pi-web-access/curator-server.ts +1 -0
  252. package/node_modules/pi-web-access/dist/index.js +2607 -1674
  253. package/node_modules/pi-web-access/dist/mcp-cli.js +1119 -327
  254. package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +95 -0
  255. package/node_modules/pi-web-access/duckduckgo.ts +51 -45
  256. package/node_modules/pi-web-access/exa.ts +48 -6
  257. package/node_modules/pi-web-access/extract.ts +2 -2
  258. package/node_modules/pi-web-access/fetch-params.ts +5 -4
  259. package/node_modules/pi-web-access/field-extract.ts +347 -0
  260. package/node_modules/pi-web-access/gemini-search.ts +151 -13
  261. package/node_modules/pi-web-access/index.ts +128 -125
  262. package/node_modules/pi-web-access/mistral-search.ts +1 -1
  263. package/node_modules/pi-web-access/ninerouter.ts +92 -0
  264. package/node_modules/pi-web-access/offtopic-judge.ts +72 -0
  265. package/node_modules/pi-web-access/openai-search.ts +36 -10
  266. package/node_modules/pi-web-access/package.json +1 -1
  267. package/node_modules/pi-web-access/perplexity.ts +1 -0
  268. package/node_modules/pi-web-access/query-rewrite.ts +39 -13
  269. package/node_modules/pi-web-access/source-check.ts +31 -15
  270. package/node_modules/pi-web-access/summary-model-scope.ts +19 -1
  271. package/node_modules/pi-web-access/summary-review.ts +13 -20
  272. package/node_modules/pi-web-access/tool-arguments.ts +1 -1
  273. package/node_modules/pi-web-access/upgrade-notice.ts +47 -0
  274. package/node_modules/pi-web-access/utils.ts +26 -1
  275. package/node_modules/pi-web-access/web-tool-contract.ts +4 -1
  276. package/node_modules/pi-web-access/web-tool-core.ts +99 -19
  277. package/node_modules/pi-web-access/xai-search.ts +3 -3
  278. package/package.json +15 -15
  279. package/node_modules/pi-lens/dist/chunk-3PTHXJXR.js +0 -28
  280. package/node_modules/pi-lens/dist/chunk-3QED2P4V.js +0 -31
  281. package/node_modules/pi-lens/dist/chunk-5WRPDP2A.js +0 -47
  282. package/node_modules/pi-lens/dist/chunk-ABBOA7UD.js +0 -157
  283. package/node_modules/pi-lens/dist/chunk-CUHSHSB6.js +0 -273
  284. package/node_modules/pi-lens/dist/chunk-GL5LUMZE.js +0 -51
  285. package/node_modules/pi-lens/dist/chunk-HAD7QRQI.js +0 -30
  286. package/node_modules/pi-lens/dist/chunk-JORED7EX.js +0 -44
  287. package/node_modules/pi-lens/dist/chunk-KYUB6QDC.js +0 -72
  288. package/node_modules/pi-lens/dist/chunk-LZSEQW6A.js +0 -57
  289. package/node_modules/pi-lens/dist/chunk-M2IFVFWU.js +0 -79
  290. package/node_modules/pi-lens/dist/chunk-M2UD3LPU.js +0 -88
  291. package/node_modules/pi-lens/dist/chunk-MBKQHGA7.js +0 -39
  292. package/node_modules/pi-lens/dist/chunk-R7YOCSNV.js +0 -23
  293. package/node_modules/pi-lens/dist/chunk-SKAMFC7A.js +0 -28
  294. package/node_modules/pi-lens/dist/chunk-SYE6T2EB.js +0 -28
  295. package/node_modules/pi-lens/dist/chunk-TRETHTQO.js +0 -26
  296. package/node_modules/pi-lens/dist/chunk-UA7ZXYDR.js +0 -184
  297. package/node_modules/pi-lens/dist/chunk-XTFDJI3T.js +0 -24
  298. package/node_modules/pi-lens/dist/chunk-Z3CCVDUB.js +0 -76
  299. package/node_modules/pi-next-cue/.github/workflows/publish.yml +0 -20
@@ -79,6 +79,32 @@ Codex auth with the official `https://chatgpt.com/backend-api` base uses `/backe
79
79
 
80
80
  If no candidate has usable Pi credentials and a valid provider base URL, this mode fails closed and marks OpenAI unavailable; it does not fall back to the official endpoint or a standalone API key. API-key-only configurations can use `openaiResponsesUrl` instead. This switch applies to independent OpenAI provider selection; `searchRouting.useCurrentModel` retains its existing official-endpoint selection and eligibility rules.
81
81
 
82
+ ### Azure OpenAI web search (Bing grounding)
83
+
84
+ Azure OpenAI supports the Responses API's built-in `web_search` tool, backed by Grounding with Bing Search / Bing Custom Search, through the `openai` search provider.
85
+
86
+ For a standalone Azure API key, add this to `web-search.json`:
87
+
88
+ ```json
89
+ {
90
+ "provider": "openai",
91
+ "openaiSearchProviders": [],
92
+ "openaiResponsesUrl": "https://YOUR-RESOURCE.openai.azure.com/openai/v1/responses",
93
+ "openaiApiKey": "$AZURE_OPENAI_API_KEY",
94
+ "openaiSearchModel": "YOUR-DEPLOYMENT-NAME"
95
+ }
96
+ ```
97
+
98
+ The empty provider list prevents an existing Pi OpenAI/Codex login from taking precedence over the Azure key. Without it, a Codex login keeps searching through ChatGPT Codex and never sends its token to Azure, while a Pi OpenAI login's credential is sent to the Azure endpoint in place of the Azure key. Set `AZURE_OPENAI_API_KEY` in the environment; do not put the key itself in shared configuration. An explicitly configured Microsoft Entra JWT access token is also supported and is sent as Bearer auth; raw Azure API keys use the `api-key` header. The extension does not fetch or renew Entra tokens.
99
+
100
+ To reuse a configured Pi Azure provider instead, set `openaiSearchProviders` to its provider ID and `openaiUseProviderBaseUrl: true`, with no `openaiResponsesUrl`. Its base URL must already end in `/openai/v1` or `/openai/v1/responses`. Use `openaiSearchModel` to specify the Azure deployment name if it differs from the selected model ID. Do not enable `openaiUseAlphaSearch`: Azure does not implement the Codex standalone search protocol.
101
+
102
+ Current-model routing (`searchRouting.useCurrentModel: true`, with no top-level `provider`) also accepts `openai-responses` and `azure-openai-responses` models on HTTPS Azure resource endpoints under `*.openai.azure.com`, `*.cognitiveservices.azure.com`, or `*.services.ai.azure.com`. Their configured base URL must use `/openai/v1`; the model ID is sent as the deployment name, including names without a `gpt-` prefix. Other gateway and sovereign-cloud endpoints can use the explicit Responses endpoint configuration, but are not automatically recognized as Azure for authentication or current-model eligibility.
103
+
104
+ **Costs and privacy:** Bing grounding incurs search charges in addition to model usage. Microsoft states that grounding data flows outside your compliance and geographic boundary and is not covered by the Microsoft Data Protection Addendum. Confirm that this is appropriate before sending sensitive queries. See [Microsoft's Azure web search documentation](https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/web-search).
105
+
106
+ After reloading Pi, verify with a public, non-sensitive query. A successful hosted search must contain a `web_search_call` and return an answer or sources; an ordinary model-only response is rejected.
107
+
82
108
  ### Optional OpenAI standalone search
83
109
 
84
110
  Set `openaiUseAlphaSearch: true` to use the independent Codex `alpha/search` protocol instead of Responses-hosted `web_search`. The default is `false`; omitting the flag keeps existing Responses behavior. Non-boolean values are rejected.
@@ -109,7 +135,7 @@ To route automatic searches through the active Pi model, configure an ordered ro
109
135
  }
110
136
  ```
111
137
 
112
- With `useCurrentModel: true`, the automatic `openai` step uses Hosted `web_search` (or standalone search when `openaiUseAlphaSearch` is enabled) when the active model is a GPT model backed by an official OpenAI Responses endpoint: `openai`/`openai-responses` on HTTPS `api.openai.com`, or `openai-codex`/`openai-codex-responses` on the official ChatGPT Codex endpoint. Third-party gateways, Azure, and other models continue to the next route entry. A tool-level `provider` or top-level `provider` remains an explicit override; `provider: "openai"` keeps the existing independent OpenAI/Codex search-model behavior.
138
+ With `useCurrentModel: true`, the automatic `openai` step uses Hosted `web_search` (or standalone search when `openaiUseAlphaSearch` is enabled) when the active model is a GPT model backed by an official OpenAI Responses endpoint: `openai`/`openai-responses` on HTTPS `api.openai.com`, or `openai-codex`/`openai-codex-responses` on the official ChatGPT Codex endpoint. Azure v1 Responses models are also eligible as described above, using their model ID as the deployment name. Third-party gateways and other models continue to the next route entry. A tool-level `provider` or top-level `provider` remains an explicit override; `provider: "openai"` keeps the existing independent OpenAI/Codex search-model behavior.
113
139
 
114
140
  For sandboxed or corporate networks where only the proxy can resolve hostnames, set `ssrf.trustEnvProxy` to `true` to skip local DNS preflight for proxied hostnames:
115
141
 
@@ -165,7 +191,7 @@ fetch_content({ url: "/path/to/recording.mp4", prompt: "What error appears on sc
165
191
 
166
192
  ### web_search
167
193
 
168
- Search the web via OpenAI, Brave, Parallel, TinyFish, Search1API, Searchinfinity, Querit, Tavily, Firecrawl, Jina, SERPdive, Kagi, Bocha, Ollama, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data SERP, SerpBase, SerpApi, Serper, Serply, You.com, keyless Keenable, Ceramic, DeepSeek, Linkup, self-hosted SearXNG, explicit-only degoog, keyless DuckDuckGo, Exa, Perplexity AI, Gemini, or Kimi. The default `none` workflow makes no summary-generation model call and opens no curator/browser: it returns bounded raw results, identifies the provider used for each query, and stores the full results for retrieval by responseId. The selected search provider may itself be model-backed.
194
+ Search the web via OpenAI, Brave, Parallel, TinyFish, Search1API, Searchinfinity, Querit, Tavily, Firecrawl, Jina, SERPdive, Kagi, Bocha, Ollama, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data SERP, SerpBase, SerpApi, Serper, Serply, You.com, keyless Keenable, Ceramic, DeepSeek, Linkup, a 9router gateway, self-hosted SearXNG, explicit-only degoog, keyless DuckDuckGo, Exa, Perplexity AI, Gemini, or Kimi. The default `none` workflow makes no summary-generation model call and opens no curator/browser: it returns bounded raw results, identifies the provider used for each query, and stores the full results for retrieval by responseId. The selected search provider may itself be model-backed.
169
195
 
170
196
  ```typescript
171
197
  web_search({ query: "rust async programming" })
@@ -173,9 +199,11 @@ web_search({ queries: ["query 1", "query 2"] })
173
199
  web_search({ query: "latest news", numResults: 10, recencyFilter: "week" })
174
200
  web_search({ query: "...", domainFilter: ["github.com"] })
175
201
  web_search({ query: "...", provider: "openai" })
202
+ web_search({ query: "...", provider: "openai", model: "gpt-6-luna" })
176
203
  web_search({ query: "...", provider: "kimi" })
177
204
  web_search({ query: "...", provider: "mistral" })
178
205
  web_search({ query: "...", provider: "all" })
206
+ web_search({ query: "...", provider: "brave,exa" })
179
207
  web_search({ query: "...", includeContent: true })
180
208
  web_search({ queries: ["query 1", "query 2"], workflow: "none" })
181
209
  web_search({ queries: ["query 1", "query 2"], workflow: "summary-review" })
@@ -188,10 +216,12 @@ web_search({ queries: ["query 1", "query 2"], workflow: "auto-summary" })
188
216
  | `numResults` | Results per query (default: 5, max: 20) |
189
217
  | `recencyFilter` | `day`, `week`, `month`, or `year` |
190
218
  | `domainFilter` | Limit to domains (prefix with `-` to exclude) |
191
- | `category` | Exa only: restrict results to a category such as `news` or `research paper`; other providers ignore it. Without an API key, if Exa's filtered search is unavailable, the category is added to the query instead |
192
- | `provider` | Configured provider when omitted or set to `auto`; `all` searches every eligible provider except Parallel MCP, degoog, DuckDuckGo, Kimi, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Baizhi, Z.ai, Keenable, Ceramic, DeepSeek, and Linkup simultaneously; otherwise `openai`, `brave`, `parallel`, `parallel-mcp`, `tinyfish`, `search1api`, `searchinfinity`, `querit`, `tavily`, `you`, `firecrawl`, `jina`, `serpdive`, `kagi`, `bocha`, `ollama`, `anysearch`, `xcrawl`, `valyu`, `xai`, `mistral`, `brightdata`, `serpbase`, `serpapi`, `serper`, `serply`, `baizhi`, `zai`, `keenable`, `ceramic`, `deepseek`, `linkup`, `searxng`, `degoog`, `duckduckgo`, `exa`, `perplexity`, `gemini`, or `kimi` (auto-selects when no provider or routing is configured; Parallel MCP, degoog, DuckDuckGo, Kimi, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Baizhi, Z.ai, Keenable, Ceramic, DeepSeek, and Linkup are explicit-only) |
219
+ | `category` | Exa only: restrict results to a category such as `publication` (research papers), `news`, or `company`; other providers ignore it. Each Exa source lists its published date and authors when Exa returns them, and `publication` results also list the citation count and DOI. Without an API key, if Exa's filtered search is unavailable, the category is added to the query instead |
220
+ | `provider` | Omit it or pass `"auto"` to use the configured provider (auto-selects when no provider or routing is configured). `"all"` searches every eligible provider at once; [All providers](#all-providers) lists the explicit-only providers it skips. Otherwise one name (`openai`, `brave`, `parallel`, `parallel-mcp`, `tinyfish`, `search1api`, `searchinfinity`, `querit`, `tavily`, `you`, `firecrawl`, `jina`, `serpdive`, `kagi`, `bocha`, `ollama`, `anysearch`, `xcrawl`, `valyu`, `xai`, `mistral`, `brightdata`, `serpbase`, `serpapi`, `serper`, `serply`, `baizhi`, `zai`, `keenable`, `ceramic`, `deepseek`, `linkup`, `ninerouter`, `searxng`, `degoog`, `duckduckgo`, `exa`, `perplexity`, `gemini`, or `kimi`), or several comma-separated names such as `"brave,exa"` to search them at once. An unknown name fails before any request with an error that lists the valid names |
193
221
  | `includeContent` | Fetch full page content from sources in background |
222
+ | `model` | Model ID for this call only, used instead of `openaiSearchModel`, `xaiSearchModel`, `mistralSearchModel`, or Gemini's `searchModel`. Requires `provider` set to exactly one of `openai`, `xai`, `mistral`, or `gemini`. A failure is reported as an error rather than retried with another model or provider, and Gemini uses only its API, never browser cookies. Listed only when `webSearch.allowedProviders` allows one of those providers; not available with `workflow: "summary-review"` or over MCP |
194
223
  | `workflow` | `none` (skip curator; fresh-install default), `summary-review` (open curator and auto-generate a summary draft), or `auto-summary` (generate a summary without opening the curator) |
224
+ | `proxy` | http(s) or socks proxy URL for every request in this call; `""` forces a direct connection. `HTTP(S)_PROXY` env vars are ignored. See [Proxy](#proxy-proxy) |
195
225
 
196
226
  Batch searches run up to three queries concurrently. Provider routing and fallback within each query remain sequential. Brave requests share an in-process queue and honor the rate-limit buckets returned in `X-RateLimit-*`; exhausted short windows delay the next request with a small safety margin, while long quota resets fail fast and keep the advertised cooldown active for later queued calls. HTTP 429 responses are retried once after the advertised `Retry-After` or rate-limit reset. Brave's 30-second search deadline covers queueing, cooldown waits, and both request attempts. The queue coordinates one Pi process; separate Pi processes still rely on Brave's 429 response.
197
227
 
@@ -209,6 +239,7 @@ fetch_content({ url: "/path/to/recording.mp4", prompt: "What error appears on sc
209
239
  fetch_content({ url: "https://youtube.com/watch?v=abc", timestamp: "23:41-25:00", frames: 4 })
210
240
  fetch_content({ url: "https://example.com/api", mode: "raw" })
211
241
  fetch_content({ url: "https://example.com/guide", mode: "answer", prompt: "What are the installation steps?" })
242
+ fetch_content({ url: "https://example.com/pricing", mode: "extract", fields: { pro_monthly: "number: Pro plan monthly price", trial_days: "integer" } })
212
243
  fetch_content({ url: "https://example.com/account", auth: "work", mode: "raw" })
213
244
  fetch_content({ url: "https://example.com/diagram.png" })
214
245
  ```
@@ -217,14 +248,21 @@ fetch_content({ url: "https://example.com/diagram.png" })
217
248
  | ----------- | ------------- |
218
249
  | `url` / `urls` | Single URL/path or multiple URLs |
219
250
  | `prompt` | Question for video analysis, or the page-local question required by `mode: "answer"` |
220
- | `mode` | `readable` (default), `raw` for exact textual HTTP bodies, or `answer` for a grounded answer from fetched content |
251
+ | `mode` | `readable` (default), `raw` for exact textual HTTP bodies, `answer` for a grounded answer from fetched content, or `extract` for typed values (off unless `fetch.allowedModes` lists it) |
252
+ | `fields` | For `mode: "extract"`: field name → `"type"` or `"type: what to find"`, such as `"date: release date of the latest stable version"` |
221
253
  | `answerModel` | Optional `provider/model-id` override for answer mode; defaults to the configured `fetch.answerProvider` + `fetch.answerModel` pair, or the current enabled Pi model when no pair is configured |
222
- | `timestamp` | Extract frame(s) — single (`"23:41"`), range (`"23:41-25:00"`), or seconds (`"85"`) |
223
- | `frames` | Number of frames to extract (max 12) |
254
+ | `timestamp` | Extract frame(s): single (`"1:23:45"`, `"23:41"`, or seconds `"85"`) or range (`"23:41-25:00"`, 6 evenly spaced frames by default; useful when you only know roughly where something happens). Needs `ffmpeg`, plus `yt-dlp` for YouTube |
255
+ | `frames` | Number of frames (1-12): spread across a `timestamp` range, 5 seconds apart from a single `timestamp`, or across the whole video when used alone |
256
+ | `model` | Gemini model for video and YouTube analysis (default: config, else `gemini-3.6-flash`) |
224
257
  | `forceClone` | Clone GitHub repos that exceed the 350MB size threshold |
258
+ | `auth` | `authFetch` profile name for local browser-cookie fetching, or `true` when exactly one profile exists. See [Blocked pages](#blocked-pages) |
259
+ | `proxy` | Proxy URL for this fetch; `""` forces a direct connection. See [Proxy](#proxy-proxy) |
260
+ | `redirects` | `"same-origin"` refuses redirects that change the scheme, hostname, or port. See `fetchContent.redirects` |
225
261
 
226
262
  For a standing answer-mode model, set both `fetch.answerProvider` and `fetch.answerModel` in `web-search.json`; a per-call `answerModel` takes precedence. Configured answer defaults are opt-in and can send fetched page text to a different provider/model, which may change privacy and cost behavior.
227
263
 
264
+ Extract mode reads named values off each page with Cloudflare's Clairic model, on your own Cloudflare account: add `"extract"` to `fetch.allowedModes` and set up Pi's `cloudflare-workers-ai` provider (`CLOUDFLARE_API_KEY` and `CLOUDFLARE_ACCOUNT_ID`, or Pi's `/login`). Each field comes back as a typed value, an uncertain guess, or not on the page. The page text is sent to Cloudflare, including a private GitHub repository your `gh` login can read; `auth` is refused. Pi only. [docs/field-extract.md](docs/field-extract.md) covers AI Gateway routing, field types, limits, and measurements.
265
+
228
266
  Thanks to [@linuxtextadventurer](https://github.com/linuxtextadventurer) for PR #328.
229
267
 
230
268
  ### get_search_content
@@ -240,11 +278,14 @@ get_search_content({ responseId: "abc123", urlIndex: 0, findText: "installation"
240
278
  get_search_content({ responseId: "abc123", urlIndex: 0, findText: ["timeout", "retry"], findMode: "fuzzy" })
241
279
  ```
242
280
 
281
+ Pass the `responseId` from a `web_search`, `fetch_content`, or `source_check` result.
282
+ Choose the stored item with `query` or `queryIndex` for a search, or `url` or `urlIndex` for a fetched page. `offset` (default 0) and `limit` page through it.
283
+
243
284
  `findMode` supports `exact`, `case-insensitive` (default), and `fuzzy`. Finder output is capped at 20,000 characters with match counts and nearby context. Fitting responses retain their existing format and document order. Overflow responses identify queries as `Q1`, `Q2`, and so on, list each full query once, and reserve a representative excerpt for each query whose discovered match span fits the output budget. Queries with oversized spans are listed as having no representative excerpt. `findText` cannot be combined with `offset` or `limit`. The default `limit` and maximum permitted `limit` use `maxInlineContentChars`; search-page continuation guidance shares that overall output budget and may reduce the returned stored-content characters.
244
285
 
245
286
  ### source_check
246
287
 
247
- Gather evidence for a claim and return a machine-readable artifact with exact passage citations for manual semantic review. Search results are deduplicated and capped at 20 sources; `fetchContent` fetches at most 5 pages, while stored and retrieved content remains subject to the configured `maxInlineContentChars` `offset`/`limit` bounds.
288
+ Gather evidence for a claim and return a machine-readable artifact with exact passage citations for manual semantic review. Search results are deduplicated and capped at 20 sources; `fetchContent` fetches at most 5 pages, while stored and retrieved content remains subject to the configured `maxInlineContentChars` `offset`/`limit` bounds. The result lists each source's passages under it, so the agent can weigh the claim without another call: up to 4,000 characters in all, each passage cut at 400, with the rest in the artifact. Passages from fetched pages are the sentences that share the most words with the claim, then with the search snippet; short acronyms and numbers such as `API`, `TLS` or `429` count when the page writes them the same way.
248
289
 
249
290
  ```typescript
250
291
  source_check({ claim: "The API supports streaming responses" })
@@ -256,12 +297,32 @@ source_check({
256
297
  })
257
298
  ```
258
299
 
259
- The artifact preserves the `supported`, `contradicted`, `unclear`, or `missing-evidence` claim status schema, source quality hints, SHA-256 content hashes, and passage IDs with exact source offsets. It does not infer semantic support or contradiction automatically: retrieved passages produce `unclear` for manual review, while no passages produce `missing-evidence`. Search and fetch errors remain in the artifact instead of being silently discarded. Artifacts are stored with the session and retrieved through `get_search_content` using the returned `responseId`; paged artifact responses are JSON slices, so request the next `offset` when needed.
300
+ | Parameter | Description |
301
+ | ----------- | ------------- |
302
+ | `claim` | The assertion to check |
303
+ | `queries` | Search queries to run (default: the claim; up to 8) |
304
+ | `numResults` | Results per query (default: 5, max: 20) |
305
+ | `fetchContent` | Fetch the top 5 pages so passages come with exact offsets in the page |
306
+ | `recencyFilter` | `day`, `week`, `month`, or `year` |
307
+ | `domainFilter` | Limit to domains (prefix with `-` to exclude) |
308
+ | `provider` | Same as `web_search`: `"auto"`, `"all"`, one name, or a list such as `"brave,exa"` |
309
+ | `proxy` | http(s) or socks proxy URL for every request in this call; `""` forces a direct connection. See [Proxy](#proxy-proxy) |
310
+
311
+ The artifact preserves the `supported`, `contradicted`, `unclear`, or `missing-evidence` claim status schema, source quality hints, SHA-256 content hashes, and passage IDs with exact source offsets. It does not judge the claim: retrieved passages produce `unclear` for manual review, while no passages produce `missing-evidence`. Search and fetch errors remain in the artifact instead of being silently discarded. Artifacts are stored with the session and retrieved through `get_search_content` using the returned `responseId`; paged artifact responses are JSON slices, so request the next `offset` when needed.
260
312
 
261
313
  ### In codemode scripts
262
314
 
263
315
  Scripts run by Pi's `codemode` tool (Pi 1.0 or later) get data instead of the text the model sees. `await tools.web_search(...)` resolves to `{ responseId, fetchId, queries }`, where each query has its `answer`, `error`, provider, and `results` (`title`, `url`, `snippet`). `await tools.fetch_content(...)` resolves to `{ responseId, urls }`, where each URL has its full `content`, not limited by `maxInlineContentChars`, and its `error`. Failed searches and fetches still resolve to this data, with the reason in `error`; invalid arguments reject. A script's `web_search` uses `workflow: "none"` unless it passes a workflow, so a configured curator does not open, and with `includeContent` it waits for the pages, readable through `fetchId`, instead of fetching them in the background. A script that passes `workflow: "summary-review"` gets the curator and the background fetch, as the model does.
264
316
 
317
+ With extract mode allowed, each fetched URL also has an `extraction`: `fields` maps each name to `{ status, value, confidence }` (`status` is `"extracted"`, `"uncertain"` with a `guess` instead of a `value`, or `"null"` for not on the page), or `error` says why extraction failed for that page. To search and read a value off the top results:
318
+
319
+ ```js
320
+ const search = await tools.web_search({ query: "Acme Pro plan price" });
321
+ const urls = search.queries[0].results.slice(0, 3).map((result) => result.url);
322
+ const page = await tools.fetch_content({ urls, mode: "extract", fields: { pro_monthly: "number: Pro plan price per month" } });
323
+ return page.urls.map(({ url, extraction }) => ({ url, price: extraction?.fields?.pro_monthly }));
324
+ ```
325
+
265
326
  ## Use from other agents (MCP)
266
327
 
267
328
  Other agents, such as Claude Code, Codex, Cursor, or Executor, can use `web_search`, `fetch_content`, `get_search_content`, and `source_check` through a local stdio MCP server. It needs Node.js 22.19 or later and no Pi install:
@@ -285,7 +346,7 @@ Add it to an `mcpServers` config (Claude Code, Cursor, and similar clients; Code
285
346
  ```
286
347
 
287
348
  - The server reads the same `web-search.json` and provider environment variables as the extension. It lists only the tools enabled there, under their default names; `toolNames` renames do not apply.
288
- - Pi-only features are not available: the curator and summaries (a configured `workflow` is ignored), Kimi search, OpenAI search through ChatGPT sign-in or the current Pi model, `fetch_content` answer mode and video prompts or frames, and direct image fetches. Explicit requests for them return a tool error rather than a fallback, and automatic provider selection only uses providers that work outside Pi.
349
+ - Pi-only features are not available: the curator and summaries (a configured `workflow` is ignored), Kimi search, OpenAI search through ChatGPT sign-in or the current Pi model, `fetch_content` answer and extract modes and video prompts or frames, and direct image fetches. Explicit requests for them return a tool error rather than a fallback, and automatic provider selection only uses providers that work outside Pi.
289
350
  - `includeContent` waits for the page fetch before `web_search` returns.
290
351
  - The server keeps the 50 most recent results in memory for `get_search_content`; they are gone when it exits. Restart the server to pick up config changes.
291
352
  - Install with npm's default settings or `--legacy-peer-deps`. `--omit=peer` leaves out `zod`, which the MCP SDK needs.
@@ -566,6 +627,7 @@ Config defaults to `~/.pi/agent/web-search.json` when neither `PI_CODING_AGENT_D
566
627
  "allowBrowserCookies": false,
567
628
  "searchModel": "gemini-3.6-flash",
568
629
  "summaryModel": "anthropic/claude-haiku-4-5",
630
+ "queryRewriteModel": "current",
569
631
  "summaryGenerationDeadlineMs": 30000,
570
632
  "summaryInstructions": "- Preserve concrete figures verbatim: prices, limits, versions, dates.\n- Name the product version each claim applies to.",
571
633
  "maxInlineContentChars": 30000,
@@ -622,11 +684,13 @@ Config defaults to `~/.pi/agent/web-search.json` when neither `PI_CODING_AGENT_D
622
684
 
623
685
  `webSearch.allowedProviders` is an optional, non-empty search-provider allowlist with no duplicate entries. When omitted, every current search provider remains permitted. When present, explicit scalar and array requests for providers outside the list fail before any provider request, while `auto`, `all`, configured routing, `source_check`, and Curator use only listed providers. The allowlist does not make explicit-only or paid providers eligible for automatic fallback or `all`; they must still be named explicitly or included in `searchRouting.providers`. A configured `provider`/`searchProvider` or `searchRouting.providers` entry outside the allowlist is rejected as invalid configuration. This setting affects search only: it does not restrict `fetchRouting`, fetch answer models, or summary models.
624
686
 
625
- `summaryModel` accepts an optional thinking-level suffix, such as `anthropic/claude-haiku-4-5:low`. Supported suffixes are `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`.
687
+ `summaryModel` accepts an optional thinking-level suffix, such as `anthropic/claude-haiku-4-5:low`. Supported suffixes are `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. `"current"` uses the model the Pi session is on when the search starts, such as a local model; add a suffix (`"current:low"`) to set a thinking level, since the session's own level is not copied. Pi `enabledModels` still applies. When `summaryModel` is set, no fallback model is tried, including for a model you pick in the curator: if the model is unavailable or fails, you get the deterministic summary with the reason it failed, not a summary from another provider. Unset, the built-in list of small models is tried in order. Any other value makes summary workflows fail with an error naming the config file.
688
+
689
+ `queryRewriteModel` picks the model for the curator's query rewrite and takes the same values as `summaryModel`. When set, only that model is used, and if it is unavailable or fails the rewrite shows an error. Unset, the rewrite tries `anthropic/claude-haiku-4-5`, then `google/gemini-3.6-flash`, then `openai/gpt-5-mini`.
626
690
 
627
691
  `summaryInstructions` appends custom text to the Requirements section of the summary prompt used by the curator UI and `auto-summary` mode (e.g. `"- Preserve concrete figures verbatim: prices, limits, versions, dates.\n- Name the product version each claim applies to."`). The text is passed verbatim to the summary model, so use one `- ` bullet per requirement. It is additive: the built-in guardrails (no invented sources, explicit weak/conflicting-evidence notes, the Sources section) always stay in place, and curator regeneration feedback is still appended afterwards. Missing, non-string, or blank values leave the default prompt unchanged.
628
692
 
629
- All provider API-key fields (`openaiApiKey`, `braveApiKey`, `parallelApiKey`, `tinyfishApiKey`, `search1apiApiKey`, `searchinfinityApiKey`, `queritApiKey`, `tavilyApiKey`, `youApiKey`, `jinaApiKey`, `serpdiveApiKey`, `kagiApiKey`, `bochaApiKey`, `ollamaApiKey`, `valyuApiKey`, `serpbaseApiKey`, `serpapiApiKey`, `serperApiKey`, `serplyApiKey`, `baizhiApiKey`, `zaiApiKey`, `keenableApiKey`, `ceramicApiKey`, `linkupApiKey`, `deepseekApiKey`, `degoogApiKey`, `anysearchApiKey`, `xcrawlApiKey`, `xaiApiKey`, `mistralApiKey`, `brightdataApiKey`, `firecrawlApiKey`, `crawl4aiApiToken`, `exaApiKey`, `perplexityApiKey`, `geminiApiKey`, `datalabApiKey`, and `cloudflareApiKey`) accept explicit credential sources. Use `$NAME` or `${NAME}` to read one named environment variable, or prefix a trusted local shell command with `!` to resolve one value at provider request time. Escape `$$` as a literal leading `$` and `$!` as a literal leading `!`:
693
+ All provider API-key fields (`openaiApiKey`, `braveApiKey`, `parallelApiKey`, `tinyfishApiKey`, `search1apiApiKey`, `searchinfinityApiKey`, `queritApiKey`, `tavilyApiKey`, `youApiKey`, `jinaApiKey`, `serpdiveApiKey`, `kagiApiKey`, `bochaApiKey`, `ollamaApiKey`, `valyuApiKey`, `serpbaseApiKey`, `serpapiApiKey`, `serperApiKey`, `serplyApiKey`, `baizhiApiKey`, `zaiApiKey`, `keenableApiKey`, `ceramicApiKey`, `linkupApiKey`, `ninerouterApiKey`, `deepseekApiKey`, `degoogApiKey`, `anysearchApiKey`, `xcrawlApiKey`, `xaiApiKey`, `mistralApiKey`, `brightdataApiKey`, `firecrawlApiKey`, `crawl4aiApiToken`, `exaApiKey`, `perplexityApiKey`, `geminiApiKey`, `datalabApiKey`, and `cloudflareApiKey`) accept explicit credential sources. Use `$NAME` or `${NAME}` to read one named environment variable, or prefix a trusted local shell command with `!` to resolve one value at provider request time. Escape `$$` as a literal leading `$` and `$!` as a literal leading `!`:
630
694
 
631
695
  ```json
632
696
  {
@@ -637,7 +701,7 @@ All provider API-key fields (`openaiApiKey`, `braveApiKey`, `parallelApiKey`, `t
637
701
  }
638
702
  ```
639
703
 
640
- This syntax applies to provider credentials only; other configuration fields are not interpolated. `firecrawlApiKey`, `crawl4aiApiToken`, `kagiApiKey`, `ollamaApiKey`, `valyuApiKey`, `serpbaseApiKey`, `serpapiApiKey`, `serperApiKey`, `serplyApiKey`, `baizhiApiKey`, `zaiApiKey`, `keenableApiKey`, `ceramicApiKey`, `linkupApiKey`, `deepseekApiKey`, `degoogApiKey`, `mistralApiKey`, and `brightdataApiKey` use the same credential-source rules, while API base URLs, `firecrawlApiVersion`, `firecrawlFreshScrape`, `firecrawlPdfMaxPages`, `crawl4aiBaseUrl`, `degoogBaseUrl`, `degoogEngines`, `brightdataSerpZone`, `brightdataUnlockerZone`, and `zaiEndpoint` are literal config values.
704
+ This syntax applies to provider credentials only; other configuration fields are not interpolated. `firecrawlApiKey`, `crawl4aiApiToken`, `kagiApiKey`, `ollamaApiKey`, `valyuApiKey`, `serpbaseApiKey`, `serpapiApiKey`, `serperApiKey`, `serplyApiKey`, `baizhiApiKey`, `zaiApiKey`, `keenableApiKey`, `ceramicApiKey`, `linkupApiKey`, `ninerouterApiKey`, `deepseekApiKey`, `degoogApiKey`, `mistralApiKey`, and `brightdataApiKey` use the same credential-source rules, while API base URLs, `firecrawlApiVersion`, `firecrawlFreshScrape`, `firecrawlPdfMaxPages`, `crawl4aiBaseUrl`, `degoogBaseUrl`, `degoogEngines`, `brightdataSerpZone`, `brightdataUnlockerZone`, and `zaiEndpoint` are literal config values.
641
705
 
642
706
  A command source is not run while the extension loads or registers tools. Each selected provider request runs it again with a five-second timeout, a 16 KiB output limit, a minimized environment, and a one-line non-empty stdout requirement. Command text and stderr are omitted from errors. On Windows the command runs in Git Bash (or `bash.exe` on `PATH`), like Pi's own `!command` config values, so POSIX syntax such as `$HOME` works; it falls back to `cmd.exe` when no bash is found. These commands are trusted local configuration, not a same-user process isolation boundary; use absolute executable paths and protect the config file. `OP_SESSION_*` and `OP_SERVICE_ACCOUNT_TOKEN`, when present in Pi's environment, are forwarded to trusted resolver commands so 1Password CLI sessions and service accounts can be reused without storing their credentials in config. For example, `"braveApiKey": "!/absolute/path/to/op read 'op://Automation/Brave/credential'"` resolves that item after you replace the executable placeholder with your trusted installation's absolute path, but the `op://` argument is not an authorization boundary: every configured resolver command that receives the token can exercise all vault and item permissions granted to its service account. Prefer a narrowly scoped service account. An explicit source overrides legacy provider environment variables and fails that provider locally rather than falling back with a stale credential. Direct Google Gemini API requests send the resolved key only in the `x-goog-api-key` header, never in the URL.
643
707
 
@@ -677,6 +741,8 @@ These providers accept an API base URL for compatible gateways. Environment vari
677
741
 
678
742
  Defaults remain the providers' official API roots. Overrides require HTTPS, except HTTP is allowed on loopback hosts (`localhost`, `127.0.0.0/8`, and `::1`). URLs with credentials, query parameters, or fragments are rejected before a request is sent; invalid overrides never fall back to an official endpoint. Cross-origin redirects remove credential headers and the `api_key` query parameter used by SerpApi and SerpBase. `exaBaseUrl` applies only to keyed direct API calls; zero-config Exa MCP search continues to use Exa's hosted MCP endpoint. `parallelBaseUrl` does not change the separate Parallel MCP provider.
679
743
 
744
+ To use a plain-HTTP gateway on another host, such as a Kubernetes Service (`"braveBaseUrl": "http://search-gateway:8080/brave/res/v1"`), set `"allowHttpBaseUrls": true` in `web-search.json` or `PI_WEB_ACCESS_ALLOW_HTTP_BASE_URLS=true`. The environment variable wins over config and accepts `true`, `false`, `1`, or `0`; any other value, or a non-boolean config value, is a configuration error. The switch defaults to `false` and lets every base URL above use `http://`. **HTTP sends API keys and request data in plaintext**, so enable it only for gateways on a trusted network. All the other checks above still apply.
745
+
680
746
  These settings change API destinations, not provider protocols, credentials, pricing options, or activation. Search and extraction use the same root where listed. Existing SSRF and target-domain checks still apply to extraction; in particular, Kagi, Ollama, and Bright Data Web Unlocker gateway addresses remain subject to their API transport's SSRF checks. For a loopback gateway on those extraction transports, use a literal address (`http://127.0.0.1:8080` or `http://[::1]:8080`) and add its matching range (`127.0.0.1/32` or `::1/128`) to `ssrf.allowRanges`. These transports reject `localhost` even when allowed ranges are configured.
681
747
 
682
748
  Existing Responses endpoint settings (`openaiResponsesUrl`, `xaiResponsesUrl`), Gemini API routing, and self-hosted providers keep their current semantics. No new overrides are added for TinyFish's two-origin API, Kimi Code sign-in, hosted MCP transports, browser-backed search, or the keyless Jina Reader. `jinaSearchBaseUrl` affects only authenticated Jina search, not Reader requests.
@@ -693,7 +759,7 @@ Existing Responses endpoint settings (`openaiResponsesUrl`, `xaiResponsesUrl`),
693
759
 
694
760
  `fetch.timeout` is an optional positive finite number of seconds for direct HTTP fetches and the Jina Reader fallback. When omitted, both use a 30-second budget. Fractional values are supported and rounded up to at least 1 millisecond; values that cannot be converted to a finite safe integer delay from 1 through Node's 2,147,483,647 ms timer maximum are rejected. An invalid declared value fails closed with an error naming `web-search.json`. An internal/per-call `timeoutMs` override takes precedence over this setting. Other remote extraction fallbacks keep their own documented budgets.
695
761
 
696
- `fetch.defaultMode` sets the mode used when `fetch_content` omits `mode`, and `fetch.allowedModes` controls which modes the tool exposes and accepts. Valid modes are `readable`, `raw`, and `answer`. By default, the default mode is `readable` and all three modes are allowed. The default must be included in the non-empty, duplicate-free allowed list. An explicitly requested disabled mode fails before fetching or invoking a model and is never replaced with another mode. Raw mode remains direct HTTP-only and never runs readability, specialized source handling, or hosted extraction fallbacks.
762
+ `fetch.defaultMode` sets the mode used when `fetch_content` omits `mode`, and `fetch.allowedModes` controls which modes the tool exposes and accepts. Valid modes are `readable`, `raw`, `answer`, and `extract`. By default, the default mode is `readable` and `readable`, `raw`, and `answer` are allowed; `extract` is allowed only when listed and cannot be the default. The default must be included in the non-empty, duplicate-free allowed list. An explicitly requested disabled mode fails before fetching or invoking a model and is never replaced with another mode. Raw mode remains direct HTTP-only and never runs readability, specialized source handling, or hosted extraction fallbacks.
697
763
 
698
764
  `fetch.answerProvider` and `fetch.answerModel` are an optional pair that selects the model used by `fetch_content` answer mode when no per-call `answerModel` is supplied. Both values must be non-empty strings and must identify an enabled text-capable model available in Pi's model registry; invalid or partial configuration fails closed. This is opt-in: answering with the configured provider/model can send fetched page text outside the current session and may incur that provider's costs. A per-call `answerModel` override is resolved first and remains usable even when these configured defaults are malformed.
699
765
 
@@ -701,7 +767,7 @@ Set `searxngBaseUrl` or `SEARXNG_BASE_URL` to use a self-hosted SearXNG JSON API
701
767
 
702
768
  **degoog.** Set `degoogBaseUrl` or `DEGOOG_URL` to use a self-hosted [degoog](https://degoog.org) metasearch instance, or omit both to use the public `https://degoog.org` instance. degoog is keyless and explicit-only: select it with `provider: "degoog"` or place it in `searchRouting`; it is never chosen by `auto` and never participates in `provider: "all"`, so queries do not leave for a third-party metasearch instance unless you ask. When the instance protects its search routes, set `degoogApiKey` or `DEGOOG_API_KEY` and the key is sent as `Authorization: Bearer <key>`; the API key and any `degoogHeaders` are stripped from cross-origin redirects. `degoogEngines` restricts the request to specific engine ids from the instance's engine list (an array of strings), which is sent as the `engines` field on `POST /api/search`; omitting it uses the instance defaults. `recencyFilter` maps to degoog's `time` parameter, and domain filters become `site:`/`-site:` query clauses plus a local result filter; multiple allowed domains are grouped as `(site:a OR site:b)` so the query terms apply to every branch. Only absolute HTTP(S) result URLs are returned as sources, and duplicate URLs are collapsed. A 200 response without a results array is reported as an invalid response, so a configured route can continue when `fallbackOn` includes `"invalid-response"`, while a genuine empty `results` array remains a successful empty search. The configured base URL and redirects remain subject to the SSRF guard; add only the narrowest self-hosted range to `ssrf.allowRanges` when it resolves to a private or synthetic range. Optional `degoogHeaders` merges extra HTTP headers (string values only; invalid header names are ignored) for reverse-proxy or Zero Trust auth. Values from `degoogApiKey` and the configured `degoogHeaders` are redacted from reported upstream error text, and a request that exceeds the 30-second deadline fails as a timeout instead of being recorded as a completed request.
703
769
 
704
- **DuckDuckGo.** DuckDuckGo HTML search is keyless and explicit-only. Select it with `provider: "duckduckgo"` or place it in `searchRouting`; it is never chosen by `auto` and never participates in `provider: "all"`. Domain filters are enforced locally after DuckDuckGo redirect URLs are decoded. `recencyFilter` is not guaranteed because the HTML endpoint has no documented stable time parameter. A page that is neither results nor DuckDuckGo's "no results" page is reported as an invalid response, so routing can continue when `fallbackOn` includes `"invalid-response"`; DuckDuckGo's bot check is reported as `quota`.
770
+ **DuckDuckGo.** DuckDuckGo HTML search is keyless and explicit-only. Select it with `provider: "duckduckgo"` or place it in `searchRouting`; it is never chosen by `auto` and never participates in `provider: "all"`. Domain filters are enforced locally after DuckDuckGo redirect URLs are decoded. `recencyFilter` is not guaranteed because the HTML endpoint has no documented stable time parameter. A page that is neither results nor DuckDuckGo's "no results" page is reported as an invalid response, so routing can continue when `fallbackOn` includes `"invalid-response"`; DuckDuckGo's bot check is reported as `quota`. Bursts of searches trigger that bot check for the whole IP address, browsers included, for 10 to 15 minutes or longer, so DuckDuckGo searches in one process run one at a time, at least 2 seconds apart. After a bot check the provider stops sending requests for 5 minutes, doubling up to 1 hour while the check is still there, and fails at once with `quota` during that pause. Each search has 30 seconds from the moment it is queued; running out of time is a `network` error, not an abort. Separate Pi processes, such as parallel subagents, do not share this state.
705
771
 
706
772
  Set `firecrawlBaseUrl` or `FIRECRAWL_BASE_URL` to use Firecrawl for `web_search` and as an extraction fallback for `fetch_content`. Search calls `/v2/search` by default, requests `sources: ["web"]`, maps `numResults` to `limit`, maps `recencyFilter` to Firecrawl's `tbs`, and maps domain filters to `includeDomains` or `excludeDomains` when possible. With `includeContent: true`, Firecrawl search adds Markdown scrape options and returns successful result Markdown as inline content. Fetch extraction calls `/v2/scrape` by default. Set `firecrawlApiVersion` or `FIRECRAWL_API_VERSION` to `v1` for older self-hosted images. Firecrawl bills PDFs per parsed page; set `firecrawlPdfMaxPages` to a positive integer to have Firecrawl parse at most that many pages of each PDF in fetch extraction and `includeContent` search. It is a per-document cap, not a credit budget: several PDFs or repeated requests still add up. Unset keeps the current behavior, and API `v1` does not support the cap, so setting it with `v1` is a config error. When Firecrawl reports fewer parsed pages than the PDF has, the content ends with a truncation notice naming both page counts. Firecrawl page scraping is cache-only by default (`lockdown: true`), so the Firecrawl server does not make fresh outbound target requests unless you explicitly set `firecrawlFreshScrape: true` or `FIRECRAWL_FRESH_SCRAPE=1`. Enable fresh scraping only for a Firecrawl deployment whose own egress, redirects, DNS rebinding behavior, and internal-network access are isolated or allowlisted; this extension can preflight submitted fetch URLs but cannot control network requests made by the Firecrawl server. A configured Firecrawl API base URL may use `localhost`, `127.0.0.0/8`, or `::1` without adding those loopback ranges to global `ssrf.allowRanges`; that exception is only for Firecrawl API calls, not submitted fetch/search target URLs. The configured Firecrawl API base URL and redirects are otherwise still validated by the same SSRF guard as other remote requests, and Firecrawl credentials are stripped from cross-origin API redirects.
707
773
 
@@ -745,7 +811,13 @@ The Baizhi input contract is based on the [published September 16 discovery snap
745
811
 
746
812
  **Parallel MCP.** Select `provider: "parallel-mcp"` to use Parallel Search MCP without an API key, or add it to `searchRouting`. It is explicit-only and is never chosen by `auto` or `provider: "all"`; the existing `parallel` provider remains the key-required REST API. A configured `parallelApiKey` or `PARALLEL_API_KEY` is sent as an optional Bearer token for higher MCP limits. To use MCP `web_fetch`, add `parallel-mcp` to `fetchRouting.providers` and set `fetchRouting.allowRemoteHostedProviders` to `true`; it is not part of the default fetch route.
747
813
 
748
- Without an explicit `$` or `!` source, `OPENAI_API_KEY`, `BRAVE_API_KEY`, `PARALLEL_API_KEY`, `TINYFISH_API_KEY`, `SEARCH1API_KEY`, `SEARCHINFINITY_API_KEY`, `QUERIT_API_KEY`, `TAVILY_API_KEY`, `YDC_API_KEY`, `JINA_API_KEY`, `SERPDIVE_API_KEY`, `KAGI_API_KEY`, `BOCHA_API_KEY`, `OLLAMA_API_KEY`, `SERPBASE_API_KEY`, `SERPAPI_KEY`, `SERPER_API_KEY`, `SERPLY_API_KEY`, `BAIZHI_API_KEY`, `ZAI_API_KEY`, `KEENABLE_API_KEY`, `CERAMIC_API_KEY`, `DEEPSEEK_API_KEY`, `LINKUP_API_KEY`, `ANYSEARCH_API_KEY`, `XCRAWL_API_KEY`, `VALYU_API_KEY`, `XAI_API_KEY`, `MISTRAL_API_KEY`, `BRIGHTDATA_API_KEY`, `FIRECRAWL_API_KEY`, `CRAWL4AI_API_TOKEN`, `DEGOOG_API_KEY`, `EXA_API_KEY`, `GEMINI_API_KEY`, `DATALAB_API_KEY`, `DATALAB_PROCESSING_LOCATION`, `DATALAB_MODE`, `DATALAB_API_BASE`, `PERPLEXITY_API_KEY`, `GOOGLE_GEMINI_BASE_URL`, and `CLOUDFLARE_API_KEY` env vars retain their existing precedence over literal config file values. `openaiResponsesUrl` can point OpenAI `web_search` and `source_check` at a third-party gateway that supports the OpenAI Responses API and web search tool; it is an explicit endpoint override, not derived from Pi model provider settings, and defaults to `https://api.openai.com/v1/responses`. `openaiSearchModel` pins the model id used for OpenAI `web_search`, bypassing automatic selection (newest Luna model, then newest bare `gpt-N` or `gpt-N.N` id, then newest other `gpt-<version>` id; `gpt-6-luna` when only an API key is configured); the id is sent verbatim with whichever OpenAI auth resolves, so gateway-only model ids work too. `xaiSearchModel` similarly pins the xAI search model. `openaiSearchProviders` sets which Pi model providers OpenAI `web_search` resolves login credentials from, in priority order; it defaults to `["openai-codex", "openai"]`, entries that are not registered or not signed in are skipped, and an empty array skips Pi credentials entirely so the `openaiApiKey` / `OPENAI_API_KEY` fallback applies. Useful for choosing between multiple Codex accounts (for example a second account registered by an extension) or forcing API-key billing while signed into Codex. Configured Exa API keys use Exa's own account limits directly; any legacy local `exa-usage.json` file is ignored. `GOOGLE_GEMINI_BASE_URL` overrides the Gemini API host for Gemini generate-content calls such as search, URL context, YouTube, and local video analysis. Set it to a bare host with no trailing slash and no version segment, for example `https://my-gateway.example.com/gemini`; `geminiBaseUrl` is the config-file equivalent. When the configured host contains `gateway.ai.cloudflare.com`, authentication uses `cf-aig-authorization: Bearer <token>` from `CLOUDFLARE_API_KEY` or `cloudflareApiKey`, and `GEMINI_API_KEY` is not required for generate-content calls. Alternatively, set `geminiAuth` to `"adc"` to authenticate Gemini generate-content calls with Google Application Default Credentials (ADC) instead of an API key; calls go to the Vertex AI endpoint (`aiplatform.googleapis.com`) with an OAuth bearer token minted from the ADC file (`GOOGLE_APPLICATION_CREDENTIALS` or `~/.config/gcloud/application_default_credentials.json`, i.e. `gcloud auth application-default login`) or, on Compute Engine, from the metadata server. `geminiProject`/`geminiLocation` set the Vertex project and location and fall back to the `GOOGLE_CLOUD_PROJECT`/`GOOGLE_CLOUD_LOCATION` (or `GCLOUD_PROJECT`) env vars; project and location are required. ADC supports `authorized_user` (OAuth refresh token) and `service_account` (JWT assertion) credential files, and when neither `GOOGLE_APPLICATION_CREDENTIALS` nor `~/.config/gcloud/application_default_credentials.json` exists and Pi runs on Google Compute Engine, ADC uses the attached service account token from the GCE metadata server (`GCE_METADATA_HOST` overrides the host; `METADATA_SERVER_DETECTION=none` disables it); tokens are cached and refreshed from expiry. ADC mode covers search, URL context, and PDF/inline-data extraction; YouTube and local video analysis still go through the Gemini Files API, so they fall back to Gemini Web unless a `GEMINI_API_KEY` is also configured. The access token is treated as a credential and is redacted from errors. Local video file upload still uses Google's Files API directly, so gateway-only video extraction falls back to Gemini Web unless a `GEMINI_API_KEY` is also configured. `provider` or `searchProvider` sets the default search provider and is used when a tool call omits `provider` or sends `"auto"`: `"all"`, `"openai"`, `"brave"`, `"parallel"`, `"parallel-mcp"`, `"tinyfish"`, `"search1api"`, `"searchinfinity"`, `"querit"`, `"tavily"`, `"firecrawl"`, `"jina"`, `"serpdive"`, `"kagi"`, `"bocha"`, `"ollama"`, `"anysearch"`, `"xcrawl"`, `"valyu"`, `"xai"`, `"mistral"`, `"brightdata"`, `"serpbase"`, `"serpapi"`, `"serper"`, `"serply"`, `"you"`, `"baizhi"`, `"zai"`, `"keenable"`, `"ceramic"`, `"deepseek"`, `"searxng"`, `"degoog"`, `"exa"`, `"perplexity"`, or `"gemini"`. Parallel MCP, degoog, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Baizhi, Z.ai, Keenable, Ceramic, DeepSeek, and Linkup are never selected by `auto`; choose them explicitly or place them in `searchRouting`. If either single-provider field is configured, it takes precedence over `searchRouting`. Otherwise, `searchRouting` can opt into an ordered `providers` list and an explicit `fallbackOn` list containing `"transient"`, `"quota"`, `"network"`, and/or `"invalid-response"`; only those typed failures continue to the next available candidate. `"all"` is not valid inside `searchRouting.providers`, because that list defines sequential fallback rather than multi-provider aggregation. Named providers remain strict, and exhausted routes return per-provider diagnostics. `provider` can also be a non-empty array of named providers such as `["brave", "exa"]`; those providers run concurrently using the same aggregation path as `"all"`, while `"auto"` and `"all"` are invalid inside arrays. When every provider in a default array fails and each failure is a `fallbackOn` type, the search continues through the `searchRouting` providers the array did not try; an array passed in a tool call stays strict. Random, weighted, sticky, and cooldown routing are not enabled. This is also updated automatically when you change the provider in the curator UI. Set `webSearch.enabled` to `false` to unregister the configured search and source-check tools while leaving fetch/content tools available. `toolNames` can opt into alternate public tool names for environments where another extension or model reserves the defaults, without changing behavior: `webSearch`, `sourceCheck`, `fetchContent`, and `getSearchContent` default to `web_search`, `source_check`, `fetch_content`, and `get_search_content`. `workflow` sets the default search workflow: `"none"` (default; raw results, no curator), `"summary-review"` (opens curator with an auto-generated summary draft), or `"auto-summary"` (returns a model-generated summary without opening the browser curator). Overridden per-call via the `workflow` parameter on the configured search tool, or toggled at runtime with `/curator`. `browserCookies.profile` pins Gemini Web cookie lookup to a specific Chromium profile. When omitted, detected Chromium profiles are scanned in stable order and the first profile containing the required Gemini cookies is used. macOS discovery supports Helium, Chrome, Brave, and Arc; Linux discovery supports Chromium and Chrome. `allowBrowserCookies` enables Chromium cookie extraction for Gemini Web; it defaults to `false` to avoid browser data access and surprise macOS Keychain prompts. You can also set `PI_ALLOW_BROWSER_COOKIES=1`. Cookie databases are copied to a temporary read-only working copy; the reader uses `node:sqlite` when available and otherwise tries the `sqlite3` CLI or Python's standard-library SQLite module. `searchModel` overrides the Gemini API model used by the configured search tool without changing URL, YouTube, or video extraction defaults. Gemini API grounded search uses `gemini-3.6-flash` by default; set `searchModel` to choose another model. Gemini Web browser-cookie fallback uses its separate `gemini-3.1-pro` default because Gemini Web relies on private header values; explicitly configured unsupported Web models fail instead of silently falling back to 2.5 Flash. `summaryModel` sets the default model used for generating summary drafts in the curator UI and `auto-summary` mode (e.g. `"anthropic/claude-haiku-4-5"`, `"openai-codex/gpt-5.3-codex-spark"`, or `"openrouter/nvidia/nemotron-3-super-120b-a12b:free"`). Preferred summary and query-rewrite models also resolve through routed provider registrations such as OpenRouter when the native provider is unavailable. When Pi `enabledModels` is configured, summaries are limited to that allowlist; if no enabled summary model is available, the tool returns a deterministic summary instead of calling an unrelated model. `summaryGenerationDeadlineMs` sets the maximum time for one summary model attempt in the curator UI and `auto-summary` mode. It defaults to `30000`, must be a positive integer, and is capped at `600000`. `maxInlineContentChars` sets the direct `fetch_content` content slice and the default and maximum `get_search_content` slice. It defaults to `30000`, must be a positive integer, and is capped at `200000`; full fetched content remains stored for later retrieval. `curatorTimeoutSeconds` controls the initial curator idle timeout (default `20`, max `600`); users can still adjust the timer in the curator UI. `ssrf.allowRanges` lists CIDR ranges (e.g. `"198.18.0.0/15"`, `"fd00::/8"`) exempted from the SSRF guard that otherwise blocks private/reserved IP ranges. This unblocks `fetch_content`/`web_search` on hosts whose network proxy runs in TUN + fake-IP mode (Surge, Clash, Mihomo, Stash, ...), where public domains resolve into a synthetic reserved range. It is **off by default** — the guard stays fully enabled unless you list ranges here. Use the narrowest range that covers your proxy's fake-IP pool. All-address CIDRs such as `0.0.0.0/0` and `::/0` are rejected. `ssrf.trustEnvProxy` is a separate opt-in for networks where only the proxy can resolve hostnames; it skips local DNS preflight only for hostnames sent through the configured `proxy` or, when none is configured, hostnames covered by valid HTTP(S) proxy env vars in sandboxes that route through them, and still blocks localhost, literal private IP targets, and `NO_PROXY` matches. It does not configure proxy transport.
814
+ Without an explicit `$` or `!` source, `OPENAI_API_KEY`, `BRAVE_API_KEY`, `PARALLEL_API_KEY`, `TINYFISH_API_KEY`, `SEARCH1API_KEY`, `SEARCHINFINITY_API_KEY`, `QUERIT_API_KEY`, `TAVILY_API_KEY`, `YDC_API_KEY`, `JINA_API_KEY`, `SERPDIVE_API_KEY`, `KAGI_API_KEY`, `BOCHA_API_KEY`, `OLLAMA_API_KEY`, `SERPBASE_API_KEY`, `SERPAPI_KEY`, `SERPER_API_KEY`, `SERPLY_API_KEY`, `BAIZHI_API_KEY`, `ZAI_API_KEY`, `KEENABLE_API_KEY`, `CERAMIC_API_KEY`, `DEEPSEEK_API_KEY`, `LINKUP_API_KEY`, `NINEROUTER_API_KEY`, `ANYSEARCH_API_KEY`, `XCRAWL_API_KEY`, `VALYU_API_KEY`, `XAI_API_KEY`, `MISTRAL_API_KEY`, `BRIGHTDATA_API_KEY`, `FIRECRAWL_API_KEY`, `CRAWL4AI_API_TOKEN`, `DEGOOG_API_KEY`, `EXA_API_KEY`, `GEMINI_API_KEY`, `DATALAB_API_KEY`, `DATALAB_PROCESSING_LOCATION`, `DATALAB_MODE`, `DATALAB_API_BASE`, `PERPLEXITY_API_KEY`, `GOOGLE_GEMINI_BASE_URL`, and `CLOUDFLARE_API_KEY` env vars retain their existing precedence over literal config file values. `openaiResponsesUrl` can point OpenAI `web_search` and `source_check` at a third-party gateway that supports the OpenAI Responses API and web search tool; it is an explicit endpoint override, not derived from Pi model provider settings, and defaults to `https://api.openai.com/v1/responses`. `openaiSearchModel` pins the model id used for OpenAI `web_search`, bypassing automatic selection (newest Luna model, then newest bare `gpt-N` or `gpt-N.N` id, then newest other `gpt-<version>` id; `gpt-6-luna` when only an API key is configured); the id is sent verbatim with whichever OpenAI auth resolves, so gateway-only model ids work too. `xaiSearchModel` similarly pins the xAI search model. `openaiSearchProviders` sets which Pi model providers OpenAI `web_search` resolves login credentials from, in priority order; it defaults to `["openai-codex", "openai"]`, entries that are not registered or not signed in are skipped, and an empty array skips Pi credentials entirely so the `openaiApiKey` / `OPENAI_API_KEY` fallback applies. Useful for choosing between multiple Codex accounts (for example a second account registered by an extension) or forcing API-key billing while signed into Codex. Configured Exa API keys use Exa's own account limits directly; any legacy local `exa-usage.json` file is ignored. `GOOGLE_GEMINI_BASE_URL` overrides the Gemini API host for Gemini generate-content calls such as search, URL context, YouTube, and local video analysis. Set it to a bare host with no trailing slash and no version segment, for example `https://my-gateway.example.com/gemini`; `geminiBaseUrl` is the config-file equivalent. When the configured host contains `gateway.ai.cloudflare.com`, authentication uses `cf-aig-authorization: Bearer <token>` from `CLOUDFLARE_API_KEY` or `cloudflareApiKey`, and `GEMINI_API_KEY` is not required for generate-content calls. Alternatively, set `geminiAuth` to `"adc"` to authenticate Gemini generate-content calls with Google Application Default Credentials (ADC) instead of an API key; calls go to the Vertex AI endpoint (`aiplatform.googleapis.com`) with an OAuth bearer token minted from the ADC file (`GOOGLE_APPLICATION_CREDENTIALS` or `~/.config/gcloud/application_default_credentials.json`, i.e. `gcloud auth application-default login`) or, on Compute Engine, from the metadata server. `geminiProject`/`geminiLocation` set the Vertex project and location and fall back to the `GOOGLE_CLOUD_PROJECT`/`GOOGLE_CLOUD_LOCATION` (or `GCLOUD_PROJECT`) env vars; project and location are required. ADC supports `authorized_user` (OAuth refresh token) and `service_account` (JWT assertion) credential files, and when neither `GOOGLE_APPLICATION_CREDENTIALS` nor `~/.config/gcloud/application_default_credentials.json` exists and Pi runs on Google Compute Engine, ADC uses the attached service account token from the GCE metadata server (`GCE_METADATA_HOST` overrides the host; `METADATA_SERVER_DETECTION=none` disables it); tokens are cached and refreshed from expiry. ADC mode covers search, URL context, and PDF/inline-data extraction; YouTube and local video analysis still go through the Gemini Files API, so they fall back to Gemini Web unless a `GEMINI_API_KEY` is also configured. The access token is treated as a credential and is redacted from errors. Local video file upload still uses Google's Files API directly, so gateway-only video extraction falls back to Gemini Web unless a `GEMINI_API_KEY` is also configured. `provider` or `searchProvider` sets the default search provider and is used when a tool call omits `provider` or sends `"auto"`: `"all"`, `"openai"`, `"brave"`, `"parallel"`, `"parallel-mcp"`, `"tinyfish"`, `"search1api"`, `"searchinfinity"`, `"querit"`, `"tavily"`, `"firecrawl"`, `"jina"`, `"serpdive"`, `"kagi"`, `"bocha"`, `"ollama"`, `"anysearch"`, `"xcrawl"`, `"valyu"`, `"xai"`, `"mistral"`, `"brightdata"`, `"serpbase"`, `"serpapi"`, `"serper"`, `"serply"`, `"you"`, `"baizhi"`, `"zai"`, `"keenable"`, `"ceramic"`, `"deepseek"`, `"ninerouter"`, `"searxng"`, `"degoog"`, `"exa"`, `"perplexity"`, or `"gemini"`. Parallel MCP, degoog, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Baizhi, Z.ai, Keenable, Ceramic, DeepSeek, Linkup, and 9router are never selected by `auto`; choose them explicitly or place them in `searchRouting`. If either single-provider field is configured, it takes precedence over `searchRouting`. Otherwise, `searchRouting` can opt into an ordered `providers` list and an explicit `fallbackOn` list containing `"transient"`, `"quota"`, `"network"`, and/or `"invalid-response"`; only those typed failures continue to the next available candidate. `fallbackOn` may also list `"empty"` (a successful response with no results and no answer) and `"domain-miss"` (no result on a requested include domain; an empty response also counts when an include domain was requested), so a route moves on from a successful but unusable response; if every candidate is weak, the first weak response is returned instead of an error. Both are off unless listed. `searchRouting.timeoutMs` (integer, 1 to 600000) optionally caps one routed search across all candidates, including each candidate's availability check and credential or browser-cookie lookup: when it elapses the in-flight request is aborted, later candidates are not tried, and the first weak response or the exhausted-route diagnostics (with `routing timeout after <N>ms`) are returned. Cancelling the search yourself is still reported as a cancellation, and a named provider is never affected. `"all"` is not valid inside `searchRouting.providers`, because that list defines sequential fallback rather than multi-provider aggregation. Named providers remain strict, and exhausted routes return per-provider diagnostics. `provider` can also be a non-empty array of named providers such as `["brave", "exa"]`; those providers run concurrently using the same aggregation path as `"all"`, while `"auto"` and `"all"` are invalid inside arrays. When every provider in a default array fails and each failure is a `fallbackOn` type, the search continues through the `searchRouting` providers the array did not try; a list given in a tool call (`"brave,exa"` from Pi, or an array over MCP) stays strict. Random, weighted, sticky, and cooldown routing are not enabled. This is also updated automatically when you change the provider in the curator UI. Set `webSearch.enabled` to `false` to unregister the configured search and source-check tools while leaving fetch/content tools available. `toolNames` can opt into alternate public tool names for environments where another extension or model reserves the defaults, without changing behavior: `webSearch`, `sourceCheck`, `fetchContent`, and `getSearchContent` default to `web_search`, `source_check`, `fetch_content`, and `get_search_content`. `workflow` sets the default search workflow: `"none"` (default; raw results, no curator), `"summary-review"` (opens curator with an auto-generated summary draft), or `"auto-summary"` (returns a model-generated summary without opening the browser curator). Overridden per-call via the `workflow` parameter on the configured search tool, or toggled at runtime with `/curator`. `browserCookies.profile` pins Gemini Web cookie lookup to a specific Chromium profile. When omitted, detected Chromium profiles are scanned in stable order and the first profile containing the required Gemini cookies is used. macOS discovery supports Helium, Chrome, Brave, and Arc; Linux discovery supports Chromium and Chrome. `allowBrowserCookies` enables Chromium cookie extraction for Gemini Web; it defaults to `false` to avoid browser data access and surprise macOS Keychain prompts. You can also set `PI_ALLOW_BROWSER_COOKIES=1`. Cookie databases are copied to a temporary read-only working copy; the reader uses `node:sqlite` when available and otherwise tries the `sqlite3` CLI or Python's standard-library SQLite module. `searchModel` overrides the Gemini API model used by the configured search tool without changing URL, YouTube, or video extraction defaults. Gemini API grounded search uses `gemini-3.6-flash` by default; set `searchModel` to choose another model. Gemini Web browser-cookie fallback uses its separate `gemini-3.1-pro` default because Gemini Web relies on private header values; explicitly configured unsupported Web models fail instead of silently falling back to 2.5 Flash. `summaryModel` sets the default model used for generating summary drafts in the curator UI and `auto-summary` mode (e.g. `"anthropic/claude-haiku-4-5"`, `"openai-codex/gpt-5.3-codex-spark"`, or `"openrouter/nvidia/nemotron-3-super-120b-a12b:free"`). Preferred summary and query-rewrite models also resolve through routed provider registrations such as OpenRouter when the native provider is unavailable. When Pi `enabledModels` is configured, summaries are limited to that allowlist; if no enabled summary model is available, the tool returns a deterministic summary instead of calling an unrelated model. `summaryGenerationDeadlineMs` sets the maximum time for one summary model attempt in the curator UI and `auto-summary` mode. It defaults to `30000`, must be a positive integer, and is capped at `600000`. `maxInlineContentChars` sets the direct `fetch_content` content slice and the default and maximum `get_search_content` slice. It defaults to `30000`, must be a positive integer, and is capped at `200000`; full fetched content remains stored for later retrieval. `curatorTimeoutSeconds` controls the initial curator idle timeout (default `20`, max `600`); users can still adjust the timer in the curator UI. `ssrf.allowRanges` lists CIDR ranges (e.g. `"198.18.0.0/15"`, `"fd00::/8"`) exempted from the SSRF guard that otherwise blocks private/reserved IP ranges. This unblocks `fetch_content`/`web_search` on hosts whose network proxy runs in TUN + fake-IP mode (Surge, Clash, Mihomo, Stash, ...), where public domains resolve into a synthetic reserved range. It is **off by default** — the guard stays fully enabled unless you list ranges here. Use the narrowest range that covers your proxy's fake-IP pool. All-address CIDRs such as `0.0.0.0/0` and `::/0` are rejected. `ssrf.trustEnvProxy` is a separate opt-in for networks where only the proxy can resolve hostnames; it skips local DNS preflight only for hostnames sent through the configured `proxy` or, when none is configured, hostnames covered by valid HTTP(S) proxy env vars in sandboxes that route through them, and still blocks localhost, literal private IP targets, and `NO_PROXY` matches. It does not configure proxy transport.
815
+
816
+ `searchRouting.fallbackOn` can also list `"off-topic"` to move on when a provider's answer and results have nothing to do with the query, as judged by the classifier model named in `searchRouting.offTopicModel` (`"cloudflare-workers-ai/@cf/cloudflare/clef"`, `"typesafe/jev-latest"`, or `"cloudflare-workers-ai/typesafe/jev-1.14.0"`, with Pi's credentials for that provider); the query, answer and result snippets are sent to that provider on every routed search that returns something. If the check fails, the response is kept. It works only in Pi, not over MCP. [docs/offtopic-judge.md](docs/offtopic-judge.md) has the measurements.
817
+
818
+ ### 9router
819
+
820
+ Select `provider: "ninerouter"` to search through a self-hosted [9router](https://github.com/decolua/9router), which fronts many search APIs behind one `/v1/search` endpoint. Set `ninerouterBaseUrl` (or `NINEROUTER_BASE_URL`) to the router's `/v1` root; `ninerouterApiKey` (or `NINEROUTER_API_KEY`) is optional, and `ninerouterProvider` (or `NINEROUTER_SEARCH_PROVIDER`) picks the router-side provider or combo (default `"serper"`). It is explicit-only: never chosen by `auto` or `all`.
749
821
 
750
822
  ### Linkup
751
823
 
@@ -766,7 +838,7 @@ Text results become source links with snippets capped at 500 characters. With `i
766
838
 
767
839
  ### Kimi Code Plan
768
840
 
769
- Run `/login kimi-coding` in Pi and complete sign-in for an active Kimi Code Plan. Then select `provider: "kimi"`, include `"kimi"` in an explicit provider array, or add it to `searchRouting.providers`. The extension resolves a model with provider `kimi-coding` from Pi's model registry and reuses Pi's refreshed OAuth credential; no Moonshot Open Platform key is configured here.
841
+ Run `/login kimi-coding` in Pi and complete sign-in for an active Kimi Code Plan. Then select `provider: "kimi"`, include `kimi` in a provider list such as `"kimi,exa"`, or add it to `searchRouting.providers`. The extension resolves a model with provider `kimi-coding` from Pi's model registry and reuses Pi's refreshed OAuth credential; no Moonshot Open Platform key is configured here.
770
842
 
771
843
  Kimi search calls `POST https://api.kimi.com/coding/v1/search` with the query as `text_query`. This is the Kimi Code Plan search service, not Moonshot Open Platform `$web_search`. The endpoint exposes no native recency parameter, so `recencyFilter` is unsupported and is not sent. Shared `domainFilter` and `numResults` behavior is enforced locally on the returned `search_results`.
772
844
 
@@ -774,7 +846,7 @@ Kimi is explicit-only: it is never chosen by `auto` and never participates in `p
774
846
 
775
847
  ### All providers
776
848
 
777
- Set `provider: "all"` on `web_search` or `source_check`, or configure `"provider": "all"` as the default, to run the same query against every eligible search provider simultaneously. Parallel MCP, DuckDuckGo, Kimi, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Baizhi, Z.ai, Keenable, Ceramic, DeepSeek, and Linkup are always excluded because they are explicit-only; Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Ceramic, DeepSeek, and Linkup are paid search APIs, while Baizhi, Z.ai, Kimi, and Mistral may consume account quota or paid search-tool usage, so `all` never spends either resource without an explicit request. Exa remains eligible through its zero-config MCP path, OpenAI can use Pi auth, and other API-backed search providers participate when their API key, local endpoint, or gateway makes them available. Browser-cookie access alone does not opt Gemini into `all`; select Gemini explicitly or configure its API/gateway.
849
+ Set `provider: "all"` on `web_search` or `source_check`, or configure `"provider": "all"` as the default, to run the same query against every eligible search provider simultaneously. Parallel MCP, degoog, DuckDuckGo, Kimi, AnySearch, XCrawl, Valyu, xAI, Mistral, Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Baizhi, Z.ai, Keenable, Ceramic, DeepSeek, Linkup, and 9router are always excluded because they are explicit-only; Bright Data, SerpBase, SerpApi, Serper, Serply, You.com, Ceramic, DeepSeek, and Linkup are paid search APIs, while Baizhi, Z.ai, Kimi, and Mistral may consume account quota or paid search-tool usage, so `all` never spends either resource without an explicit request. Exa remains eligible through its zero-config MCP path, OpenAI can use Pi auth, and other API-backed search providers participate when their API key, local endpoint, or gateway makes them available. Browser-cookie access alone does not opt Gemini into `all`; select Gemini explicitly or configure its API/gateway.
778
850
 
779
851
  Successful provider answers are preserved separately while source URLs and inline content are deduplicated, and one provider failure does not discard the other results. If every participating provider fails, the tool returns per-provider diagnostics. Configured Firecrawl participates in `all` like other eligible providers. In the Curator, **All** can also be selected like the other provider buttons. Each participating provider gets its own result card, including a provider badge and independent selection checkbox; failed providers get their own disabled error card. The final summary is generated from the selected provider cards and is what Pi receives. Outside the Curator, the same provider answers remain available as labeled sections in one tool response.
780
852
 
@@ -789,7 +861,7 @@ Successful provider answers are preserved separately while source URLs and inlin
789
861
  }
790
862
  ```
791
863
 
792
- Setting `provider` is optional. In `auto` mode, Jina is tried after Firecrawl and before SERPdive. It can also be selected per request with `provider: "jina"`, included in provider arrays or `provider: "all"`, or placed in `searchRouting.providers`.
864
+ Setting `provider` is optional. In `auto` mode, Jina is tried after Firecrawl and before SERPdive. It can also be selected per request with `provider: "jina"`, included in a provider list such as `"jina,exa"` or `provider: "all"`, or placed in `searchRouting.providers`.
793
865
 
794
866
  Jina Search maps `numResults` to its bounded `count` parameter, sends included domains as `site` filters, and adds excluded domains and recency constraints to the search query. Without `includeContent`, it requests SERP metadata only. With `includeContent: true`, Jina visits matching pages and returns their Markdown inline, so requests can take longer and consume more Jina tokens. The fixed hosted endpoint is `https://s.jina.ai`; no custom endpoint is configured by this extension.
795
867
 
@@ -821,7 +893,7 @@ The stable Search (`https://api.search.tinyfish.ai`) and Fetch (`https://api.fet
821
893
  }
822
894
  ```
823
895
 
824
- Setting `provider` is optional. In `auto` mode, an available Search1API provider is tried after TinyFish and before Searchinfinity. You can also select it per request with `provider: "search1api"`, include it in provider arrays or `provider: "all"`, or place `"search1api"` in `searchRouting.providers`.
896
+ Setting `provider` is optional. In `auto` mode, an available Search1API provider is tried after TinyFish and before Searchinfinity. You can also select it per request with `provider: "search1api"`, include it in a provider list such as `"search1api,exa"` or `provider: "all"`, or place `"search1api"` in `searchRouting.providers`.
825
897
 
826
898
  Search1API Search supports the shared `numResults`, `recencyFilter`, and include/exclude `domainFilter` options. When `includeContent` is true, it maps to Search1API Deep Search and returns successfully crawled result content inline. The Search1API Crawl endpoint is also used as a hosted `fetch_content` fallback after Jina Reader and TinyFish, before Parallel.
827
899
 
@@ -838,7 +910,7 @@ Search1API is credit-based. A basic search costs 1 credit; Deep Search adds 1 cr
838
910
  }
839
911
  ```
840
912
 
841
- Setting `provider` is optional. In `auto` mode, an available Searchinfinity provider is tried after Search1API and before Querit. You can also select it per request with `provider: "searchinfinity"`, include it in provider arrays or `provider: "all"`, or place `"searchinfinity"` in `searchRouting.providers`.
913
+ Setting `provider` is optional. In `auto` mode, an available Searchinfinity provider is tried after Search1API and before Querit. You can also select it per request with `provider: "searchinfinity"`, include it in a provider list such as `"searchinfinity,exa"` or `provider: "all"`, or place `"searchinfinity"` in `searchRouting.providers`.
842
914
 
843
915
  Searchinfinity Search supports the shared `numResults` (max 20 per request), `recencyFilter`, and include/exclude `domainFilter` options (up to 5 domains each). Answers are assembled from the model-generated per-result summaries when present, falling back to plain snippets. Accounts include a monthly free search quota shared with the Custom edition; API Key requests are limited to 5 QPS and a 30-second server-side timeout. See the [Searchinfinity API reference](https://docs.byteplus.com/api/docs/searchinfinity/Searchinfinity_API_Reference).
844
916
 
@@ -853,7 +925,7 @@ Searchinfinity Search supports the shared `numResults` (max 20 per request), `re
853
925
  }
854
926
  ```
855
927
 
856
- Setting `provider` is optional. In `auto` mode, an available Querit provider is tried after Searchinfinity and before Tavily. You can also select it per request with `provider: "querit"`, include it in provider arrays or `provider: "all"`, or place `"querit"` in `searchRouting.providers`.
928
+ Setting `provider` is optional. In `auto` mode, an available Querit provider is tried after Searchinfinity and before Tavily. You can also select it per request with `provider: "querit"`, include it in a provider list such as `"querit,exa"` or `provider: "all"`, or place `"querit"` in `searchRouting.providers`.
857
929
 
858
930
  Search requests follow the official [`querit-python`](https://github.com/querit-ai/querit-python) models: `numResults` maps to `count`, include/exclude `domainFilter` values map to `filters.sites`, and recency maps to `filters.timeRange.date` (`d1`, `w1`, `m1`, or `y1`). When `includeContent` is true, result URLs are sent to `POST /v1/contents` in batches of up to 10 and returned as inline Markdown. The same Contents endpoint is used as a hosted `fetch_content` fallback after Search1API and before Parallel. Querit Search and Contents subscriptions are independent; an API key can search successfully while `/v1/contents` returns `403 No active contents subscription`.
859
931
 
@@ -1216,6 +1288,7 @@ Rate limits: Perplexity is capped at 10 requests/minute (client-side). Jina Sear
1216
1288
  | `keenable.ts` | Explicit-only Keenable search provider, keyless with an optional API key |
1217
1289
  | `ceramic.ts` | Explicit-only Ceramic keyword search provider |
1218
1290
  | `linkup.ts` | Explicit-only Linkup search provider with configurable depth |
1291
+ | `ninerouter.ts` | Explicit-only search through a self-hosted 9router gateway's unified `/v1/search` |
1219
1292
  | `deepseek.ts` | Explicit-only DeepSeek Search and opt-in Fetch API provider |
1220
1293
  | `xai-search.ts` | Explicit-only xAI (Grok) hosted web/X search provider |
1221
1294
  | `mistral-search.ts` | Explicit-only Mistral Conversations web search provider |
@@ -1223,6 +1296,7 @@ Rate limits: Perplexity is capped at 10 requests/minute (client-side). Jina Sear
1223
1296
  | `searxng.ts` | Self-hosted SearXNG JSON API search provider |
1224
1297
  | `degoog.ts` | degoog metasearch search provider with optional API key and engine selection |
1225
1298
  | `duckduckgo.ts` | Explicit-only keyless DuckDuckGo HTML search provider |
1299
+ | `duckduckgo-rate-limit.ts` | DuckDuckGo request spacing and bot-check cooldown |
1226
1300
  | `exa.ts` | Exa.ai search provider — direct API and MCP proxy |
1227
1301
  | `extract.ts` | URL/file path routing, HTTP extraction, fallback orchestration |
1228
1302
  | `content-find.ts` | Bounded exact, case-insensitive, and fuzzy passage lookup |
@@ -70,7 +70,7 @@ function exhaustedBuckets(headers: Headers): BraveRateLimitBucket[] {
70
70
  return parseBraveRateLimitHeaders(headers).filter(bucket => bucket.limit > 0 && bucket.remaining === 0);
71
71
  }
72
72
 
73
- function defaultSleep(ms: number, signal?: AbortSignal): Promise<void> {
73
+ export function defaultSleep(ms: number, signal?: AbortSignal): Promise<void> {
74
74
  if (signal?.aborted) return Promise.reject(new Error("Aborted"));
75
75
  return new Promise((resolve, reject) => {
76
76
  const cleanup = () => signal?.removeEventListener("abort", onAbort);
@@ -87,7 +87,7 @@ function defaultSleep(ms: number, signal?: AbortSignal): Promise<void> {
87
87
  });
88
88
  }
89
89
 
90
- function formatWait(ms: number): string {
90
+ export function formatWait(ms: number): string {
91
91
  const seconds = Math.ceil(ms / 1000);
92
92
  if (seconds < 60) return `${seconds}s`;
93
93
  const minutes = Math.ceil(seconds / 60);
@@ -54,6 +54,7 @@ function buildProviderButtons(
54
54
  { value: "keenable", label: "Keenable", available: available.keenable },
55
55
  { value: "ceramic", label: "Ceramic", available: available.ceramic },
56
56
  { value: "linkup", label: "Linkup", available: available.linkup },
57
+ { value: "ninerouter", label: "9router", available: available.ninerouter },
57
58
  { value: "deepseek", label: "DeepSeek", available: available.deepseek },
58
59
  ];
59
60
 
@@ -1481,7 +1482,7 @@ const SCRIPT = `(function() {
1481
1482
  var token = DATA.sessionToken;
1482
1483
  var timeoutSec = DATA.timeout;
1483
1484
  var queries = Array.isArray(DATA.queries) ? DATA.queries : [];
1484
- 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"];
1485
+ 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"];
1485
1486
  var availProviders = DATA.availableProviders && typeof DATA.availableProviders === "object" ? DATA.availableProviders : {};
1486
1487
  var workflow = "summary-review";
1487
1488
  var initialDefaultProvider = typeof DATA.defaultProvider === "string" ? DATA.defaultProvider : "exa";
@@ -1724,6 +1725,7 @@ const SCRIPT = `(function() {
1724
1725
  if (provider === "keenable") return "Keenable";
1725
1726
  if (provider === "ceramic") return "Ceramic";
1726
1727
  if (provider === "linkup") return "Linkup";
1728
+ if (provider === "ninerouter") return "9router";
1727
1729
  if (provider === "deepseek") return "DeepSeek";
1728
1730
  return "Unknown";
1729
1731
  }
@@ -313,6 +313,7 @@ export function startCuratorServer(
313
313
  if (provider === "keenable") return availableProviders.keenable;
314
314
  if (provider === "ceramic") return availableProviders.ceramic;
315
315
  if (provider === "linkup") return availableProviders.linkup;
316
+ if (provider === "ninerouter") return availableProviders.ninerouter;
316
317
  if (provider === "deepseek") return availableProviders.deepseek;
317
318
  return false;
318
319
  }