@herbertgao/pi-extensions 2026.10.10 → 2026.10.12
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 +13 -11
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/node_modules/@herbertgao/pi-agency/README.md +5 -3
- package/node_modules/@herbertgao/pi-agency/package.json +1 -1
- package/node_modules/@herbertgao/pi-agency/src/index.ts +51 -7
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +3 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +126 -42
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +24 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +69 -16
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/sticky-prompt.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/package.json +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/agent-color.ts +11 -2
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +10 -5
- package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +3 -2
- package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +1 -0
- package/node_modules/@herbertgao/sol-pi/README.md +8 -2
- package/node_modules/@herbertgao/sol-pi/agents-install.md +2 -2
- package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +28 -4
- package/node_modules/@herbertgao/sol-pi/docs/configuration.md +17 -4
- package/node_modules/@herbertgao/sol-pi/package.json +1 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/index.ts +35 -25
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/then-run.ts +95 -26
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/candidate.ts +39 -2
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/evidence-preserving-reducer/index.ts +24 -0
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/observation-pack/index.ts +12 -7
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/extension.ts +138 -130
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/projection.ts +88 -14
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/tools.ts +9 -0
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/index.ts +14 -5
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/shell-options.ts +22 -0
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/tui.ts +11 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/answer-channel.ts +109 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/ask-user-question.ts +117 -71
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/hosts.md +2 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/keyboard.md +3 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/startup-performance.md +83 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/docs/tool-schema.md +74 -5
- package/node_modules/@juicesharp/rpiv-ask-user-question/events.ts +84 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/index.ts +10 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +4 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/presentation.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/reconcile.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/rpc-fallback.ts +5 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/build-questionnaire.ts +19 -19
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/i18n-bridge.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/key-router.ts +7 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/questionnaire-session.ts +10 -10
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/row-intent.ts +2 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/contract.ts +6 -6
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/derivations.ts +2 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/focus.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/selectors/projections.ts +9 -9
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/state-reducer.ts +5 -5
- package/node_modules/@juicesharp/rpiv-ask-user-question/state/state.ts +2 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/external-answer.ts +125 -0
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/format-answer.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/normalize-params.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/response-envelope.ts +2 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/types.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/tool/validate-questionnaire.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/component-binding.ts +4 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/multi-select-view.ts +4 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/option-list-view.ts +2 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/markdown-content-cache.ts +3 -3
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-block-renderer.ts +5 -5
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-layout-decider.ts +3 -3
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/preview/preview-pane.ts +10 -10
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/submit-picker.ts +2 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/tab-bar.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/wrapping-select.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-builder.ts +9 -9
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/dialog-copy.ts +1 -1
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/props-adapter.ts +8 -8
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/tab-components.ts +4 -4
- package/node_modules/@juicesharp/rpiv-ask-user-question/view/tab-content-strategy.ts +10 -10
- package/node_modules/@narumitw/pi-btw/README.md +14 -5
- package/node_modules/@narumitw/pi-btw/dist/index.ts +1067 -557
- package/node_modules/@narumitw/pi-btw/dist/index.ts.map +4 -4
- package/node_modules/@narumitw/pi-btw/docs/core-alignment.md +277 -0
- package/node_modules/@narumitw/pi-btw/docs/native-appearance.md +857 -0
- package/node_modules/@narumitw/pi-btw/docs/workflows.md +34 -13
- package/node_modules/@narumitw/pi-btw/package.json +4 -4
- package/node_modules/@narumitw/pi-btw/src/btw.ts +152 -108
- package/node_modules/@narumitw/pi-btw/src/conversation-chrome.ts +93 -0
- package/node_modules/@narumitw/pi-btw/src/fullscreen-renderer.ts +329 -0
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +109 -309
- package/node_modules/@narumitw/pi-btw/src/keybindings.ts +101 -23
- package/node_modules/@narumitw/pi-btw/src/menu.ts +42 -27
- package/node_modules/@narumitw/pi-btw/src/session-lifetime.ts +66 -0
- package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +366 -164
- package/node_modules/@narumitw/pi-btw/src/workspace-layout.ts +96 -36
- package/node_modules/@narumitw/pi-caffeinate/dist/index.ts +1 -0
- package/node_modules/@narumitw/pi-caffeinate/dist/index.ts.map +2 -2
- package/node_modules/@narumitw/pi-caffeinate/package.json +3 -3
- package/node_modules/@narumitw/pi-caffeinate/src/inhibitor-process.ts +1 -0
- package/node_modules/pi-antigravity/README.md +6 -2
- package/node_modules/pi-antigravity/package.json +2 -2
- package/node_modules/pi-antigravity/src/client/client.ts +44 -52
- package/node_modules/pi-antigravity/src/index.ts +13 -0
- package/node_modules/pi-antigravity/src/models/discovery.ts +25 -2
- package/node_modules/pi-antigravity/src/models/grouping.ts +107 -68
- package/node_modules/pi-antigravity/src/models/models.ts +10 -0
- package/node_modules/pi-antigravity/src/search/search.ts +581 -43
- package/node_modules/pi-antigravity/src/stream/stream.ts +53 -13
- package/node_modules/pi-antigravity/src/types/types.ts +13 -0
- package/node_modules/pi-antigravity/src/usage/usage.ts +11 -3
- package/node_modules/pi-lens/CHANGELOG.md +281 -0
- package/node_modules/pi-lens/README.md +13 -1
- package/node_modules/pi-lens/dist/{chunk-SS36ZX4J.js → chunk-24AKHFGP.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-JSQFTSC6.js → chunk-2FN63LPV.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-5UCAH366.js → chunk-2KXTHF3M.js} +20 -20
- package/node_modules/pi-lens/dist/{chunk-EU63SDCG.js → chunk-3DA2JDOL.js} +367 -281
- package/node_modules/pi-lens/dist/{chunk-RWWYJ623.js → chunk-3KAZU3VR.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-3PTHXJXR.js +28 -0
- package/node_modules/pi-lens/dist/chunk-3QED2P4V.js +31 -0
- package/node_modules/pi-lens/dist/{chunk-N2H3ZPZY.js → chunk-3RKP3FMS.js} +1 -0
- package/node_modules/pi-lens/dist/{chunk-XVF2VVXP.js → chunk-5HSRT26B.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-MXGY6KPT.js → chunk-5IUSNGOC.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-EJIUXPBX.js → chunk-5OFV52AM.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-AW7R2GWG.js → chunk-5VSF4UUQ.js} +12 -7
- package/node_modules/pi-lens/dist/{chunk-6STA6Z7I.js → chunk-5WRPDP2A.js} +18 -18
- package/node_modules/pi-lens/dist/{chunk-YIUAVF7E.js → chunk-6DLWKFEX.js} +35 -34
- package/node_modules/pi-lens/dist/{chunk-WOA4LN2R.js → chunk-7D6L4MTX.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-GAEGEPOC.js → chunk-7HXE67BN.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-AGSS7277.js +84 -0
- package/node_modules/pi-lens/dist/{chunk-R3PCY3YS.js → chunk-AMERCH6V.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-WU567RSC.js → chunk-ATKJFDQN.js} +14 -10
- package/node_modules/pi-lens/dist/{chunk-VSSBEUFT.js → chunk-AWSCPCN2.js} +16 -16
- package/node_modules/pi-lens/dist/{chunk-VCHXCQFG.js → chunk-BWD5EPKO.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-H6MF6EVN.js → chunk-CT4MN5IU.js} +1200 -230
- package/node_modules/pi-lens/dist/{chunk-FCSOVF55.js → chunk-CUHSHSB6.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-CHOW74WE.js → chunk-CYRKQRPM.js} +7 -10
- package/node_modules/pi-lens/dist/{chunk-Q7DUK4LX.js → chunk-DEL2U6CM.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-6C7JWPCP.js → chunk-DGUKIYSI.js} +26 -23
- package/node_modules/pi-lens/dist/{chunk-PHDMFAKM.js → chunk-DUO2TU77.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-MRXKYPCS.js → chunk-EBC36LNN.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-CSHFH5IN.js → chunk-ED36RF6Y.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-76MWC2K6.js → chunk-EUXZEFTV.js} +90 -97
- package/node_modules/pi-lens/dist/{chunk-QOZXJ4NA.js → chunk-FM4RDMKT.js} +11 -8
- package/node_modules/pi-lens/dist/{chunk-ACXEQZOU.js → chunk-GAQ7OQG6.js} +31 -28
- package/node_modules/pi-lens/dist/{chunk-XAGLWMJ4.js → chunk-GL5LUMZE.js} +23 -23
- package/node_modules/pi-lens/dist/{chunk-BKE7E7TC.js → chunk-GMX5OS7B.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-ZHFZWTZV.js → chunk-GSLNCYGG.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-3W7IEVVL.js → chunk-GSM5UU7A.js} +26 -34
- package/node_modules/pi-lens/dist/{chunk-724UL2TJ.js → chunk-GXFV6MYU.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-HAD7QRQI.js +30 -0
- package/node_modules/pi-lens/dist/{chunk-QOBUHWHX.js → chunk-HRNHZA3N.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-VWCXW2E7.js → chunk-HWCCCQNX.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-7DYBLXYA.js → chunk-HYGZEMX6.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-IJYGIDF4.js +186 -0
- package/node_modules/pi-lens/dist/{chunk-4W4VLAPJ.js → chunk-IQWN5JCP.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-SQ4TVJBR.js → chunk-IUE7SSKV.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-IBGIOBEE.js → chunk-IWDLU6K3.js} +68 -5
- package/node_modules/pi-lens/dist/{chunk-XCJN5IJU.js → chunk-IYNJ6YPZ.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-JAU72XNY.js → chunk-J64T55EI.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-2BBLFX75.js → chunk-J6MPGQTS.js} +5 -5
- package/node_modules/pi-lens/dist/chunk-JORED7EX.js +44 -0
- package/node_modules/pi-lens/dist/{chunk-6SDEP3AJ.js → chunk-JUKMK5Y4.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-FMSO6RDZ.js → chunk-JW3YWBVB.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-L3BLXZG7.js → chunk-KAPJINKN.js} +30 -69
- package/node_modules/pi-lens/dist/{chunk-2B73ZPOK.js → chunk-KN35K52N.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-C34ZXZ7O.js → chunk-KUA4OJ5Y.js} +24 -11
- package/node_modules/pi-lens/dist/chunk-KYUB6QDC.js +72 -0
- package/node_modules/pi-lens/dist/{chunk-67WMNWEE.js → chunk-LLJNQKQW.js} +12 -10
- package/node_modules/pi-lens/dist/chunk-LZSEQW6A.js +57 -0
- package/node_modules/pi-lens/dist/{chunk-ZANLILYD.js → chunk-M2IFVFWU.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-M2UD3LPU.js +88 -0
- package/node_modules/pi-lens/dist/{chunk-XIJZVPD5.js → chunk-MBKQHGA7.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-P7266HLM.js → chunk-MPNJLASA.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6GFRNVYR.js → chunk-MZGQNL3Y.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-ZWFS3OEF.js → chunk-N5FLEO7W.js} +33 -32
- package/node_modules/pi-lens/dist/{chunk-3JNKMP3B.js → chunk-O4NWQT6I.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-T6CPIZNT.js → chunk-OHKJ7PQF.js} +33 -32
- package/node_modules/pi-lens/dist/{chunk-VRZP76YM.js → chunk-P63GXC37.js} +4 -1
- package/node_modules/pi-lens/dist/{chunk-XTMJ7XDT.js → chunk-POMLXPMY.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-QQNQ7SJW.js → chunk-QBFBRV2B.js} +10 -4
- package/node_modules/pi-lens/dist/{chunk-CMMHNUZ2.js → chunk-R3T7CLQ2.js} +60 -38
- package/node_modules/pi-lens/dist/{chunk-23WOO7TX.js → chunk-R7YOCSNV.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-2CD5RS6M.js → chunk-RKBXZN3A.js} +23 -2
- package/node_modules/pi-lens/dist/{chunk-OCAGUNBC.js → chunk-RKKOYPRA.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-52FUZI6K.js → chunk-RMLC67LF.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-XMSXXAHW.js → chunk-ROYSX2S5.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-M6HSLBWY.js → chunk-RVK72CZX.js} +6507 -7514
- package/node_modules/pi-lens/dist/{chunk-FLKWCIZH.js → chunk-S2HEXIWI.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-UZ3TUTRV.js → chunk-S67KYG37.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VCO24T4L.js → chunk-SD4I7ZO4.js} +14 -14
- package/node_modules/pi-lens/dist/{chunk-Z527N6YQ.js → chunk-SKAMFC7A.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-MQLUAEOC.js → chunk-SRYEJNES.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-BRGDSBJE.js → chunk-SYE6T2EB.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-GXW6K4YJ.js → chunk-T57LYLZT.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ZXYDQ3TZ.js → chunk-T7FEBKXN.js} +48 -15
- package/node_modules/pi-lens/dist/{chunk-3EFKIGZN.js → chunk-TIQ2PKDW.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-QILIYSJF.js → chunk-TLX72JTG.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-TYM6OUIT.js → chunk-TOY6QKOH.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-IZSHAIJ7.js → chunk-TRETHTQO.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-3VPVG5SU.js → chunk-U44DJXQP.js} +10 -6
- package/node_modules/pi-lens/dist/{chunk-PNQDPDRC.js → chunk-UA7ZXYDR.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-OXXKQCSV.js → chunk-UBOQLVT2.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-QGQ5CCCG.js → chunk-UMS2MFPZ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-QHJ6DQ2R.js → chunk-US7ECLD7.js} +55 -13
- package/node_modules/pi-lens/dist/{chunk-AB3YYG6N.js → chunk-UZ2XCLYS.js} +8 -8
- package/node_modules/pi-lens/dist/chunk-V35JG4JB.js +2667 -0
- package/node_modules/pi-lens/dist/{chunk-N3X6Q4YT.js → chunk-VOOAPROD.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-SAEFPSB6.js → chunk-W66O5E25.js} +21 -11
- package/node_modules/pi-lens/dist/{chunk-KBG47GHP.js → chunk-WMYE35PX.js} +15 -11
- package/node_modules/pi-lens/dist/{chunk-5NGR67U5.js → chunk-XBJVAEEO.js} +32 -5
- package/node_modules/pi-lens/dist/{chunk-YYOIQFRS.js → chunk-XHJBS436.js} +122 -44
- package/node_modules/pi-lens/dist/{chunk-GBPP5P7X.js → chunk-XTBDCR27.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-4UNXBNE2.js → chunk-XTFDJI3T.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-UXGETRP4.js → chunk-XYURS6EN.js} +13 -12
- package/node_modules/pi-lens/dist/{chunk-RPLINGVB.js → chunk-Y6GZHWSJ.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-2VUQMUMT.js → chunk-YCWYO6TQ.js} +41 -38
- package/node_modules/pi-lens/dist/{chunk-77M37OKR.js → chunk-YH5MVY2U.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-AOHZU2BM.js → chunk-YNE3RP52.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-YSZNHOBY.js → chunk-ZHH37KZL.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-ZGDGW2V3.js → chunk-ZIVJBOO3.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-RXCOMYPY.js → chunk-ZVUL7QYY.js} +29 -28
- package/node_modules/pi-lens/dist/index.js +11052 -5852
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +10 -9
- package/node_modules/pi-lens/dist/mcp/cli.js +41 -38
- package/node_modules/pi-lens/dist/mcp/server.js +1120 -474
- package/node_modules/pi-lens/dist/mcp/worker.js +61 -58
- package/node_modules/pi-lens/dist/probes/installer.js +19 -19
- package/node_modules/pi-lens/dist/workers/project-snapshot-persist-worker.js +28 -9
- package/node_modules/pi-lens/dist/workers/review-graph-persist-worker.js +1 -1
- package/node_modules/pi-lens/docs/configuration.md +11 -0
- package/node_modules/pi-lens/docs/engineering-principles.md +32 -0
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +1 -1
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +15 -26
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +117 -13
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +97 -7
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +8 -2
- package/node_modules/pi-lens/docs/pi-lens-retro.md +4 -1
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +112 -4
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +22 -14
- package/node_modules/pi-lens/docs/release-qa-baseline.md +3 -1
- package/node_modules/pi-lens/docs/servercapabilities.md +9 -19
- package/node_modules/pi-lens/package.json +7 -5
- package/node_modules/pi-lens/scripts/download-grammars.js +40 -7
- package/node_modules/pi-lens/scripts/lib/latency-log-phases.mjs +95 -0
- package/node_modules/pi-lens/scripts/rpc-load-check.mjs +570 -81
- package/node_modules/pi-provider-qoder/dist/index.js +323 -154
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/node_modules/pi-web-access/CHANGELOG.md +60 -0
- package/node_modules/pi-web-access/README.md +96 -10
- package/node_modules/pi-web-access/anysearch.ts +4 -3
- package/node_modules/pi-web-access/bocha.ts +4 -3
- package/node_modules/pi-web-access/brightdata-unlocker.ts +3 -2
- package/node_modules/pi-web-access/brightdata.ts +4 -3
- package/node_modules/pi-web-access/ceramic.ts +3 -2
- package/node_modules/pi-web-access/credential-source.ts +54 -4
- package/node_modules/pi-web-access/curator-page.ts +5 -1
- package/node_modules/pi-web-access/curator-server.ts +2 -0
- package/node_modules/pi-web-access/deepseek.ts +377 -0
- package/node_modules/pi-web-access/dist/index.js +1463 -748
- package/node_modules/pi-web-access/dist/mcp-cli.js +1393 -717
- package/node_modules/pi-web-access/extract.ts +58 -6
- package/node_modules/pi-web-access/gemini-adc.ts +48 -1
- package/node_modules/pi-web-access/gemini-search.ts +33 -6
- package/node_modules/pi-web-access/index.ts +36 -4
- package/node_modules/pi-web-access/jina-search.ts +6 -4
- package/node_modules/pi-web-access/kagi.ts +5 -4
- package/node_modules/pi-web-access/keenable.ts +3 -2
- package/node_modules/pi-web-access/linkup.ts +170 -0
- package/node_modules/pi-web-access/mistral-search.ts +4 -3
- package/node_modules/pi-web-access/ollama.ts +5 -4
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/page-query.ts +12 -6
- package/node_modules/pi-web-access/parallel.ts +7 -7
- package/node_modules/pi-web-access/perplexity.ts +5 -3
- package/node_modules/pi-web-access/querit.ts +4 -3
- package/node_modules/pi-web-access/query-rewrite.ts +16 -13
- package/node_modules/pi-web-access/search1api.ts +4 -3
- package/node_modules/pi-web-access/searchinfinity.ts +4 -3
- package/node_modules/pi-web-access/serpapi.ts +7 -5
- package/node_modules/pi-web-access/serpbase.ts +5 -4
- package/node_modules/pi-web-access/serpdive.ts +4 -3
- package/node_modules/pi-web-access/serper.ts +6 -4
- package/node_modules/pi-web-access/serply.ts +3 -2
- package/node_modules/pi-web-access/summary-review.ts +16 -6
- package/node_modules/pi-web-access/utils.ts +27 -1
- package/node_modules/pi-web-access/valyu.ts +4 -3
- package/node_modules/pi-web-access/web-tool-core.ts +7 -0
- package/node_modules/pi-web-access/xai-search.ts +49 -7
- package/node_modules/pi-web-access/xcrawl.ts +4 -3
- package/node_modules/pi-web-access/you.ts +3 -2
- package/package.json +15 -15
- package/node_modules/pi-lens/dist/chunk-3YN6V5TV.js +0 -85
- package/node_modules/pi-lens/dist/chunk-466Z26MG.js +0 -30
- package/node_modules/pi-lens/dist/chunk-EC47DWFA.js +0 -56
- package/node_modules/pi-lens/dist/chunk-KDERNTCQ.js +0 -28
- package/node_modules/pi-lens/dist/chunk-KSX3TXSZ.js +0 -69
- package/node_modules/pi-lens/dist/chunk-LOP6GRPH.js +0 -31
- package/node_modules/pi-lens/dist/chunk-UOPVJQ4N.js +0 -103
- /package/node_modules/pi-lens/dist/{chunk-FC4RP4I2.js → chunk-6HWVI6MI.js} +0 -0
|
@@ -137,6 +137,19 @@ function registerCompatApiProvider(): void {
|
|
|
137
137
|
export default function (pi: ExtensionAPI): void {
|
|
138
138
|
registerCompatApiProvider();
|
|
139
139
|
|
|
140
|
+
// Print and RPC modes do not refresh catalogs before resolving --model. Refresh on
|
|
141
|
+
// session start so a stale 1.2.x cache is replaced before the prompt, and so the next
|
|
142
|
+
// headless process hydrates Gemini 4 from the persisted store (#93).
|
|
143
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
144
|
+
if (process.env.PI_OFFLINE !== undefined) return;
|
|
145
|
+
if (typeof ctx.modelRegistry?.refresh !== "function") return;
|
|
146
|
+
try {
|
|
147
|
+
await ctx.modelRegistry.refresh({ providers: [PROVIDER_ID] });
|
|
148
|
+
} catch {
|
|
149
|
+
// Last-known-good catalog stays in place. Forced refreshes still report via the command.
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
140
153
|
const initialCatalog = getCurrentAntigravityCatalog();
|
|
141
154
|
|
|
142
155
|
const providerConfig = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
import type {
|
|
2
3
|
Api,
|
|
3
4
|
Credential,
|
|
@@ -23,11 +24,14 @@ import {
|
|
|
23
24
|
|
|
24
25
|
export const DEFAULT_CATALOG_REFRESH_INTERVAL_MS = 4 * 60 * 60 * 1000;
|
|
25
26
|
export const ANTIGRAVITY_PERSIST_KEY = "pi-antigravity";
|
|
27
|
+
export const CATALOG_SCHEMA_VERSION = 2;
|
|
26
28
|
|
|
27
29
|
type PersistedAntigravityCatalog = {
|
|
28
30
|
catalog: AntigravityCatalog;
|
|
29
31
|
checkedAt: number;
|
|
30
32
|
modelEnums: Record<string, string>;
|
|
33
|
+
schemaVersion: number;
|
|
34
|
+
credentialKey: string;
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
export function getCatalogRefreshIntervalMs(): number {
|
|
@@ -66,10 +70,10 @@ export async function discoverAntigravityModels(
|
|
|
66
70
|
const available = await fetchAvailableModelsCatalog(creds.token, creds.projectId, signal);
|
|
67
71
|
const models = available.data.models;
|
|
68
72
|
if (!models || Object.keys(models).length === 0) {
|
|
69
|
-
|
|
73
|
+
throw new Error("Antigravity returned an empty or unrecognized model catalog");
|
|
70
74
|
}
|
|
71
75
|
registerDiscoveredModelEnums(models);
|
|
72
|
-
return buildAntigravityCatalog(models, fallbackCatalog());
|
|
76
|
+
return buildAntigravityCatalog(models, fallbackCatalog(), available.data.agentModelSorts);
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
export async function refreshAntigravityModels(
|
|
@@ -82,9 +86,26 @@ export async function refreshAntigravityModels(
|
|
|
82
86
|
const apiKey = apiKeyFromCredential(context.credential);
|
|
83
87
|
if (!apiKey || context.signal.aborted) return current.models;
|
|
84
88
|
|
|
89
|
+
// A different account/project or pre-upgrade cache must not suppress a fresh
|
|
90
|
+
// discovery. Keep hydration above so offline startup still has usable models.
|
|
91
|
+
const credentialKey = createHash("sha256")
|
|
92
|
+
.update(
|
|
93
|
+
JSON.stringify([
|
|
94
|
+
context.credential?.type === "oauth" ? context.credential.refresh : apiKey,
|
|
95
|
+
parseApiKey(apiKey).projectId,
|
|
96
|
+
]),
|
|
97
|
+
)
|
|
98
|
+
.digest("hex");
|
|
99
|
+
const stored: unknown = context.stored;
|
|
100
|
+
const persisted = isRecord(stored) ? stored[ANTIGRAVITY_PERSIST_KEY] : undefined;
|
|
101
|
+
const sameSource =
|
|
102
|
+
isRecord(persisted) &&
|
|
103
|
+
persisted.schemaVersion === CATALOG_SCHEMA_VERSION &&
|
|
104
|
+
persisted.credentialKey === credentialKey;
|
|
85
105
|
const now = Date.now();
|
|
86
106
|
if (
|
|
87
107
|
!context.force &&
|
|
108
|
+
sameSource &&
|
|
88
109
|
checkedAt > 0 &&
|
|
89
110
|
now >= checkedAt &&
|
|
90
111
|
now - checkedAt < getCatalogRefreshIntervalMs()
|
|
@@ -106,6 +127,8 @@ export async function refreshAntigravityModels(
|
|
|
106
127
|
catalog: next,
|
|
107
128
|
checkedAt: refreshedAt,
|
|
108
129
|
modelEnums: snapshotDynamicModelEnums(),
|
|
130
|
+
schemaVersion: CATALOG_SCHEMA_VERSION,
|
|
131
|
+
credentialKey,
|
|
109
132
|
} satisfies PersistedAntigravityCatalog,
|
|
110
133
|
} as unknown as ModelsStoreEntry,
|
|
111
134
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { ThinkingEffort } from "../types/enums.js";
|
|
3
3
|
import type { AntigravityRouting, ModelInfoRaw } from "../types/types.js";
|
|
4
|
+
import { isRecord } from "../utils/util.js";
|
|
4
5
|
|
|
5
6
|
export type AntigravityCatalog = {
|
|
6
7
|
models: ProviderModelConfig[];
|
|
@@ -17,6 +18,8 @@ type RuntimeGroup = {
|
|
|
17
18
|
/** Catalog capability: true/false when advertised, undefined when omitted. */
|
|
18
19
|
supportsThinking?: boolean;
|
|
19
20
|
supportsImages?: boolean;
|
|
21
|
+
contextWindow?: number;
|
|
22
|
+
maxOutputTokens?: number;
|
|
20
23
|
};
|
|
21
24
|
|
|
22
25
|
const THINKING_SUFFIXES: Array<{ suffix: string; level: ThinkingLevel }> = [
|
|
@@ -39,12 +42,6 @@ const DISPLAY_LEVELS: Array<{ pattern: RegExp; level: ThinkingLevel }> = [
|
|
|
39
42
|
{ pattern: /\(\s*low\s*\)/i, level: ThinkingEffort.Low },
|
|
40
43
|
];
|
|
41
44
|
|
|
42
|
-
/** Known backend aliases whose runtime IDs do not share a thinking suffix with the public family. */
|
|
43
|
-
const RUNTIME_ALIASES: Record<string, { publicId: string; level: ThinkingLevel }> = {
|
|
44
|
-
"gemini-3-flash-agent": { publicId: "gemini-3.5-flash", level: ThinkingEffort.High },
|
|
45
|
-
"gemini-pro-agent": { publicId: "gemini-3.1-pro", level: ThinkingEffort.High },
|
|
46
|
-
};
|
|
47
|
-
|
|
48
45
|
const PI_LEVELS = [
|
|
49
46
|
ThinkingEffort.Off,
|
|
50
47
|
ThinkingEffort.Minimal,
|
|
@@ -57,12 +54,11 @@ const PI_LEVELS = [
|
|
|
57
54
|
|
|
58
55
|
const ZERO_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
|
59
56
|
|
|
60
|
-
export function isSelectableRuntimeModelId(id: string): boolean {
|
|
61
|
-
if (!/^
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
57
|
+
export function isSelectableRuntimeModelId(id: string, info?: ModelInfoRaw): boolean {
|
|
58
|
+
if (!/^[a-z0-9][a-z0-9_.-]*$/i.test(id) || /^MODEL_/i.test(id)) return false;
|
|
64
59
|
if (/^(chat_|tab_)/i.test(id)) return false;
|
|
65
|
-
if (/image/i.test(id)) return false;
|
|
60
|
+
if (/image/i.test(id) || /image/i.test(modelDisplayName(info) ?? "")) return false;
|
|
61
|
+
if (info?.isInternal === true || info?.apiProvider === "API_PROVIDER_INTERNAL") return false;
|
|
66
62
|
return true;
|
|
67
63
|
}
|
|
68
64
|
|
|
@@ -74,69 +70,84 @@ export function resolvedCatalog(
|
|
|
74
70
|
return current;
|
|
75
71
|
}
|
|
76
72
|
|
|
73
|
+
export function extractRecommendedModelIds(agentModelSorts: unknown): Set<string> | undefined {
|
|
74
|
+
if (!Array.isArray(agentModelSorts) || agentModelSorts.length === 0) return undefined;
|
|
75
|
+
const ids = new Set<string>();
|
|
76
|
+
for (const sort of agentModelSorts) {
|
|
77
|
+
if (!isRecord(sort)) continue;
|
|
78
|
+
const groups = Array.isArray(sort.groups) ? sort.groups : [];
|
|
79
|
+
for (const group of groups) {
|
|
80
|
+
if (!isRecord(group) || !Array.isArray(group.modelIds)) continue;
|
|
81
|
+
for (const id of group.modelIds) {
|
|
82
|
+
if (typeof id === "string" && id) ids.add(id);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return ids.size > 0 ? ids : undefined;
|
|
87
|
+
}
|
|
88
|
+
|
|
77
89
|
export function buildAntigravityCatalog(
|
|
78
90
|
rawModels: Record<string, ModelInfoRaw>,
|
|
79
91
|
fallback: AntigravityCatalog,
|
|
92
|
+
agentModelSorts?: unknown,
|
|
80
93
|
): AntigravityCatalog {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
const recommendedIds = extractRecommendedModelIds(agentModelSorts);
|
|
95
|
+
|
|
96
|
+
function collectGroups(filterIds?: Set<string>): Map<string, RuntimeGroup> {
|
|
97
|
+
const collected = new Map<string, RuntimeGroup>();
|
|
98
|
+
|
|
99
|
+
for (const [runtimeId, info] of Object.entries(rawModels)) {
|
|
100
|
+
if (!isSelectableRuntimeModelId(runtimeId, info)) continue;
|
|
101
|
+
if (info?.isInternal) continue;
|
|
102
|
+
if (filterIds && !filterIds.has(runtimeId)) continue;
|
|
103
|
+
|
|
104
|
+
const displayName = modelDisplayName(info);
|
|
105
|
+
if (runtimeId.endsWith("-tiered")) {
|
|
106
|
+
const baseId = runtimeId.slice(0, -"-tiered".length);
|
|
107
|
+
const group = ensureGroup(collected, baseId);
|
|
108
|
+
absorbMetadata(group, info, displayName);
|
|
109
|
+
if (!group.unsuffixed) group.unsuffixed = runtimeId;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const suffix = parseThinkingSuffix(runtimeId);
|
|
114
|
+
const publicId = suffix?.baseId ?? runtimeId;
|
|
115
|
+
const group = ensureGroup(collected, publicId);
|
|
91
116
|
absorbMetadata(group, info, displayName);
|
|
92
|
-
if (!group.unsuffixed) group.unsuffixed = runtimeId;
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
117
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
absorbMetadata(group, info, displayName);
|
|
118
|
+
const level = levelFromDisplayName(displayName) ?? suffix?.level;
|
|
119
|
+
if (level) group.variants[level] = runtimeId;
|
|
120
|
+
else group.unsuffixed = runtimeId;
|
|
121
|
+
}
|
|
101
122
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
else group.unsuffixed = runtimeId;
|
|
123
|
+
mergeAgentSingletons(collected);
|
|
124
|
+
return collected;
|
|
105
125
|
}
|
|
106
126
|
|
|
107
|
-
|
|
127
|
+
let groups = collectGroups(recommendedIds);
|
|
128
|
+
if (groups.size === 0 && recommendedIds) {
|
|
129
|
+
groups = collectGroups();
|
|
130
|
+
}
|
|
108
131
|
|
|
109
|
-
if (groups.size === 0)
|
|
132
|
+
if (groups.size === 0) throw new Error("Antigravity catalog contains no supported chat models");
|
|
110
133
|
|
|
111
134
|
const models: ProviderModelConfig[] = [];
|
|
112
135
|
const routing: Record<string, AntigravityRouting> = {};
|
|
113
136
|
|
|
114
137
|
for (const group of groups.values()) {
|
|
115
|
-
const fallbackModel = fallback.models.find((model) => model.id === group.publicId);
|
|
116
|
-
const fallbackRouting = fallback.routing[group.publicId];
|
|
117
|
-
if (fallbackModel && fallbackRouting) {
|
|
118
|
-
models.push(fallbackModel);
|
|
119
|
-
routing[group.publicId] = fallbackRouting;
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
138
|
const synthesized = synthesizeModel(group, fallback.models);
|
|
124
139
|
models.push(synthesized.model);
|
|
125
140
|
routing[group.publicId] = synthesized.routing;
|
|
126
141
|
}
|
|
127
142
|
|
|
128
|
-
for (const fallbackModel of fallback.models) {
|
|
129
|
-
if (routing[fallbackModel.id]) continue;
|
|
130
|
-
const fallbackRouting = fallback.routing[fallbackModel.id];
|
|
131
|
-
if (!fallbackRouting) continue;
|
|
132
|
-
models.push(fallbackModel);
|
|
133
|
-
routing[fallbackModel.id] = fallbackRouting;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
143
|
models.sort(comparePublicModels);
|
|
137
144
|
return { models, routing };
|
|
138
145
|
}
|
|
139
146
|
|
|
147
|
+
function positiveTokenLimit(value: unknown): number | undefined {
|
|
148
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : undefined;
|
|
149
|
+
}
|
|
150
|
+
|
|
140
151
|
function ensureGroup(groups: Map<string, RuntimeGroup>, publicId: string): RuntimeGroup {
|
|
141
152
|
const existing = groups.get(publicId);
|
|
142
153
|
if (existing) return existing;
|
|
@@ -155,20 +166,34 @@ function absorbMetadata(
|
|
|
155
166
|
displayName: string | undefined,
|
|
156
167
|
): void {
|
|
157
168
|
if (displayName) group.displayNames.push(displayName);
|
|
169
|
+
// A public model can route to any variant. Advertise the smallest supplied
|
|
170
|
+
// limit so every route remains within the server's advertised capabilities.
|
|
171
|
+
const contextWindow = positiveTokenLimit(info?.maxTokens);
|
|
172
|
+
const maxOutputTokens = positiveTokenLimit(info?.maxOutputTokens);
|
|
173
|
+
if (contextWindow !== undefined) {
|
|
174
|
+
group.contextWindow = Math.min(group.contextWindow ?? contextWindow, contextWindow);
|
|
175
|
+
}
|
|
176
|
+
if (maxOutputTokens !== undefined) {
|
|
177
|
+
group.maxOutputTokens = Math.min(group.maxOutputTokens ?? maxOutputTokens, maxOutputTokens);
|
|
178
|
+
}
|
|
158
179
|
if (info?.supportsThinking === true) group.supportsThinking = true;
|
|
159
180
|
else if (info?.supportsThinking === false && group.supportsThinking !== true) {
|
|
160
181
|
group.supportsThinking = false;
|
|
161
182
|
}
|
|
162
|
-
if (info?.supportsImages ===
|
|
163
|
-
if (info?.supportsImages ===
|
|
164
|
-
group.supportsImages =
|
|
183
|
+
if (info?.supportsImages === false) group.supportsImages = false;
|
|
184
|
+
else if (info?.supportsImages === true && group.supportsImages === undefined) {
|
|
185
|
+
group.supportsImages = true;
|
|
165
186
|
}
|
|
166
187
|
}
|
|
167
188
|
|
|
168
189
|
function mergeAgentSingletons(groups: Map<string, RuntimeGroup>): void {
|
|
169
190
|
for (const [publicId, group] of [...groups.entries()]) {
|
|
170
|
-
if (!publicId.endsWith("-agent")) continue;
|
|
171
|
-
|
|
191
|
+
if (!publicId.endsWith("-agent") || group.supportsThinking === false) continue;
|
|
192
|
+
const runtimeIds = [group.unsuffixed, ...Object.values(group.variants)].filter(
|
|
193
|
+
(id): id is string => id !== undefined,
|
|
194
|
+
);
|
|
195
|
+
if (runtimeIds.length !== 1) continue;
|
|
196
|
+
const [runtimeId] = runtimeIds;
|
|
172
197
|
const family = displayFamily(group.displayNames[0]);
|
|
173
198
|
if (!family) continue;
|
|
174
199
|
const target = [...groups.values()].find(
|
|
@@ -176,10 +201,23 @@ function mergeAgentSingletons(groups: Map<string, RuntimeGroup>): void {
|
|
|
176
201
|
candidate.publicId !== publicId &&
|
|
177
202
|
candidate.displayNames.some((name) => displayFamily(name) === family),
|
|
178
203
|
);
|
|
179
|
-
if (!target
|
|
180
|
-
const level =
|
|
181
|
-
|
|
182
|
-
|
|
204
|
+
if (!target) continue;
|
|
205
|
+
const level =
|
|
206
|
+
(Object.keys(group.variants) as ThinkingLevel[]).find(
|
|
207
|
+
(candidate) => group.variants[candidate] === runtimeId,
|
|
208
|
+
) ?? levelFromDisplayName(group.displayNames[0]);
|
|
209
|
+
if (!level || target.variants[level]) continue;
|
|
210
|
+
target.variants[level] = runtimeId;
|
|
211
|
+
absorbMetadata(
|
|
212
|
+
target,
|
|
213
|
+
{
|
|
214
|
+
supportsThinking: group.supportsThinking,
|
|
215
|
+
supportsImages: group.supportsImages,
|
|
216
|
+
maxTokens: group.contextWindow,
|
|
217
|
+
maxOutputTokens: group.maxOutputTokens,
|
|
218
|
+
},
|
|
219
|
+
group.displayNames[0],
|
|
220
|
+
);
|
|
183
221
|
groups.delete(publicId);
|
|
184
222
|
}
|
|
185
223
|
}
|
|
@@ -229,9 +267,11 @@ function synthesizeModel(
|
|
|
229
267
|
const routing = routingFromVariants(group.publicId, group.variants, group.unsuffixed);
|
|
230
268
|
const supportsImages = group.supportsImages ?? template?.input.includes("image") ?? true;
|
|
231
269
|
const reasoning =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
270
|
+
group.supportsThinking === false
|
|
271
|
+
? false
|
|
272
|
+
: advertisedLevels.size > 0 ||
|
|
273
|
+
group.supportsThinking === true ||
|
|
274
|
+
(group.supportsThinking === undefined && Boolean(template?.reasoning));
|
|
235
275
|
return {
|
|
236
276
|
model: {
|
|
237
277
|
id: group.publicId,
|
|
@@ -240,19 +280,19 @@ function synthesizeModel(
|
|
|
240
280
|
thinkingLevelMap: reasoning ? thinkingLevelMapFromLevels(advertisedLevels) : undefined,
|
|
241
281
|
input: supportsImages ? ["text", "image"] : ["text"],
|
|
242
282
|
cost: template?.cost ?? ZERO_COST,
|
|
243
|
-
contextWindow: template?.contextWindow ?? 128000,
|
|
244
|
-
maxTokens: template?.maxTokens ?? 8192,
|
|
283
|
+
contextWindow: group.contextWindow ?? template?.contextWindow ?? 128000,
|
|
284
|
+
maxTokens: group.maxOutputTokens ?? template?.maxTokens ?? 8192,
|
|
245
285
|
},
|
|
246
286
|
routing,
|
|
247
287
|
};
|
|
248
288
|
}
|
|
249
289
|
|
|
250
290
|
function advertisedThinkingLevels(group: RuntimeGroup): Set<string> {
|
|
291
|
+
// An explicit denial overrides levels inferred from display names or suffixes.
|
|
292
|
+
if (group.supportsThinking === false) return new Set();
|
|
251
293
|
const levels = new Set(Object.keys(group.variants));
|
|
252
294
|
if (levels.size > 0) return levels;
|
|
253
|
-
|
|
254
|
-
if (group.supportsThinking === false) return levels;
|
|
255
|
-
if (group.supportsThinking === true || group.unsuffixed) {
|
|
295
|
+
if (group.supportsThinking === true) {
|
|
256
296
|
levels.add(ThinkingEffort.High);
|
|
257
297
|
}
|
|
258
298
|
return levels;
|
|
@@ -327,7 +367,6 @@ function thinkingLevelMapFromLevels(levels: Set<string>): ProviderModelConfig["t
|
|
|
327
367
|
for (const level of PI_LEVELS) {
|
|
328
368
|
map[level] = levels.has(level) ? level : null;
|
|
329
369
|
}
|
|
330
|
-
if (levels.size === 0) map.high = "high";
|
|
331
370
|
return map;
|
|
332
371
|
}
|
|
333
372
|
|
|
@@ -149,6 +149,9 @@ export const RUNTIME_MAX_OUTPUT_TOKENS: Record<string, number> = {
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
export function getMaxOutputTokens(modelId: string, runtimeModel?: string): number {
|
|
152
|
+
// Refreshed (and restored) catalog limits take precedence over static defaults.
|
|
153
|
+
const discovered = currentModels.find((model) => model.id === modelId);
|
|
154
|
+
if (currentModels !== ANTIGRAVITY_MODELS && discovered) return discovered.maxTokens;
|
|
152
155
|
if (runtimeModel && RUNTIME_MAX_OUTPUT_TOKENS[runtimeModel] !== undefined) {
|
|
153
156
|
return RUNTIME_MAX_OUTPUT_TOKENS[runtimeModel];
|
|
154
157
|
}
|
|
@@ -490,6 +493,13 @@ export function getThinkingConfig(
|
|
|
490
493
|
thinkingBudget: effort === "high" || effort === "xhigh" ? 10_001 : 1_001,
|
|
491
494
|
};
|
|
492
495
|
}
|
|
496
|
+
// Gemini 4 Argon rejects thinkingBudget 0 and any budget under 1000 (#93).
|
|
497
|
+
if (modelId.includes("argon") || modelId.startsWith("gemini-4")) {
|
|
498
|
+
if (!effort || effort === "off") return undefined;
|
|
499
|
+
const thinkingBudget =
|
|
500
|
+
effort === "high" || effort === "xhigh" ? -1 : effort === "medium" ? 4_000 : 1_000;
|
|
501
|
+
return { includeThoughts: true, thinkingBudget };
|
|
502
|
+
}
|
|
493
503
|
if (modelId.startsWith("gemini-")) {
|
|
494
504
|
if (!effort || effort === "off") return { includeThoughts: false, thinkingBudget: 0 };
|
|
495
505
|
const thinkingBudget =
|