@vibgrate/cli 2026.728.3 → 2026.728.5

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.
Files changed (131) hide show
  1. package/dist/baseline-Y5FBYWNJ.js +8 -0
  2. package/dist/{baseline-PPZJBYAJ.js.map → baseline-Y5FBYWNJ.js.map} +1 -1
  3. package/dist/{chunk-A2IYFNCQ.js → chunk-2ZHWF7C6.js} +227 -19
  4. package/dist/chunk-2ZHWF7C6.js.map +1 -0
  5. package/dist/{chunk-UZJS7GMK.js → chunk-3LSG7Z4I.js} +10 -6
  6. package/dist/chunk-3LSG7Z4I.js.map +1 -0
  7. package/dist/{chunk-3BIRGSRS.js → chunk-4JD63RUR.js} +11 -11
  8. package/dist/{chunk-3BIRGSRS.js.map → chunk-4JD63RUR.js.map} +1 -1
  9. package/dist/{chunk-6GRLZ4Z2.js → chunk-643KXZ54.js} +8 -8
  10. package/dist/{chunk-6GRLZ4Z2.js.map → chunk-643KXZ54.js.map} +1 -1
  11. package/dist/{chunk-R2QNFXE5.js → chunk-DBOT2ELH.js} +3 -3
  12. package/dist/{chunk-R2QNFXE5.js.map → chunk-DBOT2ELH.js.map} +1 -1
  13. package/dist/{chunk-6UK6QPTR.js → chunk-EETK7S43.js} +137 -34
  14. package/dist/chunk-EETK7S43.js.map +1 -0
  15. package/dist/{chunk-JRAGO6OB.js → chunk-EVWW3BPM.js} +4 -4
  16. package/dist/{chunk-JRAGO6OB.js.map → chunk-EVWW3BPM.js.map} +1 -1
  17. package/dist/chunk-G4HTI4ZM.js +1537 -0
  18. package/dist/chunk-G4HTI4ZM.js.map +1 -0
  19. package/dist/chunk-IPICO2RV.js +789 -0
  20. package/dist/chunk-IPICO2RV.js.map +1 -0
  21. package/dist/{chunk-VI4ITXHQ.js → chunk-NH5NJ3UO.js} +7 -6
  22. package/dist/chunk-NH5NJ3UO.js.map +1 -0
  23. package/dist/{chunk-6UQMXIAG.js → chunk-OWSFZQOP.js} +62 -12
  24. package/dist/chunk-OWSFZQOP.js.map +1 -0
  25. package/dist/{chunk-WH2N22S3.js → chunk-PRGCCW7D.js} +4 -4
  26. package/dist/{chunk-WH2N22S3.js.map → chunk-PRGCCW7D.js.map} +1 -1
  27. package/dist/chunk-RCP2KQGG.js +3059 -0
  28. package/dist/chunk-RCP2KQGG.js.map +1 -0
  29. package/dist/{chunk-OSD546W7.js → chunk-REIGWTTH.js} +5 -3
  30. package/dist/chunk-REIGWTTH.js.map +1 -0
  31. package/dist/{chunk-B3YUO3NW.js → chunk-RYNAK4LK.js} +3 -3
  32. package/dist/{chunk-B3YUO3NW.js.map → chunk-RYNAK4LK.js.map} +1 -1
  33. package/dist/{chunk-YF43FOPP.js → chunk-RZEXHDCF.js} +33 -14
  34. package/dist/chunk-RZEXHDCF.js.map +1 -0
  35. package/dist/{chunk-VYGEOOLY.js → chunk-SGI5ZP2Y.js} +3 -3
  36. package/dist/{chunk-VYGEOOLY.js.map → chunk-SGI5ZP2Y.js.map} +1 -1
  37. package/dist/{chunk-HK3AWUXH.js → chunk-TCJTQGAO.js} +3 -3
  38. package/dist/{chunk-HK3AWUXH.js.map → chunk-TCJTQGAO.js.map} +1 -1
  39. package/dist/{chunk-ZBTY6VV4.js → chunk-US2DAKCM.js} +15 -5
  40. package/dist/chunk-US2DAKCM.js.map +1 -0
  41. package/dist/{chunk-ON25BX6T.js → chunk-UTNNGKKX.js} +3 -3
  42. package/dist/{chunk-ON25BX6T.js.map → chunk-UTNNGKKX.js.map} +1 -1
  43. package/dist/chunk-VBVY733D.js +2184 -0
  44. package/dist/chunk-VBVY733D.js.map +1 -0
  45. package/dist/{chunk-SZSNPXSW.js → chunk-WHJMS7XC.js} +3 -3
  46. package/dist/{chunk-SZSNPXSW.js.map → chunk-WHJMS7XC.js.map} +1 -1
  47. package/dist/chunk-Z6ZWNWWR.js +30 -0
  48. package/dist/{chunk-DGUM43GV.js.map → chunk-Z6ZWNWWR.js.map} +1 -1
  49. package/dist/cli.js +192 -90
  50. package/dist/cli.js.map +1 -1
  51. package/dist/{execution-env-ZU45JZ4G.js → execution-env-4MS5AYAN.js} +3 -3
  52. package/dist/{execution-env-ZU45JZ4G.js.map → execution-env-4MS5AYAN.js.map} +1 -1
  53. package/dist/{federation-SZWZIFZ7.js → federation-MDQPO3PW.js} +3 -3
  54. package/dist/{federation-SZWZIFZ7.js.map → federation-MDQPO3PW.js.map} +1 -1
  55. package/dist/{fs-O5IQYXHO.js → fs-4G5A65KS.js} +3 -3
  56. package/dist/fs-4G5A65KS.js.map +1 -0
  57. package/dist/{fs-B5HZ2MIU.js → fs-6JKZNQ3U.js} +3 -3
  58. package/dist/fs-6JKZNQ3U.js.map +1 -0
  59. package/dist/{git-ref-XDXB6JP5.js → git-ref-RSRAN4OH.js} +3 -3
  60. package/dist/{git-ref-XDXB6JP5.js.map → git-ref-RSRAN4OH.js.map} +1 -1
  61. package/dist/{graph-backend-UTOL3SHE.js → graph-backend-GBL33GMW.js} +5 -5
  62. package/dist/{graph-backend-UTOL3SHE.js.map → graph-backend-GBL33GMW.js.map} +1 -1
  63. package/dist/index.d.ts +3 -2
  64. package/dist/index.js +12 -10
  65. package/dist/index.js.map +1 -1
  66. package/dist/{interactive-OCWQ326U.js → interactive-KVDKRKNK.js} +45 -24
  67. package/dist/interactive-KVDKRKNK.js.map +1 -0
  68. package/dist/{llm-host-XYBT4267.js → llm-host-5RE34322.js} +3 -3
  69. package/dist/{llm-host-XYBT4267.js.map → llm-host-5RE34322.js.map} +1 -1
  70. package/dist/load-SEFJA3M5.js +8 -0
  71. package/dist/{load-QPOWQD7C.js.map → load-SEFJA3M5.js.map} +1 -1
  72. package/dist/local-runtime-2ED33KK6.js +6 -0
  73. package/dist/{local-runtime-5O2NN3GA.js.map → local-runtime-2ED33KK6.js.map} +1 -1
  74. package/dist/mcp-tools-KAJS34TN.js +4 -0
  75. package/dist/{mcp-tools-I7JK3S2M.js.map → mcp-tools-KAJS34TN.js.map} +1 -1
  76. package/dist/{model-execution-profile-TFBKCNJG.js → model-execution-profile-ELWF3Z6H.js} +3 -3
  77. package/dist/{model-execution-profile-TFBKCNJG.js.map → model-execution-profile-ELWF3Z6H.js.map} +1 -1
  78. package/dist/model-manager-GJ2YSTSK.js +10 -0
  79. package/dist/{model-manager-LB54VSV7.js.map → model-manager-GJ2YSTSK.js.map} +1 -1
  80. package/dist/{model-orchestrator-4M5FG6MN.js → model-orchestrator-LHYPJBFH.js} +3 -3
  81. package/dist/{model-orchestrator-4M5FG6MN.js.map → model-orchestrator-LHYPJBFH.js.map} +1 -1
  82. package/dist/parse-worker.js +2 -2
  83. package/dist/{paths-2RAH3GME.js → paths-62AKTFSR.js} +3 -3
  84. package/dist/{paths-2RAH3GME.js.map → paths-62AKTFSR.js.map} +1 -1
  85. package/dist/{resolve-gguf-4AFRN4CP.js → resolve-gguf-SDIYGGI6.js} +3 -3
  86. package/dist/{resolve-gguf-4AFRN4CP.js.map → resolve-gguf-SDIYGGI6.js.map} +1 -1
  87. package/dist/{runtime-session-EJQZXANB.js → runtime-session-4IACVDSY.js} +7 -7
  88. package/dist/{runtime-session-EJQZXANB.js.map → runtime-session-4IACVDSY.js.map} +1 -1
  89. package/dist/session-2JT4AUZT.js +13 -0
  90. package/dist/{session-ZJGENHKX.js.map → session-2JT4AUZT.js.map} +1 -1
  91. package/dist/session-store-O4XPXKOV.js +4 -0
  92. package/dist/{session-store-WFBX7HXL.js.map → session-store-O4XPXKOV.js.map} +1 -1
  93. package/dist/{sql-extract-JELDZA6W.js → sql-extract-6UJOLJDL.js} +3 -3
  94. package/dist/{sql-extract-JELDZA6W.js.map → sql-extract-6UJOLJDL.js.map} +1 -1
  95. package/dist/stream-json-Y45JBNYP.js +112 -0
  96. package/dist/stream-json-Y45JBNYP.js.map +1 -0
  97. package/dist/ui-K7D3BCHD.js +5 -0
  98. package/dist/ui-K7D3BCHD.js.map +1 -0
  99. package/dist/vg-mcp-bridge-B35WCSAS.js +75 -0
  100. package/dist/vg-mcp-bridge-B35WCSAS.js.map +1 -0
  101. package/dist/{vgd-3MHSB4KA.js → vgd-KDQFS33M.js} +6 -6
  102. package/dist/vgd-KDQFS33M.js.map +1 -0
  103. package/package.json +1 -1
  104. package/dist/baseline-PPZJBYAJ.js +0 -8
  105. package/dist/chunk-57QU36P6.js +0 -5645
  106. package/dist/chunk-57QU36P6.js.map +0 -1
  107. package/dist/chunk-6AXHLQBV.js +0 -1892
  108. package/dist/chunk-6AXHLQBV.js.map +0 -1
  109. package/dist/chunk-6UK6QPTR.js.map +0 -1
  110. package/dist/chunk-6UQMXIAG.js.map +0 -1
  111. package/dist/chunk-A2IYFNCQ.js.map +0 -1
  112. package/dist/chunk-DGUM43GV.js +0 -10
  113. package/dist/chunk-OSD546W7.js.map +0 -1
  114. package/dist/chunk-UZJS7GMK.js.map +0 -1
  115. package/dist/chunk-VI4ITXHQ.js.map +0 -1
  116. package/dist/chunk-YF43FOPP.js.map +0 -1
  117. package/dist/chunk-ZBTY6VV4.js.map +0 -1
  118. package/dist/fs-B5HZ2MIU.js.map +0 -1
  119. package/dist/fs-O5IQYXHO.js.map +0 -1
  120. package/dist/interactive-OCWQ326U.js.map +0 -1
  121. package/dist/load-QPOWQD7C.js +0 -8
  122. package/dist/local-runtime-5O2NN3GA.js +0 -5
  123. package/dist/mcp-tools-I7JK3S2M.js +0 -4
  124. package/dist/model-manager-LB54VSV7.js +0 -10
  125. package/dist/session-ZJGENHKX.js +0 -13
  126. package/dist/session-store-WFBX7HXL.js +0 -4
  127. package/dist/stream-json-Z5KC2DM3.js +0 -78
  128. package/dist/stream-json-Z5KC2DM3.js.map +0 -1
  129. package/dist/ui-Q6DJ3GCU.js +0 -5
  130. package/dist/ui-Q6DJ3GCU.js.map +0 -1
  131. package/dist/vgd-3MHSB4KA.js.map +0 -1
