scip-query 0.19.6 → 0.19.8
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 +37 -0
- package/README.md +28 -15
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-2465DLHK.js +3 -0
- package/dist/{chunk-2CVXCGL4.js → chunk-24GTWJ3N.js} +2 -2
- package/dist/{chunk-XVJ3V7LM.js → chunk-2SNGN6U4.js} +2 -2
- package/dist/{chunk-FKGN4A4E.js → chunk-2U3OLUNJ.js} +2 -2
- package/dist/{chunk-UUJBLG6J.js → chunk-33KUO7CG.js} +2 -2
- package/dist/{chunk-N3SE646F.js → chunk-33XTHFKR.js} +2 -2
- package/dist/{chunk-WXAAURU7.js → chunk-3EDFLQ6A.js} +2 -2
- package/dist/chunk-3ZSJ3PWF.js +16 -0
- package/dist/{chunk-G4UQL4CP.js → chunk-43KC6EQZ.js} +2 -2
- package/dist/{chunk-NQLSSVOB.js → chunk-464PLI5O.js} +2 -2
- package/dist/chunk-46XGSFNI.js +2 -0
- package/dist/{chunk-NN4ZIRPK.js → chunk-47BU5Z4T.js} +2 -2
- package/dist/chunk-4BV4QAZJ.js +5 -0
- package/dist/chunk-4YTUWQ6M.js +18 -0
- package/dist/{chunk-LMFVTUW2.js → chunk-5ML2BNRH.js} +2 -2
- package/dist/{chunk-OP3MTFJR.js → chunk-5YLUDDAF.js} +2 -2
- package/dist/chunk-67QRR5YC.js +6 -0
- package/dist/{chunk-273W2U4Y.js → chunk-6GXYN7YA.js} +2 -2
- package/dist/{chunk-JELJLXEE.js → chunk-6M7RONVB.js} +2 -2
- package/dist/{chunk-MLGTCX56.js → chunk-7FT5Y65S.js} +2 -2
- package/dist/{chunk-F42A3AKG.js → chunk-7KYNAMMH.js} +2 -2
- package/dist/{chunk-VP542C25.js → chunk-7LSVMFX7.js} +2 -2
- package/dist/{chunk-YWB2EBNB.js → chunk-7QHY3H7P.js} +2 -2
- package/dist/{chunk-UQK5CRUK.js → chunk-7RAG65VK.js} +2 -2
- package/dist/{chunk-CYJM7CYF.js → chunk-7SWJEWJF.js} +2 -2
- package/dist/{chunk-47X75ZKH.js → chunk-7VCOXZH3.js} +2 -2
- package/dist/chunk-A2TNXAXO.js +8 -0
- package/dist/{chunk-TYQ76QHQ.js → chunk-A3QXWFBK.js} +2 -2
- package/dist/{chunk-S2GP3CU3.js → chunk-AA4UWRNL.js} +2 -2
- package/dist/{chunk-OBKDTVZ3.js → chunk-ACAM6O5R.js} +2 -2
- package/dist/chunk-AQOFWNQJ.js +1 -0
- package/dist/chunk-AZFUMCQB.js +2 -0
- package/dist/{chunk-IYAOX36F.js → chunk-BDOIKGDI.js} +2 -2
- package/dist/{chunk-7E3TH5ZN.js → chunk-BNXICU42.js} +2 -2
- package/dist/chunk-C5Q44Q5D.js +3 -0
- package/dist/{chunk-OQ2A4G2G.js → chunk-CTF2GDEX.js} +2 -2
- package/dist/chunk-DHEQMPLW.js +2 -0
- package/dist/{chunk-EVOC5I5I.js → chunk-DQBCO2UY.js} +2 -2
- package/dist/{chunk-YLVE3SXZ.js → chunk-DQGSM7RZ.js} +2 -2
- package/dist/chunk-E2LAW7SL.js +30 -0
- package/dist/chunk-E3HYEQO7.js +2 -0
- package/dist/chunk-E4NFOAD4.js +6 -0
- package/dist/chunk-E5HNT4X2.js +3 -0
- package/dist/{chunk-6XHTISLI.js → chunk-ELLMY7XJ.js} +2 -2
- package/dist/chunk-FD3HFKXR.js +5 -0
- package/dist/{chunk-RJHCPSZ7.js → chunk-FIJCV235.js} +2 -2
- package/dist/{chunk-KLVJABXA.js → chunk-FJ5UDTQF.js} +2 -2
- package/dist/{chunk-SHKZ7OVJ.js → chunk-GHKEJTCE.js} +2 -2
- package/dist/{chunk-JERWGHQT.js → chunk-GLZTVKAB.js} +3 -3
- package/dist/{chunk-A43URCQ3.js → chunk-GNC4JVAN.js} +2 -2
- package/dist/chunk-HIB452NU.js +949 -0
- package/dist/{chunk-U5CNPPTZ.js → chunk-HZYDQPNY.js} +2 -2
- package/dist/chunk-IF6FP6B2.js +66 -0
- package/dist/{chunk-CSTYYXKC.js → chunk-JAY7YWS3.js} +2 -2
- package/dist/{chunk-6XFC7PQ5.js → chunk-JHF3E4YM.js} +2 -2
- package/dist/chunk-JORHF5AL.js +108 -0
- package/dist/{chunk-QBYYWGAT.js → chunk-K2WO7XY7.js} +2 -2
- package/dist/chunk-KFZNKUNT.js +2 -0
- package/dist/{chunk-J7VT2CRB.js → chunk-KJ2IIBZN.js} +2 -2
- package/dist/{chunk-336DC5NJ.js → chunk-KKME5ZAI.js} +2 -2
- package/dist/chunk-KSGTULOS.js +9 -0
- package/dist/{chunk-E2ZXPB7J.js → chunk-KXDJAG4N.js} +3 -3
- package/dist/{chunk-Z2LHPIOM.js → chunk-L4S2A7BV.js} +2 -2
- package/dist/chunk-LP3ARJKF.js +8 -0
- package/dist/chunk-LSOR3LQG.js +3 -0
- package/dist/{chunk-FHCTEANE.js → chunk-MLFZP76A.js} +2 -2
- package/dist/{chunk-RBFFD4V2.js → chunk-MNSTUIDD.js} +2 -2
- package/dist/{chunk-3OIKRYU5.js → chunk-MSBDMFER.js} +2 -2
- package/dist/{chunk-7LABSJSR.js → chunk-MZZBAITE.js} +5 -5
- package/dist/{chunk-QQWOFXNW.js → chunk-NE3TZUCI.js} +2 -2
- package/dist/{chunk-JZNLMHWY.js → chunk-NTUMF2X3.js} +2 -2
- package/dist/{chunk-DD5BOU5I.js → chunk-O23I56NA.js} +2 -2
- package/dist/{chunk-YHXBD52M.js → chunk-O3O4XXO6.js} +2 -2
- package/dist/{chunk-FQTPPXNA.js → chunk-OUBAF226.js} +2 -2
- package/dist/chunk-P3UO3EH3.js +2 -0
- package/dist/{chunk-5OC3HWP5.js → chunk-QGGLL3UH.js} +2 -2
- package/dist/chunk-QIQ63BHW.js +16 -0
- package/dist/{chunk-RWRLUZ6U.js → chunk-QJIVBYEK.js} +2 -2
- package/dist/chunk-QOXBSI6G.js +20 -0
- package/dist/{chunk-7Q6VYYCH.js → chunk-QXK6UUSM.js} +2 -2
- package/dist/{chunk-ZTTISZ7J.js → chunk-RA3AYNWP.js} +2 -2
- package/dist/chunk-RJMDJR3A.js +2 -0
- package/dist/{chunk-TFUU5MQQ.js → chunk-RLH5VUMG.js} +2 -2
- package/dist/{chunk-OHWZKLVA.js → chunk-S4S2WOIX.js} +2 -2
- package/dist/{chunk-YTUD45PU.js → chunk-SERUIGV5.js} +2 -2
- package/dist/{chunk-2OXVAGGT.js → chunk-SMQWE25B.js} +2 -2
- package/dist/{chunk-K42M2KWT.js → chunk-TAVELHYR.js} +2 -2
- package/dist/{chunk-MGBJHRFB.js → chunk-TWMJ3Y3G.js} +2 -2
- package/dist/chunk-VAXNI5NE.js +146 -0
- package/dist/chunk-VVY2G5ET.js +2 -0
- package/dist/{chunk-XF3KLXN3.js → chunk-W3DBTGL4.js} +2 -2
- package/dist/{chunk-26X7KCJR.js → chunk-WANA4KAQ.js} +2 -2
- package/dist/chunk-WJL2L6MV.js +60 -0
- package/dist/chunk-WUW7YUAH.js +11 -0
- package/dist/{chunk-PC44K7RF.js → chunk-WWKWUPSU.js} +2 -2
- package/dist/{chunk-2EZSOTSY.js → chunk-WY45BHKQ.js} +2 -2
- package/dist/chunk-X4FR5BZF.js +9 -0
- package/dist/chunk-X6RKPDY7.js +2 -0
- package/dist/{chunk-GK3GRUJX.js → chunk-YLFORA5G.js} +2 -2
- package/dist/{chunk-NBRUH7OE.js → chunk-YTVWB7YJ.js} +2 -2
- package/dist/{chunk-YGQN3XGZ.js → chunk-ZCEJ63SP.js} +2 -2
- package/dist/{chunk-2GSQR6YA.js → chunk-ZJ5CBXK3.js} +2 -2
- package/dist/chunk-ZL2OGDCD.js +2 -0
- package/dist/cli.js +8 -3
- package/dist/command-descriptors-ZW5J4ZEM.js +631 -0
- package/dist/{config-types-BWQ5xPGI.d.ts → config-types-B6MEoRNy.d.ts} +4 -0
- package/dist/{db-B0r1o7Vt.d.ts → db-DYLKr9Wn.d.ts} +1 -1
- package/dist/direct-navigation-42YHQPOI.js +3 -0
- package/dist/{health-CFnlCiTz.d.ts → health-DgxIDXJC.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +2 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +2 -2
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +2 -2
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +3 -3
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -2
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +2 -2
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +26 -25
- package/dist/reindex.d.ts +7 -3
- package/dist/reindex.js +34 -33
- package/dist/runtime.d.ts +3 -10
- package/dist/runtime.js +3 -3
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-DCvnlZCu.d.ts → scip-cli-Cc6c00-a.d.ts} +2 -2
- package/dist/watch-server.js +5 -5
- package/docs/AGENT_GUIDE.md +19 -3
- package/docs/CLI_JSON_OUTPUT.md +86 -1
- package/docs/COMMAND_REFERENCE.md +5 -3
- package/docs/SECURITY_MODEL.md +129 -0
- package/docs/TELEMETRY_RETENTION.md +5 -0
- package/docs/schemas/cli-output-page.schema.json +104 -0
- package/package.json +8 -7
- package/skills/_shared/SKILL.md +4 -2
- package/skills/scip-audit/SKILL.md +3 -2
- package/skills/scip-explore/SKILL.md +1 -1
- package/skills/scip-improve/SKILL.md +1 -1
- package/skills/scip-plan/SKILL.md +1 -1
- package/skills/scip-verify/SKILL.md +7 -2
- package/dist/chunk-24QNP7MN.js +0 -2
- package/dist/chunk-2ZOCHAL2.js +0 -8
- package/dist/chunk-35SQLYCQ.js +0 -2
- package/dist/chunk-4CGVLUDP.js +0 -18
- package/dist/chunk-4RI4BJGT.js +0 -8
- package/dist/chunk-52HQTTPB.js +0 -2
- package/dist/chunk-A63U2W3P.js +0 -3
- package/dist/chunk-ADFSIJP2.js +0 -16
- package/dist/chunk-AOLE4DYM.js +0 -6
- package/dist/chunk-B5MHCHP3.js +0 -107
- package/dist/chunk-DGAGY7RJ.js +0 -60
- package/dist/chunk-DGMCFMPG.js +0 -11
- package/dist/chunk-GA64UPMI.js +0 -6
- package/dist/chunk-HEBAY673.js +0 -2
- package/dist/chunk-HELS7KFF.js +0 -2
- package/dist/chunk-IPDCSB6N.js +0 -6
- package/dist/chunk-JJJCO4QC.js +0 -945
- package/dist/chunk-KP4KBDVF.js +0 -3
- package/dist/chunk-LRTP3DKL.js +0 -3
- package/dist/chunk-P6HBYNBE.js +0 -5
- package/dist/chunk-QHKUY4FW.js +0 -2
- package/dist/chunk-QHRL4LKM.js +0 -2
- package/dist/chunk-UXP636P5.js +0 -144
- package/dist/chunk-VEVBIAOJ.js +0 -16
- package/dist/chunk-VKRQDBW5.js +0 -9
- package/dist/chunk-VOQFGC2W.js +0 -67
- package/dist/chunk-WMXRRBII.js +0 -8
- package/dist/chunk-X3NLZHPA.js +0 -20
- package/dist/chunk-Z5QQPJ3U.js +0 -30
- package/dist/chunk-ZLJLE6LK.js +0 -2
- package/dist/command-descriptors-SJDZ7QGR.js +0 -617
- package/dist/direct-navigation-HTKOZEOM.js +0 -3
package/dist/chunk-GA64UPMI.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as Z,c as ve,e as L,f as Ae,h as Te,k as ee,l as te,m as F}from"./chunk-A63U2W3P.js";import{a as N}from"./chunk-YLVE3SXZ.js";import{B as Y,E as Pe,G as Fe,a as he,b as Se,c as xe,f as k,h as Ie,m as Re,p as X}from"./chunk-B5MHCHP3.js";import{a as we}from"./chunk-64MNV6AB.js";import{b as Me,c as p}from"./chunk-35SQLYCQ.js";import{execFileSync as Ee}from"child_process";import{existsSync as ne,readFileSync as ot}from"fs";import{createRequire as st}from"module";import{platform as je}from"os";import{dirname as Be,join as C}from"path";var at=st(import.meta.url),Un={language:"rust",indexerBinary:"rust-analyzer",installUrl:"https://github.com/rust-lang/rust-analyzer"};function re(t){return[t.indexerBinary,...t.binaryAliases??[]]}function ct(t){let e=re(t);return e.length===1?e[0]:e.join(" or ")}function ie(t){for(let e of re(t))if(je()==="win32"){let n=ve(e);if(n)return n}else if(Z(e))return e;return lt(t)}function Kn(t){return ie(t)!==null||dt(t)}function dt(t){return De(t)!==null}function lt(t){let e=De(t);if(!e)return null;let r=JSON.parse(ot(e,"utf8")).bin;if(!r)return null;if(typeof r=="string")return C(Be(e),r);for(let i of re(t)){let o=r[i];if(o)return C(Be(e),o)}return null}function De(t){if(!t.bundledNpmPackage)return null;try{return at.resolve(`${t.bundledNpmPackage}/package.json`)}catch{return null}}function ut(t,e){for(let n of t.projectLocalBinaries??[]){let r=C(e,n);if(ne(r))return r}return null}function pt(t,e){return ut(t,e)??ie(t)}function Qn(t,e=process.env,n=t.indexerBinary){if(t.indexerBinary!=="scip-dotnet"||oe(n,e))return e;let r=ke(n,e);return r?{...e,DOTNET_ROOT:r}:e}function Xn(t,e){let n=ct(t),r=e?pt(t,e):ie(t);if(!r)return{language:t.language,binaryLabel:n,installed:!1,runnable:!1,resolvedBinary:null,installUrl:t.installUrl};if(t.indexerBinary!=="scip-dotnet")return{language:t.language,binaryLabel:n,installed:!0,runnable:!0,resolvedBinary:r};let i=ft(r);return{language:t.language,binaryLabel:n,installed:!0,runnable:i.runnable,resolvedBinary:r,installUrl:t.installUrl,note:i.note}}function ft(t){if(oe(t,process.env))return{runnable:!0};let e=ke(t,process.env);if(e)return{runnable:!0,note:`using .NET 9 runtime from ${e}`};let n=Ne(process.env);return{runnable:!1,note:n.length>0?`.NET 9 runtime still unavailable after checking ${n.join(", ")}`:"binary is present, but scip-dotnet still needs a .NET 9 runtime"}}function ke(t,e){for(let n of Ne(e))if(oe(t,{...e,DOTNET_ROOT:n}))return n;return null}function Ne(t){let e=[],n=t.DOTNET_ROOT;if(n&&ne(n)&&e.push(n),je()==="darwin"&&Z("brew"))try{let r=Ee("brew",["--prefix","dotnet@9"],{stdio:"pipe",env:t,timeout:1e4,killSignal:"SIGKILL"}).toString().trim(),i=C(r,"libexec");ne(i)&&!e.includes(i)&&e.push(i)}catch{}return e}function oe(t,e){try{return Ee(t,["--version"],{stdio:"pipe",env:e,timeout:1e4,killSignal:"SIGKILL"}),!0}catch{return!1}}function er(t,e,n={}){ee(t,Le(e,n),{durability:"visibility",runtime:n.runtime})}function tr(t,e,n={}){return ee(t,Le(e,n),{durability:"durable",runtime:n.runtime})}function Le(t,e){let n=JSON.stringify(t,null,e.spacing);return e.trailingNewline?`${n}
|
|
2
|
-
`:n}import{execFileSync as mt}from"child_process";import{createHash as Ce}from"crypto";import{lstatSync as gt,readdirSync as yt,readFileSync as bt,readlinkSync as ht,realpathSync as Oe}from"fs";import{isAbsolute as St,join as qe,relative as xt,sep as Mt}from"path";function It(t){return[...new Set((t??[]).map(e=>e.trim()).filter(Boolean))].sort((e,n)=>e.localeCompare(n))}function Rt(t){return(Ft(t)??vt(t)).filter(e=>e&&!_e(e)).sort()}function wt(t,e={}){let n=Rt(t).filter(i=>!e.language||Se(i,e.language,e.markerFiles)).filter(i=>!e.includePath||e.includePath(i)),r=Oe(t);return n.map(i=>{let o=qe(t,i);try{if(gt(o).isSymbolicLink()){let a=Oe(o),d=xt(r,a);if(d===".."||d.startsWith(`..${Mt}`)||St(d))throw new Error("external symlink");let u=ht(o);return{path:i,size:Buffer.byteLength(u),hash:Ce("sha256").update("symlink\0").update(u).digest("hex")}}let s=bt(o);return{path:i,size:s.byteLength,hash:Ce("sha256").update(s).digest("hex")}}catch{return{path:i,size:-1,hash:"unreadable"}}})}function cr(t,e,n){return{version:2,languages:[...e].sort(),pnpmWorkspaces:n.typescriptProjectMode!=="workspace"&&n.pnpmWorkspaces===!0,typescriptProjectMode:n.typescriptProjectMode??"single",typescriptProjects:It(n.typescriptProjects),clojureConfigPath:Pt(n.clojureConfigPath),files:wt(t)}}function Pt(t){return t?.trim()||void 0}function Ft(t){try{return mt("git",["-C",t,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}).split(`
|
|
3
|
-
`).filter(Boolean)}catch{return null}}function vt(t){let e=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?qe(t,r):t,o;try{o=yt(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=r?`${r}/${s.name}`:s.name;if(s.isDirectory()){_e(a)||n.push(a);continue}e.push(a)}}return e}function _e(t){let e=t.split("/");return t==="meta.json"||e.some(n=>At.has(n))||t.endsWith(".db")||t.endsWith(".db-wal")||t.endsWith(".db-shm")||t.endsWith(".scip")}var At=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);var Tt=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function O(t){let e=t.toLowerCase();return Tt.some(n=>e.endsWith(n))}function _(t){let e=q(t.projectFiles),n=new Set(e),r=new Map(t.snapshot.files.map(c=>[c.path,c])),i=t.snapshot.files.filter(c=>{let g=he(c.path,["typescript"]);return g==="config"||g==="ambient"}).map(c=>c.path),o=q([...e,...i]),s=o.find(c=>!r.has(c)),a=new Set(t.snapshot.files.map(c=>c.path)).size!==t.snapshot.files.length,d=!s&&o.some(c=>$e(r.get(c))),u=X(JSON.stringify({pnpmWorkspaces:t.snapshot.pnpmWorkspaces,typescriptProjectMode:t.snapshot.typescriptProjectMode,typescriptProjects:q(t.snapshot.typescriptProjects),membership:e})),l=new Map;return{identityFor(c,g){if(!n.has(c))return I("target-outside-project");if(a)return I("duplicate-input-path");if(s)return I("missing-input-fingerprint");if(d)return I("unreadable-input");let h=[],f,S;if(t.graph===null)h.push("dependency-graph-unavailable"),S="whole-project",f=o;else{let D=Et(c,t.graph,l);if(D.find(Q=>!r.has(Q)))return I("missing-input-fingerprint");if(f=q([...D,...i]),f.some(Q=>$e(r.get(Q))))return I("unreadable-input");S="dependency-closure"}let j=f.map(D=>jt(r.get(D)));return{version:1,key:X(JSON.stringify({version:1,engineIdentity:t.engineIdentity,schemaVersion:g,projectIdentity:u,inputs:j})),mode:S,inputFiles:f,reasons:h}}}}function Bt(t,e){let n=new Set,r=[t];for(let i=0;i<r.length;i+=1){let o=r[i];if(!(o===void 0||n.has(o))){n.add(o);for(let s of[...e.get(o)??[]].sort())n.has(s)||r.push(s)}}return[...n].sort()}function Et(t,e,n){let r=n.get(t);if(r)return r;let i=Bt(t,e);return n.set(t,i),i}function jt(t){return{path:t.path,size:t.size,hash:t.hash}}function $e(t){return t.size<0||t.hash==="unreadable"}function I(t){return{version:1,key:null,mode:"unkeyed",inputFiles:[],reasons:[t]}}function q(t){return[...new Set(t)].sort()}import{createRequire as Dt}from"module";var Ge=Dt(import.meta.url),v,$;function kt(){if(v!==void 0)return v;try{v=Ge("ts-morph")}catch{v=null}return v}function G(){if($)return $;let t=kt();if(!t)return"ts-morph:unavailable";let e="unknown";try{e=Ge("ts-morph/package.json").version??"unknown"}catch{}return $=`ts-morph:${e}:typescript:${t.ts.version}`,$}function gr(t,e){return e.map(n=>({tsconfigPath:n,project:new t.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0})}))}function yr(t,e,n){return{language:"typescript",availability:()=>({available:!1,reason:t,tsconfigPath:e,tsconfigPaths:n}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}var Nt=Re("typescript-semantic-identity-context",{clearGroups:["whole-project"]});function se(t,e,n){let r=Nt.get(t,()=>Lt(t));if(!r)return null;let i=`${n}\0${e}`,o=r.identities.get(i);if(o)return o;let s=r.builder.identityFor(e,n);return r.identities.set(i,s),s}function A(t){return we(t,{includeIgnored:!1}).filter(O).sort()}function Lt(t){try{if(!t.generation.metadataRaw)return null;let e=k(t.generation.metadataRaw);if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.usableForEvidenceCache)return null;let n=xe(e.metadata.fingerprint);return n?{builder:_({projectFiles:A(t),snapshot:n,graph:N(t),engineIdentity:G()}),identities:new Map}:null}catch{return null}}function W(t,e){let n=new Map(t.map(i=>[i.symbol,i])),r=new Map(t.map(i=>[i.symbolId,[]]));for(let i of e.values())for(let o of i){let s=n.get(o.targetSymbol);s&&r.get(s.symbolId).push(o.location)}for(let[i,o]of r)r.set(i,Ct(o));return r}function ze(t,e,n){let r=Je(t,e),i=Je(t,n),o=[...r].filter(c=>!i.has(c)).sort(),s=[...i].filter(c=>!r.has(c)).sort(),a=We(t,e),d=We(t,n),u=[...a].filter(c=>!d.has(c)).sort(),l=[...d].filter(c=>!a.has(c)).sort();return{passed:o.length===0&&s.length===0,expectedCount:r.size,actualCount:i.size,missing:o,extra:s,callerFiles:{passed:u.length===0&&l.length===0,expectedCount:a.size,actualCount:d.size,missing:u,extra:l}}}function We(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])i.file!==r.relativePath&&n.add(`${r.symbol}\0${i.file}`);return n}function vr(t,e,n){let r=new Set(n),i=new Map(n.map(o=>[o,[]]));for(let o of t)for(let s of e.get(o.symbolId)??[])r.has(s.file)&&i.get(s.file).push({targetSymbol:o.symbol,location:s});for(let[o,s]of i)i.set(o,Ot(s));return i}function Je(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])n.add(`${r.symbol}\0${i.file}\0${i.line}\0${i.column}`);return n}function Ct(t){let e=new Map;for(let n of t)e.set(`${n.file}\0${n.line}\0${n.column}`,n);return[...e.values()].sort(He)}function Ot(t){let e=new Map;for(let n of t){let{location:r}=n;e.set(`${n.targetSymbol}\0${r.file}\0${r.line}\0${r.column}`,n)}return[...e.values()].sort((n,r)=>n.targetSymbol.localeCompare(r.targetSymbol)||He(n.location,r.location))}function He(t,e){return t.file.localeCompare(e.file)||t.line-e.line||t.column-e.column}var ae="typescript-reference-fragment-v2",z=Pe({kind:"typescript-reference-fragments",invalidation:Fe("typescript-reference-fragments"),serialize:t=>JSON.stringify(t),deserialize:_t});function Cr(t,e,n,r=t){let i=A(t),o=_({projectFiles:i,snapshot:e,graph:N(t),engineIdentity:G()}),s=[...n].map(([a,d])=>({relativePath:a,contentHash:o.identityFor(a,ae).key,value:[...d]}));if(s.some(a=>a.contentHash===null))throw new Error("TypeScript reference fragment identity is unavailable for an affected document.");return z.writeBatch(r,s.map(a=>({...a,contentHash:a.contentHash}))),s.length}function Or(t,e,n,r){let i=e.filter(s=>O(s.relativePath));if(i.length===0)return J("no TypeScript definitions");let o=J("shadow did not run");return Y("typescript.reference-fragments.shadow",()=>{try{let s=r(i[0].relativePath);if(!s.availability().available||!s.referenceFragmentsForFiles)return o=J("TypeScript reference fragment provider is unavailable"),o;let a=A(t),d=new Set(a),u=s.referenceFragmentsForFiles(a),l=W(i,u),c=ze(i,qt(n,d),l);if(!c.passed)return o={state:"failing",files:a.length,keyedFiles:0,writtenFiles:0,...c},o;let g=[];for(let h of a){let f=se(t,h,ae);f?.key&&g.push({relativePath:h,contentHash:f.key,value:u.get(h)??[]})}return z.writeBatch(t,g),o={state:"passing",files:a.length,keyedFiles:g.length,writtenFiles:g.length,...c},o}catch(s){return o=J(s instanceof Error?s.message:String(s)),o}},()=>({...o}))}function qt(t,e){return new Map([...t].map(([n,r])=>[n,r.filter(i=>e.has(i.file))]))}function qr(t,e,n){if(e.length===0)return{references:new Map,files:0,cacheHits:0,cacheMisses:0,computedFiles:0};let r="fallback",i=0,o=0,s=0,a=0;return Y("typescript.reference-fragments.materialize",()=>{try{let d=A(t);i=d.length;let u=new Map,l=new Map,c=[];for(let f of d){let S=se(t,f,ae);if(!S?.key)return null;u.set(f,S.key);let j=z.read(t,f,S.key);j===null?(s+=1,c.push(f)):(o+=1,l.set(f,j))}if(s===0)return r="hit",{references:W(e,l),files:i,cacheHits:o,cacheMisses:s,computedFiles:a};let g=n(e[0].relativePath);if(!g.availability().available||!g.referenceFragmentsForFiles)return null;let h=g.referenceFragmentsForFiles(c);if(c.some(f=>!h.has(f)))return null;a=h.size,z.writeBatch(t,c.map(f=>({relativePath:f,contentHash:u.get(f),value:h.get(f)??[]})));for(let[f,S]of h)l.set(f,S);return r="computed",{references:W(e,l),files:i,cacheHits:o,cacheMisses:s,computedFiles:a}}catch{return null}},()=>({state:r,files:i,cacheHits:o,cacheMisses:s,computedFiles:a}))}function J(t){return{state:"unavailable",files:0,keyedFiles:0,writtenFiles:0,expectedCount:0,actualCount:0,missing:[],extra:[],reason:t}}function _t(t){try{let e=JSON.parse(t);return!Array.isArray(e)||!e.every($t)?null:e}catch{return null}}function $t(t){if(!t||typeof t!="object")return!1;let e=t,n=e.location;return typeof e.targetSymbol=="string"&&!!n&&typeof n.file=="string"&&typeof n.line=="number"&&typeof n.column=="number"}import{createHash as Gt}from"crypto";import{existsSync as H,readFileSync as V,statSync as ue}from"fs";import{basename as Wt,dirname as pe,join as M}from"path";var Jt=1,zt=1,Ht=".scipquery-generations",Vt="manifest.json";function fe(t){return M(pe(t),Ht)}function Ut(t){try{let e=JSON.parse(V(M(fe(t),"state.json"),"utf8"));return nn(e)?e:null}catch{return null}}function Kt(t,e){return Qt(fe(t),e)}function Qt(t,e){try{let n=JSON.parse(V(M(t,e,Vt),"utf8"));return tn(n,e)?n:null}catch{return null}}function zr(t){let e=Ut(t.dbPath);if(e){let n=Yt(t,e.currentGeneration);if(n)return n;if(e.artifactSet==="immutable-v1")throw new Error(`Published SQLite generation ${e.currentGeneration} is missing or invalid.`)}if(H(M(pe(t.dbPath),"index.lock")))throw new Error("Legacy SQLite publication is in progress; retry after the reindex lock is released.");return Zt(t,e?.currentGeneration)}function Xt(t){return Ie(k(t))??t}function Yt(t,e){try{let n=M(fe(t.dbPath),e),r=Kt(t.dbPath,e);if(!r)return null;let i=ce(n,r.database),o=r.index?ce(n,r.index):void 0,s=r.metadata?ce(n,r.metadata):void 0;return!de(i,r.database)||r.index&&(!o||!de(o,r.index))||r.metadata&&(!s||!de(s,r.metadata))?null:{identity:e,databasePath:i,...o?{indexPath:o}:{},...s?{metadataPath:s,metadataRaw:V(s,"utf8")}:{},source:"immutable"}}catch{return null}}function Zt(t,e){let n=Ve(t.dbPath),r=M(pe(t.dbPath),"meta.json"),i=H(r)?V(r,"utf8"):void 0,o=H(t.indexPath)?t.indexPath:void 0;return{identity:e??en(t.dbPath,i),databasePath:t.dbPath,...o?{indexPath:o}:{},...i===void 0?{}:{metadataPath:r,metadataRaw:i},source:"legacy",databaseFileIdentity:n}}function en(t,e){let n=Gt("sha256").update("sqlite-generation-legacy-v1\0");return e!==void 0&&n.update(Xt(e)),n.update(`\0${Ve(t)}`),n.digest("hex")}function Ve(t){let e=ue(t);return`${e.dev}:${e.ino}:${e.size}:${e.mtimeMs}`}function ce(t,e){if(Wt(e.file)!==e.file||e.file==="."||e.file==="..")throw new Error("SQLite generation manifest contains an unsafe artifact path");return M(t,e.file)}function de(t,e){return H(t)&&ue(t).isFile()&&ue(t).size===e.size}function tn(t,e){return t.version===zt&&t.identity===e&&le(t.database)&&(t.index===void 0||le(t.index))&&(t.metadata===void 0||le(t.metadata))}function le(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.file=="string"&&!!e.file&&Number.isSafeInteger(e.size)&&(e.size??-1)>=0&&typeof e.sha256=="string"&&/^[a-f0-9]{64}$/.test(e.sha256)}function nn(t){return t.version===Jt&&typeof t.currentGeneration=="string"&&!!t.currentGeneration&&typeof t.publishedAt=="string"&&Number.isFinite(Date.parse(t.publishedAt))&&(t.artifactSet===void 0||t.artifactSet==="immutable-v1")&&rn(t.stableMirrors)&&on(t.previousGeneration)&&sn(t.publication)}function rn(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t;return typeof e.databaseFileIdentity=="string"&&!!e.databaseFileIdentity&&(e.indexFileIdentity===void 0||typeof e.indexFileIdentity=="string"&&!!e.indexFileIdentity)}function on(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t;return typeof e.generationIdentity=="string"&&!!e.generationIdentity&&typeof e.databasePath=="string"&&!!e.databasePath&&(e.metadataPath===void 0||typeof e.metadataPath=="string"&&!!e.metadataPath)}function sn(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t,n=[e.converterDurationMs,e.affectedDocumentCount,e.changedDocumentCount,e.producerDurationMs,e.materializationDurationMs,e.patchDurationMs].filter(r=>r!==void 0);return(e.mode==="incremental"||e.mode==="full")&&e.validation==="passed"&&e.converterDurationMs!==void 0&&n.every(r=>typeof r=="number"&&Number.isFinite(r)&&r>=0)&&(e.scipCompanion===void 0||e.scipCompanion==="current"||e.scipCompanion==="deferred")&&(e.typescriptOverlayGeneration===void 0||typeof e.typescriptOverlayGeneration=="string"&&!!e.typescriptOverlayGeneration)&&(e.scipCompanion!=="deferred"||!!e.typescriptOverlayGeneration)&&(e.fallbackReason===void 0||typeof e.fallbackReason=="string")}import{createHash as an,randomUUID as Ye}from"crypto";import{existsSync as P,lstatSync as E,mkdirSync as cn,readFileSync as B,readdirSync as w,renameSync as Ze,rmSync as x}from"fs";import{basename as me,dirname as dn,join as m}from"path";function U(t){return Array.isArray(t)?`[${t.map(U).join(",")}]`:t&&typeof t=="object"?`{${Object.entries(t).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${JSON.stringify(e)}:${U(n)}`).join(",")}}`:JSON.stringify(t)}var ln=1,un=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),R=class extends Error{constructor(n,r,i,o){let s=n==="item-too-large"?`request is ${o} bytes; per-item limit is ${i.maxItemBytes}`:n==="item-capacity"?`mailbox has ${r.totalItems} retained items; limit is ${i.maxItems}`:n==="byte-capacity"?`mailbox retains ${r.totalBytes} bytes and the request adds ${o}; limit is ${i.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=n;this.status=r;this.limits=i;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},pn=".owner.json",fn={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function ti(t){return{rootDir:t,pendingDir:m(t,"pending"),inflightDir:m(t,"inflight"),responseDir:m(t,"responses"),deadLetterDir:m(t,"dead-letter"),legacyRequestDir:m(t,"requests")}}function mn(t={}){let e={...un,...t};for(let[n,r]of Object.entries(e))if(!Number.isFinite(r)||r<=0||!Number.isInteger(r))throw new Error(`Mailbox limit ${n} must be a positive integer.`);return e}function et(t){for(let e of[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir])cn(e,{recursive:!0})}function ni(t,e){return an("sha256").update(U({namespace:t,payload:e})).digest("hex")}function gn(t){if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${t}`}function ri(t,e,n={}){let r=mn(n.limits),i=n.nowMs??Date.now();return et(t),Rn(e),bn(t,r,n.admissionLockTimeoutMs??2e3,n.monotonicNow??Te,()=>{yn(t,i,r);let o=m(t.pendingDir,`${e.id}.json`),s=m(t.responseDir,`${e.id}.json`),a=Ue(t,e.id);if(a){let c=Ke(a,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:c.deadlineAtMs??e.deadlineAtMs}}let d=`${JSON.stringify(e)}
|
|
4
|
-
`,u=Buffer.byteLength(d),l=tt(t);if(u>r.maxItemBytes)throw new R("item-too-large",l,r,u);if(l.totalItems+1>r.maxItems)throw new R("item-capacity",l,r,u);if(l.totalBytes+u>r.maxBytes)throw new R("byte-capacity",l,r,u);n.onBeforePublish?.();try{return te(o,d,{durability:"durable"}),{disposition:"accepted",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:e.deadlineAtMs}}catch(c){if(c.code!=="EEXIST")throw c;let g=Ue(t,e.id);if(!g)throw c;let h=Ke(g,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:h.deadlineAtMs??e.deadlineAtMs}}})}function yn(t,e,n,r=fn){let i={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=n.cleanupBatch;for(let s of ye(t.inflightDir)){if(o<=0)break;let a=m(t.responseDir,`${s.requestId}.json`);if(P(a)){x(s.path,{force:!0}),i.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>e||Mn(t,s.ownerId,r)!=="dead")continue;let d=m(t.pendingDir,s.originalFile);try{Ze(s.path,d),i.reclaimed++}catch(u){if(u.code!=="EEXIST")throw u;x(s.path,{force:!0})}F(dn(s.path)),F(t.pendingDir),o--}o=Qe(t.responseDir,o,(s,a)=>wn(s)??a+n.responseRetentionMs,e,()=>{i.responsesRemoved++}),o=Qe(t.deadLetterDir,o,(s,a)=>a+n.deadLetterRetentionMs,e,()=>{i.deadLettersRemoved++});for(let s of[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir]){if(o<=0)break;for(let a of nt(s)){if(o<=0)break;me(a).includes(".tmp-")&&(E(a).mtimeMs+n.temporaryRetentionMs>e||(x(a,{force:!0}),i.temporaryFilesRemoved++,o--))}}return Pn(t.inflightDir),i}function tt(t){et(t);let e=[...T(t.pendingDir).map(d=>({path:d,pending:!0})),...T(t.legacyRequestDir).map(d=>({path:d,pending:!0}))],n=ye(t.inflightDir).map(d=>({path:d.path,pending:!1})),r=T(t.responseDir).map(d=>({path:d,pending:!1})),i=T(t.deadLetterDir).map(d=>({path:d,pending:!1})),o=[...e,...n,...r,...i],s=0,a;for(let d of e){let u=be(d.path);if(!u){s++;continue}let l=u.enqueuedAtMs??E(d.path).mtimeMs;a=a===void 0?l:Math.min(a,l)}return{pending:e.length,inflight:n.length,responses:r.length,deadLetters:i.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((d,u)=>d+Fn(u.path),0),...a===void 0?{}:{oldestPendingAt:new Date(a).toISOString()}}}function bn(t,e,n,r,i){let o=m(t.rootDir,".admission.lock"),s=`${process.pid}-${Ye()}`,a=r()+Math.max(0,n);for(;!hn(t.rootDir,o,s);){if(Sn(o),r()>=a)throw new R("admission-busy",tt(t),e,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return i()}finally{try{ge(o).ownerToken===s&&(x(o,{recursive:!0,force:!0}),F(t.rootDir))}catch{}}}function hn(t,e,n){let r=`${JSON.stringify({ownerToken:n,pid:process.pid,acquiredAtMs:Date.now()})}
|
|
5
|
-
`;try{return te(e,r,{durability:"durable"}),!0}catch(i){if(i.code==="EEXIST")return!1;try{ge(e).ownerToken===n&&(x(e,{force:!0}),F(t))}catch{}throw i}}function Sn(t){let e=null;try{let r=ge(t);typeof r.ownerToken=="string"&&Number.isSafeInteger(r.pid)&&Number(r.pid)>0&&(e=Number(r.pid))}catch{}if(e===null||xn(e))return;let n=`${t}.stale-${Ye()}`;try{Ze(t,n)}catch(r){let i=r.code;if(i==="ENOENT"||i==="EEXIST")return;throw r}x(n,{recursive:!0,force:!0})}function ge(t){try{return JSON.parse(B(t,"utf8"))}catch(e){if(e.code!=="EISDIR")throw e;return JSON.parse(B(m(t,"owner.json"),"utf8"))}}function xn(t){try{return process.kill(t,0),!0}catch(e){let n=e.code;return n==="EPERM"||n!=="ESRCH"}}function Mn(t,e,n){let r=In(m(t.inflightDir,rt(e),pn));if(!r)return"unknown";if(!n.isProcessAlive(r.pid))return"dead";if(!r.processIdentity)return"live";let i=n.readProcessIdentity(r.pid);return i?Ae(r.processIdentity,i)?"live":"dead":"unknown"}function In(t){try{let e=JSON.parse(B(t,"utf8"));if(e.version!==1||typeof e.ownerId!="string"||!e.ownerId||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0)return null;let n=e.processIdentity===void 0?null:L(e.processIdentity);return e.processIdentity!==void 0&&(!n||n.pid!==e.pid)?null:{version:1,ownerId:e.ownerId,pid:e.pid,...n?{processIdentity:n}:{}}}catch{return null}}function Ue(t,e){for(let n of[m(t.pendingDir,`${e}.json`),m(t.legacyRequestDir,`${e}.json`),m(t.responseDir,`${e}.json`)])if(P(n))return n;for(let n of ye(t.inflightDir))if(n.requestId===e)return n.path;return null}function Ke(t,e,n){let r=be(t);if(!r||r.operationKey!==e)throw new Error(`Mailbox operation ${n} conflicts with an existing retained record.`);return r}function Rn(t){if(t.mailboxVersion!==ln||t.id!==gn(t.operationKey)||!t.clientId.trim()||!Number.isFinite(t.enqueuedAtMs)||!Number.isFinite(t.deadlineAtMs)||t.deadlineAtMs<t.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function ye(t){if(!P(t))return[];let e=[];for(let n of w(t,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=Xe(n.name);if(r===null)continue;let i=m(t,n.name);for(let o of w(i,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let a=Xe(s[1]),d=Number(s[2]);if(a===null||me(a)!==a||!a.endsWith(".json")||!Number.isSafeInteger(d))continue;let u=m(i,o.name),l=be(u)??{id:me(a,".json")},c=E(u);e.push({requestId:l.id,ownerId:r,path:u,originalFile:a,claimedAtMs:c.mtimeMs,claimExpiresAtMs:d,byteLength:c.size,...l.operationKey?{operationKey:l.operationKey}:{},...l.clientId?{clientId:l.clientId}:{},...l.enqueuedAtMs===void 0?{}:{enqueuedAtMs:l.enqueuedAtMs},...l.deadlineAtMs===void 0?{}:{deadlineAtMs:l.deadlineAtMs},legacy:l.operationKey===void 0})}}return e.sort((n,r)=>n.claimedAtMs-r.claimedAtMs||n.path.localeCompare(r.path))}function be(t){try{let e=JSON.parse(B(t,"utf8"));return typeof e.id!="string"||!e.id?null:{id:e.id,...typeof e.operationKey=="string"?{operationKey:e.operationKey}:{},...typeof e.clientId=="string"?{clientId:e.clientId}:{},...typeof e.enqueuedAtMs=="number"?{enqueuedAtMs:e.enqueuedAtMs}:{},...typeof e.deadlineAtMs=="number"?{deadlineAtMs:e.deadlineAtMs}:{}}}catch{return null}}function wn(t){try{let e=JSON.parse(B(t,"utf8"));return typeof e.expiresAtMs=="number"&&Number.isFinite(e.expiresAtMs)?e.expiresAtMs:null}catch{return null}}function Qe(t,e,n,r,i){for(let o of T(t)){if(e<=0)break;let s=E(o);n(o,s.mtimeMs)>r||(x(o,{force:!0}),i(),e--)}return e}function T(t){return P(t)?w(t,{withFileTypes:!0}).filter(e=>e.isFile()).map(e=>m(t,e.name)).sort():[]}function nt(t){if(!P(t))return[];let e=[];for(let n of w(t,{withFileTypes:!0})){let r=m(t,n.name);n.isFile()?e.push(r):n.isDirectory()&&e.push(...nt(r))}return e.sort()}function Pn(t){if(P(t))for(let e of w(t,{withFileTypes:!0})){if(!e.isDirectory())continue;let n=m(t,e.name);w(n).some(r=>r.endsWith(".claim"))||x(n,{recursive:!0,force:!0})}}function Fn(t){try{return E(t).size}catch{return 0}}function rt(t){return Buffer.from(t,"utf8").toString("base64url")}function Xe(t){try{let e=Buffer.from(t,"base64url").toString("utf8");return rt(e)===t?e:null}catch{return null}}import{readFileSync as vn}from"fs";import{join as K}from"path";var An="watch.lock",Tn="watch-state.json",Bn="watch-activity.json",En="watch-refresh-requests";function di(t){return{lockPath:K(t,An),statePath:K(t,Tn),activityPath:K(t,Bn),refreshRequestsPath:K(t,En)}}function li(t){try{return jn(JSON.parse(vn(t,"utf8")))}catch{return null}}function jn(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!b(e.startedAt)||!b(e.heartbeatAt)||!b(e.lastActivityAt)||!Dn(e.watcher)||e.idleDeadlineAt!==void 0&&!b(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let n=L(e.processIdentity);if(!n||n.pid!==e.pid)return null;e.processIdentity=n}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!kn(e.lastError)||e.lastRefresh!==void 0&&!Nn(e.lastRefresh)||e.reindexActivity!==void 0&&!Ln(e.reindexActivity)||e.refreshRequests!==void 0&&!Cn(e.refreshRequests)||e.typescriptSemantic!==void 0&&!On(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!qn(e.typescriptIndex)?null:e}function b(t){return Me(t)}function Dn(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return y(e.changedFiles)&&y(e.reindexAt);case"indexing":return y(e.startedAt);case"cooldown":return y(e.until)&&typeof e.dirty=="boolean";case"draining":return y(e.startedAt)&&typeof e.reason=="string";default:return!1}}function kn(t){if(!t||typeof t!="object")return!1;let e=t;return b(e.at)&&typeof e.message=="string"}function Nn(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&b(e.startedAt)&&b(e.completedAt)&&y(e.durationMs)}function Ln(t){if(!t||typeof t!="object")return!1;let e=t;return!b(e.windowStartedAt)||!b(e.windowEndedAt)||!p(e.runs)||!p(e.rebuilt)||!p(e.reused)||!p(e.failed)||!p(e.suppressed)||!y(e.estimatedLogicalOutputBytes)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"?!1:Object.values(e.byTrigger).every(n=>n===void 0||p(n))}function Cn(t){if(!t||typeof t!="object")return!1;let e=t;return p(e.pending)&&p(e.claimed)&&p(e.completed)&&p(e.expired)&&p(e.invalid)&&(e.oldestPendingAt===void 0||b(e.oldestPendingAt))}function On(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&y(e.requests)&&y(e.sessionsCreated)&&y(e.sessionsReused)&&y(e.sessionsRefreshed)&&y(e.sessionsReplaced)&&y(e.projectsCreated)&&(e.lastRequestAt===void 0||b(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||b(e.busyUntil))&&(e.mailbox===void 0||it(e.mailbox))}function qn(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&p(e.requests)&&p(e.sessionsCreated)&&p(e.sessionsReplaced)&&p(e.initializations)&&p(e.programUpdates)&&p(e.documentsEmitted)&&p(e.documentsRemoved)&&(e.lastRequestAt===void 0||b(e.lastRequestAt))&&(e.lastDurationMs===void 0||y(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||b(e.busyUntil))&&(e.mailbox===void 0||it(e.mailbox))}function it(t){if(!t||typeof t!="object")return!1;let e=t;return p(e.pending)&&p(e.inflight)&&p(e.responses)&&p(e.deadLetters)&&p(e.invalid)&&p(e.totalItems)&&y(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||b(e.oldestPendingAt))}function y(t){return typeof t=="number"&&Number.isFinite(t)}export{Jt as a,zt as b,Ht as c,Vt as d,fe as e,Ut as f,Kt as g,Qt as h,zr as i,Xt as j,Ve as k,Un as l,ct as m,ie as n,Kn as o,ut as p,Qn as q,Xn as r,U as s,er as t,tr as u,ln as v,ti as w,ni as x,gn as y,ri as z,It as A,wt as B,cr as C,di as D,li as E,Tt as F,O as G,kt as H,gr as I,yr as J,vr as K,_ as L,se as M,Cr as N,Or as O,qr as P};
|
|
6
|
-
//# sourceMappingURL=chunk-GA64UPMI.js.map
|
package/dist/chunk-HEBAY673.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as Ne}from"./chunk-3OIKRYU5.js";import{a as Ge}from"./chunk-NN4ZIRPK.js";import{a as pe,b as D,e as he}from"./chunk-P6HBYNBE.js";import{a as be,c as Se,d as Ce,e as F}from"./chunk-24QNP7MN.js";import{a as Ee}from"./chunk-PC44K7RF.js";import{a as Te}from"./chunk-MLGTCX56.js";import{a as Ie}from"./chunk-6YTSKJJ3.js";import{a as ve}from"./chunk-WXAAURU7.js";import{a as De}from"./chunk-KLVJABXA.js";import{a as Fe}from"./chunk-U5CNPPTZ.js";import{a as Re}from"./chunk-GK3GRUJX.js";import{a as we}from"./chunk-TFUU5MQQ.js";import{b as ye}from"./chunk-IYAOX36F.js";import{a as me,b as ge}from"./chunk-JELJLXEE.js";import{a as de,b as fe,c as ue,g as z,h as V}from"./chunk-4CGVLUDP.js";import{b as ke}from"./chunk-LRTP3DKL.js";import{a as H,c as ae,d as ce,e as le}from"./chunk-QHKUY4FW.js";import{a as se}from"./chunk-OHWZKLVA.js";import{a as Ae,e as xe}from"./chunk-26X7KCJR.js";import{a as N,c as j,d as B,e as $e}from"./chunk-47X75ZKH.js";import{c as oe}from"./chunk-XVJ3V7LM.js";import{f as I,g as E}from"./chunk-WMXRRBII.js";import{e as ne}from"./chunk-JERWGHQT.js";import{u as re}from"./chunk-GA64UPMI.js";import{d as _,e as v,f as ie,g as O}from"./chunk-ZTTISZ7J.js";import{a as te}from"./chunk-7LABSJSR.js";import{e as Q}from"./chunk-DGMCFMPG.js";import{B as ee}from"./chunk-B5MHCHP3.js";import{createHash as St}from"crypto";import{existsSync as L}from"fs";function U(e){let[i,t]=A(e,":"),r=i||"unknown",n=(s={})=>{let a=s.actionTier??Ze(r);return{sourceAnalyzer:r,actionTier:a,rootCauseKey:s.rootCauseKey??(t||e),label:s.label??`${r} finding`,relatedFiles:s.relatedFiles??[],why:s.why??[],remediation:s.remediation??Qe(a,r),file:s.file}};if(!t)return n({rootCauseKey:e,why:["Baseline identity did not include analyzer payload."]});if(["dead","isolated","extract","wrapper","passthrough","stale"].includes(r)){let[s,a]=A(t,":");return n({file:s,relatedFiles:s?[s]:[],rootCauseKey:a?`${s}:${a}`:t,label:`${r} finding`,why:a?[`Baseline subject: ${a}.`]:[]})}if(r==="cycle"){let s=t.split(">").filter(Boolean);return n({relatedFiles:s,rootCauseKey:t,label:"cycle finding",why:s.length>0?[`Cycle path: ${s.join(" > ")}.`]:[]})}if(r==="similar"){let s=t.split("|").filter(Boolean);return n({relatedFiles:[],rootCauseKey:t,label:"similarity finding",why:s.length>0?[`Similar symbols: ${s.join(" | ")}.`]:[]})}if(r==="architecture"){let[s,a]=A(t,":");if(s==="forbidden-edge"){let[c,l]=A(a,":"),o=P(c),f=P(l);return n({actionTier:"direct",rootCauseKey:t,label:"architecture boundary violation",why:[`Declared boundary rule rejects ${o} -> ${f}.`],remediation:`Move the dependency behind an allowed boundary, or deliberately update the ${o} dependency rule and baseline.`})}if(s==="cycle"){let c=a.split("|").filter(Boolean).map(P);return n({actionTier:"direct",rootCauseKey:t,label:"forbidden architecture cycle",why:[`requireAcyclic rejects the connected boundary group: ${c.join(", ")}.`],remediation:"Break the boundary cycle, or deliberately revise the acyclicity rule and baseline."})}if(s==="missing-policy-row"){let c=P(a);return n({actionTier:"direct",rootCauseKey:t,label:"incomplete architecture policy",why:[`requireCompletePolicy rejects the missing outgoing dependency row for ${c}.`],remediation:`Declare the allowed outgoing dependencies for ${c}, including an empty row when it must depend on nothing.`})}}if(r==="drift"){let[s,a]=A(t,":"),[c,l]=A(a,":");return n({actionTier:s==="unused-import"?"direct":"signal",file:c,relatedFiles:[...new Set([c,l].filter(Boolean))],rootCauseKey:t,label:`${s||"drift"} finding`,why:[...s?[`Drift kind: ${s}.`]:[],...l?[`Related dependency: ${l}.`]:[]]})}return n({why:["Baseline analyzer prefix is not recognized by this diff-gate version."]})}function Ze(e){switch(e){case"dead":case"isolated":case"cycle":case"passthrough":case"architecture":return"direct";case"similar":case"extract":case"wrapper":case"stale":return"signal";default:return"signal"}}function Qe(e,i){return e==="direct"?`Fix the new ${i} baseline finding, or knowingly accept it via health --write-baseline.`:`Review the new ${i} baseline signal; fix it if it reflects real debt, or knowingly accept it via health --write-baseline.`}function A(e,i){let t=e.indexOf(i);return t<0?[e,""]:[e.slice(0,t),e.slice(t+i.length)]}function P(e){try{return decodeURIComponent(e)}catch{return e}}import{existsSync as et,readFileSync as tt}from"fs";import{isAbsolute as it,join as nt}from"path";var rt=".scipquery-baseline.json";function q(e){if(e.startsWith("similar:")){let i=e.slice(8).split("|");return i.length!==2?e:`similar:${i.map(_).sort().join("|")}`}if(e.startsWith("duplicate-bodies:")){let i=e.slice(17),t=i.indexOf(":");if(t<0)return e;let r=i.slice(0,t),n=i.slice(t+1).split("|");return n.length<2?e:`duplicate-bodies:${r}:${n.map(_).sort().join("|")}`}return e}function x(e,i){return i&&it(i)?i:nt(e.config.projectRoot,i??rt)}function K(e,i,t={}){let r=x(e,t.path);if(!et(r))throw new Error(`No baseline found at ${r}. Create one with: scip-query health --write-baseline`);let s=(JSON.parse(tt(r,"utf-8")).findings??[]).map(q),a=new Set(t.accept?s.filter(t.accept):s),c=new Set(i);return{baselinePath:r,baselineCount:a.size,current:[...i],newFindings:i.filter(l=>!a.has(l)),fixedFindings:[...a].filter(l=>!c.has(l))}}var ot=25e3,st=2500,at=2500;function ct(e){let i=Ie(e);return i.symbols>=ot||i.documents>=st?at:void 0}function je(e,i={}){let{scope:t}=i,r=ct(e),n=[],s=ke(e,{scope:t,...F.dead,scanLimit:r});for(let a of s.symbols)I(e,a.relativePath)||E(e,a.symbol,a.relativePath)||a.kind==="dead-code"&&n.push(`dead:${a.relativePath}:${a.shortName}`);for(let a of De(e,{scope:t,...F.isolated,scanLimit:r}))I(e,a.relativePath)||E(e,a.symbol,a.relativePath)||n.push(`isolated:${a.relativePath}:${a.shortName}`);for(let a of we(e,{scope:t}))a.kind==="real"&&n.push(`cycle:${lt(a.path)}`);for(let a of xe(e,{scope:t,...F.similar,scanLimit:r}))n.push(`similar:${[a.symbolA,a.symbolB].sort().join("|")}`);for(let a of me(e,{scope:t,...F.duplicateBodies,scanLimit:r}))n.push(`duplicate-bodies:${a.hash}:${a.functions.map(c=>c.symbol).sort().join("|")}`);for(let a of Re(e,{scope:t,...F.extract,scanLimit:r}))n.push(`extract:${a.relativePath}:${a.shortName}`);for(let a of Ee(e,{scope:t,...F.wrappers,scanLimit:r}))n.push(`wrapper:${a.file}:${a.shortName}`);for(let a of ve(e,{scope:t,...F.passthroughs,scanLimit:r}))n.push(`passthrough:${a.file}:${a.shortName}`);for(let a of Te(e,{scope:t,...F.stale,scanLimit:r}))n.push(`stale:${a.file}:${a.shortName}`);for(let a of Fe(e,{scope:t,...F.drift,includePatternDeviations:!1,limit:Number.POSITIVE_INFINITY}).results)a.kind!=="architecture-violation"&&n.push(`drift:${a.kind}:${a.file}:${a.dep}`);return n.push(...B(j(e,{scope:t}))),[...new Set(n.map(q))].sort()}function lt(e){if(e.length===0)return"";let i=0;for(let t=1;t<e.length;t++)e[t]<e[i]&&(i=t);return[...e.slice(i),...e.slice(0,i)].join(">")}function yi(e,i={}){let t=je(e,{scope:i.scope}),r=x(e,i.path);return re(r,{version:1,findings:t},{spacing:2,trailingNewline:!0}),{path:r,findingCount:t.length}}function Be(e,i={}){return K(e,je(e,{scope:i.scope}),{path:i.path})}function Pe(e,i={}){let t=B(j(e,{scope:i.scope}));return K(e,t,{path:i.path,accept:r=>r.startsWith(N)})}import{existsSync as dt,readdirSync as ft,readFileSync as ut}from"fs";import{createHash as pt}from"crypto";import{join as X}from"path";function J(e){let i=0,t=0,r=0,n=0,s=0,a=[];for(let o of e)switch(o.state){case"legacy":i+=1;break;case"current":t+=1;break;case"unsupported-older":r+=1,a.push(W(o));break;case"unsupported-future":n+=1,a.push(W(o));break;case"malformed":s+=1,a.push(W(o));break}let c=i+t,l=r+n+s;return{complete:l===0,total:e.length,accepted:c,legacy:i,current:t,unsupportedOlder:r,unsupportedFuture:n,malformed:s,omitted:l,issues:a}}function W(e){if(e.state==="legacy"||e.state==="current")throw new Error(`accepted record ${e.path} cannot become a compatibility issue`);return{path:e.path,state:e.state,reason:e.reason??e.state}}var Me=X(".scipquery","suppressions"),Ke="scip-query-suppression",Y=1;function ht(e){return X(e,Me)}function mt(e){if(e.id&&e.id.trim()!=="")return`${e.id.trim()}.json`;let i=`${e.check??""}\0${e.file??""}`;return`CHECK-${pt("sha256").update(i).digest("hex").slice(0,12).toUpperCase()}.json`}function gt(e){return mt(e).slice(0,-5)}function yt(e,i){if(typeof e!="object"||e===null||Array.isArray(e))return{state:"malformed",error:"not a suppression object"};let t=e;if(t.schemaVersion===void 0&&(t.kind!==void 0||t.suppressionIdentity!==void 0||t.writer!==void 0))return{state:"malformed",error:"suppression envelope metadata requires schemaVersion"};if(t.schemaVersion!==void 0){if(!Number.isSafeInteger(t.schemaVersion))return{state:"malformed",error:"schemaVersion must be a positive safe integer"};if(t.schemaVersion!==Y)return{state:t.schemaVersion>Y?"unsupported-future":"unsupported-older",error:`unsupported schemaVersion ${String(t.schemaVersion)}`};if(t.kind!==void 0&&t.kind!==Ke)return{state:"malformed",error:`kind must be ${Ke}`}}if(typeof t.reason!="string"||t.reason.trim()==="")return{state:"malformed",error:"missing reason"};if(!t.id&&!t.check)return{state:"malformed",error:"needs an id or a check"};let r=bt(t);if(t.schemaVersion===void 0)return{state:"legacy",suppression:r,record:t,schemaVersion:0};let n=gt(r);return t.suppressionIdentity!==n||i!==void 0&&t.suppressionIdentity!==i?{state:"malformed",error:"suppressionIdentity does not match the suppression target or filename"}:!t.writer||t.writer.tool!=="scip-query"||typeof t.writer.version!="string"||t.writer.version.trim()===""?{state:"malformed",error:"missing valid writer metadata"}:typeof t.createdAt!="string"||!Number.isFinite(Date.parse(t.createdAt))?{state:"malformed",error:"missing valid createdAt timestamp"}:t.updatedAt!==void 0&&(typeof t.updatedAt!="string"||!Number.isFinite(Date.parse(t.updatedAt)))?{state:"malformed",error:"invalid updatedAt timestamp"}:{state:"current",suppression:r,record:t,schemaVersion:Y}}function Le(e){let i=ht(e);if(!dt(i))return{suppressions:[],compatibility:J([]),warnings:[]};let t=[],r=[];for(let s of ft(i).sort()){if(!s.endsWith(".json"))continue;let a=X(i,s),c=`${Me}/${s}`,l;try{l=JSON.parse(ut(a,"utf-8"))}catch{r.push({path:c,state:"malformed",reason:"malformed JSON"});continue}let o=yt(l,s.slice(0,-5));if("error"in o){r.push({path:c,state:o.state,reason:o.error});continue}r.push({path:c,state:o.state}),t.push(o.suppression)}let n=J(r);return{suppressions:t,compatibility:n,warnings:n.issues.map(s=>`${s.path}: ${s.reason} \u2014 ignored`)}}function bt(e){return{...typeof e.id=="string"?{id:e.id}:{},...typeof e.check=="string"?{check:e.check}:{},...typeof e.file=="string"?{file:e.file}:{},reason:e.reason,...typeof e.expiresAt=="string"?{expiresAt:e.expiresAt}:{},...typeof e.createdAt=="string"?{createdAt:e.createdAt}:{}}}var en=["echo","incomplete-migration","co-change-partner","twin-partner","coverage-contract","architecture","doc-reference","unused-params","new-dead","baseline"];function tn(e,i={}){let t=i.base??"HEAD",{minTogether:r=6,minConfidence:n=.6,maxEchoChecks:s=Number.POSITIVE_INFINITY,maxHelpers:a=Number.POSITIVE_INFINITY,minSimilarity:c=.8,includeBaseline:l=!1,scanLimit:o}=i,f=i.semantic!==!1,h=i.historyMode??"bounded",u=new Set(i.skip??[]),p=Le(e.config.projectRoot),m=ue(e,{base:t}),y=fe(e,{base:t,plan:m}),S=y.changedFiles,d=new Set(S),w=new Set(m.changedFileLines),$=new Set([...d,...w]),C=z(e.config.projectRoot,t,V(m,S)),T=Ut(e.config.projectRoot,t,m,C),g={base:t,changedFiles:S,changedSymbols:y.changedSymbols.length,checksRun:[],skipped:[],suppressed:[],findings:[],attributionNotes:y.attributionNotes,rootCauseGroups:[],recordCompatibility:{suppressions:p.compatibility},note:y.summary.note};if(S.length===0)return g;let k=(G,We)=>{if(u.has(G)){g.skipped.push({check:G,reason:"skipped via --skip"});return}let Je=g.findings.length,Ye=g.skipped.length,Xe=g.checksRun.length;ee(`diff-gate.check.${G}`,We,()=>({check:G,changedFiles:S.length,changedSymbols:y.changedSymbols.length,findingsAdded:g.findings.length-Je,skippedAdded:g.skipped.length-Ye,checksRunAdded:g.checksRun.length-Xe}))};return k("echo",()=>kt(e,y.changedSymbols,d,T,s,c,o,f,g)),k("incomplete-migration",()=>xt(e,t,m,a,o,f,C,g)),k("co-change-partner",()=>Tt(e,$,r,n,h,g)),k("twin-partner",()=>It(e,y.changedSymbols,d,o,g)),k("coverage-contract",()=>Et(e,$,g)),k("architecture",()=>Jt(e,g)),k("doc-reference",()=>Pt(e,d,w,m.changedRanges,m.renamedFiles,g)),k("unused-params",()=>_t(e,S,g)),k("new-dead",()=>Ot(e,y.changedSymbols,T,g)),l&&k("baseline",()=>Wt(e,g)),$t(g,[...e.config.suppressions??[],...p.suppressions]),g.rootCauseGroups=Ct(g.findings),g}function nn(e){return e.checksRun.length===0&&e.note===de}function rn(e){return e.filter(i=>!i.advisory)}function Ct(e){let i=new Map;for(let t of e){let r=t.groupKey??`${t.check}:${t.id}`,n=i.get(r);n||(n={groupKey:r,check:t.check,severity:t.severity,actionTier:t.actionTier,sourceAnalyzer:t.sourceAnalyzer,rootCauseKey:t.rootCauseKey,count:0,findingIds:[],files:new Set,relatedFiles:new Set,message:t.message,remediation:t.remediation},i.set(r,n)),n.count+=1,n.findingIds.push(t.id),n.severity=Ue(n.severity,t.severity),n.actionTier=qe(n.actionTier,t.actionTier),t.file&&n.files.add(t.file);for(let s of t.relatedFiles??[])n.relatedFiles.add(s)}return[...i.values()].map(t=>({...t,files:[...t.files].sort(),relatedFiles:[...t.relatedFiles].sort()})).sort((t,r)=>r.count-t.count||M(r.severity)-M(t.severity)||t.groupKey.localeCompare(r.groupKey))}function Ue(e,i){return M(i)>M(e)?i:e}function M(e){return e==="error"?2:e==="warning"?1:0}function qe(e,i){return e?i&&_e(i)>_e(e)?i:e:i}function _e(e){return e==="direct"?2:e==="signal"?1:0}function $t(e,i){if(i.length===0||e.findings.length===0)return;let t=[];for(let r of e.findings){let n=i.find(s=>wt(s,r));n?e.suppressed.push({finding:r,suppression:n}):t.push(r)}e.findings=t}function wt(e,i){return!e.reason||e.reason.trim()===""||e.expiresAt&&Date.parse(e.expiresAt)<=Date.now()||e.id&&e.id!==i.id&&!i.legacySuppressionIds?.includes(e.id)||e.check&&e.check!==i.check||e.file&&e.file!==i.file?!1:!!(e.id||e.check)}function R(e,i){e.findings.push({...i,suppressionHint:`scip-query: ignore ${i.check} ${i.id} -- <reason>`})}function kt(e,i,t,r,n,s,a,c,l){l.checksRun.push("echo");for(let o of i.slice(0,n)){if(!O(o.symbol)||r(o))continue;let f=ge(e,o.symbol,{maxLoc:15,scanLimit:a}).filter(d=>!t.has(d.file)).slice(0,5).map(d=>({otherFile:d.file,otherShort:d.shortName,otherSymbol:d.symbol,similarity:1,similarityBasis:"exact-body",sharedEvidence:[`exact normalized body (${d.loc} LOC)`]}));if(f.length>0){let d=b("echo",o.symbol,o.file),w=b("echo",o.symbol,o.file,...f.map(C=>`${C.otherSymbol}|${C.otherFile}`).sort()),$=f[0];R(l,{id:d,legacySuppressionIds:w===d?void 0:[w],groupKey:d,actionTier:"direct",check:"echo",severity:"warning",evidence:"heuristic",confidence:1,file:o.file,symbol:o.symbol,relatedFiles:[...new Set(f.map(C=>C.otherFile))].sort(),sourceAnalyzer:"duplicate-bodies",rootCauseKey:`${o.symbol}:${$.otherSymbol}`,message:He(o,f),why:ze(o,f),remediation:Ve("direct",o.shortName,$.otherShort)});continue}let h=Ae(e,o.symbol,{minSimilarity:s,limit:5,scanLimit:a,semantic:c,sourceCandidateMode:"target-pruned"}),u=[];for(let d of h){let w=d.fileA===o.file?d.fileB:d.fileA,$=d.fileA===o.file?d.shortNameB:d.shortNameA,C=d.fileA===o.file?d.symbolB:d.symbolA;t.has(w)||u.push({otherFile:w,otherShort:$,otherSymbol:C,similarity:d.similarity,similarityBasis:d.similarityBasis??"callees",sharedEvidence:d.sharedCallees})}if(u.length===0)continue;let p=u[0],m=b("echo",o.symbol,o.file,...u.map(d=>`${d.otherSymbol}|${d.otherFile}`).sort()),y=b("echo",o.symbol,o.file),S=Ft(o,u);R(l,{id:y,legacySuppressionIds:m===y?void 0:[m],groupKey:y,actionTier:S,check:"echo",severity:"warning",evidence:"heuristic",confidence:p.similarity,file:o.file,symbol:o.symbol,relatedFiles:[...new Set(u.map(d=>d.otherFile))].sort(),message:He(o,u),why:ze(o,u),remediation:Ve(S,o.shortName,p.otherShort)})}i.length>n&&l.skipped.push({check:"echo",reason:`echo check capped at ${n} of ${i.length} changed symbols`})}function Ft(e,i){return i.some(r=>Rt(e.symbol,r))?"direct":"signal"}function Rt(e,i){if(i.similarityBasis==="exact-body")return!0;if(i.similarityBasis!=="source-tokens"||i.similarity<.98||i.sharedEvidence.length>8)return!1;let t=v(e),r=v(i.otherSymbol);return!t||!r?!1:t===r?!0:At(i.sharedEvidence)?!1:Dt(t,r)}function Dt(e,i){let t=Oe(e),r=Oe(i);if(t.length===0||r.length===0)return!1;let n=new Set(r),s=t.filter(a=>n.has(a)).length;return s>=2&&s/Math.min(t.length,r.length)>=.5}function Oe(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).map(i=>i.toLowerCase()).filter(i=>i.length>=2)}var vt=new Set(["bytes","crypto","hex","num","random","secret","to","token"]);function At(e){return e.length>=3&&e.every(i=>vt.has(i.toLowerCase()))}function He(e,i){let t=i[0],r=Math.round(t.similarity*100);return i.length===1?`${e.shortName} (${e.file}) is ${r}% similar to established ${t.otherShort} (${t.otherFile})`:`${e.shortName} (${e.file}) resembles ${i.length} established symbol(s); strongest is ${r}% similar to ${t.otherShort} (${t.otherFile})`}function ze(e,i){let t=[`${e.shortName} was changed in this diff.`];for(let r of i.slice(0,3))t.push(`${r.otherShort} is outside this diff and scored ${Math.round(r.similarity*100)}% similar by ${r.similarityBasis} evidence.`),t.push(`Shared evidence: ${r.sharedEvidence.slice(0,5).join(", ")||"(none listed)"}.`);return i.length>3&&t.push(`${i.length-3} additional similar match(es) grouped into this finding.`),t}function Ve(e,i,t){return e==="direct"?`Extract or reuse the shared behavior with ${t}, or keep the duplicate with a suppression reason.`:`Review whether ${i} is intentionally parallel to the established implementation(s); extract shared behavior only if the product semantics match.`}function xt(e,i,t,r,n,s,a,c){let l=Ge(e,{base:i,maxHelpers:r,diffPlan:t,scanLimit:n,semantic:s,baseContentAt:a});if(!l.available){c.skipped.push({check:"incomplete-migration",reason:"no git history"});return}c.checksRun.push("incomplete-migration"),l.note&&c.skipped.push({check:"incomplete-migration",reason:l.note});for(let o of l.findings){let f=o.leftovers.map(d=>`${d.shortName} (${d.file}, ${Math.round(d.containment*100)}% helper / ${Math.round(d.siteCoverage*100)}% site, ${d.migrationScope})`).join(", "),h=o.leftovers.map(d=>`${d.shortName}: ${d.migrationScope} (${d.migrationScopeReasons[0]})`).join("; "),u=[...o.migratedFiles,...o.leftovers.map(d=>d.file)],p=o.leftovers.length===0?void 0:Math.max(...o.leftovers.map(d=>Math.min(d.containment,d.siteCoverage))),m=o.leftovers.some(d=>d.migrationScope==="possible-subtype"),y=b("incomplete-migration",o.helperSymbol,o.helperFile,u.join("|")),S=b("incomplete-migration",o.helperSymbol,o.helperFile);R(c,{id:S,legacySuppressionIds:y===S?void 0:[y],check:"incomplete-migration",severity:"warning",evidence:"heuristic",confidence:p,file:o.helperFile,symbol:o.helperSymbol,relatedFiles:u,message:`new helper ${o.helperShortName} (${o.helperFile}) is wired into ${o.migratedFiles.length} file(s), but ${o.leftovers.length} similar un-migrated site(s) remain: ${f}`,why:[`${o.helperShortName} is new in this diff and already referenced by ${o.migratedFiles.join(", ")}.`,`Helper shape: ${o.helperShape}; ${o.specificHelperCalleeCount}/${o.helperCalleeCount} helper callees are specific enough to score.`,`Unchanged site(s) still contain the helper's callee pattern: ${f}.`,`Migration scope hints: ${h}.`],remediation:m?`Migrate same-scope sites to ${o.helperShortName}; review possible subtype/variant sites before applying the helper.`:`Migrate the remaining sites to ${o.helperShortName}, or confirm they are intentionally different.`})}}function Tt(e,i,t,r,n,s){let a=se(e,{historyMode:n}).directionalCoChangePairsForFiles(i,{minTogether:t,minConfidence:0,maxFilesPerCommit:20});if(!a){s.skipped.push({check:"co-change-partner",reason:"no git history"});return}s.checksRun.push("co-change-partner");let c=new Set,l;for(let o of a){let f=i.has(o.fileA),h=i.has(o.fileB);if(f===h)continue;let u=f?o.fileA:o.fileB,p=f?o.fileB:o.fileA,m=f?o.changesA:o.changesB,y=m>0?o.together/m:0;if(y<r||H(p)||H(u)||!L(`${e.config.projectRoot}/${p}`))continue;let S=`${u}|${p}`;if(c.has(S))continue;c.add(S);let d=b("co-change-partner",u,p,String(o.together)),w=b("co-change-partner",u,p),$=ae(u,p),C=ce({fileA:u,fileB:p,together:o.together,confidence:y,commitScope:o.commitScope,recency:o.recency,subjectContext:o.subjectContext},$,(l??=le(e))(u,p)),T=[u,p].sort().join("|");s.findings.push({id:w,legacySuppressionIds:d===w?void 0:[d],check:"co-change-partner",severity:"warning",evidence:"change-graph",actionTier:"signal",groupKey:`co-change-partner:${T}`,confidence:y,file:u,relatedFiles:[p],sourceAnalyzer:"co-change",rootCauseKey:T,partnerClass:$.partnerClass,partnerClassReasons:$.reasons,commitScope:o.commitScope,recency:o.recency,focusedTogether:o.focusedTogether,broadTogether:o.broadTogether,broadCommitRatio:o.broadCommitRatio,lastTogetherAt:o.lastTogetherAt,recentTogether:o.recentTogether,subjectContext:o.subjectContext,...C?{declaredCouplingSuggestion:C}:{},message:`${u} changed, but ${p} did not \u2014 they change together ${o.together}x (${Math.round(y*100)}% of the time)`,why:[`${u} is in this diff and ${p} is not.`,`Git history shows ${o.together} co-change(s), which is ${Math.round(y*100)}% of changes to the edited side.`,`History context: ${Gt(o)}.`,`Subject context: ${Nt(o.subjectContext)}.`,...jt(o),`Partner class: ${$.partnerClass} (${$.reasons.join("; ")}).`],remediation:C?`Update ${p} alongside this change, declare the coupling "${C.name}", or confirm the coupling no longer holds.`:`Update ${p} alongside this change, or confirm the coupling no longer holds.`})}}function It(e,i,t,r,n){n.checksRun.push("twin-partner");let s=ye(e,{scanLimit:r}).filter(l=>l.relationship==="divergent"||l.relationship==="identical");if(s.length===0)return;let a=new Map;for(let l of s)for(let o of l.members)a.set(o.symbol,l);let c=new Set;for(let l of i){if(!O(l.symbol))continue;let o=a.get(l.symbol);if(!o)continue;let f=o.members.filter(m=>m.symbol!==l.symbol&&!t.has(m.file));if(f.length===0)continue;let h=[l.symbol,...f.map(m=>m.symbol)].sort().join("|");if(c.has(h))continue;c.add(h);let u=f[0],p=b("twin-partner",l.symbol,l.file,u.symbol);R(n,{id:p,groupKey:`twin-partner:${h}`,check:"twin-partner",severity:"warning",evidence:"heuristic",actionTier:"signal",advisory:!0,confidence:o.relationship==="identical"?1:Math.max(0,1-o.maxDivergence),file:l.file,symbol:l.symbol,relatedFiles:f.map(m=>m.file).sort(),sourceAnalyzer:"twin-drift",rootCauseKey:h,message:`${l.shortName} (${l.file}) changed but its same-name twin ${u.shortName} (${u.file}) did not \u2014 verify the change shouldn't apply to both, or consolidate them.`,why:[`${l.symbol} is in this diff.`,`${u.symbol} shares its (near-)name and is classified '${o.relationship}' with it, but ${u.file} is not in this diff.`,o.relationship==="divergent"?`The two bodies already diverge (~${Math.round(o.maxDivergence*100)}% token difference) \u2014 this diff may widen or narrow that drift.`:"The two bodies were byte-identical before this diff.","Advisory: twin-partner never fails the gate by itself \u2014 see the twin-partner entry in the diff-gate checks table."],remediation:`Update ${u.file} alongside this change, consolidate ${l.shortName}/${u.shortName} into one helper, or confirm the twin should diverge on purpose.`})}}function Et(e,i,t){t.checksRun.push("coverage-contract");let r=e.config.coverageContracts??[];for(let n of r){if(!Se(n,i))continue;let s=be(e,n);if(s.status==="ok")continue;let a=b("coverage-contract",n.name,n.file);R(t,{id:a,groupKey:`coverage-contract:${n.name}`,check:"coverage-contract",severity:s.status==="unavailable"?"warning":"error",evidence:"graph-fact",actionTier:"direct",file:n.file,sourceAnalyzer:"coverage-contracts",rootCauseKey:n.name,message:Ce(s),why:[`Contract "${n.name}" declares that ${n.file} (${n.keys.type}) must track ${n.mustEqual.type}.`,s.status==="unavailable"?`The declared side could not be evaluated: ${s.unavailableReason}.`:`Missing: ${s.missing.join(", ")||"none"}. Extra: ${s.extra.join(", ")||"none"}.`,"Either side of this contract changed in this diff."],remediation:s.status==="unavailable"?"Investigate why the declared key set could not be parsed (see the reason above) \u2014 do not treat this as a pass.":`Update ${n.file} so its ${n.keys.type==="object-literal-keys"||n.keys.type==="string-array"?n.keys.identifier:n.keys.marker} matches ${n.mustEqual.type}, or fix the ground-truth source if the declared set is right.`})}}function Gt(e){return`${e.commitScope}/${e.recency}; ${e.focusedTogether} focused, ${e.broadTogether} broad-sweep (${Math.round(e.broadCommitRatio*100)}% broad), ${e.recentTogether} recent, last ${Bt(e.lastTogetherAt)}`}function Nt(e){let i=e.subjectLabels.length>0?e.subjectLabels.slice(0,5).join(", "):"none inferred",t=e.issueRefs.length>0?e.issueRefs.slice(0,5).join(", "):"none",r=e.sampleSubjects.length>0?e.sampleSubjects.slice(0,3).map(n=>`"${n}"`).join("; "):"none";return`labels ${i}; refs ${t}; samples ${r}; external issue/PR labels ${e.externalIssueLabelStatus}`}function jt(e){let i=[];return e.commitScope==="broad-sweep"&&i.push("Broad-sweep history is weaker than focused co-edits; confirm this is a real coordination contract."),e.recency==="stale"&&i.push("The pair has no co-change in the recent history window; confirm the coupling still holds."),i}function Bt(e){return e<=0?"unknown":new Date(e*1e3).toISOString().slice(0,10)}var Z=3;function Pt(e,i,t,r,n,s){s.checksRun.push("doc-reference");let a=D.referenceTargets(e,i,r);if(a.size===0)return;let c=new Set(n.map(o=>o.from)),l=[];for(let o of he(e,a))t.has(o.doc)||pe(e,o.doc)||l.push(Kt(e,o,c));for(let o of Mt(l))R(s,o)}function Kt(e,i,t){let r=i.citedClaims.length>0?i.citedClaims:D.citationContexts(e,i.doc,i.cited),n=D.classifyCitation(r),s=D.hasLineAnchoredCitation(i.citations),a=i.cited.some(h=>t.has(h)||!L(`${e.config.projectRoot}/${h}`)),c=!(s||a),l=i.cited[0]??"",o=b("doc-reference",i.doc,i.cited.join("|")),f=b("doc-reference",i.doc,l);return{id:f,legacySuppressionIds:o===f?void 0:[o],check:"doc-reference",severity:"warning",evidence:"change-graph",actionTier:n.actionTier,groupKey:`doc-reference:${l}`,rootCauseKey:l,confidence:1,file:i.doc,relatedFiles:i.cited,citationKind:n.citationKind,citationKindReasons:n.reasons,citedClaims:r,...c?{advisory:!0}:{},message:`${i.doc} cites ${i.cited.join(", ")} as ${D.citationKindLabel(n.citationKind)} \u2014 changed in this diff, doc untouched`,why:[`${i.cited.join(", ")} changed in this diff.`,`${i.doc} cites the changed file(s) but was not updated in the same diff.`,...n.reasons.map(h=>`Citation kind evidence: ${h}`),c?"Advisory: bare file-mention citation (no line anchor, cited file still present under the same path) \u2014 21.2 calibration found this citation shape low-precision; verify at your leisure.":s?"Blocking: citation includes a line anchor that may now point at the wrong lines.":"Blocking: the cited file was deleted or renamed in this diff \u2014 the citation almost certainly needs an update."],remediation:D.citationRemediation(n.citationKind,i.doc)}}function Mt(e){let i=new Map;for(let r of e){let n=r.rootCauseKey??"",s=i.get(n);s?s.push(r):i.set(n,[r])}let t=[];for(let[r,n]of i)n.length<=Z?t.push(...n):t.push(Lt(r,n));return t}function Lt(e,i){let t=[...i].sort((f,h)=>(f.file??"").localeCompare(h.file??"")),r=t.slice(0,Z).map(f=>({doc:f.file??"",citedClaims:f.citedClaims??[]})),n=t.length-r.length,s=t.every(f=>f.advisory===!0),a=t.reduce((f,h)=>Ue(f,h.severity),"info"),c=t.reduce((f,h)=>qe(f,h.actionTier),void 0),l=t.map(f=>f.file??"").filter(f=>f.length>0),o=[...new Set(t.flatMap(f=>[f.id,...f.legacySuppressionIds??[]]))];return{id:b("doc-reference","hub-cluster",e),memberFindingIds:o,check:"doc-reference",severity:a,evidence:"change-graph",actionTier:c,groupKey:`doc-reference:${e}`,rootCauseKey:e,confidence:1,file:r[0]?.doc,relatedFiles:[e],citationCount:t.length,citationExemplars:r,suppressedCount:n,...s?{advisory:!0}:{},message:`${e} is cited by ${t.length} doc(s) changed in this diff, doc(s) untouched \u2014 showing ${r.length} example(s), ${n} more damped`,why:[`${e} changed in this diff.`,`${t.length} doc(s) cite it but were not updated in the same diff: ${l.join(", ")}.`,...r.map(f=>`Example \u2014 ${f.doc}: ${f.citedClaims[0]??"(no captured citation text)"}`),`${n} additional doc(s) also cite this file, past the per-hub-file cascade cap (${Z}) \u2014 not silently dropped: counted in citationCount/suppressedCount and individually addressable via memberFindingIds.`,s?"Advisory: every citation in this cluster is a bare file-mention (no line anchor, cited file still present).":"Blocking: at least one citation in this cluster is line-anchored or cites a deleted/renamed file."],remediation:`Review the ${r.length} example doc(s) above; ${t.length} total doc(s) cite ${e} the same way \u2014 see citationExemplars and memberFindingIds in --json for the complete list.`}}function _t(e,i,t){t.checksRun.push("unused-params");for(let r of Ne(e,{files:i,limit:50})){let n=b("unused-params",r.symbol,r.file,r.unusedTrailing.join("|")),s=b("unused-params",r.symbol,r.file);R(t,{id:s,legacySuppressionIds:n===s?void 0:[n],check:"unused-params",severity:"warning",evidence:"heuristic",confidence:.85,file:r.file,startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,message:`${r.shortName} (${r.file}) has trailing unused parameter(s): ${r.unusedTrailing.join(", ")}`,why:[`${r.shortName} is in a changed file.`,`The trailing parameter(s) ${r.unusedTrailing.join(", ")} are not referenced in the function body.`],remediation:"Drop the unused trailing parameters and their call-site arguments."})}}function Ot(e,i,t,r){r.checksRun.push("new-dead");let n=new oe(e),s=Q(e.config.projectRoot),a=s.length>1;for(let c of i){if(t(c)||c.fanIn>0||n.fileKind(c.file)==="test"||I(e,c.file)||E(e,c.symbol,c.file)||Vt(c.symbol))continue;let l=b("new-dead",c.symbol,c.file),o=a&&Ht(s,c.file)&&zt(e,c.symbol);R(r,{id:l,check:"new-dead",severity:"warning",evidence:o?"heuristic":"graph-fact",confidence:o?.4:.9,file:c.file,symbol:c.symbol,message:o?`${c.shortName} (${c.file}) unconfirmed (cross-package ambiguous-name resolution gap): zero indexed consumers found, but this name is ambiguous project-wide and lives in a workspace package \u2014 verify manually before treating as dead`:`${c.shortName} (${c.file}) was changed but has zero indexed consumers`,why:o?[`${c.shortName} is a changed production symbol in a workspace package.`,"The index, semantic, and source-fallback layers all report zero consumers for this symbol.","Its leaf name is ambiguous project-wide (a same-named definition exists elsewhere), and cross-package consumers reached only through a re-exporting barrel are a known unresolvable shape for this tool \u2014 see docs/plans/2026-07-02-followups.md item 2."]:[`${c.shortName} is a changed production symbol.`,"The index reports zero consumers for this symbol.","The symbol is not in a detected entry surface or configured live root."],remediation:o?"Verify with a direct code search before deleting; this tool cannot confidently resolve this symbol.":"Wire it up, or remove it before it becomes permanent dead code."})}}function Ht(e,i){return e.some(t=>i===t.relativeDir||i.startsWith(`${t.relativeDir}/`))}function zt(e,i){let t=v(i);return t?(ne(e).get(t)?.length??0)>1:!1}function Vt(e){if(ie(e)!=="type")return!1;let i=v(e);return i.startsWith("_Assert")||i.startsWith("Assert")}function Ut(e,i,t,r){let n=new Map(t.renamedFiles.map(a=>[a.to,a.from])),s=r??z(e,i,V(t));return a=>{let c=n.get(a.file)??a.file,l=v(a.symbol);if(!l)return!1;let o=s(c);return o!==null&&qt(o,l)}}function qt(e,i){return new RegExp(`\\b${te(i)}\\b`).test(e)}function Wt(e,i){if(!L(x(e))){i.skipped.push({check:"baseline",reason:"no .scipquery-baseline.json \u2014 run health --write-baseline to enable"});return}i.checksRun.push("baseline");let t=Be(e);for(let r of t.newFindings.filter(n=>!n.startsWith(N))){let n=U(r),s=b("baseline",r);R(i,{id:s,groupKey:`baseline:${n.sourceAnalyzer}:${n.rootCauseKey}`,check:"baseline",severity:"error",evidence:"baseline",actionTier:n.actionTier,confidence:1,file:n.file,relatedFiles:n.relatedFiles.length>0?n.relatedFiles:void 0,sourceAnalyzer:n.sourceAnalyzer,rootCauseKey:n.rootCauseKey,message:`new ${n.label} vs committed baseline: ${r}`,why:["A committed health baseline exists.","The current health result contains a finding not present in that baseline.",`Underlying analyzer: ${n.sourceAnalyzer}.`,`Inherited action tier: ${n.actionTier}.`,`Root cause key: ${n.rootCauseKey}.`,...n.why],remediation:n.remediation})}}function Jt(e,i){if(!$e(e.config.architecture)){i.skipped.push({check:"architecture",reason:"no closed architecture dependency rows, requireCompletePolicy rule, or requireAcyclic rule configured"});return}if(!L(x(e))){i.skipped.push({check:"architecture",reason:"no .scipquery-baseline.json \u2014 run health --write-baseline to enable"});return}i.checksRun.push("architecture");let t=Pe(e);for(let r of t.newFindings){let n=U(r),s=b("architecture",r);R(i,{id:s,groupKey:`architecture:${n.rootCauseKey}`,check:"architecture",severity:"error",evidence:"baseline",actionTier:"direct",confidence:1,sourceAnalyzer:"architecture",rootCauseKey:n.rootCauseKey,message:`new ${n.label} vs committed baseline: ${r}`,why:["The project declares an enforceable architecture rule.","The current boundary graph contains a violation not present in the committed baseline.",...n.why],remediation:n.remediation})}}function b(e,...i){return`SQ${St("sha256").update([e,...i].join("\0")).digest("hex").slice(0,12).toUpperCase()}`}export{je as a,yi as b,Be as c,Pe as d,en as e,tn as f,nn as g,rn as h,Ut as i};
|
|
2
|
-
//# sourceMappingURL=chunk-HEBAY673.js.map
|
package/dist/chunk-HELS7KFF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{execFileSync as l,spawnSync as P}from"child_process";import{platform as g}from"os";var a=g()==="win32";function i(e){let n=a?"where":"which";try{return l(n,[e],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}),!0}catch{return!1}}var m=/\.(?:c|m)?js$/i,f=/\.(?:exe|com)$/i;function E(e,n){return m.test(e)?{binary:process.execPath,args:[e,...n]}:{binary:e,args:[...n]}}function d(e,n){return l(e,n,{stdio:["ignore","pipe","ignore"],encoding:"utf8",timeout:1e4,killSignal:"SIGKILL"})}function _(e,n={}){let r=n.isWindows??a,p=n.lookup??d,o;try{o=p(r?"where":"which",[e])}catch{return null}let s=o.split(/\r?\n/).map(t=>t.trim()).filter(Boolean);return r?s.find(t=>f.test(t))??null:s[0]??null}import{execFileSync as c}from"child_process";import{createRequire as h}from"module";import{existsSync as S}from"fs";import{platform as u,arch as w}from"os";var y="https://github.com/sourcegraph/scip",v="SCIP_QUERY_SCIP_BIN";function x(e){if(e.isOnPath("scip"))return{source:"path",path:"scip"};let n=e.env[v];if(n&&e.fileExists(n))return{source:"env",path:n};if(e.platform==="win32"){let r=e.resolveSidecar(e.arch);if(r&&e.fileExists(r))return{source:"sidecar",path:r}}return null}function b(e){let n=h(import.meta.url);for(let r of e==="arm64"?["arm64","x64"]:[e])try{return n.resolve(`scip-query-scip-windows/scip-win32-${r}.exe`)}catch{}return null}function k(e=process.env){return x({platform:u(),arch:w(),env:e,isOnPath:i,fileExists:S,resolveSidecar:b})?.path??null}function O(e){if(u()==="darwin"&&i("brew")){e("Installing scip CLI via Homebrew...");try{if(c("brew",["install","sourcegraph/scip/scip"],{stdio:"inherit",timeout:3e5,env:process.env}),i("scip"))return e("Successfully installed scip CLI via Homebrew"),!0}catch(n){let r=n instanceof Error?n.message:String(n);e(`Homebrew install failed: ${r}`)}}if(i("go")){e("Installing scip CLI via go install...");try{if(c("go",["install","github.com/sourcegraph/scip/cmd/scip@latest"],{stdio:"inherit",timeout:3e5,env:process.env}),i("scip"))return e("Successfully installed scip CLI via go install"),!0}catch(n){let r=n instanceof Error?n.message:String(n);e(`go install failed: ${r}`)}}return e("Could not auto-install scip CLI."),e(`Install manually from: ${y}/releases`),!1}export{i as a,E as b,_ as c,k as d,O as e};
|
|
2
|
-
//# sourceMappingURL=chunk-HELS7KFF.js.map
|
package/dist/chunk-IPDCSB6N.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-N3SE646F.js";import{a as h}from"./chunk-2OXVAGGT.js";import{d as g}from"./chunk-ZTTISZ7J.js";import{readFileSync as f}from"fs";import{extname as y,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=L(e);if(r)return j(t,r.filePath,r.startLine,r.endLine,s);let i=h(t,e);return i?R(t,i,s):null}function L(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function R(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),i;try{i=f(r,"utf-8")}catch{return null}let n=i.split(`
|
|
2
|
-
`),c=Math.max(0,e.startLine-a),l=Math.min(n.length-1,e.endLine+a),u=n.slice(c,l+1).join(`
|
|
3
|
-
`);return{symbol:e.symbol,shortName:g(e.symbol),relativePath:e.relativePath,startLine:c,endLine:l,language:s?.language??v(e.relativePath),source:u}}function j(t,e,a,s,r){let i=m(t,e);if(!i)return null;let n=t.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",i);if(!n)return null;let c=d(t.config.projectRoot,n.relative_path),l;try{l=f(c,"utf-8")}catch{return null}let u=l.split(`
|
|
4
|
-
`),o=Math.max(0,a-1-r),p=Math.min(u.length-1,s-1+r),b=u.slice(o,p+1).join(`
|
|
5
|
-
`);return{symbol:`${n.relative_path}:${a}-${s}`,shortName:`${n.relative_path}:${a}-${s}`,relativePath:n.relative_path,startLine:o,endLine:p,language:n.language??v(n.relative_path),source:b}}function v(t){switch(y(t).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{M as a};
|
|
6
|
-
//# sourceMappingURL=chunk-IPDCSB6N.js.map
|