@herbertgao/pi-extensions 2026.10.11 → 2026.10.13
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 +8 -8
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/node_modules/@herbertgao/pi-agency/README.md +5 -3
- package/node_modules/@herbertgao/pi-agency/package.json +1 -1
- package/node_modules/@herbertgao/pi-agency/src/index.ts +51 -7
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +6 -8
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +6 -8
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +11 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +28 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +33 -12
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +16 -3
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/package.json +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/agent-color.ts +11 -2
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +10 -5
- package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +3 -2
- package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +1 -0
- package/node_modules/@herbertgao/sol-pi/README.md +1 -1
- package/node_modules/@herbertgao/sol-pi/agents-install.md +2 -2
- package/node_modules/@narumitw/pi-btw/README.md +14 -5
- package/node_modules/@narumitw/pi-btw/dist/index.ts +1067 -560
- package/node_modules/@narumitw/pi-btw/dist/index.ts.map +4 -4
- package/node_modules/@narumitw/pi-btw/docs/core-alignment.md +277 -0
- package/node_modules/@narumitw/pi-btw/docs/native-appearance.md +857 -0
- package/node_modules/@narumitw/pi-btw/docs/workflows.md +34 -13
- package/node_modules/@narumitw/pi-btw/package.json +4 -4
- package/node_modules/@narumitw/pi-btw/src/btw.ts +152 -108
- package/node_modules/@narumitw/pi-btw/src/conversation-chrome.ts +93 -0
- package/node_modules/@narumitw/pi-btw/src/fullscreen-renderer.ts +329 -0
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +109 -315
- package/node_modules/@narumitw/pi-btw/src/keybindings.ts +100 -22
- package/node_modules/@narumitw/pi-btw/src/menu.ts +42 -27
- package/node_modules/@narumitw/pi-btw/src/session-lifetime.ts +66 -0
- package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +366 -164
- package/node_modules/@narumitw/pi-btw/src/workspace-layout.ts +96 -36
- package/node_modules/pi-lens/CHANGELOG.md +281 -0
- package/node_modules/pi-lens/README.md +13 -1
- package/node_modules/pi-lens/dist/{chunk-SS36ZX4J.js → chunk-24AKHFGP.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-JSQFTSC6.js → chunk-2FN63LPV.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-5UCAH366.js → chunk-2KXTHF3M.js} +20 -20
- package/node_modules/pi-lens/dist/{chunk-EU63SDCG.js → chunk-3DA2JDOL.js} +367 -281
- package/node_modules/pi-lens/dist/{chunk-RWWYJ623.js → chunk-3KAZU3VR.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-3PTHXJXR.js +28 -0
- package/node_modules/pi-lens/dist/chunk-3QED2P4V.js +31 -0
- package/node_modules/pi-lens/dist/{chunk-N2H3ZPZY.js → chunk-3RKP3FMS.js} +1 -0
- package/node_modules/pi-lens/dist/{chunk-XVF2VVXP.js → chunk-5HSRT26B.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-MXGY6KPT.js → chunk-5IUSNGOC.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-EJIUXPBX.js → chunk-5OFV52AM.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-AW7R2GWG.js → chunk-5VSF4UUQ.js} +12 -7
- package/node_modules/pi-lens/dist/{chunk-6STA6Z7I.js → chunk-5WRPDP2A.js} +18 -18
- package/node_modules/pi-lens/dist/{chunk-YIUAVF7E.js → chunk-6DLWKFEX.js} +35 -34
- package/node_modules/pi-lens/dist/{chunk-WOA4LN2R.js → chunk-7D6L4MTX.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-GAEGEPOC.js → chunk-7HXE67BN.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-AGSS7277.js +84 -0
- package/node_modules/pi-lens/dist/{chunk-R3PCY3YS.js → chunk-AMERCH6V.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-WU567RSC.js → chunk-ATKJFDQN.js} +14 -10
- package/node_modules/pi-lens/dist/{chunk-VSSBEUFT.js → chunk-AWSCPCN2.js} +16 -16
- package/node_modules/pi-lens/dist/{chunk-VCHXCQFG.js → chunk-BWD5EPKO.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-H6MF6EVN.js → chunk-CT4MN5IU.js} +1200 -230
- package/node_modules/pi-lens/dist/{chunk-FCSOVF55.js → chunk-CUHSHSB6.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-CHOW74WE.js → chunk-CYRKQRPM.js} +7 -10
- package/node_modules/pi-lens/dist/{chunk-Q7DUK4LX.js → chunk-DEL2U6CM.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-6C7JWPCP.js → chunk-DGUKIYSI.js} +26 -23
- package/node_modules/pi-lens/dist/{chunk-PHDMFAKM.js → chunk-DUO2TU77.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-MRXKYPCS.js → chunk-EBC36LNN.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-CSHFH5IN.js → chunk-ED36RF6Y.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-76MWC2K6.js → chunk-EUXZEFTV.js} +90 -97
- package/node_modules/pi-lens/dist/{chunk-QOZXJ4NA.js → chunk-FM4RDMKT.js} +11 -8
- package/node_modules/pi-lens/dist/{chunk-ACXEQZOU.js → chunk-GAQ7OQG6.js} +31 -28
- package/node_modules/pi-lens/dist/{chunk-XAGLWMJ4.js → chunk-GL5LUMZE.js} +23 -23
- package/node_modules/pi-lens/dist/{chunk-BKE7E7TC.js → chunk-GMX5OS7B.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-ZHFZWTZV.js → chunk-GSLNCYGG.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-3W7IEVVL.js → chunk-GSM5UU7A.js} +26 -34
- package/node_modules/pi-lens/dist/{chunk-724UL2TJ.js → chunk-GXFV6MYU.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-HAD7QRQI.js +30 -0
- package/node_modules/pi-lens/dist/{chunk-QOBUHWHX.js → chunk-HRNHZA3N.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-VWCXW2E7.js → chunk-HWCCCQNX.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-7DYBLXYA.js → chunk-HYGZEMX6.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-IJYGIDF4.js +186 -0
- package/node_modules/pi-lens/dist/{chunk-4W4VLAPJ.js → chunk-IQWN5JCP.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-SQ4TVJBR.js → chunk-IUE7SSKV.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-IBGIOBEE.js → chunk-IWDLU6K3.js} +68 -5
- package/node_modules/pi-lens/dist/{chunk-XCJN5IJU.js → chunk-IYNJ6YPZ.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-JAU72XNY.js → chunk-J64T55EI.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-2BBLFX75.js → chunk-J6MPGQTS.js} +5 -5
- package/node_modules/pi-lens/dist/chunk-JORED7EX.js +44 -0
- package/node_modules/pi-lens/dist/{chunk-6SDEP3AJ.js → chunk-JUKMK5Y4.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-FMSO6RDZ.js → chunk-JW3YWBVB.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-L3BLXZG7.js → chunk-KAPJINKN.js} +30 -69
- package/node_modules/pi-lens/dist/{chunk-2B73ZPOK.js → chunk-KN35K52N.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-C34ZXZ7O.js → chunk-KUA4OJ5Y.js} +24 -11
- package/node_modules/pi-lens/dist/chunk-KYUB6QDC.js +72 -0
- package/node_modules/pi-lens/dist/{chunk-67WMNWEE.js → chunk-LLJNQKQW.js} +12 -10
- package/node_modules/pi-lens/dist/chunk-LZSEQW6A.js +57 -0
- package/node_modules/pi-lens/dist/{chunk-ZANLILYD.js → chunk-M2IFVFWU.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-M2UD3LPU.js +88 -0
- package/node_modules/pi-lens/dist/{chunk-XIJZVPD5.js → chunk-MBKQHGA7.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-P7266HLM.js → chunk-MPNJLASA.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6GFRNVYR.js → chunk-MZGQNL3Y.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-ZWFS3OEF.js → chunk-N5FLEO7W.js} +33 -32
- package/node_modules/pi-lens/dist/{chunk-3JNKMP3B.js → chunk-O4NWQT6I.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-T6CPIZNT.js → chunk-OHKJ7PQF.js} +33 -32
- package/node_modules/pi-lens/dist/{chunk-VRZP76YM.js → chunk-P63GXC37.js} +4 -1
- package/node_modules/pi-lens/dist/{chunk-XTMJ7XDT.js → chunk-POMLXPMY.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-QQNQ7SJW.js → chunk-QBFBRV2B.js} +10 -4
- package/node_modules/pi-lens/dist/{chunk-CMMHNUZ2.js → chunk-R3T7CLQ2.js} +60 -38
- package/node_modules/pi-lens/dist/{chunk-23WOO7TX.js → chunk-R7YOCSNV.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-2CD5RS6M.js → chunk-RKBXZN3A.js} +23 -2
- package/node_modules/pi-lens/dist/{chunk-OCAGUNBC.js → chunk-RKKOYPRA.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-52FUZI6K.js → chunk-RMLC67LF.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-XMSXXAHW.js → chunk-ROYSX2S5.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-M6HSLBWY.js → chunk-RVK72CZX.js} +6507 -7514
- package/node_modules/pi-lens/dist/{chunk-FLKWCIZH.js → chunk-S2HEXIWI.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-UZ3TUTRV.js → chunk-S67KYG37.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VCO24T4L.js → chunk-SD4I7ZO4.js} +14 -14
- package/node_modules/pi-lens/dist/{chunk-Z527N6YQ.js → chunk-SKAMFC7A.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-MQLUAEOC.js → chunk-SRYEJNES.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-BRGDSBJE.js → chunk-SYE6T2EB.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-GXW6K4YJ.js → chunk-T57LYLZT.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ZXYDQ3TZ.js → chunk-T7FEBKXN.js} +48 -15
- package/node_modules/pi-lens/dist/{chunk-3EFKIGZN.js → chunk-TIQ2PKDW.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-QILIYSJF.js → chunk-TLX72JTG.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-TYM6OUIT.js → chunk-TOY6QKOH.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-IZSHAIJ7.js → chunk-TRETHTQO.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-3VPVG5SU.js → chunk-U44DJXQP.js} +10 -6
- package/node_modules/pi-lens/dist/{chunk-PNQDPDRC.js → chunk-UA7ZXYDR.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-OXXKQCSV.js → chunk-UBOQLVT2.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-QGQ5CCCG.js → chunk-UMS2MFPZ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-QHJ6DQ2R.js → chunk-US7ECLD7.js} +55 -13
- package/node_modules/pi-lens/dist/{chunk-AB3YYG6N.js → chunk-UZ2XCLYS.js} +8 -8
- package/node_modules/pi-lens/dist/chunk-V35JG4JB.js +2667 -0
- package/node_modules/pi-lens/dist/{chunk-N3X6Q4YT.js → chunk-VOOAPROD.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-SAEFPSB6.js → chunk-W66O5E25.js} +21 -11
- package/node_modules/pi-lens/dist/{chunk-KBG47GHP.js → chunk-WMYE35PX.js} +15 -11
- package/node_modules/pi-lens/dist/{chunk-5NGR67U5.js → chunk-XBJVAEEO.js} +32 -5
- package/node_modules/pi-lens/dist/{chunk-YYOIQFRS.js → chunk-XHJBS436.js} +122 -44
- package/node_modules/pi-lens/dist/{chunk-GBPP5P7X.js → chunk-XTBDCR27.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-4UNXBNE2.js → chunk-XTFDJI3T.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-UXGETRP4.js → chunk-XYURS6EN.js} +13 -12
- package/node_modules/pi-lens/dist/{chunk-RPLINGVB.js → chunk-Y6GZHWSJ.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-2VUQMUMT.js → chunk-YCWYO6TQ.js} +41 -38
- package/node_modules/pi-lens/dist/{chunk-77M37OKR.js → chunk-YH5MVY2U.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-AOHZU2BM.js → chunk-YNE3RP52.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-YSZNHOBY.js → chunk-ZHH37KZL.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-ZGDGW2V3.js → chunk-ZIVJBOO3.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-RXCOMYPY.js → chunk-ZVUL7QYY.js} +29 -28
- package/node_modules/pi-lens/dist/index.js +11052 -5852
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +10 -9
- package/node_modules/pi-lens/dist/mcp/cli.js +41 -38
- package/node_modules/pi-lens/dist/mcp/server.js +1120 -474
- package/node_modules/pi-lens/dist/mcp/worker.js +61 -58
- package/node_modules/pi-lens/dist/probes/installer.js +19 -19
- package/node_modules/pi-lens/dist/workers/project-snapshot-persist-worker.js +28 -9
- package/node_modules/pi-lens/dist/workers/review-graph-persist-worker.js +1 -1
- package/node_modules/pi-lens/docs/configuration.md +11 -0
- package/node_modules/pi-lens/docs/engineering-principles.md +32 -0
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +1 -1
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +15 -26
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +117 -13
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +97 -7
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +8 -2
- package/node_modules/pi-lens/docs/pi-lens-retro.md +4 -1
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +112 -4
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +22 -14
- package/node_modules/pi-lens/docs/release-qa-baseline.md +3 -1
- package/node_modules/pi-lens/docs/servercapabilities.md +9 -19
- package/node_modules/pi-lens/package.json +7 -5
- package/node_modules/pi-lens/scripts/download-grammars.js +40 -7
- package/node_modules/pi-lens/scripts/lib/latency-log-phases.mjs +95 -0
- package/node_modules/pi-lens/scripts/rpc-load-check.mjs +570 -81
- package/node_modules/pi-provider-qoder/dist/index.js +545 -221
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/node_modules/pi-web-access/CHANGELOG.md +39 -0
- package/node_modules/pi-web-access/README.md +83 -12
- package/node_modules/pi-web-access/anysearch.ts +4 -3
- package/node_modules/pi-web-access/bocha.ts +4 -3
- package/node_modules/pi-web-access/brightdata-unlocker.ts +3 -2
- package/node_modules/pi-web-access/brightdata.ts +4 -3
- package/node_modules/pi-web-access/ceramic.ts +3 -2
- package/node_modules/pi-web-access/curator-page.ts +3 -1
- package/node_modules/pi-web-access/curator-server.ts +1 -0
- package/node_modules/pi-web-access/deepseek.ts +179 -6
- package/node_modules/pi-web-access/dist/index.js +1118 -688
- package/node_modules/pi-web-access/dist/mcp-cli.js +1081 -667
- package/node_modules/pi-web-access/extract.ts +58 -6
- package/node_modules/pi-web-access/gemini-search.ts +29 -6
- package/node_modules/pi-web-access/index.ts +20 -3
- package/node_modules/pi-web-access/jina-search.ts +6 -4
- package/node_modules/pi-web-access/kagi.ts +5 -4
- package/node_modules/pi-web-access/keenable.ts +3 -2
- package/node_modules/pi-web-access/linkup.ts +170 -0
- package/node_modules/pi-web-access/mistral-search.ts +4 -3
- package/node_modules/pi-web-access/ollama.ts +5 -4
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/parallel.ts +7 -7
- package/node_modules/pi-web-access/perplexity.ts +5 -3
- package/node_modules/pi-web-access/querit.ts +4 -3
- package/node_modules/pi-web-access/search1api.ts +4 -3
- package/node_modules/pi-web-access/searchinfinity.ts +4 -3
- package/node_modules/pi-web-access/serpapi.ts +7 -5
- package/node_modules/pi-web-access/serpbase.ts +5 -4
- package/node_modules/pi-web-access/serpdive.ts +4 -3
- package/node_modules/pi-web-access/serper.ts +6 -4
- package/node_modules/pi-web-access/serply.ts +3 -2
- package/node_modules/pi-web-access/utils.ts +24 -1
- package/node_modules/pi-web-access/valyu.ts +4 -3
- package/node_modules/pi-web-access/web-tool-core.ts +5 -0
- package/node_modules/pi-web-access/xai-search.ts +49 -7
- package/node_modules/pi-web-access/xcrawl.ts +4 -3
- package/node_modules/pi-web-access/you.ts +3 -2
- package/package.json +10 -10
- package/node_modules/pi-lens/dist/chunk-3YN6V5TV.js +0 -85
- package/node_modules/pi-lens/dist/chunk-466Z26MG.js +0 -30
- package/node_modules/pi-lens/dist/chunk-EC47DWFA.js +0 -56
- package/node_modules/pi-lens/dist/chunk-KDERNTCQ.js +0 -28
- package/node_modules/pi-lens/dist/chunk-KSX3TXSZ.js +0 -69
- package/node_modules/pi-lens/dist/chunk-LOP6GRPH.js +0 -31
- package/node_modules/pi-lens/dist/chunk-UOPVJQ4N.js +0 -103
- /package/node_modules/pi-lens/dist/{chunk-FC4RP4I2.js → chunk-6HWVI6MI.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createSubsystemLogger
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-POMLXPMY.js";
|
|
5
|
+
import "./chunk-YNE3RP52.js";
|
|
6
|
+
import "./chunk-3RKP3FMS.js";
|
|
7
7
|
import "./chunk-NXL4FFQQ.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/metrics-client.js
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getWordIndexMaxFilesDerived
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7HXE67BN.js";
|
|
5
5
|
import {
|
|
6
6
|
PathKeyedMap
|
|
7
7
|
} from "./chunk-Z3CCVDUB.js";
|
|
@@ -15,27 +15,27 @@ import {
|
|
|
15
15
|
} from "./chunk-QYF5S6P6.js";
|
|
16
16
|
import {
|
|
17
17
|
KIND_EXTENSIONS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DUO2TU77.js";
|
|
19
19
|
import {
|
|
20
20
|
isTestFileName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-J6MPGQTS.js";
|
|
22
22
|
import {
|
|
23
23
|
incrementDegradationCount
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-J64T55EI.js";
|
|
25
25
|
import {
|
|
26
26
|
logLatency
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QBFBRV2B.js";
|
|
28
28
|
import {
|
|
29
29
|
createNdjsonLogger,
|
|
30
30
|
getGlobalPiLensLogDir,
|
|
31
31
|
getMaxLogSizeMB,
|
|
32
32
|
isTestMode
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YNE3RP52.js";
|
|
34
34
|
import {
|
|
35
35
|
isAtOrAboveHomeDir,
|
|
36
36
|
normalizeEphemeralMapKey,
|
|
37
37
|
normalizeFilePath
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-3RKP3FMS.js";
|
|
39
39
|
|
|
40
40
|
// dist/clients/word-index.js
|
|
41
41
|
import * as fs from "node:fs";
|
|
@@ -861,7 +861,7 @@ async function updateWordIndexDocumentAsyncUnsafe(index, doc, shouldContinue) {
|
|
|
861
861
|
}
|
|
862
862
|
var WORD_INDEX_MAX_BYTES = 512 * 1024;
|
|
863
863
|
async function collectWordIndexDocs(root, shouldContinue = () => true, preflightFiles) {
|
|
864
|
-
const { collectSourceFilesAsync } = await import("./chunk-
|
|
864
|
+
const { collectSourceFilesAsync } = await import("./chunk-IQWN5JCP.js");
|
|
865
865
|
const maxFiles = preflightFiles?.length ?? getWordIndexMaxFilesDerived(root);
|
|
866
866
|
const files = preflightFiles ? preflightFiles.map((file) => file.path) : await collectSourceFilesAsync(root, {
|
|
867
867
|
maxFiles,
|
|
@@ -910,7 +910,7 @@ async function refreshWordIndexIncrementally(index, root, shouldContinue = () =>
|
|
|
910
910
|
timings: { sourceWalkMs: 0, statWalkMs: 0, refreshReadsMs: 0 }
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
|
-
const { collectSourceFilesAsync } = await import("./chunk-
|
|
913
|
+
const { collectSourceFilesAsync } = await import("./chunk-IQWN5JCP.js");
|
|
914
914
|
const maxFiles = getWordIndexMaxFilesDerived(root);
|
|
915
915
|
const sourceWalkStartMs = Date.now();
|
|
916
916
|
const walked = await collectSourceFilesAsync(root, {
|
|
@@ -1713,6 +1713,13 @@ function deserializeWordIndex(data) {
|
|
|
1713
1713
|
}
|
|
1714
1714
|
return index;
|
|
1715
1715
|
}
|
|
1716
|
+
var wordIndexPublishedListener;
|
|
1717
|
+
function setWordIndexPublishedListener(listener) {
|
|
1718
|
+
wordIndexPublishedListener = listener;
|
|
1719
|
+
}
|
|
1720
|
+
function notifyWordIndexPublished(cwd, index, trigger) {
|
|
1721
|
+
wordIndexPublishedListener?.(cwd, index, trigger);
|
|
1722
|
+
}
|
|
1716
1723
|
var buildStatuses = /* @__PURE__ */ new Map();
|
|
1717
1724
|
function getWordIndexBuildStatus(cwd) {
|
|
1718
1725
|
return buildStatuses.get(path2.resolve(cwd));
|
|
@@ -1743,7 +1750,7 @@ function triggerBackgroundWordIndexBuild(cwd, dbg, options = {}) {
|
|
|
1743
1750
|
void (async () => {
|
|
1744
1751
|
const startMs = Date.now();
|
|
1745
1752
|
try {
|
|
1746
|
-
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-
|
|
1753
|
+
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-XYURS6EN.js");
|
|
1747
1754
|
const docs = await collectWordIndexDocs(key);
|
|
1748
1755
|
const index = await buildWordIndexAsync(docs);
|
|
1749
1756
|
const existing = loadProjectSnapshot(key);
|
|
@@ -1760,6 +1767,7 @@ function triggerBackgroundWordIndexBuild(cwd, dbg, options = {}) {
|
|
|
1760
1767
|
snapshot.generatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1761
1768
|
snapshot.wordIndex = serializeWordIndex(index);
|
|
1762
1769
|
saveProjectSnapshot(key, snapshot);
|
|
1770
|
+
notifyWordIndexPublished(key, index, "cold_query");
|
|
1763
1771
|
dbg?.(`word-index cold-build: ${index.docCount} files, ${index.postings.size} tokens (${Date.now() - startMs}ms)`);
|
|
1764
1772
|
logWordIndex({
|
|
1765
1773
|
phase: "cold_build",
|
|
@@ -1809,7 +1817,7 @@ function getWordIndexPersistScheduler() {
|
|
|
1809
1817
|
async function writeWordIndexSnapshot(cwd, index, dbg) {
|
|
1810
1818
|
const persistStartedAt = Date.now();
|
|
1811
1819
|
try {
|
|
1812
|
-
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-
|
|
1820
|
+
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-XYURS6EN.js");
|
|
1813
1821
|
const existing = loadProjectSnapshot(cwd);
|
|
1814
1822
|
const snapshot = existing ?? {
|
|
1815
1823
|
version: PROJECT_SNAPSHOT_VERSION,
|
|
@@ -1899,6 +1907,8 @@ export {
|
|
|
1899
1907
|
getLastWordIndexSerializeWork,
|
|
1900
1908
|
serializeWordIndex,
|
|
1901
1909
|
deserializeWordIndex,
|
|
1910
|
+
setWordIndexPublishedListener,
|
|
1911
|
+
notifyWordIndexPublished,
|
|
1902
1912
|
getWordIndexBuildStatus,
|
|
1903
1913
|
_resetWordIndexBuildGuardForTests,
|
|
1904
1914
|
triggerBackgroundWordIndexBuild,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
freshnessFromMtime,
|
|
4
|
+
hashFileBytes,
|
|
4
5
|
resolveRunnerPath
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AGSS7277.js";
|
|
6
7
|
import {
|
|
7
8
|
translateGuidanceToolNames
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J64T55EI.js";
|
|
9
10
|
import {
|
|
10
11
|
logLatency
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QBFBRV2B.js";
|
|
12
13
|
import {
|
|
13
14
|
normalizeMapKey,
|
|
14
15
|
toProjectRelativePath
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3RKP3FMS.js";
|
|
16
17
|
|
|
17
18
|
// dist/clients/advisory-provenance.js
|
|
18
|
-
import { createHash } from "node:crypto";
|
|
19
19
|
import * as fs from "node:fs";
|
|
20
20
|
import * as path from "node:path";
|
|
21
21
|
var MAX_ADVISORY_AFFECTED_FILES = 256;
|
|
@@ -24,7 +24,7 @@ function advisoryPathKey(filePath, cwd) {
|
|
|
24
24
|
}
|
|
25
25
|
function advisoryFileHash(filePath) {
|
|
26
26
|
try {
|
|
27
|
-
return
|
|
27
|
+
return hashFileBytes(filePath);
|
|
28
28
|
} catch (error) {
|
|
29
29
|
const code = error.code ?? "unknown";
|
|
30
30
|
return code === "ENOENT" ? "missing" : `unreadable:${code}`;
|
|
@@ -139,7 +139,7 @@ function validateAdvisoryProvenance(record, cwd, runtime) {
|
|
|
139
139
|
changedPaths.add(advisoryPathKey(resolved, cwd));
|
|
140
140
|
continue;
|
|
141
141
|
}
|
|
142
|
-
if (stat.
|
|
142
|
+
if (stat.size !== captured.size) {
|
|
143
143
|
reasons.push(`metadata-changed:${advisoryPathKey(resolved, cwd)}`);
|
|
144
144
|
}
|
|
145
145
|
const currentHash = advisoryFileHash(resolved);
|
|
@@ -205,7 +205,7 @@ function createPathFactsMemo(args) {
|
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
function partitionOneSource(args, memo) {
|
|
208
|
-
const
|
|
208
|
+
const storeScannedAtMs = parseScannedAtMs(args.scannedAt);
|
|
209
209
|
const onMissing = args.onMissing ?? "drop";
|
|
210
210
|
const rawVerdicts = /* @__PURE__ */ new Map();
|
|
211
211
|
const live = [];
|
|
@@ -221,7 +221,9 @@ function partitionOneSource(args, memo) {
|
|
|
221
221
|
live.push(finding);
|
|
222
222
|
continue;
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
const scannedAtMs = args.scannedAtOf ? parseScannedAtMs(args.scannedAtOf(finding)) : storeScannedAtMs;
|
|
225
|
+
const verdictKey = args.scannedAtOf ? `${cited}\0${scannedAtMs}` : cited;
|
|
226
|
+
let verdict = rawVerdicts.get(verdictKey);
|
|
225
227
|
if (verdict === void 0) {
|
|
226
228
|
const resolved = resolveRunnerPath(args.cwd, cited);
|
|
227
229
|
let facts = memo.facts.get(resolved);
|
|
@@ -245,7 +247,7 @@ function partitionOneSource(args, memo) {
|
|
|
245
247
|
else if (verdict === "stale")
|
|
246
248
|
stalePaths.push(resolved);
|
|
247
249
|
}
|
|
248
|
-
rawVerdicts.set(
|
|
250
|
+
rawVerdicts.set(verdictKey, verdict);
|
|
249
251
|
}
|
|
250
252
|
if (verdict === "missing")
|
|
251
253
|
dropped.push(finding);
|
|
@@ -288,7 +290,9 @@ function gateFindingsByPathFreshness(args) {
|
|
|
288
290
|
dropped[name] = partition.dropped.length;
|
|
289
291
|
if (partition.stale.length > 0)
|
|
290
292
|
demoted[name] = partition.stale.length;
|
|
291
|
-
if (source.
|
|
293
|
+
if (source.scannedAtOf !== void 0) {
|
|
294
|
+
scannedAtByStore[name] = "per-finding";
|
|
295
|
+
} else if (source.scannedAt !== void 0) {
|
|
292
296
|
scannedAtByStore[name] = String(source.scannedAt);
|
|
293
297
|
}
|
|
294
298
|
merged.live.push(...partition.live);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
isExcludedDirName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KUA4OJ5Y.js";
|
|
5
5
|
import {
|
|
6
6
|
createDeadline,
|
|
7
7
|
yieldIfOverBudget
|
|
8
8
|
} from "./chunk-QYF5S6P6.js";
|
|
9
9
|
import {
|
|
10
10
|
isGeneratedArtifactDirectoryName
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-J6MPGQTS.js";
|
|
12
12
|
|
|
13
13
|
// dist/clients/source-walker.js
|
|
14
14
|
import * as fs from "node:fs";
|
|
@@ -41,6 +41,30 @@ function shouldRecurseIntoDir(entry, fullPath, policy, onGeneratedDirSkip) {
|
|
|
41
41
|
return false;
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
44
|
+
var DirectoryListing = class {
|
|
45
|
+
#entries;
|
|
46
|
+
#foldedNames;
|
|
47
|
+
constructor(entries) {
|
|
48
|
+
this.#entries = entries;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* False only when no entry of this directory could be the file at `target`
|
|
52
|
+
* on any filesystem, so a caller may treat it as absent without asking the
|
|
53
|
+
* filesystem. True means "possibly present": the caller still asks, which
|
|
54
|
+
* keeps the exact verdict for a directory-named twin, a broken symlink or a
|
|
55
|
+
* name that matches only case-sensitively. Names are case-folded and
|
|
56
|
+
* NFC-normalized so a case-insensitive filesystem (Windows, default macOS)
|
|
57
|
+
* or a normalization-insensitive one (macOS) never reports a real entry
|
|
58
|
+
* absent. `target` must lie directly in the listed directory.
|
|
59
|
+
*/
|
|
60
|
+
mayContain(target) {
|
|
61
|
+
this.#foldedNames ??= new Set(this.#entries.map((entry) => foldEntryName(entry.name)));
|
|
62
|
+
return this.#foldedNames.has(foldEntryName(path.basename(target)));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
function foldEntryName(name) {
|
|
66
|
+
return name.normalize("NFC").toLowerCase();
|
|
67
|
+
}
|
|
44
68
|
function* walkTreeStackSteps(rootDir, visit, shouldStop) {
|
|
45
69
|
const stack = [rootDir];
|
|
46
70
|
while (stack.length > 0) {
|
|
@@ -50,10 +74,11 @@ function* walkTreeStackSteps(rootDir, visit, shouldStop) {
|
|
|
50
74
|
if (dir === void 0)
|
|
51
75
|
continue;
|
|
52
76
|
const entries = (yield dir) ?? [];
|
|
77
|
+
const listing = new DirectoryListing(entries);
|
|
53
78
|
const subDirs = [];
|
|
54
79
|
for (const entry of entries) {
|
|
55
80
|
const fullPath = path.join(dir, entry.name);
|
|
56
|
-
const disposition = visit(entry, fullPath);
|
|
81
|
+
const disposition = visit(entry, fullPath, listing);
|
|
57
82
|
if (disposition === "stop")
|
|
58
83
|
return true;
|
|
59
84
|
if (disposition === "recurse")
|
|
@@ -92,9 +117,11 @@ async function walkTreeStackAsync(rootDir, visit, opts) {
|
|
|
92
117
|
}
|
|
93
118
|
function walkTreeRecursiveSync(rootDir, visit) {
|
|
94
119
|
function scan(currentDir) {
|
|
95
|
-
|
|
120
|
+
const entries = readDirEntriesSafe(currentDir);
|
|
121
|
+
const listing = new DirectoryListing(entries);
|
|
122
|
+
for (const entry of entries) {
|
|
96
123
|
const fullPath = path.join(currentDir, entry.name);
|
|
97
|
-
const disposition = visit(entry, fullPath);
|
|
124
|
+
const disposition = visit(entry, fullPath, listing);
|
|
98
125
|
if (disposition === "stop")
|
|
99
126
|
return true;
|
|
100
127
|
if (disposition === "recurse" && scan(fullPath))
|
|
@@ -3,53 +3,62 @@ import {
|
|
|
3
3
|
buildSymbolId
|
|
4
4
|
} from "./chunk-3MED75HT.js";
|
|
5
5
|
import {
|
|
6
|
-
RUNTIME_CONFIG,
|
|
7
|
-
TreeSitterSymbolExtractor,
|
|
8
6
|
buildReverseDependencyIndexFromGraph,
|
|
9
7
|
getLSPService,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
resolveAliasedImport,
|
|
13
|
-
resolveImportToFiles,
|
|
14
|
-
resolveProjectReferenceImport,
|
|
15
|
-
resolveWorkspacePackageImport,
|
|
16
|
-
symbolExtractionGrammar
|
|
17
|
-
} from "./chunk-M6HSLBWY.js";
|
|
8
|
+
rankFilesByReverseDependencyCentrality
|
|
9
|
+
} from "./chunk-RVK72CZX.js";
|
|
18
10
|
import {
|
|
19
11
|
createGitIdentityResolver,
|
|
20
12
|
resolveGitIdentity
|
|
21
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UA7ZXYDR.js";
|
|
22
14
|
import {
|
|
15
|
+
notePersistWorkerMessageFault,
|
|
23
16
|
readWorkerHeapStatistics
|
|
24
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T7FEBKXN.js";
|
|
25
18
|
import {
|
|
26
19
|
buildQualifiedName,
|
|
27
20
|
findOwnerName
|
|
28
21
|
} from "./chunk-5W3R6LFT.js";
|
|
22
|
+
import {
|
|
23
|
+
RUNTIME_CONFIG,
|
|
24
|
+
TreeSitterSymbolExtractor,
|
|
25
|
+
fileAnswerNames,
|
|
26
|
+
importSourceNameParts,
|
|
27
|
+
jsTsCandidatePaths,
|
|
28
|
+
resolveAliasedImport,
|
|
29
|
+
resolveImportToFiles,
|
|
30
|
+
resolveProjectReferenceImport,
|
|
31
|
+
resolveWorkspacePackageImport,
|
|
32
|
+
symbolExtractionGrammar
|
|
33
|
+
} from "./chunk-V35JG4JB.js";
|
|
29
34
|
import {
|
|
30
35
|
classifyTreeSitterWasmError,
|
|
31
36
|
getSharedTreeSitterClient,
|
|
32
37
|
logTreeSitterCacheStats,
|
|
33
38
|
withTreeSitterRoot
|
|
34
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-US7ECLD7.js";
|
|
35
40
|
import {
|
|
36
41
|
getReviewGraphMaxFilesDerived
|
|
37
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-7HXE67BN.js";
|
|
43
|
+
import {
|
|
44
|
+
readGzipStageWorkerResult,
|
|
45
|
+
reapStageFile
|
|
46
|
+
} from "./chunk-IJYGIDF4.js";
|
|
38
47
|
import {
|
|
39
48
|
collectSourceFilesWithBudgetAsync
|
|
40
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-DGUKIYSI.js";
|
|
41
50
|
import {
|
|
42
51
|
collectUntrackedIgnoredIds,
|
|
43
52
|
getProjectDataDir,
|
|
44
53
|
isStaleStageFile
|
|
45
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-KUA4OJ5Y.js";
|
|
46
55
|
import {
|
|
47
56
|
KIND_EXTENSIONS,
|
|
48
57
|
detectFileKind
|
|
49
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-DUO2TU77.js";
|
|
50
59
|
import {
|
|
51
60
|
detectFileRole
|
|
52
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-J6MPGQTS.js";
|
|
53
62
|
import {
|
|
54
63
|
writeFileAtomic
|
|
55
64
|
} from "./chunk-2EECBNC5.js";
|
|
@@ -57,10 +66,10 @@ import {
|
|
|
57
66
|
compareOrdinal,
|
|
58
67
|
escapeRegExp,
|
|
59
68
|
incrementDegradationCount
|
|
60
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-J64T55EI.js";
|
|
61
70
|
import {
|
|
62
71
|
logLatency
|
|
63
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-QBFBRV2B.js";
|
|
64
73
|
import {
|
|
65
74
|
createNdjsonLogger,
|
|
66
75
|
getGlobalPiLensLogDir,
|
|
@@ -68,10 +77,10 @@ import {
|
|
|
68
77
|
getTurnId,
|
|
69
78
|
isTestMode,
|
|
70
79
|
lazyEnvNumber
|
|
71
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-YNE3RP52.js";
|
|
72
81
|
import {
|
|
73
82
|
FactStore
|
|
74
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-CYRKQRPM.js";
|
|
75
84
|
import {
|
|
76
85
|
BoundedFifoMap,
|
|
77
86
|
BoundedLruCache
|
|
@@ -82,7 +91,7 @@ import {
|
|
|
82
91
|
normalizeFilePath,
|
|
83
92
|
normalizeMapKey,
|
|
84
93
|
toProjectRelativePath
|
|
85
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-3RKP3FMS.js";
|
|
86
95
|
|
|
87
96
|
// dist/clients/review-graph/builder.js
|
|
88
97
|
import { createHash as createHash2 } from "node:crypto";
|
|
@@ -1046,7 +1055,8 @@ async function getGraphSourceFiles(cwd) {
|
|
|
1046
1055
|
const sourceMemo = sourcePathMemo(cwd);
|
|
1047
1056
|
const normalizeCallsBefore = sourceMemo.normalizeCalls.value;
|
|
1048
1057
|
const maxGraphFiles = getReviewGraphMaxFiles(cwd);
|
|
1049
|
-
const
|
|
1058
|
+
const walkStartedAt = Date.now();
|
|
1059
|
+
const { files: collected, entryBudgetExceeded, entriesVisited } = await collectProjectSourceFilesWithBudgetAsync(cwd, {
|
|
1050
1060
|
// Only walk graph-relevant extensions so the cap counts what the graph
|
|
1051
1061
|
// keeps (post-filter), not JSON/YAML/MD noise it would discard anyway.
|
|
1052
1062
|
extensions: MAIN_KIND_EXTENSIONS,
|
|
@@ -1054,6 +1064,7 @@ async function getGraphSourceFiles(cwd) {
|
|
|
1054
1064
|
..._reviewGraphEntryBudgetForTests === void 0 ? {} : { maxScanEntries: _reviewGraphEntryBudgetForTests },
|
|
1055
1065
|
..._reviewGraphEntryCounterForTests === void 0 ? {} : { onEntryVisited: _reviewGraphEntryCounterForTests }
|
|
1056
1066
|
});
|
|
1067
|
+
const walkMs = Date.now() - walkStartedAt;
|
|
1057
1068
|
if (entryBudgetExceeded) {
|
|
1058
1069
|
logLatency({
|
|
1059
1070
|
type: "phase",
|
|
@@ -1069,7 +1080,9 @@ async function getGraphSourceFiles(cwd) {
|
|
|
1069
1080
|
pathNormalizeCalls: sourceMemo.normalizeCalls.value - normalizeCallsBefore,
|
|
1070
1081
|
sourceFileCount: collected.length,
|
|
1071
1082
|
maxFileCount: maxGraphFiles,
|
|
1072
|
-
entryBudgetExceeded
|
|
1083
|
+
entryBudgetExceeded,
|
|
1084
|
+
entriesVisited,
|
|
1085
|
+
walkMs
|
|
1073
1086
|
};
|
|
1074
1087
|
}
|
|
1075
1088
|
const result = [];
|
|
@@ -1090,7 +1103,9 @@ async function getGraphSourceFiles(cwd) {
|
|
|
1090
1103
|
pathNormalizeCalls: sourceMemo.normalizeCalls.value - normalizeCallsBefore,
|
|
1091
1104
|
sourceFileCount: result.length,
|
|
1092
1105
|
maxFileCount: maxGraphFiles,
|
|
1093
|
-
entryBudgetExceeded
|
|
1106
|
+
entryBudgetExceeded,
|
|
1107
|
+
entriesVisited,
|
|
1108
|
+
walkMs
|
|
1094
1109
|
};
|
|
1095
1110
|
}
|
|
1096
1111
|
function addNode(graph, node) {
|
|
@@ -1546,6 +1561,18 @@ function writePendingOnMainThread(key, pending, reason, workerState = { started:
|
|
|
1546
1561
|
recordPersistFailure(key, "cache_write_failed", message, pending, workerState);
|
|
1547
1562
|
}
|
|
1548
1563
|
}
|
|
1564
|
+
function handleWorkerMessage(message) {
|
|
1565
|
+
try {
|
|
1566
|
+
const result = readGzipStageWorkerResult(message);
|
|
1567
|
+
if (typeof result === "string") {
|
|
1568
|
+
notePersistWorkerMessageFault("review-graph", "rejected", result);
|
|
1569
|
+
return;
|
|
1570
|
+
}
|
|
1571
|
+
handleWorkerResult(result);
|
|
1572
|
+
} catch (err) {
|
|
1573
|
+
notePersistWorkerMessageFault("review-graph", "threw", err);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1549
1576
|
function handleWorkerResult(result) {
|
|
1550
1577
|
const checkpoint = _checkpointWorkerRequests.get(result.id);
|
|
1551
1578
|
if (checkpoint) {
|
|
@@ -1554,17 +1581,18 @@ function handleWorkerResult(result) {
|
|
|
1554
1581
|
}
|
|
1555
1582
|
const request = _workerRequests.get(result.id);
|
|
1556
1583
|
if (!request) {
|
|
1557
|
-
|
|
1558
|
-
|
|
1584
|
+
if (typeof result.stagePath === "string") {
|
|
1585
|
+
fs2.rm(result.stagePath, { force: true }, () => {
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1559
1588
|
return;
|
|
1560
1589
|
}
|
|
1561
1590
|
_workerRequests.delete(result.id);
|
|
1562
1591
|
const { key, pending } = request;
|
|
1563
1592
|
const currentGeneration = _persistGenerations.get(key);
|
|
1564
1593
|
if (currentGeneration !== result.generation) {
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
} catch (reapErr) {
|
|
1594
|
+
const reapErr = reapStageFile(request.stagePath);
|
|
1595
|
+
if (reapErr !== void 0) {
|
|
1568
1596
|
logReviewGraph({
|
|
1569
1597
|
cwd: key,
|
|
1570
1598
|
phase: "persist_failed",
|
|
@@ -1586,7 +1614,7 @@ function handleWorkerResult(result) {
|
|
|
1586
1614
|
return;
|
|
1587
1615
|
}
|
|
1588
1616
|
if (result.error || result.rawBytes === void 0 || result.gzBytes === void 0 || result.serializeMs === void 0 || result.writeMs === void 0 || result.durationMs === void 0) {
|
|
1589
|
-
fs2.rm(
|
|
1617
|
+
fs2.rm(request.stagePath, { force: true }, () => {
|
|
1590
1618
|
});
|
|
1591
1619
|
writePendingOnMainThread(key, pending, result.error ?? "invalid worker result", {
|
|
1592
1620
|
started: true,
|
|
@@ -1596,7 +1624,7 @@ function handleWorkerResult(result) {
|
|
|
1596
1624
|
return;
|
|
1597
1625
|
}
|
|
1598
1626
|
try {
|
|
1599
|
-
fs2.renameSync(
|
|
1627
|
+
fs2.renameSync(request.stagePath, pending.cachePath);
|
|
1600
1628
|
fs2.rmSync(path2.join(pending.cacheDir, LEGACY_GRAPH_CACHE_FILENAME), {
|
|
1601
1629
|
force: true
|
|
1602
1630
|
});
|
|
@@ -1609,7 +1637,7 @@ function handleWorkerResult(result) {
|
|
|
1609
1637
|
offloaded: true
|
|
1610
1638
|
}, { started: true, completed: true });
|
|
1611
1639
|
} catch (err) {
|
|
1612
|
-
fs2.rm(
|
|
1640
|
+
fs2.rm(request.stagePath, { force: true }, () => {
|
|
1613
1641
|
});
|
|
1614
1642
|
writePendingOnMainThread(key, pending, err instanceof Error ? err.message : String(err), {
|
|
1615
1643
|
started: true,
|
|
@@ -1627,17 +1655,17 @@ function handleCheckpointWorkerResult(cp, result) {
|
|
|
1627
1655
|
reason: "worker_error",
|
|
1628
1656
|
error: result.error ?? "worker returned no gz metrics"
|
|
1629
1657
|
});
|
|
1630
|
-
fs2.rm(
|
|
1658
|
+
fs2.rm(cp.stagePath, { force: true }, () => {
|
|
1631
1659
|
});
|
|
1632
1660
|
return;
|
|
1633
1661
|
}
|
|
1634
1662
|
if (_checkpointGenerations.get(cp.cwd) !== cp.generation) {
|
|
1635
|
-
fs2.rm(
|
|
1663
|
+
fs2.rm(cp.stagePath, { force: true }, () => {
|
|
1636
1664
|
});
|
|
1637
1665
|
return;
|
|
1638
1666
|
}
|
|
1639
1667
|
try {
|
|
1640
|
-
fs2.renameSync(
|
|
1668
|
+
fs2.renameSync(cp.stagePath, cp.checkpointPath);
|
|
1641
1669
|
logReviewGraph({
|
|
1642
1670
|
cwd: cp.cwd,
|
|
1643
1671
|
phase: "checkpoint_written",
|
|
@@ -1654,7 +1682,7 @@ function handleCheckpointWorkerResult(cp, result) {
|
|
|
1654
1682
|
reason: "promote_failed",
|
|
1655
1683
|
error: err instanceof Error ? err.message : String(err)
|
|
1656
1684
|
});
|
|
1657
|
-
fs2.rm(
|
|
1685
|
+
fs2.rm(cp.stagePath, { force: true }, () => {
|
|
1658
1686
|
});
|
|
1659
1687
|
}
|
|
1660
1688
|
}
|
|
@@ -1728,7 +1756,7 @@ function getPersistWorker() {
|
|
|
1728
1756
|
return void 0;
|
|
1729
1757
|
}
|
|
1730
1758
|
const worker = new Worker(workerPath);
|
|
1731
|
-
worker.on("message",
|
|
1759
|
+
worker.on("message", handleWorkerMessage);
|
|
1732
1760
|
worker.on("error", (err) => handleWorkerDeath(err.message));
|
|
1733
1761
|
worker.on("exit", (code) => {
|
|
1734
1762
|
if (_persistWorker !== worker)
|
|
@@ -1780,7 +1808,7 @@ function writePending(key) {
|
|
|
1780
1808
|
elements: pending.elementCount,
|
|
1781
1809
|
testDelayMs: process.env.NODE_ENV === "test" ? Number(process.env.PI_LENS_TEST_PERSIST_WORKER_DELAY_MS) || void 0 : void 0
|
|
1782
1810
|
};
|
|
1783
|
-
_workerRequests.set(id, { key, pending });
|
|
1811
|
+
_workerRequests.set(id, { key, pending, stagePath });
|
|
1784
1812
|
worker.postMessage(request);
|
|
1785
1813
|
}
|
|
1786
1814
|
var _persistExitHookInstalled = false;
|
|
@@ -2451,8 +2479,8 @@ async function ensureReviewGraphFacts(filePath, cwd, facts, contentOverride) {
|
|
|
2451
2479
|
}
|
|
2452
2480
|
try {
|
|
2453
2481
|
const [{ importFactProvider }, { functionFactProvider }] = await Promise.all([
|
|
2454
|
-
import("./chunk-
|
|
2455
|
-
import("./chunk-
|
|
2482
|
+
import("./chunk-HAD7QRQI.js"),
|
|
2483
|
+
import("./chunk-3QED2P4V.js")
|
|
2456
2484
|
]);
|
|
2457
2485
|
await importFactProvider.run(ctx, facts);
|
|
2458
2486
|
await functionFactProvider.run(ctx, facts);
|
|
@@ -3131,7 +3159,8 @@ var _rebuildCounters = {
|
|
|
3131
3159
|
restoreComparisons: 0,
|
|
3132
3160
|
importTargetEdgeScans: 0,
|
|
3133
3161
|
removeOwnedEdgeVisits: 0,
|
|
3134
|
-
removeOwnedEdgePositions: 0
|
|
3162
|
+
removeOwnedEdgePositions: 0,
|
|
3163
|
+
createdImportResolutions: 0
|
|
3135
3164
|
};
|
|
3136
3165
|
function _getReviewGraphRebuildCountersForTests() {
|
|
3137
3166
|
return { ..._rebuildCounters };
|
|
@@ -3141,6 +3170,7 @@ function _resetReviewGraphRebuildCountersForTests() {
|
|
|
3141
3170
|
_rebuildCounters.importTargetEdgeScans = 0;
|
|
3142
3171
|
_rebuildCounters.removeOwnedEdgeVisits = 0;
|
|
3143
3172
|
_rebuildCounters.removeOwnedEdgePositions = 0;
|
|
3173
|
+
_rebuildCounters.createdImportResolutions = 0;
|
|
3144
3174
|
}
|
|
3145
3175
|
function edgeIdentityKey(edge) {
|
|
3146
3176
|
_rebuildCounters.restoreComparisons++;
|
|
@@ -3213,6 +3243,34 @@ function importTargetsForFile(graph, filePath) {
|
|
|
3213
3243
|
}
|
|
3214
3244
|
return [...targets].sort((a, b) => compareOrdinal(a, b));
|
|
3215
3245
|
}
|
|
3246
|
+
function importersResolvingTo(graph, cwd, created, ignoredIds) {
|
|
3247
|
+
const names = new Set([...created].flatMap(fileAnswerNames));
|
|
3248
|
+
const importers = /* @__PURE__ */ new Set();
|
|
3249
|
+
for (const node of graph.nodes.values()) {
|
|
3250
|
+
if (node.kind !== "module" && node.kind !== "external")
|
|
3251
|
+
continue;
|
|
3252
|
+
const source = node.metadata?.source;
|
|
3253
|
+
if (typeof source !== "string")
|
|
3254
|
+
continue;
|
|
3255
|
+
if (!importSourceNameParts(source).some((part) => names.has(part))) {
|
|
3256
|
+
continue;
|
|
3257
|
+
}
|
|
3258
|
+
for (const edge of graph.edgesByTo.get(node.id) ?? []) {
|
|
3259
|
+
if (edge.kind !== "imports")
|
|
3260
|
+
continue;
|
|
3261
|
+
const importer = graph.nodes.get(edge.from);
|
|
3262
|
+
const importerPath = importer?.filePath;
|
|
3263
|
+
if (!importer || !importerPath || importers.has(importerPath))
|
|
3264
|
+
continue;
|
|
3265
|
+
_rebuildCounters.createdImportResolutions++;
|
|
3266
|
+
const targets = importer.language === "jsts" ? [localImportToFile(cwd, importerPath, source, ignoredIds)] : resolveImportToFiles(cwd, importerPath, importer.language ?? "", source);
|
|
3267
|
+
if (targets.some((target) => target !== void 0 && !ignoredIds?.has(target) && created.has(normalizeMapKey(target)))) {
|
|
3268
|
+
importers.add(importerPath);
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
return [...importers];
|
|
3273
|
+
}
|
|
3216
3274
|
async function updateGraphFiles(graph, cwd, files, facts, ignoredIds) {
|
|
3217
3275
|
rebuildIndexes(graph);
|
|
3218
3276
|
const prior = files.map((file) => ({
|
|
@@ -3226,6 +3284,22 @@ async function updateGraphFiles(graph, cwd, files, facts, ignoredIds) {
|
|
|
3226
3284
|
preservedIncoming.push(...removeFileOwnedGraphData(graph, file, removedEdges));
|
|
3227
3285
|
await addFileToGraph(graph, cwd, file, ignoredIds);
|
|
3228
3286
|
}
|
|
3287
|
+
const created = new Set(prior.filter((entry) => !entry.existedBefore).map((entry) => entry.filePath).filter((file) => graph.fileNodes.has(file)));
|
|
3288
|
+
if (created.size > 0) {
|
|
3289
|
+
const batch = new Set(prior.map((entry) => entry.filePath));
|
|
3290
|
+
for (const importer of importersResolvingTo(graph, cwd, created, ignoredIds)) {
|
|
3291
|
+
if (batch.has(importer))
|
|
3292
|
+
continue;
|
|
3293
|
+
batch.add(importer);
|
|
3294
|
+
prior.push({
|
|
3295
|
+
filePath: importer,
|
|
3296
|
+
existedBefore: true,
|
|
3297
|
+
priorTargets: importTargetsForFile(graph, importer)
|
|
3298
|
+
});
|
|
3299
|
+
preservedIncoming.push(...removeFileOwnedGraphData(graph, importer, removedEdges));
|
|
3300
|
+
await addFileToGraph(graph, cwd, importer, ignoredIds);
|
|
3301
|
+
}
|
|
3302
|
+
}
|
|
3229
3303
|
if (removedEdges.size > 0) {
|
|
3230
3304
|
unindexEdges(graph, removedEdges);
|
|
3231
3305
|
graph.edges = graph.edges.filter((edge) => !removedEdges.has(edge));
|
|
@@ -3581,7 +3655,11 @@ async function _doBuildGraph(cwd, changedFiles, facts, seqHint, buildId) {
|
|
|
3581
3655
|
sourceFileCount,
|
|
3582
3656
|
maxFileCount: maxGraphFiles,
|
|
3583
3657
|
sourceFileCountLabel: `more than ${maxGraphFiles} files`,
|
|
3584
|
-
sourceFileCountTruncated: true
|
|
3658
|
+
sourceFileCountTruncated: true,
|
|
3659
|
+
// #1979: the walk's interior, so a slow over-cap first build reads as
|
|
3660
|
+
// many ms per entry (cold filesystem) or many entries (big tree).
|
|
3661
|
+
entriesVisited: sourceCollection.entriesVisited,
|
|
3662
|
+
walkMs: sourceCollection.walkMs
|
|
3585
3663
|
}
|
|
3586
3664
|
});
|
|
3587
3665
|
if (isReviewGraphSizeNearMiss(sourceFileCount, maxGraphFiles)) {
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
readCargoDependencyNames,
|
|
5
5
|
readCargoPackageName,
|
|
6
6
|
readCargoWorkspaceMembers
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MPNJLASA.js";
|
|
8
8
|
import {
|
|
9
9
|
getProjectIgnoreMatcher,
|
|
10
10
|
isExcludedDirName
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KUA4OJ5Y.js";
|
|
12
12
|
import {
|
|
13
13
|
getWorkspaceManifestMarkers
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5HSRT26B.js";
|
|
15
15
|
import {
|
|
16
16
|
normalizeMapKey
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3RKP3FMS.js";
|
|
18
18
|
|
|
19
19
|
// dist/clients/review-graph/workspace-modules.js
|
|
20
20
|
import * as fs from "node:fs";
|