package/dist/cli.js CHANGED
@@ -1,46 +1,48 @@
1
1
  #!/usr/bin/env node
2
- import { sha256Hex, generateKeypair, dssePae, DSSE_PAYLOAD_TYPE, keyId, registerBuild, readGlobal, applyGlobalOptions, ProgressBar, printLogo, fetchCatalog, resolveProviders, runBuild } from './chunk-6GRLZ4Z2.js';
3
- export { runBuild } from './chunk-6GRLZ4Z2.js';
4
- import { CONTEXT_POLICY_VERSION, computeFcsReport, renderFcsReportMarkdown, createTrajectoryCollector, runAgent } from './chunk-A2IYFNCQ.js';
5
- import { loadAdvancedScanHook, baselineCommand } from './chunk-VYGEOOLY.js';
6
- import { runCodeSession } from './chunk-WH2N22S3.js';
7
- import { summarizeDiffs, ScriptedProvider } from './chunk-YF43FOPP.js';
2
+ import { sha256Hex, generateKeypair, dssePae, DSSE_PAYLOAD_TYPE, keyId, registerBuild, readGlobal, applyGlobalOptions, ProgressBar, printLogo, fetchCatalog, resolveProviders, runBuild } from './chunk-643KXZ54.js';
3
+ export { runBuild } from './chunk-643KXZ54.js';
4
+ import { CONTEXT_POLICY_VERSION, computeFcsReport, renderFcsReportMarkdown, createTrajectoryCollector, runAgent } from './chunk-2ZHWF7C6.js';
5
+ import { loadAdvancedScanHook, baselineCommand } from './chunk-SGI5ZP2Y.js';
6
+ import { runCodeSession } from './chunk-PRGCCW7D.js';
7
+ import { summarizeDiffs, ScriptedProvider } from './chunk-RZEXHDCF.js';
8
8
  import { disableColor, info, c, json, out } from './chunk-CT5BS56U.js';
9
- import { VGD_PROTOCOL_VERSION, startVgdServer } from './chunk-JRAGO6OB.js';
9
+ import { VGD_PROTOCOL_VERSION, startVgdServer } from './chunk-EVWW3BPM.js';
10
10
  import './chunk-5I4VSBWQ.js';
11
11
  import './chunk-IS7VTH2Q.js';
12
- import { gatherSystemMemory } from './chunk-6UQMXIAG.js';
12
+ import { init_resolve_ollama, gatherSystemMemory, resolveOllamaBinary, hasOllamaBinary, resolve_ollama_exports } from './chunk-OWSFZQOP.js';
13
13
  import { readOrchestratorState, writeOrchestratorState, parseMode, setDefaultMode, recommendMode, activePin, resolveMode, providerForBackend, QUALIFIED_PACKS, pinPack, unpinPack, buildOrchestratorStatus } from './chunk-NZELMYT4.js';
