@herbertgao/pi-extensions 2026.11.10 → 2026.11.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/CHANGELOG.md +31 -0
- package/README.md +10 -10
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +16 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -4
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +22 -15
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +22 -8
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +0 -29
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +5 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +73 -47
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +0 -40
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-parse.ts +4 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +79 -18
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/tool-io.ts +0 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +18 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/format.ts +15 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +12 -0
- package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +4 -2
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/animate.md +17 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.md +12 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.native.md +4 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique-rubric.md +496 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +13 -505
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/documenter.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/finish-reviewer.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/motion-reviewer.md +29 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/distill.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/document.md +3 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/foundations.md +44 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/hooks.md +3 -3
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live-setup.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live.md +26 -12
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-comp.md +24 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work-world.md +20 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +9 -37
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/onboard.md +7 -6
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/overdrive.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/quieter.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/typeset.md +6 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/visualize.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable +69 -16
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable.cmd +55 -7
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +51 -22
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +27 -9
- package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +11 -11
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +13 -0
- package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +51 -32
- package/node_modules/@herbertgao/pi-subagents/src/default-agents.ts +7 -0
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +334 -893
- package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +4 -1
- package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +13 -0
- package/node_modules/@herbertgao/pi-subagents/src/schedule-store.ts +18 -13
- package/node_modules/@herbertgao/pi-subagents/src/schedule.ts +25 -5
- package/node_modules/@herbertgao/pi-subagents/src/settings.ts +215 -69
- package/node_modules/@herbertgao/pi-subagents/src/types.ts +17 -0
- package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +9 -0
- package/node_modules/@herbertgao/pi-subagents/src/ui/agents-menu.ts +705 -0
- package/node_modules/@herbertgao/pi-subagents/src/ui/settings-menu.ts +361 -0
- package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +1 -1
- package/node_modules/pi-antigravity/README.md +58 -9
- package/node_modules/pi-antigravity/docs/reader-guarantees.md +35 -0
- package/node_modules/pi-antigravity/package.json +15 -6
- package/node_modules/pi-antigravity/src/client/client.ts +63 -14
- package/node_modules/pi-antigravity/src/client/enterprise.ts +150 -0
- package/node_modules/pi-antigravity/src/client/index.ts +1 -0
- package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +7 -0
- package/node_modules/pi-antigravity/src/features/generate-image.ts +56 -2
- package/node_modules/pi-antigravity/src/features/read-url-content.ts +124 -0
- package/node_modules/pi-antigravity/src/image/image.ts +16 -2
- package/node_modules/pi-antigravity/src/index.ts +145 -2
- package/node_modules/pi-antigravity/src/models/discovery.ts +3 -4
- package/node_modules/pi-antigravity/src/models/grouping.ts +39 -15
- package/node_modules/pi-antigravity/src/models/models.ts +126 -14
- package/node_modules/pi-antigravity/src/stream/stream.ts +189 -30
- package/node_modules/pi-antigravity/src/types/types.ts +30 -1
- package/node_modules/pi-antigravity/src/usage/usage.ts +58 -0
- package/node_modules/pi-antigravity/src/utils/address.ts +180 -0
- package/node_modules/pi-antigravity/src/utils/credits.ts +149 -0
- package/node_modules/pi-antigravity/src/utils/html.ts +31 -0
- package/node_modules/pi-antigravity/src/utils/index.ts +2 -0
- package/node_modules/pi-antigravity/src/utils/security.ts +172 -13
- package/node_modules/pi-antigravity/src/utils/text.ts +66 -0
- package/node_modules/pi-antigravity/src/utils/util.ts +5 -4
- package/node_modules/pi-antigravity/src/web-fetch/document.ts +83 -0
- package/node_modules/pi-antigravity/src/web-fetch/fences.ts +24 -0
- package/node_modules/pi-antigravity/src/web-fetch/header.ts +97 -0
- package/node_modules/pi-antigravity/src/web-fetch/index.ts +3 -0
- package/node_modules/pi-antigravity/src/web-fetch/inspect.ts +328 -0
- package/node_modules/pi-antigravity/src/web-fetch/limits.ts +4 -0
- package/node_modules/pi-antigravity/src/web-fetch/markdown.ts +744 -0
- package/node_modules/pi-antigravity/src/web-fetch/mdn.ts +164 -0
- package/node_modules/pi-antigravity/src/web-fetch/media.ts +11 -0
- package/node_modules/pi-antigravity/src/web-fetch/metadata.ts +9 -0
- package/node_modules/pi-antigravity/src/web-fetch/representation.ts +93 -0
- package/node_modules/pi-antigravity/src/web-fetch/save.ts +71 -0
- package/node_modules/pi-antigravity/src/web-fetch/sites.ts +138 -0
- package/node_modules/pi-antigravity/src/web-fetch/vendor.d.ts +9 -0
- package/node_modules/pi-antigravity/src/web-fetch/web-fetch.ts +957 -0
- package/node_modules/pi-antigravity/tsconfig.json +2 -2
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +21 -1
- package/node_modules/pi-commandcode-provider/README.md +2 -2
- package/node_modules/pi-commandcode-provider/index.ts +2 -1
- package/node_modules/pi-commandcode-provider/package.json +5 -4
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +15 -9
- package/node_modules/pi-commandcode-provider/src/oauth.ts +69 -12
- package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -1
- package/node_modules/pi-commandcode-provider/src/responses-compat.ts +137 -0
- package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
- package/node_modules/pi-lens/CHANGELOG.md +172 -0
- package/node_modules/pi-lens/README.md +103 -217
- package/node_modules/pi-lens/dist/{chunk-KXDQD34C.js → chunk-27JQHK7Y.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-W6VLB6LL.js → chunk-2APSZHHI.js} +61 -3
- package/node_modules/pi-lens/dist/{chunk-5EEWCJG7.js → chunk-2H5GHZKC.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-TS5EIWEF.js → chunk-2H7NFZ4Q.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-6GWCYEP7.js → chunk-37IDWT6O.js} +64 -16
- package/node_modules/pi-lens/dist/{chunk-OEPWTSUG.js → chunk-3PAS2ERX.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-ET3DSSFZ.js → chunk-3PO4YYOX.js} +9 -17
- package/node_modules/pi-lens/dist/{chunk-C6V2DSZZ.js → chunk-3QXFUP6T.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-HWMNTQBJ.js → chunk-3TSMQZG6.js} +32 -11
- package/node_modules/pi-lens/dist/{chunk-QY6J2FTK.js → chunk-4DAHGU3V.js} +15 -14
- package/node_modules/pi-lens/dist/{chunk-PCREZ4HJ.js → chunk-4IZZEN63.js} +33 -34
- package/node_modules/pi-lens/dist/{chunk-OYXD2MOM.js → chunk-5HBQL7DH.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-B4FAFEBP.js → chunk-5JB4WENL.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +56 -0
- package/node_modules/pi-lens/dist/{chunk-GHATCG2A.js → chunk-6CFSDLHE.js} +22 -18
- package/node_modules/pi-lens/dist/{chunk-FVQKX5KI.js → chunk-6E5QLMWI.js} +24 -22
- package/node_modules/pi-lens/dist/{chunk-AVBEPUCD.js → chunk-6GLMMGCX.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-YTXFNCVN.js → chunk-74AMPWNC.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-K2GV34T2.js → chunk-7CLWC2UH.js} +26 -37
- package/node_modules/pi-lens/dist/{chunk-MOEWCPMC.js → chunk-7DPXUPRF.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-7BEADGAZ.js → chunk-7U36VQL6.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-PPYUBO6Y.js → chunk-7WKVCZI4.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ILC2B7IJ.js → chunk-7ZVTFLCC.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-IT7MFVGP.js → chunk-ADYQRETD.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-NCDH2JB7.js → chunk-ARTYCUGF.js} +25 -10
- package/node_modules/pi-lens/dist/{chunk-Z6WTLVUL.js → chunk-AXAR5ZW2.js} +225 -104
- package/node_modules/pi-lens/dist/{chunk-PK3GDU4M.js → chunk-AZG5UJYY.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-NRVWLTOY.js → chunk-B2OXE4AH.js} +60 -21
- package/node_modules/pi-lens/dist/{chunk-ORYQGVC3.js → chunk-B42AIWPJ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-IC4L65U7.js → chunk-BBSDJTOV.js} +12 -13
- package/node_modules/pi-lens/dist/{chunk-HJWF7CGW.js → chunk-BKWFDWYM.js} +16 -16
- package/node_modules/pi-lens/dist/{chunk-D2ZYRI7M.js → chunk-C5PLBTNR.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-SRXYSLMW.js → chunk-CQY2HEH7.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-7424ANRU.js → chunk-CXQYK4YT.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-HYR25MV3.js → chunk-CZJGAOKL.js} +8 -7
- package/node_modules/pi-lens/dist/{chunk-DIIDMDZU.js → chunk-DCA2MXVQ.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-K2LD6YNH.js → chunk-DFKOA74L.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-AYDE7RFV.js → chunk-DI4AZZNY.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6EXGCXM5.js → chunk-G53LBDNU.js} +99 -5
- package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-5KLRCUDT.js → chunk-H5API74E.js} +6 -6
- package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-JRSS6KM4.js → chunk-HIJ4CHFF.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-3MHY4BQY.js → chunk-HIRBC72R.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-F7AMFFVK.js → chunk-HRLF35WL.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-HSTN27NR.js → chunk-I2FYOZNW.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-5FDUKJZO.js → chunk-I3NZVAMN.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-NZINZCHB.js → chunk-INBK3HIT.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-PXGVB2CY.js → chunk-J2ZB5MDS.js} +20 -18
- package/node_modules/pi-lens/dist/{chunk-HYDJUVOE.js → chunk-JGUDT5KD.js} +4 -4
- package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +88 -0
- package/node_modules/pi-lens/dist/{chunk-AZXTLZHE.js → chunk-K4Z7MK6T.js} +169 -165
- package/node_modules/pi-lens/dist/{chunk-WTSQKJAR.js → chunk-K7O6AHSJ.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-S6ZQFPOX.js → chunk-KNJH6WJQ.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-SUIZOCSY.js → chunk-KNSOA43J.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-3QMLB4TI.js → chunk-KXGTLAUW.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-OHEUOWYT.js → chunk-KZ732ZVW.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-G3LR6V6N.js → chunk-L6BDRYUK.js} +19 -17
- package/node_modules/pi-lens/dist/{chunk-OVPR3GQ6.js → chunk-LGH2HHZG.js} +24 -6
- package/node_modules/pi-lens/dist/{chunk-3R3Z54J7.js → chunk-LOEJFTF2.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-HGEE5LDW.js → chunk-LQQNFCQJ.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-LVLPA32Q.js +810 -0
- package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +73 -0
- package/node_modules/pi-lens/dist/{chunk-Z2W5YJBW.js → chunk-MJRGPEQ5.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-3EIZMRXI.js → chunk-MOAVEPC4.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-TOOXNL6M.js → chunk-NGNBJIUO.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-AGEQRJ5A.js → chunk-NHA5K226.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-YLW26OHX.js → chunk-NNEQOC3U.js} +31 -59
- package/node_modules/pi-lens/dist/{chunk-ZWZD4TJ5.js → chunk-O2MHF7QM.js} +35 -36
- package/node_modules/pi-lens/dist/{chunk-PTJXMYRY.js → chunk-OLWGYBYT.js} +15 -16
- package/node_modules/pi-lens/dist/{chunk-JKAVKTMY.js → chunk-OZQQ3AIR.js} +17 -20
- package/node_modules/pi-lens/dist/{chunk-6JLNZ6DP.js → chunk-P5MSLVUW.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-OF2YGDUE.js → chunk-PFJLYRO3.js} +37 -38
- package/node_modules/pi-lens/dist/chunk-PKWEBMCA.js +2957 -0
- package/node_modules/pi-lens/dist/{chunk-JLMS7EMD.js → chunk-PPQHMSPH.js} +16 -15
- package/node_modules/pi-lens/dist/{chunk-6EIV3H7O.js → chunk-PQF6YGYB.js} +12 -5
- package/node_modules/pi-lens/dist/{chunk-VU2PRGRI.js → chunk-PQXUZYTQ.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-MV6ST2KT.js → chunk-Q7J3JYJ2.js} +13 -12
- package/node_modules/pi-lens/dist/{chunk-BMMRLJA4.js → chunk-QE5DJ7MX.js} +27 -10
- package/node_modules/pi-lens/dist/{chunk-IZ36G463.js → chunk-QE7BJQ6K.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-E5SSUV2A.js → chunk-QMWKSYWB.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-QJ4T73J5.js → chunk-QV3JPCMK.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-3PMLYGJN.js → chunk-R4L7KZ7R.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-7ZVEFWOE.js → chunk-RIH3UBK4.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-T5EGSBM2.js → chunk-RJ3APNIP.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-AAIVSSUU.js → chunk-S6MCMD27.js} +35 -12
- package/node_modules/pi-lens/dist/{chunk-SF7KSXB5.js → chunk-SCU62JLX.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-FDLGJFAE.js → chunk-SDYLT45T.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-Y7XMKBFP.js → chunk-TKOFTLGB.js} +34 -26
- package/node_modules/pi-lens/dist/chunk-TQWRH25U.js +35 -0
- package/node_modules/pi-lens/dist/{chunk-DZSQXG66.js → chunk-TWEOJE3D.js} +277 -62
- package/node_modules/pi-lens/dist/{chunk-R67WQ5RY.js → chunk-UN72ZAJ5.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-AD7JDEI6.js → chunk-UNP6Y4JV.js} +16 -16
- package/node_modules/pi-lens/dist/{chunk-D6ANA6YU.js → chunk-VGRGW4UL.js} +63 -55
- package/node_modules/pi-lens/dist/{chunk-DFAY7JUN.js → chunk-VSQT6IHZ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-7T64QA5D.js → chunk-VWEBZ2JV.js} +39 -38
- package/node_modules/pi-lens/dist/{chunk-HRQTYU2T.js → chunk-W26QZ3OM.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-2HWVG3IM.js → chunk-XDNWR7SG.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-75TVYCQW.js → chunk-XSC3BCN3.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-ME6MF2N2.js → chunk-YCR6ZYTE.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-LD7SXICE.js → chunk-ZI7YHV6I.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-E3PNZDPH.js → chunk-ZQSSO7LO.js} +33 -1
- package/node_modules/pi-lens/dist/{chunk-T6PPK3T6.js → chunk-ZULZS2I6.js} +385 -407
- package/node_modules/pi-lens/dist/index.js +6508 -5413
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +9 -9
- package/node_modules/pi-lens/dist/mcp/cli.js +39 -38
- package/node_modules/pi-lens/dist/mcp/server.js +602 -345
- package/node_modules/pi-lens/dist/mcp/worker.js +57 -58
- package/node_modules/pi-lens/dist/probes/installer.js +19 -17
- package/node_modules/pi-lens/docs/architecture.md +113 -0
- package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +2 -2
- package/node_modules/pi-lens/docs/ci.md +18 -4
- package/node_modules/pi-lens/docs/defect-shapes.md +41 -3
- package/node_modules/pi-lens/docs/dependencies.md +10 -10
- package/node_modules/pi-lens/docs/features.md +3 -3
- package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -1
- package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +19 -0
- package/node_modules/pi-lens/docs/language-coverage.md +39 -0
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +10 -4
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +4 -0
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -1
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +4 -5
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +5 -2
- package/node_modules/pi-lens/docs/prose-standard.md +112 -0
- package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
- package/node_modules/pi-lens/docs/usage.md +50 -0
- package/node_modules/pi-lens/package.json +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
- package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
- package/node_modules/pi-web-access/CHANGELOG.md +29 -0
- package/node_modules/pi-web-access/README.md +35 -15
- package/node_modules/pi-web-access/anysearch.ts +7 -3
- package/node_modules/pi-web-access/autom.ts +196 -0
- package/node_modules/pi-web-access/cloro.ts +254 -0
- package/node_modules/pi-web-access/curator-page.ts +7 -1
- package/node_modules/pi-web-access/curator-server.ts +3 -0
- package/node_modules/pi-web-access/dist/index.js +12931 -12111
- package/node_modules/pi-web-access/dist/mcp-cli.js +1188 -416
- package/node_modules/pi-web-access/domain-filter-normalization.ts +30 -0
- package/node_modules/pi-web-access/duckduckgo-rate-limit.ts +144 -34
- package/node_modules/pi-web-access/duckduckgo.ts +11 -3
- package/node_modules/pi-web-access/extract.ts +60 -4
- package/node_modules/pi-web-access/gemini-search.ts +25 -5
- package/node_modules/pi-web-access/index.ts +9 -1
- package/node_modules/pi-web-access/package.json +2 -2
- package/node_modules/pi-web-access/page-query.ts +12 -3
- package/node_modules/pi-web-access/specstream.ts +276 -0
- package/node_modules/pi-web-access/tool-activation.ts +21 -6
- package/node_modules/pi-web-access/utils.ts +4 -0
- package/node_modules/pi-web-access/video-extract.ts +2 -2
- package/node_modules/pi-web-access/web-tool-core.ts +24 -5
- package/node_modules/pi-web-access/youtube-extract.ts +2 -2
- package/package.json +11 -8
- package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +0 -72
- package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +0 -28
- package/node_modules/pi-lens/dist/chunk-7M64NTAK.js +0 -38
- package/node_modules/pi-lens/dist/chunk-BEIPWPVR.js +0 -1037
- package/node_modules/pi-lens/dist/chunk-D7OEGXDX.js +0 -2417
- package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +0 -89
- package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +0 -28
- package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +0 -56
- package/node_modules/pi-lens/dist/chunk-YLHJWAQS.js +0 -256
- package/node_modules/pi-lens/dist/chunk-YULIERZW.js +0 -27
|
@@ -22,6 +22,19 @@ import { DEFAULT_ENDPOINT } from "./client/index.js";
|
|
|
22
22
|
import { getLastDiagnostics, runWithDiagnostics } from "./diagnostics/index.js";
|
|
23
23
|
import { generateAntigravityImage, parseImageCommandArgs } from "./image/index.js";
|
|
24
24
|
import { executeAntigravitySearch, parseSearchCommandArgs } from "./search/index.js";
|
|
25
|
+
import {
|
|
26
|
+
executeAntigravityWebFetch,
|
|
27
|
+
discardSavedPage,
|
|
28
|
+
formatWebFetchHeader,
|
|
29
|
+
formatWebFetchResult,
|
|
30
|
+
looksLikeHtml,
|
|
31
|
+
parseFetchCommandArgs,
|
|
32
|
+
savePage,
|
|
33
|
+
savedPageNote,
|
|
34
|
+
type SavedPage,
|
|
35
|
+
withSavedCopy,
|
|
36
|
+
validateFetchTarget,
|
|
37
|
+
} from "./web-fetch/index.js";
|
|
25
38
|
import {
|
|
26
39
|
applyAntigravityCatalog,
|
|
27
40
|
discoverAntigravityModels,
|
|
@@ -34,11 +47,19 @@ import {
|
|
|
34
47
|
import { ANTIGRAVITY_API, streamAntigravity } from "./stream/index.js";
|
|
35
48
|
import {
|
|
36
49
|
fetchAccountUsage,
|
|
50
|
+
fetchRemainingCredits,
|
|
37
51
|
formatModelsList,
|
|
38
52
|
formatUsageSummary,
|
|
39
53
|
resolveApiKeyFromContext,
|
|
40
54
|
} from "./usage/index.js";
|
|
41
|
-
import {
|
|
55
|
+
import {
|
|
56
|
+
getCreditsStatus,
|
|
57
|
+
isCreditsEnabled,
|
|
58
|
+
setCreditsEnabled,
|
|
59
|
+
redactSecrets,
|
|
60
|
+
maskEmail,
|
|
61
|
+
} from "./utils/index.js";
|
|
62
|
+
import { describeEnterpriseRouting } from "./client/enterprise.js";
|
|
42
63
|
|
|
43
64
|
/**
|
|
44
65
|
* Pi's interactive `notify` writes into the chat transcript. `console.log` in that
|
|
@@ -246,6 +267,71 @@ export default function (pi: ExtensionAPI): void {
|
|
|
246
267
|
},
|
|
247
268
|
});
|
|
248
269
|
|
|
270
|
+
pi.registerCommand("antigravity.credits", {
|
|
271
|
+
description: "Check remaining AI credits or toggle overages (/antigravity.credits [on|off])",
|
|
272
|
+
handler: async (args, ctx) => {
|
|
273
|
+
const mode = args.trim().toLowerCase();
|
|
274
|
+
try {
|
|
275
|
+
if (mode === "on" || mode === "enable" || mode === "true" || mode === "1") {
|
|
276
|
+
setCreditsEnabled(true);
|
|
277
|
+
emitCommandOutput(
|
|
278
|
+
ctx,
|
|
279
|
+
"Antigravity AI credit overages: ENABLED.\nRequests will supply enabledCreditTypes: ['GOOGLE_ONE_AI'] to use credit balance when standard quota is exhausted.",
|
|
280
|
+
"info",
|
|
281
|
+
);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
if (mode === "off" || mode === "disable" || mode === "false" || mode === "0") {
|
|
285
|
+
setCreditsEnabled(false);
|
|
286
|
+
emitCommandOutput(
|
|
287
|
+
ctx,
|
|
288
|
+
"Antigravity AI credit overages: DISABLED.\nRequests will not tap into AI credits.",
|
|
289
|
+
"info",
|
|
290
|
+
);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const apiKey = await resolveApiKeyFromContext(ctx);
|
|
295
|
+
const status = getCreditsStatus();
|
|
296
|
+
|
|
297
|
+
let creditsInfo: Awaited<ReturnType<typeof fetchRemainingCredits>> | undefined;
|
|
298
|
+
if (apiKey) {
|
|
299
|
+
try {
|
|
300
|
+
creditsInfo = await fetchRemainingCredits(apiKey);
|
|
301
|
+
} catch {
|
|
302
|
+
// best effort
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const lines: string[] = [];
|
|
307
|
+
if (creditsInfo?.planLabel) {
|
|
308
|
+
lines.push(creditsInfo.planLabel);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (creditsInfo?.availableCredits && creditsInfo.availableCredits.length > 0) {
|
|
312
|
+
for (const c of creditsInfo.availableCredits) {
|
|
313
|
+
const amt = c.creditAmount !== undefined ? c.creditAmount.toLocaleString() : "0";
|
|
314
|
+
const typ = c.creditType || "GOOGLE_ONE_AI";
|
|
315
|
+
lines.push(`Remaining AI Credits: ${amt} (${typ})`);
|
|
316
|
+
}
|
|
317
|
+
} else {
|
|
318
|
+
lines.push("Remaining AI Credits: 0 (or not reported by subscription)");
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
lines.push(`AI Credit Overages: ${status.enabled ? "ENABLED" : "DISABLED"}`);
|
|
322
|
+
lines.push("");
|
|
323
|
+
lines.push("Usage:");
|
|
324
|
+
lines.push(" /antigravity.credits on - Enable AI credits overage on quota exhaustion");
|
|
325
|
+
lines.push(" /antigravity.credits off - Disable AI credits overage");
|
|
326
|
+
|
|
327
|
+
emitCommandOutput(ctx, lines.join("\n"), "info");
|
|
328
|
+
} catch (error) {
|
|
329
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
330
|
+
emitCommandOutput(ctx, `Failed to query or update credit settings: ${msg}`, "error");
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
|
|
249
335
|
pi.registerCommand("antigravity.refresh", {
|
|
250
336
|
description: "Force refresh Antigravity dynamic model catalog",
|
|
251
337
|
handler: async (_args, ctx) => {
|
|
@@ -313,12 +399,15 @@ export default function (pi: ExtensionAPI): void {
|
|
|
313
399
|
`lastProjectId=${d.projectId || "none"}`,
|
|
314
400
|
`linkedAccounts=${accounts.length || "none"}`,
|
|
315
401
|
`activeAccount=${activeLabel || "none"}`,
|
|
402
|
+
`aiCreditOverages=${isCreditsEnabled() ? "enabled" : "disabled"}`,
|
|
403
|
+
`routing=${describeEnterpriseRouting()}`,
|
|
316
404
|
...(d.latencyMs !== undefined ? [`lastLatencyMs=${d.latencyMs}`] : []),
|
|
317
405
|
`toolSchemaWarnings=${d.toolSchemaWarnings || "none"}`,
|
|
406
|
+
...(d.fetchTrace ? [`lastFetch=${d.fetchTrace}`] : []),
|
|
318
407
|
`lastError=${d.error ? redactSecrets(d.error) : "none"}`,
|
|
319
408
|
"transport=native-streamSimple",
|
|
320
409
|
"runtimeCli=not-used",
|
|
321
|
-
"commands=/antigravity.usage /antigravity.models /antigravity.accounts /antigravity.refresh /antigravity.doctor /antigravity.image /antigravity.search",
|
|
410
|
+
"commands=/antigravity.usage /antigravity.models /antigravity.accounts /antigravity.credits /antigravity.refresh /antigravity.doctor /antigravity.image /antigravity.search /antigravity.fetch",
|
|
322
411
|
];
|
|
323
412
|
emitCommandOutput(ctx, `Antigravity doctor\n${lines.join("\n")}`);
|
|
324
413
|
},
|
|
@@ -401,4 +490,58 @@ export default function (pi: ExtensionAPI): void {
|
|
|
401
490
|
}
|
|
402
491
|
},
|
|
403
492
|
});
|
|
493
|
+
|
|
494
|
+
pi.registerCommand("antigravity.fetch", {
|
|
495
|
+
description:
|
|
496
|
+
"Read a public web page via the Antigravity crawler (usage: /antigravity.fetch [--raw] <url>)",
|
|
497
|
+
handler: async (args, ctx) => {
|
|
498
|
+
const parsed = parseFetchCommandArgs(args || "");
|
|
499
|
+
if (!parsed.url) {
|
|
500
|
+
emitCommandOutput(ctx, "Usage: /antigravity.fetch [--raw] <url>", "warning");
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
try {
|
|
504
|
+
const url = validateFetchTarget(parsed.url);
|
|
505
|
+
const apiKey = await resolveApiKeyFromContext(ctx);
|
|
506
|
+
if (!apiKey) {
|
|
507
|
+
emitCommandOutput(
|
|
508
|
+
ctx,
|
|
509
|
+
"No Antigravity credentials. Run /login antigravity first.",
|
|
510
|
+
"warning",
|
|
511
|
+
);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
if (ctx.hasUI) ctx.ui.notify("Reading page via Antigravity…", "info");
|
|
515
|
+
const result = await executeAntigravityWebFetch({
|
|
516
|
+
apiKey,
|
|
517
|
+
url,
|
|
518
|
+
raw: parsed.raw,
|
|
519
|
+
});
|
|
520
|
+
const whole = result.content;
|
|
521
|
+
let footer = "";
|
|
522
|
+
let saved: SavedPage | undefined;
|
|
523
|
+
if (formatWebFetchHeader(result).length + whole.length > (result.maxChars ?? 0)) {
|
|
524
|
+
// Raw output is the crawled source itself; converted output keeps its provenance.
|
|
525
|
+
saved = parsed.raw
|
|
526
|
+
? await savePage(whole, looksLikeHtml(whole) ? "html" : "txt")
|
|
527
|
+
: await savePage(formatWebFetchHeader(result) + whole, "md");
|
|
528
|
+
footer = savedPageNote(saved, whole.length, "Open it to read the rest.");
|
|
529
|
+
}
|
|
530
|
+
try {
|
|
531
|
+
emitCommandOutput(ctx, formatWebFetchResult(result, footer));
|
|
532
|
+
} catch (error) {
|
|
533
|
+
if (saved) await discardSavedPage(saved);
|
|
534
|
+
throw error;
|
|
535
|
+
}
|
|
536
|
+
} catch (caught) {
|
|
537
|
+
const error = await withSavedCopy(caught);
|
|
538
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
539
|
+
const guidance = msg.replace(
|
|
540
|
+
"Do not retry this URL with read_url_content. If permitted, use an available download tool or terminal to download it directly, then read the local file with a PDF reader.",
|
|
541
|
+
"If you have permission, download the URL directly and open the local file with a PDF reader.",
|
|
542
|
+
);
|
|
543
|
+
emitCommandOutput(ctx, redactSecrets(guidance), "warning");
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
});
|
|
404
547
|
}
|
|
@@ -6,10 +6,9 @@ import type {
|
|
|
6
6
|
ModelsStoreEntry,
|
|
7
7
|
RefreshModelsContext,
|
|
8
8
|
} from "@earendil-works/pi-ai";
|
|
9
|
-
import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
10
9
|
import { getApiKey } from "../auth/index.js";
|
|
11
10
|
import { DEFAULT_ENDPOINT, fetchAvailableModelsCatalog, parseApiKey } from "../client/index.js";
|
|
12
|
-
import { ANTIGRAVITY_API } from "../types/types.js";
|
|
11
|
+
import { ANTIGRAVITY_API, type AntigravityModelConfig } from "../types/types.js";
|
|
13
12
|
import { antigravityEnv, isRecord } from "../utils/util.js";
|
|
14
13
|
import { buildAntigravityCatalog, resolvedCatalog, type AntigravityCatalog } from "./grouping.js";
|
|
15
14
|
import {
|
|
@@ -78,7 +77,7 @@ export async function discoverAntigravityModels(
|
|
|
78
77
|
|
|
79
78
|
export async function refreshAntigravityModels(
|
|
80
79
|
context: RefreshModelsContext,
|
|
81
|
-
): Promise<
|
|
80
|
+
): Promise<AntigravityModelConfig[]> {
|
|
82
81
|
const checkedAt = hydrateAntigravityCatalog(context.stored);
|
|
83
82
|
const current = getCurrentAntigravityCatalog();
|
|
84
83
|
if (!context.allowNetwork) return current.models;
|
|
@@ -167,7 +166,7 @@ function apiKeyFromCredential(credential: Credential | undefined): string | unde
|
|
|
167
166
|
return undefined;
|
|
168
167
|
}
|
|
169
168
|
|
|
170
|
-
function toStoredModels(models:
|
|
169
|
+
function toStoredModels(models: AntigravityModelConfig[]): Model<Api>[] {
|
|
171
170
|
return models.map((model) => ({
|
|
172
171
|
...model,
|
|
173
172
|
api: ANTIGRAVITY_API,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
2
1
|
import { ThinkingEffort } from "../types/enums.js";
|
|
3
|
-
import type { AntigravityRouting, ModelInfoRaw } from "../types/types.js";
|
|
2
|
+
import type { AntigravityModelConfig, AntigravityRouting, ModelInfoRaw } from "../types/types.js";
|
|
4
3
|
import { isRecord } from "../utils/util.js";
|
|
4
|
+
import { getAntigravityModelCost, RUNTIME_MAX_OUTPUT_TOKENS } from "./models.js";
|
|
5
5
|
|
|
6
6
|
export type AntigravityCatalog = {
|
|
7
|
-
models:
|
|
7
|
+
models: AntigravityModelConfig[];
|
|
8
8
|
routing: Record<string, AntigravityRouting>;
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -25,6 +25,7 @@ type RuntimeGroup = {
|
|
|
25
25
|
const THINKING_SUFFIXES: Array<{ suffix: string; level: ThinkingLevel }> = [
|
|
26
26
|
{ suffix: "extra-low", level: ThinkingEffort.Low },
|
|
27
27
|
{ suffix: "extra-high", level: ThinkingEffort.Xhigh },
|
|
28
|
+
{ suffix: "xhigh", level: ThinkingEffort.Xhigh },
|
|
28
29
|
{ suffix: "thinking", level: ThinkingEffort.High },
|
|
29
30
|
{ suffix: "minimal", level: ThinkingEffort.Minimal },
|
|
30
31
|
{ suffix: "medium", level: ThinkingEffort.Medium },
|
|
@@ -35,6 +36,7 @@ const THINKING_SUFFIXES: Array<{ suffix: string; level: ThinkingLevel }> = [
|
|
|
35
36
|
const DISPLAY_LEVELS: Array<{ pattern: RegExp; level: ThinkingLevel }> = [
|
|
36
37
|
{ pattern: /\(\s*extra\s*low\s*\)/i, level: ThinkingEffort.Low },
|
|
37
38
|
{ pattern: /\(\s*extra\s*high\s*\)/i, level: ThinkingEffort.Xhigh },
|
|
39
|
+
{ pattern: /\(\s*x-?\s*high\s*\)/i, level: ThinkingEffort.Xhigh },
|
|
38
40
|
{ pattern: /\(\s*thinking\s*\)/i, level: ThinkingEffort.High },
|
|
39
41
|
{ pattern: /\(\s*minimal\s*\)/i, level: ThinkingEffort.Minimal },
|
|
40
42
|
{ pattern: /\(\s*medium\s*\)/i, level: ThinkingEffort.Medium },
|
|
@@ -59,6 +61,7 @@ export function isSelectableRuntimeModelId(id: string, info?: ModelInfoRaw): boo
|
|
|
59
61
|
if (/^(chat_|tab_)/i.test(id)) return false;
|
|
60
62
|
if (/image/i.test(id) || /image/i.test(modelDisplayName(info) ?? "")) return false;
|
|
61
63
|
if (info?.isInternal === true || info?.apiProvider === "API_PROVIDER_INTERNAL") return false;
|
|
64
|
+
if (info?.disabled === true || id.endsWith("-disabled")) return false;
|
|
62
65
|
return true;
|
|
63
66
|
}
|
|
64
67
|
|
|
@@ -86,6 +89,10 @@ export function extractRecommendedModelIds(agentModelSorts: unknown): Set<string
|
|
|
86
89
|
return ids.size > 0 ? ids : undefined;
|
|
87
90
|
}
|
|
88
91
|
|
|
92
|
+
export function isExtraAllowedModelId(runtimeId: string): boolean {
|
|
93
|
+
return /(?:^|-)(?:hydrogen|oxygen)(?:-|$)/i.test(runtimeId);
|
|
94
|
+
}
|
|
95
|
+
|
|
89
96
|
export function buildAntigravityCatalog(
|
|
90
97
|
rawModels: Record<string, ModelInfoRaw>,
|
|
91
98
|
fallback: AntigravityCatalog,
|
|
@@ -99,7 +106,7 @@ export function buildAntigravityCatalog(
|
|
|
99
106
|
for (const [runtimeId, info] of Object.entries(rawModels)) {
|
|
100
107
|
if (!isSelectableRuntimeModelId(runtimeId, info)) continue;
|
|
101
108
|
if (info?.isInternal) continue;
|
|
102
|
-
if (filterIds && !filterIds.has(runtimeId)) continue;
|
|
109
|
+
if (filterIds && !filterIds.has(runtimeId) && !isExtraAllowedModelId(runtimeId)) continue;
|
|
103
110
|
|
|
104
111
|
const displayName = modelDisplayName(info);
|
|
105
112
|
if (runtimeId.endsWith("-tiered")) {
|
|
@@ -131,7 +138,7 @@ export function buildAntigravityCatalog(
|
|
|
131
138
|
|
|
132
139
|
if (groups.size === 0) throw new Error("Antigravity catalog contains no supported chat models");
|
|
133
140
|
|
|
134
|
-
const models:
|
|
141
|
+
const models: AntigravityModelConfig[] = [];
|
|
135
142
|
const routing: Record<string, AntigravityRouting> = {};
|
|
136
143
|
|
|
137
144
|
for (const group of groups.values()) {
|
|
@@ -253,15 +260,18 @@ function modelDisplayName(info: ModelInfoRaw | undefined): string | undefined {
|
|
|
253
260
|
function displayFamily(displayName: string | undefined): string | undefined {
|
|
254
261
|
if (!displayName) return undefined;
|
|
255
262
|
return displayName
|
|
256
|
-
.replace(
|
|
263
|
+
.replace(
|
|
264
|
+
/\s*\((?:extra\s*low|extra\s*high|x-?\s*high|low|medium|high|minimal|thinking)\)\s*$/i,
|
|
265
|
+
"",
|
|
266
|
+
)
|
|
257
267
|
.trim()
|
|
258
268
|
.toLowerCase();
|
|
259
269
|
}
|
|
260
270
|
|
|
261
271
|
function synthesizeModel(
|
|
262
272
|
group: RuntimeGroup,
|
|
263
|
-
fallbackModels:
|
|
264
|
-
): { model:
|
|
273
|
+
fallbackModels: AntigravityModelConfig[],
|
|
274
|
+
): { model: AntigravityModelConfig; routing: AntigravityRouting } {
|
|
265
275
|
const template = familyTemplate(group.publicId, fallbackModels);
|
|
266
276
|
const advertisedLevels = advertisedThinkingLevels(group);
|
|
267
277
|
const routing = routingFromVariants(group.publicId, group.variants, group.unsuffixed);
|
|
@@ -279,9 +289,15 @@ function synthesizeModel(
|
|
|
279
289
|
reasoning,
|
|
280
290
|
thinkingLevelMap: reasoning ? thinkingLevelMapFromLevels(advertisedLevels) : undefined,
|
|
281
291
|
input: supportsImages ? ["text", "image"] : ["text"],
|
|
282
|
-
|
|
292
|
+
// Prefer this model's own published price over the family template's, so a
|
|
293
|
+
// newly discovered Flash variant is not billed at another Flash's rate.
|
|
294
|
+
cost: getAntigravityModelCost(group.publicId) ?? template?.cost ?? ZERO_COST,
|
|
283
295
|
contextWindow: group.contextWindow ?? template?.contextWindow ?? 128000,
|
|
284
|
-
maxTokens:
|
|
296
|
+
maxTokens:
|
|
297
|
+
group.maxOutputTokens ??
|
|
298
|
+
RUNTIME_MAX_OUTPUT_TOKENS[group.publicId] ??
|
|
299
|
+
template?.maxTokens ??
|
|
300
|
+
8192,
|
|
285
301
|
},
|
|
286
302
|
routing,
|
|
287
303
|
};
|
|
@@ -308,6 +324,7 @@ function routingFromVariants(
|
|
|
308
324
|
variants[ThinkingEffort.Minimal] ??
|
|
309
325
|
variants[ThinkingEffort.Medium] ??
|
|
310
326
|
variants[ThinkingEffort.High] ??
|
|
327
|
+
variants[ThinkingEffort.Xhigh] ??
|
|
311
328
|
unsuffixed ??
|
|
312
329
|
publicId;
|
|
313
330
|
|
|
@@ -325,6 +342,7 @@ function routingFromVariants(
|
|
|
325
342
|
ThinkingEffort.Minimal,
|
|
326
343
|
ThinkingEffort.Medium,
|
|
327
344
|
ThinkingEffort.High,
|
|
345
|
+
ThinkingEffort.Xhigh,
|
|
328
346
|
),
|
|
329
347
|
routing: {
|
|
330
348
|
minimal: pick(
|
|
@@ -332,24 +350,28 @@ function routingFromVariants(
|
|
|
332
350
|
ThinkingEffort.Low,
|
|
333
351
|
ThinkingEffort.Medium,
|
|
334
352
|
ThinkingEffort.High,
|
|
353
|
+
ThinkingEffort.Xhigh,
|
|
335
354
|
),
|
|
336
355
|
low: pick(
|
|
337
356
|
ThinkingEffort.Low,
|
|
338
357
|
ThinkingEffort.Minimal,
|
|
339
358
|
ThinkingEffort.Medium,
|
|
340
359
|
ThinkingEffort.High,
|
|
360
|
+
ThinkingEffort.Xhigh,
|
|
341
361
|
),
|
|
342
362
|
medium: pick(
|
|
343
363
|
ThinkingEffort.Medium,
|
|
344
364
|
ThinkingEffort.Low,
|
|
345
365
|
ThinkingEffort.High,
|
|
346
366
|
ThinkingEffort.Minimal,
|
|
367
|
+
ThinkingEffort.Xhigh,
|
|
347
368
|
),
|
|
348
369
|
high: pick(
|
|
349
370
|
ThinkingEffort.High,
|
|
350
371
|
ThinkingEffort.Medium,
|
|
351
372
|
ThinkingEffort.Low,
|
|
352
373
|
ThinkingEffort.Minimal,
|
|
374
|
+
ThinkingEffort.Xhigh,
|
|
353
375
|
),
|
|
354
376
|
xhigh: pick(
|
|
355
377
|
ThinkingEffort.Xhigh,
|
|
@@ -362,8 +384,10 @@ function routingFromVariants(
|
|
|
362
384
|
};
|
|
363
385
|
}
|
|
364
386
|
|
|
365
|
-
function thinkingLevelMapFromLevels(
|
|
366
|
-
|
|
387
|
+
function thinkingLevelMapFromLevels(
|
|
388
|
+
levels: Set<string>,
|
|
389
|
+
): AntigravityModelConfig["thinkingLevelMap"] {
|
|
390
|
+
const map: NonNullable<AntigravityModelConfig["thinkingLevelMap"]> = {};
|
|
367
391
|
for (const level of PI_LEVELS) {
|
|
368
392
|
map[level] = levels.has(level) ? level : null;
|
|
369
393
|
}
|
|
@@ -372,8 +396,8 @@ function thinkingLevelMapFromLevels(levels: Set<string>): ProviderModelConfig["t
|
|
|
372
396
|
|
|
373
397
|
function familyTemplate(
|
|
374
398
|
publicId: string,
|
|
375
|
-
fallbackModels:
|
|
376
|
-
):
|
|
399
|
+
fallbackModels: AntigravityModelConfig[],
|
|
400
|
+
): AntigravityModelConfig | undefined {
|
|
377
401
|
if (/^gemini-.*-flash/i.test(publicId)) {
|
|
378
402
|
return fallbackModels.find((model) => /^gemini-.*-flash/i.test(model.id));
|
|
379
403
|
}
|
|
@@ -442,7 +466,7 @@ function parseGeminiVersion(id: string): number {
|
|
|
442
466
|
return Number(match[1]) * 1000 + Number(match[2] || 0);
|
|
443
467
|
}
|
|
444
468
|
|
|
445
|
-
function comparePublicModels(a:
|
|
469
|
+
function comparePublicModels(a: AntigravityModelConfig, b: AntigravityModelConfig): number {
|
|
446
470
|
const rankA = modelRank(a.id);
|
|
447
471
|
const rankB = modelRank(b.id);
|
|
448
472
|
if (rankA[0] !== rankB[0]) return rankA[0] - rankB[0];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AntigravityRouting, ThinkingWire } from "../types/types.js";
|
|
1
|
+
import type { AntigravityModelConfig, AntigravityRouting, ThinkingWire } from "../types/types.js";
|
|
3
2
|
import { ThinkingEffort } from "../types/enums.js";
|
|
4
3
|
import type { AntigravityCatalog } from "./grouping.js";
|
|
5
4
|
|
|
@@ -119,6 +118,11 @@ export const ANTIGRAVITY_ROUTING: Record<string, AntigravityRouting> = {
|
|
|
119
118
|
* Requesting more than these limits returns a 400 Bad Request from the API.
|
|
120
119
|
*/
|
|
121
120
|
export const RUNTIME_MAX_OUTPUT_TOKENS: Record<string, number> = {
|
|
121
|
+
"gemini-4-hydrogen": 262144,
|
|
122
|
+
"gemini-4-hydrogen-low": 262144,
|
|
123
|
+
"gemini-4-hydrogen-medium": 262144,
|
|
124
|
+
"gemini-4-hydrogen-high": 262144,
|
|
125
|
+
"gemini-4-hydrogen-xhigh": 262144,
|
|
122
126
|
"gemini-3.8-flash": 65536,
|
|
123
127
|
"gemini-3.8-flash-low": 65536,
|
|
124
128
|
"gemini-3.8-flash-medium": 65536,
|
|
@@ -168,12 +172,67 @@ export function getMaxOutputTokens(modelId: string, runtimeModel?: string): numb
|
|
|
168
172
|
return 8192;
|
|
169
173
|
}
|
|
170
174
|
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Per-model list prices, in USD per million tokens.
|
|
177
|
+
*
|
|
178
|
+
* Every Flash model used to share one flat placeholder ($0.10 / $0.40 / $0.025),
|
|
179
|
+
* which understated Gemini usage by roughly 4-7x. Rates below come from the
|
|
180
|
+
* LiteLLM public catalog (the same source Pi's own cost reporting uses), which
|
|
181
|
+
* tracks Google's published per-model pricing:
|
|
182
|
+
* https://ai.google.dev/gemini-api/docs/pricing
|
|
183
|
+
*
|
|
184
|
+
* gemini-3.8-flash sits on Google's 50%-off launch rate ($0.75 / $3.75 / $0.075),
|
|
185
|
+
* which is valid through 2026-12-31 and becomes $1.50 / $7.50 / $0.15 on
|
|
186
|
+
* 2027-01-01. Revisit this table when that date passes.
|
|
187
|
+
*
|
|
188
|
+
* Gemini bills cached content for storage per hour rather than per token, so
|
|
189
|
+
* there is no cache-write rate to publish; the input rate is used.
|
|
190
|
+
*/
|
|
191
|
+
const gemini38FlashCost = { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0.75 };
|
|
192
|
+
const gemini4HydrogenCost = { input: 1.5, output: 7.5, cacheRead: 0.075, cacheWrite: 1.5 };
|
|
193
|
+
const gemini37FlashCost = { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0.75 };
|
|
194
|
+
const gemini36FlashCost = { input: 0.75, output: 3.75, cacheRead: 0.075, cacheWrite: 0.75 };
|
|
195
|
+
const gemini35FlashCost = { input: 1.5, output: 9.0, cacheRead: 0.15, cacheWrite: 1.5 };
|
|
196
|
+
const gemini35FlashLiteCost = { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0.3 };
|
|
197
|
+
const gemini31FlashLiteCost = { input: 0.25, output: 1.5, cacheRead: 0.025, cacheWrite: 0.25 };
|
|
198
|
+
const gemini25FlashCost = { input: 0.3, output: 2.5, cacheRead: 0.03, cacheWrite: 0.3 };
|
|
199
|
+
const gemini25FlashLiteCost = { input: 0.1, output: 0.4, cacheRead: 0.01, cacheWrite: 0.1 };
|
|
200
|
+
const gemini31ProCost = { input: 2.0, output: 12.0, cacheRead: 0.2, cacheWrite: 2.0 };
|
|
201
|
+
const gemini25ProCost = { input: 1.25, output: 10.0, cacheRead: 0.125, cacheWrite: 1.25 };
|
|
173
202
|
const claudeSonnetCost = { input: 3.0, output: 15.0, cacheRead: 0.3, cacheWrite: 3.75 };
|
|
174
|
-
const claudeOpusCost = { input:
|
|
203
|
+
const claudeOpusCost = { input: 5.0, output: 25.0, cacheRead: 0.5, cacheWrite: 6.25 };
|
|
175
204
|
const gptOssCost = { input: 0.6, output: 2.4, cacheRead: 0.15, cacheWrite: 0.6 };
|
|
176
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Prices for models this package can discover dynamically but does not ship as
|
|
208
|
+
* a static entry. Keyed by public model id.
|
|
209
|
+
*/
|
|
210
|
+
export const ANTIGRAVITY_DISCOVERED_MODEL_COSTS: Record<
|
|
211
|
+
string,
|
|
212
|
+
{ input: number; output: number; cacheRead: number; cacheWrite: number }
|
|
213
|
+
> = {
|
|
214
|
+
"gemini-4-hydrogen": gemini4HydrogenCost,
|
|
215
|
+
"gemini-3.5-flash": gemini35FlashCost,
|
|
216
|
+
"gemini-3.5-flash-lite": gemini35FlashLiteCost,
|
|
217
|
+
"gemini-3.1-flash-lite": gemini31FlashLiteCost,
|
|
218
|
+
"gemini-2.5-flash": gemini25FlashCost,
|
|
219
|
+
"gemini-2.5-flash-lite": gemini25FlashLiteCost,
|
|
220
|
+
"gemini-2.5-pro": gemini25ProCost,
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Look up a model's list price by public id. Returns undefined when the model
|
|
225
|
+
* is not priced here, so callers can fall back rather than publish a guess.
|
|
226
|
+
*/
|
|
227
|
+
export function getAntigravityModelCost(
|
|
228
|
+
publicId: string,
|
|
229
|
+
): { input: number; output: number; cacheRead: number; cacheWrite: number } | undefined {
|
|
230
|
+
const discovered = ANTIGRAVITY_DISCOVERED_MODEL_COSTS[publicId];
|
|
231
|
+
if (discovered) return discovered;
|
|
232
|
+
const staticModel = ANTIGRAVITY_MODELS.find((model) => model.id === publicId);
|
|
233
|
+
return staticModel?.cost;
|
|
234
|
+
}
|
|
235
|
+
|
|
177
236
|
// A null entry is intentionally hidden by Pi. Do not collapse levels that happen to
|
|
178
237
|
// route to the same runtime ID: the UI must reflect the levels the backend advertises.
|
|
179
238
|
const thinkingLevelMaps = {
|
|
@@ -213,17 +272,17 @@ const thinkingLevelMaps = {
|
|
|
213
272
|
xhigh: null,
|
|
214
273
|
max: null,
|
|
215
274
|
},
|
|
216
|
-
} satisfies Record<string,
|
|
275
|
+
} satisfies Record<string, AntigravityModelConfig["thinkingLevelMap"]>;
|
|
217
276
|
|
|
218
277
|
/** Same set as `agy models`, collapsed to public Pi model IDs. */
|
|
219
|
-
export const ANTIGRAVITY_MODELS:
|
|
278
|
+
export const ANTIGRAVITY_MODELS: AntigravityModelConfig[] = [
|
|
220
279
|
{
|
|
221
280
|
id: "gemini-3.8-flash",
|
|
222
281
|
name: "Gemini 3.8 Flash (Antigravity)",
|
|
223
282
|
reasoning: true,
|
|
224
283
|
thinkingLevelMap: thinkingLevelMaps.lowMediumHigh,
|
|
225
284
|
input: ["text", "image"],
|
|
226
|
-
cost:
|
|
285
|
+
cost: gemini38FlashCost,
|
|
227
286
|
contextWindow: 1048576,
|
|
228
287
|
maxTokens: 65536,
|
|
229
288
|
},
|
|
@@ -233,7 +292,7 @@ export const ANTIGRAVITY_MODELS: ProviderModelConfig[] = [
|
|
|
233
292
|
reasoning: true,
|
|
234
293
|
thinkingLevelMap: thinkingLevelMaps.lowMediumHigh,
|
|
235
294
|
input: ["text", "image"],
|
|
236
|
-
cost:
|
|
295
|
+
cost: gemini37FlashCost,
|
|
237
296
|
contextWindow: 1048576,
|
|
238
297
|
maxTokens: 65536,
|
|
239
298
|
},
|
|
@@ -243,7 +302,7 @@ export const ANTIGRAVITY_MODELS: ProviderModelConfig[] = [
|
|
|
243
302
|
reasoning: true,
|
|
244
303
|
thinkingLevelMap: thinkingLevelMaps.lowMediumHigh,
|
|
245
304
|
input: ["text", "image"],
|
|
246
|
-
cost:
|
|
305
|
+
cost: gemini36FlashCost,
|
|
247
306
|
contextWindow: 1048576,
|
|
248
307
|
maxTokens: 65536,
|
|
249
308
|
},
|
|
@@ -273,7 +332,7 @@ export const ANTIGRAVITY_MODELS: ProviderModelConfig[] = [
|
|
|
273
332
|
reasoning: true,
|
|
274
333
|
thinkingLevelMap: thinkingLevelMaps.lowHigh,
|
|
275
334
|
input: ["text", "image"],
|
|
276
|
-
cost:
|
|
335
|
+
cost: gemini31ProCost,
|
|
277
336
|
contextWindow: 1048576,
|
|
278
337
|
maxTokens: 65535,
|
|
279
338
|
},
|
|
@@ -283,7 +342,7 @@ export const ANTIGRAVITY_MODELS: ProviderModelConfig[] = [
|
|
|
283
342
|
reasoning: true,
|
|
284
343
|
thinkingLevelMap: thinkingLevelMaps.lowMediumHigh,
|
|
285
344
|
input: ["text", "image"],
|
|
286
|
-
cost:
|
|
345
|
+
cost: gemini35FlashCost,
|
|
287
346
|
contextWindow: 1048576,
|
|
288
347
|
maxTokens: 65536,
|
|
289
348
|
},
|
|
@@ -299,10 +358,10 @@ export const ANTIGRAVITY_MODELS: ProviderModelConfig[] = [
|
|
|
299
358
|
},
|
|
300
359
|
];
|
|
301
360
|
|
|
302
|
-
let currentModels:
|
|
361
|
+
let currentModels: AntigravityModelConfig[] = ANTIGRAVITY_MODELS;
|
|
303
362
|
let currentRouting: Record<string, AntigravityRouting> = { ...ANTIGRAVITY_ROUTING };
|
|
304
363
|
|
|
305
|
-
export function getCurrentAntigravityModels():
|
|
364
|
+
export function getCurrentAntigravityModels(): AntigravityModelConfig[] {
|
|
306
365
|
return currentModels;
|
|
307
366
|
}
|
|
308
367
|
|
|
@@ -404,9 +463,62 @@ function legacyFallbackRuntimeModel(runtimeModel: string, effort?: string): stri
|
|
|
404
463
|
return undefined;
|
|
405
464
|
}
|
|
406
465
|
|
|
466
|
+
const RUNTIME_TIER_SUFFIXES = ["-extra-low", "-low", "-medium", "-high", "-max", "-xhigh"] as const;
|
|
467
|
+
|
|
468
|
+
/** Split `gemini-3.8-flash-low` into its family and tier. Thinking-only ids are not tiers. */
|
|
469
|
+
export function runtimeTier(runtimeModel: string): { base: string; suffix: string } | undefined {
|
|
470
|
+
for (const suffix of RUNTIME_TIER_SUFFIXES) {
|
|
471
|
+
if (runtimeModel.endsWith(suffix) && runtimeModel.length > suffix.length) {
|
|
472
|
+
return { base: runtimeModel.slice(0, -suffix.length), suffix };
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return undefined;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Same-generation tiers to try after one tier answers with a generic
|
|
480
|
+
* RESOURCE_EXHAUSTED. Highest remaining tier first, so a dead `-low` route
|
|
481
|
+
* (Gemini 3.8 Flash with reasoning off, #125) moves to `-high` / `-medium`,
|
|
482
|
+
* and `gemini-4-argon-high` can step down to `-medium` (#122).
|
|
483
|
+
*/
|
|
484
|
+
export function siblingRuntimeModels(runtimeModel: string): string[] {
|
|
485
|
+
const tier = runtimeTier(runtimeModel);
|
|
486
|
+
if (!tier) return [];
|
|
487
|
+
const preferred = ["-high", "-medium", "-xhigh", "-low", "-extra-low", "-max"];
|
|
488
|
+
return preferred.filter((suffix) => suffix !== tier.suffix).map((suffix) => tier.base + suffix);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/** Sibling tiers this process already knows how to route, capped for dynamic families. */
|
|
492
|
+
export function advertisedSiblingRuntimes(runtimeModel: string): string[] {
|
|
493
|
+
const candidates = siblingRuntimeModels(runtimeModel);
|
|
494
|
+
if (!candidates.length) return [];
|
|
495
|
+
const known = new Set<string>();
|
|
496
|
+
for (const route of Object.values(currentRouting)) {
|
|
497
|
+
if (route.off) known.add(route.off);
|
|
498
|
+
if (route.defaultRequestId) known.add(route.defaultRequestId);
|
|
499
|
+
for (const id of Object.values(route.routing ?? {})) {
|
|
500
|
+
if (id) known.add(id);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
const routed = candidates.filter((id) => known.has(id));
|
|
504
|
+
if (routed.length) return routed;
|
|
505
|
+
const tier = runtimeTier(runtimeModel);
|
|
506
|
+
if (!tier) return [];
|
|
507
|
+
if (tier.base.startsWith("gemini-") || tier.base.startsWith("claude-")) {
|
|
508
|
+
return candidates.slice(0, 2);
|
|
509
|
+
}
|
|
510
|
+
return [];
|
|
511
|
+
}
|
|
512
|
+
|
|
407
513
|
export type { ThinkingWire };
|
|
408
514
|
|
|
409
515
|
export const ANTIGRAVITY_MODEL_ENUM: Record<string, string> = {
|
|
516
|
+
// Gemini 4 Hydrogen
|
|
517
|
+
"gemini-4-hydrogen": "MODEL_PLACEHOLDER_M527",
|
|
518
|
+
"gemini-4-hydrogen-high": "MODEL_PLACEHOLDER_M525",
|
|
519
|
+
"gemini-4-hydrogen-xhigh": "MODEL_PLACEHOLDER_M528",
|
|
520
|
+
"gemini-4-hydrogen-medium": "MODEL_PLACEHOLDER_M526",
|
|
521
|
+
"gemini-4-hydrogen-low": "MODEL_PLACEHOLDER_M527",
|
|
410
522
|
// Gemini 3.8 Flash
|
|
411
523
|
"gemini-3.8-flash": "MODEL_PLACEHOLDER_M318",
|
|
412
524
|
"gemini-3.8-flash-high": "MODEL_PLACEHOLDER_M318",
|