@herbertgao/pi-extensions 2026.10.15 → 2026.10.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/THIRD_PARTY_NOTICES.md +6 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +38 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +13 -9
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-highlight.ts +41 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/write-execution.ts +42 -25
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/LICENSE +191 -0
- package/node_modules/@herbertgao/pi-impeccable/NOTICE.md +11 -0
- package/node_modules/@herbertgao/pi-impeccable/README.md +34 -0
- package/node_modules/@herbertgao/pi-impeccable/package.json +53 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +89 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.md +318 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/adapt.native.md +58 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/android.md +46 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/animate.md +89 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.md +139 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.native.md +139 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/bolder.md +33 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/clarify.md +94 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/colorize.md +86 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/component-review.md +63 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/craft-floor.md +44 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/craft.md +5 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +819 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/asset-producer.md +42 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/documenter.md +24 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/delight.md +70 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/distill.md +111 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/doctor.md +54 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/document.md +416 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/extract.md +69 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/generate.md +101 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/harden.md +362 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/hooks.md +114 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/init.md +131 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/ios.md +51 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/layout.md +84 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live-setup.md +104 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live.md +325 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/mode-operate.md +21 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/mode-persuade.md +19 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/mode-read.md +21 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +152 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/onboard.md +234 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/operate.md +61 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/optimize.md +257 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/overdrive.md +127 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/polish.md +105 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/quieter.md +99 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/region-map.md +26 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/routing.md +24 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/shape.md +59 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/typeset.md +90 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/visualize.md +47 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/command-metadata.json +98 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/data/font-index-failures.json +121 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/data/font-index.json +1 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +9 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable +249 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/impeccable.cmd +278 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser-dom.js +320 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser-ignores.js +246 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser-session.js +183 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +13645 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/node_modules/@narumitw/pi-btw/package.json +2 -2
- package/node_modules/pi-lens/CHANGELOG.md +37 -0
- package/node_modules/pi-lens/README.md +32 -0
- package/node_modules/pi-lens/config/biome/core.jsonc +3 -3
- package/node_modules/pi-lens/dist/{chunk-K2GUZ4DN.js → chunk-2DDDCJDL.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-DS2USX5G.js → chunk-2DMLM3ZO.js} +11 -11
- package/node_modules/pi-lens/dist/chunk-2F47TQOA.js +73 -0
- package/node_modules/pi-lens/dist/{chunk-YXDCRUKQ.js → chunk-2PHMIAKO.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-PP2A5V2T.js → chunk-2RLWJO5K.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-T4NGVFYI.js → chunk-2X4VLOCC.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-QT66NEYN.js → chunk-3MYEA7QD.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-7ZS7MC24.js → chunk-3WEPUD2V.js} +22 -22
- package/node_modules/pi-lens/dist/{chunk-TL2TCJYL.js → chunk-4AVZ3TG7.js} +14 -14
- package/node_modules/pi-lens/dist/{chunk-SNEUMLM7.js → chunk-4PCQCU47.js} +4 -4
- package/node_modules/pi-lens/dist/chunk-4WX4CTUE.js +57 -0
- package/node_modules/pi-lens/dist/{chunk-5LRUKYFA.js → chunk-5APMQ2IJ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-4U7GDSZQ.js → chunk-5CV5ITZF.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-VUAVE3QC.js → chunk-5ZR3APIM.js} +36 -36
- package/node_modules/pi-lens/dist/{chunk-CPZ5JJW6.js → chunk-63RIVFQI.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-EDMLIW6W.js → chunk-75SY4F24.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-RCHO5W7M.js → chunk-7RQXA5GG.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-XHDBJODR.js → chunk-A3YNG5KP.js} +21 -21
- package/node_modules/pi-lens/dist/{chunk-3WCEHYOI.js → chunk-AE37FEGH.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-KPVLQHCZ.js → chunk-AMXIUN2R.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-XI34NWDI.js → chunk-ARD426WI.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-RG3MXTRI.js → chunk-BHUWL2Y3.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-4ODSZ35Z.js → chunk-BI5LAQ3Y.js} +44 -44
- package/node_modules/pi-lens/dist/{chunk-Q42LJANT.js → chunk-BM5GS6ZH.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-CG5V25HX.js → chunk-BWYQUPOS.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-HYVXA3BB.js → chunk-CFRQMBGP.js} +23 -23
- package/node_modules/pi-lens/dist/{chunk-NLIVE7L6.js → chunk-CJYKEW2L.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-MEFLGBCS.js → chunk-DC4CFXM5.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-ASRAO7KG.js → chunk-DMSLNKF7.js} +27 -27
- package/node_modules/pi-lens/dist/{chunk-YSDPVDFC.js → chunk-DQXSPYRI.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-YKVDBNPO.js → chunk-EVDGNG4F.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-2LDMXL2M.js → chunk-F5Z6URKM.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-72J27ICO.js → chunk-F6X3YJWD.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-YXGRRORB.js → chunk-FA5LDARD.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-OMJ3OFBJ.js → chunk-FFL3A2VP.js} +6 -6
- package/node_modules/pi-lens/dist/chunk-FJIVKLPH.js +31 -0
- package/node_modules/pi-lens/dist/chunk-G2B7F6ZU.js +88 -0
- package/node_modules/pi-lens/dist/{chunk-YWWG4AQA.js → chunk-GAACZY6R.js} +24 -25
- package/node_modules/pi-lens/dist/{chunk-F7BO6FWH.js → chunk-GMTFDAOK.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-UVY4TOJH.js → chunk-GNSIWBAT.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-GTAI2J6U.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-SJHC3BCZ.js → chunk-GZE7WOI4.js} +98 -111
- package/node_modules/pi-lens/dist/{chunk-ZAPSUBLU.js → chunk-H7HTEQUZ.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-ZPJM7DID.js → chunk-HK6JVFZC.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-IPDG45G5.js +26 -0
- package/node_modules/pi-lens/dist/{chunk-ZSUX7KEM.js → chunk-J6JP25XU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6XSESGWD.js → chunk-JL6CXUMW.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-Y5KTA2OB.js → chunk-K2YGBXOA.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-AHWA4AKM.js → chunk-KLQVC3XC.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-27VWVB23.js → chunk-KSR7RGQY.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-N3PLNNCW.js → chunk-KXF5R4UN.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-GLW3YDZZ.js → chunk-LEJOJDXL.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-Y2TPADJR.js → chunk-MA77RSFN.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-IL7K66ZQ.js → chunk-MKVZQUEG.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-EIKRZ32J.js → chunk-MN7MHUXQ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-4FHUGDKU.js → chunk-MT6BVNFW.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-3SNDVPOR.js → chunk-NDMCVUYK.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-63NMUNYP.js → chunk-NIU2IPC5.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-APFJKOP6.js → chunk-NNKXDXXS.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-FEDWAYDS.js → chunk-OJLTLYHB.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-KJJAVH3X.js → chunk-OLAWH5UQ.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-G224FADB.js → chunk-OOU2WZZE.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-NFNVDDGB.js → chunk-OSTKYB55.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-P4QNXS6I.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-7IYC4ENJ.js → chunk-PKES3ISE.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-UCVMSOXF.js → chunk-PO45POGF.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-JWOVP5BL.js → chunk-PPIBVH4R.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-EWXXLS26.js → chunk-PQJFG24Z.js} +82 -12
- package/node_modules/pi-lens/dist/{chunk-TPYYEDP5.js → chunk-Q3UZHW6N.js} +45 -22
- package/node_modules/pi-lens/dist/{chunk-5DKE4HGX.js → chunk-Q4EMRFNA.js} +34 -34
- package/node_modules/pi-lens/dist/{chunk-XHLK33VM.js → chunk-Q4FCYCRE.js} +16 -16
- package/node_modules/pi-lens/dist/chunk-Q6D6VMI4.js +22 -0
- package/node_modules/pi-lens/dist/{chunk-Q4BKKOVC.js → chunk-QGSTQH4D.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-GYRZ72R4.js → chunk-RZOXUSPC.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-EN5AM7PX.js → chunk-S67UJDGQ.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-YWNO5Q4R.js → chunk-SCIUNBPF.js} +17 -17
- package/node_modules/pi-lens/dist/{chunk-VIDEKABZ.js → chunk-SJJYRZB4.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-SXGD4ANG.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-THEXI2QO.js → chunk-T7FTXGS3.js} +42 -42
- package/node_modules/pi-lens/dist/{chunk-WUY4BZEP.js → chunk-TIQJPRDD.js} +106 -50
- package/node_modules/pi-lens/dist/{chunk-EXVXBSGN.js → chunk-TIYGSODX.js} +17 -17
- package/node_modules/pi-lens/dist/{chunk-2FYKETQJ.js → chunk-U2SDMG7C.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-PJXNTPB2.js → chunk-U6OC3QEM.js} +21 -21
- package/node_modules/pi-lens/dist/{chunk-LMCTHJ2H.js → chunk-UCGQT677.js} +18 -18
- package/node_modules/pi-lens/dist/{chunk-UL5SXQVX.js → chunk-UHGF5UT5.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-AI3GP74G.js → chunk-UN4TEBWN.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-2SDHYHHO.js → chunk-V3APN3DY.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-7FLRUH6B.js → chunk-V63BC55Q.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-S55TEC7I.js → chunk-VG5JS5SW.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-IEBJF3PN.js → chunk-VPBIMOAQ.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-EX4EXBW7.js → chunk-VQH24FIP.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-TVZRLTG6.js → chunk-VSFLRN5Y.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-KCBRHV5E.js → chunk-W2V54OCL.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-VITFDI3O.js → chunk-W5LGKNET.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-OZNCKLOX.js → chunk-W5R5SABV.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-ELZRSR5N.js → chunk-WIZWZR4C.js} +38 -38
- package/node_modules/pi-lens/dist/{chunk-MKPCELNI.js → chunk-WQOIR3QY.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-COOUUC5W.js → chunk-XAIT2YGS.js} +6 -6
- package/node_modules/pi-lens/dist/chunk-XCUHKYCQ.js +23 -0
- package/node_modules/pi-lens/dist/{chunk-KFXCL4OV.js → chunk-XQCSWV2G.js} +22 -23
- package/node_modules/pi-lens/dist/{chunk-RU34BA4D.js → chunk-YBSONGSZ.js} +34 -34
- package/node_modules/pi-lens/dist/{chunk-GTDSYEA2.js → chunk-YISME6ON.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-YRD4ISED.js +30 -0
- package/node_modules/pi-lens/dist/{chunk-X3UTCXAA.js → chunk-YSBHPOY6.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-XWFIHYCH.js → chunk-Z2XAOKHK.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-K4SZB56V.js → chunk-Z7IGUAXL.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-KX56K73G.js → chunk-ZKXQKGWZ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-FWZRGGGY.js → chunk-ZQ6NZZTB.js} +6 -4
- package/node_modules/pi-lens/dist/{chunk-2Y6OJRSI.js → chunk-ZUUI3ZSA.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-UO66IMVP.js → chunk-ZYNI26MI.js} +2 -2
- package/node_modules/pi-lens/dist/index.js +571 -409
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +10 -10
- package/node_modules/pi-lens/dist/mcp/cli.js +42 -42
- package/node_modules/pi-lens/dist/mcp/server.js +108 -108
- package/node_modules/pi-lens/dist/mcp/worker.js +61 -61
- package/node_modules/pi-lens/dist/probes/installer.js +19 -19
- package/node_modules/pi-lens/docs/agent-tools.md +28 -7
- package/node_modules/pi-lens/docs/configuration.md +3 -1
- package/node_modules/pi-lens/docs/defect-shapes.md +738 -0
- package/node_modules/pi-lens/docs/invariants/caches-stores.md +30 -0
- package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +164 -0
- package/node_modules/pi-lens/docs/invariants/git-guard-host.md +53 -0
- package/node_modules/pi-lens/docs/invariants/language-config.md +31 -0
- package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +286 -0
- package/node_modules/pi-lens/docs/invariants/paths-os.md +59 -0
- package/node_modules/pi-lens/docs/invariants/session-telemetry.md +74 -0
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +2 -1
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +10 -8
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +2 -2
- package/node_modules/pi-lens/docs/pi-lens-orchestration.md +41 -0
- package/node_modules/pi-lens/docs/pi-lens-release.md +20 -0
- package/node_modules/pi-lens/docs/pi-lens-retro.md +3 -2
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +6 -6
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +2 -2
- package/node_modules/pi-lens/package.json +3 -2
- package/node_modules/pi-provider-qoder/dist/index.js +27 -5
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/node_modules/pi-typesafe/README.md +1 -1
- package/node_modules/pi-typesafe/dist/client.js +43 -1
- package/node_modules/pi-typesafe/package.json +1 -1
- package/package.json +10 -7
- package/node_modules/pi-lens/dist/chunk-22Y2BM7H.js +0 -23
- package/node_modules/pi-lens/dist/chunk-44X7VIKR.js +0 -73
- package/node_modules/pi-lens/dist/chunk-54NIOJJZ.js +0 -25
- package/node_modules/pi-lens/dist/chunk-7WWQAW5P.js +0 -30
- package/node_modules/pi-lens/dist/chunk-EA2ZRG44.js +0 -27
- package/node_modules/pi-lens/dist/chunk-EKNWOL2I.js +0 -27
- package/node_modules/pi-lens/dist/chunk-G5UCJFT7.js +0 -26
- package/node_modules/pi-lens/dist/chunk-N5FBM25N.js +0 -22
- package/node_modules/pi-lens/dist/chunk-P5XUGPIX.js +0 -31
- package/node_modules/pi-lens/dist/chunk-PKOXJIVT.js +0 -88
- package/node_modules/pi-lens/dist/chunk-RG7OODGM.js +0 -57
package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser-session.js
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-side durable session helpers for Impeccable live mode.
|
|
3
|
+
*
|
|
4
|
+
* Kept separate from live-browser.js so recovery state can be tested without
|
|
5
|
+
* booting the full overlay UI. Served before live-browser.js and attached to
|
|
6
|
+
* window.__IMPECCABLE_LIVE_SESSION__.
|
|
7
|
+
*/
|
|
8
|
+
(function (root) {
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
// crypto.randomUUID() exists only in secure contexts (HTTPS, localhost), so a
|
|
12
|
+
// dev site on a LAN IP, a Tailscale address, or a custom hostname over plain
|
|
13
|
+
// HTTP has no randomUUID at all (issue #1055). getRandomValues() is available
|
|
14
|
+
// in every context; Math.random() covers runtimes with no crypto. Live ids
|
|
15
|
+
// only have to be unique per session, not unguessable.
|
|
16
|
+
function randomUUID(cryptoImpl) {
|
|
17
|
+
const c = cryptoImpl === undefined ? root.crypto : cryptoImpl;
|
|
18
|
+
try {
|
|
19
|
+
if (c && typeof c.randomUUID === 'function') return c.randomUUID();
|
|
20
|
+
} catch { /* fall through to getRandomValues */ }
|
|
21
|
+
const bytes = new Uint8Array(16);
|
|
22
|
+
let filled = false;
|
|
23
|
+
try {
|
|
24
|
+
if (c && typeof c.getRandomValues === 'function') {
|
|
25
|
+
c.getRandomValues(bytes);
|
|
26
|
+
filled = true;
|
|
27
|
+
}
|
|
28
|
+
} catch { /* fall through to Math.random */ }
|
|
29
|
+
if (!filled) {
|
|
30
|
+
for (let i = 0; i < 16; i++) bytes[i] = Math.floor(Math.random() * 256);
|
|
31
|
+
}
|
|
32
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x40; // version 4
|
|
33
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80; // RFC 4122 variant
|
|
34
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');
|
|
35
|
+
return hex.slice(0, 8) + '-' + hex.slice(8, 12) + '-' + hex.slice(12, 16)
|
|
36
|
+
+ '-' + hex.slice(16, 20) + '-' + hex.slice(20);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function randomId8(cryptoImpl) {
|
|
40
|
+
return randomUUID(cryptoImpl).replace(/-/g, '').slice(0, 8);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function createLiveBrowserSessionState({ prefix, storage, idFactory }) {
|
|
44
|
+
if (!prefix) throw new Error('prefix required');
|
|
45
|
+
let store = storage;
|
|
46
|
+
if (!store) {
|
|
47
|
+
try { store = root.localStorage; } catch { store = null; /* storage denied */ }
|
|
48
|
+
}
|
|
49
|
+
const makeId = idFactory || function () { return randomId8(); };
|
|
50
|
+
const sessionKey = prefix + '-session';
|
|
51
|
+
const handledKey = sessionKey + '-handled';
|
|
52
|
+
const scrollKey = sessionKey + '-scroll';
|
|
53
|
+
let checkpointRevision = 0;
|
|
54
|
+
const owner = makeId();
|
|
55
|
+
|
|
56
|
+
function safeRead(key) {
|
|
57
|
+
try { return store.getItem(key); } catch { return null; }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function safeWrite(key, value) {
|
|
61
|
+
try { store.setItem(key, value); } catch { /* quota exceeded or private mode */ }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function safeRemove(key) {
|
|
65
|
+
try { store.removeItem(key); } catch { /* unavailable storage */ }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function loadSession() {
|
|
69
|
+
try {
|
|
70
|
+
const raw = safeRead(sessionKey);
|
|
71
|
+
if (!raw) return null;
|
|
72
|
+
const parsed = JSON.parse(raw);
|
|
73
|
+
if (Number.isInteger(parsed.checkpointRevision)) {
|
|
74
|
+
checkpointRevision = Math.max(checkpointRevision, parsed.checkpointRevision);
|
|
75
|
+
}
|
|
76
|
+
return parsed;
|
|
77
|
+
} catch { return null; }
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function saveSession(session) {
|
|
81
|
+
if (!session || !session.id) return;
|
|
82
|
+
// Adopt a revision another tab stored so this write does not lower it.
|
|
83
|
+
// localStorage has no compare-and-set, so a save from another tab that
|
|
84
|
+
// lands between this read and the write below can still be overwritten.
|
|
85
|
+
loadSession();
|
|
86
|
+
const payload = {
|
|
87
|
+
...session,
|
|
88
|
+
checkpointRevision,
|
|
89
|
+
};
|
|
90
|
+
safeWrite(sessionKey, JSON.stringify(payload));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function clearSession() {
|
|
94
|
+
safeRemove(sessionKey);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function nextCheckpointRevision() {
|
|
98
|
+
const existing = loadSession();
|
|
99
|
+
checkpointRevision += 1;
|
|
100
|
+
if (existing?.id) saveSession(existing);
|
|
101
|
+
return checkpointRevision;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function seedCheckpointRevision(value) {
|
|
105
|
+
if (Number.isInteger(value)) checkpointRevision = Math.max(checkpointRevision, value);
|
|
106
|
+
return checkpointRevision;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function currentCheckpointRevision() {
|
|
110
|
+
return checkpointRevision;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function readHandledIds() {
|
|
114
|
+
const raw = safeRead(handledKey);
|
|
115
|
+
if (!raw) return [];
|
|
116
|
+
try {
|
|
117
|
+
const parsed = JSON.parse(raw);
|
|
118
|
+
if (Array.isArray(parsed)) {
|
|
119
|
+
return parsed.filter(id => typeof id === 'string' && id);
|
|
120
|
+
}
|
|
121
|
+
if (typeof parsed === 'string' && parsed) return [parsed];
|
|
122
|
+
} catch { /* legacy values were stored as a plain session id */ }
|
|
123
|
+
return [raw];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function markHandled(id) {
|
|
127
|
+
if (!id) return;
|
|
128
|
+
const ids = readHandledIds().filter(existing => existing !== id);
|
|
129
|
+
ids.push(id);
|
|
130
|
+
safeWrite(handledKey, JSON.stringify(ids.slice(-8)));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function isHandled(id) {
|
|
134
|
+
return !!id && readHandledIds().includes(id);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function clearHandled(id) {
|
|
138
|
+
if (!id) {
|
|
139
|
+
safeRemove(handledKey);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const remaining = readHandledIds().filter(existing => existing !== id);
|
|
143
|
+
if (remaining.length > 0) safeWrite(handledKey, JSON.stringify(remaining));
|
|
144
|
+
else safeRemove(handledKey);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function writeScrollY(y) {
|
|
148
|
+
safeWrite(scrollKey, String(y));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function readScrollY() {
|
|
152
|
+
const raw = safeRead(scrollKey);
|
|
153
|
+
if (raw == null) return null;
|
|
154
|
+
const n = parseFloat(raw);
|
|
155
|
+
return isFinite(n) ? n : null;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function clearScrollY() {
|
|
159
|
+
safeRemove(scrollKey);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
owner,
|
|
164
|
+
sessionKey,
|
|
165
|
+
handledKey,
|
|
166
|
+
scrollKey,
|
|
167
|
+
saveSession,
|
|
168
|
+
loadSession,
|
|
169
|
+
clearSession,
|
|
170
|
+
nextCheckpointRevision,
|
|
171
|
+
seedCheckpointRevision,
|
|
172
|
+
currentCheckpointRevision,
|
|
173
|
+
markHandled,
|
|
174
|
+
isHandled,
|
|
175
|
+
clearHandled,
|
|
176
|
+
writeScrollY,
|
|
177
|
+
readScrollY,
|
|
178
|
+
clearScrollY,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
root.__IMPECCABLE_LIVE_SESSION__ = { createLiveBrowserSessionState, randomUUID, randomId8 };
|
|
183
|
+
})(typeof window !== 'undefined' ? window : globalThis);
|