@vibgrate/cli 2026.806.1 → 2026.806.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.
- package/DOCS.md +3 -1
- package/dist/{agent-SBVWSP7G.js → agent-DSC3EQLT.js} +11 -11
- package/dist/{agent-SBVWSP7G.js.map → agent-DSC3EQLT.js.map} +1 -1
- package/dist/{baseline-NM53X2TB.js → baseline-KVCXVZFQ.js} +3 -3
- package/dist/{baseline-NM53X2TB.js.map → baseline-KVCXVZFQ.js.map} +1 -1
- package/dist/{chunk-N6LGZBIC.js → chunk-455ZJQQ4.js} +5 -5
- package/dist/{chunk-N6LGZBIC.js.map → chunk-455ZJQQ4.js.map} +1 -1
- package/dist/{chunk-VP5ECB7T.js → chunk-6L6V77HW.js} +8 -8
- package/dist/{chunk-VP5ECB7T.js.map → chunk-6L6V77HW.js.map} +1 -1
- package/dist/{chunk-K3KEKY2L.js → chunk-6XKDAYYR.js} +4 -4
- package/dist/{chunk-K3KEKY2L.js.map → chunk-6XKDAYYR.js.map} +1 -1
- package/dist/{chunk-TWZLUOTR.js → chunk-7C5UKIXD.js} +4 -4
- package/dist/{chunk-TWZLUOTR.js.map → chunk-7C5UKIXD.js.map} +1 -1
- package/dist/{chunk-VJIRJLV2.js → chunk-CBPDYYIH.js} +4 -4
- package/dist/{chunk-VJIRJLV2.js.map → chunk-CBPDYYIH.js.map} +1 -1
- package/dist/{chunk-KACPLPFT.js → chunk-D2VEJHPC.js} +7 -7
- package/dist/{chunk-KACPLPFT.js.map → chunk-D2VEJHPC.js.map} +1 -1
- package/dist/{chunk-Y6AMGI4L.js → chunk-EW2ZMFUC.js} +4 -4
- package/dist/{chunk-Y6AMGI4L.js.map → chunk-EW2ZMFUC.js.map} +1 -1
- package/dist/{chunk-LFHXJHOZ.js → chunk-HV4CKBXT.js} +3 -3
- package/dist/{chunk-LFHXJHOZ.js.map → chunk-HV4CKBXT.js.map} +1 -1
- package/dist/{chunk-VKVGREHC.js → chunk-I2JNLAKW.js} +1295 -61
- package/dist/chunk-I2JNLAKW.js.map +1 -0
- package/dist/{chunk-OGJ633I2.js → chunk-IQJUFRZZ.js} +35 -17
- package/dist/{chunk-OGJ633I2.js.map → chunk-IQJUFRZZ.js.map} +1 -1
- package/dist/chunk-K6MLOGU4.js +6 -0
- package/dist/{chunk-3Z6TDWNS.js.map → chunk-K6MLOGU4.js.map} +1 -1
- package/dist/{chunk-OKJTAHOL.js → chunk-KAOSPAFK.js} +5 -5
- package/dist/{chunk-OKJTAHOL.js.map → chunk-KAOSPAFK.js.map} +1 -1
- package/dist/{chunk-AN7RCXE4.js → chunk-KYRH3567.js} +32 -12
- package/dist/chunk-KYRH3567.js.map +1 -0
- package/dist/{chunk-5AUCYYBG.js → chunk-QDKFGLI3.js} +6 -6
- package/dist/{chunk-5AUCYYBG.js.map → chunk-QDKFGLI3.js.map} +1 -1
- package/dist/{chunk-SAHORNZX.js → chunk-RL6MHAOK.js} +4 -4
- package/dist/{chunk-SAHORNZX.js.map → chunk-RL6MHAOK.js.map} +1 -1
- package/dist/{chunk-A42UDYL2.js → chunk-SBVZGEOB.js} +3 -3
- package/dist/{chunk-A42UDYL2.js.map → chunk-SBVZGEOB.js.map} +1 -1
- package/dist/{chunk-BOAUTBTB.js → chunk-SI4D7DYF.js} +11 -2
- package/dist/chunk-SI4D7DYF.js.map +1 -0
- package/dist/{chunk-6XP2TQS5.js → chunk-TOVVTZTM.js} +3 -3
- package/dist/{chunk-6XP2TQS5.js.map → chunk-TOVVTZTM.js.map} +1 -1
- package/dist/{chunk-ITGUM42X.js → chunk-VTJAPNJO.js} +4 -4
- package/dist/{chunk-ITGUM42X.js.map → chunk-VTJAPNJO.js.map} +1 -1
- package/dist/{chunk-SMDHK37H.js → chunk-ZMSTSEGR.js} +3 -3
- package/dist/{chunk-SMDHK37H.js.map → chunk-ZMSTSEGR.js.map} +1 -1
- package/dist/{chunk-H4ZIJSHE.js → chunk-ZPPDKHGL.js} +65 -9
- package/dist/chunk-ZPPDKHGL.js.map +1 -0
- package/dist/cli.js +93 -51
- package/dist/cli.js.map +1 -1
- package/dist/embed-worker-main.js +3 -3
- package/dist/{ensure-map-JICVC2ZJ.js → ensure-map-5E5TFPXJ.js} +12 -12
- package/dist/{ensure-map-JICVC2ZJ.js.map → ensure-map-5E5TFPXJ.js.map} +1 -1
- package/dist/graph-backend-GQZXMNRI.js +13 -0
- package/dist/{graph-backend-TB35N5MC.js.map → graph-backend-GQZXMNRI.js.map} +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.js +11 -11
- package/dist/{interactive-IJS33F4K.js → interactive-7EZHEBHQ.js} +24 -22
- package/dist/interactive-7EZHEBHQ.js.map +1 -0
- package/dist/load-QBVKCWZT.js +9 -0
- package/dist/{load-OMTSGVDX.js.map → load-QBVKCWZT.js.map} +1 -1
- package/dist/{run-outcome-UENLWBWC.js → run-outcome-NQAU6DOA.js} +5 -5
- package/dist/{run-outcome-UENLWBWC.js.map → run-outcome-NQAU6DOA.js.map} +1 -1
- package/dist/runtime-session-ZPGU4PGW.js +20 -0
- package/dist/{runtime-session-AFL7P4TQ.js.map → runtime-session-ZPGU4PGW.js.map} +1 -1
- package/dist/session-QNSYTLLJ.js +15 -0
- package/dist/{session-HOS4454T.js.map → session-QNSYTLLJ.js.map} +1 -1
- package/dist/{stream-json-SVMGVBFB.js → stream-json-5WFD6HRO.js} +11 -11
- package/dist/{stream-json-SVMGVBFB.js.map → stream-json-5WFD6HRO.js.map} +1 -1
- package/dist/{vg-mcp-bridge-NYCAQEMU.js → vg-mcp-bridge-VTGXA6CO.js} +8 -8
- package/dist/{vg-mcp-bridge-NYCAQEMU.js.map → vg-mcp-bridge-VTGXA6CO.js.map} +1 -1
- package/dist/{vgd-YFPJHQB5.js → vgd-54GEZWBI.js} +8 -8
- package/dist/vgd-54GEZWBI.js.map +1 -0
- package/package.json +3 -3
- package/dist/chunk-3Z6TDWNS.js +0 -6
- package/dist/chunk-AN7RCXE4.js.map +0 -1
- package/dist/chunk-BOAUTBTB.js.map +0 -1
- package/dist/chunk-H4ZIJSHE.js.map +0 -1
- package/dist/chunk-VKVGREHC.js.map +0 -1
- package/dist/graph-backend-TB35N5MC.js +0 -13
- package/dist/interactive-IJS33F4K.js.map +0 -1
- package/dist/load-OMTSGVDX.js +0 -9
- package/dist/runtime-session-AFL7P4TQ.js +0 -20
- package/dist/session-HOS4454T.js +0 -15
- package/dist/vgd-YFPJHQB5.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { loadAdvancedScanHook, baselineCommand } from './chunk-Y4JO6LYP.js';
|
|
3
|
-
import { fetchCatalog, resolveProviders } from './chunk-
|
|
4
|
-
import { VGD_PROTOCOL_VERSION, startVgdServer } from './chunk-
|
|
3
|
+
import { fetchCatalog, resolveProviders } from './chunk-IQJUFRZZ.js';
|
|
4
|
+
import { VGD_PROTOCOL_VERSION, startVgdServer } from './chunk-VTJAPNJO.js';
|
|
5
5
|
import './chunk-IS7VTH2Q.js';
|
|
6
|
-
import { telemetryOptOut, StatsSharer, statsEndpoint, isCI } from './chunk-
|
|
7
|
-
import {
|
|
6
|
+
import { telemetryOptOut, StatsSharer, statsEndpoint, isCI } from './chunk-6XKDAYYR.js';
|
|
7
|
+
import { runCodeSession } from './chunk-KAOSPAFK.js';
|
|
8
|
+
import { CONTEXT_POLICY_VERSION, computeFcsReport, renderFcsReportMarkdown, createTrajectoryCollector, runAgent } from './chunk-I2JNLAKW.js';
|
|
8
9
|
import './chunk-543E6WDJ.js';
|
|
10
|
+
import { summarizeDiffs, ScriptedProvider } from './chunk-SI4D7DYF.js';
|
|
9
11
|
import './chunk-7AVYKZEM.js';
|
|
10
12
|
import { buildModelInstallPlan } from './chunk-WHJMS7XC.js';
|
|
11
|
-
import { runCodeSession } from './chunk-OKJTAHOL.js';
|
|
12
|
-
import { summarizeDiffs, ScriptedProvider } from './chunk-BOAUTBTB.js';
|
|
13
13
|
import { ensurePackage, ensureUnavailableMessage } from './chunk-REIGWTTH.js';
|
|
14
|
-
import { sha256Hex, generateKeypair, dssePae, DSSE_PAYLOAD_TYPE, keyId, registerBuild, readGlobal, applyGlobalOptions, ProgressBar, printLogo, runBuild } from './chunk-
|
|
15
|
-
export { runBuild } from './chunk-
|
|
14
|
+
import { sha256Hex, generateKeypair, dssePae, DSSE_PAYLOAD_TYPE, keyId, registerBuild, readGlobal, applyGlobalOptions, ProgressBar, printLogo, runBuild } from './chunk-D2VEJHPC.js';
|
|
15
|
+
export { runBuild } from './chunk-D2VEJHPC.js';
|
|
16
16
|
import { disableColor, info, c, json, out } from './chunk-CT5BS56U.js';
|
|
17
17
|
import { init_resolve_ollama, gatherSystemMemory, resolveOllamaBinary, hasOllamaBinary, resolve_ollama_exports } from './chunk-OWSFZQOP.js';
|
|
18
18
|
import { readOrchestratorState, writeOrchestratorState, parseMode, setDefaultMode, recommendMode, activePin, resolveMode, providerForBackend, QUALIFIED_PACKS, pinPack, unpinPack, buildOrchestratorStatus } from './chunk-NZELMYT4.js';
|
|
19
19
|
import { fmt, estimateModelBytes } from './chunk-7N4Y3E47.js';
|
|
20
20
|
import './chunk-IZDH67DX.js';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-HV4CKBXT.js';
|
|
22
22
|
import { vgdSocketPath, vgdIsRunning, vgdRequest, vgdPidPath } from './chunk-RBIRXQR6.js';
|
|
23
23
|
import { defaultProcessEndpoint, startProcessHostServer, resolveInferenceIsolation } from './chunk-JFE7XCAE.js';
|
|
24
24
|
import { clearHostSessionPool, acquireHostSession, generateOnSession, listHostSessions, hostSessionPoolSize } from './chunk-3LOWJSAF.js';
|
|
25
25
|
import { buildIdentifierTrieFromGraph } from './chunk-5HYCB55P.js';
|
|
26
|
-
import { serveStdio, isRelevantChange, exportGraph, GraphSource, createServer, formatForExt, RefreshScheduler } from './chunk-
|
|
27
|
-
import { refreshIfStale } from './chunk-
|
|
28
|
-
import { recordCliCall, CLI_TOOL_ALIASES, savingsLedgerPath, clearSavings, readSavings, readUsage, readModelSavings, CAPSULE_RANKING_VERSION, SAVINGS_TOOLS, sanitizeClient } from './chunk-
|
|
29
|
-
import { CliError, ExitCode, driftCount, ASSISTANTS, detectAssistants, isAssistantInstalled, usageError, detectServeLaunch, installAssistant, writeNavigationConfig, uninstallAssistant, buildGraph, writeSnapshot, probeFreshness, discover, assistantById, SMALL_REPO_FILES, isSkippedDirName, SKIP_FILES, SKIP_DIRS } from './chunk-
|
|
30
|
-
import { resolveDsn, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, parseDsn as parseDsn$1, uploadScanArtifact, dsnCommand, pushCommand, countTokens, shortestPath, pathDisconnect, testsToRun, detectRunner, coveringTests, FREE_PACK, readScanArtifact, publishPrivateLibrary, assessDocQuality, symbolsFromApi, fetchHostedDocsCached, selectForBudget, hostedBase, readStoredCredentials, projectCredentialsPath, homeCredentialsPath } from './chunk-
|
|
26
|
+
import { serveStdio, isRelevantChange, exportGraph, GraphSource, createServer, formatForExt, RefreshScheduler } from './chunk-6L6V77HW.js';
|
|
27
|
+
import { refreshIfStale } from './chunk-455ZJQQ4.js';
|
|
28
|
+
import { recordCliCall, CLI_TOOL_ALIASES, savingsLedgerPath, clearSavings, readSavings, readUsage, readModelSavings, CAPSULE_RANKING_VERSION, SAVINGS_TOOLS, sanitizeClient } from './chunk-7C5UKIXD.js';
|
|
29
|
+
import { CliError, ExitCode, driftCount, ASSISTANTS, detectAssistants, isAssistantInstalled, usageError, detectServeLaunch, installAssistant, writeNavigationConfig, uninstallAssistant, buildGraph, writeSnapshot, probeFreshness, discover, assistantById, SMALL_REPO_FILES, isSkippedDirName, SKIP_FILES, SKIP_DIRS } from './chunk-ZPPDKHGL.js';
|
|
30
|
+
import { resolveDsn, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, parseDsn as parseDsn$1, uploadScanArtifact, dsnCommand, pushCommand, countTokens, shortestPath, pathDisconnect, testsToRun, detectRunner, coveringTests, FREE_PACK, readScanArtifact, publishPrivateLibrary, assessDocQuality, symbolsFromApi, fetchHostedDocsCached, selectForBudget, hostedBase, readStoredCredentials, projectCredentialsPath, homeCredentialsPath } from './chunk-QDKFGLI3.js';
|
|
31
31
|
import { writeDefaultConfig, parseDsn, detectVcs, computeRepoFingerprint, resolveRepositoryName, fetchScanPreflight, runCoreScan, loadConfig, prepareCompressedUpload, computeDriftScore, titleBox, projectTypeToVulnEcosystem, driftBar, gitHistoryAvailable, buildVersionTimelines, findPackageAnyEcosystem, normalizeConstraint, findVersionCrossings, versionSatisfies, PROJECT_TYPE_TO_OSV_ECOSYSTEM, fetchRiskySymbols, perDependencyDrift } from './chunk-INIULQEP.js';
|
|
32
32
|
import { resolveIngestHost, dashHostForIngestHost, availableRegionIds, ingestHostForRegionId } from './chunk-HTLDXEHW.js';
|
|
33
33
|
import './chunk-VIWZ4QT7.js';
|
|
34
|
-
import { inventory, enrichOnline, ECOSYSTEMS, catalogPath, libDir, loadCatalog, driftFor, addLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface } from './chunk-
|
|
34
|
+
import { inventory, enrichOnline, ECOSYSTEMS, catalogPath, libDir, loadCatalog, driftFor, addLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface } from './chunk-CBPDYYIH.js';
|
|
35
35
|
import { discoverModels } from './chunk-CQDUBAQY.js';
|
|
36
36
|
import { freeBytesOnVolume, weightStoreDir, listCachedWeights, ensureWeightCached, catalogIntegrityReport } from './chunk-OV4KGXPD.js';
|
|
37
37
|
import './chunk-5I4VSBWQ.js';
|
|
@@ -39,13 +39,13 @@ import { pathExists as pathExists$1, parseExcludePatterns } from './chunk-DT4KIV
|
|
|
39
39
|
import { ensureDir, pathExists, readJsonFile, writeTextFile, writeJsonFile } from './chunk-CRAMOEBE.js';
|
|
40
40
|
import { init_cli_invocation, resolveCliInvocation, NPX_INVOCATION } from './chunk-3LSG7Z4I.js';
|
|
41
41
|
import { resolveOne } from './chunk-J7LKEB2R.js';
|
|
42
|
-
import { queryGraphSemantic, queryGraph, indexFor, impactOf } from './chunk-
|
|
42
|
+
import { queryGraphSemantic, queryGraph, indexFor, impactOf } from './chunk-EW2ZMFUC.js';
|
|
43
43
|
import { resolvedGrammarFiles, grammarSetVersion } from './chunk-UTNNGKKX.js';
|
|
44
44
|
import './chunk-RXP66R2E.js';
|
|
45
|
-
import { embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, unavailableMessage, countPending, modelCacheInfo, embeddingsPath, clearModelCache, withTimeout } from './chunk-
|
|
46
|
-
import { loadGraph, loadGraphPreferIndex, SCHEMA_VERSION } from './chunk-
|
|
47
|
-
import { cacheDir, resolveGraphPath, analyzeQuestion, loadTopicTags, renderReport, resetRelevanceProviderCache, loadRelevanceProvider, loadGraphFileWithSnapshot, serializeGraph, stableStringify, writeArtifacts, vibgrateDir, mapFileExists, relevanceModuleDir, parseGraph, ensureVibgrateGitignore } from './chunk-
|
|
48
|
-
import { VERSION } from './chunk-
|
|
45
|
+
import { embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, unavailableMessage, countPending, modelCacheInfo, embeddingsPath, clearModelCache, withTimeout } from './chunk-KYRH3567.js';
|
|
46
|
+
import { loadGraph, loadGraphPreferIndex, SCHEMA_VERSION } from './chunk-SBVZGEOB.js';
|
|
47
|
+
import { cacheDir, resolveGraphPath, analyzeQuestion, loadTopicTags, renderReport, resetRelevanceProviderCache, loadRelevanceProvider, loadGraphFileWithSnapshot, serializeGraph, stableStringify, writeArtifacts, vibgrateDir, mapFileExists, relevanceModuleDir, parseGraph, ensureVibgrateGitignore } from './chunk-ZMSTSEGR.js';
|
|
48
|
+
import { VERSION } from './chunk-K6MLOGU4.js';
|
|
49
49
|
import './chunk-BWPBB45M.js';
|
|
50
50
|
import { canonicalize, hashString, hashBytes } from './chunk-JFGYT6BI.js';
|
|
51
51
|
import './chunk-BPF3YX2U.js';
|
|
@@ -179,7 +179,14 @@ function registerAsk(program) {
|
|
|
179
179
|
info(c.dim(" preparing semantic search (first use embeds the map; cached, resumable & offline after)\u2026"));
|
|
180
180
|
}
|
|
181
181
|
let reason;
|
|
182
|
-
|
|
182
|
+
let detail;
|
|
183
|
+
const embedder = await loadEmbedder({
|
|
184
|
+
local: global.local,
|
|
185
|
+
onUnavailable: (r, d) => {
|
|
186
|
+
reason = r;
|
|
187
|
+
detail = d;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
183
190
|
if (embedder) {
|
|
184
191
|
const bar = !global.json && firstRun ? new ProgressBar(c.dim("embedding")) : void 0;
|
|
185
192
|
const vectors = await getNodeEmbeddings(graph, embedder, root2, bar ? (d, t) => bar.update(d, t) : void 0);
|
|
@@ -189,6 +196,7 @@ function registerAsk(program) {
|
|
|
189
196
|
} else {
|
|
190
197
|
result = queryGraph(graph, q, { budget, relevance, topicTags });
|
|
191
198
|
note = reason ? unavailableMessage(reason) : "semantic unavailable; used lexical";
|
|
199
|
+
if (detail) note += ` (${detail})`;
|
|
192
200
|
}
|
|
193
201
|
} else {
|
|
194
202
|
result = queryGraph(graph, q, { budget, relevance, topicTags });
|
|
@@ -260,14 +268,27 @@ function writeVerdict(dir, verdict) {
|
|
|
260
268
|
} catch {
|
|
261
269
|
}
|
|
262
270
|
}
|
|
271
|
+
function probeModuleUrl(from = import.meta.url) {
|
|
272
|
+
const dir = path41.dirname(fileURLToPath(from));
|
|
273
|
+
for (const name of ["embeddings.js", "index.js"]) {
|
|
274
|
+
const candidate = path41.join(dir, name);
|
|
275
|
+
if (fs11.existsSync(candidate)) return pathToFileURL(candidate).href;
|
|
276
|
+
}
|
|
277
|
+
return pathToFileURL(path41.join(dir, "index.js")).href;
|
|
278
|
+
}
|
|
263
279
|
function defaultRunProbe(timeoutMs) {
|
|
264
|
-
const moduleUrl =
|
|
280
|
+
const moduleUrl = probeModuleUrl();
|
|
265
281
|
const script = `
|
|
266
282
|
import(${JSON.stringify(moduleUrl)})
|
|
267
283
|
.then(async (m) => {
|
|
284
|
+
if (typeof m.loadEmbedder !== 'function') {
|
|
285
|
+
process.stdout.write('{"ok":false}');
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
268
288
|
const e = await m.loadEmbedder({ noDownload: true });
|
|
269
289
|
if (!e) { process.stdout.write('{"ok":false}'); return; }
|
|
270
290
|
await e.embedQuery('probe');
|
|
291
|
+
await e.embed(['probe document']);
|
|
271
292
|
process.stdout.write('{"ok":true}');
|
|
272
293
|
})
|
|
273
294
|
.catch(() => process.stdout.write('{"ok":false}'));
|
|
@@ -350,11 +371,12 @@ function registerEmbed(program) {
|
|
|
350
371
|
const bg = opts.bg === true;
|
|
351
372
|
const speak = !bg && !global.json;
|
|
352
373
|
if (global.local) {
|
|
353
|
-
if (
|
|
374
|
+
if (global.json) json({ embedded: 0, model: modelId, semantic: false, reason: "local" });
|
|
375
|
+
else if (speak) info(c.dim("vg embed \xB7 semantic is off (--local) \u2014 lexical search only"));
|
|
354
376
|
return;
|
|
355
377
|
}
|
|
356
378
|
if (countPending(graph, root2, modelId) === 0) {
|
|
357
|
-
if (global.json) json({ embedded: 0, pending: 0, upToDate: true, model: modelId });
|
|
379
|
+
if (global.json) json({ embedded: 0, pending: 0, upToDate: true, model: modelId, semantic: true });
|
|
358
380
|
else if (speak) info(`${c.cyan("vg embed")} \xB7 semantic index already up to date`);
|
|
359
381
|
return;
|
|
360
382
|
}
|
|
@@ -365,6 +387,7 @@ function registerEmbed(program) {
|
|
|
365
387
|
return;
|
|
366
388
|
}
|
|
367
389
|
let reason;
|
|
390
|
+
let detail;
|
|
368
391
|
const embedder = await loadEmbedder({
|
|
369
392
|
local: global.local,
|
|
370
393
|
// Background warm-ups skip the download unless explicitly asked to fetch
|
|
@@ -372,17 +395,24 @@ function registerEmbed(program) {
|
|
|
372
395
|
// time `vg serve`/`vg ask` needs it).
|
|
373
396
|
noDownload: bg && opts.download !== true,
|
|
374
397
|
showDownloadProgress: !bg,
|
|
375
|
-
onUnavailable: (r) =>
|
|
398
|
+
onUnavailable: (r, d) => {
|
|
399
|
+
reason = r;
|
|
400
|
+
detail = d;
|
|
401
|
+
}
|
|
376
402
|
});
|
|
377
403
|
if (!embedder) {
|
|
378
|
-
if (
|
|
404
|
+
if (global.json) {
|
|
405
|
+
json({ embedded: 0, model: modelId, semantic: false, reason: reason ?? "init-failed", detail: detail ?? null });
|
|
406
|
+
} else if (reason) {
|
|
407
|
+
info(c.dim(`vg embed \xB7 ${unavailableMessage(reason)}${detail ? ` (${detail})` : ""}`));
|
|
408
|
+
}
|
|
379
409
|
return;
|
|
380
410
|
}
|
|
381
411
|
const pending = countPending(graph, root2, modelId);
|
|
382
412
|
const bar = speak ? new ProgressBar(c.dim("embedding")) : void 0;
|
|
383
413
|
await getNodeEmbeddings(graph, embedder, root2, bar ? (d, t) => bar.update(d, t) : void 0);
|
|
384
414
|
bar?.done();
|
|
385
|
-
if (global.json) json({ embedded: pending, model: modelId });
|
|
415
|
+
if (global.json) json({ embedded: pending, model: modelId, semantic: true });
|
|
386
416
|
else if (speak) info(`${c.green("\u2714")} vg embed \xB7 semantic index ready (~${pending} node(s) \xB7 model ${modelId})`);
|
|
387
417
|
});
|
|
388
418
|
applyGlobalOptions(cmd);
|
|
@@ -1990,11 +2020,17 @@ async function runAsk(graph, params, ctx) {
|
|
|
1990
2020
|
const budgetMs = semanticBudgetMs();
|
|
1991
2021
|
log(`ask: trying the semantic path (budget ${Math.round(budgetMs / 1e3)}s)`);
|
|
1992
2022
|
let reason;
|
|
2023
|
+
let detail;
|
|
1993
2024
|
const started = Date.now();
|
|
1994
2025
|
try {
|
|
1995
2026
|
result = await withTimeout(
|
|
1996
2027
|
(async () => {
|
|
1997
|
-
const embedder = await loadEmbedder({
|
|
2028
|
+
const embedder = await loadEmbedder({
|
|
2029
|
+
onUnavailable: (r2, d) => {
|
|
2030
|
+
reason = r2;
|
|
2031
|
+
detail = d;
|
|
2032
|
+
}
|
|
2033
|
+
});
|
|
1998
2034
|
if (!embedder) return null;
|
|
1999
2035
|
log(`ask: embedder "${embedder.id}" loaded in ${Date.now() - started}ms; embedding nodes\u2026`);
|
|
2000
2036
|
const vectors = await getNodeEmbeddings(graph, embedder, ctx.root);
|
|
@@ -2008,7 +2044,9 @@ async function runAsk(graph, params, ctx) {
|
|
|
2008
2044
|
);
|
|
2009
2045
|
if (!result) {
|
|
2010
2046
|
note = reason ? unavailableMessage(reason) : "semantic unavailable; used lexical";
|
|
2011
|
-
log(
|
|
2047
|
+
log(
|
|
2048
|
+
`ask: semantic unavailable (${reason ?? "no backend"}) \u2014 falling back to lexical` + (detail ? ` \xB7 ${detail}` : "")
|
|
2049
|
+
);
|
|
2012
2050
|
}
|
|
2013
2051
|
} catch (err) {
|
|
2014
2052
|
mode = "lexical";
|
|
@@ -6948,7 +6986,7 @@ function registerCode(program) {
|
|
|
6948
6986
|
try {
|
|
6949
6987
|
const { parseMode: parseMode2, resolveMode: resolveMode2, readOrchestratorState: readOrchestratorState2, activePin: activePin2 } = await import('./model-orchestrator-LHYPJBFH.js');
|
|
6950
6988
|
const { gatherSystemMemory: gatherSystemMemory2 } = await import('./local-runtime-2ED33KK6.js');
|
|
6951
|
-
const { loadGraph: loadGraph2 } = await import('./load-
|
|
6989
|
+
const { loadGraph: loadGraph2 } = await import('./load-QBVKCWZT.js');
|
|
6952
6990
|
const state = readOrchestratorState2();
|
|
6953
6991
|
const mode = parseMode2(modeFlag) ?? state.defaultMode ?? void 0;
|
|
6954
6992
|
const pin = mode ? activePin2(mode, state) : null;
|
|
@@ -7033,7 +7071,7 @@ function registerCode(program) {
|
|
|
7033
7071
|
if (!(process.stdin.isTTY && process.stdout.isTTY)) {
|
|
7034
7072
|
throw usageError('say what to change, e.g. `vg code "add a --timeout flag to the scan command"` (guided mode needs an interactive terminal)');
|
|
7035
7073
|
}
|
|
7036
|
-
const { runInteractive } = await import('./interactive-
|
|
7074
|
+
const { runInteractive } = await import('./interactive-7EZHEBHQ.js');
|
|
7037
7075
|
await runInteractive(
|
|
7038
7076
|
rootOf(global),
|
|
7039
7077
|
global,
|
|
@@ -7063,7 +7101,7 @@ function registerCode(program) {
|
|
|
7063
7101
|
}
|
|
7064
7102
|
if (!instruction && !stdinFirstTurn) throw usageError('say what to change, e.g. `vg code "add a --timeout flag to the scan command"`');
|
|
7065
7103
|
{
|
|
7066
|
-
const { ensureCodeMap } = await import('./ensure-map-
|
|
7104
|
+
const { ensureCodeMap } = await import('./ensure-map-5E5TFPXJ.js');
|
|
7067
7105
|
const mapRoot = rootOf(global);
|
|
7068
7106
|
try {
|
|
7069
7107
|
await ensureCodeMap(mapRoot, global, {
|
|
@@ -7148,20 +7186,20 @@ function registerCode(program) {
|
|
|
7148
7186
|
process.stdout.write(JSON.stringify(line) + "\n");
|
|
7149
7187
|
};
|
|
7150
7188
|
try {
|
|
7151
|
-
const { RunOutcomeRecorder, newOneShotRunId, turnRunId } = await import('./run-outcome-
|
|
7189
|
+
const { RunOutcomeRecorder, newOneShotRunId, turnRunId } = await import('./run-outcome-NQAU6DOA.js');
|
|
7152
7190
|
const primarySlug = route.providers[0]?.model.includes("/") ? route.providers[0].model.split("/")[0] : route.providers[0]?.id;
|
|
7153
|
-
const { runCodeStreamJson, parseHostMessage } = await import('./stream-json-
|
|
7154
|
-
const { nodeCodeFs } = await import('./session-
|
|
7191
|
+
const { runCodeStreamJson, parseHostMessage } = await import('./stream-json-5WFD6HRO.js');
|
|
7192
|
+
const { nodeCodeFs } = await import('./session-QNSYTLLJ.js');
|
|
7155
7193
|
const readline6 = await import('readline');
|
|
7156
7194
|
const child = await import('child_process');
|
|
7157
7195
|
const { loadOrDiscoverFederation } = await import('./federation-MDQPO3PW.js');
|
|
7158
7196
|
const { resolveExecutionEnv } = await import('./execution-env-4MS5AYAN.js');
|
|
7159
7197
|
const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-ELWF3Z6H.js');
|
|
7160
|
-
const { startCodeRuntimeSession } = await import('./runtime-session-
|
|
7161
|
-
const { resolveGraphBackend } = await import('./graph-backend-
|
|
7198
|
+
const { startCodeRuntimeSession } = await import('./runtime-session-ZPGU4PGW.js');
|
|
7199
|
+
const { resolveGraphBackend } = await import('./graph-backend-GQZXMNRI.js');
|
|
7162
7200
|
const { detectGitRef } = await import('./git-ref-RSRAN4OH.js');
|
|
7163
7201
|
const { repositoryIdFromRoot } = await import('./paths-62AKTFSR.js');
|
|
7164
|
-
const { vgdRequest: vgdRequest2 } = await import('./vgd-
|
|
7202
|
+
const { vgdRequest: vgdRequest2 } = await import('./vgd-54GEZWBI.js');
|
|
7165
7203
|
const federation = loadOrDiscoverFederation(root2);
|
|
7166
7204
|
const modelProfile = mergeModelExecutionProfile(
|
|
7167
7205
|
resolveModelExecutionProfile({
|
|
@@ -7219,7 +7257,7 @@ ${res.stderr}` : ""),
|
|
|
7219
7257
|
exitCode: res.status ?? 1
|
|
7220
7258
|
};
|
|
7221
7259
|
};
|
|
7222
|
-
const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-
|
|
7260
|
+
const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-VTGXA6CO.js');
|
|
7223
7261
|
const vgBuiltin = createVgBuiltinMcpTools({
|
|
7224
7262
|
getGraph: () => graph,
|
|
7225
7263
|
root: root2,
|
|
@@ -7279,6 +7317,10 @@ ${res.stderr}` : ""),
|
|
|
7279
7317
|
providers: route.providers,
|
|
7280
7318
|
fsImpl: nodeCodeFs(root2),
|
|
7281
7319
|
run,
|
|
7320
|
+
// Live command-output events for the VG Code panel (async shell).
|
|
7321
|
+
// Sandboxed executionEnv still uses its own runner when set.
|
|
7322
|
+
streamShell: !executionEnv,
|
|
7323
|
+
allowSubagents: true,
|
|
7282
7324
|
executionEnv,
|
|
7283
7325
|
graphBackend,
|
|
7284
7326
|
modelProfile,
|
|
@@ -7309,8 +7351,8 @@ ${res.stderr}` : ""),
|
|
|
7309
7351
|
};
|
|
7310
7352
|
try {
|
|
7311
7353
|
if (opts.session) {
|
|
7312
|
-
const { runCodeStreamJsonSession } = await import('./stream-json-
|
|
7313
|
-
const { runAgent: runAgent2 } = await import('./agent-
|
|
7354
|
+
const { runCodeStreamJsonSession } = await import('./stream-json-5WFD6HRO.js');
|
|
7355
|
+
const { runAgent: runAgent2 } = await import('./agent-DSC3EQLT.js');
|
|
7314
7356
|
const {
|
|
7315
7357
|
condenseSession,
|
|
7316
7358
|
loadLatestSession,
|
|
@@ -7478,8 +7520,8 @@ ${res.stderr}` : ""),
|
|
|
7478
7520
|
if (!autonomous && !tty) {
|
|
7479
7521
|
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).");
|
|
7480
7522
|
}
|
|
7481
|
-
const { agentTask } = await import('./interactive-
|
|
7482
|
-
const { nodeCodeFs } = await import('./session-
|
|
7523
|
+
const { agentTask } = await import('./interactive-7EZHEBHQ.js');
|
|
7524
|
+
const { nodeCodeFs } = await import('./session-QNSYTLLJ.js');
|
|
7483
7525
|
const { TtyPrompter } = await import('./ui-K7D3BCHD.js');
|
|
7484
7526
|
let priorSummary;
|
|
7485
7527
|
let priorInstruction;
|
|
@@ -7492,7 +7534,7 @@ ${res.stderr}` : ""),
|
|
|
7492
7534
|
}
|
|
7493
7535
|
}
|
|
7494
7536
|
const prompter = tty ? new TtyPrompter() : void 0;
|
|
7495
|
-
const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-
|
|
7537
|
+
const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-VTGXA6CO.js');
|
|
7496
7538
|
const vgBuiltin = createVgBuiltinMcpTools({
|
|
7497
7539
|
getGraph: () => graph,
|
|
7498
7540
|
root: root2,
|
|
@@ -7516,11 +7558,11 @@ ${res.stderr}` : ""),
|
|
|
7516
7558
|
const { loadFederation } = await import('./federation-MDQPO3PW.js');
|
|
7517
7559
|
const { resolveExecutionEnv } = await import('./execution-env-4MS5AYAN.js');
|
|
7518
7560
|
const { resolveModelExecutionProfile, mergeModelExecutionProfile } = await import('./model-execution-profile-ELWF3Z6H.js');
|
|
7519
|
-
const { startCodeRuntimeSession } = await import('./runtime-session-
|
|
7520
|
-
const { resolveGraphBackend } = await import('./graph-backend-
|
|
7561
|
+
const { startCodeRuntimeSession } = await import('./runtime-session-ZPGU4PGW.js');
|
|
7562
|
+
const { resolveGraphBackend } = await import('./graph-backend-GQZXMNRI.js');
|
|
7521
7563
|
const { detectGitRef } = await import('./git-ref-RSRAN4OH.js');
|
|
7522
7564
|
const { repositoryIdFromRoot } = await import('./paths-62AKTFSR.js');
|
|
7523
|
-
const { vgdRequest: vgdRequest2 } = await import('./vgd-
|
|
7565
|
+
const { vgdRequest: vgdRequest2 } = await import('./vgd-54GEZWBI.js');
|
|
7524
7566
|
const federation = loadFederation(root2);
|
|
7525
7567
|
const modelProfile = mergeModelExecutionProfile(
|
|
7526
7568
|
resolveModelExecutionProfile({
|
|
@@ -8430,7 +8472,7 @@ function registerDaemon(program) {
|
|
|
8430
8472
|
throw new CliError(loaded.error, ExitCode.NOT_FOUND);
|
|
8431
8473
|
}
|
|
8432
8474
|
if (!loaded.ok) {
|
|
8433
|
-
const { loadGraph: loadGraph2 } = await import('./load-
|
|
8475
|
+
const { loadGraph: loadGraph2 } = await import('./load-QBVKCWZT.js');
|
|
8434
8476
|
const { detectGitRef } = await import('./git-ref-RSRAN4OH.js');
|
|
8435
8477
|
const { repositoryIdFromRoot } = await import('./paths-62AKTFSR.js');
|
|
8436
8478
|
const graph = loadGraph2(root2, global.graph);
|
|
@@ -8835,7 +8877,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
8835
8877
|
console.log(chalk7.green("\u2714") + ` Created ${chalk7.bold("vibgrate.config.ts")}`);
|
|
8836
8878
|
}
|
|
8837
8879
|
if (opts.baseline) {
|
|
8838
|
-
const { runBaseline } = await import('./baseline-
|
|
8880
|
+
const { runBaseline } = await import('./baseline-KVCXVZFQ.js');
|
|
8839
8881
|
await runBaseline(rootDir);
|
|
8840
8882
|
}
|
|
8841
8883
|
console.log("");
|
|
@@ -10387,7 +10429,7 @@ ${String(err)}` }));
|
|
|
10387
10429
|
async function releaseWindowsFileLocks(cwd, keepVersion) {
|
|
10388
10430
|
reapAndReport(cwd, keepVersion);
|
|
10389
10431
|
try {
|
|
10390
|
-
const { vgdSocketPath: vgdSocketPath2 } = await import('./vgd-
|
|
10432
|
+
const { vgdSocketPath: vgdSocketPath2 } = await import('./vgd-54GEZWBI.js');
|
|
10391
10433
|
const result = await stopVgd(vgdSocketPath2());
|
|
10392
10434
|
if (result === "stopped") {
|
|
10393
10435
|
console.log(chalk7.dim("Stopped the vgd daemon so its files can be replaced \u2014 it restarts on the next command."));
|
|
@@ -10512,7 +10554,7 @@ var updateCommand = new Command("update").description("Update vibgrate to the la
|
|
|
10512
10554
|
);
|
|
10513
10555
|
async function rewarmVgdAndReport(cwd) {
|
|
10514
10556
|
try {
|
|
10515
|
-
const { vgdIsRunning: vgdIsRunning2, vgdRequest: vgdRequest2 } = await import('./vgd-
|
|
10557
|
+
const { vgdIsRunning: vgdIsRunning2, vgdRequest: vgdRequest2 } = await import('./vgd-54GEZWBI.js');
|
|
10516
10558
|
if (!await vgdIsRunning2()) return;
|
|
10517
10559
|
const loaded = await vgdRequest2({ op: "load-graph", root: cwd });
|
|
10518
10560
|
if (!loaded.ok || !("repositoryId" in loaded)) return;
|