@vibgrate/cli 2026.727.1 → 2026.727.3
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/DOCS.md +21 -18
- package/README.md +2 -2
- package/dist/baseline-ATM5MXBZ.js +8 -0
- package/dist/{baseline-K7YBFKZI.js.map → baseline-ATM5MXBZ.js.map} +1 -1
- package/dist/{chunk-OXQNQW5J.js → chunk-2VFWXNS5.js} +4 -4
- package/dist/{chunk-OXQNQW5J.js.map → chunk-2VFWXNS5.js.map} +1 -1
- package/dist/{chunk-VXGV6NTD.js → chunk-3V24O47U.js} +11 -9
- package/dist/chunk-3V24O47U.js.map +1 -0
- package/dist/{chunk-C4CKTAZP.js → chunk-6JIKUDWM.js} +4 -4
- package/dist/chunk-6JIKUDWM.js.map +1 -0
- package/dist/{chunk-6IOQJGFT.js → chunk-6UK6QPTR.js} +96 -140
- package/dist/chunk-6UK6QPTR.js.map +1 -0
- package/dist/chunk-6UQMXIAG.js +122 -0
- package/dist/chunk-6UQMXIAG.js.map +1 -0
- package/dist/{chunk-SZLF66FJ.js → chunk-77LYGXBI.js} +5 -5
- package/dist/{chunk-SZLF66FJ.js.map → chunk-77LYGXBI.js.map} +1 -1
- package/dist/{chunk-KHJO4D5N.js → chunk-7N4Y3E47.js} +2 -2
- package/dist/{chunk-KHJO4D5N.js.map → chunk-7N4Y3E47.js.map} +1 -1
- package/dist/{chunk-65MEOA4E.js → chunk-AVQSHIJ5.js} +22 -18
- package/dist/chunk-AVQSHIJ5.js.map +1 -0
- package/dist/chunk-B3YUO3NW.js +469 -0
- package/dist/chunk-B3YUO3NW.js.map +1 -0
- package/dist/{chunk-YDAT7LD2.js → chunk-C66GOHYB.js} +18 -10
- package/dist/chunk-C66GOHYB.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +10 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/{chunk-HYZVHJ3Q.js → chunk-FFWGT55D.js} +4 -4
- package/dist/{chunk-HYZVHJ3Q.js.map → chunk-FFWGT55D.js.map} +1 -1
- package/dist/{chunk-4CQ3MGNN.js → chunk-HK3AWUXH.js} +3 -3
- package/dist/{chunk-4CQ3MGNN.js.map → chunk-HK3AWUXH.js.map} +1 -1
- package/dist/{chunk-S6CYDZEW.js → chunk-MAY5HLDH.js} +772 -200
- package/dist/chunk-MAY5HLDH.js.map +1 -0
- package/dist/{chunk-7JHPQ6WF.js → chunk-OFUC6RYN.js} +3 -3
- package/dist/{chunk-7JHPQ6WF.js.map → chunk-OFUC6RYN.js.map} +1 -1
- package/dist/{chunk-3Q7QBWFW.js → chunk-ON25BX6T.js} +9 -3
- package/dist/chunk-ON25BX6T.js.map +1 -0
- package/dist/{chunk-JZYGEZTU.js → chunk-XPJZTSY7.js} +3 -3
- package/dist/{chunk-JZYGEZTU.js.map → chunk-XPJZTSY7.js.map} +1 -1
- package/dist/{chunk-WLETRGAC.js → chunk-Y23HMSWU.js} +11 -11
- package/dist/{chunk-WLETRGAC.js.map → chunk-Y23HMSWU.js.map} +1 -1
- package/dist/{chunk-3BVSDMHV.js → chunk-Z7GP7XTJ.js} +8 -8
- package/dist/{chunk-3BVSDMHV.js.map → chunk-Z7GP7XTJ.js.map} +1 -1
- package/dist/{chunk-EDAAG7BL.js → chunk-ZBTY6VV4.js} +4 -3
- package/dist/chunk-ZBTY6VV4.js.map +1 -0
- package/dist/chunk-ZKNB4YH4.js +102 -0
- package/dist/chunk-ZKNB4YH4.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +475 -404
- package/dist/cli.js.map +1 -1
- package/dist/{execution-env-3BN7Z737.js → execution-env-ZU45JZ4G.js} +3 -2
- package/dist/{execution-env-3BN7Z737.js.map → execution-env-ZU45JZ4G.js.map} +1 -1
- package/dist/{federation-EPZDUWCK.js → federation-SZWZIFZ7.js} +3 -2
- package/dist/{federation-EPZDUWCK.js.map → federation-SZWZIFZ7.js.map} +1 -1
- package/dist/{fs-IPY4FJKH.js → fs-B5HZ2MIU.js} +3 -2
- package/dist/fs-B5HZ2MIU.js.map +1 -0
- package/dist/{fs-KCABDURV.js → fs-O5IQYXHO.js} +3 -2
- package/dist/fs-O5IQYXHO.js.map +1 -0
- package/dist/{git-ref-HPRLUFFW.js → git-ref-XDXB6JP5.js} +3 -2
- package/dist/{git-ref-HPRLUFFW.js.map → git-ref-XDXB6JP5.js.map} +1 -1
- package/dist/graph-backend-UTOL3SHE.js +11 -0
- package/dist/{graph-backend-ZMSYOZMW.js.map → graph-backend-UTOL3SHE.js.map} +1 -1
- package/dist/index.d.ts +53 -17
- package/dist/index.js +11 -10
- package/dist/index.js.map +1 -1
- package/dist/{interactive-ICL7D7LO.js → interactive-INGJNSON.js} +23 -22
- package/dist/interactive-INGJNSON.js.map +1 -0
- package/dist/{llm-host-2RAYQSDQ.js → llm-host-7GWDO6IX.js} +3 -2
- package/dist/{llm-host-2RAYQSDQ.js.map → llm-host-7GWDO6IX.js.map} +1 -1
- package/dist/load-QPOWQD7C.js +8 -0
- package/dist/{load-OHVKDX4R.js.map → load-QPOWQD7C.js.map} +1 -1
- package/dist/local-runtime-5O2NN3GA.js +5 -0
- package/dist/{local-runtime-OJFLX2HI.js.map → local-runtime-5O2NN3GA.js.map} +1 -1
- package/dist/mcp-tools-I7JK3S2M.js +4 -0
- package/dist/{mcp-tools-I6PME3AV.js.map → mcp-tools-I7JK3S2M.js.map} +1 -1
- package/dist/{model-execution-profile-MQ2QCP24.js → model-execution-profile-TFBKCNJG.js} +3 -2
- package/dist/{model-execution-profile-MQ2QCP24.js.map → model-execution-profile-TFBKCNJG.js.map} +1 -1
- package/dist/{model-orchestrator-FFTZI3U2.js → model-orchestrator-TVONAUPS.js} +5 -4
- package/dist/{model-orchestrator-FFTZI3U2.js.map → model-orchestrator-TVONAUPS.js.map} +1 -1
- package/dist/parse-worker.d.ts +1 -1
- package/dist/parse-worker.js +2 -1
- package/dist/parse-worker.js.map +1 -1
- package/dist/{paths-MCH75O3G.js → paths-2RAH3GME.js} +3 -2
- package/dist/{paths-MCH75O3G.js.map → paths-2RAH3GME.js.map} +1 -1
- package/dist/{resolve-gguf-4UPIGPEE.js → resolve-gguf-VPL4YQ6J.js} +3 -2
- package/dist/{resolve-gguf-4UPIGPEE.js.map → resolve-gguf-VPL4YQ6J.js.map} +1 -1
- package/dist/runtime-session-4AMZIAAG.js +18 -0
- package/dist/{runtime-session-IDU5BDUJ.js.map → runtime-session-4AMZIAAG.js.map} +1 -1
- package/dist/session-M72522AP.js +11 -0
- package/dist/{session-L2OSDRPI.js.map → session-M72522AP.js.map} +1 -1
- package/dist/session-store-WFBX7HXL.js +4 -0
- package/dist/{session-store-W5RZZHA3.js.map → session-store-WFBX7HXL.js.map} +1 -1
- package/dist/sql-extract-JELDZA6W.js +81 -0
- package/dist/sql-extract-JELDZA6W.js.map +1 -0
- package/dist/{stream-json-F74W5FCK.js → stream-json-6ZBUA2L3.js} +11 -10
- package/dist/stream-json-6ZBUA2L3.js.map +1 -0
- package/dist/{types-ZMg1mSuu.d.ts → types-DLH-Ritr.d.ts} +22 -1
- package/dist/ui-Q6DJ3GCU.js +5 -0
- package/dist/ui-Q6DJ3GCU.js.map +1 -0
- package/dist/{vgd-EGBQD7BW.js → vgd-CVLKBS7K.js} +7 -6
- package/dist/vgd-CVLKBS7K.js.map +1 -0
- package/package.json +1 -1
- package/dist/baseline-K7YBFKZI.js +0 -7
- package/dist/chunk-3Q7QBWFW.js.map +0 -1
- package/dist/chunk-5Q54GEHM.js +0 -29
- package/dist/chunk-5Q54GEHM.js.map +0 -1
- package/dist/chunk-65MEOA4E.js.map +0 -1
- package/dist/chunk-6IOQJGFT.js.map +0 -1
- package/dist/chunk-C4CKTAZP.js.map +0 -1
- package/dist/chunk-EDAAG7BL.js.map +0 -1
- package/dist/chunk-EDBV33B7.js +0 -57
- package/dist/chunk-EDBV33B7.js.map +0 -1
- package/dist/chunk-HABUT7HW.js +0 -233
- package/dist/chunk-HABUT7HW.js.map +0 -1
- package/dist/chunk-S6CYDZEW.js.map +0 -1
- package/dist/chunk-VXGV6NTD.js.map +0 -1
- package/dist/chunk-YDAT7LD2.js.map +0 -1
- package/dist/fs-IPY4FJKH.js.map +0 -1
- package/dist/fs-KCABDURV.js.map +0 -1
- package/dist/graph-backend-ZMSYOZMW.js +0 -10
- package/dist/interactive-ICL7D7LO.js.map +0 -1
- package/dist/load-OHVKDX4R.js +0 -7
- package/dist/local-runtime-OJFLX2HI.js +0 -4
- package/dist/mcp-tools-I6PME3AV.js +0 -3
- package/dist/runtime-session-IDU5BDUJ.js +0 -17
- package/dist/session-L2OSDRPI.js +0 -10
- package/dist/session-store-W5RZZHA3.js +0 -3
- package/dist/stream-json-F74W5FCK.js.map +0 -1
- package/dist/ui-HOVOPWMX.js +0 -4
- package/dist/ui-HOVOPWMX.js.map +0 -1
- package/dist/vgd-EGBQD7BW.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"mcp-tools-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mcp-tools-I7JK3S2M.js"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { MODEL_EXECUTION_PROFILE_SCHEMA_VERSION, defaultModelExecutionProfile, mergeModelExecutionProfile, parseModelExecutionProfile, resolveModelExecutionProfile } from './chunk-IZDH67DX.js';
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=model-execution-profile-
|
|
2
|
+
import './chunk-DGUM43GV.js';
|
|
3
|
+
//# sourceMappingURL=model-execution-profile-TFBKCNJG.js.map
|
|
4
|
+
//# sourceMappingURL=model-execution-profile-TFBKCNJG.js.map
|
package/dist/{model-execution-profile-MQ2QCP24.js.map → model-execution-profile-TFBKCNJG.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"model-execution-profile-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"model-execution-profile-TFBKCNJG.js"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { MODEL_ORCHESTRATOR_SCHEMA_VERSION, QUALIFIED_PACKS, activePin, buildOrchestratorStatus, fitPack, listModes, orchestratorStatePath, packById, packForMode, parseMode, pinPack, providerForBackend, readOrchestratorState, recommendMode, resolveMode, setDefaultMode, unpinPack, writeOrchestratorState } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { MODEL_ORCHESTRATOR_SCHEMA_VERSION, QUALIFIED_PACKS, activePin, buildOrchestratorStatus, fitPack, listModes, orchestratorStatePath, packById, packForMode, parseMode, pinPack, providerForBackend, readOrchestratorState, recommendMode, resolveMode, setDefaultMode, unpinPack, writeOrchestratorState } from './chunk-3V24O47U.js';
|
|
2
|
+
import './chunk-7N4Y3E47.js';
|
|
3
3
|
import './chunk-IZDH67DX.js';
|
|
4
4
|
import './chunk-BWPBB45M.js';
|
|
5
5
|
import './chunk-JFGYT6BI.js';
|
|
6
6
|
import './chunk-BPF3YX2U.js';
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=model-orchestrator-
|
|
7
|
+
import './chunk-DGUM43GV.js';
|
|
8
|
+
//# sourceMappingURL=model-orchestrator-TVONAUPS.js.map
|
|
9
|
+
//# sourceMappingURL=model-orchestrator-TVONAUPS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"model-orchestrator-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"model-orchestrator-TVONAUPS.js"}
|
package/dist/parse-worker.d.ts
CHANGED
package/dist/parse-worker.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { setGrammarsOverride, parseSource } from './chunk-
|
|
1
|
+
import { setGrammarsOverride, parseSource } from './chunk-ON25BX6T.js';
|
|
2
2
|
import './chunk-RXP66R2E.js';
|
|
3
3
|
import './chunk-JFGYT6BI.js';
|
|
4
|
+
import './chunk-DGUM43GV.js';
|
|
4
5
|
import * as fs from 'fs';
|
|
5
6
|
|
|
6
7
|
async function run(payload) {
|
package/dist/parse-worker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/engine/parse-worker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/engine/parse-worker.ts"],"names":[],"mappings":";;;;;;AA0BA,eAAO,IAA2B,OAAA,EAA6C;AAC7E,EAAA,mBAAA,CAAoB,QAAQ,WAAW,CAAA;AACvC,EAAA,MAAM,MAAmB,EAAC;AAC1B,EAAA,KAAA,MAAW,IAAA,IAAQ,QAAQ,KAAA,EAAO;AAChC,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,GAAY,EAAA,CAAA,YAAA,CAAa,IAAA,CAAK,GAAA,EAAK,MAAM,CAAA;AAC/C,MAAA,GAAA,CAAI,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,KAAK,IAAA,CAAK,IAAA,EAAM,MAAM,CAAC,CAAA;AAAA,IACzD,SAAS,GAAA,EAAK;AACZ,MAAA,GAAA,CAAI,IAAA,CAAK;AAAA,QACP,KAAK,IAAA,CAAK,GAAA;AAAA,QACV,MAAM,IAAA,CAAK,IAAA;AAAA,QACX,IAAA,EAAM,EAAA;AAAA,QACN,KAAA,EAAO,CAAA;AAAA,QACP,MAAM,EAAC;AAAA,QACP,OAAO,EAAC;AAAA,QACR,SAAS,EAAC;AAAA,QACV,UAAU,EAAC;AAAA,QACX,UAAU,EAAC;AAAA,QACX,QAAQ,EAAC;AAAA,QACT,QAAA,EAAU,CAAC,CAAA,cAAA,EAAkB,GAAA,CAAc,OAAO,CAAA,CAAE;AAAA,OACrD,CAAA;AAAA,IACH;AAAA,EACF;AACA,EAAA,OAAO,GAAA;AACT","file":"parse-worker.js","sourcesContent":["import * as fs from 'node:fs';\nimport { parseSource } from './parse.js';\nimport { setGrammarsOverride } from './grammars.js';\nimport type { FileParse } from './types.js';\n\n/**\n * tinypool worker entry. Receives a chunk of files, reads and parses each, and\n * returns the FileParse table. Each worker owns its own web-tree-sitter instance\n * (initialized lazily inside parseSource/grammars). Results are plain data, so\n * they serialize cleanly back to the main thread.\n *\n * The `--grammars <dir>` override is passed in the payload (env vars don't cross\n * into worker threads in a controlled way) and applied per worker before parsing.\n */\n\nexport interface ParseTask {\n rel: string;\n abs: string;\n lang: string;\n}\n\nexport interface ParsePayload {\n tasks: ParseTask[];\n grammarsDir?: string;\n}\n\nexport default async function run(payload: ParsePayload): Promise<FileParse[]> {\n setGrammarsOverride(payload.grammarsDir);\n const out: FileParse[] = [];\n for (const task of payload.tasks) {\n try {\n const source = fs.readFileSync(task.abs, 'utf8');\n out.push(await parseSource(task.rel, task.lang, source));\n } catch (err) {\n out.push({\n rel: task.rel,\n lang: task.lang,\n hash: '',\n bytes: 0,\n defs: [],\n calls: [],\n imports: [],\n heritage: [],\n typeRefs: [],\n guards: [],\n warnings: [`parse failed: ${(err as Error).message}`],\n });\n }\n }\n return out;\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { daemonDir, globalGraphPath, globalGraphPathForRef, repositoryIdFromRoot, repositoryStoreDir, resolveVibgratePaths, vibgrateCacheDir, vibgrateDataDir, vibgrateRuntimeDir } from './chunk-BWPBB45M.js';
|
|
2
2
|
import './chunk-JFGYT6BI.js';
|
|
3
3
|
import './chunk-BPF3YX2U.js';
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=paths-
|
|
4
|
+
import './chunk-DGUM43GV.js';
|
|
5
|
+
//# sourceMappingURL=paths-2RAH3GME.js.map
|
|
6
|
+
//# sourceMappingURL=paths-2RAH3GME.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"paths-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"paths-2RAH3GME.js"}
|
|
@@ -3,5 +3,6 @@ import './chunk-OOIG3RUM.js';
|
|
|
3
3
|
import './chunk-BWPBB45M.js';
|
|
4
4
|
import './chunk-JFGYT6BI.js';
|
|
5
5
|
import './chunk-BPF3YX2U.js';
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=resolve-gguf-
|
|
6
|
+
import './chunk-DGUM43GV.js';
|
|
7
|
+
//# sourceMappingURL=resolve-gguf-VPL4YQ6J.js.map
|
|
8
|
+
//# sourceMappingURL=resolve-gguf-VPL4YQ6J.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"resolve-gguf-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"resolve-gguf-VPL4YQ6J.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { startCodeRuntimeSession } from './chunk-XPJZTSY7.js';
|
|
2
|
+
import './chunk-77LYGXBI.js';
|
|
3
|
+
import './chunk-5I4VSBWQ.js';
|
|
4
|
+
import './chunk-IS7VTH2Q.js';
|
|
5
|
+
import './chunk-IZDH67DX.js';
|
|
6
|
+
import './chunk-PMYWZRRS.js';
|
|
7
|
+
import './chunk-K7REHDQS.js';
|
|
8
|
+
import './chunk-JIBOJTGS.js';
|
|
9
|
+
import './chunk-J7LKEB2R.js';
|
|
10
|
+
import './chunk-6UK6QPTR.js';
|
|
11
|
+
import './chunk-B3YUO3NW.js';
|
|
12
|
+
import './chunk-ZKNB4YH4.js';
|
|
13
|
+
import './chunk-BWPBB45M.js';
|
|
14
|
+
import './chunk-JFGYT6BI.js';
|
|
15
|
+
import './chunk-BPF3YX2U.js';
|
|
16
|
+
import './chunk-DGUM43GV.js';
|
|
17
|
+
//# sourceMappingURL=runtime-session-4AMZIAAG.js.map
|
|
18
|
+
//# sourceMappingURL=runtime-session-4AMZIAAG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"runtime-session-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"runtime-session-4AMZIAAG.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { commitChanges, nodeCodeFs, runCodeSession, undoChanges } from './chunk-2VFWXNS5.js';
|
|
2
|
+
import './chunk-OFUC6RYN.js';
|
|
3
|
+
import './chunk-ZBTY6VV4.js';
|
|
4
|
+
import './chunk-6UK6QPTR.js';
|
|
5
|
+
import './chunk-ZKNB4YH4.js';
|
|
6
|
+
import './chunk-BWPBB45M.js';
|
|
7
|
+
import './chunk-JFGYT6BI.js';
|
|
8
|
+
import './chunk-BPF3YX2U.js';
|
|
9
|
+
import './chunk-DGUM43GV.js';
|
|
10
|
+
//# sourceMappingURL=session-M72522AP.js.map
|
|
11
|
+
//# sourceMappingURL=session-M72522AP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"session-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"session-M72522AP.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"session-store-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"session-store-WFBX7HXL.js"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { hashString } from './chunk-JFGYT6BI.js';
|
|
2
|
+
import './chunk-DGUM43GV.js';
|
|
3
|
+
|
|
4
|
+
// src/engine/sql-extract.ts
|
|
5
|
+
function parseSqlFile(rel, source) {
|
|
6
|
+
const defs = [];
|
|
7
|
+
const heritage = [];
|
|
8
|
+
const cleaned = source.replace(/\/\*[\s\S]*?\*\//g, (m2) => m2.replace(/[^\n]/g, " ")).replace(/--[^\n]*/g, "");
|
|
9
|
+
const tableRe = /\bCREATE\s+(?:OR\s+REPLACE\s+)?(?:TEMP(?:ORARY)?\s+)?TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?([`"[\w.]+)/gi;
|
|
10
|
+
const viewRe = /\bCREATE\s+(?:OR\s+REPLACE\s+)?(?:TEMP(?:ORARY)?\s+)?VIEW\s+(?:IF\s+NOT\s+EXISTS\s+)?([`"[\w.]+)/gi;
|
|
11
|
+
const fkRe = /\bFOREIGN\s+KEY\s*\([^)]+\)\s*REFERENCES\s+([`"[\w.]+)/gi;
|
|
12
|
+
const colRefRe = /\bREFERENCES\s+([`"[\w.]+)/gi;
|
|
13
|
+
let m;
|
|
14
|
+
while ((m = tableRe.exec(cleaned)) !== null) {
|
|
15
|
+
const name = stripIdent(m[1]);
|
|
16
|
+
if (!name) continue;
|
|
17
|
+
const line = lineOf(cleaned, m.index);
|
|
18
|
+
defs.push({
|
|
19
|
+
kind: "class",
|
|
20
|
+
name,
|
|
21
|
+
qualifiedName: name,
|
|
22
|
+
startLine: line,
|
|
23
|
+
endLine: line,
|
|
24
|
+
startByte: m.index,
|
|
25
|
+
endByte: m.index + m[0].length,
|
|
26
|
+
signature: `TABLE ${name}`
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
while ((m = viewRe.exec(cleaned)) !== null) {
|
|
30
|
+
const name = stripIdent(m[1]);
|
|
31
|
+
if (!name) continue;
|
|
32
|
+
const line = lineOf(cleaned, m.index);
|
|
33
|
+
defs.push({
|
|
34
|
+
kind: "interface",
|
|
35
|
+
name,
|
|
36
|
+
qualifiedName: name,
|
|
37
|
+
startLine: line,
|
|
38
|
+
endLine: line,
|
|
39
|
+
startByte: m.index,
|
|
40
|
+
endByte: m.index + m[0].length,
|
|
41
|
+
signature: `VIEW ${name}`
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const refSeen = /* @__PURE__ */ new Set();
|
|
45
|
+
for (const re of [fkRe, colRefRe]) {
|
|
46
|
+
re.lastIndex = 0;
|
|
47
|
+
while ((m = re.exec(cleaned)) !== null) {
|
|
48
|
+
const target = stripIdent(m[1]);
|
|
49
|
+
if (!target || refSeen.has(`${m.index}:${target}`)) continue;
|
|
50
|
+
refSeen.add(`${m.index}:${target}`);
|
|
51
|
+
heritage.push({ superName: target, byte: m.index, kind: "extends" });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
defs.sort((a, b) => a.startByte - b.startByte || a.name.localeCompare(b.name));
|
|
55
|
+
return {
|
|
56
|
+
rel,
|
|
57
|
+
lang: "sql",
|
|
58
|
+
hash: hashString(source),
|
|
59
|
+
bytes: Buffer.byteLength(source, "utf8"),
|
|
60
|
+
defs,
|
|
61
|
+
calls: [],
|
|
62
|
+
imports: [],
|
|
63
|
+
heritage,
|
|
64
|
+
typeRefs: [],
|
|
65
|
+
guards: []
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function stripIdent(raw) {
|
|
69
|
+
return raw.replace(/^[`"[]+|[`"\]]+$/g, "").split(".").pop() ?? raw;
|
|
70
|
+
}
|
|
71
|
+
function lineOf(source, index) {
|
|
72
|
+
let line = 1;
|
|
73
|
+
for (let i = 0; i < index && i < source.length; i++) {
|
|
74
|
+
if (source[i] === "\n") line++;
|
|
75
|
+
}
|
|
76
|
+
return line;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { parseSqlFile };
|
|
80
|
+
//# sourceMappingURL=sql-extract-JELDZA6W.js.map
|
|
81
|
+
//# sourceMappingURL=sql-extract-JELDZA6W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/engine/sql-extract.ts"],"names":["m"],"mappings":";;;;AAQO,SAAS,YAAA,CAAa,KAAa,MAAA,EAA2B;AACnE,EAAA,MAAM,OAAiB,EAAC;AACxB,EAAA,MAAM,WAA0B,EAAC;AAEjC,EAAA,MAAM,OAAA,GAAU,MAAA,CACb,OAAA,CAAQ,mBAAA,EAAqB,CAACA,EAAAA,KAAMA,EAAAA,CAAE,OAAA,CAAQ,QAAA,EAAU,GAAG,CAAC,CAAA,CAC5D,OAAA,CAAQ,aAAa,EAAE,CAAA;AAE1B,EAAA,MAAM,OAAA,GACJ,qGAAA;AACF,EAAA,MAAM,MAAA,GACJ,oGAAA;AACF,EAAA,MAAM,IAAA,GAAO,0DAAA;AACb,EAAA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AA,IACA,UAAU,EAAC;AAAA,IACX,QAAQ;AAAC,GACX;AACF;AAEA,SAAS,WAAW,GAAA,EAAqB;AACvC,EAAA,OAAO,GAAA,CAAI,QAAQ,mBAAA,EAAqB,EAAE,EAAE,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,EAAI,IAAK,GAAA;AAClE;AAEA,SAAS,MAAA,CAAO,QAAgB,KAAA,EAAuB;AACrD,EAAA,IAAI,IAAA,GAAO,CAAA;AACX,EAAA,KAAA,IAAS,IAAI,CAAA,EAAG,CAAA,GAAI,SAAS,CAAA,GAAI,MAAA,CAAO,QAAQ,CAAA,EAAA,EAAK;AACnD,IAAA,IAAI,MAAA,CAAO,CAAC,CAAA,KAAM,IAAA,EAAM,IAAA,EAAA;AAAA,EAC1B;AACA,EAAA,OAAO,IAAA;AACT","file":"sql-extract-JELDZA6W.js","sourcesContent":["/**\n * Deterministic SQL DDL extraction — no tree-sitter grammar required.\n * Tables, views, and REFERENCES relationships only (schema topology).\n */\n\nimport type { FileParse, RawDef, RawHeritage } from './types.js';\nimport { hashString } from './hash.js';\n\nexport function parseSqlFile(rel: string, source: string): FileParse {\n const defs: RawDef[] = [];\n const heritage: RawHeritage[] = [];\n\n const cleaned = source\n .replace(/\\/\\*[\\s\\S]*?\\*\\//g, (m) => m.replace(/[^\\n]/g, ' '))\n .replace(/--[^\\n]*/g, '');\n\n const tableRe =\n /\\bCREATE\\s+(?:OR\\s+REPLACE\\s+)?(?:TEMP(?:ORARY)?\\s+)?TABLE\\s+(?:IF\\s+NOT\\s+EXISTS\\s+)?([`\"[\\w.]+)/gi;\n const viewRe =\n /\\bCREATE\\s+(?:OR\\s+REPLACE\\s+)?(?:TEMP(?:ORARY)?\\s+)?VIEW\\s+(?:IF\\s+NOT\\s+EXISTS\\s+)?([`\"[\\w.]+)/gi;\n const fkRe = /\\bFOREIGN\\s+KEY\\s*\\([^)]+\\)\\s*REFERENCES\\s+([`\"[\\w.]+)/gi;\n const colRefRe = /\\bREFERENCES\\s+([`\"[\\w.]+)/gi;\n\n let m: RegExpExecArray | null;\n while ((m = tableRe.exec(cleaned)) !== null) {\n const name = stripIdent(m[1]);\n if (!name) continue;\n const line = lineOf(cleaned, m.index);\n defs.push({\n kind: 'class',\n name,\n qualifiedName: name,\n startLine: line,\n endLine: line,\n startByte: m.index,\n endByte: m.index + m[0].length,\n signature: `TABLE ${name}`,\n });\n }\n\n while ((m = viewRe.exec(cleaned)) !== null) {\n const name = stripIdent(m[1]);\n if (!name) continue;\n const line = lineOf(cleaned, m.index);\n defs.push({\n kind: 'interface',\n name,\n qualifiedName: name,\n startLine: line,\n endLine: line,\n startByte: m.index,\n endByte: m.index + m[0].length,\n signature: `VIEW ${name}`,\n });\n }\n\n const refSeen = new Set<string>();\n for (const re of [fkRe, colRefRe]) {\n re.lastIndex = 0;\n while ((m = re.exec(cleaned)) !== null) {\n const target = stripIdent(m[1]);\n if (!target || refSeen.has(`${m.index}:${target}`)) continue;\n refSeen.add(`${m.index}:${target}`);\n heritage.push({ superName: target, byte: m.index, kind: 'extends' });\n }\n }\n\n defs.sort((a, b) => a.startByte - b.startByte || a.name.localeCompare(b.name));\n\n return {\n rel,\n lang: 'sql',\n hash: hashString(source),\n bytes: Buffer.byteLength(source, 'utf8'),\n defs,\n calls: [],\n imports: [],\n heritage,\n typeRefs: [],\n guards: [],\n };\n}\n\nfunction stripIdent(raw: string): string {\n return raw.replace(/^[`\"[]+|[`\"\\]]+$/g, '').split('.').pop() ?? raw;\n}\n\nfunction lineOf(source: string, index: number): number {\n let line = 1;\n for (let i = 0; i < index && i < source.length; i++) {\n if (source[i] === '\\n') line++;\n }\n return line;\n}\n"]}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { runAgent } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { runAgent } from './chunk-Z7GP7XTJ.js';
|
|
2
|
+
import './chunk-HK3AWUXH.js';
|
|
3
3
|
import './chunk-PMYWZRRS.js';
|
|
4
4
|
import './chunk-JIBOJTGS.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-OFUC6RYN.js';
|
|
6
|
+
import './chunk-6JIKUDWM.js';
|
|
7
7
|
import './chunk-J7LKEB2R.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
8
|
+
import './chunk-ZBTY6VV4.js';
|
|
9
|
+
import './chunk-6UK6QPTR.js';
|
|
10
|
+
import './chunk-ON25BX6T.js';
|
|
11
11
|
import './chunk-RXP66R2E.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-ZKNB4YH4.js';
|
|
13
13
|
import './chunk-BWPBB45M.js';
|
|
14
14
|
import './chunk-JFGYT6BI.js';
|
|
15
15
|
import './chunk-BPF3YX2U.js';
|
|
16
|
+
import './chunk-DGUM43GV.js';
|
|
16
17
|
|
|
17
18
|
// src/code/stream-json.ts
|
|
18
19
|
var StreamJsonSession = class {
|
|
@@ -71,5 +72,5 @@ async function runCodeStreamJson(options) {
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
export { StreamJsonSession, runCodeStreamJson };
|
|
74
|
-
//# sourceMappingURL=stream-json-
|
|
75
|
-
//# sourceMappingURL=stream-json-
|
|
75
|
+
//# sourceMappingURL=stream-json-6ZBUA2L3.js.map
|
|
76
|
+
//# sourceMappingURL=stream-json-6ZBUA2L3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/code/stream-json.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA8BO,IAAM,oBAAN,MAAwB;AAAA,EAI7B,WAAA,CACmB,IAAA,EACA,IAAA,GAAO,KAAA,EACxB;AAFiB,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AACA,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AAAA,EAChB;AAAA,EAFgB,IAAA;AAAA,EACA,IAAA;AAAA,EALX,MAAA,GAAS,CAAA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AM,EAAE,IAAA,EAAM,aAAA,EAAe,IAAA,EAAM,GAAG,cAAa,GAAI,OAAA;AACvD,EAAA,MAAM,UAAU,IAAI,iBAAA,CAAkB,IAAA,EAAM,CAAC,CAAC,IAAI,CAAA;AAClD,EAAA,aAAA,GAAgB,OAAO,CAAA;AACvB,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAM,QAAA,CAAS,EAAE,GAAG,YAAA,EAAc,IAAA,EAAM,OAAA,EAAS,OAAA,CAAQ,OAAA,EAAS,OAAA,EAAS,OAAA,CAAQ,SAAS,CAAA;AAC3G,IAAA,IAAA,CAAK,EAAE,KAAA,EAAO,MAAA,EAAQ,MAAA,EAAQ,CAAA;AAC9B,IAAA,OAAO,MAAA;AAAA,EACT,SAAS,CAAA,EAAG;AACV,IAAA,IAAA,CAAK,EAAE,KAAA,EAAO,OAAA,EAAS,OAAA,EAAU,CAAA,CAAY,SAAS,CAAA;AACtD,IAAA,OAAO,IAAA;AAAA,EACT,CAAA,SAAE;AACA,IAAA,OAAA,CAAQ,aAAA,EAAc;AAAA,EACxB;AACF","file":"stream-json-6ZBUA2L3.js","sourcesContent":["/**\n * Machine-readable event protocol for `vg code --stream-json` (VG-CLI-CODE §18).\n *\n * A host UI (the VS Code VG Code panel) can't drive the agent through the human\n * TTY renderer, so this exposes the agent as a line protocol: every\n * {@link AgentEvent} is emitted as one NDJSON object on stdout, and each\n * approval is a round-trip — an `approve-request` event out, a decision line in.\n * This keeps the governance gate intact across the process boundary (the host's\n * Approve/Reject button fulfils the same `approve` contract the CLI's prompt\n * does — no quick-apply back-door), while the host stays a pure relay.\n *\n * Pure over an injected `emit` + the decision channel, so the protocol is\n * unit-tested without a process, model, or socket.\n */\n\nimport { runAgent, type AgentEvent, type AgentOptions, type AgentResult } from './agent.js';\nimport type { MutatingAction } from './tools.js';\n\n/** A single line written to the host. Discriminated by `event`. */\nexport type StreamJsonOut =\n | ({ event: 'event' } & AgentEvent)\n | { event: 'approve-request'; id: number; action: MutatingAction }\n | { event: 'done'; result: AgentResult }\n | { event: 'error'; message: string };\n\n/**\n * Owns the NDJSON protocol for one run: serializes agent events, and turns each\n * approval into an `approve-request` the host answers via {@link submitDecision}.\n * Under `auto`, approvals resolve true immediately (still announced, for the log).\n */\nexport class StreamJsonSession {\n private nextId = 1;\n private readonly pending = new Map<number, (approve: boolean) => void>();\n\n constructor(\n private readonly emit: (line: StreamJsonOut) => void,\n private readonly auto = false,\n ) {}\n\n /** The agent's onEvent → one NDJSON line per event. */\n readonly onEvent = (e: AgentEvent): void => {\n this.emit({ event: 'event', ...e });\n };\n\n /** The agent's approval gate → an approve-request the host answers. */\n readonly approve = (action: MutatingAction): Promise<boolean> => {\n const id = this.nextId++;\n if (this.auto) {\n this.emit({ event: 'approve-request', id, action });\n return Promise.resolve(true);\n }\n // Register the resolver BEFORE emitting, so a host that answers synchronously\n // (or very fast) can't have its decision arrive before we're listening.\n return new Promise<boolean>((resolve) => {\n this.pending.set(id, resolve);\n this.emit({ event: 'approve-request', id, action });\n });\n };\n\n /** Host → agent: resolve a pending approval. Unknown ids are ignored. */\n submitDecision(id: number, approve: boolean): void {\n const resolve = this.pending.get(id);\n if (resolve) {\n this.pending.delete(id);\n resolve(approve);\n }\n }\n\n /** Reject any still-pending approvals (e.g. the host disconnected). */\n cancelPending(): void {\n for (const resolve of this.pending.values()) resolve(false);\n this.pending.clear();\n }\n}\n\nexport interface StreamJsonOptions extends Omit<AgentOptions, 'approve' | 'onEvent'> {\n emit: (line: StreamJsonOut) => void;\n /** Register the stdin decision reader; the returned session accepts decisions. */\n bindDecisions?: (session: StreamJsonSession) => void;\n}\n\n/** Run the agent under the NDJSON protocol; always emits a terminal `done`/`error`. */\nexport async function runCodeStreamJson(options: StreamJsonOptions): Promise<AgentResult | null> {\n const { emit, bindDecisions, auto, ...agentOptions } = options;\n const session = new StreamJsonSession(emit, !!auto);\n bindDecisions?.(session);\n try {\n const result = await runAgent({ ...agentOptions, auto, approve: session.approve, onEvent: session.onEvent });\n emit({ event: 'done', result });\n return result;\n } catch (e) {\n emit({ event: 'error', message: (e as Error).message });\n return null;\n } finally {\n session.cancelPending();\n }\n}\n"]}
|
|
@@ -35,6 +35,8 @@ interface Provenance {
|
|
|
35
35
|
corpusHash: string;
|
|
36
36
|
toolchain?: Toolchain;
|
|
37
37
|
}
|
|
38
|
+
/** Analysis cost tier — auto-selected by node count (or forced). Reported honestly. */
|
|
39
|
+
type AnalysisTier = 'full' | 'large' | 'xl';
|
|
38
40
|
interface GraphMeta {
|
|
39
41
|
root: string;
|
|
40
42
|
languages: string[];
|
|
@@ -46,6 +48,8 @@ interface GraphMeta {
|
|
|
46
48
|
untested: number;
|
|
47
49
|
};
|
|
48
50
|
cluster: 'leiden' | 'louvain' | 'none';
|
|
51
|
+
/** Auto-selected (or forced) analysis tier for large maps. */
|
|
52
|
+
analysisTier?: AnalysisTier;
|
|
49
53
|
edgeKinds: EdgeKind[];
|
|
50
54
|
}
|
|
51
55
|
type NodeKind = 'file' | 'module' | 'package' | 'class' | 'interface' | 'function' | 'method' | 'property' | 'test' | 'route' | 'component'
|
|
@@ -139,6 +143,21 @@ interface GroundingEdge {
|
|
|
139
143
|
url: string;
|
|
140
144
|
};
|
|
141
145
|
}
|
|
146
|
+
/** Precomputed hub blast-radius counts for fast agent answers (optional). */
|
|
147
|
+
interface HubBlastSummary {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
kind: string;
|
|
151
|
+
file: string;
|
|
152
|
+
importance: number;
|
|
153
|
+
direct: number;
|
|
154
|
+
depth2: number;
|
|
155
|
+
files: number;
|
|
156
|
+
tested: boolean | null;
|
|
157
|
+
}
|
|
158
|
+
interface GraphSummaries {
|
|
159
|
+
hubs: HubBlastSummary[];
|
|
160
|
+
}
|
|
142
161
|
interface VgGraph {
|
|
143
162
|
schemaVersion: typeof SCHEMA_VERSION;
|
|
144
163
|
generatedAt: string;
|
|
@@ -150,6 +169,8 @@ interface VgGraph {
|
|
|
150
169
|
facts?: Fact[];
|
|
151
170
|
grounding?: GroundingEdge[];
|
|
152
171
|
unknowns?: Unknown[];
|
|
172
|
+
/** Build-time hub blast-radius summaries (always on; tiny). */
|
|
173
|
+
summaries?: GraphSummaries;
|
|
153
174
|
}
|
|
154
175
|
|
|
155
176
|
/** A definition extracted from one file (pre-resolution, pre-id). */
|
|
@@ -215,4 +236,4 @@ interface FileParse {
|
|
|
215
236
|
warnings?: string[];
|
|
216
237
|
}
|
|
217
238
|
|
|
218
|
-
export { type Area as A, type Centrality as C, type DerivedBy as D, type EdgeKind as E, type FileParse as F, type GraphNode as G, type NodeKind as N, type Provenance as P, type ResolverKind as R, SCHEMA_VERSION as S, type Toolchain as T, type Unknown as U, type VgGraph as V, type GraphEdge as a, type Fact as b, type GroundingKind as c, type GroundingEdge as d, type
|
|
239
|
+
export { type Area as A, type Centrality as C, type DerivedBy as D, type EdgeKind as E, type FileParse as F, type GraphNode as G, type HubBlastSummary as H, type NodeKind as N, type Provenance as P, type ResolverKind as R, SCHEMA_VERSION as S, type Toolchain as T, type Unknown as U, type VgGraph as V, type GraphEdge as a, type Fact as b, type GroundingKind as c, type GroundingEdge as d, type AnalysisTier as e, type EpistemicTier as f, type FactConfidence as g, type FactKind as h, type GraphMeta as i, type GraphSummaries as j, type Span as k };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ui-Q6DJ3GCU.js"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActiveGraphCache, BranchGraphSession, DEFAULT_ACTIVE_GRAPH_IDLE_MS, VGD_PROTOCOL_VERSION, WorkspaceRegistry, parseRequest, startVgdServer } from './chunk-
|
|
1
|
+
export { ActiveGraphCache, BranchGraphSession, DEFAULT_ACTIVE_GRAPH_IDLE_MS, VGD_PROTOCOL_VERSION, WorkspaceRegistry, parseRequest, startVgdServer } from './chunk-77LYGXBI.js';
|
|
2
2
|
export { FEDERATION_SCHEMA_VERSION, federationFromWorkspaceRoots, federationPath, highConfidenceBridges, loadFederation, loadOrDiscoverFederation, writeFederationFile } from './chunk-5I4VSBWQ.js';
|
|
3
3
|
export { createHostExecutionEnv, detectSandboxCapabilities, detectSecurityCapabilities, firejailArgv, resolveExecutionEnv, selectSandboxBackend } from './chunk-IS7VTH2Q.js';
|
|
4
4
|
export { MODEL_EXECUTION_PROFILE_SCHEMA_VERSION, defaultModelExecutionProfile, mergeModelExecutionProfile, resolveModelExecutionProfile } from './chunk-IZDH67DX.js';
|
|
@@ -6,11 +6,12 @@ export { vgdIsRunning, vgdPidPath, vgdRequest, vgdSocketPath } from './chunk-PMY
|
|
|
6
6
|
import './chunk-K7REHDQS.js';
|
|
7
7
|
import './chunk-JIBOJTGS.js';
|
|
8
8
|
import './chunk-J7LKEB2R.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
9
|
+
import './chunk-6UK6QPTR.js';
|
|
10
|
+
import './chunk-B3YUO3NW.js';
|
|
11
|
+
import './chunk-ZKNB4YH4.js';
|
|
12
12
|
import './chunk-BWPBB45M.js';
|
|
13
13
|
import './chunk-JFGYT6BI.js';
|
|
14
14
|
export { activeGraphSlotKey, branchGraphSnapshotId, detectGitRef } from './chunk-BPF3YX2U.js';
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=vgd-
|
|
15
|
+
import './chunk-DGUM43GV.js';
|
|
16
|
+
//# sourceMappingURL=vgd-CVLKBS7K.js.map
|
|
17
|
+
//# sourceMappingURL=vgd-CVLKBS7K.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"vgd-CVLKBS7K.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibgrate/cli",
|
|
3
|
-
"version": "2026.727.
|
|
3
|
+
"version": "2026.727.3",
|
|
4
4
|
"description": "vg — local codebase intelligence CLI + MCP server for AI coding agents: deterministic code graph, drift reporting, and version-correct library docs (Apache-2.0)",
|
|
5
5
|
"//mcpName": "Official MCP registry ownership proof: the registry fetches the published npm package and requires this field to match the com.vibgrate/ai-context server entry (see docs/marketing/mcp-registry/README.md). Must ship in the published @vibgrate/cli package.json.",
|
|
6
6
|
"mcpName": "com.vibgrate/ai-context",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { baselineCommand, runBaseline } from './chunk-HYZVHJ3Q.js';
|
|
2
|
-
import './chunk-WLETRGAC.js';
|
|
3
|
-
import './chunk-RXP66R2E.js';
|
|
4
|
-
import './chunk-GI6W53LM.js';
|
|
5
|
-
import './chunk-CRAMOEBE.js';
|
|
6
|
-
//# sourceMappingURL=baseline-K7YBFKZI.js.map
|
|
7
|
-
//# sourceMappingURL=baseline-K7YBFKZI.js.map
|