@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
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* 工具计数:read 按非空路径去重、其余按调用计数(首次出现顺序);edit/write 不进摘要。
|
|
27
27
|
* 时长 = 回合流逝挂钟;进行中 Running...,结束 Ran for。
|
|
28
28
|
* abort/error/length 状态行挂在摘要外层,避免被折叠吞掉。
|
|
29
|
-
* 最终 agent 回合摘要由 feature/agent-summary 独占(bash/read/edit
|
|
29
|
+
* 最终 agent 回合摘要由 feature/agent-summary 独占(bash/read/edit(含 write)/other)。
|
|
30
30
|
*
|
|
31
31
|
* 补丁生命周期遵循仓库既有模式:Symbol 所有权、dispose 仅恢复仍由本安装持有的
|
|
32
32
|
* 方法、重入守卫防止 /reload 后残留闭包递归。
|
|
@@ -490,6 +490,20 @@ function layoutExpandedToolCard(
|
|
|
490
490
|
return { lines, hits };
|
|
491
491
|
}
|
|
492
492
|
|
|
493
|
+
/**
|
|
494
|
+
* 面板子卡是否还是上一帧的那些行。引用相等是常态(子卡自己缓存行),
|
|
495
|
+
* 但 pi 的 Spacer.render 每次都新建数组,按引用判等会让整张面板每帧重排
|
|
496
|
+
* (逐行重铺底色,单行约 30us)。内容逐行相同时按命中算。
|
|
497
|
+
*/
|
|
498
|
+
function samePaintedLines(left: string[], right: string[]): boolean {
|
|
499
|
+
if (left === right) return true;
|
|
500
|
+
if (left.length !== right.length) return false;
|
|
501
|
+
for (let index = 0; index < left.length; index++) {
|
|
502
|
+
if (left[index] !== right[index]) return false;
|
|
503
|
+
}
|
|
504
|
+
return true;
|
|
505
|
+
}
|
|
506
|
+
|
|
493
507
|
function compactRoundCard(
|
|
494
508
|
cardItems: Array<{ child?: any; tool?: any }>,
|
|
495
509
|
toolRender: (tool: any, width: number) => string[],
|
|
@@ -521,7 +535,7 @@ function compactRoundCard(
|
|
|
521
535
|
bgSlot: string;
|
|
522
536
|
/** 全屏与主屏的图片行输出不同(见 imageBackgroundRow)。 */
|
|
523
537
|
fullscreen: boolean;
|
|
524
|
-
paints:
|
|
538
|
+
paints: string[][];
|
|
525
539
|
lines: string[];
|
|
526
540
|
hits: Array<{ child: any; start: number; end: number }>;
|
|
527
541
|
}
|
|
@@ -544,7 +558,7 @@ function compactRoundCard(
|
|
|
544
558
|
paint.bgSlot === bgSlot &&
|
|
545
559
|
paint.fullscreen === isToolTuiFullscreen() &&
|
|
546
560
|
paint.paints.length === paints.length &&
|
|
547
|
-
paint.paints.every((item, index) => item
|
|
561
|
+
paint.paints.every((item, index) => samePaintedLines(item, paints[index]))
|
|
548
562
|
) {
|
|
549
563
|
return paint;
|
|
550
564
|
}
|
|
@@ -1246,6 +1260,8 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1246
1260
|
settleUntil?: number;
|
|
1247
1261
|
/** 已请求收尾但回合还有活干(消息仍在流式、工具还在跑):活干完再兑现。 */
|
|
1248
1262
|
endRequest?: { endTimestamp?: number };
|
|
1263
|
+
/** 段内已冒出外层调用(edit/write/ask):本段到此为止,不再并入后续消息。 */
|
|
1264
|
+
outerSealed?: boolean;
|
|
1249
1265
|
/** 消息已有 toolCall、工具组件还没到:等它一 updateDisplay 就重画槽位。 */
|
|
1250
1266
|
pendingLiveTool?: boolean;
|
|
1251
1267
|
foldTimer?: ReturnType<typeof setTimeout>;
|
|
@@ -1632,9 +1648,13 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1632
1648
|
/**
|
|
1633
1649
|
* 可以并入的活动回合。被用户消息隔开时返回 undefined,调用方收掉旧回合另起一个,
|
|
1634
1650
|
* 保证回合不跨用户消息——否则区间里的用户消息会被当成外来行挪到回合末尾之后。
|
|
1651
|
+
* 外层工具已经封口的回合同样不能并入:工具还在跑时 seal 只挂起收尾,activeRound
|
|
1652
|
+
* 仍指着它;下一条带思考或内层工具的消息必须另起摘要,计数才不会跨过 ask/write。
|
|
1635
1653
|
*/
|
|
1636
1654
|
const joinableActiveRound = (component: any): CompactRound | undefined =>
|
|
1637
|
-
activeRound && !crossesUserMessage(activeRound, component)
|
|
1655
|
+
activeRound && !activeRound.outerSealed && !crossesUserMessage(activeRound, component)
|
|
1656
|
+
? activeRound
|
|
1657
|
+
: undefined;
|
|
1638
1658
|
|
|
1639
1659
|
/** 取并入目标;旧回合被用户消息隔开时先收尾(静默期一转场,新回合立即接手)。 */
|
|
1640
1660
|
const joinOrCreateRound = (component: any, message: any): CompactRound => {
|
|
@@ -1716,10 +1736,11 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1716
1736
|
|
|
1717
1737
|
/**
|
|
1718
1738
|
* 尾行归位。目标位:活回合(运行中/收尾静默期)且未展开 → 容器最末,
|
|
1719
|
-
*
|
|
1720
|
-
* 它上方,不会被顶离底部截成两行;其余(收尾回合、展开的回合)→
|
|
1721
|
-
*
|
|
1722
|
-
*
|
|
1739
|
+
* 计数行钉在可写底缘,运行中到达的提示行/custom 条目只能落在
|
|
1740
|
+
* 它上方,不会被顶离底部截成两行;其余(收尾回合、展开的回合)→ 本回合
|
|
1741
|
+
* 第一个外露行之前(外层行切段:摘要只盖它之前那一段工具),没有外露行
|
|
1742
|
+
* 则落在最后一个成员之后;外来行统一换到摘要行之下。展开的回合不按 live
|
|
1743
|
+
* 推到底:展开卡属于回合原位,推进容器末尾会把它挪到别的消息之间。
|
|
1723
1744
|
* 尾行已在目标位就不动容器:展开/收起只换 tail.parts,无谓的重摘重插
|
|
1724
1745
|
* 本身就是摘要行挪位的来源。
|
|
1725
1746
|
*/
|
|
@@ -1740,6 +1761,13 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1740
1761
|
// 回合还在跑时它们留在原位,摘要行才能钉在可写底缘。
|
|
1741
1762
|
const staysAbove = (value: any): boolean =>
|
|
1742
1763
|
isMember(value) && (!isOuterToolRow(ids, value) || live);
|
|
1764
|
+
const pinToEnd = live && round.anchor?.expanded !== true;
|
|
1765
|
+
/** 摘要行落在第一个外露行之前:外层行切出的那一段到此为止。 */
|
|
1766
|
+
const outerFirst = (list: any[]): number => {
|
|
1767
|
+
if (live) return -1;
|
|
1768
|
+
for (let i = 0; i < list.length; i++) if (isOuterToolRow(ids, list[i])) return i;
|
|
1769
|
+
return -1;
|
|
1770
|
+
};
|
|
1743
1771
|
const current = children.indexOf(tail.host);
|
|
1744
1772
|
// 摘尾行前先定目标位,已在位就整段跳过。
|
|
1745
1773
|
let last = -1;
|
|
@@ -1747,14 +1775,13 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1747
1775
|
if (children[i] === tail.host || !staysAbove(children[i])) continue;
|
|
1748
1776
|
last = i;
|
|
1749
1777
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
if (current === desired && !outerAbove) return;
|
|
1778
|
+
const outer = outerFirst(children);
|
|
1779
|
+
// 目标位要和下面的 insertAt 一致。非活回合有外露行时,摘要插在那一行之前;
|
|
1780
|
+
// 尾还在数组里,所以「已经贴在外露行前面」是 outer - 1,不是 last + 1。
|
|
1781
|
+
// 中间夹着通知时 last + 1 对不上,每帧都会把摘要摘下来再插回去。
|
|
1782
|
+
let desired = pinToEnd || last < 0 ? children.length - 1 : last + 1;
|
|
1783
|
+
if (!pinToEnd && outer >= 0) desired = current < outer ? outer - 1 : outer;
|
|
1784
|
+
if (current >= 0 && current === desired) return;
|
|
1758
1785
|
if (current >= 0) children.splice(current, 1);
|
|
1759
1786
|
let first = -1;
|
|
1760
1787
|
last = -1;
|
|
@@ -1778,7 +1805,8 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
1778
1805
|
intruders.unshift(children.splice(i, 1)[0]);
|
|
1779
1806
|
}
|
|
1780
1807
|
if (lastMember) last = children.indexOf(lastMember);
|
|
1781
|
-
const
|
|
1808
|
+
const outerAfter = outerFirst(children);
|
|
1809
|
+
const insertAt = outerAfter >= 0 ? outerAfter : last < 0 ? children.length : last + 1;
|
|
1782
1810
|
if (pinToEnd) {
|
|
1783
1811
|
// 活回合:外来行压到最后成员之后,尾行占容器最末。
|
|
1784
1812
|
children.splice(insertAt, 0, ...intruders);
|
|
@@ -2355,30 +2383,14 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
2355
2383
|
|
|
2356
2384
|
if (hasToolCalls) {
|
|
2357
2385
|
let round = roundByComponent.get(this);
|
|
2358
|
-
const previousMessage = round?.messages.get(this);
|
|
2359
|
-
const previousHadOuter = Array.isArray(previousMessage?.content)
|
|
2360
|
-
? previousMessage.content.some(
|
|
2361
|
-
(item: any) => item?.type === "toolCall" && OUTER_TOOLS.has(String(item?.name ?? "")),
|
|
2362
|
-
)
|
|
2363
|
-
: false;
|
|
2364
2386
|
if (!round) {
|
|
2365
|
-
//
|
|
2366
|
-
//
|
|
2367
|
-
//
|
|
2387
|
+
// 外层行打断摘要段:本条消息带外层调用且可并入活动回合时,旧回合就地
|
|
2388
|
+
// 完结(不走静默期)。外层独段(edit-only 消息)不并段也不建段——它没有
|
|
2389
|
+
// 可汇总内容,建段只会挂空摘要行;摘要行落在这一行之前就够了。
|
|
2368
2390
|
const joinable = joinableActiveRound(this);
|
|
2369
|
-
if (joinable && hasOuterToolCall) {
|
|
2391
|
+
if (joinable && hasOuterToolCall && !hasInnerToolCall && !hasThinkingContent) {
|
|
2392
|
+
joinable.outerSealed = true;
|
|
2370
2393
|
sealRound(joinable, message?.timestamp);
|
|
2371
|
-
if (hasInnerToolCall || hasThinkingContent) {
|
|
2372
|
-
round = createRound(this, message);
|
|
2373
|
-
roundByComponent.set(this, round);
|
|
2374
|
-
round.messages.set(this, message);
|
|
2375
|
-
if (isUsableTimestamp(message.timestamp) && message.timestamp < round.startedAt) {
|
|
2376
|
-
round.startedAt = message.timestamp;
|
|
2377
|
-
}
|
|
2378
|
-
renderRound(round);
|
|
2379
|
-
return undefined;
|
|
2380
|
-
}
|
|
2381
|
-
// 外层独段:text/thinking 照原生渲染,edit 行由 tool render 外置,没有摘要行。
|
|
2382
2394
|
return passThroughAssistant(this, message);
|
|
2383
2395
|
}
|
|
2384
2396
|
if (hasInnerToolCall || hasThinkingContent) {
|
|
@@ -2392,6 +2404,12 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
2392
2404
|
if (isUsableTimestamp(message.timestamp) && message.timestamp < round.startedAt) {
|
|
2393
2405
|
round.startedAt = message.timestamp;
|
|
2394
2406
|
}
|
|
2407
|
+
if (hasOuterToolCall) {
|
|
2408
|
+
// 本条消息自带外层调用:它就是本段的最后一格,后续消息另起一段。
|
|
2409
|
+
round.outerSealed = true;
|
|
2410
|
+
sealRound(round, message?.timestamp);
|
|
2411
|
+
return undefined;
|
|
2412
|
+
}
|
|
2395
2413
|
renderRound(round);
|
|
2396
2414
|
return undefined;
|
|
2397
2415
|
}
|
|
@@ -2399,9 +2417,12 @@ export function installCompactMode(deps: CompactModeInstallDeps): CompactModeHoo
|
|
|
2399
2417
|
if (activeRound) finishRound(activeRound, message?.timestamp);
|
|
2400
2418
|
return passThroughAssistant(this, message);
|
|
2401
2419
|
}
|
|
2402
|
-
if (hasOuterToolCall && !
|
|
2420
|
+
if (hasOuterToolCall && !round.outerSealed && roundLive(round)) {
|
|
2403
2421
|
// 消息入段后流式增长才冒出外层调用(先 thinking 后 toolCall):
|
|
2404
2422
|
// 就地封口所在段,本条消息按消息级归属留在原段,后续消息另起一段。
|
|
2423
|
+
// 不能拿 round.messages 里的上一份消息判「是否新增」:流式消息的
|
|
2424
|
+
// content 是同一个数组实例,外层调用一出现上一份也就有了。
|
|
2425
|
+
round.outerSealed = true;
|
|
2405
2426
|
sealRound(round, message?.timestamp);
|
|
2406
2427
|
}
|
|
2407
2428
|
round.messages.set(this, message);
|
|
@@ -623,8 +623,9 @@ function handleFullscreenToolHover(tui: any, packet: SgrMousePacket): void {
|
|
|
623
623
|
target = { kind: "tool", component, view, section };
|
|
624
624
|
}
|
|
625
625
|
} else if (isCompactAssistantComponent(component)) {
|
|
626
|
-
// compact
|
|
627
|
-
|
|
626
|
+
// compact 摘要行:折叠时仅提示文字高亮。展开的面板本身没有 hover 样式,
|
|
627
|
+
// 命中面板空白行不再点亮它,否则面板里每次指针移动都要多一帧重排。
|
|
628
|
+
if (!component.expanded && overHint) target = { kind: "assistant", component };
|
|
628
629
|
} else if (isMessageCard(component)) {
|
|
629
630
|
if (overHint) target = { kind: "message", component };
|
|
630
631
|
}
|
|
@@ -98,46 +98,6 @@ function fitSummaryParts(parts: readonly string[], width: number): string {
|
|
|
98
98
|
return visibleWidth(text) <= width ? text : headTruncateToWidth(text, width);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/**
|
|
102
|
-
* 摘要行的打分:调用最能说明脚本在干什么,字符串次之,行长只在前两者相同时决胜。
|
|
103
|
-
* 调用权重必须大于「字符串分 + 行长上限」,否则长赋值会压过短调用。
|
|
104
|
-
*/
|
|
105
|
-
const CODE_SUMMARY_CALL_SCORE = 4;
|
|
106
|
-
const CODE_SUMMARY_STRING_SCORE = 2;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* 无子调用时的脚本摘要:取信息量最大的一行语句,压成单行。
|
|
110
|
-
*
|
|
111
|
-
* 要的是一段真实的 JavaScript 片段,折叠行才能用 highlightCode 着色;
|
|
112
|
-
* 标识符链(`a → b → c`)着色器认不出,染不上。跳过注释、空行和 `// @options`。
|
|
113
|
-
* 只是折叠行的提示,不求还原语义;看代码还是展开 Input。
|
|
114
|
-
*/
|
|
115
|
-
export function codemodeCodeSummary(code: unknown): string | undefined {
|
|
116
|
-
if (typeof code !== "string" || !code.trim()) return undefined;
|
|
117
|
-
let best: { text: string; score: number } | undefined;
|
|
118
|
-
let skippingBlock = false;
|
|
119
|
-
for (const raw of code.split("\n")) {
|
|
120
|
-
const line = raw.trim();
|
|
121
|
-
if (skippingBlock) {
|
|
122
|
-
if (line.includes("*/")) skippingBlock = false;
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
if (line.startsWith("/*")) {
|
|
126
|
-
if (!line.includes("*/")) skippingBlock = true;
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
if (!line || line.startsWith("//") || line.startsWith("*")) continue;
|
|
130
|
-
const text = oneLine(line);
|
|
131
|
-
if (!text) continue;
|
|
132
|
-
const score =
|
|
133
|
-
(text.includes("(") ? CODE_SUMMARY_CALL_SCORE : 0) +
|
|
134
|
-
(/["'`]/.test(text) ? CODE_SUMMARY_STRING_SCORE : 0) +
|
|
135
|
-
Math.min(text.length, 100) / 100;
|
|
136
|
-
if (!best || score > best.score) best = { text, score };
|
|
137
|
-
}
|
|
138
|
-
return best?.text;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
101
|
/**
|
|
142
102
|
* 没有子调用时的脚本行:语句逐行用 │ 树线列出,行数跟 expandedInputMaxLines。
|
|
143
103
|
* 超出的收成一行 `… N more lines`。注释、空行和 `// @options` 不占行。
|
package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-parse.ts
CHANGED
|
@@ -44,9 +44,12 @@ export interface DiffStats {
|
|
|
44
44
|
lines: number;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
// Pi emits space-delimited rows only (`+12 content`, blank-numbered ` ...`).
|
|
48
|
+
// Pipe rows, hashline anchors and unified patch rows are kept from the upstream
|
|
49
|
+
// parser (ATTRIBUTION.md); hashline edit tools such as pi-hashline-edit emit
|
|
50
|
+
// `+12#AB:content` in details.diff.
|
|
47
51
|
const CANONICAL_LINE_PATTERN = /^([+\- ])(\s*\d+)\|(.*)$/;
|
|
48
52
|
const HASHLINE_ANCHOR_LINE_PATTERN = /^([+\- ])(\s*\d+)#([A-Za-z0-9]+| {2}):(.*)$/;
|
|
49
|
-
// Pi still emits space-separated numbered rows, unlike OMP's pipe-delimited format.
|
|
50
53
|
const PI_LINE_PATTERN = /^([+\- ])(\s*\d+)\s(.*)$/;
|
|
51
54
|
const PI_OMISSION_LINE_PATTERN = /^ {3,}\.\.\.$/;
|
|
52
55
|
const HUNK_HEADER_PATTERN = /^@@\s+-(\d+)(?:,(\d+))?\s+\+(\d+)(?:,(\d+))?\s+@@(.*)$/;
|
|
@@ -251,7 +251,11 @@ export function paddedBackgroundRow(
|
|
|
251
251
|
bgAnsiOverride?: string,
|
|
252
252
|
): string {
|
|
253
253
|
const innerWidth = Math.max(0, width - 2);
|
|
254
|
-
const
|
|
254
|
+
const plain = stripBackgroundAnsi(content);
|
|
255
|
+
// 放得下就不走 truncateToWidth:它在未超宽时原样返回,但含 SGR 的行要逐 grapheme
|
|
256
|
+
// 走慢路径(约 30us/行),展开面板每帧逐行铺底色时这里是主要开销。
|
|
257
|
+
const clipped =
|
|
258
|
+
visibleWidth(plain) <= innerWidth ? plain : truncateToWidth(plain, innerWidth, "");
|
|
255
259
|
const row = ` ${clipped}${" ".repeat(Math.max(0, innerWidth - visibleWidth(clipped)))} `;
|
|
256
260
|
const bgAnsi = bgAnsiOverride || backgroundAnsi(theme, slot);
|
|
257
261
|
const stable = bgAnsi ? row.replace(/\x1b\[(?:0)?m/g, (reset) => reset + bgAnsi) : row;
|
|
@@ -458,9 +462,23 @@ function collapsedGroupLine(
|
|
|
458
462
|
return truncateToWidth(`${prefix}${item.summary(room, theme)}`, rowWidth, "");
|
|
459
463
|
}
|
|
460
464
|
|
|
461
|
-
/**
|
|
465
|
+
/** 行内只有树线和空白:渲染出来的空 rail 行,本身就是一个间隔行。 */
|
|
466
|
+
function isBlankRail(line: string): boolean {
|
|
467
|
+
return /^[\s│]*$/.test(stripAnsi(line));
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* 项与项之间留一行空行,把上一项的 Output 和下一项的工具行隔开;末项不加。
|
|
472
|
+
* 项自己已经用空 rail 行收尾的(子代理通知卡),不再叠第二行。
|
|
473
|
+
* 末项结尾的尾随空行不计入卡高(内联图片的占位行除外,见 contentRowRange)。
|
|
474
|
+
*/
|
|
462
475
|
function panelRows(rows: string[], last: boolean): string[] {
|
|
463
|
-
if (!last)
|
|
476
|
+
if (!last) {
|
|
477
|
+
// 多行图片的占位行是零宽空行,看起来像空 rail,但终端里它被图片盖住,
|
|
478
|
+
// 不是已经留出的间隔。末行属于图片块时仍要补一行可见空行。
|
|
479
|
+
const endsOnImage = rows.length > 0 && imageBlockRows(rows).has(rows.length - 1);
|
|
480
|
+
return rows.length && !endsOnImage && isBlankRail(rows[rows.length - 1]) ? rows : [...rows, ""];
|
|
481
|
+
}
|
|
464
482
|
const end = Math.max(1, contentRowRange(rows).last + 1);
|
|
465
483
|
return end >= rows.length ? rows : rows.slice(0, end);
|
|
466
484
|
}
|
|
@@ -22,6 +22,21 @@ export function formatDuration(ms: number): string {
|
|
|
22
22
|
return `${seconds}s`;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* 时刻 → "11/15 6:51 PM"(M/D 加 12 小时制,英文 AM/PM)。
|
|
27
|
+
* 跨天的会话里只看时分分不清是哪一天,所以带上日期。
|
|
28
|
+
* 自己拼而不用 toLocaleTimeString/toLocaleDateString:新版 ICU 在 AM/PM 前放的是窄不换行空格(U+202F),
|
|
29
|
+
* 日期分隔符也随 locale 变,各版本不一致。
|
|
30
|
+
* 非法值返回 "",调用方据此省略这一段。
|
|
31
|
+
*/
|
|
32
|
+
export function formatTimestamp(ms: number): string {
|
|
33
|
+
if (!Number.isFinite(ms) || ms <= 0) return "";
|
|
34
|
+
const date = new Date(ms);
|
|
35
|
+
const hour = date.getHours() % 12 || 12;
|
|
36
|
+
const minute = String(date.getMinutes()).padStart(2, "0");
|
|
37
|
+
return `${date.getMonth() + 1}/${date.getDate()} ${hour}:${minute} ${date.getHours() < 12 ? "AM" : "PM"}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
25
40
|
/** 文本单行化:去换行空白,超宽截断加省略号。 */
|
|
26
41
|
export function oneLine(value: unknown, max = 96): string {
|
|
27
42
|
const text = sanitizeToolResultText(String(value ?? ""), 4096)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/pi-cc-extensions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20-local.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A Pi productivity suite with Claude Code-style UI, context inspection, and agent/session references",
|
|
6
6
|
"type": "module",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
},
|
|
75
75
|
"x-upstream": {
|
|
76
76
|
"package": "pi-cc-extensions",
|
|
77
|
-
"version": "1.0.
|
|
78
|
-
"reviewedVersion": "1.0.
|
|
77
|
+
"version": "1.0.20",
|
|
78
|
+
"reviewedVersion": "1.0.20",
|
|
79
79
|
"repository": "https://github.com/minuque/pi-cc-extensions",
|
|
80
|
-
"commit": "
|
|
80
|
+
"commit": "1c3a42614709c1b14a836b669359771c71939200",
|
|
81
81
|
"trackVersion": true
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @herbertgao/pi-impeccable
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#383](https://github.com/HerbertGao/pi-extensions/pull/383) [`34e9a94`](https://github.com/HerbertGao/pi-extensions/commit/34e9a9445806afbd5be85034fe32ceea1919f9eb) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Vendor the official Impeccable 4.9.2 Pi skill. The launcher pins engine 0.1.25. A critique reads the design-review rubric, and a new surface reads the world or comp playbook when that part applies. The local Go staged-removal fix is kept.
|
|
8
|
+
|
|
3
9
|
## 0.4.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @herbertgao/pi-impeccable
|
|
2
2
|
|
|
3
|
-
The [Impeccable](https://github.com/pbakaus/impeccable) design skill for [Pi](https://pi.dev/), vendored from the official `skill-v4.9.
|
|
3
|
+
The [Impeccable](https://github.com/pbakaus/impeccable) design skill for [Pi](https://pi.dev/), vendored from the official `4.9.2` Pi skill payload (`cli-v4.9.2`). It provides design steering, critique, audit, and deterministic anti-pattern detection without an installer, background service, or global skill directory.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ Upstream `pin` and `unpin` only discover skill installations in project harness
|
|
|
27
27
|
|
|
28
28
|
## Updates and provenance
|
|
29
29
|
|
|
30
|
-
This package vendors the official Pi payload:
|
|
30
|
+
This package vendors the official Pi payload: 63 files from commit [`bba37e8ff05a099ae8f72db929453b31c82bef20`](https://github.com/pbakaus/impeccable/commit/bba37e8ff05a099ae8f72db929453b31c82bef20). `scripts/live-browser.js` has one local fix on top of that commit: Go still cleans edit markers on the live selection, but it no longer detaches a staged removal, so Undo and Discard can restore the hidden node. The review cursor stays at that commit. Updates are reviewed and released through this repository rather than the upstream auto-updater. The launcher pins engine `0.1.25`. `/impeccable foundations` walks a product-foundations checklist, and a hidden live bar stops capturing page clicks.
|
|
31
31
|
|
|
32
32
|
## License
|
|
33
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/pi-impeccable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "The Impeccable design skill for Pi, vendored from the official release.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
},
|
|
47
47
|
"x-upstream": {
|
|
48
48
|
"package": "impeccable",
|
|
49
|
-
"version": "4.9.
|
|
50
|
-
"reviewedVersion": "4.9.
|
|
49
|
+
"version": "4.9.2",
|
|
50
|
+
"reviewedVersion": "4.9.2",
|
|
51
51
|
"repository": "https://github.com/pbakaus/impeccable",
|
|
52
|
-
"commit": "
|
|
52
|
+
"commit": "bba37e8ff05a099ae8f72db929453b31c82bef20"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: impeccable
|
|
3
3
|
description: "Use when the user wants to design, redesign, shape, critique, audit, polish, simplify, harden, animate, or otherwise improve a frontend interface: websites, landing pages, dashboards, product UI, components, forms, settings, onboarding, empty states, and native iOS or Android screens. Handles UX review, hierarchy, layout, typography, color, motion, UX copy, accessibility, responsive behavior, edge cases, and capturing or documenting design systems (DESIGN.md, tokens). Also for making bland UI bolder, loud UI quieter, or ambitious visual effects. Not for backend-only or non-UI tasks."
|
|
4
|
-
version: 4.9.
|
|
4
|
+
version: 4.9.2
|
|
5
5
|
license: Apache 2.0
|
|
6
6
|
allowed-tools:
|
|
7
7
|
- Bash(npx impeccable *)
|
|
@@ -18,7 +18,7 @@ Core principles:
|
|
|
18
18
|
## Setup
|
|
19
19
|
|
|
20
20
|
1. Run `<skill-base-dir>/scripts/impeccable context` once per session, where `<skill-base-dir>` is the directory that contains this SKILL.md (the skill folder, not a plugin root two levels above it); keep cwd at the user's project. That base directory resolves every `.pi/skills/impeccable/scripts/impeccable <verb>` command in this skill and its references, and `.pi/skills/impeccable/scripts` is the fallback only when the runtime reports no base directory. On a Windows shell without `sh`, call `.pi/skills/impeccable/scripts/impeccable.cmd` instead. The launcher runs a self-contained binary that ships next to it or is downloaded once on first run; no Node or other runtime is required. Pass a named source file or route as `--target <path>`. It loads PRODUCT.md, DESIGN.md, the matching surface brief, and native-platform guidance when applicable; follow its directives and do not rerun it.
|
|
21
|
-
2. Load the request's playbook: its Commands-table reference for an explicit/implied sub-command, or [reference/new-work.md](reference/new-work.md) for a new surface
|
|
21
|
+
2. Load the request's playbook: its Commands-table reference for an explicit/implied sub-command, or [reference/new-work.md](reference/new-work.md) for a new surface, a replacement visual world, or a build from an approved comp. Some playbooks come in parts; read the part this request needs in the same step, not when the playbook later mentions it: [reference/new-work-world.md](reference/new-work-world.md) when a visual world is created or replaced (a redesign, a new look, or no established world), [reference/new-work-comp.md](reference/new-work-comp.md) for a build from an approved comp or on a comp-led build path, and [reference/critique-rubric.md](reference/critique-rubric.md) for a critique whose Assessment A runs in this context (a native platform, or no sub-agent tool); a delegated Assessment A gets the rubric's path in its prompt instead. Inspect target and incumbent visual truth before editing. When the app cannot run, start with committed visual-regression goldens or screenshot fixtures; verify target and freshness against current tokens, CSS, components, or assets, resolve conflicts, and compare theme/variant captures.
|
|
22
22
|
3. After resolving analysis and direction, read [reference/craft-floor.md](reference/craft-floor.md) immediately before any UI edit, including small refinements. It carries the quality floor, the absolute bans, and the reflexes no detector catches. Do not load it for planning-only work.
|
|
23
23
|
|
|
24
24
|
**Launcher unavailable:** On refusal or failure, send a separate message **before the next tool call**: “Context loading did not run; I’ll read the existing project context directly.” Then read existing PRODUCT.md and DESIGN.md without inventing missing context, follow applicable steps 2–3, including reading [reference/craft-floor.md](reference/craft-floor.md) immediately before any UI edit, and continue through permitted tools. This applies to planning and editing; launcher failure alone does not block either.
|
|
@@ -229,7 +229,7 @@ Don't chase device sizes; let content tell you where to break. Start narrow, str
|
|
|
229
229
|
|
|
230
230
|
/* Device supports hover */
|
|
231
231
|
@media (hover: hover) {
|
|
232
|
-
.card:hover { transform: translateY(-2px); }
|
|
232
|
+
.card:hover .card-surface { transform: translateY(-2px); } /* Lift a child; the card stays the hit area */
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/* Device doesn't support hover (touch) */
|
|
@@ -60,6 +60,10 @@ Timing should express distance and consequence:
|
|
|
60
60
|
|
|
61
61
|
Exit faster than entrance. Use natural deceleration such as `cubic-bezier(0.16, 1, 0.3, 1)` for confident arrivals; do not use bounce or elastic curves by reflex. Long feedback feels like latency.
|
|
62
62
|
|
|
63
|
+
## Hover
|
|
64
|
+
|
|
65
|
+
Hover motion never moves a neighbor or takes its pointer target. Keep the hovered element still and let a child carry the motion (`.card:hover .card-surface { transform: translateY(-2px) }`). An element that moves itself slides out from under a pointer near its edge and flickers. Optional previews wait for the pointer to settle: for a CSS reveal, set `transition-delay` on the hover state only, so leaving is not delayed.
|
|
66
|
+
|
|
63
67
|
## Implement to the runtime
|
|
64
68
|
|
|
65
69
|
- Use CSS transitions and keyframes for declarative state and bounded sequences.
|
|
@@ -78,6 +82,19 @@ Every web animation needs a `prefers-reduced-motion` path with an intentional al
|
|
|
78
82
|
|
|
79
83
|
## Verify
|
|
80
84
|
|
|
85
|
+
On the web, capture implemented motion before calling it smooth. Use the skill-internal measuring verb (not a separate user command), once normally and once with reduced motion, with the same URL, interaction, and region:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
.pi/skills/impeccable/scripts/impeccable motion-capture <url> --click '<selector>' --region '<region-selector>' --out-dir .impeccable/review/motion/normal
|
|
89
|
+
.pi/skills/impeccable/scripts/impeccable motion-capture <url> --click '<selector>' --region '<region-selector>' --reduced-motion --out-dir .impeccable/review/motion/reduced
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
For keyboard or multi-step interactions pass `--steps <json-file>` instead of `--click`, such as `[{"click":"#toggle"},{"press":"Enter"}]`; steps are click, hover, press (navigation keys), and wait (milliseconds). Capture each entrance and exit separately: for an exit, `--setup <json-file>` runs the same kind of steps and lets them settle before the first frame, such as opening the panel whose close is under review. The fixed capture points are before, first animated, evenly spaced middle, last animated, and settled frames. Inspect each directory's frame PNGs, `filmstrip.png`, and `report.json` before sending it: blank, wrong-region, stale, or missing evidence requires recapture. The report's limitations are unmeasured checks, not a clean result. Never judge motion by a single element or a single screenshot.
|
|
93
|
+
|
|
94
|
+
Spawn the shipped `impeccable-motion-reviewer` fresh (`impeccable_motion_reviewer` in Codex; `/impeccable-motion-reviewer` in Cursor; on GitHub Copilot say "Use the impeccable-motion-reviewer agent"), with no forked conversation history. Pass the original request, the motion thesis above, both capture directories (plus entrance and exit captures where applicable), DESIGN.md's motion rules if any, and the craft-floor reference path. The reviewer has no browser and reviews only the provided evidence. Never read its agent definition before spawning; the harness loads it. Wait with one long timeout; verify a disposition-first return with `continuity`, `craft`, `reduced_motion`, `material_fixes`, and `keep`. Respawn an empty or incomplete return once with the same packet. Only when the harness has no subagent capability, run a separate fresh pass from [degraded/motion-reviewer.md](degraded/motion-reviewer.md), and disclose the substitution at finish.
|
|
95
|
+
|
|
96
|
+
Act on the disposition. **recapture:** repair the named evidence and request a full review; invalid evidence binds no verdict. **fix:** apply the ordered material fixes in one batch, recapture normal and reduced motion over the same files, and continue the same reviewer for a verdict pass scoring each fix resolved, partial, or unresolved. Without continuation, pass the prior findings and new captures to a fresh reviewer. **ship:** report that word at the scope the reviewer actually checked. Two rounds maximum (initial review, then post-fix verdict); stop if a round resolves nothing. Report remaining fixes or missing evidence honestly at the ceiling; never turn a partial or unresolved verdict into a claim of smoothness.
|
|
97
|
+
|
|
81
98
|
- The focal motion is specific to the selected world and surface.
|
|
82
99
|
- Every supporting animation explains feedback, state, or relationship.
|
|
83
100
|
- Interruption and repeated use behave correctly.
|