@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.
- package/README.md +16 -14
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +1 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +3 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +22 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +44 -14
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +1 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/index.ts +20 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +4 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +42 -18
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/layout.ts +12 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +131 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +217 -113
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +12 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/subagent-notification.ts +556 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +50 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +11 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/patch-keys.ts +4 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/README.md +1 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/ask-user-question.ts +27 -3
- package/node_modules/@juicesharp/rpiv-ask-user-question/config.ts +23 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/configuration.md +15 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/keyboard.md +9 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/de.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/en.json +8 -5
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/es.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/fr.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt-BR.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/pt.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/ru.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/uk.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/locales/zh.json +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +4 -3
- package/node_modules/@juicesharp/rpiv-ask-user-question/presentation.ts +11 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/build-questionnaire.ts +6 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/key-router.ts +49 -8
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/questionnaire-session.ts +6 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/state-reducer.ts +13 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/state.ts +2 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-block-renderer.ts +19 -7
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-builder.ts +36 -7
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-copy.ts +13 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/tab-content-strategy.ts +24 -8
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/transcript.ts +144 -0
- package/node_modules/@narumitw/pi-btw/README.md +8 -3
- package/node_modules/@narumitw/pi-btw/dist/index.ts +448 -182
- package/node_modules/@narumitw/pi-btw/dist/index.ts.map +4 -4
- package/node_modules/@narumitw/pi-btw/docs/core-alignment.md +10 -2
- package/node_modules/@narumitw/pi-btw/docs/main-context-runtime.md +45 -0
- package/node_modules/@narumitw/pi-btw/docs/workflows.md +48 -5
- package/node_modules/@narumitw/pi-btw/package.json +5 -5
- package/node_modules/@narumitw/pi-btw/src/btw.ts +39 -14
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +83 -63
- package/node_modules/@narumitw/pi-btw/src/import-main-updates.ts +84 -0
- package/node_modules/@narumitw/pi-btw/src/keybindings.ts +29 -4
- package/node_modules/@narumitw/pi-btw/src/main-context-snapshot.ts +125 -0
- package/node_modules/@narumitw/pi-btw/src/menu.ts +1 -0
- package/node_modules/@narumitw/pi-btw/src/side-thread.ts +66 -17
- package/node_modules/@narumitw/pi-btw/src/transcript-markdown.ts +5 -5
- package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +47 -6
- package/node_modules/@narumitw/pi-caffeinate/package.json +3 -3
- package/node_modules/pi-lens/CHANGELOG.md +440 -0
- package/node_modules/pi-lens/README.md +13 -3
- package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +1 -0
- package/node_modules/pi-lens/dist/chunk-22Y2BM7H.js +23 -0
- package/node_modules/pi-lens/dist/{chunk-ATKJFDQN.js → chunk-27VWVB23.js} +12 -14
- package/node_modules/pi-lens/dist/{chunk-S2HEXIWI.js → chunk-2FYKETQJ.js} +10 -6
- package/node_modules/pi-lens/dist/{chunk-SRYEJNES.js → chunk-2LDMXL2M.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-ZHH37KZL.js → chunk-2SDHYHHO.js} +17 -17
- package/node_modules/pi-lens/dist/chunk-2Y6OJRSI.js +38 -0
- package/node_modules/pi-lens/dist/chunk-3SNDVPOR.js +507 -0
- package/node_modules/pi-lens/dist/{chunk-5OFV52AM.js → chunk-3WCEHYOI.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-44X7VIKR.js +73 -0
- package/node_modules/pi-lens/dist/{chunk-DEL2U6CM.js → chunk-4FHUGDKU.js} +16 -14
- package/node_modules/pi-lens/dist/{chunk-CT4MN5IU.js → chunk-4ODSZ35Z.js} +353 -359
- package/node_modules/pi-lens/dist/{chunk-ZIVJBOO3.js → chunk-4U7GDSZQ.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-54NIOJJZ.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-N5FLEO7W.js → chunk-5DKE4HGX.js} +37 -37
- package/node_modules/pi-lens/dist/{chunk-P63GXC37.js → chunk-5LRUKYFA.js} +31 -4
- package/node_modules/pi-lens/dist/{chunk-HRNHZA3N.js → chunk-63NMUNYP.js} +12 -16
- package/node_modules/pi-lens/dist/{chunk-HWCCCQNX.js → chunk-6XSESGWD.js} +13 -6
- package/node_modules/pi-lens/dist/{chunk-UMS2MFPZ.js → chunk-72J27ICO.js} +2 -3
- package/node_modules/pi-lens/dist/{chunk-ED36RF6Y.js → chunk-7FLRUH6B.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-7IYC4ENJ.js +297 -0
- package/node_modules/pi-lens/dist/chunk-7WWQAW5P.js +30 -0
- package/node_modules/pi-lens/dist/{chunk-3DA2JDOL.js → chunk-7ZS7MC24.js} +551 -203
- package/node_modules/pi-lens/dist/{chunk-WMYE35PX.js → chunk-AHWA4AKM.js} +7 -5
- package/node_modules/pi-lens/dist/{chunk-JW3YWBVB.js → chunk-AI3GP74G.js} +17 -19
- package/node_modules/pi-lens/dist/{chunk-AGSS7277.js → chunk-APFJKOP6.js} +6 -23
- package/node_modules/pi-lens/dist/{chunk-ZVUL7QYY.js → chunk-ASRAO7KG.js} +29 -32
- package/node_modules/pi-lens/dist/{chunk-BW5KFIQC.js → chunk-AWQWXSW4.js} +1 -0
- package/node_modules/pi-lens/dist/{chunk-TLX72JTG.js → chunk-CG5V25HX.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-CKEQFGLT.js +32 -0
- package/node_modules/pi-lens/dist/{chunk-Y6GZHWSJ.js → chunk-COOUUC5W.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-XTBDCR27.js → chunk-CPZ5JJW6.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-RKKOYPRA.js → chunk-DS2USX5G.js} +13 -15
- package/node_modules/pi-lens/dist/chunk-EA2ZRG44.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-GSLNCYGG.js → chunk-EDMLIW6W.js} +13 -14
- package/node_modules/pi-lens/dist/{chunk-2EECBNC5.js → chunk-EIKRZ32J.js} +75 -0
- package/node_modules/pi-lens/dist/chunk-EKNWOL2I.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-R3T7CLQ2.js → chunk-ELZRSR5N.js} +41 -41
- package/node_modules/pi-lens/dist/{chunk-GMX5OS7B.js → chunk-EN5AM7PX.js} +11 -12
- package/node_modules/pi-lens/dist/{chunk-3RKP3FMS.js → chunk-EWXXLS26.js} +226 -24
- package/node_modules/pi-lens/dist/chunk-EX4EXBW7.js +37 -0
- package/node_modules/pi-lens/dist/{chunk-XHJBS436.js → chunk-EXVXBSGN.js} +25 -25
- package/node_modules/pi-lens/dist/{chunk-MZGQNL3Y.js → chunk-F7BO6FWH.js} +12 -13
- package/node_modules/pi-lens/dist/{chunk-V35JG4JB.js → chunk-FEDWAYDS.js} +152 -334
- package/node_modules/pi-lens/dist/{chunk-J64T55EI.js → chunk-FWZRGGGY.js} +73 -9
- package/node_modules/pi-lens/dist/{chunk-T57LYLZT.js → chunk-G224FADB.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-G5UCJFT7.js +26 -0
- package/node_modules/pi-lens/dist/{chunk-LLJNQKQW.js → chunk-GLW3YDZZ.js} +20 -13
- package/node_modules/pi-lens/dist/{chunk-GXFV6MYU.js → chunk-GTDSYEA2.js} +72 -39
- package/node_modules/pi-lens/dist/{chunk-DUO2TU77.js → chunk-GYRZ72R4.js} +10 -4
- package/node_modules/pi-lens/dist/chunk-HYVXA3BB.js +49 -0
- package/node_modules/pi-lens/dist/{chunk-W66O5E25.js → chunk-IEBJF3PN.js} +13 -15
- package/node_modules/pi-lens/dist/{chunk-GAQ7OQG6.js → chunk-IL7K66ZQ.js} +83 -94
- package/node_modules/pi-lens/dist/{chunk-T7FEBKXN.js → chunk-JWOVP5BL.js} +7 -9
- package/node_modules/pi-lens/dist/{chunk-UBOQLVT2.js → chunk-K2GUZ4DN.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-5VSF4UUQ.js → chunk-K4SZB56V.js} +34 -39
- package/node_modules/pi-lens/dist/{chunk-7D6L4MTX.js → chunk-KCBRHV5E.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-GSM5UU7A.js → chunk-KFXCL4OV.js} +38 -28
- package/node_modules/pi-lens/dist/{chunk-J6MPGQTS.js → chunk-KJJAVH3X.js} +81 -15
- package/node_modules/pi-lens/dist/{chunk-BWD5EPKO.js → chunk-KPVLQHCZ.js} +4 -6
- package/node_modules/pi-lens/dist/{chunk-MPNJLASA.js → chunk-KX56K73G.js} +10 -13
- package/node_modules/pi-lens/dist/{chunk-AWSCPCN2.js → chunk-LMCTHJ2H.js} +19 -19
- package/node_modules/pi-lens/dist/{chunk-IWDLU6K3.js → chunk-MEFLGBCS.js} +4 -6
- package/node_modules/pi-lens/dist/{chunk-TOY6QKOH.js → chunk-MKPCELNI.js} +17 -17
- package/node_modules/pi-lens/dist/{chunk-POMLXPMY.js → chunk-N3PLNNCW.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-N5FBM25N.js +22 -0
- package/node_modules/pi-lens/dist/{chunk-CYRKQRPM.js → chunk-NFNVDDGB.js} +2 -4
- package/node_modules/pi-lens/dist/{chunk-RMLC67LF.js → chunk-NLIVE7L6.js} +2 -30
- package/node_modules/pi-lens/dist/{chunk-24AKHFGP.js → chunk-OMJ3OFBJ.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-IQWN5JCP.js → chunk-OZNCKLOX.js} +13 -14
- package/node_modules/pi-lens/dist/chunk-P5XUGPIX.js +31 -0
- package/node_modules/pi-lens/dist/{chunk-2KXTHF3M.js → chunk-PJXNTPB2.js} +253 -33
- package/node_modules/pi-lens/dist/chunk-PKOXJIVT.js +88 -0
- package/node_modules/pi-lens/dist/{chunk-DGUKIYSI.js → chunk-PP2A5V2T.js} +8 -10
- package/node_modules/pi-lens/dist/{chunk-KAPJINKN.js → chunk-Q42LJANT.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-UZ2XCLYS.js → chunk-Q4BKKOVC.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-TIQ2PKDW.js → chunk-QT66NEYN.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-U44DJXQP.js → chunk-RCHO5W7M.js} +15 -18
- package/node_modules/pi-lens/dist/{chunk-YH5MVY2U.js → chunk-RG3MXTRI.js} +7 -7
- package/node_modules/pi-lens/dist/chunk-RG7OODGM.js +57 -0
- package/node_modules/pi-lens/dist/{chunk-OHKJ7PQF.js → chunk-RU34BA4D.js} +43 -39
- package/node_modules/pi-lens/dist/{chunk-JMYYOTQG.js → chunk-S26LC76R.js} +13 -1
- package/node_modules/pi-lens/dist/{chunk-XBJVAEEO.js → chunk-S55TEC7I.js} +3 -2
- package/node_modules/pi-lens/dist/{chunk-RVK72CZX.js → chunk-SJHC3BCZ.js} +1397 -481
- package/node_modules/pi-lens/dist/{chunk-IYNJ6YPZ.js → chunk-SNEUMLM7.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-S67KYG37.js → chunk-T4NGVFYI.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-YCWYO6TQ.js → chunk-THEXI2QO.js} +48 -45
- package/node_modules/pi-lens/dist/{chunk-AMERCH6V.js → chunk-TL2TCJYL.js} +15 -16
- package/node_modules/pi-lens/dist/{chunk-KUA4OJ5Y.js → chunk-TPYYEDP5.js} +823 -350
- package/node_modules/pi-lens/dist/{chunk-YNE3RP52.js → chunk-TVZRLTG6.js} +8 -1
- package/node_modules/pi-lens/dist/{chunk-ROYSX2S5.js → chunk-UCVMSOXF.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-UL5SXQVX.js +32 -0
- package/node_modules/pi-lens/dist/{chunk-7HXE67BN.js → chunk-UO66IMVP.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-VOOAPROD.js → chunk-UVY4TOJH.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-RKBXZN3A.js → chunk-VIDEKABZ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-2FN63LPV.js → chunk-VITFDI3O.js} +13 -14
- package/node_modules/pi-lens/dist/{chunk-6DLWKFEX.js → chunk-VUAVE3QC.js} +41 -42
- package/node_modules/pi-lens/dist/{chunk-FM4RDMKT.js → chunk-WUY4BZEP.js} +10 -12
- package/node_modules/pi-lens/dist/{chunk-SD4I7ZO4.js → chunk-X3UTCXAA.js} +43 -53
- package/node_modules/pi-lens/dist/chunk-XHDBJODR.js +45 -0
- package/node_modules/pi-lens/dist/{chunk-5IUSNGOC.js → chunk-XHLK33VM.js} +28 -21
- package/node_modules/pi-lens/dist/{chunk-3KAZU3VR.js → chunk-XI34NWDI.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-QBFBRV2B.js → chunk-XWFIHYCH.js} +4 -2
- package/node_modules/pi-lens/dist/{chunk-JUKMK5Y4.js → chunk-Y2TPADJR.js} +10 -11
- package/node_modules/pi-lens/dist/{chunk-EBC36LNN.js → chunk-Y5KTA2OB.js} +17 -17
- package/node_modules/pi-lens/dist/{chunk-HYGZEMX6.js → chunk-YKVDBNPO.js} +11 -5
- package/node_modules/pi-lens/dist/{chunk-KN35K52N.js → chunk-YSDPVDFC.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-YWNO5Q4R.js +44 -0
- package/node_modules/pi-lens/dist/{chunk-US7ECLD7.js → chunk-YWWG4AQA.js} +119 -28
- package/node_modules/pi-lens/dist/{chunk-O4NWQT6I.js → chunk-YXDCRUKQ.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-XYURS6EN.js → chunk-YXGRRORB.js} +15 -17
- package/node_modules/pi-lens/dist/{chunk-IUE7SSKV.js → chunk-ZAPSUBLU.js} +13 -7
- package/node_modules/pi-lens/dist/{chunk-EUXZEFTV.js → chunk-ZPJM7DID.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-5HSRT26B.js → chunk-ZSUX7KEM.js} +16 -15
- package/node_modules/pi-lens/dist/index.js +37155 -32210
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +11 -12
- package/node_modules/pi-lens/dist/mcp/cli.js +46 -45
- package/node_modules/pi-lens/dist/mcp/server.js +1210 -574
- package/node_modules/pi-lens/dist/mcp/worker.js +65 -65
- package/node_modules/pi-lens/dist/probes/installer.js +21 -23
- package/node_modules/pi-lens/docs/adr/0010-trace-validation-session-lifecycle.md +390 -0
- package/node_modules/pi-lens/docs/adr/README.md +1 -0
- package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +5 -3
- package/node_modules/pi-lens/docs/configuration.md +9 -0
- package/node_modules/pi-lens/docs/engineering-principles.md +12 -0
- package/node_modules/pi-lens/docs/environment-variables.md +20 -0
- package/node_modules/pi-lens/docs/features.md +16 -1
- package/node_modules/pi-lens/docs/globalconfig.md +37 -8
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +105 -12
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +37 -18
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +22 -1
- package/node_modules/pi-lens/docs/pi-lens-investigator.md +14 -0
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +23 -10
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +64 -8
- package/node_modules/pi-lens/docs/pi-lens-retro.md +2 -2
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +48 -1
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +8 -1
- package/node_modules/pi-lens/docs/release-qa-baseline.md +19 -7
- package/node_modules/pi-lens/docs/servercapabilities.md +47 -47
- package/node_modules/pi-lens/docs/settings.md +9 -5
- package/node_modules/pi-lens/docs/subagent-compat.md +1 -1
- package/node_modules/pi-lens/docs/usage.md +1 -0
- package/node_modules/pi-lens/package.json +6 -4
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-return-value-in-generator-test.yml +17 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-js-test.yml +86 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-test.yml +86 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-numeric-parse-python-test.yml +15 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-return-value-in-generator.yml +9 -4
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +119 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +119 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-numeric-parse-python.yml +13 -2
- package/node_modules/pi-lens/rules/rule-catalog.json +25 -1
- package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +15 -5
- package/node_modules/pi-lens/scripts/lib/is-main-module.mjs +27 -0
- package/node_modules/pi-lens/scripts/lib/scratch-home-env.mjs +21 -0
- package/node_modules/pi-lens/scripts/rpc-load-check.mjs +4 -6
- package/node_modules/pi-lens/scripts/warm-loader-cache.mjs +2 -5
- package/node_modules/pi-next-cue/package.json +4 -1
- package/node_modules/pi-typesafe/README.md +6 -6
- package/node_modules/pi-typesafe/dist/ask.js +9 -2
- package/node_modules/pi-typesafe/dist/auth.d.ts +3 -2
- package/node_modules/pi-typesafe/dist/auth.js +2 -2
- package/node_modules/pi-typesafe/dist/backends.d.ts +20 -5
- package/node_modules/pi-typesafe/dist/backends.js +32 -8
- package/node_modules/pi-typesafe/dist/batch.d.ts +1 -1
- package/node_modules/pi-typesafe/dist/batch.js +2 -2
- package/node_modules/pi-typesafe/dist/client.d.ts +1 -1
- package/node_modules/pi-typesafe/dist/client.js +24 -12
- package/node_modules/pi-typesafe/dist/credentials.d.ts +8 -6
- package/node_modules/pi-typesafe/dist/credentials.js +70 -16
- package/node_modules/pi-typesafe/dist/extension.js +118 -26
- package/node_modules/pi-typesafe/dist/index.d.ts +1 -1
- package/node_modules/pi-typesafe/dist/index.js +1 -1
- package/node_modules/pi-typesafe/dist/key-prompt.d.ts +1 -1
- package/node_modules/pi-typesafe/dist/key-prompt.js +6 -6
- package/node_modules/pi-typesafe/dist/login.d.ts +11 -10
- package/node_modules/pi-typesafe/dist/login.js +24 -21
- package/node_modules/pi-typesafe/dist/schema.d.ts +8 -8
- package/node_modules/pi-typesafe/dist/schema.js +29 -7
- package/node_modules/pi-typesafe/package.json +2 -2
- package/node_modules/pi-web-access/CHANGELOG.md +40 -0
- package/node_modules/pi-web-access/README.md +96 -22
- package/node_modules/pi-web-access/brave-rate-limit.ts +2 -2
- package/node_modules/pi-web-access/curator-page.ts +3 -1
- package/node_modules/pi-web-access/curator-server.ts +1 -0
- package/node_modules/pi-web-access/dist/index.js +2607 -1674
- package/node_modules/pi-web-access/dist/mcp-cli.js +1119 -327
- package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +95 -0
- package/node_modules/pi-web-access/duckduckgo.ts +51 -45
- package/node_modules/pi-web-access/exa.ts +48 -6
- package/node_modules/pi-web-access/extract.ts +2 -2
- package/node_modules/pi-web-access/fetch-params.ts +5 -4
- package/node_modules/pi-web-access/field-extract.ts +347 -0
- package/node_modules/pi-web-access/gemini-search.ts +151 -13
- package/node_modules/pi-web-access/index.ts +128 -125
- package/node_modules/pi-web-access/mistral-search.ts +1 -1
- package/node_modules/pi-web-access/ninerouter.ts +92 -0
- package/node_modules/pi-web-access/offtopic-judge.ts +72 -0
- package/node_modules/pi-web-access/openai-search.ts +36 -10
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/perplexity.ts +1 -0
- package/node_modules/pi-web-access/query-rewrite.ts +39 -13
- package/node_modules/pi-web-access/source-check.ts +31 -15
- package/node_modules/pi-web-access/summary-model-scope.ts +19 -1
- package/node_modules/pi-web-access/summary-review.ts +13 -20
- package/node_modules/pi-web-access/tool-arguments.ts +1 -1
- package/node_modules/pi-web-access/upgrade-notice.ts +47 -0
- package/node_modules/pi-web-access/utils.ts +26 -1
- package/node_modules/pi-web-access/web-tool-contract.ts +4 -1
- package/node_modules/pi-web-access/web-tool-core.ts +99 -19
- package/node_modules/pi-web-access/xai-search.ts +3 -3
- package/package.json +15 -15
- package/node_modules/pi-lens/dist/chunk-3PTHXJXR.js +0 -28
- package/node_modules/pi-lens/dist/chunk-3QED2P4V.js +0 -31
- package/node_modules/pi-lens/dist/chunk-5WRPDP2A.js +0 -47
- package/node_modules/pi-lens/dist/chunk-ABBOA7UD.js +0 -157
- package/node_modules/pi-lens/dist/chunk-CUHSHSB6.js +0 -273
- package/node_modules/pi-lens/dist/chunk-GL5LUMZE.js +0 -51
- package/node_modules/pi-lens/dist/chunk-HAD7QRQI.js +0 -30
- package/node_modules/pi-lens/dist/chunk-JORED7EX.js +0 -44
- package/node_modules/pi-lens/dist/chunk-KYUB6QDC.js +0 -72
- package/node_modules/pi-lens/dist/chunk-LZSEQW6A.js +0 -57
- package/node_modules/pi-lens/dist/chunk-M2IFVFWU.js +0 -79
- package/node_modules/pi-lens/dist/chunk-M2UD3LPU.js +0 -88
- package/node_modules/pi-lens/dist/chunk-MBKQHGA7.js +0 -39
- package/node_modules/pi-lens/dist/chunk-R7YOCSNV.js +0 -23
- package/node_modules/pi-lens/dist/chunk-SKAMFC7A.js +0 -28
- package/node_modules/pi-lens/dist/chunk-SYE6T2EB.js +0 -28
- package/node_modules/pi-lens/dist/chunk-TRETHTQO.js +0 -26
- package/node_modules/pi-lens/dist/chunk-UA7ZXYDR.js +0 -184
- package/node_modules/pi-lens/dist/chunk-XTFDJI3T.js +0 -24
- package/node_modules/pi-lens/dist/chunk-Z3CCVDUB.js +0 -76
- package/node_modules/pi-next-cue/.github/workflows/publish.yml +0 -20
|
@@ -12,9 +12,12 @@ import type { ExtractedContent, ExtractOptions } from "./extract.ts";
|
|
|
12
12
|
import { normalizeFetchContentParams, type FetchContentParams } from "./fetch-params.ts";
|
|
13
13
|
import { resolveAuthFetchProfile, type AuthFetchProfile } from "./auth-fetch.ts";
|
|
14
14
|
import { findContent, type FindMode } from "./content-find.ts";
|
|
15
|
+
import { extractPageFields, formatPageExtraction, parseExtractFields } from "./field-extract.ts";
|
|
15
16
|
import {
|
|
16
17
|
assertSearchProviderSelectionAllowed,
|
|
17
18
|
normalizeSearchProviderSelection,
|
|
19
|
+
parseProviderArgument,
|
|
20
|
+
validateSearchModelOverride,
|
|
18
21
|
search,
|
|
19
22
|
type SearchProvider,
|
|
20
23
|
type SearchProviderSelection,
|
|
@@ -66,6 +69,9 @@ export interface WebSearchConfig {
|
|
|
66
69
|
ceramicApiKey?: unknown;
|
|
67
70
|
linkupApiKey?: unknown;
|
|
68
71
|
linkupDepth?: unknown;
|
|
72
|
+
ninerouterBaseUrl?: unknown;
|
|
73
|
+
ninerouterApiKey?: unknown;
|
|
74
|
+
ninerouterProvider?: unknown;
|
|
69
75
|
deepseekApiKey?: unknown;
|
|
70
76
|
degoogBaseUrl?: unknown;
|
|
71
77
|
degoogApiKey?: unknown;
|
|
@@ -79,6 +85,7 @@ export interface WebSearchConfig {
|
|
|
79
85
|
autoOpenBrowser?: unknown;
|
|
80
86
|
curatorRemote?: unknown;
|
|
81
87
|
summaryModel?: string;
|
|
88
|
+
queryRewriteModel?: string;
|
|
82
89
|
summaryGenerationDeadlineMs?: unknown;
|
|
83
90
|
summaryInstructions?: unknown;
|
|
84
91
|
maxInlineContentChars?: unknown;
|
|
@@ -140,14 +147,16 @@ export const DEFAULT_TOOL_NAMES: ToolNames = {
|
|
|
140
147
|
getSearchContent: "get_search_content",
|
|
141
148
|
};
|
|
142
149
|
const SEARCH_QUERY_CONCURRENCY = 3;
|
|
143
|
-
const FETCH_MODES = ["readable", "raw", "answer"] as const;
|
|
150
|
+
const FETCH_MODES = ["readable", "raw", "answer", "extract"] as const;
|
|
144
151
|
export type FetchMode = typeof FETCH_MODES[number];
|
|
145
152
|
export type FetchModeConfig = { defaultMode: FetchMode; allowedModes: FetchMode[] };
|
|
153
|
+
// Extract sends page text to Cloudflare, so it is offered only when fetch.allowedModes lists it.
|
|
154
|
+
const DEFAULT_FETCH_MODES: FetchMode[] = ["readable", "raw", "answer"];
|
|
146
155
|
|
|
147
156
|
export function resolveFetchModeConfig(config: WebSearchConfig): FetchModeConfig {
|
|
148
|
-
const configuredModes = config.fetch?.allowedModes ??
|
|
157
|
+
const configuredModes = config.fetch?.allowedModes ?? DEFAULT_FETCH_MODES;
|
|
149
158
|
if (!Array.isArray(configuredModes) || configuredModes.length === 0 || configuredModes.some(mode => !FETCH_MODES.includes(mode as FetchMode))) {
|
|
150
|
-
throw new Error(`fetch.allowedModes in ${WEB_SEARCH_CONFIG_PATH} must be a non-empty array containing only "readable", "raw", or "
|
|
159
|
+
throw new Error(`fetch.allowedModes in ${WEB_SEARCH_CONFIG_PATH} must be a non-empty array containing only "readable", "raw", "answer", or "extract"`);
|
|
151
160
|
}
|
|
152
161
|
const allowedModes = configuredModes as FetchMode[];
|
|
153
162
|
const duplicateMode = allowedModes.find((mode, index) => allowedModes.indexOf(mode) !== index);
|
|
@@ -155,6 +164,9 @@ export function resolveFetchModeConfig(config: WebSearchConfig): FetchModeConfig
|
|
|
155
164
|
throw new Error(`fetch.allowedModes in ${WEB_SEARCH_CONFIG_PATH} must not contain duplicates: "${duplicateMode}"`);
|
|
156
165
|
}
|
|
157
166
|
const defaultMode = config.fetch?.defaultMode ?? "readable";
|
|
167
|
+
if (defaultMode === "extract") {
|
|
168
|
+
throw new Error(`fetch.defaultMode in ${WEB_SEARCH_CONFIG_PATH} cannot be "extract", because extract needs fields on each call`);
|
|
169
|
+
}
|
|
158
170
|
if (!allowedModes.includes(defaultMode as FetchMode)) {
|
|
159
171
|
throw new Error(`fetch.defaultMode in ${WEB_SEARCH_CONFIG_PATH} must be one of fetch.allowedModes`);
|
|
160
172
|
}
|
|
@@ -186,7 +198,7 @@ export function normalizeProviderInput(value: unknown, label = "provider"): Sear
|
|
|
186
198
|
}
|
|
187
199
|
|
|
188
200
|
export function resolveRequestedProvider(requested: unknown): SearchProviderSelection {
|
|
189
|
-
const normalizedRequested =
|
|
201
|
+
const normalizedRequested = parseProviderArgument(requested);
|
|
190
202
|
if (normalizedRequested && normalizedRequested !== "auto") {
|
|
191
203
|
assertSearchProviderSelectionAllowed(normalizedRequested, "Requested provider");
|
|
192
204
|
return normalizedRequested;
|
|
@@ -403,13 +415,26 @@ function formatSourceCheckResult(artifact: ResearchArtifact, getSearchContentToo
|
|
|
403
415
|
if (assessment) {
|
|
404
416
|
lines.push(`**Status:** ${assessment.status} (confidence ${assessment.confidence.toFixed(2)})`);
|
|
405
417
|
lines.push(`**Rationale:** ${assessment.rationale}`);
|
|
406
|
-
if (assessment.supporting_passages.length > 0) lines.push(`**Supporting passages:** ${assessment.supporting_passages.join(", ")}`);
|
|
407
|
-
if (assessment.contradicting_passages.length > 0) lines.push(`**Contradicting passages:** ${assessment.contradicting_passages.join(", ")}`);
|
|
408
418
|
lines.push("");
|
|
409
419
|
}
|
|
410
420
|
if (artifact.sources.length > 0) {
|
|
411
421
|
lines.push("## Sources");
|
|
412
|
-
|
|
422
|
+
let budget = 4_000;
|
|
423
|
+
let omitted = 0;
|
|
424
|
+
for (const source of artifact.sources) {
|
|
425
|
+
lines.push(`${source.rank}. [${source.quality}] ${source.title}\n ${source.url}`);
|
|
426
|
+
for (const passage of artifact.passages.filter((candidate) => candidate.source_rank === source.rank)) {
|
|
427
|
+
const flat = passage.text.replace(/\s+/g, " ").trim();
|
|
428
|
+
// Drop a trailing high surrogate so the cut never splits an emoji.
|
|
429
|
+
const text = flat.length > 400 ? `${flat.slice(0, 400).replace(/[\uD800-\uDBFF]$/, "")}…` : flat;
|
|
430
|
+
if (text.length > budget) omitted++;
|
|
431
|
+
else {
|
|
432
|
+
budget -= text.length;
|
|
433
|
+
lines.push(` - ${passage.passage_id}: ${text}`);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
if (omitted > 0) lines.push(`${omitted} more passage${omitted === 1 ? "" : "s"} in the artifact.`);
|
|
413
438
|
lines.push("");
|
|
414
439
|
}
|
|
415
440
|
if (artifact.errors?.length) lines.push(`Search errors: ${artifact.errors.map((entry) => `${entry.query}: ${entry.error}`).join("; ")}`);
|
|
@@ -754,6 +779,7 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
754
779
|
}
|
|
755
780
|
|
|
756
781
|
async function webSearch(params: WebSearchParams, signal?: AbortSignal, call: WebSearchCallOptions = {}): Promise<WebToolResult> {
|
|
782
|
+
const model = validateSearchModelOverride(params.provider, params.model);
|
|
757
783
|
const { extensionContext: ctx, onUpdate } = call;
|
|
758
784
|
return runWithProxy(typeof params.proxy === "string" ? params.proxy : undefined, async () => {
|
|
759
785
|
const rawQueryList: unknown[] = Array.isArray(params.queries)
|
|
@@ -773,7 +799,7 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
773
799
|
const allUrls: string[] = [];
|
|
774
800
|
const allInlineContent: ExtractedContent[] = [];
|
|
775
801
|
const resolvedProvider = resolveRequestedProvider(params.provider);
|
|
776
|
-
const providerFromConfig = (
|
|
802
|
+
const providerFromConfig = (parseProviderArgument(params.provider) ?? "auto") === "auto";
|
|
777
803
|
|
|
778
804
|
const queryResponses = await runSearchQueries(queryList, async (query) => {
|
|
779
805
|
signal?.throwIfAborted();
|
|
@@ -785,6 +811,7 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
785
811
|
try {
|
|
786
812
|
const { answer, results, inlineContent, provider, providerResponses } = await search(query, {
|
|
787
813
|
provider: resolvedProvider,
|
|
814
|
+
model,
|
|
788
815
|
providerFromConfig,
|
|
789
816
|
numResults: params.numResults,
|
|
790
817
|
recencyFilter,
|
|
@@ -884,7 +911,7 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
884
911
|
try {
|
|
885
912
|
const response = await search(query, {
|
|
886
913
|
provider: resolveRequestedProvider(params.provider),
|
|
887
|
-
providerFromConfig: (
|
|
914
|
+
providerFromConfig: (parseProviderArgument(params.provider) ?? "auto") === "auto",
|
|
888
915
|
numResults,
|
|
889
916
|
recencyFilter,
|
|
890
917
|
domainFilter,
|
|
@@ -966,8 +993,22 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
966
993
|
if (mode === "answer" && options.model) {
|
|
967
994
|
return { content: [{ type: "text", text: "Error: use answerModel, not model, with mode answer." }], details: { error: "model is incompatible with mode answer" } };
|
|
968
995
|
}
|
|
969
|
-
|
|
970
|
-
|
|
996
|
+
// Authenticated page text never goes to a hosted model.
|
|
997
|
+
if ((mode === "answer" || mode === "extract") && options.auth !== undefined) {
|
|
998
|
+
return { content: [{ type: "text", text: `Error: auth cannot be combined with mode ${mode}.` }], details: { error: `auth cannot be combined with mode ${mode}` } };
|
|
999
|
+
}
|
|
1000
|
+
if (mode !== "extract" && params.fields !== undefined) {
|
|
1001
|
+
return { content: [{ type: "text", text: "Error: fields requires mode extract." }], details: { error: "fields requires mode extract" } };
|
|
1002
|
+
}
|
|
1003
|
+
let extractFields: ReturnType<typeof parseExtractFields> | undefined;
|
|
1004
|
+
if (mode === "extract") {
|
|
1005
|
+
try {
|
|
1006
|
+
if (params.fields === undefined) throw new Error("mode extract requires fields");
|
|
1007
|
+
extractFields = parseExtractFields(params.fields);
|
|
1008
|
+
} catch (err) {
|
|
1009
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
1010
|
+
return { content: [{ type: "text", text: `Error: ${error}.` }], details: { error } };
|
|
1011
|
+
}
|
|
971
1012
|
}
|
|
972
1013
|
let authFetchProfile: AuthFetchProfile | undefined;
|
|
973
1014
|
if (options.auth !== undefined) {
|
|
@@ -997,15 +1038,16 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
997
1038
|
...(authFetchProfile ? { authFetchProfile } : {}),
|
|
998
1039
|
};
|
|
999
1040
|
const fetchResults = await fetchAllContent(urlList, signal, fetchOptions(requestOptions, options.proxy));
|
|
1041
|
+
// Reject image-as-payload results (direct images, video frames — they set mimeType and/or frames).
|
|
1042
|
+
// A text result that merely attaches a thumbnail (YouTube analysis) stays answerable.
|
|
1043
|
+
const textResults = mode === "answer" || mode === "extract"
|
|
1044
|
+
? fetchResults.map(result => !result.error && (result.mimeType?.startsWith("image/") || result.frames?.length)
|
|
1045
|
+
? { ...result, error: `${mode === "answer" ? "Page answer" : "Field extraction"} requires textual fetched content` }
|
|
1046
|
+
: result)
|
|
1047
|
+
: fetchResults;
|
|
1000
1048
|
const presentedResults = mode === "answer"
|
|
1001
|
-
? await Promise.all(
|
|
1049
|
+
? await Promise.all(textResults.map(async result => {
|
|
1002
1050
|
if (result.error) return result;
|
|
1003
|
-
// Reject image-as-payload results (direct images, video frames — they
|
|
1004
|
-
// set mimeType and/or frames). A text result that merely attaches a
|
|
1005
|
-
// thumbnail (YouTube analysis) stays answerable.
|
|
1006
|
-
if (result.mimeType?.startsWith("image/") || result.frames?.length) {
|
|
1007
|
-
return { ...result, error: "Page answer requires textual fetched content" };
|
|
1008
|
-
}
|
|
1009
1051
|
try {
|
|
1010
1052
|
if (!host.answerFromPage) throw new Error("this host cannot answer from fetched pages");
|
|
1011
1053
|
const answer = await host.answerFromPage({
|
|
@@ -1019,7 +1061,11 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
1019
1061
|
return { ...result, error: `Page answer failed: ${err instanceof Error ? err.message : String(err)}` };
|
|
1020
1062
|
}
|
|
1021
1063
|
}))
|
|
1022
|
-
:
|
|
1064
|
+
: textResults;
|
|
1065
|
+
const extractLimit = pLimit(3);
|
|
1066
|
+
const extractions = extractFields
|
|
1067
|
+
? await Promise.all(presentedResults.map(result => result.error ? undefined : extractLimit(() => extractPageFields(result.content, extractFields!, { modelRegistry: ctx?.modelRegistry }, signal))))
|
|
1068
|
+
: undefined;
|
|
1023
1069
|
const successful = presentedResults.filter((r) => !r.error).length;
|
|
1024
1070
|
const totalChars = presentedResults.reduce((sum, r) => sum + r.content.length, 0);
|
|
1025
1071
|
|
|
@@ -1033,6 +1079,40 @@ export function createWebToolCore(host: WebToolCoreHost): WebToolCoreInstance {
|
|
|
1033
1079
|
const storedContent = storeFetchResult(responseId, data, authFetchProfile);
|
|
1034
1080
|
const structuredContent = fetchStructuredContent(storedContent ? responseId : null, presentedResults);
|
|
1035
1081
|
|
|
1082
|
+
if (extractions) {
|
|
1083
|
+
structuredContent.urls.forEach((entry, index) => {
|
|
1084
|
+
if (extractions[index]) entry.extraction = extractions[index];
|
|
1085
|
+
});
|
|
1086
|
+
let output = "## Extracted fields\n";
|
|
1087
|
+
presentedResults.forEach((result, index) => {
|
|
1088
|
+
output += `\n### ${result.title || result.url}\n`;
|
|
1089
|
+
output += result.error ? `Error: ${result.error}\n` : formatPageExtraction(extractions[index]!);
|
|
1090
|
+
});
|
|
1091
|
+
const outputLimit = getMaxInlineContentChars();
|
|
1092
|
+
if (output.length > outputLimit) output = `${output.slice(0, outputLimit)}\n\n[Results cut at ${outputLimit} characters; ask for fewer fields or URLs.]\n`;
|
|
1093
|
+
// Extract rejects auth, so the pages are always stored.
|
|
1094
|
+
const anyUncertain = extractions.some((extraction) => extraction && "fields" in extraction && Object.values(extraction.fields).some((field) => field.status === "uncertain"));
|
|
1095
|
+
output += getSearchContentEnabled
|
|
1096
|
+
? `\n---\nThe fetched pages are stored as responseId "${responseId}". Use ${toolNames.getSearchContent}({ responseId: "${responseId}", urlIndex: 0 }) to read the first one; urlIndex follows the order above.${anyUncertain ? " To check an uncertain value, add findText with its guess." : ""}`
|
|
1097
|
+
: "\n---\nContent retrieval is not registered.";
|
|
1098
|
+
return {
|
|
1099
|
+
// A page that fetched but could not be extracted still counts as fetched: its content is stored.
|
|
1100
|
+
...(successful === 0 ? { isError: true } : {}),
|
|
1101
|
+
content: [{ type: "text", text: output }],
|
|
1102
|
+
structuredContent,
|
|
1103
|
+
details: {
|
|
1104
|
+
urls: urlList,
|
|
1105
|
+
urlCount: urlList.length,
|
|
1106
|
+
successful,
|
|
1107
|
+
mode,
|
|
1108
|
+
responseId,
|
|
1109
|
+
// The TUI summarizes a single URL from these, as for the other modes.
|
|
1110
|
+
...(urlList.length === 1 ? { title: presentedResults[0].title, totalChars: presentedResults[0].content.length, ...(presentedResults[0].error ? { error: presentedResults[0].error } : {}) } : {}),
|
|
1111
|
+
extractions: presentedResults.map((result, index) => ({ url: result.url, ...(result.error ? { error: result.error } : extractions[index]) })),
|
|
1112
|
+
},
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1036
1116
|
if (urlList.length === 1) {
|
|
1037
1117
|
const result = presentedResults[0];
|
|
1038
1118
|
if (result.error) {
|
|
@@ -164,9 +164,9 @@ async function resolvePiAuth(
|
|
|
164
164
|
return undefined;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
export async function resolveXaiAuth(ctx?: ExtensionContext, signal?: AbortSignal): Promise<XaiAuth | undefined> {
|
|
167
|
+
export async function resolveXaiAuth(ctx?: ExtensionContext, signal?: AbortSignal, model?: string): Promise<XaiAuth | undefined> {
|
|
168
168
|
const config = loadConfig();
|
|
169
|
-
const modelOverride = resolveConfiguredSearchModel(config.xaiSearchModel);
|
|
169
|
+
const modelOverride = model ?? resolveConfiguredSearchModel(config.xaiSearchModel);
|
|
170
170
|
const tools = resolveConfiguredSearchTools(config.xaiSearchTools);
|
|
171
171
|
if (ctx && resolveConfiguredResponsesUrl(config.xaiResponsesUrl) === undefined) {
|
|
172
172
|
const auth = await resolvePiAuth(ctx, modelOverride, tools);
|
|
@@ -367,7 +367,7 @@ export async function searchWithXai(
|
|
|
367
367
|
const tools = resolveConfiguredSearchTools(config.xaiSearchTools);
|
|
368
368
|
const customUrl = resolveConfiguredResponsesUrl(config.xaiResponsesUrl);
|
|
369
369
|
const timeoutMs = resolveConfiguredSearchTimeoutMs(config.xaiSearchTimeoutMs);
|
|
370
|
-
const auth = await resolveXaiAuth(ctx, options.signal);
|
|
370
|
+
const auth = await resolveXaiAuth(ctx, options.signal, options.model);
|
|
371
371
|
if (!auth) {
|
|
372
372
|
if (customUrl) {
|
|
373
373
|
throw new Error(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/pi-extensions",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.15",
|
|
4
4
|
"description": "Aggregate installer for HerbertGao-maintained Pi extensions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"extensions",
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
"postpack": "node ../../scripts/aggregate-bundle.mjs restore"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ast-grep/cli": "0.
|
|
39
|
-
"@ast-grep/napi": "^0.
|
|
38
|
+
"@ast-grep/cli": "0.51.0",
|
|
39
|
+
"@ast-grep/napi": "^0.51.0",
|
|
40
40
|
"@dietrichgebert/ponytail": "5.3.2",
|
|
41
41
|
"@herbertgao/pi-agency": "0.1.2",
|
|
42
42
|
"@herbertgao/pi-bark": "0.2.1",
|
|
43
|
-
"@herbertgao/pi-cc-extensions": "1.0.
|
|
43
|
+
"@herbertgao/pi-cc-extensions": "1.0.11-local.1",
|
|
44
44
|
"@herbertgao/pi-subagents": "0.22.0-local.2",
|
|
45
45
|
"@herbertgao/sol-pi": "0.4.2",
|
|
46
|
-
"@juicesharp/rpiv-ask-user-question": "2.
|
|
47
|
-
"@juicesharp/rpiv-config": "^2.
|
|
46
|
+
"@juicesharp/rpiv-ask-user-question": "2.15.0",
|
|
47
|
+
"@juicesharp/rpiv-config": "^2.15.0",
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
49
49
|
"@mozilla/readability": "^0.6.0",
|
|
50
50
|
"@napi-rs/keyring": "^2.1.0",
|
|
51
|
-
"@narumitw/pi-btw": "0.
|
|
52
|
-
"@narumitw/pi-caffeinate": "0.49.
|
|
53
|
-
"@narumitw/pi-tui-kit": "^0.
|
|
51
|
+
"@narumitw/pi-btw": "0.63.1",
|
|
52
|
+
"@narumitw/pi-caffeinate": "0.49.13",
|
|
53
|
+
"@narumitw/pi-tui-kit": "^0.67.0",
|
|
54
54
|
"@pi-plugins/fast-mode": "0.1.14",
|
|
55
55
|
"@shikijs/cli": "^4.0.2",
|
|
56
56
|
"@tifan/pi-copy-response": "0.2.7",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@tifan/pi-preferred-thinking": "1.0.2",
|
|
61
61
|
"@tifan/pi-recap": "0.4.8",
|
|
62
62
|
"@tifan/pi-rename": "0.6.0",
|
|
63
|
-
"@typesafe-ai/sdk": "0.
|
|
63
|
+
"@typesafe-ai/sdk": "0.7.0",
|
|
64
64
|
"croner": "^10.0.1",
|
|
65
|
-
"dbus-native": "^0.16.
|
|
65
|
+
"dbus-native": "^0.16.2",
|
|
66
66
|
"defuddle": "0.19.3",
|
|
67
67
|
"grok-mermaid": "0.2.3",
|
|
68
68
|
"jiti": "^2.7.0",
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
"nanoid": "^5.0.0",
|
|
73
73
|
"p-limit": "^6.1.0",
|
|
74
74
|
"pi-antigravity": "0.11.0",
|
|
75
|
-
"pi-lens": "4.4.
|
|
76
|
-
"pi-next-cue": "1.0.
|
|
75
|
+
"pi-lens": "4.4.5",
|
|
76
|
+
"pi-next-cue": "1.0.8",
|
|
77
77
|
"pi-provider-qoder": "0.6.5",
|
|
78
|
-
"pi-typesafe": "0.
|
|
79
|
-
"pi-web-access": "0.
|
|
78
|
+
"pi-typesafe": "0.13.0",
|
|
79
|
+
"pi-web-access": "0.45.0",
|
|
80
80
|
"pidusage": "^4.0.1",
|
|
81
81
|
"promise.try": "^2.0.1",
|
|
82
82
|
"turndown": "^7.2.0",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
GovulncheckClient,
|
|
4
|
-
parseGovulncheckJson
|
|
5
|
-
} from "./chunk-IUE7SSKV.js";
|
|
6
|
-
import "./chunk-S67KYG37.js";
|
|
7
|
-
import "./chunk-TIQ2PKDW.js";
|
|
8
|
-
import "./chunk-3KAZU3VR.js";
|
|
9
|
-
import "./chunk-P63GXC37.js";
|
|
10
|
-
import "./chunk-KUA4OJ5Y.js";
|
|
11
|
-
import "./chunk-BW5KFIQC.js";
|
|
12
|
-
import "./chunk-J6MPGQTS.js";
|
|
13
|
-
import "./chunk-5HSRT26B.js";
|
|
14
|
-
import "./chunk-M2IFVFWU.js";
|
|
15
|
-
import "./chunk-2EECBNC5.js";
|
|
16
|
-
import "./chunk-J64T55EI.js";
|
|
17
|
-
import "./chunk-POMLXPMY.js";
|
|
18
|
-
import "./chunk-JMYYOTQG.js";
|
|
19
|
-
import "./chunk-QBFBRV2B.js";
|
|
20
|
-
import "./chunk-YNE3RP52.js";
|
|
21
|
-
import "./chunk-LJDODBBZ.js";
|
|
22
|
-
import "./chunk-ABBOA7UD.js";
|
|
23
|
-
import "./chunk-3RKP3FMS.js";
|
|
24
|
-
import "./chunk-NXL4FFQQ.js";
|
|
25
|
-
export {
|
|
26
|
-
GovulncheckClient,
|
|
27
|
-
parseGovulncheckJson
|
|
28
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
calcCyclomaticComplexity,
|
|
4
|
-
functionFactProvider
|
|
5
|
-
} from "./chunk-EUXZEFTV.js";
|
|
6
|
-
import "./chunk-T57LYLZT.js";
|
|
7
|
-
import "./chunk-5W3R6LFT.js";
|
|
8
|
-
import "./chunk-US7ECLD7.js";
|
|
9
|
-
import "./chunk-Z54ZSOBZ.js";
|
|
10
|
-
import "./chunk-GXFV6MYU.js";
|
|
11
|
-
import "./chunk-FM4RDMKT.js";
|
|
12
|
-
import "./chunk-P63GXC37.js";
|
|
13
|
-
import "./chunk-KUA4OJ5Y.js";
|
|
14
|
-
import "./chunk-DUO2TU77.js";
|
|
15
|
-
import "./chunk-J6MPGQTS.js";
|
|
16
|
-
import "./chunk-5HSRT26B.js";
|
|
17
|
-
import "./chunk-M2IFVFWU.js";
|
|
18
|
-
import "./chunk-2EECBNC5.js";
|
|
19
|
-
import "./chunk-J64T55EI.js";
|
|
20
|
-
import "./chunk-POMLXPMY.js";
|
|
21
|
-
import "./chunk-JMYYOTQG.js";
|
|
22
|
-
import "./chunk-QBFBRV2B.js";
|
|
23
|
-
import "./chunk-YNE3RP52.js";
|
|
24
|
-
import "./chunk-LJDODBBZ.js";
|
|
25
|
-
import "./chunk-ABBOA7UD.js";
|
|
26
|
-
import "./chunk-3RKP3FMS.js";
|
|
27
|
-
import "./chunk-NXL4FFQQ.js";
|
|
28
|
-
export {
|
|
29
|
-
calcCyclomaticComplexity,
|
|
30
|
-
functionFactProvider
|
|
31
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
DEAD_CODE_DELTA_MAX_SHOWN,
|
|
4
|
-
PythonDeadCodeClient,
|
|
5
|
-
deadCodeIssueCount,
|
|
6
|
-
deadCodeIssueKey,
|
|
7
|
-
deadCodeIssues,
|
|
8
|
-
formatDeadCodeDelta,
|
|
9
|
-
getDeadCodeClients,
|
|
10
|
-
parseVultureOutput,
|
|
11
|
-
stableFindingKey
|
|
12
|
-
} from "./chunk-RKKOYPRA.js";
|
|
13
|
-
import "./chunk-7U2IDNXN.js";
|
|
14
|
-
import "./chunk-RKBXZN3A.js";
|
|
15
|
-
import "./chunk-S67KYG37.js";
|
|
16
|
-
import "./chunk-BWD5EPKO.js";
|
|
17
|
-
import "./chunk-UA7ZXYDR.js";
|
|
18
|
-
import "./chunk-MPNJLASA.js";
|
|
19
|
-
import "./chunk-5VSF4UUQ.js";
|
|
20
|
-
import "./chunk-3KAZU3VR.js";
|
|
21
|
-
import "./chunk-P63GXC37.js";
|
|
22
|
-
import "./chunk-KUA4OJ5Y.js";
|
|
23
|
-
import "./chunk-BW5KFIQC.js";
|
|
24
|
-
import "./chunk-J6MPGQTS.js";
|
|
25
|
-
import "./chunk-5HSRT26B.js";
|
|
26
|
-
import "./chunk-M2IFVFWU.js";
|
|
27
|
-
import "./chunk-2EECBNC5.js";
|
|
28
|
-
import "./chunk-J64T55EI.js";
|
|
29
|
-
import "./chunk-POMLXPMY.js";
|
|
30
|
-
import "./chunk-JMYYOTQG.js";
|
|
31
|
-
import "./chunk-QBFBRV2B.js";
|
|
32
|
-
import "./chunk-YNE3RP52.js";
|
|
33
|
-
import "./chunk-LJDODBBZ.js";
|
|
34
|
-
import "./chunk-ABBOA7UD.js";
|
|
35
|
-
import "./chunk-3RKP3FMS.js";
|
|
36
|
-
import "./chunk-NXL4FFQQ.js";
|
|
37
|
-
export {
|
|
38
|
-
DEAD_CODE_DELTA_MAX_SHOWN,
|
|
39
|
-
PythonDeadCodeClient,
|
|
40
|
-
deadCodeIssueCount,
|
|
41
|
-
deadCodeIssueKey,
|
|
42
|
-
deadCodeIssues,
|
|
43
|
-
formatDeadCodeDelta,
|
|
44
|
-
getDeadCodeClients,
|
|
45
|
-
parseVultureOutput,
|
|
46
|
-
stableFindingKey
|
|
47
|
-
};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// dist/clients/bounded-cache.js
|
|
4
|
-
var BoundedFifoMap = class {
|
|
5
|
-
entries = /* @__PURE__ */ new Map();
|
|
6
|
-
maxEntries;
|
|
7
|
-
constructor(maxEntries) {
|
|
8
|
-
this.maxEntries = maxEntries;
|
|
9
|
-
}
|
|
10
|
-
get(key) {
|
|
11
|
-
return this.entries.get(key);
|
|
12
|
-
}
|
|
13
|
-
has(key) {
|
|
14
|
-
return this.entries.has(key);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Insert or update `key` without reordering. Evicts the oldest
|
|
18
|
-
* (insertion-order) entries once the map exceeds capacity.
|
|
19
|
-
*
|
|
20
|
-
* Returns the evicted `[key, value]` pairs, oldest first — callers with
|
|
21
|
-
* eviction-side bookkeeping use the return value instead of hand-rolling
|
|
22
|
-
* `keys().next().value` (#2442). The VALUE is returned, not just the key,
|
|
23
|
-
* because the eviction-coupled sites need it: `tree-sitter-cache.ts` has to
|
|
24
|
-
* retire the dropped entry's WASM-heap tree (#417/#890) and
|
|
25
|
-
* `tree-sitter-client.ts` has to `delete()` the dropped compiled query.
|
|
26
|
-
* Handing back only the key would force those sites to read the value out
|
|
27
|
-
* of the map before eviction — i.e. to hand-roll the block this class
|
|
28
|
-
* exists to delete.
|
|
29
|
-
*/
|
|
30
|
-
set(key, value) {
|
|
31
|
-
this.entries.set(key, value);
|
|
32
|
-
return this.evictOverflow();
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Change the capacity ceiling, evicting down to it immediately when it
|
|
36
|
-
* shrinks. Returns the evicted `[key, value]` pairs, oldest first, on the
|
|
37
|
-
* same contract as {@link set} — a caller with a DYNAMIC cap (an env-read
|
|
38
|
-
* ceiling, `TreeCache.setMaxSize`) needs the shrink to free the same
|
|
39
|
-
* resources an ordinary overflow frees.
|
|
40
|
-
*/
|
|
41
|
-
setMaxEntries(maxEntries) {
|
|
42
|
-
this.maxEntries = maxEntries;
|
|
43
|
-
return this.evictOverflow();
|
|
44
|
-
}
|
|
45
|
-
/** Current capacity ceiling. */
|
|
46
|
-
getMaxEntries() {
|
|
47
|
-
return this.maxEntries;
|
|
48
|
-
}
|
|
49
|
-
/** Drop oldest-first until within capacity. The one eviction block. */
|
|
50
|
-
evictOverflow() {
|
|
51
|
-
const evicted = [];
|
|
52
|
-
while (this.entries.size > this.maxEntries) {
|
|
53
|
-
const oldest = this.entries.entries().next().value;
|
|
54
|
-
if (oldest === void 0)
|
|
55
|
-
break;
|
|
56
|
-
this.entries.delete(oldest[0]);
|
|
57
|
-
evicted.push(oldest);
|
|
58
|
-
}
|
|
59
|
-
return evicted;
|
|
60
|
-
}
|
|
61
|
-
delete(key) {
|
|
62
|
-
return this.entries.delete(key);
|
|
63
|
-
}
|
|
64
|
-
clear() {
|
|
65
|
-
this.entries.clear();
|
|
66
|
-
}
|
|
67
|
-
get size() {
|
|
68
|
-
return this.entries.size;
|
|
69
|
-
}
|
|
70
|
-
keys() {
|
|
71
|
-
return this.entries.keys();
|
|
72
|
-
}
|
|
73
|
-
values() {
|
|
74
|
-
return this.entries.values();
|
|
75
|
-
}
|
|
76
|
-
entriesArray() {
|
|
77
|
-
return [...this.entries.entries()];
|
|
78
|
-
}
|
|
79
|
-
[Symbol.iterator]() {
|
|
80
|
-
return this.entries[Symbol.iterator]();
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
var BoundedSet = class {
|
|
84
|
-
entries;
|
|
85
|
-
constructor(maxEntries) {
|
|
86
|
-
this.entries = new BoundedFifoMap(maxEntries);
|
|
87
|
-
}
|
|
88
|
-
has(value) {
|
|
89
|
-
return this.entries.has(value);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Insert `value` without reordering an already-present member. Evicts the
|
|
93
|
-
* oldest (insertion-order) members once the set exceeds capacity.
|
|
94
|
-
*
|
|
95
|
-
* Returns the evicted values, oldest first — see the class doc for why a
|
|
96
|
-
* call site consumes this instead of hand-rolling the drop.
|
|
97
|
-
*/
|
|
98
|
-
add(value) {
|
|
99
|
-
return this.entries.set(value, true).map(([evicted]) => evicted);
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Change the capacity ceiling, evicting down to it immediately when it
|
|
103
|
-
* shrinks. Returns the evicted values, oldest first, on the same contract
|
|
104
|
-
* as {@link add}.
|
|
105
|
-
*/
|
|
106
|
-
setMaxEntries(maxEntries) {
|
|
107
|
-
return this.entries.setMaxEntries(maxEntries).map(([evicted]) => evicted);
|
|
108
|
-
}
|
|
109
|
-
/** Current capacity ceiling. */
|
|
110
|
-
getMaxEntries() {
|
|
111
|
-
return this.entries.getMaxEntries();
|
|
112
|
-
}
|
|
113
|
-
delete(value) {
|
|
114
|
-
return this.entries.delete(value);
|
|
115
|
-
}
|
|
116
|
-
clear() {
|
|
117
|
-
this.entries.clear();
|
|
118
|
-
}
|
|
119
|
-
get size() {
|
|
120
|
-
return this.entries.size;
|
|
121
|
-
}
|
|
122
|
-
values() {
|
|
123
|
-
return this.entries.keys();
|
|
124
|
-
}
|
|
125
|
-
[Symbol.iterator]() {
|
|
126
|
-
return this.entries.keys();
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
var BoundedLruCache = class extends BoundedFifoMap {
|
|
130
|
-
/**
|
|
131
|
-
* Read and promote to most-recently-used.
|
|
132
|
-
*
|
|
133
|
-
* A stored `undefined` value is NOT promoted — the hit is indistinguishable
|
|
134
|
-
* from a miss on this signature, and pre-#2442 `BoundedLruCache` behaved
|
|
135
|
-
* the same way. No caller stores `undefined`; the note exists so a future
|
|
136
|
-
* one does not assume otherwise.
|
|
137
|
-
*/
|
|
138
|
-
get(key) {
|
|
139
|
-
const value = this.entries.get(key);
|
|
140
|
-
if (value !== void 0) {
|
|
141
|
-
this.entries.delete(key);
|
|
142
|
-
this.entries.set(key, value);
|
|
143
|
-
}
|
|
144
|
-
return value;
|
|
145
|
-
}
|
|
146
|
-
/** Insert or update `key`, moving it to the most-recently-used position. */
|
|
147
|
-
set(key, value) {
|
|
148
|
-
this.entries.delete(key);
|
|
149
|
-
return super.set(key, value);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export {
|
|
154
|
-
BoundedFifoMap,
|
|
155
|
-
BoundedSet,
|
|
156
|
-
BoundedLruCache
|
|
157
|
-
};
|