@herbertgao/pi-extensions 2026.11.11 → 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 +20 -0
- package/README.md +10 -10
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +10 -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 +60 -39
- 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 +21 -3
- 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 +6 -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 +2 -2
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/animate.md +17 -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 +12 -504
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/motion-reviewer.md +29 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/hooks.md +3 -3
- 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 +5 -34
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/typeset.md +6 -0
- 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/live-browser.js +17 -18
- 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 +10 -0
- package/node_modules/pi-commandcode-provider/README.md +2 -2
- package/node_modules/pi-commandcode-provider/package.json +1 -1
- 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-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 +10 -7
- 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
|
@@ -1,106 +1,82 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
flightTail,
|
|
4
|
+
holdFlight,
|
|
5
|
+
runnerFlightKey,
|
|
3
6
|
tryLazyInstallForFormatter
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G53LBDNU.js";
|
|
5
8
|
import {
|
|
6
9
|
OXFMT_SUPPORTED_EXTENSIONS,
|
|
7
|
-
findPSScriptAnalyzerConfigPath,
|
|
8
10
|
getAutoInstallToolIdForFormatter,
|
|
9
11
|
getFormatterPolicyForFile,
|
|
10
12
|
getSmartDefaultFormatterName,
|
|
11
13
|
gradleBlockRanges,
|
|
12
|
-
hasBiomeConfig,
|
|
13
|
-
hasBlackConfig,
|
|
14
|
-
hasClangFormatConfig,
|
|
15
|
-
hasCljfmtConfig,
|
|
16
|
-
hasCmakeFormatConfig,
|
|
17
|
-
hasCsharpierConfig,
|
|
18
|
-
hasDetektConfig,
|
|
19
|
-
hasFantomasConfig,
|
|
20
|
-
hasGolangciConfig,
|
|
21
|
-
hasGoogleJavaFormatConfig,
|
|
22
14
|
hasGradleKtlintPlugin,
|
|
23
15
|
hasKtfmtConfig,
|
|
24
16
|
hasKtlintConfig,
|
|
25
|
-
hasMarkdownlintConfig,
|
|
26
|
-
hasMixFormatConfig,
|
|
27
17
|
hasNearestPackageJsonDependency,
|
|
28
|
-
hasNearestPackageJsonField,
|
|
29
|
-
hasOcamlformatConfig,
|
|
30
|
-
hasOrmoluConfig,
|
|
31
|
-
hasOxfmtConfig,
|
|
32
18
|
hasOxfmtSvelteConfig,
|
|
33
|
-
|
|
34
|
-
hasPhpCsFixerConfig,
|
|
35
|
-
hasPrettierConfig,
|
|
36
|
-
hasRubocopConfig,
|
|
37
|
-
hasRuffConfig,
|
|
38
|
-
hasSqlfluffConfig,
|
|
39
|
-
hasStandardrbConfig,
|
|
40
|
-
hasStyluaConfig,
|
|
41
|
-
hasSwiftformatConfig,
|
|
42
|
-
hasTaploConfig,
|
|
43
|
-
hasTerraformConfig,
|
|
44
|
-
hasToolConfig,
|
|
45
|
-
hasVitePlusConfig,
|
|
19
|
+
resolveInstalledToolCommand,
|
|
46
20
|
stripGradleCommentsAndStrings
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import {
|
|
49
|
-
readTextFileOrUndefined,
|
|
50
|
-
resolveCargoPackageEdition
|
|
51
|
-
} from "./chunk-SUIZOCSY.js";
|
|
21
|
+
} from "./chunk-PKWEBMCA.js";
|
|
52
22
|
import {
|
|
53
23
|
load
|
|
54
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZQSSO7LO.js";
|
|
55
25
|
import {
|
|
56
26
|
stripAnsi
|
|
57
27
|
} from "./chunk-6HWVI6MI.js";
|
|
58
28
|
import {
|
|
59
29
|
getToolPath
|
|
60
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-B2OXE4AH.js";
|
|
61
31
|
import {
|
|
32
|
+
findToolConfig,
|
|
33
|
+
hasToolConfig,
|
|
62
34
|
resolveToolCwd
|
|
63
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-LVLPA32Q.js";
|
|
64
36
|
import {
|
|
65
37
|
findGlobalBinary,
|
|
66
38
|
findLocalBinUpwards,
|
|
67
39
|
localBinPath
|
|
68
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LGH2HHZG.js";
|
|
69
41
|
import {
|
|
70
42
|
getIsolatedNpxSpawnOptions,
|
|
71
43
|
probeToolAsync
|
|
72
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-KXGTLAUW.js";
|
|
45
|
+
import {
|
|
46
|
+
readTextFileOrUndefined,
|
|
47
|
+
resolveCargoPackageEdition
|
|
48
|
+
} from "./chunk-KNSOA43J.js";
|
|
73
49
|
import {
|
|
74
50
|
classifyFinderFailure,
|
|
75
51
|
createAvailabilityLatch,
|
|
76
52
|
logAvailabilityDecision,
|
|
77
53
|
startHostStallSampler
|
|
78
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-6GLMMGCX.js";
|
|
79
55
|
import {
|
|
80
56
|
VENDOR_BIN_DIRS,
|
|
81
|
-
VENV_BIN_DIRS,
|
|
82
57
|
admittedLookupAnswer,
|
|
83
58
|
createGenerationSource,
|
|
59
|
+
isInSpawnTimeoutCooldown,
|
|
84
60
|
resolveWriteResult,
|
|
85
61
|
safeSpawnAsync
|
|
86
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-3PO4YYOX.js";
|
|
87
63
|
import {
|
|
88
64
|
TERRAGRUNT_FILENAMES
|
|
89
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-CQY2HEH7.js";
|
|
90
66
|
import {
|
|
91
67
|
assertInstallAllowed,
|
|
92
68
|
getProjectTrustGeneration
|
|
93
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-W26QZ3OM.js";
|
|
94
70
|
import {
|
|
95
71
|
compareOrdinal,
|
|
96
72
|
getDegradationLedgerGeneration,
|
|
97
73
|
incrementDegradationCount,
|
|
98
74
|
logExtension,
|
|
99
75
|
recordDegradationOnce
|
|
100
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-NHA5K226.js";
|
|
101
77
|
import {
|
|
102
78
|
logLatency
|
|
103
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-7CLWC2UH.js";
|
|
104
80
|
import {
|
|
105
81
|
BoundedFifoMap,
|
|
106
82
|
BoundedLruCache,
|
|
@@ -559,7 +535,7 @@ var TOOL_AGREEMENT_POLICIES = {
|
|
|
559
535
|
markdownlint: {
|
|
560
536
|
bucket: "node-lockfile",
|
|
561
537
|
withoutEvidence: "decline",
|
|
562
|
-
check:
|
|
538
|
+
check: (cwd) => hasToolConfig("markdownlint", cwd)
|
|
563
539
|
},
|
|
564
540
|
oxfmt: { bucket: "node-lockfile", withoutEvidence: "decline" },
|
|
565
541
|
oxlint: { bucket: "node-lockfile", withoutEvidence: "decline" },
|
|
@@ -568,27 +544,27 @@ var TOOL_AGREEMENT_POLICIES = {
|
|
|
568
544
|
ruff: {
|
|
569
545
|
bucket: "project-config",
|
|
570
546
|
withoutEvidence: "decline",
|
|
571
|
-
check:
|
|
547
|
+
check: (cwd) => hasToolConfig("ruff", cwd)
|
|
572
548
|
},
|
|
573
549
|
black: {
|
|
574
550
|
bucket: "project-config",
|
|
575
551
|
withoutEvidence: "decline",
|
|
576
|
-
check:
|
|
552
|
+
check: (cwd) => hasToolConfig("black", cwd)
|
|
577
553
|
},
|
|
578
554
|
sqlfluff: {
|
|
579
555
|
bucket: "project-config",
|
|
580
556
|
withoutEvidence: "decline",
|
|
581
|
-
check:
|
|
557
|
+
check: (cwd) => hasToolConfig("sqlfluff", cwd)
|
|
582
558
|
},
|
|
583
559
|
rubocop: {
|
|
584
560
|
bucket: "project-config",
|
|
585
561
|
withoutEvidence: "decline",
|
|
586
|
-
check:
|
|
562
|
+
check: (cwd) => hasToolConfig("rubocop", cwd)
|
|
587
563
|
},
|
|
588
564
|
standardrb: {
|
|
589
565
|
bucket: "project-config",
|
|
590
566
|
withoutEvidence: "decline",
|
|
591
|
-
check:
|
|
567
|
+
check: (cwd) => hasToolConfig("standardrb", cwd)
|
|
592
568
|
},
|
|
593
569
|
ktlint: { bucket: "standalone-cli", withoutEvidence: "decline" },
|
|
594
570
|
// typstyle is a standalone formatter binary. Its smart-default policy is
|
|
@@ -613,12 +589,12 @@ var TOOL_AGREEMENT_POLICIES = {
|
|
|
613
589
|
"golangci-lint": {
|
|
614
590
|
bucket: "project-config",
|
|
615
591
|
withoutEvidence: "decline",
|
|
616
|
-
check:
|
|
592
|
+
check: (cwd) => hasToolConfig("golangci-lint", cwd)
|
|
617
593
|
},
|
|
618
594
|
detekt: {
|
|
619
595
|
bucket: "project-config",
|
|
620
596
|
withoutEvidence: "decline",
|
|
621
|
-
check:
|
|
597
|
+
check: (cwd) => hasToolConfig("detekt", cwd)
|
|
622
598
|
},
|
|
623
599
|
gofmt: {
|
|
624
600
|
bucket: "project-config",
|
|
@@ -651,17 +627,17 @@ var TOOL_AGREEMENT_POLICIES = {
|
|
|
651
627
|
mix: {
|
|
652
628
|
bucket: "project-config",
|
|
653
629
|
withoutEvidence: "decline",
|
|
654
|
-
check:
|
|
630
|
+
check: (cwd) => hasToolConfig("mixFormat", cwd)
|
|
655
631
|
},
|
|
656
632
|
ocamlformat: {
|
|
657
633
|
bucket: "project-config",
|
|
658
634
|
withoutEvidence: "decline",
|
|
659
|
-
check:
|
|
635
|
+
check: (cwd) => hasToolConfig("ocamlformat", cwd)
|
|
660
636
|
},
|
|
661
637
|
"clang-format": {
|
|
662
638
|
bucket: "project-config",
|
|
663
639
|
withoutEvidence: "decline",
|
|
664
|
-
check:
|
|
640
|
+
check: (cwd) => hasToolConfig("clang-format", cwd)
|
|
665
641
|
},
|
|
666
642
|
gleam: {
|
|
667
643
|
bucket: "project-config",
|
|
@@ -671,7 +647,7 @@ var TOOL_AGREEMENT_POLICIES = {
|
|
|
671
647
|
terraform: {
|
|
672
648
|
bucket: "project-config",
|
|
673
649
|
withoutEvidence: "decline",
|
|
674
|
-
check:
|
|
650
|
+
check: (cwd) => hasToolConfig("terraform", cwd)
|
|
675
651
|
},
|
|
676
652
|
"terragrunt-hcl": {
|
|
677
653
|
bucket: "project-config",
|
|
@@ -681,60 +657,57 @@ var TOOL_AGREEMENT_POLICIES = {
|
|
|
681
657
|
"php-cs-fixer": {
|
|
682
658
|
bucket: "project-config",
|
|
683
659
|
withoutEvidence: "decline",
|
|
684
|
-
check:
|
|
660
|
+
check: (cwd) => hasToolConfig("php-cs-fixer", cwd)
|
|
685
661
|
},
|
|
686
662
|
csharpier: {
|
|
687
663
|
bucket: "project-config",
|
|
688
664
|
withoutEvidence: "decline",
|
|
689
|
-
check:
|
|
665
|
+
check: (cwd) => hasToolConfig("csharpier", cwd)
|
|
690
666
|
},
|
|
691
667
|
fantomas: {
|
|
692
668
|
bucket: "project-config",
|
|
693
669
|
withoutEvidence: "decline",
|
|
694
|
-
check:
|
|
670
|
+
check: (cwd) => hasToolConfig("fantomas", cwd)
|
|
695
671
|
},
|
|
696
672
|
swiftformat: {
|
|
697
673
|
bucket: "project-config",
|
|
698
674
|
withoutEvidence: "decline",
|
|
699
|
-
check:
|
|
675
|
+
check: (cwd) => hasToolConfig("swiftformat", cwd)
|
|
700
676
|
},
|
|
701
677
|
stylua: {
|
|
702
678
|
bucket: "project-config",
|
|
703
679
|
withoutEvidence: "decline",
|
|
704
|
-
check:
|
|
680
|
+
check: (cwd) => hasToolConfig("stylua", cwd)
|
|
705
681
|
},
|
|
706
682
|
ormolu: {
|
|
707
683
|
bucket: "project-config",
|
|
708
684
|
withoutEvidence: "decline",
|
|
709
|
-
check:
|
|
685
|
+
check: (cwd) => hasToolConfig("ormolu", cwd)
|
|
710
686
|
},
|
|
711
687
|
taplo: {
|
|
712
688
|
bucket: "project-config",
|
|
713
689
|
withoutEvidence: "decline",
|
|
714
|
-
check:
|
|
690
|
+
check: (cwd) => hasToolConfig("taplo", cwd)
|
|
715
691
|
},
|
|
716
692
|
"google-java-format": {
|
|
717
693
|
bucket: "project-config",
|
|
718
694
|
withoutEvidence: "decline",
|
|
719
|
-
check:
|
|
695
|
+
check: (cwd) => hasToolConfig("google-java-format", cwd)
|
|
720
696
|
},
|
|
721
697
|
cljfmt: {
|
|
722
698
|
bucket: "project-config",
|
|
723
699
|
withoutEvidence: "decline",
|
|
724
|
-
check:
|
|
700
|
+
check: (cwd) => hasToolConfig("cljfmt", cwd)
|
|
725
701
|
},
|
|
726
702
|
"cmake-format": {
|
|
727
703
|
bucket: "project-config",
|
|
728
704
|
withoutEvidence: "decline",
|
|
729
|
-
check:
|
|
705
|
+
check: (cwd) => hasToolConfig("cmake-format", cwd)
|
|
730
706
|
},
|
|
731
707
|
"psscriptanalyzer-format": {
|
|
732
708
|
bucket: "project-config",
|
|
733
709
|
withoutEvidence: "decline",
|
|
734
|
-
check: (cwd) =>
|
|
735
|
-
"PSScriptAnalyzerSettings.psd1",
|
|
736
|
-
"ScriptAnalyzerSettings.psd1"
|
|
737
|
-
])
|
|
710
|
+
check: (cwd) => hasToolConfig("psscriptanalyzer", cwd)
|
|
738
711
|
},
|
|
739
712
|
cue: {
|
|
740
713
|
bucket: "project-config",
|
|
@@ -1183,6 +1156,7 @@ async function tryLazyInstallFormatterTool(tool, cwd) {
|
|
|
1183
1156
|
var SKIP_FORMATTING = "skip-formatting";
|
|
1184
1157
|
var FORMATTER_UNAVAILABLE = "formatter-unavailable";
|
|
1185
1158
|
var FORMATTER_AGREEMENT_UNAVAILABLE = "formatter-agreement-unavailable";
|
|
1159
|
+
var FORMATTER_REJECTED_PREFIX = "formatter-rejected:";
|
|
1186
1160
|
async function fileExists(filePath) {
|
|
1187
1161
|
try {
|
|
1188
1162
|
await fs2.access(filePath);
|
|
@@ -1368,11 +1342,18 @@ async function resolveGoFmtBinary() {
|
|
|
1368
1342
|
const binary = path4.join(goroot, "bin", process.platform === "win32" ? "gofmt.exe" : "gofmt");
|
|
1369
1343
|
return await fileExists(binary) ? binary : null;
|
|
1370
1344
|
}
|
|
1371
|
-
|
|
1372
|
-
return
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1345
|
+
function resolveFormatterToolCommand(toolId, filePath, formatterName = toolId) {
|
|
1346
|
+
return resolveInstalledToolCommand(resolveFormatterCwd(filePath, formatterName), toolId);
|
|
1347
|
+
}
|
|
1348
|
+
function isFormatterRejected(cmd) {
|
|
1349
|
+
return typeof cmd === "string" && cmd.startsWith(FORMATTER_REJECTED_PREFIX);
|
|
1350
|
+
}
|
|
1351
|
+
function ladderMiss(found, formatterName) {
|
|
1352
|
+
if (found.rejected === void 0)
|
|
1353
|
+
return FORMATTER_UNAVAILABLE;
|
|
1354
|
+
const tail = diagnosticTail(found.rejected);
|
|
1355
|
+
return `${FORMATTER_REJECTED_PREFIX}${formatterName}: present but failed its version check${tail ? `:
|
|
1356
|
+
${tail}` : ""}`;
|
|
1376
1357
|
}
|
|
1377
1358
|
async function findInVendorBin(binary, cwd) {
|
|
1378
1359
|
return localBinPath(findLocalBinUpwards(binary, cwd, {
|
|
@@ -1393,6 +1374,9 @@ async function resolveManagedSmartDefaultCommand(formatterName, filePath, args)
|
|
|
1393
1374
|
const toolId = getAutoInstallToolIdForFormatter(formatterName);
|
|
1394
1375
|
if (!toolId)
|
|
1395
1376
|
return FORMATTER_UNAVAILABLE;
|
|
1377
|
+
const found = await resolveFormatterToolCommand(toolId, filePath, formatterName);
|
|
1378
|
+
if (found.command)
|
|
1379
|
+
return [found.command, ...args, filePath];
|
|
1396
1380
|
const { ensureTool } = await import("./probes/installer.js");
|
|
1397
1381
|
const installed = await ensureTool(toolId);
|
|
1398
1382
|
if (!installed) {
|
|
@@ -1401,14 +1385,17 @@ async function resolveManagedSmartDefaultCommand(formatterName, filePath, args)
|
|
|
1401
1385
|
subject: formatterName,
|
|
1402
1386
|
reason: "managed formatter lookup and installation returned no executable"
|
|
1403
1387
|
});
|
|
1404
|
-
return
|
|
1388
|
+
return ladderMiss(found, formatterName);
|
|
1405
1389
|
}
|
|
1406
1390
|
return [installed, ...args, filePath];
|
|
1407
1391
|
}
|
|
1408
1392
|
async function resolveManagedFormatterCommand(toolId, filePath, args, findLocal, cwd) {
|
|
1409
1393
|
const local = findLocal && cwd ? await findLocal(toolId, cwd) : null;
|
|
1410
|
-
|
|
1411
|
-
|
|
1394
|
+
if (local)
|
|
1395
|
+
return [local, ...args, filePath];
|
|
1396
|
+
const found = await resolveFormatterToolCommand(toolId, filePath);
|
|
1397
|
+
const installed = found.command ?? await getToolPath(toolId);
|
|
1398
|
+
return installed ? [installed, ...args, filePath] : ladderMiss(found, toolId);
|
|
1412
1399
|
}
|
|
1413
1400
|
function managedFormatterResolver(toolId, args, findLocal) {
|
|
1414
1401
|
return (filePath, cwd) => resolveManagedFormatterCommand(toolId, filePath, args, findLocal, cwd);
|
|
@@ -1420,11 +1407,8 @@ function managedToolDetect(toolId, configDetect, nativeDetect) {
|
|
|
1420
1407
|
};
|
|
1421
1408
|
}
|
|
1422
1409
|
var EXPLICIT_FORMATTER_CONFIG_CHECKS = /* @__PURE__ */ new Map([
|
|
1423
|
-
["biome", (cwd) =>
|
|
1424
|
-
[
|
|
1425
|
-
"prettier",
|
|
1426
|
-
(cwd) => hasPrettierConfig(cwd) || hasNearestPackageJsonField(cwd, "prettier")
|
|
1427
|
-
],
|
|
1410
|
+
["biome", (cwd) => hasToolConfig("biome", cwd)],
|
|
1411
|
+
["prettier", (cwd) => hasToolConfig("prettier", cwd)],
|
|
1428
1412
|
// .svelte is conditional beyond "an oxfmt config exists": oxfmt requires the
|
|
1429
1413
|
// `svelte` package installed AND the config's `svelte` flag enabled
|
|
1430
1414
|
// (verified empirically — see hasOxfmtSvelteConfig). The generic checks
|
|
@@ -1433,36 +1417,34 @@ var EXPLICIT_FORMATTER_CONFIG_CHECKS = /* @__PURE__ */ new Map([
|
|
|
1433
1417
|
// specifically (other extensions are unaffected by this stricter gate).
|
|
1434
1418
|
[
|
|
1435
1419
|
"oxfmt",
|
|
1436
|
-
(cwd, ext) => ext === ".svelte" ? hasOxfmtSvelteConfig(cwd) :
|
|
1437
|
-
// exist on npm. Accept both (scoped kept for forward-compat).
|
|
1438
|
-
hasNearestPackageJsonDependency(cwd, "oxfmt") || hasNearestPackageJsonDependency(cwd, "@oxc-project/oxfmt")
|
|
1420
|
+
(cwd, ext) => ext === ".svelte" ? hasOxfmtSvelteConfig(cwd) : hasToolConfig("oxfmt", cwd)
|
|
1439
1421
|
],
|
|
1440
|
-
["ruff", (cwd) =>
|
|
1441
|
-
["black", (cwd) =>
|
|
1442
|
-
["sqlfluff", (cwd) =>
|
|
1443
|
-
["rubocop", (cwd) =>
|
|
1444
|
-
["standardrb", (cwd) =>
|
|
1445
|
-
["clang-format", (cwd) =>
|
|
1446
|
-
["php-cs-fixer", (cwd) =>
|
|
1447
|
-
["stylua", (cwd) =>
|
|
1448
|
-
["ocamlformat", (cwd) =>
|
|
1449
|
-
["google-java-format", (cwd) =>
|
|
1422
|
+
["ruff", (cwd) => hasToolConfig("ruff", cwd)],
|
|
1423
|
+
["black", (cwd) => hasToolConfig("black", cwd)],
|
|
1424
|
+
["sqlfluff", (cwd) => hasToolConfig("sqlfluff", cwd)],
|
|
1425
|
+
["rubocop", (cwd) => hasToolConfig("rubocop", cwd)],
|
|
1426
|
+
["standardrb", (cwd) => hasToolConfig("standardrb", cwd)],
|
|
1427
|
+
["clang-format", (cwd) => hasToolConfig("clang-format", cwd)],
|
|
1428
|
+
["php-cs-fixer", (cwd) => hasToolConfig("php-cs-fixer", cwd)],
|
|
1429
|
+
["stylua", (cwd) => hasToolConfig("stylua", cwd)],
|
|
1430
|
+
["ocamlformat", (cwd) => hasToolConfig("ocamlformat", cwd)],
|
|
1431
|
+
["google-java-format", (cwd) => hasToolConfig("google-java-format", cwd)],
|
|
1450
1432
|
["ktfmt", (cwd) => hasKtfmtConfig(cwd)],
|
|
1451
1433
|
["ktlint", (cwd) => hasKtlintConfig(cwd)],
|
|
1452
|
-
["cljfmt", (cwd) =>
|
|
1453
|
-
["cmake-format", (cwd) =>
|
|
1454
|
-
["psscriptanalyzer-format", (cwd) =>
|
|
1455
|
-
// #1595 sweep — see the
|
|
1434
|
+
["cljfmt", (cwd) => hasToolConfig("cljfmt", cwd)],
|
|
1435
|
+
["cmake-format", (cwd) => hasToolConfig("cmake-format", cwd)],
|
|
1436
|
+
["psscriptanalyzer-format", (cwd) => hasToolConfig("psscriptanalyzer", cwd)],
|
|
1437
|
+
// #1595 sweep — see the note above FORMATTER_POLICY_BY_EXTENSION in
|
|
1456
1438
|
// tool-policy.ts for why nixfmt (the 8th formatter #1572 flagged) is NOT
|
|
1457
1439
|
// wired here: it has no config-file convention and no manifest-marker
|
|
1458
1440
|
// equivalent to `.terraform.lock.hcl`, so there is no honest opt-in signal.
|
|
1459
|
-
["csharpier", (cwd) =>
|
|
1460
|
-
["ormolu", (cwd) =>
|
|
1461
|
-
["taplo", (cwd) =>
|
|
1462
|
-
["terraform", (cwd) =>
|
|
1463
|
-
["swiftformat", (cwd) =>
|
|
1464
|
-
["fantomas", (cwd) =>
|
|
1465
|
-
["mix", (cwd) =>
|
|
1441
|
+
["csharpier", (cwd) => hasToolConfig("csharpier", cwd)],
|
|
1442
|
+
["ormolu", (cwd) => hasToolConfig("ormolu", cwd)],
|
|
1443
|
+
["taplo", (cwd) => hasToolConfig("taplo", cwd)],
|
|
1444
|
+
["terraform", (cwd) => hasToolConfig("terraform", cwd)],
|
|
1445
|
+
["swiftformat", (cwd) => hasToolConfig("swiftformat", cwd)],
|
|
1446
|
+
["fantomas", (cwd) => hasToolConfig("fantomas", cwd)],
|
|
1447
|
+
["mix", (cwd) => hasToolConfig("mixFormat", cwd)]
|
|
1466
1448
|
]);
|
|
1467
1449
|
function hasExplicitFormatterConfig(formatterName, cwd, ext) {
|
|
1468
1450
|
return EXPLICIT_FORMATTER_CONFIG_CHECKS.get(formatterName)?.(cwd, ext) ?? false;
|
|
@@ -1575,7 +1557,7 @@ var biomeFormatter = {
|
|
|
1575
1557
|
".htm"
|
|
1576
1558
|
],
|
|
1577
1559
|
async detect(cwd) {
|
|
1578
|
-
return
|
|
1560
|
+
return hasToolConfig("biome", cwd) || hasNearestPackageJsonDependency(cwd, "@biomejs/biome");
|
|
1579
1561
|
}
|
|
1580
1562
|
};
|
|
1581
1563
|
var prettierFormatter = {
|
|
@@ -1621,7 +1603,7 @@ var prettierFormatter = {
|
|
|
1621
1603
|
".gql"
|
|
1622
1604
|
],
|
|
1623
1605
|
async detect(cwd) {
|
|
1624
|
-
return
|
|
1606
|
+
return hasToolConfig("prettier", cwd) || hasNearestPackageJsonDependency(cwd, "prettier");
|
|
1625
1607
|
}
|
|
1626
1608
|
};
|
|
1627
1609
|
var OXFMT_NO_ERROR_ON_UNMATCHED = "--no-error-on-unmatched-pattern";
|
|
@@ -1634,7 +1616,7 @@ var oxfmtFormatter = {
|
|
|
1634
1616
|
// benign-nonzero mode, it stays strict — the safe direction, since the failure
|
|
1635
1617
|
// mode of guessing wrong the other way is a silent no-op (#1336).
|
|
1636
1618
|
async resolveCommand(filePath, cwd) {
|
|
1637
|
-
if (
|
|
1619
|
+
if (hasToolConfig("vitePlus", cwd)) {
|
|
1638
1620
|
const localVp = await findInNodeModules("vp", cwd);
|
|
1639
1621
|
if (localVp)
|
|
1640
1622
|
return [localVp, "fmt", filePath, "--write"];
|
|
@@ -1645,9 +1627,6 @@ var oxfmtFormatter = {
|
|
|
1645
1627
|
const local = await findInNodeModules("oxfmt", cwd);
|
|
1646
1628
|
if (local)
|
|
1647
1629
|
return [local, OXFMT_NO_ERROR_ON_UNMATCHED, filePath];
|
|
1648
|
-
const found = await which("oxfmt");
|
|
1649
|
-
if (found)
|
|
1650
|
-
return [found, OXFMT_NO_ERROR_ON_UNMATCHED, filePath];
|
|
1651
1630
|
return await resolveManagedFormatterCommand("oxfmt", filePath, [OXFMT_NO_ERROR_ON_UNMATCHED], findInNodeModules, cwd) ?? FORMATTER_UNAVAILABLE;
|
|
1652
1631
|
},
|
|
1653
1632
|
// Single source of truth: OXFMT_SUPPORTED_EXTENSIONS in tool-policy.ts.
|
|
@@ -1655,8 +1634,7 @@ var oxfmtFormatter = {
|
|
|
1655
1634
|
// parallel hand-maintained lists, the #883 single-source-of-truth class).
|
|
1656
1635
|
extensions: [...OXFMT_SUPPORTED_EXTENSIONS],
|
|
1657
1636
|
async detect(cwd) {
|
|
1658
|
-
return
|
|
1659
|
-
hasNearestPackageJsonDependency(cwd, "oxfmt") || hasNearestPackageJsonDependency(cwd, "@oxc-project/oxfmt");
|
|
1637
|
+
return hasToolConfig("oxfmt", cwd);
|
|
1660
1638
|
}
|
|
1661
1639
|
};
|
|
1662
1640
|
var ruffFormatter = {
|
|
@@ -1672,9 +1650,9 @@ var ruffFormatter = {
|
|
|
1672
1650
|
if (styleArgs === null)
|
|
1673
1651
|
return SKIP_FORMATTING;
|
|
1674
1652
|
const args = ["format", ...styleArgs];
|
|
1675
|
-
const
|
|
1676
|
-
if (
|
|
1677
|
-
return [
|
|
1653
|
+
const found = await resolveFormatterToolCommand("ruff", filePath);
|
|
1654
|
+
if (found.command)
|
|
1655
|
+
return [found.command, ...args, filePath];
|
|
1678
1656
|
const toolId = getAutoInstallToolIdForFormatter("ruff");
|
|
1679
1657
|
if (!toolId)
|
|
1680
1658
|
return null;
|
|
@@ -1682,10 +1660,10 @@ var ruffFormatter = {
|
|
|
1682
1660
|
const installed = await ensureTool(toolId);
|
|
1683
1661
|
if (installed)
|
|
1684
1662
|
return [installed, ...args, filePath];
|
|
1685
|
-
return
|
|
1663
|
+
return ladderMiss(found, "ruff");
|
|
1686
1664
|
},
|
|
1687
1665
|
async detect(cwd) {
|
|
1688
|
-
if (
|
|
1666
|
+
if (hasToolConfig("ruff", cwd))
|
|
1689
1667
|
return true;
|
|
1690
1668
|
return Boolean(await getToolPath("ruff"));
|
|
1691
1669
|
}
|
|
@@ -1694,9 +1672,9 @@ var blackFormatter = {
|
|
|
1694
1672
|
name: "black",
|
|
1695
1673
|
command: ["black", "$FILE"],
|
|
1696
1674
|
extensions: [".py", ".pyi"],
|
|
1697
|
-
resolveCommand: managedFormatterResolver("black", []
|
|
1675
|
+
resolveCommand: managedFormatterResolver("black", []),
|
|
1698
1676
|
async detect(cwd) {
|
|
1699
|
-
return
|
|
1677
|
+
return hasToolConfig("black", cwd);
|
|
1700
1678
|
}
|
|
1701
1679
|
};
|
|
1702
1680
|
var sqlfluffFormatter = {
|
|
@@ -1705,14 +1683,14 @@ var sqlfluffFormatter = {
|
|
|
1705
1683
|
extensions: [".sql"],
|
|
1706
1684
|
lenientExitCode: "lint-autofix: `sqlfluff fix` writes the corrected file and then exits 1 when unfixable violations remain (its documented exit codes are 0 = all clean, 1 = violations remain, 2 = command/config failure), so a nonzero exit routinely accompanies a successful rewrite.",
|
|
1707
1685
|
lenientStatuses: [1],
|
|
1708
|
-
async resolveCommand(filePath,
|
|
1709
|
-
const
|
|
1710
|
-
if (
|
|
1711
|
-
return [
|
|
1712
|
-
return
|
|
1686
|
+
async resolveCommand(filePath, _cwd) {
|
|
1687
|
+
const found = await resolveFormatterToolCommand("sqlfluff", filePath);
|
|
1688
|
+
if (found.command)
|
|
1689
|
+
return [found.command, "fix", "--force", filePath];
|
|
1690
|
+
return ladderMiss(found, "sqlfluff");
|
|
1713
1691
|
},
|
|
1714
1692
|
async detect(cwd) {
|
|
1715
|
-
return
|
|
1693
|
+
return hasToolConfig("sqlfluff", cwd);
|
|
1716
1694
|
}
|
|
1717
1695
|
};
|
|
1718
1696
|
var gofmtFormatter = {
|
|
@@ -1781,9 +1759,6 @@ var shfmtFormatter = {
|
|
|
1781
1759
|
const styleArgs = await indentationArgs(filePath, "shfmt", cwd);
|
|
1782
1760
|
if (styleArgs === null)
|
|
1783
1761
|
return SKIP_FORMATTING;
|
|
1784
|
-
const inPath = await which("shfmt");
|
|
1785
|
-
if (inPath)
|
|
1786
|
-
return [inPath, "-w", ...styleArgs, filePath];
|
|
1787
1762
|
return resolveManagedSmartDefaultCommand("shfmt", filePath, [
|
|
1788
1763
|
"-w",
|
|
1789
1764
|
...styleArgs
|
|
@@ -1843,9 +1818,6 @@ var ktlintFormatter = {
|
|
|
1843
1818
|
lenientExitCode: "lint-autofix: `ktlint -F` autocorrects what it can and then exits 1 if any lint error remains unfixed \u2014 the documented CLI contract (ktlint exits nonzero whenever violations are reported, and -F does not suppress the ones it cannot correct).",
|
|
1844
1819
|
lenientStatuses: [1],
|
|
1845
1820
|
async resolveCommand(filePath, _cwd) {
|
|
1846
|
-
const inPath = await which("ktlint");
|
|
1847
|
-
if (inPath)
|
|
1848
|
-
return [inPath, "-F", filePath];
|
|
1849
1821
|
return resolveManagedSmartDefaultCommand("ktlint", filePath, ["-F"]);
|
|
1850
1822
|
},
|
|
1851
1823
|
detect: managedToolDetect("ktlint", void 0, async () => await which("ktlint") !== null)
|
|
@@ -1864,13 +1836,13 @@ var ktfmtFormatter = {
|
|
|
1864
1836
|
// bare invocation, unchanged from pre-#2468 behavior.
|
|
1865
1837
|
async resolveCommand(filePath, _cwd) {
|
|
1866
1838
|
const styleFlag = await resolveKtfmtGradleStyle(filePath);
|
|
1867
|
-
const
|
|
1868
|
-
if (
|
|
1869
|
-
return styleFlag ? [
|
|
1839
|
+
const found = await resolveFormatterToolCommand("ktfmt", filePath);
|
|
1840
|
+
if (found.command)
|
|
1841
|
+
return styleFlag ? [found.command, styleFlag, filePath] : [found.command, filePath];
|
|
1870
1842
|
const { ensureTool } = await import("./probes/installer.js");
|
|
1871
1843
|
const installed = await ensureTool("ktfmt");
|
|
1872
1844
|
if (!installed)
|
|
1873
|
-
return
|
|
1845
|
+
return ladderMiss(found, "ktfmt");
|
|
1874
1846
|
return styleFlag ? [installed, styleFlag, filePath] : [installed, filePath];
|
|
1875
1847
|
},
|
|
1876
1848
|
async detect(cwd) {
|
|
@@ -1889,7 +1861,7 @@ var rubocopFormatter = {
|
|
|
1889
1861
|
return null;
|
|
1890
1862
|
},
|
|
1891
1863
|
async detect(cwd) {
|
|
1892
|
-
if (!
|
|
1864
|
+
if (!hasToolConfig("rubocop", cwd))
|
|
1893
1865
|
return false;
|
|
1894
1866
|
if (await which("rubocop") !== null)
|
|
1895
1867
|
return true;
|
|
@@ -1909,7 +1881,7 @@ var standardrbFormatter = {
|
|
|
1909
1881
|
return null;
|
|
1910
1882
|
},
|
|
1911
1883
|
async detect(cwd) {
|
|
1912
|
-
if (!
|
|
1884
|
+
if (!hasToolConfig("standardrb", cwd))
|
|
1913
1885
|
return false;
|
|
1914
1886
|
return await which("standardrb") !== null;
|
|
1915
1887
|
}
|
|
@@ -1930,9 +1902,6 @@ var typstyleFormatter = {
|
|
|
1930
1902
|
command: ["typstyle", "-i", "$FILE"],
|
|
1931
1903
|
extensions: [".typ", ".typc"],
|
|
1932
1904
|
async resolveCommand(filePath) {
|
|
1933
|
-
const inPath = await which("typstyle");
|
|
1934
|
-
if (inPath)
|
|
1935
|
-
return [inPath, "-i", filePath];
|
|
1936
1905
|
return resolveManagedSmartDefaultCommand("typstyle", filePath, ["-i"]);
|
|
1937
1906
|
},
|
|
1938
1907
|
detect: managedToolDetect("typstyle", void 0, async () => await which("typstyle") !== null)
|
|
@@ -1976,11 +1945,10 @@ var phpCsFixerFormatter = {
|
|
|
1976
1945
|
// depends on php-cs-fixer's own (nonexistent) upward search.
|
|
1977
1946
|
async resolveCommand(filePath, cwd) {
|
|
1978
1947
|
const configPath = resolvePhpCsFixerConfig(filePath);
|
|
1979
|
-
const binary = await findInVendorBin("php-cs-fixer", cwd) ?? await which("php-cs-fixer");
|
|
1980
1948
|
const managed = await resolveManagedFormatterCommand("php-cs-fixer", filePath, [], findInVendorBin, cwd);
|
|
1981
|
-
if (managed
|
|
1982
|
-
return
|
|
1983
|
-
const resolved =
|
|
1949
|
+
if (!Array.isArray(managed))
|
|
1950
|
+
return managed;
|
|
1951
|
+
const resolved = managed[0];
|
|
1984
1952
|
if (!resolved)
|
|
1985
1953
|
return FORMATTER_UNAVAILABLE;
|
|
1986
1954
|
return configPath ? [resolved, "fix", "--config", configPath, filePath] : [resolved, "fix", filePath];
|
|
@@ -2054,9 +2022,6 @@ var taploFormatter = {
|
|
|
2054
2022
|
command: ["taplo", "fmt", "$FILE"],
|
|
2055
2023
|
extensions: [".toml"],
|
|
2056
2024
|
async resolveCommand(filePath, _cwd) {
|
|
2057
|
-
const inPath = await which("taplo");
|
|
2058
|
-
if (inPath)
|
|
2059
|
-
return [inPath, "fmt", filePath];
|
|
2060
2025
|
return resolveManagedSmartDefaultCommand("taplo", filePath, ["fmt"]);
|
|
2061
2026
|
},
|
|
2062
2027
|
detect: managedToolDetect("taplo", void 0, async () => await which("taplo") !== null)
|
|
@@ -2066,21 +2031,21 @@ var googleJavaFormatFormatter = {
|
|
|
2066
2031
|
command: ["google-java-format", "--replace", "$FILE"],
|
|
2067
2032
|
extensions: [".java"],
|
|
2068
2033
|
resolveCommand: managedFormatterResolver("google-java-format", ["--replace"]),
|
|
2069
|
-
detect: managedToolDetect("google-java-format",
|
|
2034
|
+
detect: managedToolDetect("google-java-format", (cwd) => hasToolConfig("google-java-format", cwd), async () => await which("google-java-format") !== null)
|
|
2070
2035
|
};
|
|
2071
2036
|
var cljfmtFormatter = {
|
|
2072
2037
|
name: "cljfmt",
|
|
2073
2038
|
command: ["cljfmt", "fix", "$FILE"],
|
|
2074
2039
|
extensions: [".clj", ".cljc", ".cljs"],
|
|
2075
2040
|
resolveCommand: managedFormatterResolver("cljfmt", ["fix"]),
|
|
2076
|
-
detect: managedToolDetect("cljfmt",
|
|
2041
|
+
detect: managedToolDetect("cljfmt", (cwd) => hasToolConfig("cljfmt", cwd), async () => await which("cljfmt") !== null)
|
|
2077
2042
|
};
|
|
2078
2043
|
var cmakeFormatFormatter = {
|
|
2079
2044
|
name: "cmake-format",
|
|
2080
2045
|
command: ["cmake-format", "-i", "$FILE"],
|
|
2081
2046
|
extensions: [".cmake"],
|
|
2082
2047
|
resolveCommand: managedFormatterResolver("cmake-format", ["-i"]),
|
|
2083
|
-
detect: managedToolDetect("cmake-format",
|
|
2048
|
+
detect: managedToolDetect("cmake-format", (cwd) => hasToolConfig("cmake-format", cwd), async () => await which("cmake-format") !== null)
|
|
2084
2049
|
};
|
|
2085
2050
|
var cueFormatter = {
|
|
2086
2051
|
name: "cue",
|
|
@@ -2115,7 +2080,7 @@ var psscriptanalyzerFormatFormatter = {
|
|
|
2115
2080
|
const pwsh = await which("pwsh") ?? await which("powershell");
|
|
2116
2081
|
if (!pwsh)
|
|
2117
2082
|
return null;
|
|
2118
|
-
const settingsPath =
|
|
2083
|
+
const settingsPath = findToolConfig("psscriptanalyzer", cwd)?.file;
|
|
2119
2084
|
return [
|
|
2120
2085
|
pwsh,
|
|
2121
2086
|
"-NoProfile",
|
|
@@ -2521,6 +2486,14 @@ async function formatFile(filePath, formatter, enter) {
|
|
|
2521
2486
|
error: `${formatter.name}: formatter executable not found`
|
|
2522
2487
|
};
|
|
2523
2488
|
}
|
|
2489
|
+
if (isFormatterRejected(cmd)) {
|
|
2490
|
+
return {
|
|
2491
|
+
success: false,
|
|
2492
|
+
changed: false,
|
|
2493
|
+
outcome: "failed",
|
|
2494
|
+
error: cmd.slice(FORMATTER_REJECTED_PREFIX.length)
|
|
2495
|
+
};
|
|
2496
|
+
}
|
|
2524
2497
|
if (cmd === FORMATTER_AGREEMENT_UNAVAILABLE) {
|
|
2525
2498
|
return {
|
|
2526
2499
|
success: true,
|
|
@@ -2529,13 +2502,44 @@ async function formatFile(filePath, formatter, enter) {
|
|
|
2529
2502
|
error: `${formatter.name}: project tool agreement could not be established`
|
|
2530
2503
|
};
|
|
2531
2504
|
}
|
|
2532
|
-
|
|
2533
|
-
const
|
|
2534
|
-
const
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2505
|
+
const formatterCooldownSubject = `formatter:${formatter.name}`;
|
|
2506
|
+
const formatterFlightKey = runnerFlightKey(formatterCwd, formatterCooldownSubject);
|
|
2507
|
+
const prior = flightTail(formatterFlightKey);
|
|
2508
|
+
const turn = (async () => {
|
|
2509
|
+
if (prior)
|
|
2510
|
+
await Promise.allSettled([prior]);
|
|
2511
|
+
if (isInSpawnTimeoutCooldown(formatterCooldownSubject))
|
|
2512
|
+
return void 0;
|
|
2513
|
+
await enter?.();
|
|
2514
|
+
const before = await fs2.readFile(absolutePath, "utf-8");
|
|
2515
|
+
const spawned = await safeSpawnAsync(cmd[0], cmd.slice(1), {
|
|
2516
|
+
timeout: 15e3,
|
|
2517
|
+
cwd: formatterCwd,
|
|
2518
|
+
cooldown: {
|
|
2519
|
+
tool: formatter.name,
|
|
2520
|
+
subject: formatterCooldownSubject,
|
|
2521
|
+
phase: "format"
|
|
2522
|
+
},
|
|
2523
|
+
...cmd[0] === "npx" || cmd[0] === "bunx" ? getIsolatedNpxSpawnOptions() : {}
|
|
2524
|
+
});
|
|
2525
|
+
return { before, spawned };
|
|
2526
|
+
})();
|
|
2527
|
+
holdFlight(formatterFlightKey, turn);
|
|
2528
|
+
const ran = await turn;
|
|
2529
|
+
if (ran === void 0) {
|
|
2530
|
+
recordDegradationOnce({
|
|
2531
|
+
kind: "formatter-skip",
|
|
2532
|
+
subject: formatterCooldownSubject,
|
|
2533
|
+
reason: "formatter spawn timeout cooldown is active"
|
|
2534
|
+
});
|
|
2535
|
+
return {
|
|
2536
|
+
success: true,
|
|
2537
|
+
changed: false,
|
|
2538
|
+
outcome: "skipped",
|
|
2539
|
+
error: `${formatter.name}: spawn timeout cooldown is active`
|
|
2540
|
+
};
|
|
2541
|
+
}
|
|
2542
|
+
const { before: contentBefore, spawned: result } = ran;
|
|
2539
2543
|
if (result.spawnFailure?.kind === "tool-not-found") {
|
|
2540
2544
|
return {
|
|
2541
2545
|
success: true,
|