@vibgrate/cli 2026.727.1 → 2026.727.2

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 (124) hide show
  1. package/DOCS.md +0 -17
  2. package/README.md +0 -1
  3. package/dist/baseline-TG4ATZGZ.js +8 -0
  4. package/dist/{baseline-K7YBFKZI.js.map → baseline-TG4ATZGZ.js.map} +1 -1
  5. package/dist/{chunk-JZYGEZTU.js → chunk-2MBL43EJ.js} +3 -3
  6. package/dist/{chunk-JZYGEZTU.js.map → chunk-2MBL43EJ.js.map} +1 -1
  7. package/dist/{chunk-HABUT7HW.js → chunk-2XQDMLKB.js} +240 -8
  8. package/dist/chunk-2XQDMLKB.js.map +1 -0
  9. package/dist/{chunk-VXGV6NTD.js → chunk-3V24O47U.js} +11 -9
  10. package/dist/chunk-3V24O47U.js.map +1 -0
  11. package/dist/{chunk-6IOQJGFT.js → chunk-6ABXHZRN.js} +34 -77
  12. package/dist/chunk-6ABXHZRN.js.map +1 -0
  13. package/dist/{chunk-4CQ3MGNN.js → chunk-6AYDFFP5.js} +3 -3
  14. package/dist/{chunk-4CQ3MGNN.js.map → chunk-6AYDFFP5.js.map} +1 -1
  15. package/dist/chunk-6UQMXIAG.js +122 -0
  16. package/dist/chunk-6UQMXIAG.js.map +1 -0
  17. package/dist/{chunk-KHJO4D5N.js → chunk-7N4Y3E47.js} +2 -2
  18. package/dist/{chunk-KHJO4D5N.js.map → chunk-7N4Y3E47.js.map} +1 -1
  19. package/dist/{chunk-OXQNQW5J.js → chunk-CY4WKXB2.js} +4 -4
  20. package/dist/{chunk-OXQNQW5J.js.map → chunk-CY4WKXB2.js.map} +1 -1
  21. package/dist/chunk-DGUM43GV.js +10 -0
  22. package/dist/chunk-DGUM43GV.js.map +1 -0
  23. package/dist/{chunk-HYZVHJ3Q.js → chunk-EX4PQT6W.js} +3 -3
  24. package/dist/{chunk-HYZVHJ3Q.js.map → chunk-EX4PQT6W.js.map} +1 -1
  25. package/dist/{chunk-3BVSDMHV.js → chunk-J4RFRKZH.js} +7 -7
  26. package/dist/{chunk-3BVSDMHV.js.map → chunk-J4RFRKZH.js.map} +1 -1
  27. package/dist/chunk-K3MZIVZW.js +88 -0
  28. package/dist/chunk-K3MZIVZW.js.map +1 -0
  29. package/dist/{chunk-65MEOA4E.js → chunk-KCKYKDMS.js} +9 -8
  30. package/dist/chunk-KCKYKDMS.js.map +1 -0
  31. package/dist/{chunk-S6CYDZEW.js → chunk-KNELIQJO.js} +364 -179
  32. package/dist/chunk-KNELIQJO.js.map +1 -0
  33. package/dist/{chunk-EDAAG7BL.js → chunk-KSBHGWRV.js} +4 -3
  34. package/dist/chunk-KSBHGWRV.js.map +1 -0
  35. package/dist/{chunk-C4CKTAZP.js → chunk-LKVMI67M.js} +4 -4
  36. package/dist/chunk-LKVMI67M.js.map +1 -0
  37. package/dist/{chunk-7JHPQ6WF.js → chunk-OFUC6RYN.js} +3 -3
  38. package/dist/{chunk-7JHPQ6WF.js.map → chunk-OFUC6RYN.js.map} +1 -1
  39. package/dist/{chunk-YDAT7LD2.js → chunk-RNP3SMTV.js} +17 -9
  40. package/dist/chunk-RNP3SMTV.js.map +1 -0
  41. package/dist/{chunk-SZLF66FJ.js → chunk-TCDAZZNP.js} +5 -5
  42. package/dist/{chunk-SZLF66FJ.js.map → chunk-TCDAZZNP.js.map} +1 -1
  43. package/dist/{chunk-WLETRGAC.js → chunk-WGUL45AV.js} +11 -11
  44. package/dist/{chunk-WLETRGAC.js.map → chunk-WGUL45AV.js.map} +1 -1
  45. package/dist/cli.d.ts +3 -0
  46. package/dist/cli.js +97 -240
  47. package/dist/cli.js.map +1 -1
  48. package/dist/{execution-env-3BN7Z737.js → execution-env-ZU45JZ4G.js} +3 -2
  49. package/dist/{execution-env-3BN7Z737.js.map → execution-env-ZU45JZ4G.js.map} +1 -1
  50. package/dist/{federation-EPZDUWCK.js → federation-SZWZIFZ7.js} +3 -2
  51. package/dist/{federation-EPZDUWCK.js.map → federation-SZWZIFZ7.js.map} +1 -1
  52. package/dist/{fs-IPY4FJKH.js → fs-B5HZ2MIU.js} +3 -2
  53. package/dist/fs-B5HZ2MIU.js.map +1 -0
  54. package/dist/{fs-KCABDURV.js → fs-O5IQYXHO.js} +3 -2
  55. package/dist/fs-O5IQYXHO.js.map +1 -0
  56. package/dist/{git-ref-HPRLUFFW.js → git-ref-XDXB6JP5.js} +3 -2
  57. package/dist/{git-ref-HPRLUFFW.js.map → git-ref-XDXB6JP5.js.map} +1 -1
  58. package/dist/graph-backend-73URGTFY.js +11 -0
  59. package/dist/{graph-backend-ZMSYOZMW.js.map → graph-backend-73URGTFY.js.map} +1 -1
  60. package/dist/index.d.ts +44 -15
  61. package/dist/index.js +9 -8
  62. package/dist/index.js.map +1 -1
  63. package/dist/{interactive-ICL7D7LO.js → interactive-372NLI5C.js} +19 -18
  64. package/dist/interactive-372NLI5C.js.map +1 -0
  65. package/dist/{llm-host-2RAYQSDQ.js → llm-host-7GWDO6IX.js} +3 -2
  66. package/dist/{llm-host-2RAYQSDQ.js.map → llm-host-7GWDO6IX.js.map} +1 -1
  67. package/dist/load-I333TGNI.js +8 -0
  68. package/dist/{load-OHVKDX4R.js.map → load-I333TGNI.js.map} +1 -1
  69. package/dist/local-runtime-5O2NN3GA.js +5 -0
  70. package/dist/{local-runtime-OJFLX2HI.js.map → local-runtime-5O2NN3GA.js.map} +1 -1
  71. package/dist/mcp-tools-I7JK3S2M.js +4 -0
  72. package/dist/{mcp-tools-I6PME3AV.js.map → mcp-tools-I7JK3S2M.js.map} +1 -1
  73. package/dist/{model-execution-profile-MQ2QCP24.js → model-execution-profile-TFBKCNJG.js} +3 -2
  74. package/dist/{model-execution-profile-MQ2QCP24.js.map → model-execution-profile-TFBKCNJG.js.map} +1 -1
  75. package/dist/{model-orchestrator-FFTZI3U2.js → model-orchestrator-TVONAUPS.js} +5 -4
  76. package/dist/{model-orchestrator-FFTZI3U2.js.map → model-orchestrator-TVONAUPS.js.map} +1 -1
  77. package/dist/parse-worker.d.ts +1 -1
  78. package/dist/parse-worker.js +1 -0
  79. package/dist/parse-worker.js.map +1 -1
  80. package/dist/{paths-MCH75O3G.js → paths-2RAH3GME.js} +3 -2
  81. package/dist/{paths-MCH75O3G.js.map → paths-2RAH3GME.js.map} +1 -1
  82. package/dist/{resolve-gguf-4UPIGPEE.js → resolve-gguf-VPL4YQ6J.js} +3 -2
  83. package/dist/{resolve-gguf-4UPIGPEE.js.map → resolve-gguf-VPL4YQ6J.js.map} +1 -1
  84. package/dist/runtime-session-JRKCQUHY.js +18 -0
  85. package/dist/{runtime-session-IDU5BDUJ.js.map → runtime-session-JRKCQUHY.js.map} +1 -1
  86. package/dist/session-ITPYQ5XI.js +11 -0
  87. package/dist/{session-L2OSDRPI.js.map → session-ITPYQ5XI.js.map} +1 -1
  88. package/dist/session-store-WFBX7HXL.js +4 -0
  89. package/dist/{session-store-W5RZZHA3.js.map → session-store-WFBX7HXL.js.map} +1 -1
  90. package/dist/{stream-json-F74W5FCK.js → stream-json-SLMDKLXP.js} +10 -9
  91. package/dist/stream-json-SLMDKLXP.js.map +1 -0
  92. package/dist/{types-ZMg1mSuu.d.ts → types-7AHBUbFm.d.ts} +5 -1
  93. package/dist/ui-Q6DJ3GCU.js +5 -0
  94. package/dist/ui-Q6DJ3GCU.js.map +1 -0
  95. package/dist/{vgd-EGBQD7BW.js → vgd-7JV5KCNJ.js} +7 -6
  96. package/dist/vgd-7JV5KCNJ.js.map +1 -0
  97. package/package.json +1 -1
  98. package/dist/baseline-K7YBFKZI.js +0 -7
  99. package/dist/chunk-5Q54GEHM.js +0 -29
  100. package/dist/chunk-5Q54GEHM.js.map +0 -1
  101. package/dist/chunk-65MEOA4E.js.map +0 -1
  102. package/dist/chunk-6IOQJGFT.js.map +0 -1
  103. package/dist/chunk-C4CKTAZP.js.map +0 -1
  104. package/dist/chunk-EDAAG7BL.js.map +0 -1
  105. package/dist/chunk-EDBV33B7.js +0 -57
  106. package/dist/chunk-EDBV33B7.js.map +0 -1
  107. package/dist/chunk-HABUT7HW.js.map +0 -1
  108. package/dist/chunk-S6CYDZEW.js.map +0 -1
  109. package/dist/chunk-VXGV6NTD.js.map +0 -1
  110. package/dist/chunk-YDAT7LD2.js.map +0 -1
  111. package/dist/fs-IPY4FJKH.js.map +0 -1
  112. package/dist/fs-KCABDURV.js.map +0 -1
  113. package/dist/graph-backend-ZMSYOZMW.js +0 -10
  114. package/dist/interactive-ICL7D7LO.js.map +0 -1
  115. package/dist/load-OHVKDX4R.js +0 -7
  116. package/dist/local-runtime-OJFLX2HI.js +0 -4
  117. package/dist/mcp-tools-I6PME3AV.js +0 -3
  118. package/dist/runtime-session-IDU5BDUJ.js +0 -17
  119. package/dist/session-L2OSDRPI.js +0 -10
  120. package/dist/session-store-W5RZZHA3.js +0 -3
  121. package/dist/stream-json-F74W5FCK.js.map +0 -1
  122. package/dist/ui-HOVOPWMX.js +0 -4
  123. package/dist/ui-HOVOPWMX.js.map +0 -1
  124. package/dist/vgd-EGBQD7BW.js.map +0 -1