14
14
  import { fmt, estimateModelBytes } from './chunk-7N4Y3E47.js';
15
15
  import './chunk-IZDH67DX.js';
16
- import './chunk-HK3AWUXH.js';
16
+ import './chunk-TCJTQGAO.js';
17
17
  import { vgdIsRunning, vgdRequest, vgdSocketPath } from './chunk-PMYWZRRS.js';
18
18
  import { defaultProcessEndpoint, startProcessHostServer, resolveInferenceIsolation } from './chunk-SIPGDJT4.js';
19
19
  import { clearHostSessionPool, acquireHostSession, generateOnSession, listHostSessions, hostSessionPoolSize } from './chunk-6HX47EBL.js';
20
20
  import { buildIdentifierTrieFromGraph } from './chunk-JIBOJTGS.js';
21
21
  import './chunk-7AVYKZEM.js';
22
- import { buildModelInstallPlan } from './chunk-SZSNPXSW.js';
23
- import { ensurePackage, ensureUnavailableMessage } from './chunk-OSD546W7.js';
24
- import { serveStdio, exportGraph, GraphSource, createServer, formatForExt } from './chunk-VI4ITXHQ.js';
25
- import { resolveDsn, resolveIngestHost, dashHostForIngestHost, availableRegionIds, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, CliError, ExitCode, parseDsn as parseDsn$1, uploadScanArtifact, ingestHostForRegionId, dsnCommand, pushCommand, refreshIfStale, driftCount, countTokens, shortestPath, pathDisconnect, testsToRun, detectRunner, ASSISTANTS, detectAssistants, usageError, detectServeLaunch, installAssistant, writeNavigationConfig, uninstallAssistant, coveringTests, FREE_PACK, readScanArtifact, buildGraph, writeSnapshot, probeFreshness, discover, assistantById, SMALL_REPO_FILES, publishPrivateLibrary, assessDocQuality, symbolsFromApi, fetchHostedDocsCached, selectForBudget, hostedBase, readStoredCredentials, projectCredentialsPath, homeCredentialsPath, SKIP_DIRS, SKIP_FILES } from './chunk-57QU36P6.js';
26
- import { inventory, enrichOnline, ECOSYSTEMS, catalogPath, libDir, loadCatalog, driftFor, addLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface } from './chunk-6AXHLQBV.js';
27
- import { writeDefaultConfig, parseDsn, detectVcs, computeRepoFingerprint, resolveRepositoryName, fetchScanPreflight, runCoreScan, VERSION, loadConfig, prepareCompressedUpload, computeDriftScore, titleBox, projectTypeToVulnEcosystem, driftBar, gitHistoryAvailable, buildVersionTimelines, findPackageAnyEcosystem, normalizeConstraint, findVersionCrossings, versionSatisfies, PROJECT_TYPE_TO_OSV_ECOSYSTEM, fetchRiskySymbols } from './chunk-3BIRGSRS.js';
28
- import { recordCliCall, CLI_TOOL_ALIASES, savingsLedgerPath, clearSavings, readSavings, readUsage, readModelSavings, CAPSULE_RANKING_VERSION, SAVINGS_TOOLS, sanitizeClient } from './chunk-ZBTY6VV4.js';
22
+ import { buildModelInstallPlan } from './chunk-WHJMS7XC.js';
23
+ import { ensurePackage, ensureUnavailableMessage } from './chunk-REIGWTTH.js';
24
+ import { serveStdio, exportGraph, GraphSource, createServer, formatForExt } from './chunk-NH5NJ3UO.js';
25
+ import { CliError, ExitCode, refreshIfStale, driftCount, ASSISTANTS, detectAssistants, usageError, detectServeLaunch, installAssistant, writeNavigationConfig, uninstallAssistant, buildGraph, writeSnapshot, probeFreshness, discover, assistantById, SMALL_REPO_FILES, SKIP_DIRS, SKIP_FILES } from './chunk-RCP2KQGG.js';
26
+ import { resolveDsn, resolveIngestHost, dashHostForIngestHost, availableRegionIds, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, parseDsn as parseDsn$1, uploadScanArtifact, ingestHostForRegionId, dsnCommand, pushCommand, countTokens, shortestPath, pathDisconnect, testsToRun, detectRunner, coveringTests, FREE_PACK, readScanArtifact, publishPrivateLibrary, assessDocQuality, symbolsFromApi, fetchHostedDocsCached, selectForBudget, hostedBase, readStoredCredentials, projectCredentialsPath, homeCredentialsPath } from './chunk-VBVY733D.js';
27
+ import './chunk-IPICO2RV.js';
28
+ import { inventory, enrichOnline, ECOSYSTEMS, catalogPath, libDir, loadCatalog, driftFor, addLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface } from './chunk-G4HTI4ZM.js';
29
+ import { writeDefaultConfig, parseDsn, detectVcs, computeRepoFingerprint, resolveRepositoryName, fetchScanPreflight, runCoreScan, VERSION, loadConfig, prepareCompressedUpload, computeDriftScore, titleBox, projectTypeToVulnEcosystem, driftBar, gitHistoryAvailable, buildVersionTimelines, findPackageAnyEcosystem, normalizeConstraint, findVersionCrossings, versionSatisfies, PROJECT_TYPE_TO_OSV_ECOSYSTEM, fetchRiskySymbols } from './chunk-4JD63RUR.js';
30
+ import { recordCliCall, CLI_TOOL_ALIASES, savingsLedgerPath, clearSavings, readSavings, readUsage, readModelSavings, CAPSULE_RANKING_VERSION, SAVINGS_TOOLS, sanitizeClient } from './chunk-US2DAKCM.js';
29
31
  import { ensureDir, pathExists, readJsonFile, writeTextFile, writeJsonFile } from './chunk-CRAMOEBE.js';
30
32
  import { resolveOne } from './chunk-J7LKEB2R.js';
31
- import { embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, queryGraphSemantic, queryGraph, unavailableMessage, countPending, indexFor, impactOf, modelCacheInfo, clearModelCache } from './chunk-6UK6QPTR.js';
33
+ import { embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, queryGraphSemantic, queryGraph, unavailableMessage, countPending, indexFor, impactOf, modelCacheInfo, clearModelCache } from './chunk-EETK7S43.js';
32
34
  import { discoverModels } from './chunk-CQDUBAQY.js';
33
- import { resolveCliInvocation, NPX_INVOCATION } from './chunk-UZJS7GMK.js';
35
+ import { init_cli_invocation, resolveCliInvocation, NPX_INVOCATION } from './chunk-3LSG7Z4I.js';
34
36
  import { freeBytesOnVolume, weightStoreDir, listCachedWeights, ensureWeightCached, catalogIntegrityReport } from './chunk-OV4KGXPD.js';
35
- import { resolvedGrammarFiles, grammarSetVersion } from './chunk-ON25BX6T.js';
37
+ import { resolvedGrammarFiles, grammarSetVersion } from './chunk-UTNNGKKX.js';
36
38
  import './chunk-RXP66R2E.js';
37
- import { resolveGraphPath, renderReport, loadGraph, writeArtifacts, vibgrateDir, SCHEMA_VERSION } from './chunk-B3YUO3NW.js';
39
+ import { resolveGraphPath, renderReport, loadGraph, writeArtifacts, vibgrateDir, SCHEMA_VERSION } from './chunk-RYNAK4LK.js';
38
40
  import { cacheDir, stableStringify } from './chunk-ZKNB4YH4.js';
