@herbertgao/pi-extensions 2026.11.13 → 2026.11.15
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 +22 -0
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +5 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +9 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/index.ts +32 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +26 -21
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/table-copy.ts +753 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/fullscreen-detect.ts +11 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
- package/node_modules/@herbertgao/pi-inline-skill-commands/README.md +6 -2
- package/node_modules/@herbertgao/pi-inline-skill-commands/package.json +1 -1
- package/node_modules/@herbertgao/pi-inline-skill-commands/src/index.ts +41 -15
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +16 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +54 -22
- package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +114 -35
- package/node_modules/@herbertgao/pi-subagents/package.json +9 -4
- package/node_modules/@herbertgao/pi-subagents/skills/workflow-authoring/SKILL.md +147 -0
- package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +48 -32
- package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +34 -13
- package/node_modules/@herbertgao/pi-subagents/src/agent-types.ts +88 -0
- package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +16 -6
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +114 -98
- package/node_modules/@herbertgao/pi-subagents/src/mention-clone.ts +6 -2
- package/node_modules/@herbertgao/pi-subagents/src/mention.ts +5 -7
- package/node_modules/@herbertgao/pi-subagents/src/nested-tools.ts +18 -2
- package/node_modules/@herbertgao/pi-subagents/src/prompts.ts +25 -3
- package/node_modules/@herbertgao/pi-subagents/src/settings.ts +26 -0
- package/node_modules/@herbertgao/pi-subagents/src/structured-output.ts +13 -5
- package/node_modules/@herbertgao/pi-subagents/src/ui/fleet-list.ts +55 -8
- package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-card-redraw.ts +86 -0
- package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-card.ts +5 -5
- package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-dialog.ts +478 -115
- package/node_modules/@herbertgao/pi-subagents/src/ui/workflow-menu.ts +77 -6
- package/node_modules/@herbertgao/pi-subagents/src/workflow/agent-detail.ts +148 -0
- package/node_modules/@herbertgao/pi-subagents/src/workflow/host.ts +88 -14
- package/node_modules/@herbertgao/pi-subagents/src/workflow/journal.ts +8 -0
- package/node_modules/@herbertgao/pi-subagents/src/workflow/json-schema.ts +507 -57
- package/node_modules/@herbertgao/pi-subagents/src/workflow/progress.ts +41 -11
- package/node_modules/@herbertgao/pi-subagents/src/workflow/runtime.ts +106 -34
- package/node_modules/@herbertgao/pi-subagents/src/workflow/task.ts +43 -5
- package/node_modules/@herbertgao/pi-subagents/src/workflow/tool-description.ts +93 -153
- package/node_modules/@herbertgao/pi-subagents/src/workflow/worker-source.ts +283 -71
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +288 -177
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +7 -7
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +20 -0
- package/node_modules/pi-commandcode-provider/README.md +1 -1
- package/node_modules/pi-commandcode-provider/index.ts +2 -1
- package/node_modules/pi-commandcode-provider/package.json +1 -1
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +9 -2
- package/node_modules/pi-commandcode-provider/src/pricing.ts +5 -1
- package/node_modules/pi-commandcode-provider/src/responses-compat.ts +24 -1
- package/node_modules/pi-commandcode-provider/src/responses-stream.ts +99 -6
- package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
- package/node_modules/pi-lens/CHANGELOG.md +132 -0
- package/node_modules/pi-lens/README.md +2 -0
- package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +1 -0
- package/node_modules/pi-lens/dist/{chunk-LGH2HHZG.js → chunk-25CAONWT.js} +36 -25
- package/node_modules/pi-lens/dist/{chunk-ZQSSO7LO.js → chunk-2DWNYVUN.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-YCR6ZYTE.js → chunk-2RQREVGO.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VWEBZ2JV.js → chunk-2XALJI2K.js} +40 -40
- package/node_modules/pi-lens/dist/{chunk-PQXUZYTQ.js → chunk-2YQ5LI7R.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-VSQT6IHZ.js → chunk-35UJUF27.js} +18 -4
- package/node_modules/pi-lens/dist/{chunk-OLWGYBYT.js → chunk-3IWMNN2S.js} +17 -17
- package/node_modules/pi-lens/dist/chunk-3UTDLQWO.js +88 -0
- package/node_modules/pi-lens/dist/chunk-3Z7Z3B7V.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-UNP6Y4JV.js → chunk-4E4OCW3L.js} +16 -16
- package/node_modules/pi-lens/dist/{chunk-37IDWT6O.js → chunk-4GLSO2EM.js} +13 -11
- package/node_modules/pi-lens/dist/{chunk-QV3JPCMK.js → chunk-5HVDD7IA.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ZRQMENT4.js → chunk-62PIU4TO.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-3TSMQZG6.js → chunk-6MDWNZ7E.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-WLD6BGON.js → chunk-6MWX2J5H.js} +4 -0
- package/node_modules/pi-lens/dist/{chunk-SCU62JLX.js → chunk-6MZLS6CK.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-B42AIWPJ.js → chunk-7BWPQZHE.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-I3NZVAMN.js → chunk-7JMEPY6P.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-7DPXUPRF.js → chunk-7ORBRDFY.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6E5QLMWI.js → chunk-7WAQ3K26.js} +23 -23
- package/node_modules/pi-lens/dist/{chunk-2H5GHZKC.js → chunk-AB26NAHA.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-BBSDJTOV.js → chunk-AFSG6YUB.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-XDNWR7SG.js → chunk-ALTHJUZO.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-UN72ZAJ5.js → chunk-AOEVZXR6.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-HRLF35WL.js → chunk-ARTCVE6I.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-LQQNFCQJ.js → chunk-B2QO7GHY.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-I2FYOZNW.js → chunk-BJGWP4UX.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-G53LBDNU.js → chunk-BKJ6WZKP.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-P5MSLVUW.js → chunk-BQ72NQQM.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-K7O6AHSJ.js → chunk-BWGNVM33.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-ADYQRETD.js → chunk-BYIEU4E4.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-7ZVTFLCC.js → chunk-CDAJQBKJ.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-BKWFDWYM.js → chunk-D3UQWOCB.js} +16 -16
- package/node_modules/pi-lens/dist/{chunk-3PAS2ERX.js → chunk-DHFJS2I4.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-KNSOA43J.js → chunk-DKXIUGNA.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-LOEJFTF2.js → chunk-DLGJYQML.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-VGRGW4UL.js → chunk-DNJJVKJZ.js} +31 -31
- package/node_modules/pi-lens/dist/{chunk-5HBQL7DH.js → chunk-EBXCYEII.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-EH6EHFW2.js +73 -0
- package/node_modules/pi-lens/dist/{chunk-W26QZ3OM.js → chunk-EKQDQPX6.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-TWEOJE3D.js → chunk-EXHSWN3P.js} +844 -377
- package/node_modules/pi-lens/dist/{chunk-4IZZEN63.js → chunk-F7BFIENK.js} +33 -33
- package/node_modules/pi-lens/dist/{chunk-ZI7YHV6I.js → chunk-FD4LJQ6Y.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-RIH3UBK4.js → chunk-GFCPPCNR.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-5JB4WENL.js → chunk-GIK6VUCY.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-PPQHMSPH.js → chunk-GNK2IHVG.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-CXQYK4YT.js → chunk-H6DNTQ4V.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-NGNBJIUO.js → chunk-HERQPNY6.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-INBK3HIT.js → chunk-HFIFEH46.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-J2ZB5MDS.js → chunk-HKRESBMC.js} +20 -20
- package/node_modules/pi-lens/dist/{chunk-AZG5UJYY.js → chunk-HMXWZUQW.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-XSC3BCN3.js → chunk-HOWHAKXO.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-7CLWC2UH.js → chunk-HUWW77QY.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-KZ732ZVW.js → chunk-IO6P3NBP.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-7WKVCZI4.js → chunk-J7VNGHLN.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-QE7BJQ6K.js → chunk-JGCBMCCS.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-PFJLYRO3.js → chunk-KIQSNH3F.js} +34 -34
- package/node_modules/pi-lens/dist/{chunk-JGUDT5KD.js → chunk-KSQJBGRO.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-RJ3APNIP.js → chunk-KXKM2DFP.js} +4 -4
- package/node_modules/pi-lens/dist/chunk-L3Q72QGQ.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-6GLMMGCX.js → chunk-LDPY22FS.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-3PO4YYOX.js → chunk-M3QGXGY4.js} +3793 -3814
- package/node_modules/pi-lens/dist/{chunk-NNEQOC3U.js → chunk-MET776XM.js} +9 -7
- package/node_modules/pi-lens/dist/{chunk-X33QECRJ.js → chunk-MKQFSW2Q.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-7U36VQL6.js → chunk-MKW7ZUTT.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-PQF6YGYB.js → chunk-N2U644ZW.js} +4 -18
- package/node_modules/pi-lens/dist/{chunk-DI4AZZNY.js → chunk-NAACKIKT.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-O6LCSHHI.js → chunk-NHHS5T52.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-DCA2MXVQ.js → chunk-NIZKGBOU.js} +51 -27
- package/node_modules/pi-lens/dist/{chunk-PKWEBMCA.js → chunk-NNDZ7DOP.js} +194 -111
- package/node_modules/pi-lens/dist/{chunk-Q7J3JYJ2.js → chunk-NZ7NSKIW.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-S6MCMD27.js → chunk-OG3UCAHV.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-3QXFUP6T.js → chunk-OHTHVILU.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-NHA5K226.js → chunk-P7EV5ISR.js} +17 -2
- package/node_modules/pi-lens/dist/{chunk-L6BDRYUK.js → chunk-PVV27TOX.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-HIRBC72R.js → chunk-Q32RJDYC.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-QE5DJ7MX.js → chunk-Q4UQNTLB.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-SDYLT45T.js → chunk-QQGZY2BR.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-QMWKSYWB.js → chunk-S247BOH2.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-ARTYCUGF.js → chunk-S7KUDW73.js} +121 -18
- package/node_modules/pi-lens/dist/{chunk-6CFSDLHE.js → chunk-SJ2SR432.js} +17 -17
- package/node_modules/pi-lens/dist/{chunk-CQY2HEH7.js → chunk-SL4G67AP.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-LVLPA32Q.js → chunk-T2D2WWP6.js} +48 -11
- package/node_modules/pi-lens/dist/{chunk-HIJ4CHFF.js → chunk-T7KHGEJ5.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-74AMPWNC.js → chunk-TABDCX35.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-TFSBHRL2.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-KNJH6WJQ.js → chunk-TQKWR5AZ.js} +7 -7
- package/node_modules/pi-lens/dist/chunk-TWAQFMLW.js +110 -0
- package/node_modules/pi-lens/dist/{chunk-TKOFTLGB.js → chunk-UARVPNAU.js} +33 -33
- package/node_modules/pi-lens/dist/chunk-UWBD3JMH.js +56 -0
- package/node_modules/pi-lens/dist/{chunk-K4Z7MK6T.js → chunk-VEF3GFOL.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-4DAHGU3V.js → chunk-W2JPGW7Q.js} +27 -25
- package/node_modules/pi-lens/dist/{chunk-CZJGAOKL.js → chunk-W2YHHNY3.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-R4L7KZ7R.js → chunk-WA6U2URH.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-OZQQ3AIR.js → chunk-WAK2AXQQ.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-DFKOA74L.js → chunk-WH6O4IFD.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-27JQHK7Y.js → chunk-WJ7GY5WJ.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-KXGTLAUW.js → chunk-WWZLT6AM.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-O2MHF7QM.js → chunk-XRLZ75YY.js} +38 -38
- package/node_modules/pi-lens/dist/chunk-XWWFESYZ.js +27 -0
- package/node_modules/pi-lens/dist/chunk-XZSXSM4K.js +27 -0
- package/node_modules/pi-lens/dist/{chunk-C5PLBTNR.js → chunk-Y2LIOCA7.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-AXAR5ZW2.js → chunk-YIEHUKX2.js} +84 -169
- package/node_modules/pi-lens/dist/{chunk-B2OXE4AH.js → chunk-YOMLAKU6.js} +182 -180
- package/node_modules/pi-lens/dist/{chunk-MOAVEPC4.js → chunk-YV7XVYSJ.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-ZULZS2I6.js → chunk-ZVQUYCBU.js} +996 -365
- package/node_modules/pi-lens/dist/index.js +4911 -2376
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +8 -8
- package/node_modules/pi-lens/dist/mcp/cli.js +40 -40
- package/node_modules/pi-lens/dist/mcp/server.js +321 -234
- package/node_modules/pi-lens/dist/mcp/worker.js +58 -58
- package/node_modules/pi-lens/dist/probes/installer.js +21 -21
- package/node_modules/pi-lens/docs/ci-bot-pr-checks.md +18 -9
- package/node_modules/pi-lens/docs/ci.md +7 -0
- package/node_modules/pi-lens/docs/defect-shapes.md +43 -28
- package/node_modules/pi-lens/docs/globalconfig.md +1 -0
- package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +15 -0
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +3 -3
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +3 -2
- package/node_modules/pi-lens/docs/module-report-read-symbol.md +6 -2
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +3 -2
- package/node_modules/pi-lens/docs/pi-lens-orchestration.md +2 -1
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +2 -1
- package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
- package/node_modules/pi-lens/docs/settings.md +1 -0
- package/node_modules/pi-lens/docs/usage.md +1 -0
- package/node_modules/pi-lens/package.json +1 -1
- package/package.json +9 -7
- package/node_modules/pi-lens/dist/chunk-2H7NFZ4Q.js +0 -25
- package/node_modules/pi-lens/dist/chunk-5YJXF2IS.js +0 -56
- package/node_modules/pi-lens/dist/chunk-GCSDF5IE.js +0 -27
- package/node_modules/pi-lens/dist/chunk-H5API74E.js +0 -67
- package/node_modules/pi-lens/dist/chunk-HBX55MWO.js +0 -27
- package/node_modules/pi-lens/dist/chunk-JOIKBUQN.js +0 -88
- package/node_modules/pi-lens/dist/chunk-M2YMBT5G.js +0 -73
- package/node_modules/pi-lens/dist/chunk-MJRGPEQ5.js +0 -25
- package/node_modules/pi-lens/dist/chunk-TFKN5EIR.js +0 -27
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
deadCodeIssues,
|
|
8
8
|
formatDeadCodeDelta,
|
|
9
9
|
stableFindingKey
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-WAK2AXQQ.js";
|
|
11
11
|
import {
|
|
12
12
|
clearFormatterCache
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-VEF3GFOL.js";
|
|
14
14
|
import {
|
|
15
15
|
findNearestProjectRoot,
|
|
16
16
|
isStartupScanVerdictFresh,
|
|
17
17
|
resolveStartupScanContext
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-TQKWR5AZ.js";
|
|
19
19
|
import {
|
|
20
20
|
loadCallGraph
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-MKW7ZUTT.js";
|
|
22
22
|
import {
|
|
23
23
|
isHardFailureSummary
|
|
24
24
|
} from "../chunk-7U2IDNXN.js";
|
|
@@ -28,15 +28,15 @@ import {
|
|
|
28
28
|
isCompletedPassResult,
|
|
29
29
|
isExcludedTestTarget,
|
|
30
30
|
isRunnerErrorResult
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-NIZKGBOU.js";
|
|
32
32
|
import {
|
|
33
33
|
GovulncheckClient
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-DHFJS2I4.js";
|
|
35
35
|
import {
|
|
36
36
|
GitleaksClient,
|
|
37
37
|
classifyAndFilterFindings
|
|
38
|
-
} from "../chunk-
|
|
39
|
-
import "../chunk-
|
|
38
|
+
} from "../chunk-PVV27TOX.js";
|
|
39
|
+
import "../chunk-7BWPQZHE.js";
|
|
40
40
|
import {
|
|
41
41
|
resetManagedToolRefreshSession
|
|
42
42
|
} from "../chunk-UXVNL3D7.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
peekTurnEndFindings,
|
|
57
57
|
snapshotAdvisoryProvenance,
|
|
58
58
|
validateAdvisoryProvenance
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-Q4UQNTLB.js";
|
|
60
60
|
import {
|
|
61
61
|
CacheManager,
|
|
62
62
|
DEFAULT_MAX_AGE_MS,
|
|
@@ -117,51 +117,53 @@ import {
|
|
|
117
117
|
resetPsScriptAnalyzerAvailability,
|
|
118
118
|
runProviders,
|
|
119
119
|
stampLineHashes
|
|
120
|
-
} from "../chunk-
|
|
120
|
+
} from "../chunk-ZVQUYCBU.js";
|
|
121
121
|
import {
|
|
122
122
|
resetLazyInstallAttempts,
|
|
123
123
|
resetObservedRunnerLatency
|
|
124
|
-
} from "../chunk-
|
|
124
|
+
} from "../chunk-BKJ6WZKP.js";
|
|
125
125
|
import {
|
|
126
126
|
isTestRoleCollateral
|
|
127
|
-
} from "../chunk-
|
|
128
|
-
import "../chunk-
|
|
127
|
+
} from "../chunk-2RQREVGO.js";
|
|
128
|
+
import "../chunk-T7KHGEJ5.js";
|
|
129
129
|
import {
|
|
130
130
|
resetGoAvailability
|
|
131
|
-
} from "../chunk-
|
|
131
|
+
} from "../chunk-7ORBRDFY.js";
|
|
132
132
|
import {
|
|
133
133
|
TrivyClient,
|
|
134
|
+
existingDependencyManifests,
|
|
134
135
|
trivyEvidenceFiles
|
|
135
|
-
} from "../chunk-
|
|
136
|
-
import "../chunk-
|
|
137
|
-
import "../chunk-
|
|
138
|
-
import "../chunk-
|
|
139
|
-
import "../chunk-
|
|
136
|
+
} from "../chunk-W2YHHNY3.js";
|
|
137
|
+
import "../chunk-OG3UCAHV.js";
|
|
138
|
+
import "../chunk-FD4LJQ6Y.js";
|
|
139
|
+
import "../chunk-HFIFEH46.js";
|
|
140
|
+
import "../chunk-QQGZY2BR.js";
|
|
140
141
|
import {
|
|
141
142
|
resetRustAvailability
|
|
142
|
-
} from "../chunk-
|
|
143
|
-
import "../chunk-
|
|
144
|
-
import "../chunk-
|
|
143
|
+
} from "../chunk-ALTHJUZO.js";
|
|
144
|
+
import "../chunk-S247BOH2.js";
|
|
145
|
+
import "../chunk-JGCBMCCS.js";
|
|
145
146
|
import {
|
|
146
147
|
resetDispatchAvailabilityState,
|
|
147
148
|
resolveManagedToolClient
|
|
148
|
-
} from "../chunk-
|
|
149
|
-
import "../chunk-
|
|
150
|
-
import "../chunk-
|
|
151
|
-
import "../chunk-
|
|
152
|
-
import "../chunk-
|
|
149
|
+
} from "../chunk-NNDZ7DOP.js";
|
|
150
|
+
import "../chunk-Q32RJDYC.js";
|
|
151
|
+
import "../chunk-2YQ5LI7R.js";
|
|
152
|
+
import "../chunk-Y2LIOCA7.js";
|
|
153
|
+
import "../chunk-IO6P3NBP.js";
|
|
153
154
|
import {
|
|
154
155
|
SYMBOL_KIND_NAMES,
|
|
155
156
|
captureReviewGraphStructuralIr,
|
|
156
157
|
formatReviewGraphRevisionDriftNote,
|
|
157
158
|
publishReviewGraphFileIr,
|
|
158
159
|
reviewGraphIrContentHash
|
|
159
|
-
} from "../chunk-
|
|
160
|
+
} from "../chunk-W2JPGW7Q.js";
|
|
160
161
|
import {
|
|
161
162
|
buildSymbolId
|
|
162
163
|
} from "../chunk-3MED75HT.js";
|
|
163
164
|
import "../chunk-PKLB2XJL.js";
|
|
164
165
|
import {
|
|
166
|
+
BELOW_ROOT_CONFIG_FILE_NAMES,
|
|
165
167
|
MAX_LATE_AUX_REARMS,
|
|
166
168
|
PAST_EOF_STALE_MARKER,
|
|
167
169
|
PRIMARY_UNAVAILABLE_CAUSE,
|
|
@@ -272,7 +274,7 @@ import {
|
|
|
272
274
|
widgetDiagnosticUri,
|
|
273
275
|
writeOrderToken,
|
|
274
276
|
writeSourceFile
|
|
275
|
-
} from "../chunk-
|
|
277
|
+
} from "../chunk-EXHSWN3P.js";
|
|
276
278
|
import {
|
|
277
279
|
ANY_POSITION,
|
|
278
280
|
foldedFindingIdentity,
|
|
@@ -281,8 +283,9 @@ import {
|
|
|
281
283
|
primePersistedMutationAttribution,
|
|
282
284
|
resetMutationAttribution,
|
|
283
285
|
retainRecordedFindings,
|
|
286
|
+
sanitizeCorrelationId,
|
|
284
287
|
stableFindingId
|
|
285
|
-
} from "../chunk-
|
|
288
|
+
} from "../chunk-35UJUF27.js";
|
|
286
289
|
import {
|
|
287
290
|
mapWithConcurrency
|
|
288
291
|
} from "../chunk-XIMYZ3JA.js";
|
|
@@ -308,8 +311,8 @@ import {
|
|
|
308
311
|
resetLSPCaseSensitivityState,
|
|
309
312
|
resolveLspCwdForFile,
|
|
310
313
|
shouldInitializeSessionRoot
|
|
311
|
-
} from "../chunk-
|
|
312
|
-
import "../chunk-
|
|
314
|
+
} from "../chunk-YIEHUKX2.js";
|
|
315
|
+
import "../chunk-J7VNGHLN.js";
|
|
313
316
|
import {
|
|
314
317
|
PROJECT_VENV_DIR_NAMES,
|
|
315
318
|
PYTHON_DECLARATION_CONCURRENCY,
|
|
@@ -321,30 +324,16 @@ import {
|
|
|
321
324
|
partitionOutrankedPythonCompileVerdicts,
|
|
322
325
|
recordPythonCompileVerdictDrop,
|
|
323
326
|
resetBoundedTelemetry
|
|
324
|
-
} from "../chunk-
|
|
327
|
+
} from "../chunk-AB26NAHA.js";
|
|
325
328
|
import {
|
|
326
329
|
scannerReportParentDir
|
|
327
|
-
} from "../chunk-
|
|
328
|
-
import {
|
|
329
|
-
PROJECT_SNAPSHOT_VERSION,
|
|
330
|
-
getProjectSnapshotLegacyPath,
|
|
331
|
-
getProjectSnapshotPath,
|
|
332
|
-
hydrateRuntimeFromProjectSnapshot,
|
|
333
|
-
hydrateRuntimeFromProjectSnapshotIfIdle,
|
|
334
|
-
isProjectSnapshotFresh,
|
|
335
|
-
isProjectSnapshotMetaStale,
|
|
336
|
-
loadProjectSnapshot,
|
|
337
|
-
loadProjectSnapshotExportsAndRules,
|
|
338
|
-
loadProjectSnapshotWithoutWordIndex,
|
|
339
|
-
readProjectSnapshotMeta,
|
|
340
|
-
saveRuntimeProjectSnapshot
|
|
341
|
-
} from "../chunk-NNEQOC3U.js";
|
|
330
|
+
} from "../chunk-5HVDD7IA.js";
|
|
342
331
|
import {
|
|
343
332
|
SWEEP_IDLE_SAFETY_MARGIN_MS,
|
|
344
333
|
getFullScanWallClockMs,
|
|
345
334
|
isWorkspaceSweepActive,
|
|
346
335
|
runWhenWorkspaceSweepIdle
|
|
347
|
-
} from "../chunk-
|
|
336
|
+
} from "../chunk-B2QO7GHY.js";
|
|
348
337
|
import "../chunk-5W3R6LFT.js";
|
|
349
338
|
import {
|
|
350
339
|
DEPENDENCY_DRIFT_MAX_DELIVERIES,
|
|
@@ -356,9 +345,9 @@ import {
|
|
|
356
345
|
resolveImportToFiles,
|
|
357
346
|
sweepInlineBlockerFreshness,
|
|
358
347
|
symbolExtractionGrammar
|
|
359
|
-
} from "../chunk-
|
|
360
|
-
import "../chunk-
|
|
361
|
-
import "../chunk-
|
|
348
|
+
} from "../chunk-S7KUDW73.js";
|
|
349
|
+
import "../chunk-KSQJBGRO.js";
|
|
350
|
+
import "../chunk-H6DNTQ4V.js";
|
|
362
351
|
import {
|
|
363
352
|
EXT_TO_LANG,
|
|
364
353
|
classifyTreeSitterWasmError,
|
|
@@ -371,15 +360,29 @@ import {
|
|
|
371
360
|
queryLoader,
|
|
372
361
|
reportBundledResourceDirHealth,
|
|
373
362
|
resolveTreeSitterLanguage
|
|
374
|
-
} from "../chunk-
|
|
363
|
+
} from "../chunk-4GLSO2EM.js";
|
|
375
364
|
import "../chunk-Z54ZSOBZ.js";
|
|
376
365
|
import {
|
|
377
366
|
dump,
|
|
378
367
|
getUserRuleRoot,
|
|
379
368
|
resolvePackagePath
|
|
380
|
-
} from "../chunk-
|
|
369
|
+
} from "../chunk-2DWNYVUN.js";
|
|
381
370
|
import "../chunk-6HWVI6MI.js";
|
|
382
|
-
import "../chunk-
|
|
371
|
+
import "../chunk-HMXWZUQW.js";
|
|
372
|
+
import {
|
|
373
|
+
PROJECT_SNAPSHOT_VERSION,
|
|
374
|
+
getProjectSnapshotLegacyPath,
|
|
375
|
+
getProjectSnapshotPath,
|
|
376
|
+
hydrateRuntimeFromProjectSnapshot,
|
|
377
|
+
hydrateRuntimeFromProjectSnapshotIfIdle,
|
|
378
|
+
isProjectSnapshotFresh,
|
|
379
|
+
isProjectSnapshotMetaStale,
|
|
380
|
+
loadProjectSnapshot,
|
|
381
|
+
loadProjectSnapshotExportsAndRules,
|
|
382
|
+
loadProjectSnapshotWithoutWordIndex,
|
|
383
|
+
readProjectSnapshotMeta,
|
|
384
|
+
saveRuntimeProjectSnapshot
|
|
385
|
+
} from "../chunk-MET776XM.js";
|
|
383
386
|
import {
|
|
384
387
|
centralityFromReverseDeps,
|
|
385
388
|
getWordIndexBuildStatus,
|
|
@@ -388,16 +391,16 @@ import {
|
|
|
388
391
|
parseWordIndexQuery,
|
|
389
392
|
searchWordIndex,
|
|
390
393
|
triggerBackgroundWordIndexBuild
|
|
391
|
-
} from "../chunk-
|
|
394
|
+
} from "../chunk-BQ72NQQM.js";
|
|
392
395
|
import {
|
|
393
396
|
getProjectDiagnosticsScannerMaxFiles
|
|
394
|
-
} from "../chunk-
|
|
397
|
+
} from "../chunk-BYIEU4E4.js";
|
|
395
398
|
import {
|
|
396
399
|
SCAN_LANGUAGE_PRIORITY,
|
|
397
400
|
extensionsForLanguage,
|
|
398
401
|
resolveLanguage,
|
|
399
402
|
resolveLanguageScope
|
|
400
|
-
} from "../chunk-
|
|
403
|
+
} from "../chunk-NAACKIKT.js";
|
|
401
404
|
import {
|
|
402
405
|
WARM_TURN_END_SCHEMA_VERSION,
|
|
403
406
|
boundUnixSocketKeepsIdentity,
|
|
@@ -407,7 +410,7 @@ import {
|
|
|
407
410
|
ipcPathForCwd,
|
|
408
411
|
readTurnEndStatus,
|
|
409
412
|
unlinkStaleUnixSocket
|
|
410
|
-
} from "../chunk-
|
|
413
|
+
} from "../chunk-6MDWNZ7E.js";
|
|
411
414
|
import {
|
|
412
415
|
NO_SERVER_REASON,
|
|
413
416
|
cleanVerdict,
|
|
@@ -420,34 +423,30 @@ import {
|
|
|
420
423
|
import {
|
|
421
424
|
resolveRunnerPath,
|
|
422
425
|
toRunnerDisplayPath
|
|
423
|
-
} from "../chunk-
|
|
426
|
+
} from "../chunk-62PIU4TO.js";
|
|
424
427
|
import "../chunk-2BEMIWEW.js";
|
|
425
428
|
import "../chunk-IJYGIDF4.js";
|
|
426
429
|
import {
|
|
427
430
|
commitDurableStore,
|
|
428
431
|
resetResolvedPathCache,
|
|
429
432
|
resetZizmorTokenAvailability
|
|
430
|
-
} from "../chunk-
|
|
433
|
+
} from "../chunk-YOMLAKU6.js";
|
|
431
434
|
import {
|
|
432
435
|
readFileContent,
|
|
433
436
|
resolveToolCwd
|
|
434
|
-
} from "../chunk-
|
|
437
|
+
} from "../chunk-T2D2WWP6.js";
|
|
435
438
|
import {
|
|
436
439
|
_resetPackageManagerCache,
|
|
437
440
|
findGlobalBinary,
|
|
438
441
|
pmBinary,
|
|
439
442
|
resolveNodePackageManager,
|
|
440
443
|
runScriptArgs
|
|
441
|
-
} from "../chunk-
|
|
444
|
+
} from "../chunk-25CAONWT.js";
|
|
442
445
|
import {
|
|
443
446
|
getIsolatedNpxSpawnOptions,
|
|
444
447
|
probeToolAsync
|
|
445
|
-
} from "../chunk-
|
|
446
|
-
import
|
|
447
|
-
readJsonCache
|
|
448
|
-
} from "../chunk-TQWRH25U.js";
|
|
449
|
-
import "../chunk-UYXV5NIS.js";
|
|
450
|
-
import "../chunk-KNSOA43J.js";
|
|
448
|
+
} from "../chunk-WWZLT6AM.js";
|
|
449
|
+
import "../chunk-DKXIUGNA.js";
|
|
451
450
|
import {
|
|
452
451
|
classifyProbeFailure,
|
|
453
452
|
createAvailabilityLatch,
|
|
@@ -455,24 +454,28 @@ import {
|
|
|
455
454
|
logAvailabilityDecision,
|
|
456
455
|
resetInstallRetryLatches,
|
|
457
456
|
startHostStallSampler
|
|
458
|
-
} from "../chunk-
|
|
457
|
+
} from "../chunk-LDPY22FS.js";
|
|
459
458
|
import {
|
|
460
459
|
canRunStartupHeavyScans,
|
|
461
460
|
detectProjectLanguageProfile,
|
|
462
461
|
getDefaultStartupTools
|
|
463
|
-
} from "../chunk-
|
|
464
|
-
import "../chunk-
|
|
462
|
+
} from "../chunk-HOWHAKXO.js";
|
|
463
|
+
import "../chunk-WJ7GY5WJ.js";
|
|
465
464
|
import {
|
|
466
465
|
DEFAULT_MAX_SCAN_ENTRIES,
|
|
467
466
|
collectSourceFilesWithBudgetAsync,
|
|
468
467
|
getSlowFsVerdict,
|
|
469
468
|
isSlowFs,
|
|
470
469
|
slowFsDegradationNotice
|
|
471
|
-
} from "../chunk-
|
|
470
|
+
} from "../chunk-WA6U2URH.js";
|
|
472
471
|
import {
|
|
473
472
|
shouldRecurseIntoDir,
|
|
474
473
|
walkTreeStackAsync
|
|
475
|
-
} from "../chunk-
|
|
474
|
+
} from "../chunk-TABDCX35.js";
|
|
475
|
+
import {
|
|
476
|
+
readJsonCache
|
|
477
|
+
} from "../chunk-TQWRH25U.js";
|
|
478
|
+
import "../chunk-UYXV5NIS.js";
|
|
476
479
|
import {
|
|
477
480
|
displayProjectDataPath,
|
|
478
481
|
drainProjectDataDirMigrations,
|
|
@@ -502,18 +505,14 @@ import {
|
|
|
502
505
|
sweepDeadEphemeralDataDirs,
|
|
503
506
|
updateHeartbeat,
|
|
504
507
|
withGenerationLockSync
|
|
505
|
-
} from "../chunk-
|
|
508
|
+
} from "../chunk-M3QGXGY4.js";
|
|
506
509
|
import {
|
|
507
510
|
createSingleFlight
|
|
508
|
-
} from "../chunk-
|
|
511
|
+
} from "../chunk-GIK6VUCY.js";
|
|
509
512
|
import {
|
|
510
513
|
createDeadline,
|
|
511
514
|
yieldIfOverBudget
|
|
512
515
|
} from "../chunk-QYF5S6P6.js";
|
|
513
|
-
import {
|
|
514
|
-
detectFileKind,
|
|
515
|
-
isJstsFactFile
|
|
516
|
-
} from "../chunk-CQY2HEH7.js";
|
|
517
516
|
import {
|
|
518
517
|
PathKeyedMap,
|
|
519
518
|
compareKeys,
|
|
@@ -524,12 +523,16 @@ import {
|
|
|
524
523
|
provenanceView,
|
|
525
524
|
resolvePiLensConfig,
|
|
526
525
|
summarizeConfigResolution
|
|
527
|
-
} from "../chunk-
|
|
526
|
+
} from "../chunk-N2U644ZW.js";
|
|
527
|
+
import {
|
|
528
|
+
detectFileKind,
|
|
529
|
+
isJstsFactFile
|
|
530
|
+
} from "../chunk-SL4G67AP.js";
|
|
528
531
|
import {
|
|
529
532
|
LSP_NAMESPACE_KEY,
|
|
530
533
|
getPiLensGlobalConfigPath,
|
|
531
534
|
resetWorkspaceTopology
|
|
532
|
-
} from "../chunk-
|
|
535
|
+
} from "../chunk-DLGJYQML.js";
|
|
533
536
|
import {
|
|
534
537
|
hashContentBytes,
|
|
535
538
|
hashFileBytes
|
|
@@ -549,7 +552,7 @@ import {
|
|
|
549
552
|
withBudget,
|
|
550
553
|
withDeadline,
|
|
551
554
|
writeFileAtomic
|
|
552
|
-
} from "../chunk-
|
|
555
|
+
} from "../chunk-EKQDQPX6.js";
|
|
553
556
|
import {
|
|
554
557
|
LENS_TOOL_NAMES,
|
|
555
558
|
TOOL_REGISTRY,
|
|
@@ -568,7 +571,7 @@ import {
|
|
|
568
571
|
resolveLensToolName,
|
|
569
572
|
toolRegistryEntryForMcp,
|
|
570
573
|
translateGuidanceToolNames
|
|
571
|
-
} from "../chunk-
|
|
574
|
+
} from "../chunk-P7EV5ISR.js";
|
|
572
575
|
import {
|
|
573
576
|
freshnessFromMtime
|
|
574
577
|
} from "../chunk-S26LC76R.js";
|
|
@@ -583,11 +586,11 @@ import {
|
|
|
583
586
|
nonNegativeIntEnv,
|
|
584
587
|
runLogCleanup,
|
|
585
588
|
setTurnContextSession
|
|
586
|
-
} from "../chunk-
|
|
589
|
+
} from "../chunk-HUWW77QY.js";
|
|
587
590
|
import "../chunk-LJDODBBZ.js";
|
|
588
591
|
import {
|
|
589
592
|
FactStore
|
|
590
|
-
} from "../chunk-
|
|
593
|
+
} from "../chunk-NHHS5T52.js";
|
|
591
594
|
import {
|
|
592
595
|
BoundedFifoMap,
|
|
593
596
|
BoundedLruCache,
|
|
@@ -606,12 +609,13 @@ import {
|
|
|
606
609
|
realpathOrResolve,
|
|
607
610
|
relativeInside,
|
|
608
611
|
resolveHostToolPath,
|
|
612
|
+
rootsOverlap,
|
|
609
613
|
toPosix,
|
|
610
614
|
toProjectRelativePath,
|
|
611
615
|
uriToDiskPath,
|
|
612
616
|
uriToPath,
|
|
613
617
|
walkUpDirs
|
|
614
|
-
} from "../chunk-
|
|
618
|
+
} from "../chunk-6MWX2J5H.js";
|
|
615
619
|
import "../chunk-NXL4FFQQ.js";
|
|
616
620
|
|
|
617
621
|
// dist/mcp/server.js
|
|
@@ -1660,10 +1664,10 @@ Original error: ${stderr}`;
|
|
|
1660
1664
|
excludeArgs: findNearestContaining(treeRoot, [".git"]) ? [] : sgExcludeArgsForProject(absolute)
|
|
1661
1665
|
};
|
|
1662
1666
|
}
|
|
1663
|
-
const
|
|
1667
|
+
const relative10 = path3.relative(treeRoot, absolute) || ".";
|
|
1664
1668
|
return {
|
|
1665
1669
|
cwd: treeRoot,
|
|
1666
|
-
scanArg:
|
|
1670
|
+
scanArg: relative10,
|
|
1667
1671
|
excludeArgs: sgExcludeArgsForProject(absolute)
|
|
1668
1672
|
};
|
|
1669
1673
|
}
|
|
@@ -1884,7 +1888,7 @@ function matchedFilePath(file) {
|
|
|
1884
1888
|
function recordAstGrepApply(matches, { lineage, toolCallId, sessionId } = {}) {
|
|
1885
1889
|
const bridge = getMutationBridge();
|
|
1886
1890
|
if (!bridge || matches.length === 0)
|
|
1887
|
-
return
|
|
1891
|
+
return;
|
|
1888
1892
|
const rangesByFile = /* @__PURE__ */ new Map();
|
|
1889
1893
|
for (const match of matches) {
|
|
1890
1894
|
const start = (match.range?.start?.line ?? 0) + 1;
|
|
@@ -1895,10 +1899,9 @@ function recordAstGrepApply(matches, { lineage, toolCallId, sessionId } = {}) {
|
|
|
1895
1899
|
else
|
|
1896
1900
|
rangesByFile.set(match.file, [[start, end]]);
|
|
1897
1901
|
}
|
|
1898
|
-
const accepted = [];
|
|
1899
1902
|
for (const [filePath, editRanges] of rangesByFile) {
|
|
1900
1903
|
const resolved = matchedFilePath(filePath);
|
|
1901
|
-
|
|
1904
|
+
bridge.recordMutation({
|
|
1902
1905
|
filePath: resolved,
|
|
1903
1906
|
kind: "edit",
|
|
1904
1907
|
editRanges,
|
|
@@ -1915,10 +1918,7 @@ function recordAstGrepApply(matches, { lineage, toolCallId, sessionId } = {}) {
|
|
|
1915
1918
|
// #4943: the calling session owns the deferred pass of what it rewrote.
|
|
1916
1919
|
...sessionId !== void 0 && { sessionId }
|
|
1917
1920
|
});
|
|
1918
|
-
if (recorded)
|
|
1919
|
-
accepted.push(resolved);
|
|
1920
1921
|
}
|
|
1921
|
-
return accepted;
|
|
1922
1922
|
}
|
|
1923
1923
|
function missingRootRefusal(options) {
|
|
1924
1924
|
return options?.sessionRoot === void 0 ? "ast_grep_replace refused: no session root to check the write against" : void 0;
|
|
@@ -1941,20 +1941,19 @@ async function applyRewrite(matches, options, write) {
|
|
|
1941
1941
|
if (refused.length > 0)
|
|
1942
1942
|
return { refused };
|
|
1943
1943
|
const before = /* @__PURE__ */ new Map();
|
|
1944
|
-
let appliedFiles = [];
|
|
1945
1944
|
const result = await writeSourceFile({
|
|
1946
1945
|
filePaths: files,
|
|
1947
1946
|
record: (exit) => {
|
|
1948
1947
|
const clean = exit.ok && exit.value.error === void 0;
|
|
1949
1948
|
const changed = clean ? files : files.filter((file) => hashOf(file) !== before.get(file));
|
|
1950
|
-
|
|
1949
|
+
recordAstGrepApply(matches.filter((match) => changed.includes(matchedFilePath(match.file))), options);
|
|
1951
1950
|
}
|
|
1952
1951
|
}, async () => {
|
|
1953
1952
|
for (const file of files)
|
|
1954
1953
|
before.set(file, hashOf(file));
|
|
1955
1954
|
return write();
|
|
1956
1955
|
});
|
|
1957
|
-
return { result
|
|
1956
|
+
return { result };
|
|
1958
1957
|
}
|
|
1959
1958
|
function extractDebugAst(raw) {
|
|
1960
1959
|
const lines = raw.split(/\r?\n/);
|
|
@@ -2116,7 +2115,6 @@ var AstGrepClient = class {
|
|
|
2116
2115
|
};
|
|
2117
2116
|
}
|
|
2118
2117
|
}
|
|
2119
|
-
const appliedFiles = [];
|
|
2120
2118
|
for (const scanPath of paths) {
|
|
2121
2119
|
let previewed = [];
|
|
2122
2120
|
if (apply) {
|
|
@@ -2127,8 +2125,7 @@ var AstGrepClient = class {
|
|
|
2127
2125
|
totalMatches: allMatches.length,
|
|
2128
2126
|
applied: false,
|
|
2129
2127
|
error: preCheck.error ?? "ast-grep preview failed",
|
|
2130
|
-
...preCheck.failure === "aborted" ? { aborted: true } : {}
|
|
2131
|
-
appliedFiles
|
|
2128
|
+
...preCheck.failure === "aborted" ? { aborted: true } : {}
|
|
2132
2129
|
};
|
|
2133
2130
|
}
|
|
2134
2131
|
if (preCheck.matches.length === 0) {
|
|
@@ -2136,8 +2133,7 @@ var AstGrepClient = class {
|
|
|
2136
2133
|
matches: [],
|
|
2137
2134
|
totalMatches: 0,
|
|
2138
2135
|
applied: false,
|
|
2139
|
-
stalePreview: true
|
|
2140
|
-
appliedFiles
|
|
2136
|
+
stalePreview: true
|
|
2141
2137
|
};
|
|
2142
2138
|
}
|
|
2143
2139
|
previewed = preCheck.matches;
|
|
@@ -2149,12 +2145,9 @@ var AstGrepClient = class {
|
|
|
2149
2145
|
matches: allMatches,
|
|
2150
2146
|
totalMatches: allMatches.length,
|
|
2151
2147
|
applied: false,
|
|
2152
|
-
error: outsideRootsText(applied.refused)
|
|
2153
|
-
appliedFiles
|
|
2148
|
+
error: outsideRootsText(applied.refused)
|
|
2154
2149
|
};
|
|
2155
2150
|
}
|
|
2156
|
-
if (applied !== null)
|
|
2157
|
-
appliedFiles.push(...applied.appliedFiles);
|
|
2158
2151
|
const result = applied === null ? await scan() : applied.result;
|
|
2159
2152
|
if (result.error) {
|
|
2160
2153
|
return {
|
|
@@ -2163,8 +2156,7 @@ var AstGrepClient = class {
|
|
|
2163
2156
|
applied: false,
|
|
2164
2157
|
error: result.error,
|
|
2165
2158
|
...result.aborted ? { aborted: true } : {},
|
|
2166
|
-
...result.writeStarted ? { writeStarted: true } : {}
|
|
2167
|
-
appliedFiles
|
|
2159
|
+
...result.writeStarted ? { writeStarted: true } : {}
|
|
2168
2160
|
};
|
|
2169
2161
|
}
|
|
2170
2162
|
allMatches.push(...result.matches);
|
|
@@ -2172,8 +2164,7 @@ var AstGrepClient = class {
|
|
|
2172
2164
|
return {
|
|
2173
2165
|
matches: allMatches,
|
|
2174
2166
|
totalMatches: allMatches.length,
|
|
2175
|
-
applied: apply
|
|
2176
|
-
appliedFiles
|
|
2167
|
+
applied: apply
|
|
2177
2168
|
};
|
|
2178
2169
|
}
|
|
2179
2170
|
/**
|
|
@@ -2450,7 +2441,6 @@ var AstGrepClient = class {
|
|
|
2450
2441
|
error: outsideRootsText(applied.refused)
|
|
2451
2442
|
};
|
|
2452
2443
|
}
|
|
2453
|
-
const { appliedFiles } = applied;
|
|
2454
2444
|
if (applied.result.error) {
|
|
2455
2445
|
return {
|
|
2456
2446
|
matches: [],
|
|
@@ -2458,8 +2448,7 @@ var AstGrepClient = class {
|
|
|
2458
2448
|
truncated: false,
|
|
2459
2449
|
applied: false,
|
|
2460
2450
|
error: applied.result.error,
|
|
2461
|
-
writeStarted: true
|
|
2462
|
-
appliedFiles
|
|
2451
|
+
writeStarted: true
|
|
2463
2452
|
};
|
|
2464
2453
|
}
|
|
2465
2454
|
return {
|
|
@@ -2467,8 +2456,7 @@ var AstGrepClient = class {
|
|
|
2467
2456
|
totalMatches: preCheck.totalMatches,
|
|
2468
2457
|
truncated: preCheck.truncated,
|
|
2469
2458
|
applied: true,
|
|
2470
|
-
error: void 0
|
|
2471
|
-
appliedFiles
|
|
2459
|
+
error: void 0
|
|
2472
2460
|
};
|
|
2473
2461
|
}
|
|
2474
2462
|
/**
|
|
@@ -3220,28 +3208,28 @@ async function buildBootstrapClients() {
|
|
|
3220
3208
|
}
|
|
3221
3209
|
}
|
|
3222
3210
|
const [ruffClient, biomeClient, knipClient, todoScanner, jscpdClient, depChecker, testRunnerClient, complexityClient, goClient, govulncheckClient, gitleaksClient, trivyClient, opengrepClient, rustClient, agentBehaviorClient2, deadCodeClients] = await Promise.all([
|
|
3223
|
-
load("ruff", async () => new (await import("../chunk-
|
|
3224
|
-
load("biome", async () => new (await import("../chunk-
|
|
3225
|
-
load("knip", async () => new (await import("../chunk-
|
|
3226
|
-
load("todo", async () => new (await import("../chunk-
|
|
3227
|
-
load("jscpd", async () => new (await import("../chunk-
|
|
3228
|
-
load("dependency-checker", async () => new (await import("../chunk-
|
|
3229
|
-
load("test-runner", async () => new (await import("../chunk-
|
|
3230
|
-
load("complexity", async () => new (await import("../chunk-
|
|
3211
|
+
load("ruff", async () => new (await import("../chunk-DNJJVKJZ.js")).RuffClient()),
|
|
3212
|
+
load("biome", async () => new (await import("../chunk-F7BFIENK.js")).BiomeClient()),
|
|
3213
|
+
load("knip", async () => new (await import("../chunk-KIQSNH3F.js")).KnipClient()),
|
|
3214
|
+
load("todo", async () => new (await import("../chunk-7JMEPY6P.js")).TodoScanner()),
|
|
3215
|
+
load("jscpd", async () => new (await import("../chunk-XRLZ75YY.js")).JscpdClient()),
|
|
3216
|
+
load("dependency-checker", async () => new (await import("../chunk-UWBD3JMH.js")).DependencyChecker()),
|
|
3217
|
+
load("test-runner", async () => new (await import("../chunk-7WAQ3K26.js")).TestRunnerClient()),
|
|
3218
|
+
load("complexity", async () => new (await import("../chunk-AFSG6YUB.js")).ComplexityClient()),
|
|
3231
3219
|
// The process-wide singleton, NOT a fresh instance (#2455 fix round 4,
|
|
3232
3220
|
// F2). `handleSessionStart` reads this object for its "Active tools"
|
|
3233
3221
|
// line while `resetGoAvailability` re-arms the singleton's latch; a
|
|
3234
3222
|
// second instance here meant the reset never reached the surface a
|
|
3235
3223
|
// user actually sees.
|
|
3236
|
-
load("go", async () => (await import("../chunk-
|
|
3237
|
-
load("govulncheck", async () => new (await import("../chunk-
|
|
3238
|
-
load("gitleaks", async () => new (await import("../chunk-
|
|
3239
|
-
load("trivy", async () => new (await import("../chunk-
|
|
3240
|
-
load("opengrep", async () => new (await import("../chunk-
|
|
3224
|
+
load("go", async () => (await import("../chunk-TFSBHRL2.js")).goClient),
|
|
3225
|
+
load("govulncheck", async () => new (await import("../chunk-3Z7Z3B7V.js")).GovulncheckClient()),
|
|
3226
|
+
load("gitleaks", async () => new (await import("../chunk-4E4OCW3L.js")).GitleaksClient()),
|
|
3227
|
+
load("trivy", async () => new (await import("../chunk-D3UQWOCB.js")).TrivyClient()),
|
|
3228
|
+
load("opengrep", async () => new (await import("../chunk-SJ2SR432.js")).OpengrepClient()),
|
|
3241
3229
|
// The process-wide singleton, for the same reason as "go" above.
|
|
3242
|
-
load("rust", async () => (await import("../chunk-
|
|
3243
|
-
load("agent-behavior", async () => (await import("../chunk-
|
|
3244
|
-
loadList("dead-code", async () => (await import("../chunk-
|
|
3230
|
+
load("rust", async () => (await import("../chunk-L3Q72QGQ.js")).rustClient),
|
|
3231
|
+
load("agent-behavior", async () => (await import("../chunk-ARTCVE6I.js")).agentBehaviorClient),
|
|
3232
|
+
loadList("dead-code", async () => (await import("../chunk-GNK2IHVG.js")).getDeadCodeClients())
|
|
3245
3233
|
]);
|
|
3246
3234
|
if (failures.length > 0)
|
|
3247
3235
|
await logBootstrapFailures(failures);
|
|
@@ -3327,7 +3315,7 @@ function resetAnalyzerBootstrapSessionState() {
|
|
|
3327
3315
|
}
|
|
3328
3316
|
|
|
3329
3317
|
// dist/clients/formatters-lazy.js
|
|
3330
|
-
var lazyFormatters = createLazyImport(() => import("../chunk-
|
|
3318
|
+
var lazyFormatters = createLazyImport(() => import("../chunk-UARVPNAU.js"));
|
|
3331
3319
|
function warmFormatters() {
|
|
3332
3320
|
return lazyFormatters.get();
|
|
3333
3321
|
}
|
|
@@ -3796,6 +3784,15 @@ var RuntimeCoordinator = class {
|
|
|
3796
3784
|
* widening stays separate because it outlives a blocked call's attribution.
|
|
3797
3785
|
*/
|
|
3798
3786
|
_readWidenings = new BoundedLruCache(TOOL_CALL_ATTRIBUTION_CAPACITY);
|
|
3787
|
+
/**
|
|
3788
|
+
* #5551: per tool call, the files `recordMutationOutcome` recorded for it
|
|
3789
|
+
* while its tool ran. Its `tool_result` takes the set and dispatches each
|
|
3790
|
+
* file, whatever the tool is named, so no producer reports its own writes
|
|
3791
|
+
* and no table admits it by name. A call with no `tool_result` (a blocked
|
|
3792
|
+
* call, a tool run outside pi) is evicted by the same bound as an
|
|
3793
|
+
* attribution; a set holds the files of one call.
|
|
3794
|
+
*/
|
|
3795
|
+
_callWrites = new BoundedLruCache(TOOL_CALL_ATTRIBUTION_CAPACITY);
|
|
3799
3796
|
/**
|
|
3800
3797
|
* #5120: a call whose `edits` were rewritten to the matched subset of a
|
|
3801
3798
|
* partly matching batch, keyed by that call's own `event.input`. pi hands
|
|
@@ -3911,6 +3908,7 @@ var RuntimeCoordinator = class {
|
|
|
3911
3908
|
this._pendingDeferredMutations.clear();
|
|
3912
3909
|
this._toolCallAttributions.clear();
|
|
3913
3910
|
this._readWidenings.clear();
|
|
3911
|
+
this._callWrites.clear();
|
|
3914
3912
|
this._lspReadWarmState.clear();
|
|
3915
3913
|
this._pendingInlineBlockers.clear();
|
|
3916
3914
|
this._owedRunners.clear();
|
|
@@ -5538,6 +5536,39 @@ var RuntimeCoordinator = class {
|
|
|
5538
5536
|
this._readWidenings.delete(toolCallId);
|
|
5539
5537
|
return widening;
|
|
5540
5538
|
}
|
|
5539
|
+
/**
|
|
5540
|
+
* #5551: `recordMutationOutcome` recorded `filePath` for this call. The
|
|
5541
|
+
* id is the producer's raw one (the tool's `execute` argument); the
|
|
5542
|
+
* `tool_result` reads it as `resolveToolCallCorrelationId` spells it, so
|
|
5543
|
+
* both sides key by `sanitizeCorrelationId` (a pi-ai `call_id|item_id`
|
|
5544
|
+
* host id differs raw versus sanitized; review r1 F1 on #5635). The
|
|
5545
|
+
* result is a no-op on an id already sanitized.
|
|
5546
|
+
*/
|
|
5547
|
+
noteCallWrite(rawToolCallId, filePath) {
|
|
5548
|
+
const toolCallId = sanitizeCorrelationId(rawToolCallId);
|
|
5549
|
+
if (toolCallId === void 0)
|
|
5550
|
+
return;
|
|
5551
|
+
const written = this._callWrites.get(toolCallId);
|
|
5552
|
+
if (written)
|
|
5553
|
+
written.add(filePath);
|
|
5554
|
+
else
|
|
5555
|
+
this._callWrites.set(toolCallId, /* @__PURE__ */ new Set([filePath]));
|
|
5556
|
+
}
|
|
5557
|
+
/** #5551: the files recorded for this call so far, in record order. */
|
|
5558
|
+
peekCallWrites(rawToolCallId) {
|
|
5559
|
+
const toolCallId = sanitizeCorrelationId(rawToolCallId);
|
|
5560
|
+
if (toolCallId === void 0)
|
|
5561
|
+
return [];
|
|
5562
|
+
return [...this._callWrites.get(toolCallId) ?? []];
|
|
5563
|
+
}
|
|
5564
|
+
/** #5551: one-shot claim of a call's files, as with an attribution. */
|
|
5565
|
+
takeCallWrites(rawToolCallId) {
|
|
5566
|
+
const written = this.peekCallWrites(rawToolCallId);
|
|
5567
|
+
const toolCallId = sanitizeCorrelationId(rawToolCallId);
|
|
5568
|
+
if (toolCallId !== void 0)
|
|
5569
|
+
this._callWrites.delete(toolCallId);
|
|
5570
|
+
return written;
|
|
5571
|
+
}
|
|
5541
5572
|
/** #3523: see {@link ToolCallAttribution.editInPlace}. */
|
|
5542
5573
|
markToolCallEditInPlace(toolCallId) {
|
|
5543
5574
|
const attribution = this._toolCallAttributions.get(toolCallId);
|
|
@@ -6442,8 +6473,8 @@ async function igniteDominantLanguageWarm(cwd, runtime, sessionGeneration, dbg)
|
|
|
6442
6473
|
if (!runtime.isCurrentSession(sessionGeneration))
|
|
6443
6474
|
return;
|
|
6444
6475
|
const lspService = (await loadLspService()).getLSPService();
|
|
6445
|
-
const { collectSourceFilesAsync } = await import("../chunk-
|
|
6446
|
-
const { CODE_KINDS, detectFileKind: detectFileKind2 } = await import("../chunk-
|
|
6476
|
+
const { collectSourceFilesAsync } = await import("../chunk-WH6O4IFD.js");
|
|
6477
|
+
const { CODE_KINDS, detectFileKind: detectFileKind2 } = await import("../chunk-KXKM2DFP.js");
|
|
6447
6478
|
const files = await collectSourceFilesAsync(cwd, {
|
|
6448
6479
|
inspectGeneratedHeaders: false
|
|
6449
6480
|
});
|
|
@@ -6517,7 +6548,7 @@ function scheduleManagedToolRefresh(dbg, rulePack) {
|
|
|
6517
6548
|
managedToolRefreshTimer = void 0;
|
|
6518
6549
|
void (async () => {
|
|
6519
6550
|
try {
|
|
6520
|
-
const refresh = await import("../chunk-
|
|
6551
|
+
const refresh = await import("../chunk-HKRESBMC.js");
|
|
6521
6552
|
const outcome = await refresh.runManagedToolRefresh(void 0, {
|
|
6522
6553
|
rulePack
|
|
6523
6554
|
});
|
|
@@ -6567,7 +6598,7 @@ function scanOneTodoFile(scanner, filePath, items) {
|
|
|
6567
6598
|
async function collectTodoBaselineItems(scanner, analysisRoot, stillCurrent) {
|
|
6568
6599
|
const items = [];
|
|
6569
6600
|
try {
|
|
6570
|
-
const { getSourceFilesAsync } = await import("../chunk-
|
|
6601
|
+
const { getSourceFilesAsync } = await import("../chunk-YV7XVYSJ.js");
|
|
6571
6602
|
const files = await getSourceFilesAsync(analysisRoot, true);
|
|
6572
6603
|
if (!stillCurrent())
|
|
6573
6604
|
return items;
|
|
@@ -6596,7 +6627,7 @@ async function buildOrRefreshWordIndex(args) {
|
|
|
6596
6627
|
const snapshot = loadProjectSnapshot(snapshotRoot);
|
|
6597
6628
|
const snapshotLoadMs = Date.now() - snapshotLoadStartMs;
|
|
6598
6629
|
if (snapshot?.wordIndex) {
|
|
6599
|
-
const { deserializeWordIndex, refreshWordIndexIncrementally, countWordIndexPostingEntries: countWordIndexPostingEntries2, estimateWordIndexResidentBytes: estimateWordIndexResidentBytes2, notifyWordIndexPublished: notifyWordIndexPublished2 } = await import("../chunk-
|
|
6630
|
+
const { deserializeWordIndex, refreshWordIndexIncrementally, countWordIndexPostingEntries: countWordIndexPostingEntries2, estimateWordIndexResidentBytes: estimateWordIndexResidentBytes2, notifyWordIndexPublished: notifyWordIndexPublished2 } = await import("../chunk-BJGWP4UX.js");
|
|
6600
6631
|
const deserializeStartMs = Date.now();
|
|
6601
6632
|
const index = deserializeWordIndex(snapshot.wordIndex);
|
|
6602
6633
|
const deserializeMs = Date.now() - deserializeStartMs;
|
|
@@ -6669,7 +6700,7 @@ async function buildOrRefreshWordIndex(args) {
|
|
|
6669
6700
|
}
|
|
6670
6701
|
}
|
|
6671
6702
|
}
|
|
6672
|
-
const { buildWordIndexAsync, collectWordIndexDocs, countWordIndexPostingEntries, estimateWordIndexResidentBytes, notifyWordIndexPublished } = await import("../chunk-
|
|
6703
|
+
const { buildWordIndexAsync, collectWordIndexDocs, countWordIndexPostingEntries, estimateWordIndexResidentBytes, notifyWordIndexPublished } = await import("../chunk-BJGWP4UX.js");
|
|
6673
6704
|
const docs = await collectWordIndexDocs(analysisRoot, () => runtime.isCurrentSession(sessionGeneration), rebuildPreflightFiles);
|
|
6674
6705
|
if (!runtime.isCurrentSession(sessionGeneration))
|
|
6675
6706
|
return;
|
|
@@ -7048,9 +7079,9 @@ function scheduleStartupScansWithClients(deps, runtime, sessionGeneration, analy
|
|
|
7048
7079
|
});
|
|
7049
7080
|
let callGraphIdentity;
|
|
7050
7081
|
const callGraphTask = runTask("call-graph", async () => {
|
|
7051
|
-
const { FactStore: FactStore2 } = await import("../chunk-
|
|
7052
|
-
const { buildOrUpdateGraph, extractSymbolsAndRefsFromGraph, getReviewGraphCacheIdentity } = await import("../chunk-
|
|
7053
|
-
const { buildCallGraph, saveCallGraph, loadCallGraph: loadCallGraph2 } = await import("../chunk-
|
|
7082
|
+
const { FactStore: FactStore2 } = await import("../chunk-MKQFSW2Q.js");
|
|
7083
|
+
const { buildOrUpdateGraph, extractSymbolsAndRefsFromGraph, getReviewGraphCacheIdentity } = await import("../chunk-2XALJI2K.js");
|
|
7084
|
+
const { buildCallGraph, saveCallGraph, loadCallGraph: loadCallGraph2 } = await import("../chunk-HERQPNY6.js");
|
|
7054
7085
|
if (!runtime.isCurrentSession(sessionGeneration))
|
|
7055
7086
|
return;
|
|
7056
7087
|
const startMs = Date.now();
|
|
@@ -7091,7 +7122,7 @@ function scheduleStartupScansWithClients(deps, runtime, sessionGeneration, analy
|
|
|
7091
7122
|
return;
|
|
7092
7123
|
if (!runtime.callGraph)
|
|
7093
7124
|
return;
|
|
7094
|
-
const { buildCodebaseModel, saveCodebaseModel, DEFAULT_CODEBASE_MODEL_TOKEN_BUDGET } = await import("../chunk-
|
|
7125
|
+
const { buildCodebaseModel, saveCodebaseModel, DEFAULT_CODEBASE_MODEL_TOKEN_BUDGET } = await import("../chunk-GFCPPCNR.js");
|
|
7095
7126
|
if (!callGraphIdentity)
|
|
7096
7127
|
return;
|
|
7097
7128
|
const model = buildCodebaseModel(runtime.callGraph, analysisRoot, DEFAULT_CODEBASE_MODEL_TOKEN_BUDGET, callGraphIdentity);
|
|
@@ -7300,8 +7331,8 @@ async function handleSessionStart(deps) {
|
|
|
7300
7331
|
try {
|
|
7301
7332
|
warmupDbg("warmup: starting background warmup");
|
|
7302
7333
|
const scanContextStartedAt = Date.now();
|
|
7303
|
-
const startupScanModule = await import("../chunk-
|
|
7304
|
-
const languageProfileModule = await import("../chunk-
|
|
7334
|
+
const startupScanModule = await import("../chunk-CDAJQBKJ.js");
|
|
7335
|
+
const languageProfileModule = await import("../chunk-OHTHVILU.js");
|
|
7305
7336
|
const warmupSnapshotRoot = resolveSnapshotRoot(warmupCwd);
|
|
7306
7337
|
const cachedSnapshot = loadProjectSnapshot(warmupSnapshotRoot);
|
|
7307
7338
|
warmupOwnSnapshotRead = cachedSnapshot ? {
|
|
@@ -8044,7 +8075,7 @@ async function boundedLspCall(call, deps) {
|
|
|
8044
8075
|
const remainingMs = deps.deadlineAt !== void 0 ? deps.deadlineAt - Date.now() : void 0;
|
|
8045
8076
|
if (remainingMs !== void 0 && remainingMs <= 0)
|
|
8046
8077
|
return void 0;
|
|
8047
|
-
const inner = bounded(call().then((value) => ({ value })), {
|
|
8078
|
+
const inner = bounded(() => call().then((value) => ({ value })), {
|
|
8048
8079
|
// Always the FULL per-trip budget -- never clamped to the loop's own
|
|
8049
8080
|
// residual. The residual is enforced below, off the ledger.
|
|
8050
8081
|
ms: deps.pullTimeoutMs,
|
|
@@ -9029,6 +9060,22 @@ function splitBlockerSections(blockerContent, blockingFiles, cwd) {
|
|
|
9029
9060
|
}
|
|
9030
9061
|
return { sections, unowned };
|
|
9031
9062
|
}
|
|
9063
|
+
var TEXT_LEVEL = 1 / 8;
|
|
9064
|
+
var SCOPE_NEUTRAL_COMMANDS = [
|
|
9065
|
+
"echo",
|
|
9066
|
+
"printf",
|
|
9067
|
+
"tail",
|
|
9068
|
+
"head",
|
|
9069
|
+
"cat",
|
|
9070
|
+
"grep",
|
|
9071
|
+
"wc",
|
|
9072
|
+
"true"
|
|
9073
|
+
];
|
|
9074
|
+
var READ_ONLY_COMMANDS = [
|
|
9075
|
+
...SCOPE_NEUTRAL_COMMANDS,
|
|
9076
|
+
"ls",
|
|
9077
|
+
"pwd"
|
|
9078
|
+
];
|
|
9032
9079
|
function isTurnEndFindingsCache(value) {
|
|
9033
9080
|
if (!value || typeof value !== "object")
|
|
9034
9081
|
return false;
|
|
@@ -9668,14 +9715,13 @@ function render(kept, ctx) {
|
|
|
9668
9715
|
report += ` \u2026 and ${kept.findings.length - findings.length} more
|
|
9669
9716
|
`;
|
|
9670
9717
|
}
|
|
9718
|
+
const callSites = kept.findings.flatMap((f) => {
|
|
9719
|
+
const callSite = f.trace.find((t) => t.filename)?.filename;
|
|
9720
|
+
return callSite === void 0 ? [] : [callSite];
|
|
9721
|
+
});
|
|
9671
9722
|
advisorySections.push({
|
|
9672
9723
|
part: report,
|
|
9673
|
-
cites: [
|
|
9674
|
-
...new Set(kept.findings.flatMap((f) => {
|
|
9675
|
-
const callSite = f.trace.find((t) => t.filename)?.filename;
|
|
9676
|
-
return callSite === void 0 ? [] : [callSite];
|
|
9677
|
-
}))
|
|
9678
|
-
]
|
|
9724
|
+
cites: [.../* @__PURE__ */ new Set([...callSites, ...goModuleFiles(ctx.cwd)])]
|
|
9679
9725
|
});
|
|
9680
9726
|
}
|
|
9681
9727
|
return {
|
|
@@ -9683,6 +9729,10 @@ function render(kept, ctx) {
|
|
|
9683
9729
|
dispositionSuppressed: { govulncheck: kept.suppressed }
|
|
9684
9730
|
};
|
|
9685
9731
|
}
|
|
9732
|
+
function goModuleFiles(cwd) {
|
|
9733
|
+
const goFiles = existingDependencyManifests(cwd).flatMap((file) => /[\\/]go\.(?:mod|sum)$/.test(file) ? [file] : []);
|
|
9734
|
+
return goFiles.some((file) => /[\\/]go\.mod$/.test(file)) ? goFiles : [];
|
|
9735
|
+
}
|
|
9686
9736
|
var govulncheckLane = {
|
|
9687
9737
|
collect,
|
|
9688
9738
|
gate,
|
|
@@ -10255,7 +10305,7 @@ async function runPersistentReverify(args) {
|
|
|
10255
10305
|
}
|
|
10256
10306
|
let touchedResult;
|
|
10257
10307
|
try {
|
|
10258
|
-
touchedResult = await bounded(args.lspService.touchFile(entry.filePath, content, {
|
|
10308
|
+
touchedResult = await bounded(() => args.lspService.touchFile(entry.filePath, content, {
|
|
10259
10309
|
diagnostics: "document",
|
|
10260
10310
|
collectDiagnostics: true,
|
|
10261
10311
|
source: TOUCH_SOURCE,
|
|
@@ -10282,15 +10332,17 @@ async function runPersistentReverify(args) {
|
|
|
10282
10332
|
}
|
|
10283
10333
|
touched += 1;
|
|
10284
10334
|
const unanswered = [];
|
|
10285
|
-
const enriched = await bounded(enrichFileFromLsp(args.cwd, buildArgs, { filePath: entry.filePath, cached: touchedResult.diags }, {
|
|
10335
|
+
const enriched = await bounded((signal) => enrichFileFromLsp(args.cwd, buildArgs, { filePath: entry.filePath, cached: touchedResult.diags }, {
|
|
10286
10336
|
lspService: args.lspService,
|
|
10287
10337
|
pullTimeoutMs: 2e3,
|
|
10288
10338
|
deadlineAt,
|
|
10289
|
-
|
|
10339
|
+
signal,
|
|
10290
10340
|
site: { hook: "turn_end", label: "persistent_reverify" },
|
|
10291
10341
|
unanswered
|
|
10292
10342
|
}), {
|
|
10293
10343
|
ms: Math.max(250, deadlineAt - Date.now()),
|
|
10344
|
+
// The hook's own signal is the bound's second half; the thunk's
|
|
10345
|
+
// `signal` above is what cancels the enrichment's requests.
|
|
10294
10346
|
signal: args.signal,
|
|
10295
10347
|
hook: "turn_end",
|
|
10296
10348
|
label: "persistent_reverify_enrich"
|
|
@@ -12499,11 +12551,11 @@ ${lines.join("\n")}`;
|
|
|
12499
12551
|
const resolvedDeferralKeys = /* @__PURE__ */ new Set();
|
|
12500
12552
|
const heldDeferred = [];
|
|
12501
12553
|
const boundPersisted = (entries, label) => {
|
|
12502
|
-
const
|
|
12503
|
-
if (
|
|
12554
|
+
const cappedTargets = boundDeferredTargets(entries, TEST_RUNNER_MAX_PERSISTED_TARGETS, isThisSession);
|
|
12555
|
+
if (cappedTargets.length !== entries.length) {
|
|
12504
12556
|
dbg(`turn_end: ${label} test target list held ${entries.length} entries, bounded to the newest ${TEST_RUNNER_MAX_PERSISTED_TARGETS} (oldest foreign-session rows dropped)`);
|
|
12505
12557
|
}
|
|
12506
|
-
return
|
|
12558
|
+
return cappedTargets;
|
|
12507
12559
|
};
|
|
12508
12560
|
const writeTestFindings = (record, ownDeferred) => {
|
|
12509
12561
|
const live = cacheManager2.readCache("test-runner-findings", cwd)?.data;
|
|
@@ -13040,8 +13092,8 @@ ${lines.join("\n")}`;
|
|
|
13040
13092
|
} else {
|
|
13041
13093
|
const callGraphStart = Date.now();
|
|
13042
13094
|
try {
|
|
13043
|
-
const { impact, formatImpact, parseSymbolKey } = await import("../chunk-
|
|
13044
|
-
const { callGraphImpactToProjectDiagnostics } = await import("../chunk-
|
|
13095
|
+
const { impact, formatImpact, parseSymbolKey } = await import("../chunk-HERQPNY6.js");
|
|
13096
|
+
const { callGraphImpactToProjectDiagnostics } = await import("../chunk-AOEVZXR6.js");
|
|
13045
13097
|
const impactLines = [];
|
|
13046
13098
|
let callGraphDispositionSuppressed = 0;
|
|
13047
13099
|
const impactFindings = [];
|
|
@@ -13143,11 +13195,11 @@ ${impactLines.join("\n")}`;
|
|
|
13143
13195
|
if (persistedReport?.files?.some((entry) => entry.origin === "deferred")) {
|
|
13144
13196
|
const reverifyLspService = getLSPService();
|
|
13145
13197
|
if (reverifyLspService) {
|
|
13146
|
-
reverify = await bounded(runPersistentReverify({
|
|
13198
|
+
reverify = await bounded((signal) => runPersistentReverify({
|
|
13147
13199
|
report: persistedReport,
|
|
13148
13200
|
cwd,
|
|
13149
13201
|
lspService: reverifyLspService,
|
|
13150
|
-
signal
|
|
13202
|
+
signal
|
|
13151
13203
|
}), {
|
|
13152
13204
|
ms: HOOK_WALL_BUDGET_MS.turn_end,
|
|
13153
13205
|
signal: getAmbientAbortSignal(),
|
|
@@ -14662,7 +14714,8 @@ function toEntry(sym, normalizedPath, graph, maxRefs, projectRoot, fileKind) {
|
|
|
14662
14714
|
const complexity = typeof metadata.cyclomaticComplexity === "number" ? metadata.cyclomaticComplexity : void 0;
|
|
14663
14715
|
const fanout = graph ? (graph.edgesByFrom.get(symbolNodeId) ?? []).filter((edge) => edge.kind === "calls").length : void 0;
|
|
14664
14716
|
const nonPublic = sym.visibility === "private" || sym.visibility === "protected";
|
|
14665
|
-
const
|
|
14717
|
+
const answer = sym.isExported === true || node?.exported === true ? true : sym.isExported === void 0 && node?.exported === void 0 ? void 0 : false;
|
|
14718
|
+
const exported = answer === void 0 ? void 0 : answer && !nonPublic;
|
|
14666
14719
|
const flags = [];
|
|
14667
14720
|
if (sym.isAsync)
|
|
14668
14721
|
flags.push("async");
|
|
@@ -14678,7 +14731,7 @@ function toEntry(sym, normalizedPath, graph, maxRefs, projectRoot, fileKind) {
|
|
|
14678
14731
|
kind: sym.kind,
|
|
14679
14732
|
startLine,
|
|
14680
14733
|
endLine: endLine2,
|
|
14681
|
-
exported,
|
|
14734
|
+
...exported === void 0 ? {} : { exported },
|
|
14682
14735
|
...sym.visibility ? { visibility: sym.visibility } : {},
|
|
14683
14736
|
...sym.decorators?.length ? { decorators: sym.decorators } : {},
|
|
14684
14737
|
signature: sym.signature,
|
|
@@ -14737,7 +14790,8 @@ function projectModuleReport(report, projection) {
|
|
|
14737
14790
|
return {
|
|
14738
14791
|
...report,
|
|
14739
14792
|
api: report.api.map(stripEntryMetrics),
|
|
14740
|
-
internal: report.internal.map(stripEntryMetrics)
|
|
14793
|
+
internal: report.internal.map(stripEntryMetrics),
|
|
14794
|
+
...report.unclassified ? { unclassified: report.unclassified.map(stripEntryMetrics) } : {}
|
|
14741
14795
|
};
|
|
14742
14796
|
}
|
|
14743
14797
|
var PRESET_AXES = {
|
|
@@ -14852,7 +14906,7 @@ function blastReadArgs(graph, normalizedFile) {
|
|
|
14852
14906
|
return { path: normalizedFile, offset: 1, limit };
|
|
14853
14907
|
}
|
|
14854
14908
|
async function computeBlastRadius(graph, normalizedPath, projectRoot, maxDepth) {
|
|
14855
|
-
const { computeTransitiveImpact } = await import("../chunk-
|
|
14909
|
+
const { computeTransitiveImpact } = await import("../chunk-BWGNVM33.js");
|
|
14856
14910
|
const result = computeTransitiveImpact(graph, normalizedPath, { maxDepth });
|
|
14857
14911
|
const byFile = /* @__PURE__ */ new Map();
|
|
14858
14912
|
for (const hit of result.hits) {
|
|
@@ -15469,7 +15523,7 @@ async function moduleReport(file, cwd, options) {
|
|
|
15469
15523
|
let callGraphIdentity;
|
|
15470
15524
|
let revisionDriftNote;
|
|
15471
15525
|
try {
|
|
15472
|
-
const { getCachedReviewGraph, getReviewGraphCacheIdentity, getReviewGraphSizeSkipVerdict, getReviewGraphRevisionDrift, formatReviewGraphRevisionDriftNote: formatReviewGraphRevisionDriftNote2 } = await import("../chunk-
|
|
15526
|
+
const { getCachedReviewGraph, getReviewGraphCacheIdentity, getReviewGraphSizeSkipVerdict, getReviewGraphRevisionDrift, formatReviewGraphRevisionDriftNote: formatReviewGraphRevisionDriftNote2 } = await import("../chunk-2XALJI2K.js");
|
|
15473
15527
|
graph = getCachedReviewGraph(cwd);
|
|
15474
15528
|
graphFileCap = getReviewGraphSizeSkipVerdict(cwd)?.maxFileCount;
|
|
15475
15529
|
const drift = graph ? getReviewGraphRevisionDrift(cwd) : void 0;
|
|
@@ -15490,8 +15544,17 @@ async function moduleReport(file, cwd, options) {
|
|
|
15490
15544
|
const entries = outlineSymbols.map((sym) => toEntry(sym, normalizedPath, graph, maxRefs, cwd, kind));
|
|
15491
15545
|
const topLevel = nestEntries(entries);
|
|
15492
15546
|
annotateMiddleMan(entries, content, languageId);
|
|
15493
|
-
const api =
|
|
15494
|
-
const internal =
|
|
15547
|
+
const api = [];
|
|
15548
|
+
const internal = [];
|
|
15549
|
+
const unclassified = [];
|
|
15550
|
+
for (const entry of topLevel) {
|
|
15551
|
+
if (entry.exported === void 0)
|
|
15552
|
+
unclassified.push(entry);
|
|
15553
|
+
else if (entry.exported)
|
|
15554
|
+
api.push(entry);
|
|
15555
|
+
else
|
|
15556
|
+
internal.push(entry);
|
|
15557
|
+
}
|
|
15495
15558
|
const warnings = [...extractionWarnings ?? []];
|
|
15496
15559
|
if (revisionDriftNote)
|
|
15497
15560
|
warnings.push(revisionDriftNote);
|
|
@@ -15539,13 +15602,14 @@ async function moduleReport(file, cwd, options) {
|
|
|
15539
15602
|
lineCount: lineCount3,
|
|
15540
15603
|
summary: {
|
|
15541
15604
|
imports: imports.external.length + imports.internal.length,
|
|
15542
|
-
exports: api.length,
|
|
15605
|
+
...unclassified.length > 0 && api.length + internal.length === 0 ? {} : { exports: api.length },
|
|
15543
15606
|
symbols: entries.length
|
|
15544
15607
|
},
|
|
15545
15608
|
imports,
|
|
15546
15609
|
...warnings.length > 0 ? { warnings } : {},
|
|
15547
15610
|
api,
|
|
15548
15611
|
internal,
|
|
15612
|
+
...unclassified.length > 0 ? { unclassified } : {},
|
|
15549
15613
|
callbacks,
|
|
15550
15614
|
callbackSupport: callbackSupportFor(languageId),
|
|
15551
15615
|
recommendedReads: rankRecommendedReads(entries, callbacks, 5, options?.focus),
|
|
@@ -15708,11 +15772,15 @@ function renderCompactModuleReport(report, options = {}) {
|
|
|
15708
15772
|
unavailable.push(provenanceLine(report, options.projection));
|
|
15709
15773
|
return unavailable.join("\n");
|
|
15710
15774
|
}
|
|
15711
|
-
const allEntries = [
|
|
15775
|
+
const allEntries = [
|
|
15776
|
+
...report.api,
|
|
15777
|
+
...report.internal,
|
|
15778
|
+
...report.unclassified ?? []
|
|
15779
|
+
];
|
|
15712
15780
|
const allRanges = allEntries.flatMap((e) => [e, ...e.members ?? []]);
|
|
15713
15781
|
const width = Math.max(5, ...allRanges.map((e) => `${e.startLine}-${e.endLine}`.length), ...report.callbacks.map((c) => `${c.startLine}-${c.endLine}`.length)) + 2;
|
|
15714
15782
|
const lines = [
|
|
15715
|
-
`${report.path} ${report.language ?? "?"} ${report.lineCount ?? "?"}L [${report.staleness}] \u2014 ${report.summary.symbols} symbols,
|
|
15783
|
+
`${report.path} ${report.language ?? "?"} ${report.lineCount ?? "?"}L [${report.staleness}] \u2014 ${report.summary.symbols} symbols, ` + (report.summary.exports === void 0 ? "" : `${report.summary.exports} exported, `) + `${report.summary.imports} imports${callbackSupportSuffix(report)}`
|
|
15716
15784
|
];
|
|
15717
15785
|
if (report.error)
|
|
15718
15786
|
lines.push(`INCOMPLETE: ${report.error}`);
|
|
@@ -15729,6 +15797,11 @@ function renderCompactModuleReport(report, options = {}) {
|
|
|
15729
15797
|
for (const entry of report.internal)
|
|
15730
15798
|
lines.push(...compactEntryLines(entry, width, " "));
|
|
15731
15799
|
}
|
|
15800
|
+
if (report.unclassified && report.unclassified.length > 0) {
|
|
15801
|
+
lines.push("SYMBOLS (visibility unknown):");
|
|
15802
|
+
for (const entry of report.unclassified)
|
|
15803
|
+
lines.push(...compactEntryLines(entry, width, " "));
|
|
15804
|
+
}
|
|
15732
15805
|
appendCallbacksSection(lines, report, width);
|
|
15733
15806
|
if (report.imports.external.length + report.imports.internal.length > 0) {
|
|
15734
15807
|
lines.push("IMPORTS:");
|
|
@@ -16380,7 +16453,7 @@ function roleFor(graph, filePath) {
|
|
|
16380
16453
|
return top.length > 0 ? top.map((s) => s.name).join(", ") : void 0;
|
|
16381
16454
|
}
|
|
16382
16455
|
async function computeHubs(graph, degrees, cwd, limit, focusTerms) {
|
|
16383
|
-
const { computeTransitiveImpact } = await import("../chunk-
|
|
16456
|
+
const { computeTransitiveImpact } = await import("../chunk-BWGNVM33.js");
|
|
16384
16457
|
const ranked = [...graph.fileNodes.entries()].map(([filePath, fileNodeId]) => ({
|
|
16385
16458
|
filePath,
|
|
16386
16459
|
fileNodeId,
|
|
@@ -16631,7 +16704,7 @@ function triggerBackgroundGraphBuild(cwd, deps) {
|
|
|
16631
16704
|
async function projectReport(cwd, options) {
|
|
16632
16705
|
const limit = clampLimit(options?.limit);
|
|
16633
16706
|
const focusTerms = normalizeFocus2(options?.focus);
|
|
16634
|
-
const { getCachedReviewGraph, getReviewGraphSizeSkipVerdict, getLastReviewGraphBuildAttempt, buildOrUpdateGraph, isGraphBuildInFlight, getReviewGraphRevisionDrift } = await import("../chunk-
|
|
16707
|
+
const { getCachedReviewGraph, getReviewGraphSizeSkipVerdict, getLastReviewGraphBuildAttempt, buildOrUpdateGraph, isGraphBuildInFlight, getReviewGraphRevisionDrift } = await import("../chunk-2XALJI2K.js");
|
|
16635
16708
|
let graph;
|
|
16636
16709
|
try {
|
|
16637
16710
|
graph = getCachedReviewGraph(cwd);
|
|
@@ -16654,7 +16727,7 @@ async function projectReport(cwd, options) {
|
|
|
16654
16727
|
};
|
|
16655
16728
|
}
|
|
16656
16729
|
const previousAttempt = getLastReviewGraphBuildAttempt(cwd);
|
|
16657
|
-
const { FactStore: FactStore2 } = await import("../chunk-
|
|
16730
|
+
const { FactStore: FactStore2 } = await import("../chunk-MKQFSW2Q.js");
|
|
16658
16731
|
const trigger = triggerBackgroundGraphBuild(cwd, {
|
|
16659
16732
|
buildOrUpdateGraph,
|
|
16660
16733
|
isGraphBuildInFlight,
|
|
@@ -17240,7 +17313,7 @@ async function symbolSearch(query, cwd, limit = 20, options = {}) {
|
|
|
17240
17313
|
warmLease.release();
|
|
17241
17314
|
}
|
|
17242
17315
|
const hits = results.map(toSymbolSearchHit);
|
|
17243
|
-
const { getCachedReviewGraph } = await import("../chunk-
|
|
17316
|
+
const { getCachedReviewGraph } = await import("../chunk-2XALJI2K.js");
|
|
17244
17317
|
const graph = getCachedReviewGraph(cwd);
|
|
17245
17318
|
if (graph)
|
|
17246
17319
|
annotateSymbolSearchHitsWithGraph(hits, centrality, graph);
|
|
@@ -17511,9 +17584,9 @@ async function isGlobEntry(resolved, cwd) {
|
|
|
17511
17584
|
return refusal.code === "ENOENT" || refusal.code === "ENOTDIR";
|
|
17512
17585
|
});
|
|
17513
17586
|
}
|
|
17514
|
-
function literalRoot(cwd,
|
|
17587
|
+
function literalRoot(cwd, relative10) {
|
|
17515
17588
|
let root = cwd;
|
|
17516
|
-
for (const segment of
|
|
17589
|
+
for (const segment of relative10.split("/")) {
|
|
17517
17590
|
if (hasGlobMagic(segment))
|
|
17518
17591
|
break;
|
|
17519
17592
|
root = path30.join(root, segment);
|
|
@@ -17525,11 +17598,11 @@ async function expandPathsEntry(entry, cwd, budget, options = {}) {
|
|
|
17525
17598
|
const absolute = path30.resolve(cwdAbsolute, entry);
|
|
17526
17599
|
if (!await isGlobEntry(absolute, cwdAbsolute))
|
|
17527
17600
|
return { entries: [absolute], root: cwdAbsolute };
|
|
17528
|
-
const
|
|
17529
|
-
if (
|
|
17601
|
+
const relative10 = relativeInside(cwdAbsolute, absolute);
|
|
17602
|
+
if (relative10 === void 0) {
|
|
17530
17603
|
return { entries: [], refusal: "outside", root: cwdAbsolute };
|
|
17531
17604
|
}
|
|
17532
|
-
const root = literalRoot(cwdAbsolute,
|
|
17605
|
+
const root = literalRoot(cwdAbsolute, relative10);
|
|
17533
17606
|
const { signal } = options;
|
|
17534
17607
|
const matcher = getProjectIgnoreMatcher(cwdAbsolute);
|
|
17535
17608
|
const policy = { ignoreMatcher: matcher };
|
|
@@ -17943,11 +18016,7 @@ function createAstGrepReplaceTool(astGrepClient2, captureLineage, getFlag) {
|
|
|
17943
18016
|
}
|
|
17944
18017
|
],
|
|
17945
18018
|
isError: true,
|
|
17946
|
-
|
|
17947
|
-
details: {
|
|
17948
|
-
stalePreview: true,
|
|
17949
|
-
appliedFiles: ruleResult.appliedFiles ?? []
|
|
17950
|
-
}
|
|
18019
|
+
details: { stalePreview: true }
|
|
17951
18020
|
};
|
|
17952
18021
|
}
|
|
17953
18022
|
if (ruleResult.error) {
|
|
@@ -17960,7 +18029,7 @@ function createAstGrepReplaceTool(astGrepClient2, captureLineage, getFlag) {
|
|
|
17960
18029
|
}
|
|
17961
18030
|
],
|
|
17962
18031
|
isError: true,
|
|
17963
|
-
details: {
|
|
18032
|
+
details: {}
|
|
17964
18033
|
};
|
|
17965
18034
|
}
|
|
17966
18035
|
const output2 = astGrepClient2.formatMatches(ruleResult.matches, !applyFlag, true, resultMaxItems);
|
|
@@ -17971,10 +18040,7 @@ function createAstGrepReplaceTool(astGrepClient2, captureLineage, getFlag) {
|
|
|
17971
18040
|
content: [{ type: "text", text: output2 }],
|
|
17972
18041
|
details: {
|
|
17973
18042
|
matchCount: ruleResult.matches.length,
|
|
17974
|
-
applied: applyFlag
|
|
17975
|
-
// #5239: the files the apply rewrote, for the `tool_result`
|
|
17976
|
-
// handler's dispatch.
|
|
17977
|
-
appliedFiles: ruleResult.appliedFiles ?? []
|
|
18043
|
+
applied: applyFlag
|
|
17978
18044
|
}
|
|
17979
18045
|
};
|
|
17980
18046
|
}
|
|
@@ -18004,9 +18070,7 @@ function createAstGrepReplaceTool(astGrepClient2, captureLineage, getFlag) {
|
|
|
18004
18070
|
return {
|
|
18005
18071
|
content: [{ type: "text", text: failureText(result) }],
|
|
18006
18072
|
isError: true,
|
|
18007
|
-
|
|
18008
|
-
// failed; they still dispatch, as the structural path's do.
|
|
18009
|
-
details: { appliedFiles: result.appliedFiles ?? [] }
|
|
18073
|
+
details: {}
|
|
18010
18074
|
};
|
|
18011
18075
|
}
|
|
18012
18076
|
const isDryRun = !applyFlag;
|
|
@@ -18027,10 +18091,7 @@ function createAstGrepReplaceTool(astGrepClient2, captureLineage, getFlag) {
|
|
|
18027
18091
|
matchCount: result.matches.length,
|
|
18028
18092
|
totalMatches: result.totalMatches,
|
|
18029
18093
|
truncated: result.truncated,
|
|
18030
|
-
applied: applyFlag
|
|
18031
|
-
// #5239: the files the apply rewrote, for the `tool_result`
|
|
18032
|
-
// handler's dispatch.
|
|
18033
|
-
appliedFiles: result.appliedFiles ?? []
|
|
18094
|
+
applied: applyFlag
|
|
18034
18095
|
}
|
|
18035
18096
|
};
|
|
18036
18097
|
}
|
|
@@ -19467,7 +19528,7 @@ import * as path38 from "node:path";
|
|
|
19467
19528
|
// dist/clients/out-of-band-changes.js
|
|
19468
19529
|
import { promises as fsp } from "node:fs";
|
|
19469
19530
|
import * as os6 from "node:os";
|
|
19470
|
-
import { basename as basename7, join as join18 } from "node:path";
|
|
19531
|
+
import { basename as basename7, join as join18, relative as relative7 } from "node:path";
|
|
19471
19532
|
|
|
19472
19533
|
// dist/clients/disk-changes.js
|
|
19473
19534
|
var DISK_CHANGE_ORIGINS = [
|
|
@@ -19815,6 +19876,8 @@ function demandsWalk(trigger, walk) {
|
|
|
19815
19876
|
return walk === "always" || trigger === "tool_result" && walk !== "interval";
|
|
19816
19877
|
}
|
|
19817
19878
|
var fingerprint = (stat) => `${stat.ino}:${stat.size}:${stat.mtimeMs}`;
|
|
19879
|
+
var fingerprintChangedAt = (print) => Number(print.slice(print.lastIndexOf(":") + 1));
|
|
19880
|
+
var isBelowRootConfig = (filePath) => BELOW_ROOT_CONFIG_FILE_NAMES.has(basename7(filePath));
|
|
19818
19881
|
function diffServerConfigs(root, before, after) {
|
|
19819
19882
|
return diffDeclarations(new Map([...before].map(([name, print]) => [join18(root, name), print])), new Map([...after].map(([name, print]) => [join18(root, name), print])));
|
|
19820
19883
|
}
|
|
@@ -19947,7 +20010,9 @@ async function walkDeclarations(root) {
|
|
|
19947
20010
|
if (entry.isDirectory()) {
|
|
19948
20011
|
if (!isExcludedDirName(entry.name))
|
|
19949
20012
|
queue.push(join18(dir, entry.name));
|
|
19950
|
-
} else if (entry.isFile() && DECLARATION_FILE.test(entry.name)
|
|
20013
|
+
} else if (entry.isFile() && (DECLARATION_FILE.test(entry.name) || // #5501 r3: a member manifest below the root. The root's own are
|
|
20014
|
+
// statted with the install stamp, so the walk skips them.
|
|
20015
|
+
dir !== root && BELOW_ROOT_CONFIG_FILE_NAMES.has(entry.name))) {
|
|
19951
20016
|
found.push(join18(dir, entry.name));
|
|
19952
20017
|
}
|
|
19953
20018
|
}
|
|
@@ -20020,6 +20085,27 @@ function diffDeclarations(before, after) {
|
|
|
20020
20085
|
changes.push({ filePath, type: 3 });
|
|
20021
20086
|
return changes;
|
|
20022
20087
|
}
|
|
20088
|
+
function firstLookFreshConfigs(root, rootConfigs, walked, since) {
|
|
20089
|
+
if (since === void 0 || since <= 0)
|
|
20090
|
+
return [];
|
|
20091
|
+
const floor = since - COARSE_MTIME_SLACK_MS;
|
|
20092
|
+
const fresh = [];
|
|
20093
|
+
for (const [name, print] of rootConfigs ?? [])
|
|
20094
|
+
if (fingerprintChangedAt(print) >= floor)
|
|
20095
|
+
fresh.push({ filePath: join18(root, name), type: 2 });
|
|
20096
|
+
for (const [filePath, print] of walked ?? [])
|
|
20097
|
+
if (isBelowRootConfig(filePath) && fingerprintChangedAt(print) >= floor)
|
|
20098
|
+
fresh.push({ filePath, type: 2 });
|
|
20099
|
+
return fresh;
|
|
20100
|
+
}
|
|
20101
|
+
function earliestOverlappingLaunch(root, clients) {
|
|
20102
|
+
const rootKey = normalizeMapKey(root);
|
|
20103
|
+
let earliest;
|
|
20104
|
+
for (const client of clients)
|
|
20105
|
+
if (rootsOverlap(normalizeMapKey(client.root), rootKey))
|
|
20106
|
+
earliest = earliest === void 0 ? client.spawnedAt : Math.min(earliest, client.spawnedAt);
|
|
20107
|
+
return earliest ?? 0;
|
|
20108
|
+
}
|
|
20023
20109
|
function lookForOutOfBandChanges(root, trigger, runtime, options = {}) {
|
|
20024
20110
|
if (options.signal?.aborted)
|
|
20025
20111
|
return Promise.resolve();
|
|
@@ -20111,10 +20197,17 @@ async function lookOnce(root, key, trigger, runtime, options, skipWalk) {
|
|
|
20111
20197
|
});
|
|
20112
20198
|
}
|
|
20113
20199
|
const installed = prior === void 0 ? firstLookSawInstall(install, options.since) : install.stamp !== prior.stamp;
|
|
20114
|
-
|
|
20200
|
+
const firstLookConfigs = prior === void 0 ? firstLookFreshConfigs(root, install.configs, observed?.declarations, options.since ?? (options.liveClients ? earliestOverlappingLaunch(root, options.liveClients()) : void 0)) : [];
|
|
20201
|
+
if (prior === void 0 && !installed && firstLookConfigs.length === 0)
|
|
20115
20202
|
return;
|
|
20116
|
-
const
|
|
20117
|
-
const
|
|
20203
|
+
const walkChanges = walkDue && !incomplete && declarations && prior?.declarations ? diffDeclarations(prior.declarations, declarations) : [];
|
|
20204
|
+
const changes = [];
|
|
20205
|
+
const configChanges = [
|
|
20206
|
+
...install.configs && prior?.configs ? diffServerConfigs(root, prior.configs, install.configs) : [],
|
|
20207
|
+
...firstLookConfigs
|
|
20208
|
+
];
|
|
20209
|
+
for (const change of walkChanges)
|
|
20210
|
+
(isBelowRootConfig(change.filePath) ? configChanges : changes).push(change);
|
|
20118
20211
|
if (!installed && changes.length === 0 && configChanges.length === 0)
|
|
20119
20212
|
return;
|
|
20120
20213
|
const at = Date.now();
|
|
@@ -20136,7 +20229,8 @@ async function lookOnce(root, key, trigger, runtime, options, skipWalk) {
|
|
|
20136
20229
|
trigger,
|
|
20137
20230
|
restarted,
|
|
20138
20231
|
// Which look produced this row: the root's FIRST look (no record yet,
|
|
20139
|
-
// so only
|
|
20232
|
+
// so only a live-client epoch can make it publish: `since`, #4532, or
|
|
20233
|
+
// `liveClients` for configs, #5501)
|
|
20140
20234
|
// or a later look compared against the recorded stamp. Both the
|
|
20141
20235
|
// session-cwd root and a live client's root write the same record,
|
|
20142
20236
|
// so this names the look, not the caller.
|
|
@@ -20147,8 +20241,10 @@ async function lookOnce(root, key, trigger, runtime, options, skipWalk) {
|
|
|
20147
20241
|
created: count(1),
|
|
20148
20242
|
changed: count(2),
|
|
20149
20243
|
deleted: count(3),
|
|
20150
|
-
// The server config files this look forwarded (#4532), by
|
|
20151
|
-
|
|
20244
|
+
// The server config files this look forwarded (#4532), by path from the
|
|
20245
|
+
// root: a member manifest below it (#5501 r3) is told apart by its
|
|
20246
|
+
// directory.
|
|
20247
|
+
configs: configChanges.map((change) => `${CHANGE_TYPE[change.type]}:${relative7(root, change.filePath).replaceAll("\\", "/")}`)
|
|
20152
20248
|
}
|
|
20153
20249
|
});
|
|
20154
20250
|
}
|
|
@@ -20317,7 +20413,8 @@ function createLspDiagnosticsTool(nextWriteIndex, onConfirmedNoBlockers, getServ
|
|
|
20317
20413
|
}
|
|
20318
20414
|
await lookForOutOfBandChanges(cwd, "tool_call", void 0, {
|
|
20319
20415
|
walk: "always",
|
|
20320
|
-
signal
|
|
20416
|
+
signal,
|
|
20417
|
+
liveClients: () => lspService.livePrimaryClientRoots?.() ?? []
|
|
20321
20418
|
});
|
|
20322
20419
|
await lspService.sweepDocumentDrift({ force: true, full: true });
|
|
20323
20420
|
if (Array.isArray(typedParams.paths) && typedParams.paths.length > 0) {
|
|
@@ -20589,8 +20686,13 @@ async function classifyEmptyResult(file, lspService) {
|
|
|
20589
20686
|
const snapshots = await lspService.getCapabilitySnapshots(file);
|
|
20590
20687
|
const tier = classifyCascadeWaitTier(lspService, file, snapshots);
|
|
20591
20688
|
return tier === "tier3-silent" ? "unconfirmed" : "clean";
|
|
20592
|
-
} catch {
|
|
20593
|
-
|
|
20689
|
+
} catch (cause) {
|
|
20690
|
+
recordDegradationOnce({
|
|
20691
|
+
kind: "lsp-empty-classification-failed",
|
|
20692
|
+
subject: file,
|
|
20693
|
+
reason: `the silent-on-clean classification of an empty answer failed (${cause instanceof Error ? cause.message : String(cause)}); the file reads unconfirmed, not clean`
|
|
20694
|
+
});
|
|
20695
|
+
return "unconfirmed";
|
|
20594
20696
|
}
|
|
20595
20697
|
}
|
|
20596
20698
|
async function primaryRootFallback(file, cwd) {
|
|
@@ -20599,20 +20701,14 @@ async function primaryRootFallback(file, cwd) {
|
|
|
20599
20701
|
return seen.find((fallback) => fallback.requiresProjectRoot);
|
|
20600
20702
|
}
|
|
20601
20703
|
async function resolveEmptyResult(file, lspService) {
|
|
20602
|
-
|
|
20603
|
-
const snapshots = await lspService.getCapabilitySnapshots(file);
|
|
20604
|
-
const tier = classifyCascadeWaitTier(lspService, file, snapshots);
|
|
20605
|
-
if (tier !== "tier3-silent") {
|
|
20606
|
-
return { confirmed: true, diagnostics: [] };
|
|
20607
|
-
}
|
|
20608
|
-
const syncDiagnostics = await attemptTsserverSyncDiagnostics(file, lspService);
|
|
20609
|
-
if (syncDiagnostics === void 0) {
|
|
20610
|
-
return { confirmed: false, diagnostics: [] };
|
|
20611
|
-
}
|
|
20612
|
-
return { confirmed: true, diagnostics: syncDiagnostics };
|
|
20613
|
-
} catch {
|
|
20704
|
+
if (await classifyEmptyResult(file, lspService) === "clean") {
|
|
20614
20705
|
return { confirmed: true, diagnostics: [] };
|
|
20615
20706
|
}
|
|
20707
|
+
const syncDiagnostics = await attemptTsserverSyncDiagnostics(file, lspService);
|
|
20708
|
+
if (syncDiagnostics === void 0) {
|
|
20709
|
+
return { confirmed: false, diagnostics: [] };
|
|
20710
|
+
}
|
|
20711
|
+
return { confirmed: true, diagnostics: syncDiagnostics };
|
|
20616
20712
|
}
|
|
20617
20713
|
function canTrustTouchConfirmation(file, serverScope, confirmedByTouch) {
|
|
20618
20714
|
return confirmedByTouch && (serverScope === "primary" || primaryServerId(file) !== "typescript");
|
|
@@ -23710,10 +23806,9 @@ function createModuleReportTool(getProjectRoot) {
|
|
|
23710
23806
|
if (isError || details?.available === false) {
|
|
23711
23807
|
return `module_report ${base} \u2014 unavailable`;
|
|
23712
23808
|
}
|
|
23713
|
-
const parts = [
|
|
23714
|
-
|
|
23715
|
-
`${details
|
|
23716
|
-
];
|
|
23809
|
+
const parts = [`${details?.symbols ?? 0} symbols`];
|
|
23810
|
+
if (details?.exports !== void 0)
|
|
23811
|
+
parts.push(`${details.exports} exports`);
|
|
23717
23812
|
if (details?.callbacks)
|
|
23718
23813
|
parts.push(`${details.callbacks} callbacks`);
|
|
23719
23814
|
const view = details?.view && details.view !== "summary-text" ? ` [${details.view}]` : "";
|
|
@@ -25469,14 +25564,7 @@ function createLspNavigationTool(getFlag, mutationDeps) {
|
|
|
25469
25564
|
let mutationContext;
|
|
25470
25565
|
let requestedApply = false;
|
|
25471
25566
|
const workspaceScopeAttribution = {};
|
|
25472
|
-
const finalize = (
|
|
25473
|
-
const payload = mutationContext?.acceptedFiles && mutationContext.acceptedFiles.length > 0 ? {
|
|
25474
|
-
...unreported,
|
|
25475
|
-
details: {
|
|
25476
|
-
...unreported.details,
|
|
25477
|
-
appliedFiles: [...mutationContext.acceptedFiles]
|
|
25478
|
-
}
|
|
25479
|
-
} : unreported;
|
|
25567
|
+
const finalize = (payload, meta) => {
|
|
25480
25568
|
if (payload.isError && requestedApply && mutationContext && ["rename", "rename_file", "executeCommand"].includes(meta.operation)) {
|
|
25481
25569
|
recordLspMutationOutcome(mutationContext, "failed");
|
|
25482
25570
|
}
|
|
@@ -25610,7 +25698,6 @@ function createLspNavigationTool(getFlag, mutationDeps) {
|
|
|
25610
25698
|
cwd,
|
|
25611
25699
|
sessionId: ctx.sessionManager?.getSessionId?.(),
|
|
25612
25700
|
correlationId: newLspMutationCorrelationId(_toolCallId),
|
|
25613
|
-
acceptedFiles: [],
|
|
25614
25701
|
// #4187 R4-1: the call whose `tool_call` licensed the paths it
|
|
25615
25702
|
// named; the workspace edit's other files (a rename's importers)
|
|
25616
25703
|
// are unlicensed, so they end an authorship instead of advancing it.
|