@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
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* settings-menu.ts — the `/agents → Settings` page.
|
|
3
|
+
*
|
|
4
|
+
* ```
|
|
5
|
+
* ⚙ Subagent Settings · Saving to: Project · Tab to switch
|
|
6
|
+
* .pi/subagents.json · tagged rows are set in a file
|
|
7
|
+
* > cost
|
|
8
|
+
*
|
|
9
|
+
* Show cost global on
|
|
10
|
+
*
|
|
11
|
+
* Type to filter · ↓ or Enter to the list · Esc to clear
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* The page owns presentation and keys: the filter, focus, the number editor,
|
|
15
|
+
* the file-tag column and the height the terminal leaves. What each row means
|
|
16
|
+
* (its values, what changing or resetting it does, which file it is saved to)
|
|
17
|
+
* stays with the caller, behind `SettingsPageDeps`.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import {
|
|
21
|
+
getSettingsListTheme,
|
|
22
|
+
type KeybindingsManager,
|
|
23
|
+
type Theme,
|
|
24
|
+
} from "@earendil-works/pi-coding-agent"
|
|
25
|
+
import {
|
|
26
|
+
type Component,
|
|
27
|
+
Container,
|
|
28
|
+
fuzzyFilter,
|
|
29
|
+
Input,
|
|
30
|
+
type SettingItem,
|
|
31
|
+
SettingsList,
|
|
32
|
+
type SettingsListTheme,
|
|
33
|
+
Spacer,
|
|
34
|
+
Text,
|
|
35
|
+
type TUI,
|
|
36
|
+
truncateToWidth,
|
|
37
|
+
visibleWidth,
|
|
38
|
+
wrapTextWithAnsi,
|
|
39
|
+
} from "@earendil-works/pi-tui"
|
|
40
|
+
import {
|
|
41
|
+
isNumericSettingKey,
|
|
42
|
+
NUMERIC_SETTING_BOUNDS,
|
|
43
|
+
type NumericSettingKey,
|
|
44
|
+
type SettingsScope,
|
|
45
|
+
} from "../settings.js"
|
|
46
|
+
import { formatKeyLabel } from "./viewer-keys.js"
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Rows the page leaves for what pi draws under it — its footer and any
|
|
50
|
+
* widgets below the editor, which the page cannot measure.
|
|
51
|
+
*/
|
|
52
|
+
const FOOTER_ROWS = 2
|
|
53
|
+
/** The fewest settings rows the page shows, however short the terminal. */
|
|
54
|
+
const MIN_ROWS = 3
|
|
55
|
+
|
|
56
|
+
export interface SettingsPageDeps {
|
|
57
|
+
/** The rows with their current effective values, labels untagged. */
|
|
58
|
+
buildItems(): SettingItem[]
|
|
59
|
+
/** The file that sets each row's value; called once per refresh. */
|
|
60
|
+
fileTags(): (id: string) => SettingsScope | undefined
|
|
61
|
+
/** Apply and save a row's new value, and notify. */
|
|
62
|
+
apply(id: string, value: string): void
|
|
63
|
+
/** Remove the row's setting from the file that sets it, and notify. */
|
|
64
|
+
reset(id: string): void
|
|
65
|
+
/** The scope changes are saved to, and its file as the header shows it. */
|
|
66
|
+
header(): { scope: SettingsScope; file: string }
|
|
67
|
+
toggleScope(): void
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function createSettingsPage(
|
|
71
|
+
deps: SettingsPageDeps,
|
|
72
|
+
tui: TUI,
|
|
73
|
+
theme: Theme,
|
|
74
|
+
kb: KeybindingsManager,
|
|
75
|
+
done: () => void,
|
|
76
|
+
): Component {
|
|
77
|
+
const items = deps.buildItems()
|
|
78
|
+
const baseLabels = new Map(items.map((item) => [item.id, item.label]))
|
|
79
|
+
// Tags sit in their own column after the longest label, and every label is
|
|
80
|
+
// padded to the tagged width, so the value column stays put whichever rows
|
|
81
|
+
// a filter leaves. The widest (26 + 2 + "project") stays inside
|
|
82
|
+
// SettingsList's 36-column label cap.
|
|
83
|
+
const tagColumn =
|
|
84
|
+
Math.max(...items.map((item) => visibleWidth(item.label))) + 2
|
|
85
|
+
const labelWidth = tagColumn + "project".length
|
|
86
|
+
const title = new Text("", 0, 0)
|
|
87
|
+
const fileLine = new Text("", 0, 0)
|
|
88
|
+
const tabKey = kb.getKeys("tui.input.tab")[0]
|
|
89
|
+
const keyLabel = (id: Parameters<typeof kb.getKeys>[0]) => {
|
|
90
|
+
const key = kb.getKeys(id)[0]
|
|
91
|
+
return key ? formatKeyLabel(key) : id
|
|
92
|
+
}
|
|
93
|
+
const renderHeader = () => {
|
|
94
|
+
const { scope, file } = deps.header()
|
|
95
|
+
const switchHint = tabKey
|
|
96
|
+
? theme.fg("muted", ` · ${formatKeyLabel(tabKey)} to switch`)
|
|
97
|
+
: ""
|
|
98
|
+
title.setText(
|
|
99
|
+
`⚙ Subagent Settings · Saving to: ${scope === "global" ? "Global" : "Project"}${switchHint}`,
|
|
100
|
+
)
|
|
101
|
+
fileLine.setText(
|
|
102
|
+
theme.fg("muted", ` ${file} · tagged rows are set in a file`),
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
// Re-read values and file tags after every change: a save can move a key
|
|
106
|
+
// into the other file, and some rows' values depend on others.
|
|
107
|
+
const refreshRows = () => {
|
|
108
|
+
const tagOf = deps.fileTags()
|
|
109
|
+
const fresh = new Map(deps.buildItems().map((item) => [item.id, item]))
|
|
110
|
+
for (const item of items) {
|
|
111
|
+
const next = fresh.get(item.id)
|
|
112
|
+
if (next)
|
|
113
|
+
Object.assign(item, {
|
|
114
|
+
currentValue: next.currentValue,
|
|
115
|
+
values: next.values,
|
|
116
|
+
description: next.description,
|
|
117
|
+
})
|
|
118
|
+
const source = tagOf(item.id)
|
|
119
|
+
const base = baseLabels.get(item.id) ?? item.label
|
|
120
|
+
item.label = source
|
|
121
|
+
? `${base.padEnd(tagColumn)}${theme.fg("muted", source.padEnd(labelWidth - tagColumn))}`
|
|
122
|
+
: base.padEnd(labelWidth)
|
|
123
|
+
}
|
|
124
|
+
renderHeader()
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// The rows the filter leaves, in an array the list holds by reference:
|
|
128
|
+
// filtering rewrites it in place rather than rebuilding the list.
|
|
129
|
+
const shown = [...items]
|
|
130
|
+
// The filter is a stop above the first row. While it has focus, typing,
|
|
131
|
+
// Backspace and Del edit it, and the list draws no cursor; on a row,
|
|
132
|
+
// Backspace and Del reset that row. Typing on a row jumps back here.
|
|
133
|
+
const filter = new Input()
|
|
134
|
+
let filterFocused = true
|
|
135
|
+
const baseTheme = getSettingsListTheme()
|
|
136
|
+
const listTheme: SettingsListTheme = {
|
|
137
|
+
...baseTheme,
|
|
138
|
+
label: (text, isSelected) =>
|
|
139
|
+
baseTheme.label(text, isSelected && !filterFocused),
|
|
140
|
+
value: (text, isSelected) =>
|
|
141
|
+
baseTheme.value(text, isSelected && !filterFocused),
|
|
142
|
+
get cursor() {
|
|
143
|
+
return filterFocused
|
|
144
|
+
? " ".repeat(visibleWidth(baseTheme.cursor))
|
|
145
|
+
: baseTheme.cursor
|
|
146
|
+
},
|
|
147
|
+
}
|
|
148
|
+
// `maxVisible` is fixed per list, so a list is rebuilt when the rows the
|
|
149
|
+
// terminal has room for change.
|
|
150
|
+
const makeList = (maxVisible: number) =>
|
|
151
|
+
new SettingsList(
|
|
152
|
+
shown,
|
|
153
|
+
maxVisible,
|
|
154
|
+
listTheme,
|
|
155
|
+
(id, newValue) => {
|
|
156
|
+
deps.apply(id, newValue)
|
|
157
|
+
refreshRows()
|
|
158
|
+
},
|
|
159
|
+
done,
|
|
160
|
+
)
|
|
161
|
+
let listRows = shown.length
|
|
162
|
+
let list = makeList(listRows)
|
|
163
|
+
refreshRows()
|
|
164
|
+
|
|
165
|
+
// The selected row, an index into `shown`, owned here: SettingsList
|
|
166
|
+
// doesn't expose its own, and Enter and Del must know which row it is.
|
|
167
|
+
let selected = 0
|
|
168
|
+
// The list draws no cursor while the filter has focus, so the selection
|
|
169
|
+
// resets to the first row, which is where Down or Enter lands.
|
|
170
|
+
const applyFilter = () => {
|
|
171
|
+
shown.splice(
|
|
172
|
+
0,
|
|
173
|
+
shown.length,
|
|
174
|
+
...fuzzyFilter(
|
|
175
|
+
items,
|
|
176
|
+
filter.getValue(),
|
|
177
|
+
(item) => baseLabels.get(item.id) ?? item.label,
|
|
178
|
+
),
|
|
179
|
+
)
|
|
180
|
+
selected = 0
|
|
181
|
+
if (shown[0]) list.selectItem(shown[0].id)
|
|
182
|
+
}
|
|
183
|
+
// The number editor under the list, while one is open.
|
|
184
|
+
let editing: { id: NumericSettingKey; input: Input; error: Text } | undefined
|
|
185
|
+
const editor = new Container()
|
|
186
|
+
|
|
187
|
+
const closeEditor = () => {
|
|
188
|
+
editing = undefined
|
|
189
|
+
editor.clear()
|
|
190
|
+
}
|
|
191
|
+
const openEditor = (item: SettingItem, id: NumericSettingKey) => {
|
|
192
|
+
const { min, max } = NUMERIC_SETTING_BOUNDS[id]
|
|
193
|
+
// Empty, not pre-filled: Input.setValue leaves the cursor at column 0,
|
|
194
|
+
// so typed digits would land in front of the old value.
|
|
195
|
+
const input = new Input()
|
|
196
|
+
input.focused = true
|
|
197
|
+
const error = new Text("", 0, 0)
|
|
198
|
+
editing = { id, input, error }
|
|
199
|
+
editor.clear()
|
|
200
|
+
editor.addChild(new Spacer(1))
|
|
201
|
+
editor.addChild(
|
|
202
|
+
new Text(
|
|
203
|
+
`${baseLabels.get(id)} (${min}–${max}, now ${item.currentValue})` +
|
|
204
|
+
theme.fg(
|
|
205
|
+
"muted",
|
|
206
|
+
` · ${keyLabel("tui.input.submit")} to save · ${keyLabel("tui.select.cancel")} to cancel`,
|
|
207
|
+
),
|
|
208
|
+
0,
|
|
209
|
+
0,
|
|
210
|
+
),
|
|
211
|
+
)
|
|
212
|
+
editor.addChild(input)
|
|
213
|
+
editor.addChild(error)
|
|
214
|
+
}
|
|
215
|
+
const submitEditor = ({ id, input, error }: NonNullable<typeof editing>) => {
|
|
216
|
+
const { min, max } = NUMERIC_SETTING_BOUNDS[id]
|
|
217
|
+
const trimmed = input.getValue().trim()
|
|
218
|
+
const n = Number(trimmed)
|
|
219
|
+
if (trimmed === "" || !Number.isInteger(n) || n < min || n > max) {
|
|
220
|
+
error.setText(
|
|
221
|
+
theme.fg("error", `Enter a whole number from ${min} to ${max}`),
|
|
222
|
+
)
|
|
223
|
+
return
|
|
224
|
+
}
|
|
225
|
+
closeEditor()
|
|
226
|
+
deps.apply(id, String(n))
|
|
227
|
+
refreshRows()
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const hint = () => {
|
|
231
|
+
const keys = filterFocused
|
|
232
|
+
? `Type to filter · ${keyLabel("tui.select.down")} or Enter to the list`
|
|
233
|
+
: `Enter/Space to change · ${keyLabel("tui.editor.deleteCharForward")} to reset`
|
|
234
|
+
const esc = filter.getValue() ? "clear" : "close"
|
|
235
|
+
return listTheme.hint(` ${keys} · Esc to ${esc}`)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
render: (w: number) => {
|
|
240
|
+
filter.focused = filterFocused && !editing
|
|
241
|
+
const head = [
|
|
242
|
+
...title.render(w),
|
|
243
|
+
...fileLine.render(w),
|
|
244
|
+
"",
|
|
245
|
+
...filter.render(w),
|
|
246
|
+
"",
|
|
247
|
+
]
|
|
248
|
+
const tail = editing ? editor.render(w) : ["", truncateToWidth(hint(), w)]
|
|
249
|
+
if (shown.length === 0)
|
|
250
|
+
return [...head, listTheme.hint(" No matching settings"), ...tail]
|
|
251
|
+
// Rows left once everything else is drawn: the description under the
|
|
252
|
+
// list (blank + wrapped, sized by the longest in view so the window
|
|
253
|
+
// doesn't resize as the cursor moves), the list's (n/N) line, and
|
|
254
|
+
// pi's footer, which stays below the page.
|
|
255
|
+
const description = Math.max(
|
|
256
|
+
...shown.map((item) =>
|
|
257
|
+
item.description
|
|
258
|
+
? wrapTextWithAnsi(item.description, w - 4).length + 1
|
|
259
|
+
: 0,
|
|
260
|
+
),
|
|
261
|
+
)
|
|
262
|
+
const room =
|
|
263
|
+
tui.terminal.rows -
|
|
264
|
+
head.length -
|
|
265
|
+
tail.length -
|
|
266
|
+
description -
|
|
267
|
+
1 -
|
|
268
|
+
FOOTER_ROWS
|
|
269
|
+
const rows = Math.min(shown.length, Math.max(MIN_ROWS, room))
|
|
270
|
+
if (rows !== listRows) {
|
|
271
|
+
listRows = rows
|
|
272
|
+
list = makeList(rows)
|
|
273
|
+
list.selectItem(shown[selected].id)
|
|
274
|
+
}
|
|
275
|
+
// Its own hint (blank + "Enter/Space to change · Esc to cancel") is
|
|
276
|
+
// replaced by ours, which names the filter and Del.
|
|
277
|
+
return [...head, ...list.render(w).slice(0, -2), ...tail]
|
|
278
|
+
},
|
|
279
|
+
invalidate: () => {
|
|
280
|
+
title.invalidate()
|
|
281
|
+
fileLine.invalidate()
|
|
282
|
+
editor.invalidate()
|
|
283
|
+
filter.invalidate()
|
|
284
|
+
list.invalidate()
|
|
285
|
+
},
|
|
286
|
+
handleInput: (data: string) => {
|
|
287
|
+
// pi repaints after every keystroke it hands the page.
|
|
288
|
+
if (editing) {
|
|
289
|
+
if (kb.matches(data, "tui.input.submit")) submitEditor(editing)
|
|
290
|
+
else if (kb.matches(data, "tui.select.cancel")) closeEditor()
|
|
291
|
+
else if (!kb.matches(data, "tui.input.tab"))
|
|
292
|
+
editing.input.handleInput(data)
|
|
293
|
+
return
|
|
294
|
+
}
|
|
295
|
+
if (kb.matches(data, "tui.input.tab")) {
|
|
296
|
+
deps.toggleScope()
|
|
297
|
+
renderHeader()
|
|
298
|
+
return
|
|
299
|
+
}
|
|
300
|
+
const query = filter.getValue()
|
|
301
|
+
if (kb.matches(data, "tui.select.cancel")) {
|
|
302
|
+
if (!query) {
|
|
303
|
+
done()
|
|
304
|
+
return
|
|
305
|
+
}
|
|
306
|
+
filter.setValue("")
|
|
307
|
+
filterFocused = true
|
|
308
|
+
applyFilter()
|
|
309
|
+
return
|
|
310
|
+
}
|
|
311
|
+
// Delete, and Backspace: it is the key labelled "delete" on a Mac.
|
|
312
|
+
const deletes =
|
|
313
|
+
kb.matches(data, "tui.editor.deleteCharForward") ||
|
|
314
|
+
kb.matches(data, "tui.editor.deleteCharBackward")
|
|
315
|
+
if (deletes && !filterFocused) {
|
|
316
|
+
if (shown[selected]) {
|
|
317
|
+
deps.reset(shown[selected].id)
|
|
318
|
+
refreshRows()
|
|
319
|
+
}
|
|
320
|
+
return
|
|
321
|
+
}
|
|
322
|
+
// One cycle through the filter and the rows: Down (or Enter) from the
|
|
323
|
+
// filter enters the first row, Up from the first row returns to the
|
|
324
|
+
// filter, and both ends wrap through it. Enter in the filter changes
|
|
325
|
+
// nothing: a change always needs the cursor on its row.
|
|
326
|
+
const up = kb.matches(data, "tui.select.up")
|
|
327
|
+
const confirm = kb.matches(data, "tui.select.confirm")
|
|
328
|
+
if (
|
|
329
|
+
up ||
|
|
330
|
+
kb.matches(data, "tui.select.down") ||
|
|
331
|
+
(confirm && filterFocused)
|
|
332
|
+
) {
|
|
333
|
+
if (shown.length === 0) return
|
|
334
|
+
if (filterFocused) {
|
|
335
|
+
filterFocused = false
|
|
336
|
+
selected = up ? shown.length - 1 : 0
|
|
337
|
+
} else if (selected === (up ? 0 : shown.length - 1)) {
|
|
338
|
+
filterFocused = true
|
|
339
|
+
selected = 0
|
|
340
|
+
} else {
|
|
341
|
+
selected += up ? -1 : 1
|
|
342
|
+
}
|
|
343
|
+
list.selectItem(shown[selected].id)
|
|
344
|
+
return
|
|
345
|
+
}
|
|
346
|
+
// Space in the filter types a space.
|
|
347
|
+
if (!filterFocused && (confirm || data === " ")) {
|
|
348
|
+
const item = shown[selected]
|
|
349
|
+
if (!item) return
|
|
350
|
+
if (confirm && isNumericSettingKey(item.id)) openEditor(item, item.id)
|
|
351
|
+
else list.handleInput(data)
|
|
352
|
+
return
|
|
353
|
+
}
|
|
354
|
+
filter.handleInput(data)
|
|
355
|
+
if (filter.getValue() !== query) {
|
|
356
|
+
filterFocused = true
|
|
357
|
+
applyFilter()
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
}
|
|
361
|
+
}
|
|
@@ -48,7 +48,7 @@ export interface ViewerKeys {
|
|
|
48
48
|
* the key (pi #4748). Formatting the injected manager's own resolved keys here
|
|
49
49
|
* sidesteps both.
|
|
50
50
|
*/
|
|
51
|
-
function formatKeyLabel(key: KeyId): string {
|
|
51
|
+
export function formatKeyLabel(key: KeyId): string {
|
|
52
52
|
return key
|
|
53
53
|
.split("+")
|
|
54
54
|
.map((part) => {
|
|
@@ -21,6 +21,7 @@ Want to equip Pi with MCP, web access, subagents, and todos? Install [`pi-essent
|
|
|
21
21
|
- [Quick start](#quick-start)
|
|
22
22
|
- [Authentication and credential safety](#authentication-and-credential-safety)
|
|
23
23
|
- [Commands](#commands)
|
|
24
|
+
- [Tools](#tools)
|
|
24
25
|
- [Models and routing](#models-and-routing)
|
|
25
26
|
- [Configuration](#configuration)
|
|
26
27
|
- [Troubleshooting](#troubleshooting)
|
|
@@ -28,6 +29,7 @@ Want to equip Pi with MCP, web access, subagents, and todos? Install [`pi-essent
|
|
|
28
29
|
|
|
29
30
|
## Requirements
|
|
30
31
|
|
|
32
|
+
- Node **22.19.0 or later**
|
|
31
33
|
- Pi Coding Agent and Pi AI version **0.80.0 or later**
|
|
32
34
|
- A Google account that can use the relevant Cloud Code Assist / Antigravity services
|
|
33
35
|
- A browser to complete the Google sign-in. Same-machine is best (the browser hits the local callback automatically); on a remote/headless machine, complete sign-in anywhere and paste the resulting callback URL back into Pi (see [Troubleshooting](#troubleshooting)).
|
|
@@ -108,17 +110,51 @@ Review these permissions before approving access. If your credentials expire or
|
|
|
108
110
|
| `/antigravity.usage` | Show the server-reported shared quota groups and reset times. |
|
|
109
111
|
| `/antigravity.models` | List available runtime models, remaining shared-pool quota, and capabilities. |
|
|
110
112
|
| `/antigravity.accounts` | List linked accounts; use `switch` or `remove` with an index or email to manage them. |
|
|
113
|
+
| `/antigravity.credits [on\|off]` | Check or toggle automatic fallback to AI credits when standard quotas are exhausted. |
|
|
111
114
|
| `/antigravity.models all` | Include tab/chat models normally hidden from the model list. |
|
|
112
115
|
| `/antigravity.refresh` | Force refresh the dynamic model catalog from Antigravity. |
|
|
113
116
|
| `/antigravity.doctor` | Show sanitized provider diagnostics, including the endpoint, status, and resolved runtime model. |
|
|
114
117
|
| `/antigravity.image <prompt>` | Generate an image via Antigravity and save it under `.pi/generated-images/`. Optional `--ratio 16:9`, `--model`, `--path`. |
|
|
115
118
|
| `/antigravity.search <query>` | Search the web using Google Search Grounding via Antigravity. Optional `--thinking`, `--url <url>`. |
|
|
119
|
+
| `/antigravity.fetch <url>` | Read a public web page through the Antigravity fetch service and print it as markdown. Optional `--raw` keeps the crawled source. |
|
|
116
120
|
|
|
117
121
|
Model availability, entitlement, quota groups, and resets are returned by the service and can differ by account. The quota percentage shown for a model can represent a shared pool, not a private per-model allowance.
|
|
118
122
|
|
|
119
|
-
|
|
123
|
+
## Tools
|
|
120
124
|
|
|
121
|
-
|
|
125
|
+
### Image generation
|
|
126
|
+
|
|
127
|
+
The extension registers a `generate_image` tool the model can call. Images are written inside the project directory (default `.pi/generated-images/`). Image generation defaults to `gemini-3.1-flash-image`; model availability is account-dependent. Requests use the direct image endpoint, with the legacy streaming endpoint tried on HTTP 404. Existing model and endpoint fallbacks remain available.
|
|
128
|
+
|
|
129
|
+
The `generate_image` tool accepts an optional `referenceImages` array of project-relative paths. Reference images are sent to Google alongside the prompt; only include images you intend to upload. PNG, JPEG, WebP, and GIF are supported, with MIME types detected from file contents. Each reference must be at most 10 MB, and at most four references are sent. Paths must remain inside the working directory, including symlink targets. For example:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"prompt": "Design a deep bowl using the colors and artwork in these references",
|
|
134
|
+
"referenceImages": ["references/oatmeal.png", "references/plate.jpg"],
|
|
135
|
+
"path": "designs/bowl.png"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Omit `referenceImages` (or pass `[]`) for text-only generation. `/antigravity.image` remains text-only; reference paths are supported by the tool, not the slash command.
|
|
140
|
+
|
|
141
|
+
### Search
|
|
142
|
+
|
|
143
|
+
The `google_search` tool allows models to perform real-time web search and URL analysis using Google Search Grounding over Cloud Code Assist. The default model is `gemini-3.5-flash-lite` (fallbacks: `gemini-3.1-flash-lite`, `gemini-3-flash`) and the default reply is a short evidence brief. It supports optional lead agent directives (`instruction`), specific target URLs (`urls`), and deep reasoning (`thinking: true` or `/antigravity.search --thinking`).
|
|
144
|
+
|
|
145
|
+
### Read a page
|
|
146
|
+
|
|
147
|
+
Use the reader when you already know the page URL; use `google_search` to find sources. The answer is Google's crawled copy and can be stale or incomplete. For login pages, interactive applications, and unsupported formats, use a browser or another permitted local tool. Check `/antigravity.doctor` after a failed or degraded read. The [reader guarantees](docs/reader-guarantees.md) map its limits to offline regression checks.
|
|
148
|
+
|
|
149
|
+
The `read_url_content` tool reads public pages. Fetching runs through Google's Cloud Code Assist endpoints, so the machine never contacts the target site. The character budget covers returned text and serialized details; small budgets may omit older attempt details, with an explicit omission count. `/antigravity.doctor` retains the bounded retrieval history. The tool resolves redirects with `v1internal:rewriteUri`, reads `v1internal:fetchFromTrawlerCache`, and retries with `liveFetch: true` when the cache is missing, clearly cut off, empty, or suspected to contain only a shell or access wall. A shared 10-second network deadline bounds redirects, endpoint failover, and recovery; useful content is retained if the deadline expires or recovery fails. Short readable fragments with unknown completeness do not trigger a retry. Endpoint failover is limited to transport failures; a read makes at most ten Google requests and tries at most one publisher representation URL. HTML conversion accepts at most 2,000,000 characters, 50,000 markup tokens, and 128 nested elements. More complex pages are not converted; Google's HTML is saved to a temp file instead.
|
|
150
|
+
|
|
151
|
+
Before converting HTML to Markdown, the tool reads page metadata, bounded JSON-LD matched to the article, and advertised alternate representations. If cache and live results are inadequate, it tries at most one same-origin Markdown or supported article-JSON representation, preferring the page language and then Markdown; a mismatched-language fallback updates the reported language and retrieval outcome. JSON recovery supports GitHub Docs article bodies and WordPress single-post responses with matching article identity. Inadequate MDN copies can use the publisher's same-origin `index.json` representation within the same one-representation budget. Cut-off Wikipedia articles use Wikipedia's parse API for the same article, and cut-off `raw.githubusercontent.com` files use the full line list from the matching GitHub file page; both are used only when they name the requested article or file. Wikipedia titles are matched the way MediaWiki does (first letter capitalized, redirects followed); revisions, queries, and special pages are not recovered. These copies are tried even when Google cannot serve the original URL. MDN's JSON may supply a canonical article URL within the same origin and locale's `/docs/` prefix; results report that redirect. Recovery requires verified publisher identity and complete supported article sections; if Google cuts only the later sidebar JSON, the source is still reported as incomplete. Unknown section types or a cut-off article body are not silently repaired. Results report the article URL, any alternate representation URL, retrieval attempts, and available title, author, publication date, modification date, and language. Structured data is parsed, never executed.
|
|
152
|
+
|
|
153
|
+
Conversion keeps headings, lists, links, code blocks, and data tables. Table grids are limited to 10,000 cells per page; nested or oversized grids are flattened without expanding their spans. It removes navigation and hidden decorations (a block named like chrome, such as `sidebar` or `menu`, is kept when it holds the article or most of the page's text), then selects a substantive `<main>`, `role="main"`, or `<article>` region, skipping empty placeholders. Source completeness, suspected content problems, and our own output truncation are reported separately. A closed HTML document is not proof that Google supplied the entire article. Empty results do not establish that the page requires JavaScript: Google's response may be cut off, blocked, or a shell.
|
|
154
|
+
|
|
155
|
+
Output is capped by `ANTIGRAVITY_WEB_FETCH_MAX_CHARS` (default 60000), including the provenance header and saved-page footer. A long URL is elided inside the header so provenance cannot take the page's share of the budget away. Page-controlled metadata is stripped of line breaks and bounded before it reaches the header. When a page does not fit, the tool returns its beginning and saves the full Markdown, with the provenance header, to a private temp file (`pi-url-*/page.md`, mode 0600), the same way Pi saves long tool output. The answer ends with the file path, and `details.fullOutputPath` holds it; the agent reads or searches that file instead of fetching again. Pages beyond the conversion limits are refused, and Google's unconverted HTML is saved to `page.html` for searching. Raw mode is not bound by those limits: it returns the crawled source as it is, so the page's size limits the answer, not the read. A raw page that does not fit is saved as the source alone, without the provenance header. If a page cannot be saved (for example, the temp directory is not writable), the answer says so and still shows the beginning. Temp files are not deleted automatically. Service responses over 5 MB are refused before parsing. A live 401/403 or other recovery failure keeps an already usable cached copy.
|
|
156
|
+
|
|
157
|
+
`/antigravity.fetch [--raw] <url>` exposes the same fetch interactively. Raw mode preserves the requested page's crawled source and does not substitute alternate representations. Literal private/local addresses, local hostnames, non-HTTP URLs, and URLs with embedded username/password are refused. Known sensitive query and fragment values, and token-shaped values, are redacted from provenance, progress messages, and errors, but remain part of the request sent to the fetch service. DNS names are resolved by Google's service rather than locally, so this check is a filter for obvious local/private targets, not a guarantee against every name that resolves internally. The service resolves the initial redirect chain, so local validation sees the final URI it reports rather than every remote hop: a final URI that names a private or local address fails closed and aborts the read, while a malformed one is ignored and the requested page is read. Explicit non-HTTP or credential-bearing redirects are refused. PDF URLs, PDF content types, and line-start PDF signatures within the first 1024 characters fail with guidance to download the URL directly and read the local file with an available PDF reader, subject to normal permissions. Alternate `.pdf` links are ignored rather than substituted. The tool itself does not download or extract PDFs. This remains a best-effort Google crawler tool, without a local HTTP or browser fallback, cookies, or login support.
|
|
122
158
|
|
|
123
159
|
### Native image API
|
|
124
160
|
|
|
@@ -137,11 +173,15 @@ The native API returns in-memory image/text blocks and does not save files. Inpu
|
|
|
137
173
|
|
|
138
174
|
## Models and routing
|
|
139
175
|
|
|
140
|
-
After you sign in, the provider refreshes its catalog from Antigravity (`fetchAvailableModels`) and groups runtime thinking variants into public Pi model IDs. Newly enabled models — for example Gemini 4 Argon or
|
|
176
|
+
After you sign in, the provider refreshes its catalog from Antigravity (`fetchAvailableModels`) and groups runtime thinking variants into public Pi model IDs. Newly enabled models — for example Gemini 4 Argon or Gemini 4 Hydrogen — become selectable after that refresh without waiting for an extension release. A last-known-good cache is kept for offline/cold start; the static table below is only the conservative fallback and a routing reference.
|
|
141
177
|
|
|
142
178
|
Gemini 4 Argon is advertised only when the client version is current and the account is entitled. After upgrading, run `/antigravity.refresh` (or start any session; print mode refreshes before the prompt) and select `antigravity/gemini-4-argon`. Updating the client version does not grant entitlement. Headless `pi -p` resolves `--model` before extensions run, so the first invocation after an upgrade can still print `Using custom model id`; the request is routed from the refreshed catalog, and the next invocation reads the persisted list.
|
|
143
179
|
|
|
144
|
-
|
|
180
|
+
Long sessions that switch providers are the highest-risk setup for tool-observation mimicry on Gemini 3.x. Foreign tool calls are flattened into `[Observation from ...]` text, and a model can imitate those logs instead of making a real tool call. Finish a task on one provider before switching.
|
|
181
|
+
|
|
182
|
+
A tier that answers with a generic resource-exhausted error is retried on the other Antigravity endpoints and then on a sibling tier of the same generation (`-low` can move to `-high` or `-medium`). A hard quota message that includes a reset time does not do this.
|
|
183
|
+
|
|
184
|
+
A successful refresh replaces the catalog with advertised models and routes, removing entries absent from all responding endpoints. Live capabilities and token limits override static defaults; grouped variants use the smallest advertised limits. Known thinking variants such as `gemini-4-hydrogen-low` / `-medium` / `-high` / `-xhigh` become one public model. Unfamiliar suffixes and opaque IDs stay usable as exact runtime IDs when they pass the catalog filters.
|
|
145
185
|
|
|
146
186
|
Use `/antigravity.refresh` to bypass the four-hour cache, or `/antigravity.models` to view live availability and quota. Account/project changes and older cache formats trigger discovery on the next network-enabled refresh. Failed or unrecognized responses keep the last-known-good catalog; forced refreshes report the error. Arbitrary API schema changes can still require an extension update. `ANTIGRAVITY_USER_AGENT` overrides the default client fingerprint when a newer CLI version is required.
|
|
147
187
|
|
|
@@ -185,7 +225,11 @@ All primary environment variables start with `ANTIGRAVITY_`. The legacy `NOAGY_`
|
|
|
185
225
|
<!-- prettier-ignore -->
|
|
186
226
|
| Variable | Purpose |
|
|
187
227
|
| --- | --- |
|
|
188
|
-
| `ANTIGRAVITY_BASE_URL` | Override the API base URL. It must be HTTPS, contain no URL credentials, and target an allowed Google APIs host. |
|
|
228
|
+
| `ANTIGRAVITY_BASE_URL` | Override the API base URL. It must be HTTPS, contain no URL credentials, and target an allowed Google APIs host. Ignored for inference once Gemini Enterprise routing is active. |
|
|
229
|
+
| `ANTIGRAVITY_LOCATION` | `eu`, `us`, or `global`. `eu` and `us` send inference only to `businessaicode.<location>.rep.googleapis.com` and never fall back to the consumer `cloudcode-pa` hosts. Also read from `~/.gemini/antigravity-cli/settings.json` when that file stores `location`. |
|
|
230
|
+
| `ANTIGRAVITY_ENTERPRISE` | Set to `1` to force Gemini Enterprise routing, including `global` (`businessaicode.googleapis.com`). |
|
|
231
|
+
| `ANTIGRAVITY_ENTERPRISE_PROJECT` | Google Cloud project id for the selected Gemini Enterprise license. Required when enterprise routing is on. Also read from the CLI settings `project` / `projectId`. |
|
|
232
|
+
| `ANTIGRAVITY_USER_TIER` | License tier id required with enterprise routing. Also read from the CLI settings `userTier`. |
|
|
189
233
|
| `ANTIGRAVITY_PROJECT_ID` | Use a specific Cloud Code Assist project ID instead of discovery or the stable account fallback. |
|
|
190
234
|
| `ANTIGRAVITY_CALLBACK_HOST` | Bind OAuth callback to `127.0.0.1`, `::1`, or `localhost` only. Defaults to `127.0.0.1`. |
|
|
191
235
|
| `ANTIGRAVITY_USER_AGENT` | Override the request user-agent. |
|
|
@@ -197,12 +241,15 @@ All primary environment variables start with `ANTIGRAVITY_`. The legacy `NOAGY_`
|
|
|
197
241
|
| `ANTIGRAVITY_STREAM_HEADER_TIMEOUT_MS` | Response-header deadline; default `180000` ms. Set `0` to disable. |
|
|
198
242
|
| `ANTIGRAVITY_NO_KEEPALIVE` | Set to `1` to skip the keep-alive connection pool. |
|
|
199
243
|
| `ANTIGRAVITY_NO_PREWARM` | Set to `1` to skip the TLS pre-warm request made on the first Antigravity request. |
|
|
200
|
-
| `ANTIGRAVITY_NO_EXTRA_TOOLS` | Set to `1` to stop registering the model-facing `google_search` and `generate_image` tools. The `/antigravity.search
|
|
244
|
+
| `ANTIGRAVITY_NO_EXTRA_TOOLS` | Set to `1` to stop registering the model-facing `google_search`, `read_url_content`, and `generate_image` tools. The `/antigravity.search`, `/antigravity.fetch`, and `/antigravity.image` commands stay available. |
|
|
245
|
+
| `ANTIGRAVITY_USE_CREDITS` | Set to `1` (or `0`) to explicitly enable (or disable) automatic AI credit overages when standard quota is depleted. Defaults to inheriting `useG1Credits` from `~/.gemini/antigravity-cli/settings.json` only when that file sets the flag. Otherwise credit overages stay off. |
|
|
201
246
|
| `ANTIGRAVITY_NO_SEARCH_TOOL` | Set to `1` to skip only the `google_search` tool, e.g. when another extension provides web search. |
|
|
247
|
+
| `ANTIGRAVITY_NO_FETCH_TOOL` | Set to `1` to skip only the `read_url_content` tool, e.g. when another extension already fetches URLs. |
|
|
202
248
|
| `ANTIGRAVITY_NO_IMAGE_TOOL` | Set to `1` to skip only the `generate_image` tool. |
|
|
203
|
-
| `
|
|
249
|
+
| `ANTIGRAVITY_WEB_FETCH_MAX_CHARS` | Character budget for one `read_url_content` result. Defaults to 60000, roughly 15k tokens. |
|
|
250
|
+
| `ANTIGRAVITY_DEFER_TOOLS` | Set to `1` to register `google_search`, `read_url_content`, and `generate_image` as deferred: they aren't declared to the model, but codemode scripts can call them and `tool_search` can load them. Needs `codemode` or `tool_search` active, e.g. `"defaultTools": ["+codemode"]`. Requires Pi 0.99.2+; older Pi keeps them direct. |
|
|
204
251
|
|
|
205
|
-
`pi config` can disable each model-facing tool without disabling the provider. The package loads
|
|
252
|
+
`pi config` can disable each model-facing tool without disabling the provider. The package loads four extension resources: `src/index.ts` (provider, OAuth, and slash commands), `src/features/google-search.ts` (`google_search`), `src/features/read-url-content.ts` (`read_url_content`), and `src/features/generate-image.ts` (`generate_image`). Turn off a feature resource there to stop registering that tool. `/antigravity.search`, `/antigravity.fetch`, and `/antigravity.image` stay available from the provider extension.
|
|
206
253
|
|
|
207
254
|
Environment variables still force a loaded tool off, including in scripts and headless runs. They cannot turn a resource back on after `pi config` disables it, because that file is not loaded. Either control is enough to hide the tool from the model. Run `/reload` after changing `pi config`.
|
|
208
255
|
|
|
@@ -232,10 +279,12 @@ This repo uses [Yarn 4](https://yarnpkg.com/) via Corepack for install, scripts,
|
|
|
232
279
|
|
|
233
280
|
```bash
|
|
234
281
|
corepack enable
|
|
235
|
-
yarn install
|
|
282
|
+
yarn install --immutable
|
|
236
283
|
yarn check
|
|
237
284
|
```
|
|
238
285
|
|
|
286
|
+
For an optional live fetch check, run `yarn smoke:fetch` after `/login antigravity`. It exercises the registered tool on three public URLs and checks that reading a saved page needs neither network nor credentials. Missing expected page text is a failure unless explicit retrieval failures explain a degraded copy, which is an upstream-availability warning. An unobserved MDN canonical alias is also a warning; when that alias is observed, redirect provenance is checked. It uses saved Pi credentials (`PI_AUTH_PATH` can select another auth file), leaves saved pages in the temp directory, and is excluded from `yarn check` and default CI. Exit codes: 0 for successful coverage, 1 for integration failures, 2 when upstream availability limits coverage, no page passes, or no saved page can be checked.
|
|
287
|
+
|
|
239
288
|
Installs are hardened against common supply-chain attacks: lifecycle scripts are off, lockfile checksums must match the npm registry, and package versions younger than three days are rejected. Do not add a second registry or enable `enableScripts` without a review.
|
|
240
289
|
|
|
241
290
|
The package declares its Pi extension in `package.json` under `pi.extensions`. See the [Pi package documentation](https://pi.dev/docs/latest/packages) for package installation, manifest, and gallery conventions.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Reader guarantees
|
|
2
|
+
|
|
3
|
+
The reader uses Google's crawler. It does not contact the origin directly, execute page scripts, download files, extract PDFs, or reconstruct missing article text. A closed HTML document or a complete saved page does not prove full article coverage.
|
|
4
|
+
|
|
5
|
+
## Contract and regression checks
|
|
6
|
+
|
|
7
|
+
Run `yarn check` for the offline gate. The two reader scripts are included in TypeScript, ESLint, Prettier, and the default test chain.
|
|
8
|
+
|
|
9
|
+
| Guarantee | Regression check | Owner |
|
|
10
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
11
|
+
| Unsafe caller URLs are rejected before credential lookup or progress. Search uses the same URL predicate, plus a best-effort DNS filter before contacting origins. | `scenarioGuards`; foundations URL policy cases; search citations tests | `utils/address.ts` |
|
|
12
|
+
| URL credentials and recognized credential carriers are redacted on rendered surfaces. Ordinary diagnostic values and JSON structure survive. Exact caller/service URL echoes in page content are redacted before the page is shown or saved. Arbitrary secrets in page text are not promised filtered. | `scenarioSecrets`; foundations redaction and JSON cases | `utils/security.ts`, `web-fetch.ts` |
|
|
13
|
+
| Malformed credentials cannot appear in parser errors or retained causes. | Foundations credential cases | `client/client.ts` |
|
|
14
|
+
| Third-party text has valid UTF-16. Metadata is bounded and single-line; page bodies retain their line structure. | Foundations text, metadata, and body cases | `utils/text.ts` |
|
|
15
|
+
| Relative redirects resolve normally. Explicit private, credential-bearing, or non-HTTP destinations fail closed. Only destinations reported by Google are visible; intermediate redirects and remote DNS are not independently checked. | `scenarioRedirects`; foundations URL policy | `web-fetch.ts` |
|
|
16
|
+
| One shared ten-second network deadline and at most ten Google requests bound retrieval. Endpoint failover is transport-only. The caller's abort is respected. | `scenarioAlternateOnSecondEndpoint`; deadline and abort cases | `web-fetch.ts` |
|
|
17
|
+
| Recovery retains a useful original when live or optional representation reads fail. At most one publisher representation URL is selected. | `scenarioRecovery`, `scenarioAlternate`, `scenarioPdf` | `web-fetch.ts` |
|
|
18
|
+
| HTML work is bounded before parsing: 2,000,000 characters, 50,000 markup tokens, 128 nested elements. Script strings and comments do not count as nested markup. Independent blocks avoid repeated prefix joins. | Foundations size, node, depth, script/comment, and many-block cases | `document.ts`, `markdown.ts` |
|
|
19
|
+
| Inspection uses an owned DOM, substantive content regions, and body evidence for access-wall judgments. A heading alone does not prove a wall or a JavaScript shell. | Foundations inspection and real-page fixtures; `scenarioStatusArticle` | `inspect.ts`, `markdown.ts` |
|
|
20
|
+
| XML, SVG, Markdown, and text are not silently emptied as HTML. PDF refusal uses the reported media type, URL suffix, or line-start signature rather than prose mentioning a signature. | Foundations media cases; `scenarioDetection`, `scenarioPdf` | `media.ts`, `markdown.ts`, `web-fetch.ts` |
|
|
21
|
+
| Source completeness, content assessment, and output truncation remain separate. Publisher metadata is labeled as publisher claims. Omitted publisher sections are noted. | `scenarioTruncatedCopy`; foundations MDN cases | `inspect.ts`, `mdn.ts`, `web-fetch.ts` |
|
|
22
|
+
| Returned text plus serialized details share the configured character cap. Provenance and the saved-page footer count too. Small budgets can omit older attempt details; the omission count is explicit and doctor retains the bounded full history. | `scenarioReadablePage`, `scenarioBudget`, `scenarioLongFence`; live smoke cap checks | Feature entrypoint and formatter |
|
|
23
|
+
| A page that does not fit is saved whole to a private temp file named in the answer and in `details.fullOutputPath`. A budget too small to answer leaves no file behind, and a failed save is reported in the answer without losing the page. Pages beyond the conversion limits are refused with Google's unconverted HTML saved. Raw mode returns the crawled source whatever its size and saves it without the provenance header. | `scenarioReadablePage`, `scenarioBudgetFailure`, `scenarioUnconverted` | `save.ts`, feature entrypoint |
|
|
24
|
+
| Cut-off or unavailable Wikipedia articles and raw GitHub files recover only through a copy that names the requested article or file. Advertised, MDN, Wikipedia and GitHub copies share one representation contract. | `scenarioWikipedia`, `scenarioGithubRaw` | `sites.ts`, `web-fetch.ts` |
|
|
25
|
+
| Successful degraded reads and failures leave sanitized diagnostics. | Deadline/degraded diagnostics cases | Reader and `diagnostics/` |
|
|
26
|
+
|
|
27
|
+
Search caches expire after ten minutes and skip known secret-bearing keys or values. Client lookup caches use token digests rather than raw access tokens as keys.
|
|
28
|
+
|
|
29
|
+
The response stream is capped at 5,000,000 bytes. Limits are refusals, not claims that a page is complete.
|
|
30
|
+
|
|
31
|
+
## Live check
|
|
32
|
+
|
|
33
|
+
After `/login antigravity`, run `yarn smoke:fetch`. It exercises Example.com, GitHub Docs, and an old MDN URL, checks the complete output cap, and checks that a saved page can be read without network or credentials. Wrong page text is a failure. Explicit retrieval failures explaining a degraded copy and an unobserved canonical alias are warnings. Upstream availability warnings produce exit code 2; an alias-only warning does not. Exit code 2 means live coverage was insufficient; a passing offline gate does not replace this check.
|
|
34
|
+
|
|
35
|
+
The saved fixture data comes from the existing main-branch corpus. Its provenance is listed in `scripts/fixtures/web-fetch/README.md`. The branch's registered-tool suite remains the implementation contract; main's incompatible reader suite is not imported.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-antigravity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Personal Antigravity / Cloud Code Assist provider for Pi Coding Agent",
|
|
5
5
|
"author": "Rahul Arya",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"LICENSE",
|
|
27
27
|
"README.md",
|
|
28
|
+
"docs/reader-guarantees.md",
|
|
28
29
|
"src",
|
|
29
30
|
"tsconfig.json"
|
|
30
31
|
],
|
|
@@ -34,12 +35,13 @@
|
|
|
34
35
|
},
|
|
35
36
|
"scripts": {
|
|
36
37
|
"typecheck": "tsc --noEmit",
|
|
37
|
-
"lint": "eslint src",
|
|
38
|
+
"lint": "eslint src scripts/test-web-fetch.ts scripts/test-reader-foundations.ts scripts/smoke-fetch-policy.ts",
|
|
38
39
|
"lint:fix": "eslint src --fix",
|
|
39
40
|
"format": "prettier --write .",
|
|
40
41
|
"format:check": "prettier --check .",
|
|
41
42
|
"security-check": "node scripts/run-ts.mjs scripts/security-check.ts",
|
|
42
|
-
"test": "node scripts/run-ts.mjs scripts/test-sanitize-text.ts && node scripts/run-ts.mjs scripts/test-model-routing.ts && node scripts/run-ts.mjs scripts/test-model-discovery.ts && node scripts/run-ts.mjs scripts/test-usage-formatter.ts && node scripts/run-ts.mjs scripts/test-stream-sse.ts && node scripts/run-ts.mjs scripts/test-stream-header-deadline.ts && node scripts/run-ts.mjs scripts/test-http-proxy.ts && node scripts/run-ts.mjs scripts/test-oauth-fetch.ts && node scripts/run-ts.mjs scripts/test-image-gen.ts && node scripts/run-ts.mjs scripts/test-native-images.ts && node scripts/run-ts.mjs scripts/test-transcript-context.ts && node scripts/run-ts.mjs scripts/test-accounts.ts && node scripts/run-ts.mjs scripts/test-search.ts && node scripts/run-ts.mjs scripts/test-search-citations.ts && node scripts/run-ts.mjs scripts/test-extra-tools-toggle.ts && node scripts/run-ts.mjs scripts/test-provider-registration.ts && node scripts/run-ts.mjs scripts/test-stream-recovery.ts",
|
|
43
|
+
"test": "node scripts/run-ts.mjs scripts/test-sanitize-text.ts && node scripts/run-ts.mjs scripts/test-model-routing.ts && node scripts/run-ts.mjs scripts/test-model-discovery.ts && node scripts/run-ts.mjs scripts/test-usage-formatter.ts && node scripts/run-ts.mjs scripts/test-model-pricing.ts && node scripts/run-ts.mjs scripts/test-stream-sse.ts && node scripts/run-ts.mjs scripts/test-stream-header-deadline.ts && node scripts/run-ts.mjs scripts/test-http-proxy.ts && node scripts/run-ts.mjs scripts/test-oauth-fetch.ts && node scripts/run-ts.mjs scripts/test-image-gen.ts && node scripts/run-ts.mjs scripts/test-native-images.ts && node scripts/run-ts.mjs scripts/test-transcript-context.ts && node scripts/run-ts.mjs scripts/test-accounts.ts && node scripts/run-ts.mjs scripts/test-search.ts && node scripts/run-ts.mjs scripts/test-search-citations.ts && node scripts/run-ts.mjs scripts/test-web-fetch.ts && node scripts/run-ts.mjs scripts/test-reader-foundations.ts && node scripts/run-ts.mjs scripts/test-extra-tools-toggle.ts && node scripts/run-ts.mjs scripts/test-fetch-tool-toggle.ts && node scripts/run-ts.mjs scripts/test-provider-registration.ts && node scripts/run-ts.mjs scripts/test-stream-recovery.ts && node scripts/run-ts.mjs scripts/test-enterprise-and-capacity.ts",
|
|
44
|
+
"smoke:fetch": "node scripts/run-ts.mjs scripts/smoke-web-fetch.mjs",
|
|
43
45
|
"smoke:tools": "node scripts/run-ts.mjs scripts/smoke-tool-schema.ts",
|
|
44
46
|
"smoke:models": "node scripts/run-ts.mjs scripts/smoke-all-models.mjs",
|
|
45
47
|
"audit": "yarn npm audit --environment production --recursive && yarn npm audit --severity high --all --recursive",
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
"extensions": [
|
|
50
52
|
"./src/index.ts",
|
|
51
53
|
"./src/features/google-search.ts",
|
|
54
|
+
"./src/features/read-url-content.ts",
|
|
52
55
|
"./src/features/generate-image.ts"
|
|
53
56
|
]
|
|
54
57
|
},
|
|
@@ -58,21 +61,27 @@
|
|
|
58
61
|
"typebox": "*"
|
|
59
62
|
},
|
|
60
63
|
"devDependencies": {
|
|
61
|
-
"@earendil-works/pi-ai": "^
|
|
62
|
-
"@earendil-works/pi-coding-agent": "^
|
|
64
|
+
"@earendil-works/pi-ai": "^1.5.0",
|
|
65
|
+
"@earendil-works/pi-coding-agent": "^1.5.0",
|
|
63
66
|
"@eslint/js": "^10.0.1",
|
|
64
67
|
"@types/node": "^26.6.2",
|
|
68
|
+
"@types/turndown": "^5.0.6",
|
|
65
69
|
"eslint": "^10.11.0",
|
|
66
70
|
"eslint-config-prettier": "^10.1.8",
|
|
67
71
|
"globals": "^17.7.0",
|
|
68
72
|
"prettier": "^3.9.8",
|
|
73
|
+
"typebox": "^1.3.27",
|
|
69
74
|
"typescript": "^6.0.3",
|
|
70
75
|
"typescript-eslint": "^8.64.0"
|
|
71
76
|
},
|
|
72
77
|
"dependencies": {
|
|
78
|
+
"@mixmark-io/domino": "^2.2.0",
|
|
79
|
+
"turndown": "^7.2.4",
|
|
80
|
+
"turndown-plugin-gfm": "^1.0.2",
|
|
73
81
|
"undici": "^8.12.3"
|
|
74
82
|
},
|
|
75
83
|
"resolutions": {
|
|
76
|
-
"undici": "8.12.3"
|
|
84
|
+
"undici": "8.12.3",
|
|
85
|
+
"minimatch": "11.0.3"
|
|
77
86
|
}
|
|
78
87
|
}
|