39
41
  import './chunk-BWPBB45M.js';
40
42
  import { canonicalize, hashString, hashBytes } from './chunk-JFGYT6BI.js';
41
43
  import './chunk-BPF3YX2U.js';
42
44
  import { pathExists as pathExists$1, parseExcludePatterns } from './chunk-GI6W53LM.js';
43
- import './chunk-DGUM43GV.js';
45
+ import { __toCommonJS } from './chunk-Z6ZWNWWR.js';
44
46
  import * as fs8 from 'fs';
45
47
  import fs8__default, { realpathSync } from 'fs';
46
48
  import * as path37 from 'path';
@@ -56,6 +58,7 @@ import chalk7 from 'chalk';
56
58
  import * as fs21 from 'fs/promises';
57
59
  import semver2 from 'semver';
58
60
 
61
+ init_cli_invocation();
59
62
  function registerStatus(program) {
60
63
  const cmd = program.command("status").description("cache/freshness, counts, staleness, resolver rungs used").action(async function() {
61
64
  await runStatus(readGlobal(this));
@@ -1674,7 +1677,7 @@ async function serveHttp(graphPath, host, port, opts, freshness, onReady) {
1674
1677
  info(c.red(`vg serve: request error: ${err.message}`));
1675
1678
  }
1676
1679
  });
1677
- await new Promise((resolve20) => httpServer.listen(port, host, resolve20));
1680
+ await new Promise((resolve21) => httpServer.listen(port, host, resolve21));
1678
1681
  info(c.dim(`vg \xB7 MCP server on http://${host}:${port}/mcp (read-only, local, ${freshness})`));
1679
1682
  onReady?.();
1680
1683
  await new Promise(() => {
@@ -1920,6 +1923,14 @@ function manifestHash(root2) {
1920
1923
  files.sort((a, b) => a.rel < b.rel ? -1 : a.rel > b.rel ? 1 : 0);
1921
1924
  return hashString(canonicalize(files));
1922
1925
  }
1926
+ function isDependencyFile(root2, filePath) {
1927
+ const rel = path37.relative(path37.resolve(root2), path37.resolve(filePath));
1928
+ if (rel === "" || rel.startsWith("..") || path37.isAbsolute(rel)) return false;
1929
+ const parts = rel.split(path37.sep);
1930
+ if (parts.slice(0, -1).some((dir) => SKIP_DIRS.has(dir))) return false;
1931
+ const base = parts[parts.length - 1].toLowerCase();
1932
+ return isManifest(filePath) || SKIP_FILES.has(base);
1933
+ }
1923
1934
  function loadScanCache(root2, key2) {
1924
1935
  try {
1925
1936
  const raw = JSON.parse(fs8.readFileSync(cachePath(root2), "utf8"));
@@ -2270,15 +2281,41 @@ async function scanWorkspaceVulns(targets, opts = { offline: false }) {
2270
2281
  kevSource: "skipped"
2271
2282
  };
2272
2283
  }
2273
- const seen = /* @__PURE__ */ new Set();
2274
- const unique = [];
2284
+ const byKey = /* @__PURE__ */ new Map();
2275
2285
  for (const t of targets) {
2276
2286
  if (!t.ecosystem || !t.package || !t.version) continue;
2277
2287
  const k = key(t.ecosystem, t.package, t.version);
2278
- if (seen.has(k)) continue;
2279
- seen.add(k);
2280
- unique.push(t);
2288
+ const locs = [];
2289
+ if (t.locations?.length) {
2290
+ for (const loc of t.locations) {
2291
+ if (loc?.file) locs.push({ file: loc.file, line: loc.line ?? null });
2292
+ }
2293
+ } else if (t.file) {
2294
+ locs.push({ file: t.file, line: t.line ?? null });
2295
+ }
2296
+ const existing = byKey.get(k);
2297
+ if (!existing) {
2298
+ byKey.set(k, {
2299
+ ...t,
2300
+ file: t.file ?? locs[0]?.file ?? null,
2301
+ line: t.line ?? locs[0]?.line ?? null,
2302
+ locations: locs
2303
+ });
2304
+ continue;
2305
+ }
2306
+ for (const loc of locs) {
2307
+ if (!existing.locations.some((x) => x.file === loc.file && x.line === loc.line)) {
2308
+ existing.locations.push(loc);
2309
+ }
2310
+ }
2311
+ if (t.reachability === "reached") existing.reachability = "reached";
2312
+ else if (t.reachability === "not-observed" && existing.reachability === "unknown") {
2313
+ existing.reachability = "not-observed";
2314
+ }
2315
+ if (!existing.latestStable && t.latestStable) existing.latestStable = t.latestStable;
2316
+ if (!existing.section && t.section) existing.section = t.section;
2281
2317
  }
2318
+ const unique = [...byKey.values()];
2282
2319
  const [kev] = await Promise.all([loadKevCves({ offline: false })]);
2283
2320
  const concurrency = Math.max(1, Math.min(opts.concurrency ?? 8, 16));
2284
2321
  const findings = [];
@@ -2293,7 +2330,11 @@ async function scanWorkspaceVulns(targets, opts = { offline: false }) {
2293
2330
  const r = await enrichVulns(t.ecosystem, t.package, t.version, { offline: false });
2294
2331
  if (r.source === "osv" || r.source === "cache") anyOk = true;
2295
2332
  else if (r.source === "error") anyError = true;
2333
+ const locations = t.locations.length ? t.locations : t.file ? [{ file: t.file, line: t.line ?? null }] : [];
2334
+ const seenIds = /* @__PURE__ */ new Set();
2296
2335
  for (const v of r.vulns) {
2336
+ if (seenIds.has(v.id)) continue;
2337
+ seenIds.add(v.id);
2297
2338
  const kevHit = v.cves.some((c2) => kev.cves.has(c2.toUpperCase()));
2298
2339
  findings.push({
2299
2340
  package: t.package,
@@ -2307,8 +2348,9 @@ async function scanWorkspaceVulns(targets, opts = { offline: false }) {
2307
2348
  published: v.published,
2308
2349
  kev: kevHit,
2309
2350
  reachability: t.reachability ?? "unknown",
2310
- file: t.file ?? null,
2311
- line: t.line ?? null,
2351
+ file: locations[0]?.file ?? t.file ?? null,
2352
+ line: locations[0]?.line ?? t.line ?? null,
2353
+ locations,
2312
2354
  section: t.section ?? null,
2313
2355
  latestStable: t.latestStable ?? null
2314
2356
  });
@@ -2408,6 +2450,13 @@ var VibgrateLanguageServer = class {
2408
2450
  if (!uri || !this.docs.has(uri)) return;
2409
2451
  this.scheduleScan(400);
2410
2452
  });
2453
+ this.conn.onNotification("workspace/didChangeWatchedFiles", (_m, params) => {
2454
+ const p = params;
2455
+ const relevant = (p.changes ?? []).some(
2456
+ (c2) => c2.uri && isDependencyFile(this.opts.root, uriToPath(c2.uri))
2457
+ );
2458
+ if (relevant) this.scheduleScan(400);
2459
+ });
2411
2460
  this.conn.onNotification("textDocument/didClose", (_m, params) => {
2412
2461
  const p = params;
2413
2462
  if (p.textDocument?.uri) this.docs.delete(p.textDocument.uri);
@@ -3089,7 +3138,7 @@ function registerInstall(program) {
3089
3138
  }
3090
3139
  return;
3091
3140
  }
3092
- const targets = opts.all ? ASSISTANTS : opts.detect ? detected.map((d) => d.assistant) : tools.map(resolve4);
3141
+ const targets = opts.all ? ASSISTANTS : opts.detect ? detected.map((d) => d.assistant) : tools.map(resolve5);
3093
3142
  if (targets.length === 0) {
3094
3143
  if (opts.detect) {
3095
3144
  if (global.json) json({ root: root2, detected: [], results: [] });
@@ -3120,7 +3169,7 @@ function registerInstall(program) {
3120
3169
  const uninstall = program.command("uninstall").description("remove vg from an AI assistant").argument("<tools...>", "assistant ids").option("--purge", "also delete the skill file").action(function(tools, opts) {
3121
3170
  const global = readGlobal(this);
3122
3171
  const root2 = rootOf(global);
3123
- const results = tools.map(resolve4).map((a) => ({ id: a.id, removed: uninstallAssistant(a, root2, !!opts.purge) }));
3172
+ const results = tools.map(resolve5).map((a) => ({ id: a.id, removed: uninstallAssistant(a, root2, !!opts.purge) }));
3124
3173
  if (global.json) {
3125
3174
  json({ root: root2, results });
3126
3175
  return;
@@ -3131,7 +3180,7 @@ function registerInstall(program) {
3131
3180
  });
3132
3181
  applyGlobalOptions(uninstall);
3133
3182
  }
3134
- function resolve4(id) {
3183
+ function resolve5(id) {
3135
3184
  const a = assistantById(id);
3136
3185
  if (!a) {
3137
3186
  const near = ASSISTANTS.filter(
@@ -3345,11 +3394,11 @@ function registerWatch(program) {
3345
3394
  }
3346
3395
  }
3347
3396
  info(c.dim(`vg watch \xB7 watching ${watchRoots.map((p) => path37.relative(root2, p) || ".").join(", ")} (debounce ${debounceMs}ms) \xB7 Ctrl+C to stop`));
3348
- await new Promise((resolve20) => {
3397
+ await new Promise((resolve21) => {
3349
3398
  const stop = () => {
3350
3399
  for (const w of watchers) w.close();
3351
3400
  if (timer) clearTimeout(timer);
3352
- resolve20();
3401
+ resolve21();
3353
3402
  };
3354
3403
  process.once("SIGINT", stop);
3355
3404
  process.once("SIGTERM", stop);
@@ -3909,10 +3958,15 @@ async function executeModelInstallPlan(plan, options = {}) {
3909
3958
  return { ok: true, plan, installedDeps, pulledWeights };
3910
3959
  }
3911
3960
  function defaultOllamaPull(name, quiet) {
3912
- const res = spawnSync("ollama", ["pull", name], { stdio: quiet ? "ignore" : "inherit" });
3961
+ const { resolveOllamaBinary: resolveOllamaBinary2 } = (init_resolve_ollama(), __toCommonJS(resolve_ollama_exports));
3962
+ const ollama = resolveOllamaBinary2();
3963
+ if (!ollama) return 127;
3964
+ const res = spawnSync(ollama, ["pull", name], { stdio: quiet ? "ignore" : "inherit" });
3913
3965
  return res.status ?? 1;
3914
3966
  }
3967
+ init_resolve_ollama();
3915
3968
  function defaultHasBinary(name) {
3969
+ if (name === "ollama" || name === "ollama.exe") return hasOllamaBinary();
3916
3970
  const res = spawnSync(process.platform === "win32" ? "where" : "which", [name], { stdio: "ignore" });
3917
3971
  return res.status === 0;
3918
3972
  }
@@ -5237,6 +5291,7 @@ function applyRecommendedDefaultMode(opts) {
5237
5291
  reason: `pinned default to ${recommended} from RAM/VRAM + repo fit`
5238
5292
  };
5239
5293
  }
5294
+ init_resolve_ollama();
5240
5295
  function registerModels(program) {
5241
5296
  const cmd = program.command("models").description("Code Modes (Spark/Flow/Forge) + local model fleet").option("--raw", "list discovered local models only (skip Code Modes status)").action(function(opts) {
5242
5297
  const global = readGlobal(this);
@@ -5336,7 +5391,7 @@ function registerModels(program) {
5336
5391
  );
5337
5392
  });
5338
5393
  applyGlobalOptions(modeCmd);
5339
- const resolve20 = cmd.command("resolve").description("resolve a Code Mode to pack + underlying model + fit (no download)").argument("[mode]", "spark | flow | forge (default: auto-fit or configured default)").action(function(modeArg) {
5394
+ const resolve21 = cmd.command("resolve").description("resolve a Code Mode to pack + underlying model + fit (no download)").argument("[mode]", "spark | flow | forge (default: auto-fit or configured default)").action(function(modeArg) {
5340
5395
  const global = readGlobal(this);
5341
5396
  const root2 = rootOf(global);
5342
5397
  const sys = gatherSystemMemory();
@@ -5368,7 +5423,7 @@ function registerModels(program) {
5368
5423
  info(c.yellow(" will not fit \u2014 choose a lower mode or free memory before loading"));
5369
5424
  }
5370
5425
  });
5371
- applyGlobalOptions(resolve20);
5426
+ applyGlobalOptions(resolve21);
5372
5427
  const installCmd = cmd.command("install").description("resolve the best Code Mode for this machine and install the pack").argument("[mode]", "spark | flow | forge (default: auto-fit)").option("--dry-run", "print the install plan only \u2014 do not download").option("--yes", "skip prompts (install already runs by default)").action(async function(modeArg, opts) {
5373
5428
  const global = readGlobal(this);
5374
5429
  const root2 = rootOf(global);
@@ -5585,17 +5640,22 @@ function registerModels(program) {
5585
5640
  }
5586
5641
  }
5587
5642
  if (target.runtime === "ollama") {
5588
- if (!hasBinary("ollama")) {
5643
+ const ollama = resolveOllamaBinary();
5644
+ if (!ollama) {
5589
5645
  throw new CliError(
5590
- "ollama is not installed or not on PATH \u2014 install it from https://ollama.com, then re-run.",
5646
+ "ollama is not installed or not on PATH \u2014 install it from https://ollama.com, then re-run. (Dock-launched editors often miss Homebrew; open a terminal and try `which ollama`, or add /opt/homebrew/bin to PATH.)",
5591
5647
  ExitCode.NOT_FOUND
5592
5648
  );
5593
5649
  }
5594
5650
  if (!global.json) info(c.dim(` $ ${plan.command}`));
5595
- const res = spawnSync("ollama", ["rm", target.name], { stdio: global.json ? "ignore" : "inherit" });
5651
+ const res = spawnSync(ollama, ["rm", target.name], {
5652
+ encoding: "utf8",
5653
+ stdio: global.json ? ["ignore", "pipe", "pipe"] : "inherit"
5654
+ });
5596
5655
  if (res.status !== 0) {
5656
+ const tail = [res.stderr, res.stdout].filter(Boolean).join("\n").split(/\r?\n/).map((l) => l.trim()).filter(Boolean).slice(-3).join(" \xB7 ");
5597
5657
  throw new CliError(
5598
- `\`ollama rm ${target.name}\` failed (exit ${res.status ?? "signal"}) \u2014 check the model name with \`vg models --raw\`.`,
5658
+ `\`ollama rm ${target.name}\` failed (exit ${res.status ?? "signal"})${tail ? `: ${tail}` : ""} \u2014 check the model name with \`vg models --raw\`.`,
5599
5659
  ExitCode.ERROR
5600
5660
  );
5601
5661
  }
@@ -5794,6 +5854,7 @@ function registerModels(program) {
5794
5854
  applyGlobalOptions(catalog);
5795
5855
  }
5796
5856
  function hasBinary(bin) {
5857
+ if (bin === "ollama" || bin === "ollama.exe") return hasOllamaBinary();
5797
5858
  const probe = spawnSync(process.platform === "win32" ? "where" : "which", [bin], { stdio: "ignore" });
5798
5859
  return probe.status === 0;
5799
5860
  }
@@ -5867,11 +5928,11 @@ function fitColor(label) {
5867
5928
  return label;
5868
5929
  }
5869
5930
  function confirmYesNo(question) {
5870
- return new Promise((resolve20) => {
5931
+ return new Promise((resolve21) => {
5871
5932
  const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
5872
5933
  rl.question(`${question} [y/N] `, (answer) => {
5873
5934
  rl.close();
5874
- resolve20(/^y(es)?$/i.test(answer.trim()));
5935
+ resolve21(/^y(es)?$/i.test(answer.trim()));
5875
5936
  });
5876
5937
  });
5877
5938
  }
@@ -6056,9 +6117,9 @@ function registerCode(program) {
6056
6117
  const customSelection = !!(opts.provider || opts.model || opts.modelPath || config.provider || config.model);
6057
6118
  if (!customSelection && (modeFlag || !provider && !model)) {
6058
6119
  try {
6059
- const { parseMode: parseMode2, resolveMode: resolveMode2, readOrchestratorState: readOrchestratorState2, activePin: activePin2 } = await import('./model-orchestrator-4M5FG6MN.js');
6060
- const { gatherSystemMemory: gatherSystemMemory2 } = await import('./local-runtime-5O2NN3GA.js');
6061
- const { loadGraph: loadGraph2 } = await import('./load-QPOWQD7C.js');
6120
+ const { parseMode: parseMode2, resolveMode: resolveMode2, readOrchestratorState: readOrchestratorState2, activePin: activePin2 } = await import('./model-orchestrator-LHYPJBFH.js');
6121
+ const { gatherSystemMemory: gatherSystemMemory2 } = await import('./local-runtime-2ED33KK6.js');
6122
+ const { loadGraph: loadGraph2 } = await import('./load-SEFJA3M5.js');
6062
6123
  const state = readOrchestratorState2();
6063
6124
  const mode = parseMode2(modeFlag) ?? state.defaultMode ?? void 0;
6064
6125
  const pin = mode ? activePin2(mode, state) : null;
@@ -6087,7 +6148,7 @@ function registerCode(program) {
6087
6148
  ExitCode.ERROR
6088
6149
  );
6089
6150
  }
6090
- const { resolveGgufPath } = await import('./resolve-gguf-4AFRN4CP.js');
6151
+ const { resolveGgufPath } = await import('./resolve-gguf-SDIYGGI6.js');
6091
6152
  const primaryRef = resolved.pack.primary.backend === "llama.cpp" ? resolved.pack.primary.weightsRef : resolved.underlying.weightsRef;
6092
6153
  const gguf = resolveGgufPath({
6093
6154
  modelRef: primaryRef,
@@ -6142,7 +6203,7 @@ function registerCode(program) {
6142
6203
  if (!(process.stdin.isTTY && process.stdout.isTTY)) {
6143
6204
  throw usageError('say what to change, e.g. `vg code "add a --timeout flag to the scan command"` (guided mode needs an interactive terminal)');
6144
6205
  }
6145
- const { runInteractive } = await import('./interactive-OCWQ326U.js');
6206
+ const { runInteractive } = await import('./interactive-KVDKRKNK.js');
6146
6207
  await runInteractive(
6147
6208
  rootOf(global),
6148
6209
  global,
@@ -6194,7 +6255,7 @@ function registerCode(program) {
6194
6255
  {}
6195
6256
  );
6196
6257
  if (!opts.mock && route.providers[0]) {
6197
- const { ensureManagerRuntime } = await import('./model-manager-LB54VSV7.js');
6258
+ const { ensureManagerRuntime } = await import('./model-manager-GJ2YSTSK.js');
6198
6259
  const ensure = await ensureManagerRuntime({
6199
6260
  providerId: route.providers[0].id,
6200
6261
  model: route.providers[0].model,
@@ -6224,18 +6285,18 @@ function registerCode(program) {
6224
6285
  };
6225
6286
  try {
6226
6287
  const primarySlug = route.providers[0]?.model.includes("/") ? route.providers[0].model.split("/")[0] : route.providers[0]?.id;
6227
- const { runCodeStreamJson } = await import('./stream-json-Z5KC2DM3.js');
6228
- const { nodeCodeFs } = await import('./session-ZJGENHKX.js');
6288
+ const { runCodeStreamJson } = await import('./stream-json-Y45JBNYP.js');
6289
+ const { nodeCodeFs } = await import('./session-2JT4AUZT.js');
6229
6290
  const readline5 = await import('readline');
6230
6291
  const child = await import('child_process');
6231
- const { loadOrDiscoverFederation } = await import('./federation-SZWZIFZ7.js');
6232
- const { resolveExecutionEnv } = await import('./execution-env-ZU45JZ4G.js');
6233
- const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-TFBKCNJG.js');
6234
- const { startCodeRuntimeSession } = await import('./runtime-session-EJQZXANB.js');
6235
- const { resolveGraphBackend } = await import('./graph-backend-UTOL3SHE.js');
6236
- const { detectGitRef } = await import('./git-ref-XDXB6JP5.js');
6237
- const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
6238
- const { vgdRequest: vgdRequest2 } = await import('./vgd-3MHSB4KA.js');
6292
+ const { loadOrDiscoverFederation } = await import('./federation-MDQPO3PW.js');
6293
+ const { resolveExecutionEnv } = await import('./execution-env-4MS5AYAN.js');
6294
+ const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-ELWF3Z6H.js');
6295
+ const { startCodeRuntimeSession } = await import('./runtime-session-4IACVDSY.js');
6296
+ const { resolveGraphBackend } = await import('./graph-backend-GBL33GMW.js');
6297
+ const { detectGitRef } = await import('./git-ref-RSRAN4OH.js');
6298
+ const { repositoryIdFromRoot } = await import('./paths-62AKTFSR.js');
6299
+ const { vgdRequest: vgdRequest2 } = await import('./vgd-KDQFS33M.js');
6239
6300
  const federation = loadOrDiscoverFederation(root2);
6240
6301
  const modelProfile = mergeModelExecutionProfile(
6241
6302
  resolveModelExecutionProfile({
@@ -6281,6 +6342,26 @@ ${res.stderr}` : ""),
6281
6342
  exitCode: res.status ?? 1
6282
6343
  };
6283
6344
  };
6345
+ const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-B35WCSAS.js');
6346
+ const vgBuiltin = createVgBuiltinMcpTools({
6347
+ getGraph: () => graph,
6348
+ root: root2,
6349
+ local: global.local === true
6350
+ });
6351
+ let disposeMcpStream;
6352
+ let projectMcp;
6353
+ let streamApprove = async () => !!auto;
6354
+ if (Object.keys(mcp.servers).length) {
6355
+ const { McpToolset, defaultMcpConnect } = await import('./mcp-tools-KAJS34TN.js');
6356
+ const { toolset } = await McpToolset.connect(mcp.servers, defaultMcpConnect);
6357
+ disposeMcpStream = () => toolset.dispose();
6358
+ projectMcp = {
6359
+ specs: toolset.specs(),
6360
+ owns: (n) => toolset.owns(n),
6361
+ execute: (call) => toolset.execute(call, (action) => streamApprove(action))
6362
+ };
6363
+ }
6364
+ const externalTools = mergeExternalToolsets(vgBuiltin, projectMcp);
6284
6365
  try {
6285
6366
  await runCodeStreamJson({
6286
6367
  graph,
@@ -6304,6 +6385,7 @@ ${res.stderr}` : ""),
6304
6385
  files: opts.file.length ? opts.file : void 0,
6305
6386
  worktreeOverlay: true,
6306
6387
  advancedMode: !capsule,
6388
+ externalTools,
6307
6389
  attribution: {
6308
6390
  client: "vg-code",
6309
6391
  provider: primarySlug,
@@ -6312,17 +6394,20 @@ ${res.stderr}` : ""),
6312
6394
  now: () => Date.now(),
6313
6395
  emit: emitStream,
6314
6396
  bindDecisions: (session) => {
6397
+ streamApprove = (action) => session.approve(action);
6315
6398
  const rl = readline5.createInterface({ input: process.stdin });
6316
6399
  rl.on("line", (raw) => {
6317
6400
  try {
6318
6401
  const msg = JSON.parse(raw);
6319
6402
  if (typeof msg.approveId === "number") session.submitDecision(msg.approveId, !!msg.approve);
6403
+ if (typeof msg.answerId === "number") session.submitAnswer(msg.answerId, String(msg.answer ?? ""));
6320
6404
  } catch {
6321
6405
  }
6322
6406
  });
6323
6407
  }
6324
6408
  });
6325
6409
  } finally {
6410
+ await disposeMcpStream?.();
6326
6411
  await runtime.dispose();
6327
6412
  }
6328
6413
  } catch (e) {
@@ -6339,34 +6424,45 @@ ${res.stderr}` : ""),
6339
6424
  if (!autonomous && !tty) {
6340
6425
  throw usageError("the agent approves each edit/command \u2014 run in a terminal to approve interactively, or pass --auto to run autonomously (or --single for a one-shot diff).");
6341
6426
  }
6342
- const { agentTask } = await import('./interactive-OCWQ326U.js');
6343
- const { nodeCodeFs } = await import('./session-ZJGENHKX.js');
6344
- const { TtyPrompter } = await import('./ui-Q6DJ3GCU.js');
6427
+ const { agentTask } = await import('./interactive-KVDKRKNK.js');
6428
+ const { nodeCodeFs } = await import('./session-2JT4AUZT.js');
6429
+ const { TtyPrompter } = await import('./ui-K7D3BCHD.js');
6345
6430
  let priorSummary;
6346
6431
  if (opts.continue) {
6347
- const { loadLatestSession, summarizeSession } = await import('./session-store-WFBX7HXL.js');
6432
+ const { loadLatestSession, summarizeSession } = await import('./session-store-O4XPXKOV.js');
6348
6433
  const prev = loadLatestSession(root2);
6349
6434
  if (prev) priorSummary = summarizeSession(prev);
6350
6435
  }
6351
6436
  const prompter = tty ? new TtyPrompter() : void 0;
6352
- let mcpTools;
6437
+ const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-B35WCSAS.js');
6438
+ const vgBuiltin = createVgBuiltinMcpTools({
6439
+ getGraph: () => graph,
6440
+ root: root2,
6441
+ local: global.local === true
6442
+ });
6443
+ let projectMcp;
6353
6444
  let disposeMcp;
6354
6445
  if (Object.keys(mcp.servers).length) {
6355
- const { McpToolset, defaultMcpConnect } = await import('./mcp-tools-I7JK3S2M.js');
6446
+ const { McpToolset, defaultMcpConnect } = await import('./mcp-tools-KAJS34TN.js');
6356
6447
  const { toolset } = await McpToolset.connect(mcp.servers, defaultMcpConnect);
6357
6448
  disposeMcp = () => toolset.dispose();
6358
6449
  const approve = async (a) => autonomous || !!(prompter && a.kind === "tool" && await prompter.confirm("Call an external tool?", false));
6359
- mcpTools = { specs: toolset.specs(), owns: (n) => toolset.owns(n), execute: (call) => toolset.execute(call, approve) };
6450
+ projectMcp = {
6451
+ specs: toolset.specs(),
6452
+ owns: (n) => toolset.owns(n),
6453
+ execute: (call) => toolset.execute(call, approve)
6454
+ };
6360
6455
  }
6456
+ const mcpTools = mergeExternalToolsets(vgBuiltin, projectMcp);
6361
6457
  try {
6362
- const { loadFederation } = await import('./federation-SZWZIFZ7.js');
6363
- const { resolveExecutionEnv } = await import('./execution-env-ZU45JZ4G.js');
6364
- const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-TFBKCNJG.js');
6365
- const { startCodeRuntimeSession } = await import('./runtime-session-EJQZXANB.js');
6366
- const { resolveGraphBackend } = await import('./graph-backend-UTOL3SHE.js');
6367
- const { detectGitRef } = await import('./git-ref-XDXB6JP5.js');
6368
- const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
6369
- const { vgdRequest: vgdRequest2 } = await import('./vgd-3MHSB4KA.js');
6458
+ const { loadFederation } = await import('./federation-MDQPO3PW.js');
6459
+ const { resolveExecutionEnv } = await import('./execution-env-4MS5AYAN.js');
6460
+ const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-ELWF3Z6H.js');
6461
+ const { startCodeRuntimeSession } = await import('./runtime-session-4IACVDSY.js');
6462
+ const { resolveGraphBackend } = await import('./graph-backend-GBL33GMW.js');
6463
+ const { detectGitRef } = await import('./git-ref-RSRAN4OH.js');
6464
+ const { repositoryIdFromRoot } = await import('./paths-62AKTFSR.js');
6465
+ const { vgdRequest: vgdRequest2 } = await import('./vgd-KDQFS33M.js');
6370
6466
  const federation = loadFederation(root2);
6371
6467
  const modelProfile = mergeModelExecutionProfile(
6372
6468
  resolveModelExecutionProfile({
@@ -6510,11 +6606,11 @@ function resolveSecurityTierFlag(flag, fromConfig, auto) {
6510
6606
  return auto ? "L1" : "L0";
6511
6607
  }
6512
6608
  function confirm(question) {
6513
- return new Promise((resolve20) => {
6609
+ return new Promise((resolve21) => {
6514
6610
  const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
6515
6611
  rl.question(`${question} [y/N] `, (answer) => {
6516
6612
  rl.close();
6517
- resolve20(/^y(es)?$/i.test(answer.trim()));
6613
+ resolve21(/^y(es)?$/i.test(answer.trim()));
6518
6614
  });
6519
6615
  });
6520
6616
  }
@@ -7172,7 +7268,7 @@ function registerDaemon(program) {
7172
7268
  if (!await vgdIsRunning({ socketPath })) {
7173
7269
  throw new CliError(`vgd is not running \u2014 start it with \`vg daemon start\` (${socketPath})`, ExitCode.NOT_FOUND);
7174
7270
  }
7175
- const { loadFederation } = await import('./federation-SZWZIFZ7.js');
7271
+ const { loadFederation } = await import('./federation-MDQPO3PW.js');
7176
7272
  const fed = loadFederation(primary);
7177
7273
  if (!fed) throw new CliError(`could not load federation for ${primary}`, ExitCode.ERROR);
7178
7274
  const res = await vgdRequest(
@@ -7200,9 +7296,9 @@ function registerDaemon(program) {
7200
7296
  if (!await vgdIsRunning({ socketPath })) {
7201
7297
  throw new CliError(`vgd is not running \u2014 start it with \`vg daemon ensure\` (${socketPath})`, ExitCode.NOT_FOUND);
7202
7298
  }
7203
- const { loadGraph: loadGraph2 } = await import('./load-QPOWQD7C.js');
7204
- const { detectGitRef } = await import('./git-ref-XDXB6JP5.js');
7205
- const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
7299
+ const { loadGraph: loadGraph2 } = await import('./load-SEFJA3M5.js');
7300
+ const { detectGitRef } = await import('./git-ref-RSRAN4OH.js');
7301
+ const { repositoryIdFromRoot } = await import('./paths-62AKTFSR.js');
7206
7302
  const opts = this.opts();
7207
7303
  const graph = loadGraph2(root2, global.graph);
7208
7304
  if (!graph) {
@@ -7340,7 +7436,7 @@ function sleep(ms) {
7340
7436
  return new Promise((r) => setTimeout(r, ms));
7341
7437
  }
7342
7438
  async function repositoryIdForCwd(socketPath, root2) {
7343
- const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
7439
+ const { repositoryIdFromRoot } = await import('./paths-62AKTFSR.js');
7344
7440
  const reg = await vgdRequest({ op: "register", root: root2 }, { socketPath });
7345
7441
  if (reg.ok && "workspace" in reg) return reg.workspace.id;
7346
7442
  return repositoryIdFromRoot(root2);
@@ -7549,7 +7645,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
7549
7645
  console.log(chalk7.green("\u2714") + ` Created ${chalk7.bold("vibgrate.config.ts")}`);
7550
7646
  }
7551
7647
  if (opts.baseline) {
7552
- const { runBaseline } = await import('./baseline-PPZJBYAJ.js');
7648
+ const { runBaseline } = await import('./baseline-Y5FBYWNJ.js');
7553
7649
  await runBaseline(rootDir);
7554
7650
  }
7555
7651
  console.log("");
@@ -7834,6 +7930,7 @@ function emitDriftScoreLine(score) {
7834
7930
  if (process.env.VIBGRATE_EMIT_MARKERS !== "1") return;
7835
7931
  console.log(`VIBGRATE_DRIFT_SCORE=${score}`);
7836
7932
  }
7933
+ init_cli_invocation();
7837
7934
  var AI_ASSISTANT_DETECTORS = [
7838
7935
  { files: ["CLAUDE.md", ".claude"], name: "claude" },
7839
7936
  { files: [".cursor", ".cursorrules"], name: "cursor" },
@@ -7874,6 +7971,7 @@ function printAiContextPrompt(detectedAssistant) {
7874
7971
  }
7875
7972
 
7876
7973
  // src/reporting/commands/scan.ts
7974
+ init_cli_invocation();
7877
7975
  function shouldBuildCodeMap(opts) {
7878
7976
  return opts.graph !== false && !opts.maxPrivacy && !opts.noLocalArtifacts;
7879
7977
  }
@@ -8346,6 +8444,9 @@ function scanStaleness(rootDir, artifactPath) {
8346
8444
  walk2(rootDir, 0);
8347
8445
  return newest > ref ? { stale: true, newestChanged } : { stale: false };
8348
8446
  }
8447
+
8448
+ // src/reporting/commands/fix.ts
8449
+ init_cli_invocation();
8349
8450
  var MAX_CONTRACTS = 40;
8350
8451
  function escapeRegExp(s) {
8351
8452
  return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -8967,11 +9068,11 @@ async function getLocalDependencyState(cwd, pkg = PACKAGE_NAME) {
8967
9068
  async function confirmWorkspaceRoot(pm) {
8968
9069
  if (!(process.stdin.isTTY && process.stdout.isTTY)) return false;
8969
9070
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
8970
- return new Promise((resolve20) => {
9071
+ return new Promise((resolve21) => {
8971
9072
  rl.question(chalk7.yellow(`Update the ${pm} workspace root with -w? [y/N]: `), (ans) => {
8972
9073
  rl.close();
8973
9074
  const t = ans.trim().toLowerCase();
8974
- resolve20(t === "y" || t === "yes");
9075
+ resolve21(t === "y" || t === "yes");
8975
9076
  });
8976
9077
  });
8977
9078
  }
@@ -9338,14 +9439,14 @@ function promptPlanSelection(response) {
9338
9439
  const defaultIdx = plans.findIndex((p) => p.tier === response.recommended);
9339
9440
  const def = defaultIdx >= 0 ? defaultIdx + 1 : 1;
9340
9441
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
9341
- return new Promise((resolve20) => {
9442
+ return new Promise((resolve21) => {
9342
9443
  rl.question(`Plan [1-${plans.length}, default ${def}, q to cancel]: `, (ans) => {
9343
9444
  rl.close();
9344
9445
  const t = ans.trim().toLowerCase();
9345
- if (t === "q" || t === "quit") return resolve20(null);
9446
+ if (t === "q" || t === "quit") return resolve21(null);
9346
9447
  const n = t === "" ? def : Number.parseInt(t, 10);
9347
- if (!Number.isInteger(n) || n < 1 || n > plans.length) return resolve20(null);
9348
- resolve20(plans[n - 1].tier);
9448
+ if (!Number.isInteger(n) || n < 1 || n > plans.length) return resolve21(null);
9449
+ resolve21(plans[n - 1].tier);
9349
9450
  });
9350
9451
  });
9351
9452
  }
@@ -10152,6 +10253,7 @@ var reportCommand = new Command("report").description("Generate a drift report f
10152
10253
  break;
10153
10254
  }
10154
10255
  });
10256
+ init_cli_invocation();
10155
10257
  function openUrl(url) {
10156
10258
  const platform = process.platform;
10157
10259
  let command;
@@ -10178,7 +10280,7 @@ function openUrl(url) {
10178
10280
  }
10179
10281
 
10180
10282
  // src/reporting/commands/login.ts
10181
- var delay = (ms) => new Promise((resolve20) => setTimeout(resolve20, ms));
10283
+ var delay = (ms) => new Promise((resolve21) => setTimeout(resolve21, ms));
10182
10284
  function isInside(dir, file) {
10183
10285
  const rel = path37.relative(dir, file);
10184
10286
  return !!rel && !rel.startsWith("..") && !path37.isAbsolute(rel);
@@ -11675,7 +11777,7 @@ async function hasRecentDrill(root2, asOf) {
11675
11777
  const dir = path37.join(evidenceDir(root2), "drills");
11676
11778
  if (!await pathExists(dir)) return void 0;
11677
11779
  const { readdir } = await import('fs/promises');
11678
- const { readJsonFile: readJsonFile2 } = await import('./fs-O5IQYXHO.js');
11780
+ const { readJsonFile: readJsonFile2 } = await import('./fs-4G5A65KS.js');
11679
11781
  const files = (await readdir(dir)).filter((f) => f.endsWith(".json"));
11680
11782
  if (files.length === 0) return void 0;
11681
11783
  const cutoff = new Date(new Date(asOf).getTime() - 90 * 24 * 3600 * 1e3).toISOString();