package/dist/cli.js CHANGED
@@ -1,41 +1,42 @@
1
1
  #!/usr/bin/env node
2
- import { loadAdvancedScanHook, baselineCommand } from './chunk-HYZVHJ3Q.js';
3
- import { sha256Hex, generateKeypair, dssePae, DSSE_PAYLOAD_TYPE, keyId, registerBuild, readGlobal, applyGlobalOptions, ProgressBar, printLogo, fetchCatalog, resolveProviders, runBuild } from './chunk-YDAT7LD2.js';
4
- export { runBuild } from './chunk-YDAT7LD2.js';
5
- import { VGD_PROTOCOL_VERSION, startVgdServer } from './chunk-SZLF66FJ.js';
2
+ import { loadAdvancedScanHook, baselineCommand } from './chunk-EX4PQT6W.js';
3
+ import { sha256Hex, generateKeypair, dssePae, DSSE_PAYLOAD_TYPE, keyId, registerBuild, readGlobal, applyGlobalOptions, ProgressBar, printLogo, fetchCatalog, resolveProviders, runBuild } from './chunk-RNP3SMTV.js';
4
+ export { runBuild } from './chunk-RNP3SMTV.js';
5
+ import { VGD_PROTOCOL_VERSION, startVgdServer } from './chunk-TCDAZZNP.js';
6
6
  import './chunk-5I4VSBWQ.js';
7
7
  import './chunk-IS7VTH2Q.js';
8
- import { CONTEXT_POLICY_VERSION, computeFcsReport, renderFcsReportMarkdown, createTrajectoryCollector, runAgent } from './chunk-3BVSDMHV.js';
9
- import { gatherSystemMemory } from './chunk-EDBV33B7.js';
10
- import { readOrchestratorState, writeOrchestratorState, parseMode, setDefaultMode, recommendMode, activePin, resolveMode, providerForBackend, QUALIFIED_PACKS, pinPack, unpinPack, buildOrchestratorStatus } from './chunk-VXGV6NTD.js';
11
- import { fmt, estimateModelBytes } from './chunk-KHJO4D5N.js';
8
+ import { CONTEXT_POLICY_VERSION, computeFcsReport, renderFcsReportMarkdown, createTrajectoryCollector, runAgent } from './chunk-J4RFRKZH.js';
9
+ import { gatherSystemMemory } from './chunk-6UQMXIAG.js';
10
+ import { readOrchestratorState, writeOrchestratorState, parseMode, setDefaultMode, recommendMode, activePin, resolveMode, providerForBackend, QUALIFIED_PACKS, pinPack, unpinPack, buildOrchestratorStatus } from './chunk-3V24O47U.js';
11
+ import { fmt, estimateModelBytes } from './chunk-7N4Y3E47.js';
12
12
  import './chunk-IZDH67DX.js';
13
- import './chunk-4CQ3MGNN.js';
13
+ import './chunk-6AYDFFP5.js';
14
14
  import { vgdIsRunning, vgdRequest, vgdSocketPath } from './chunk-PMYWZRRS.js';
15
15
  import { defaultProcessEndpoint, startProcessHostServer, resolveInferenceIsolation } from './chunk-PXHNTC6D.js';
16
16
  import { clearHostSessionPool, acquireHostSession, generateOnSession, listHostSessions, hostSessionPoolSize } from './chunk-K7REHDQS.js';
17
17
  import { buildIdentifierTrieFromGraph } from './chunk-JIBOJTGS.js';
18
18
  import './chunk-NDMDSPFX.js';
19
- import { runCodeSession } from './chunk-OXQNQW5J.js';
20
- import { ensurePackage, ensureUnavailableMessage, isPackageInstalled, summarizeDiffs, ScriptedProvider } from './chunk-7JHPQ6WF.js';
19
+ import { runCodeSession } from './chunk-CY4WKXB2.js';
20
+ import { ensurePackage, ensureUnavailableMessage, isPackageInstalled, summarizeDiffs, ScriptedProvider } from './chunk-OFUC6RYN.js';
21
21
  import { disableColor, info, c, json, out } from './chunk-CT5BS56U.js';
22
- import { serveStdio, exportGraph, GraphSource, createServer, formatForExt } from './chunk-65MEOA4E.js';
23
- import { resolveDsn, resolveIngestHost, dashHostForIngestHost, resolveCliInvocation, availableRegionIds, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, CliError, ExitCode, parseDsn as parseDsn$1, uploadScanArtifact, ingestHostForRegionId, dsnCommand, pushCommand, NPX_INVOCATION, refreshIfStale, driftCount, countTokens, shortestPath, testsToRun, detectRunner, ASSISTANTS, detectAssistants, usageError, detectServeLaunch, installAssistant, writeNavigationConfig, uninstallAssistant, coveringTests, FREE_PACK, readScanArtifact, buildGraph, writeSnapshot, probeFreshness, discover, assistantById, SMALL_REPO_FILES, resolveLimits, publishPrivateLibrary, assessDocQuality, symbolsFromApi, fetchHostedDocsCached, selectForBudget, hostedBase, readStoredCredentials, projectCredentialsPath, homeCredentialsPath, SKIP_DIRS, SKIP_FILES, SCHEMA_VERSION } from './chunk-S6CYDZEW.js';
24
- 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-WLETRGAC.js';
25
- import { inventory, enrichOnline, ECOSYSTEMS, catalogPath, libDir, loadCatalog, driftFor, addLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface } from './chunk-C4CKTAZP.js';
22
+ import { serveStdio, exportGraph, GraphSource, createServer, formatForExt } from './chunk-KCKYKDMS.js';
23
+ import { resolveDsn, resolveIngestHost, dashHostForIngestHost, resolveCliInvocation, availableRegionIds, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, CliError, ExitCode, parseDsn as parseDsn$1, uploadScanArtifact, ingestHostForRegionId, dsnCommand, pushCommand, NPX_INVOCATION, refreshIfStale, driftCount, countTokens, shortestPath, 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-KNELIQJO.js';
24
+ 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-WGUL45AV.js';
25
+ import { inventory, enrichOnline, ECOSYSTEMS, catalogPath, libDir, loadCatalog, driftFor, addLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface } from './chunk-LKVMI67M.js';
26
26
  import { resolveOne } from './chunk-J7LKEB2R.js';
27
27
  import { discoverModels, listCachedWeights, isWeightCached, lookupCatalog, ensureWeightCached, catalogIntegrityReport, weightStoreDir } from './chunk-OOIG3RUM.js';
28
- import { recordCliCall, CLI_TOOL_ALIASES, savingsLedgerPath, clearSavings, readSavings, readUsage, readModelSavings, CAPSULE_RANKING_VERSION, SAVINGS_TOOLS, sanitizeClient } from './chunk-EDAAG7BL.js';
29
- import { cacheDir, embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, queryGraphSemantic, queryGraph, unavailableMessage, countPending, indexFor, impactOf, modelCacheInfo, clearModelCache } from './chunk-6IOQJGFT.js';
28
+ import { recordCliCall, CLI_TOOL_ALIASES, savingsLedgerPath, clearSavings, readSavings, readUsage, readModelSavings, CAPSULE_RANKING_VERSION, SAVINGS_TOOLS, sanitizeClient } from './chunk-KSBHGWRV.js';
29
+ import { embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, queryGraphSemantic, queryGraph, unavailableMessage, countPending, indexFor, impactOf, modelCacheInfo, clearModelCache } from './chunk-6ABXHZRN.js';
30
30
  import { resolvedGrammarFiles, grammarSetVersion } from './chunk-3Q7QBWFW.js';
31
31
  import './chunk-RXP66R2E.js';
32
- import { resolveGraphPath, renderReport, loadGraph, writeArtifacts, vibgrateDir } from './chunk-HABUT7HW.js';
33
- import { stableStringify, serializeGraph } from './chunk-5Q54GEHM.js';
32
+ import { resolveGraphPath, renderReport, loadGraph, writeArtifacts, vibgrateDir, SCHEMA_VERSION } from './chunk-2XQDMLKB.js';
33
+ import { cacheDir, stableStringify } from './chunk-K3MZIVZW.js';
34
34
  import './chunk-BWPBB45M.js';
35
35
  import { canonicalize, hashString, hashBytes } from './chunk-JFGYT6BI.js';
36
36
  import './chunk-BPF3YX2U.js';
37
37
  import { pathExists as pathExists$1, parseExcludePatterns } from './chunk-GI6W53LM.js';
38
38
  import { ensureDir, pathExists, readJsonFile, writeTextFile, writeJsonFile } from './chunk-CRAMOEBE.js';
39
+ import './chunk-DGUM43GV.js';
39
40
  import * as fs8 from 'fs';
40
41
  import fs8__default, { realpathSync } from 'fs';
41
42
  import * as path36 from 'path';
@@ -48,7 +49,7 @@ import { randomUUID } from 'crypto';
48
49
  import { execSync, spawn, spawnSync, execFileSync } from 'child_process';
49
50
  import * as readline from 'readline';
50
51
  import chalk7 from 'chalk';
51
- import * as fs21 from 'fs/promises';
52
+ import * as fs20 from 'fs/promises';
52
53
  import semver2 from 'semver';
53
54
 
54
55
  function registerStatus(program) {
@@ -971,7 +972,7 @@ var STALE_MS = 6e4;
971
972
  function liveStatsDir(root2) {
972
973
  return path36.join(cacheDir(root2), "serve-live");
973
974
  }
974
- function reapOtherVersionServers(dir, keepVersion, now2 = Date.now(), kill = (pid, signal) => process.kill(pid, signal), selfPid = process.pid) {
975
+ function reapOtherVersionServers(dir, keepVersion, now = Date.now(), kill = (pid, signal) => process.kill(pid, signal), selfPid = process.pid) {
975
976
  let entries;
976
977
  try {
977
978
  entries = fs8.readdirSync(dir);
@@ -989,7 +990,7 @@ function reapOtherVersionServers(dir, keepVersion, now2 = Date.now(), kill = (pi
989
990
  }
990
991
  if (typeof parsed?.pid !== "number" || typeof parsed.updatedAt !== "number") continue;
991
992
  if (parsed.pid === selfPid) continue;
992
- if (now2 - parsed.updatedAt > STALE_MS) continue;
993
+ if (now - parsed.updatedAt > STALE_MS) continue;
993
994
  const version = typeof parsed.version === "string" ? parsed.version : "unknown";
994
995
  if (version === keepVersion) continue;
995
996
  try {
@@ -1030,12 +1031,12 @@ var LiveStatsBus = class {
1030
1031
  this.unlinkOwn();
1031
1032
  }
1032
1033
  /** Write the current snapshot when it changed (or as a keepalive). Never throws. */
1033
- publish(now2 = Date.now()) {
1034
+ publish(now = Date.now()) {
1034
1035
  const snap = this.stats.snapshot();
1035
- if (snap.revision === this.lastRevision && now2 - this.lastWriteAt < KEEPALIVE_MS) return;
1036
+ if (snap.revision === this.lastRevision && now - this.lastWriteAt < KEEPALIVE_MS) return;
1036
1037
  this.lastRevision = snap.revision;
1037
- this.lastWriteAt = now2;
1038
- const body = { pid: this.pid, updatedAt: now2, version: VERSION, snapshot: snap };
1038
+ this.lastWriteAt = now;
1039
+ const body = { pid: this.pid, updatedAt: now, version: VERSION, snapshot: snap };
1039
1040
  try {
1040
1041
  fs8.mkdirSync(this.dir, { recursive: true });
1041
1042
  const tmp = `${this.file}.tmp`;
@@ -1048,7 +1049,7 @@ var LiveStatsBus = class {
1048
1049
  * Fresh snapshots of the OTHER serve processes in this repo. Stale files
1049
1050
  * (crashed processes) are swept best-effort while reading.
1050
1051
  */
1051
- siblings(now2 = Date.now()) {
1052
+ siblings(now = Date.now()) {
1052
1053
  let entries;
1053
1054
  try {
1054
1055
  entries = fs8.readdirSync(this.dir);
@@ -1066,7 +1067,7 @@ var LiveStatsBus = class {
1066
1067
  continue;
1067
1068
  }
1068
1069
  if (typeof parsed?.pid !== "number" || typeof parsed.updatedAt !== "number" || !parsed.snapshot?.totals) continue;
1069
- if (now2 - parsed.updatedAt > STALE_MS) {
1070
+ if (now - parsed.updatedAt > STALE_MS) {
1070
1071
  try {
1071
1072
  fs8.unlinkSync(file);
1072
1073
  } catch {
@@ -1140,12 +1141,12 @@ var SessionStats = class {
1140
1141
  byClient = /* @__PURE__ */ new Map();
1141
1142
  byTool = /* @__PURE__ */ new Map();
1142
1143
  bySource = /* @__PURE__ */ new Map();
1143
- constructor(now2 = Date.now()) {
1144
- this.startedAt = now2;
1144
+ constructor(now = Date.now()) {
1145
+ this.startedAt = now;
1145
1146
  }
1146
- record(sample, now2 = Date.now()) {
1147
+ record(sample, now = Date.now()) {
1147
1148
  this.revision++;
1148
- this.lastCallAt = now2;
1149
+ this.lastCallAt = now;
1149
1150
  const rows = [
1150
1151
  this.totals,
1151
1152
  this.rowFor(this.byClient, sample.client),
@@ -1208,9 +1209,9 @@ var teal = (s) => c.hex("#3FB0A4")(s);
1208
1209
  var mint = (s) => c.hex("#4FE3C1")(s);
1209
1210
  var SPINNER = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
1210
1211
  var MAX_TOOL_ROWS = 8;
1211
- function serveStatusLines(snap, now2, tick = 0, siblingServers = 0) {
1212
+ function serveStatusLines(snap, now, tick = 0, siblingServers = 0) {
1212
1213
  const spinner = mint(SPINNER[tick % SPINNER.length]);
1213
- const up = fmtUptime(now2 - snap.startedAt);
1214
+ const up = fmtUptime(now - snap.startedAt);
1214
1215
  const lines = [];
1215
1216
  const siblingNote = siblingServers > 0 ? ` ${c.dim(`incl. ${siblingServers} assistant-spawned server${siblingServers === 1 ? "" : "s"} in this repo`)}` : null;
1216
1217
  if (snap.totals.calls === 0) {
@@ -1224,7 +1225,7 @@ function serveStatusLines(snap, now2, tick = 0, siblingServers = 0) {
1224
1225
  const answered = Math.round((t.complete + t.partial) / t.calls * 100);
1225
1226
  const cli = snap.sources.find((s) => s.key === "cli");
1226
1227
  const via = cli ? c.dim(" \xB7 via ") + snap.sources.map((s) => `${c.white(s.key)} ${teal(String(s.calls))}`).join(c.dim(" \xB7 ")) : "";
1227
- const ago = snap.lastCallAt === null ? "" : c.dim(` \xB7 last call ${fmtUptime(now2 - snap.lastCallAt)} ago`);
1228
+ const ago = snap.lastCallAt === null ? "" : c.dim(` \xB7 last call ${fmtUptime(now - snap.lastCallAt)} ago`);
1228
1229
  lines.push(
1229
1230
  ` ${spinner} ${c.bold.white("vg serve")} ${c.dim("\xB7")} up ${teal(up)} ${c.dim("\xB7")} ${c.bold.white(String(t.calls))} call${t.calls === 1 ? "" : "s"} ${c.dim("\xB7")} ${mint(`${answered}%`)} answered${via}${ago}`
1230
1231
  );
@@ -1257,8 +1258,8 @@ function serveStatusLines(snap, now2, tick = 0, siblingServers = 0) {
1257
1258
  if (siblingNote) lines.push(siblingNote);
1258
1259
  return lines;
1259
1260
  }
1260
- function serveHeartbeatLine(snap, now2) {
1261
- const up = fmtUptime(now2 - snap.startedAt);
1261
+ function serveHeartbeatLine(snap, now) {
1262
+ const up = fmtUptime(now - snap.startedAt);
1262
1263
  const t = snap.totals;
1263
1264
  if (t.calls === 0) return c.dim(`vg \xB7 serving for ${up} \u2014 no tool calls yet`);
1264
1265
  const clients = snap.clients.map((cl) => `${cl.key} ${cl.calls}`).join(", ");
@@ -1382,7 +1383,7 @@ var LedgerTail = class {
1382
1383
  }
1383
1384
  }
1384
1385
  /** One poll cycle — exposed for tests (deterministic, no timers needed). */
1385
- poll(now2 = Date.now()) {
1386
+ poll(now = Date.now()) {
1386
1387
  let size;
1387
1388
  try {
1388
1389
  size = this.sizeOf();
@@ -1407,7 +1408,7 @@ var LedgerTail = class {
1407
1408
  if (lastNewline < 0) return;
1408
1409
  const text = chunk.subarray(0, lastNewline).toString("utf8");
1409
1410
  this.offset += lastNewline + 1;
1410
- for (const line of text.split("\n")) ingestLedgerLine(this.stats, line, now2);
1411
+ for (const line of text.split("\n")) ingestLedgerLine(this.stats, line, now);
1411
1412
  }
1412
1413
  sizeOf() {
1413
1414
  try {
@@ -1417,7 +1418,7 @@ var LedgerTail = class {
1417
1418
  }
1418
1419
  }
1419
1420
  };
1420
- function ingestLedgerLine(stats, line, now2) {
1421
+ function ingestLedgerLine(stats, line, now) {
1421
1422
  if (!line.trim()) return;
1422
1423
  let e;
1423
1424
  try {
@@ -1436,7 +1437,7 @@ function ingestLedgerLine(stats, line, now2) {
1436
1437
  vgTokens: e.vgTokens ?? 0,
1437
1438
  baselineTokens: e.baselineTokens ?? 0
1438
1439
  },
1439
- now2
1440
+ now
1440
1441
  );
1441
1442
  }
1442
1443
 
@@ -2714,9 +2715,9 @@ function registerInstall(program) {
2714
2715
  info(`${c.cyan("vg install")} \xB7 no AI assistants detected here`);
2715
2716
  } else {
2716
2717
  info(`${c.cyan("vg install")} \xB7 detected assistants`);
2717
- const pad5 = Math.max(...detected.map((d) => d.assistant.id.length)) + 2;
2718
+ const pad4 = Math.max(...detected.map((d) => d.assistant.id.length)) + 2;
2718
2719
  for (const d of detected) {
2719
- info(` ${c.bold(d.assistant.id.padEnd(pad5))} ${d.assistant.label} ${c.dim(`via ${d.via}: ${d.marker}`)}`);
2720
+ info(` ${c.bold(d.assistant.id.padEnd(pad4))} ${d.assistant.label} ${c.dim(`via ${d.via}: ${d.marker}`)}`);
2720
2721
  }
2721
2722
  }
2722
2723
  return;
@@ -2725,9 +2726,9 @@ function registerInstall(program) {
2725
2726
  json(ASSISTANTS.map((a) => ({ id: a.id, label: a.label, mcp: !!a.mcp, skill: !!a.skill, nudge: !!a.nudge })));
2726
2727
  } else {
2727
2728
  info(`${c.cyan("vg install")} \xB7 supported assistants`);
2728
- const pad5 = Math.max(...ASSISTANTS.map((a) => a.id.length)) + 2;
2729
+ const pad4 = Math.max(...ASSISTANTS.map((a) => a.id.length)) + 2;
2729
2730
  for (const a of ASSISTANTS) {
2730
- info(` ${c.bold(a.id.padEnd(pad5))} ${a.label} ${c.dim(`mcp:${a.mcp ? "\u2713" : "\u2014"} skill:${a.skill ? "\u2713" : "\u2014"} nudge:${a.nudge ? "\u2713" : "\u2014"}`)}`);
2731
+ info(` ${c.bold(a.id.padEnd(pad4))} ${a.label} ${c.dim(`mcp:${a.mcp ? "\u2713" : "\u2014"} skill:${a.skill ? "\u2713" : "\u2014"} nudge:${a.nudge ? "\u2713" : "\u2014"}`)}`);
2731
2732
  }
2732
2733
  }
2733
2734
  return;
@@ -2895,148 +2896,6 @@ function git(root2, args) {
2895
2896
  function escapeRe(s) {
2896
2897
  return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2897
2898
  }
2898
- var PIN = "2020-01-01T00:00:00.000Z";
2899
- function registerBenchmark(program) {
2900
- const cmd = program.command("benchmark").description("reproducible build + memory + token-reduction benchmark (honest estimates)").option("--budget <n>", "token budget for vg answers", "2000").action(async function(opts) {
2901
- const global = readGlobal(this);
2902
- const root2 = rootOf(global);
2903
- const budget = Number(opts.budget) || 2e3;
2904
- const result = await runBenchmarkSuite(root2, budget);
2905
- if (global.json) {
2906
- json(result);
2907
- return;
2908
- }
2909
- const { repo, build, throughput, memory, determinism, tokenReduction } = result;
2910
- info(`${c.cyan("vg benchmark")} \xB7 ${repo.files} files \xB7 ${repo.nodes} nodes`);
2911
- info(` build cold ${build.coldMs.toFixed(0)}ms \xB7 incremental ${build.incrementalMs.toFixed(0)}ms (reused ${build.reusedOnWarm})`);
2912
- info(` speed ${throughput.filesPerSec.toFixed(0)} files/s \xB7 ${throughput.mbPerSec.toFixed(1)} MB/s (cold, ${mb2(throughput.corpusBytes).toFixed(1)} MB corpus)`);
2913
- info(
2914
- ` memory peak rss ${memory.peakRssMb.toFixed(0)} MB (baseline ${memory.baselineRssMb.toFixed(0)} MB) \xB7 peak heap ${memory.peakHeapMb.toFixed(0)} MB \xB7 graph retains ~${memory.retainedHeapMb.toFixed(0)} MB ${c.dim("(approximate)")}`
2915
- );
2916
- info(` graph ${mb2(memory.graphJsonBytes).toFixed(1)} MB serialized \xB7 ${memory.bytesPerNode.toFixed(0)} B/node`);
2917
- info(` determinism ${determinism.byteIdentical ? c.green("byte-identical \u2713") : c.red("NON-DETERMINISTIC \u2717")}`);
2918
- if (tokenReduction.questions.length) {
2919
- info(` token reduction vs grep/read baseline (${c.dim("estimates")}):`);
2920
- for (const q of tokenReduction.questions) {
2921
- info(` ${pad3(`${q.ratio.toFixed(1)}\xD7`, 6)} ${c.dim(`vg ${q.vgTokens} vs ~${q.baselineTokens}`)} "${q.question}"`);
2922
- }
2923
- info(` ${c.bold(`aggregate \u2248 ${tokenReduction.aggregateRatio.toFixed(1)}\xD7 fewer tokens`)} ${c.dim("(honest estimate, scales with repo size)")}`);
2924
- }
2925
- });
2926
- applyGlobalOptions(cmd);
2927
- }
2928
- async function runBenchmarkSuite(root2, budget) {
2929
- const baseline = process.memoryUsage();
2930
- const sampler = startMemorySampler();
2931
- const t0 = now();
2932
- const cold = await buildGraph({ root: root2, generatedAt: PIN, noCache: true });
2933
- const coldMs = now() - t0;
2934
- const t1 = now();
2935
- const warm = await buildGraph({ root: root2, generatedAt: PIN });
2936
- const warmMs = now() - t1;
2937
- const a = serializeGraph(cold.graph);
2938
- const b = serializeGraph((await buildGraph({ root: root2, generatedAt: PIN, noCache: true })).graph);
2939
- const peak = sampler.stop();
2940
- const deterministic = a === b;
2941
- const after = process.memoryUsage();
2942
- const corpusBytes = cold.fileStats.reduce((s, f) => s + f.size, 0);
2943
- const graphJsonBytes = Buffer.byteLength(a, "utf8");
2944
- const nodes = cold.graph.meta.counts.nodes;
2945
- const questions = deriveQuestions(cold.graph);
2946
- const fileSizes = fileSizeIndex(root2);
2947
- const perQuestion = questions.map((q) => {
2948
- const vgTokens = queryGraph(cold.graph, q, { budget }).tokensEstimate;
2949
- const baseTokens = grepBaselineTokens(q, fileSizes);
2950
- return { question: q, vgTokens, baselineTokens: baseTokens, ratio: baseTokens > 0 ? round(baseTokens / Math.max(vgTokens, 1)) : 1 };
2951
- });
2952
- const totalVg = perQuestion.reduce((s, x) => s + x.vgTokens, 0);
2953
- const totalBase = perQuestion.reduce((s, x) => s + x.baselineTokens, 0);
2954
- const aggregateRatio = totalVg > 0 ? round(totalBase / totalVg) : 0;
2955
- return {
2956
- repo: { files: cold.totalFiles, nodes, edges: cold.graph.meta.counts.edges },
2957
- build: { coldMs: round(coldMs), incrementalMs: round(warmMs), reusedOnWarm: warm.reused },
2958
- throughput: {
2959
- corpusBytes,
2960
- filesPerSec: coldMs > 0 ? round(cold.totalFiles / coldMs * 1e3) : 0,
2961
- // 6-decimal precision: a small corpus at 3 decimals would round to 0.
2962
- mbPerSec: coldMs > 0 ? round6(mb2(corpusBytes) / coldMs * 1e3) : 0
2963
- },
2964
- memory: {
2965
- baselineRssMb: round(mb2(baseline.rss)),
2966
- peakRssMb: round(mb2(Math.max(peak.rss, baseline.rss))),
2967
- peakHeapMb: round(mb2(Math.max(peak.heapUsed, baseline.heapUsed))),
2968
- // Heap growth across the run ≈ what the loaded graphs + caches retain.
2969
- retainedHeapMb: round(Math.max(0, mb2(after.heapUsed - baseline.heapUsed))),
2970
- graphJsonBytes,
2971
- bytesPerNode: nodes > 0 ? round(graphJsonBytes / nodes) : 0,
2972
- note: "sampled at 25ms + phase boundaries; GC timing makes these approximate"
2973
- },
2974
- limits: resolveLimits(),
2975
- determinism: { byteIdentical: deterministic },
2976
- tokenReduction: { questions: perQuestion, aggregateRatio, note: "estimates (~4 chars/token); scales with repo size" }
2977
- };
2978
- }
2979
- function startMemorySampler() {
2980
- let rss = 0;
2981
- let heapUsed = 0;
2982
- const sample = () => {
2983
- const m = process.memoryUsage();
2984
- if (m.rss > rss) rss = m.rss;
2985
- if (m.heapUsed > heapUsed) heapUsed = m.heapUsed;
2986
- };
2987
- const timer = setInterval(sample, 25);
2988
- timer.unref?.();
2989
- return {
2990
- stop: () => {
2991
- clearInterval(timer);
2992
- sample();
2993
- return { rss, heapUsed };
2994
- }
2995
- };
2996
- }
2997
- function deriveQuestions(graph) {
2998
- return graph.nodes.filter((n) => n.kind !== "file" && n.kind !== "external").sort((a, b) => b.importance - a.importance || a.qualifiedName.localeCompare(b.qualifiedName)).slice(0, 5).map((n) => n.name);
2999
- }
3000
- function fileSizeIndex(root2) {
3001
- return discover({ root: root2 }).map((f) => ({ rel: f.rel, abs: f.abs, size: safeSize(f.abs) }));
3002
- }
3003
- function grepBaselineTokens(term, files) {
3004
- const lower = term.toLowerCase();
3005
- let bytes = 0;
3006
- for (const f of files) {
3007
- if (f.size > 512 * 1024) continue;
3008
- let content = "";
3009
- try {
3010
- content = fs8.readFileSync(f.abs, "utf8");
3011
- } catch {
3012
- continue;
3013
- }
3014
- if (content.toLowerCase().includes(lower)) bytes += content.length;
3015
- }
3016
- return Math.ceil(bytes / 4);
3017
- }
3018
- function safeSize(abs) {
3019
- try {
3020
- return fs8.statSync(abs).size;
3021
- } catch {
3022
- return 0;
3023
- }
3024
- }
3025
- function mb2(bytes) {
3026
- return bytes / (1024 * 1024);
3027
- }
3028
- function now() {
3029
- return Number(process.hrtime.bigint() / 1000n) / 1e3;
3030
- }
3031
- function round(x) {
3032
- return Math.round(x * 1e3) / 1e3;
3033
- }
3034
- function round6(x) {
3035
- return Math.round(x * 1e6) / 1e6;
3036
- }
3037
- function pad3(s, n) {
3038
- return s.padStart(n, " ");
3039
- }
3040
2899
  function registerTests(program) {
3041
2900
  const cmd = program.command("tests").description("which tests cover a node (call/coverage linkage)").argument("<name>", "node to inspect").option("--missing", "show untested nodes nearby instead").option("--run", "print the command to run exactly these tests").option("--exec", "run that command").option("--pick <n>", "pick the nth candidate when ambiguous").action(function(name, opts) {
3042
2901
  const global = readGlobal(this);
@@ -5786,9 +5645,9 @@ function registerCode(program) {
5786
5645
  const modeFlag = opts.mode ?? config.modelProfile?.mode;
5787
5646
  if (!opts.model && !opts.modelPath && (modeFlag || !provider && !model)) {
5788
5647
  try {
5789
- const { parseMode: parseMode2, resolveMode: resolveMode2, readOrchestratorState: readOrchestratorState2, activePin: activePin2, providerForBackend: providerForBackend2 } = await import('./model-orchestrator-FFTZI3U2.js');
5790
- const { gatherSystemMemory: gatherSystemMemory2 } = await import('./local-runtime-OJFLX2HI.js');
5791
- const { loadGraph: loadGraph2 } = await import('./load-OHVKDX4R.js');
5648
+ const { parseMode: parseMode2, resolveMode: resolveMode2, readOrchestratorState: readOrchestratorState2, activePin: activePin2, providerForBackend: providerForBackend2 } = await import('./model-orchestrator-TVONAUPS.js');
5649
+ const { gatherSystemMemory: gatherSystemMemory2 } = await import('./local-runtime-5O2NN3GA.js');
5650
+ const { loadGraph: loadGraph2 } = await import('./load-I333TGNI.js');
5792
5651
  const state = readOrchestratorState2();
5793
5652
  const mode = parseMode2(modeFlag) ?? state.defaultMode ?? void 0;
5794
5653
  const pin = mode ? activePin2(mode, state) : null;
@@ -5817,7 +5676,7 @@ function registerCode(program) {
5817
5676
  ExitCode.ERROR
5818
5677
  );
5819
5678
  }
5820
- const { resolveGgufPath } = await import('./resolve-gguf-4UPIGPEE.js');
5679
+ const { resolveGgufPath } = await import('./resolve-gguf-VPL4YQ6J.js');
5821
5680
  const gguf = resolveGgufPath({
5822
5681
  modelRef: resolved.underlying.weightsRef,
5823
5682
  modelPath: opts.modelPath
@@ -5872,7 +5731,7 @@ function registerCode(program) {
5872
5731
  if (!(process.stdin.isTTY && process.stdout.isTTY)) {
5873
5732
  throw usageError('say what to change, e.g. `vg code "add a --timeout flag to the scan command"` (guided mode needs an interactive terminal)');
5874
5733
  }
5875
- const { runInteractive } = await import('./interactive-ICL7D7LO.js');
5734
+ const { runInteractive } = await import('./interactive-372NLI5C.js');
5876
5735
  await runInteractive(
5877
5736
  rootOf(global),
5878
5737
  global,
@@ -5926,18 +5785,18 @@ function registerCode(program) {
5926
5785
  }
5927
5786
  if (opts.streamJson && !opts.mock) {
5928
5787
  const primarySlug = route.providers[0]?.model.includes("/") ? route.providers[0].model.split("/")[0] : route.providers[0]?.id;
5929
- const { runCodeStreamJson } = await import('./stream-json-F74W5FCK.js');
5930
- const { nodeCodeFs } = await import('./session-L2OSDRPI.js');
5788
+ const { runCodeStreamJson } = await import('./stream-json-SLMDKLXP.js');
5789
+ const { nodeCodeFs } = await import('./session-ITPYQ5XI.js');
5931
5790
  const readline5 = await import('readline');
5932
5791
  const child = await import('child_process');
5933
- const { loadOrDiscoverFederation } = await import('./federation-EPZDUWCK.js');
5934
- const { resolveExecutionEnv } = await import('./execution-env-3BN7Z737.js');
5935
- const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-MQ2QCP24.js');
5936
- const { startCodeRuntimeSession } = await import('./runtime-session-IDU5BDUJ.js');
5937
- const { resolveGraphBackend } = await import('./graph-backend-ZMSYOZMW.js');
5938
- const { detectGitRef } = await import('./git-ref-HPRLUFFW.js');
5939
- const { repositoryIdFromRoot } = await import('./paths-MCH75O3G.js');
5940
- const { vgdRequest: vgdRequest2 } = await import('./vgd-EGBQD7BW.js');
5792
+ const { loadOrDiscoverFederation } = await import('./federation-SZWZIFZ7.js');
5793
+ const { resolveExecutionEnv } = await import('./execution-env-ZU45JZ4G.js');
5794
+ const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-TFBKCNJG.js');
5795
+ const { startCodeRuntimeSession } = await import('./runtime-session-JRKCQUHY.js');
5796
+ const { resolveGraphBackend } = await import('./graph-backend-73URGTFY.js');
5797
+ const { detectGitRef } = await import('./git-ref-XDXB6JP5.js');
5798
+ const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
5799
+ const { vgdRequest: vgdRequest2 } = await import('./vgd-7JV5KCNJ.js');
5941
5800
  const federation = loadOrDiscoverFederation(root2);
5942
5801
  const modelProfile = mergeModelExecutionProfile(
5943
5802
  resolveModelExecutionProfile({
@@ -6026,12 +5885,12 @@ ${res.stderr}` : ""), exitCode: res.status ?? 1 };
6026
5885
  if (!autonomous && !tty) {
6027
5886
  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).");
6028
5887
  }
6029
- const { agentTask } = await import('./interactive-ICL7D7LO.js');
6030
- const { nodeCodeFs } = await import('./session-L2OSDRPI.js');
6031
- const { TtyPrompter } = await import('./ui-HOVOPWMX.js');
5888
+ const { agentTask } = await import('./interactive-372NLI5C.js');
5889
+ const { nodeCodeFs } = await import('./session-ITPYQ5XI.js');
5890
+ const { TtyPrompter } = await import('./ui-Q6DJ3GCU.js');
6032
5891
  let priorSummary;
6033
5892
  if (opts.continue) {
6034
- const { loadLatestSession, summarizeSession } = await import('./session-store-W5RZZHA3.js');
5893
+ const { loadLatestSession, summarizeSession } = await import('./session-store-WFBX7HXL.js');
6035
5894
  const prev = loadLatestSession(root2);
6036
5895
  if (prev) priorSummary = summarizeSession(prev);
6037
5896
  }
@@ -6039,21 +5898,21 @@ ${res.stderr}` : ""), exitCode: res.status ?? 1 };
6039
5898
  let mcpTools;
6040
5899
  let disposeMcp;
6041
5900
  if (Object.keys(mcp.servers).length) {
6042
- const { McpToolset, defaultMcpConnect } = await import('./mcp-tools-I6PME3AV.js');
5901
+ const { McpToolset, defaultMcpConnect } = await import('./mcp-tools-I7JK3S2M.js');
6043
5902
  const { toolset } = await McpToolset.connect(mcp.servers, defaultMcpConnect);
6044
5903
  disposeMcp = () => toolset.dispose();
6045
5904
  const approve = async (a) => autonomous || !!(prompter && a.kind === "tool" && await prompter.confirm("Call an external tool?", false));
6046
5905
  mcpTools = { specs: toolset.specs(), owns: (n) => toolset.owns(n), execute: (call) => toolset.execute(call, approve) };
6047
5906
  }
6048
5907
  try {
6049
- const { loadFederation } = await import('./federation-EPZDUWCK.js');
6050
- const { resolveExecutionEnv } = await import('./execution-env-3BN7Z737.js');
6051
- const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-MQ2QCP24.js');
6052
- const { startCodeRuntimeSession } = await import('./runtime-session-IDU5BDUJ.js');
6053
- const { resolveGraphBackend } = await import('./graph-backend-ZMSYOZMW.js');
6054
- const { detectGitRef } = await import('./git-ref-HPRLUFFW.js');
6055
- const { repositoryIdFromRoot } = await import('./paths-MCH75O3G.js');
6056
- const { vgdRequest: vgdRequest2 } = await import('./vgd-EGBQD7BW.js');
5908
+ const { loadFederation } = await import('./federation-SZWZIFZ7.js');
5909
+ const { resolveExecutionEnv } = await import('./execution-env-ZU45JZ4G.js');
5910
+ const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-TFBKCNJG.js');
5911
+ const { startCodeRuntimeSession } = await import('./runtime-session-JRKCQUHY.js');
5912
+ const { resolveGraphBackend } = await import('./graph-backend-73URGTFY.js');
5913
+ const { detectGitRef } = await import('./git-ref-XDXB6JP5.js');
5914
+ const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
5915
+ const { vgdRequest: vgdRequest2 } = await import('./vgd-7JV5KCNJ.js');
6057
5916
  const federation = loadFederation(root2);
6058
5917
  const modelProfile = mergeModelExecutionProfile(
6059
5918
  resolveModelExecutionProfile({
@@ -6223,10 +6082,10 @@ function registerSavings(program) {
6223
6082
  );
6224
6083
  return;
6225
6084
  }
6226
- const now2 = Date.now();
6227
- const report = readSavings(root2, days, now2);
6228
- const usage = readUsage(root2, days, now2);
6229
- const models = readModelSavings(root2, days, now2);
6085
+ const now = Date.now();
6086
+ const report = readSavings(root2, days, now);
6087
+ const usage = readUsage(root2, days, now);
6088
+ const models = readModelSavings(root2, days, now);
6230
6089
  if (global.json) {
6231
6090
  json({ ...report, usage, models });
6232
6091
  return;
@@ -6857,7 +6716,7 @@ function registerDaemon(program) {
6857
6716
  if (!await vgdIsRunning({ socketPath })) {
6858
6717
  throw new CliError(`vgd is not running \u2014 start it with \`vg daemon start\` (${socketPath})`, ExitCode.NOT_FOUND);
6859
6718
  }
6860
- const { loadFederation } = await import('./federation-EPZDUWCK.js');
6719
+ const { loadFederation } = await import('./federation-SZWZIFZ7.js');
6861
6720
  const fed = loadFederation(primary);
6862
6721
  if (!fed) throw new CliError(`could not load federation for ${primary}`, ExitCode.ERROR);
6863
6722
  const res = await vgdRequest(
@@ -6885,9 +6744,9 @@ function registerDaemon(program) {
6885
6744
  if (!await vgdIsRunning({ socketPath })) {
6886
6745
  throw new CliError(`vgd is not running \u2014 start it with \`vg daemon ensure\` (${socketPath})`, ExitCode.NOT_FOUND);
6887
6746
  }
6888
- const { loadGraph: loadGraph2 } = await import('./load-OHVKDX4R.js');
6889
- const { detectGitRef } = await import('./git-ref-HPRLUFFW.js');
6890
- const { repositoryIdFromRoot } = await import('./paths-MCH75O3G.js');
6747
+ const { loadGraph: loadGraph2 } = await import('./load-I333TGNI.js');
6748
+ const { detectGitRef } = await import('./git-ref-XDXB6JP5.js');
6749
+ const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
6891
6750
  const opts = this.opts();
6892
6751
  const graph = loadGraph2(root2, global.graph);
6893
6752
  if (!graph) {
@@ -7025,7 +6884,7 @@ function sleep(ms) {
7025
6884
  return new Promise((r) => setTimeout(r, ms));
7026
6885
  }
7027
6886
  async function repositoryIdForCwd(socketPath, root2) {
7028
- const { repositoryIdFromRoot } = await import('./paths-MCH75O3G.js');
6887
+ const { repositoryIdFromRoot } = await import('./paths-2RAH3GME.js');
7029
6888
  const reg = await vgdRequest({ op: "register", root: root2 }, { socketPath });
7030
6889
  if (reg.ok && "workspace" in reg) return reg.workspace.id;
7031
6890
  return repositoryIdFromRoot(root2);
@@ -7230,7 +7089,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
7230
7089
  console.log(chalk7.green("\u2714") + ` Created ${chalk7.bold("vibgrate.config.ts")}`);
7231
7090
  }
7232
7091
  if (opts.baseline) {
7233
- const { runBaseline } = await import('./baseline-K7YBFKZI.js');
7092
+ const { runBaseline } = await import('./baseline-TG4ATZGZ.js');
7234
7093
  await runBaseline(rootDir);
7235
7094
  }
7236
7095
  console.log("");
@@ -7340,9 +7199,9 @@ async function fileReferencesIdentifier(rootDir, relFile, identifier, readFile3)
7340
7199
  }
7341
7200
  async function defaultReadFile(absPath) {
7342
7201
  try {
7343
- const stat2 = await fs21.stat(absPath);
7202
+ const stat2 = await fs20.stat(absPath);
7344
7203
  if (!stat2.isFile() || stat2.size > MAX_FILE_BYTES) return null;
7345
- return await fs21.readFile(absPath, "utf8");
7204
+ return await fs20.readFile(absPath, "utf8");
7346
7205
  } catch {
7347
7206
  return null;
7348
7207
  }
@@ -8386,16 +8245,16 @@ function estimateDriftScore(artifact, upgraded) {
8386
8245
  const buckets = p.dependencyAgeBuckets;
8387
8246
  for (const dep of p.dependencies ?? []) {
8388
8247
  if (!upgraded.has(dep.package)) continue;
8389
- const mb3 = dep.majorsBehind ?? 0;
8248
+ const mb2 = dep.majorsBehind ?? 0;
8390
8249
  dep.majorsBehind = 0;
8391
8250
  dep.drift = "current";
8392
8251
  if (dep.libyears != null) dep.libyears = 0;
8393
8252
  if (dep.ageDays != null) dep.ageDays = 0;
8394
8253
  if (dep.latestStable) dep.resolvedVersion = dep.latestStable;
8395
- if (mb3 >= 2 && buckets.twoPlusBehind > 0) {
8254
+ if (mb2 >= 2 && buckets.twoPlusBehind > 0) {
8396
8255
  buckets.twoPlusBehind--;
8397
8256
  buckets.current++;
8398
- } else if (mb3 === 1 && buckets.oneBehind > 0) {
8257
+ } else if (mb2 === 1 && buckets.oneBehind > 0) {
8399
8258
  buckets.oneBehind--;
8400
8259
  buckets.current++;
8401
8260
  }
@@ -8535,8 +8394,8 @@ async function fetchLatestVersion() {
8535
8394
  }
8536
8395
  async function writeCache(data) {
8537
8396
  try {
8538
- await fs21.mkdir(CACHE_DIR, { recursive: true });
8539
- await fs21.writeFile(CACHE_FILE, JSON.stringify(data), "utf-8");
8397
+ await fs20.mkdir(CACHE_DIR, { recursive: true });
8398
+ await fs20.writeFile(CACHE_FILE, JSON.stringify(data), "utf-8");
8540
8399
  } catch {
8541
8400
  }
8542
8401
  }
@@ -11356,7 +11215,7 @@ async function hasRecentDrill(root2, asOf) {
11356
11215
  const dir = path36.join(evidenceDir(root2), "drills");
11357
11216
  if (!await pathExists(dir)) return void 0;
11358
11217
  const { readdir } = await import('fs/promises');
11359
- const { readJsonFile: readJsonFile2 } = await import('./fs-KCABDURV.js');
11218
+ const { readJsonFile: readJsonFile2 } = await import('./fs-O5IQYXHO.js');
11360
11219
  const files = (await readdir(dir)).filter((f) => f.endsWith(".json"));
11361
11220
  if (files.length === 0) return void 0;
11362
11221
  const cutoff = new Date(new Date(asOf).getTime() - 90 * 24 * 3600 * 1e3).toISOString();
@@ -11366,7 +11225,7 @@ async function hasRecentDrill(root2, asOf) {
11366
11225
  }
11367
11226
  return false;
11368
11227
  }
11369
- function pad4(s, n) {
11228
+ function pad3(s, n) {
11370
11229
  return s.length >= n ? s : s + " ".repeat(n - s.length);
11371
11230
  }
11372
11231
  function formatExposure(result, regime) {
@@ -11383,13 +11242,13 @@ function formatExposure(result, regime) {
11383
11242
  }
11384
11243
  lines.push("");
11385
11244
  if (affected.length) {
11386
- lines.push(" " + chalk7.dim(pad4("Product", 22) + pad4("Shipped versions", 24) + pad4("Markets", 16) + "Support"));
11245
+ lines.push(" " + chalk7.dim(pad3("Product", 22) + pad3("Shipped versions", 24) + pad3("Markets", 16) + "Support"));
11387
11246
  lines.push(" " + chalk7.dim("\u2500".repeat(74)));
11388
11247
  for (const p of affected) {
11389
11248
  const versions = p.affectedVersions.join(", ") || "\u2014";
11390
11249
  const markets = p.memberStates.join(" ") || "\u2014";
11391
11250
  const support = p.supportStatus === "in_support" ? chalk7.green("in support") : p.supportStatus === "expired" ? chalk7.yellow(p.supportDetail ?? "expired") : chalk7.dim("not declared");
11392
- lines.push(" " + pad4(p.productName, 22) + pad4(versions, 24) + pad4(markets, 16) + support);
11251
+ lines.push(" " + pad3(p.productName, 22) + pad3(versions, 24) + pad3(markets, 16) + support);
11393
11252
  }
11394
11253
  lines.push("");
11395
11254
  }
@@ -11420,7 +11279,7 @@ function formatReadiness(report, regime) {
11420
11279
  lines.push(" " + chalk7.bold(`Readiness \u2014 ${regime.name}`) + ` ${chalk7.bold(String(report.score))}% (${report.ready}/${report.assessable} ready)`);
11421
11280
  lines.push("");
11422
11281
  for (const item of report.items) {
11423
- lines.push(" " + mark(item) + " " + pad4(item.label, 52) + " " + chalk7.dim(item.detail));
11282
+ lines.push(" " + mark(item) + " " + pad3(item.label, 52) + " " + chalk7.dim(item.detail));
11424
11283
  if (item.status === "gap" && item.fix) lines.push(" " + chalk7.dim("fix: ") + chalk7.cyan(item.fix));
11425
11284
  }
11426
11285
  lines.push("");
@@ -11431,7 +11290,7 @@ function formatRegimeList() {
11431
11290
  const lines = [" " + chalk7.bold("Available regimes")];
11432
11291
  lines.push("");
11433
11292
  for (const r of listRegimes()) {
11434
- lines.push(" " + chalk7.cyan(pad4(r.id, 16)) + r.name + chalk7.dim(` (${r.jurisdiction})`));
11293
+ lines.push(" " + chalk7.cyan(pad3(r.id, 16)) + r.name + chalk7.dim(` (${r.jurisdiction})`));
11435
11294
  const clocks = r.clocks.map((c2) => `${c2.stage} ${c2.within}`).join(" \xB7 ");
11436
11295
  lines.push(" " + chalk7.dim(clocks));
11437
11296
  lines.push(" " + chalk7.dim(`submission: ${r.submission.target}${r.submission.api ? "" : " \u2014 manual (no API)"}`));
@@ -11849,7 +11708,6 @@ var KNOWN_COMMANDS = /* @__PURE__ */ new Set([
11849
11708
  "install",
11850
11709
  "uninstall",
11851
11710
  "share",
11852
- "benchmark",
11853
11711
  "help",
11854
11712
  // Drift-reporting verbs (merged from the Vibgrate CLI).
11855
11713
  "init",
@@ -11890,7 +11748,6 @@ ${aliasNote}Docs: https://vibgrate.com/help`;
11890
11748
  registerLsp(program);
11891
11749
  registerInstall(program);
11892
11750
  registerShare(program);
11893
- registerBenchmark(program);
11894
11751
  registerTests(program);
11895
11752
  registerFacts(program);
11896
11753
  registerGuide(program);