@vibgrate/cli 2026.704.1 → 2026.704.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baseline-64EUPWUH.js +6 -0
- package/dist/{baseline-FESLZK5O.js.map → baseline-64EUPWUH.js.map} +1 -1
- package/dist/{chunk-YODVLV37.js → chunk-JL7FIC6W.js} +313 -102
- package/dist/chunk-JL7FIC6W.js.map +1 -0
- package/dist/{chunk-W4ANUENJ.js → chunk-WHQRV66O.js} +3 -3
- package/dist/{chunk-W4ANUENJ.js.map → chunk-WHQRV66O.js.map} +1 -1
- package/dist/{chunk-RJHYTD62.js → chunk-YN5OGRWU.js} +3 -3
- package/dist/{chunk-RJHYTD62.js.map → chunk-YN5OGRWU.js.map} +1 -1
- package/dist/cli.js +22 -16
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/baseline-FESLZK5O.js +0 -6
- package/dist/chunk-YODVLV37.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { resolveDsn, resolveIngestHost, dashHostForIngestHost, resolveCliInvocation, availableRegionIds, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, inventory, uploadScanArtifact, dsnCommand, pushCommand, ExitCode, CliError, NPX_INVOCATION, verifyDeterminism, refreshIfStale, driftCount, embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, queryGraphSemantic, queryGraph, unavailableMessage, countPending, resolveOne, GraphIndex, shortestPath, renderReport, impactOf, testsToRun, detectRunner, defaultGraphPath, serveStdio, ASSISTANTS, usageError, loadGraph, detectServeLaunch, installAssistant, uninstallAssistant, coveringTests, FREE_PACK, readScanArtifact, enrichOnline, ECOSYSTEMS, discoverModels, readSavings, exportGraph, catalogPath, libDir, stableStringify, buildGraph, writeArtifacts, writeSnapshot, UsageError, ResourceLimitError, cacheDir, probeFreshness, discover, vibgrateDir, modelCacheInfo, clearModelCache, GraphSource, createServer, assistantById, serializeGraph, resolveLimits, loadCatalog, driftFor, addLibrary, parseDsn as parseDsn$1, publishPrivateLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface, assessDocQuality, symbolsFromApi, fetchHostedDocs, selectForBudget, formatForExt, renderHtml, isModelReady } from './chunk-
|
|
2
|
+
import { resolveDsn, resolveIngestHost, dashHostForIngestHost, resolveCliInvocation, availableRegionIds, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, inventory, uploadScanArtifact, dsnCommand, pushCommand, ExitCode, CliError, NPX_INVOCATION, verifyDeterminism, refreshIfStale, driftCount, embeddingsCached, resolveEmbedModel, loadEmbedder, getNodeEmbeddings, queryGraphSemantic, queryGraph, unavailableMessage, countPending, resolveOne, GraphIndex, shortestPath, renderReport, impactOf, testsToRun, detectRunner, defaultGraphPath, serveStdio, ASSISTANTS, usageError, loadGraph, detectServeLaunch, installAssistant, writeNavigationConfig, uninstallAssistant, coveringTests, FREE_PACK, readScanArtifact, enrichOnline, ECOSYSTEMS, discoverModels, readSavings, exportGraph, catalogPath, libDir, stableStringify, buildGraph, writeArtifacts, writeSnapshot, UsageError, ResourceLimitError, cacheDir, probeFreshness, discover, vibgrateDir, modelCacheInfo, clearModelCache, GraphSource, createServer, assistantById, serializeGraph, resolveLimits, loadCatalog, driftFor, addLibrary, parseDsn as parseDsn$1, publishPrivateLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface, assessDocQuality, symbolsFromApi, fetchHostedDocs, selectForBudget, formatForExt, renderHtml, isModelReady } from './chunk-JL7FIC6W.js';
|
|
3
3
|
import { resolvedGrammarFiles, grammarSetVersion } from './chunk-X5YT263H.js';
|
|
4
|
-
import { loadAdvancedScanHook, baselineCommand } from './chunk-
|
|
5
|
-
import { ensureDir, pathExists, writeDefaultConfig, parseDsn, detectVcs, computeRepoFingerprint, resolveRepositoryName, fetchScanPreflight, runCoreScan, VERSION, readJsonFile, writeTextFile, prepareCompressedUpload, titleBox, driftBar, gitHistoryAvailable, buildVersionTimelines, findPackageAnyEcosystem, normalizeConstraint, findVersionCrossings, versionSatisfies, brandProgressBar } from './chunk-
|
|
4
|
+
import { loadAdvancedScanHook, baselineCommand } from './chunk-WHQRV66O.js';
|
|
5
|
+
import { ensureDir, pathExists, writeDefaultConfig, parseDsn, detectVcs, computeRepoFingerprint, resolveRepositoryName, fetchScanPreflight, runCoreScan, VERSION, readJsonFile, writeTextFile, prepareCompressedUpload, titleBox, driftBar, gitHistoryAvailable, buildVersionTimelines, findPackageAnyEcosystem, normalizeConstraint, findVersionCrossings, versionSatisfies, brandProgressBar } from './chunk-YN5OGRWU.js';
|
|
6
6
|
import './chunk-RXP66R2E.js';
|
|
7
7
|
import { pathExists as pathExists$1, parseExcludePatterns } from './chunk-GI6W53LM.js';
|
|
8
8
|
import * as fs4 from 'fs';
|
|
@@ -228,18 +228,20 @@ async function runBuild(paths, opts, global) {
|
|
|
228
228
|
function maybeWarmEmbeddings(root, graph, global, warm) {
|
|
229
229
|
if (!warm || global.json || global.quiet || global.local) return;
|
|
230
230
|
if (!process.stdout.isTTY && !process.stderr.isTTY) return;
|
|
231
|
-
const modelId = resolveEmbedModel();
|
|
232
|
-
if (!isModelReady(modelId)) return;
|
|
233
|
-
if (countPending(graph, root, modelId) === 0) return;
|
|
234
231
|
const cli = process.argv[1];
|
|
235
232
|
if (!cli) return;
|
|
233
|
+
const modelId = resolveEmbedModel();
|
|
234
|
+
const ready = isModelReady(modelId);
|
|
235
|
+
if (ready && countPending(graph, root, modelId) === 0) return;
|
|
236
|
+
const args = ready ? [cli, "embed", "-C", root, "--bg"] : [cli, "embed", "-C", root, "--bg", "--download"];
|
|
236
237
|
try {
|
|
237
|
-
const child = spawn(process.execPath,
|
|
238
|
-
detached: true,
|
|
239
|
-
stdio: "ignore"
|
|
240
|
-
});
|
|
238
|
+
const child = spawn(process.execPath, args, { detached: true, stdio: "ignore" });
|
|
241
239
|
child.unref();
|
|
242
|
-
info(
|
|
240
|
+
info(
|
|
241
|
+
c.dim(
|
|
242
|
+
ready ? " warming the semantic index in the background \u2014 `vg ask` will be instant" : " downloading the semantic model in the background (once) \u2014 `vg ask`/`vg serve` will be instant; disable with --no-warm"
|
|
243
|
+
)
|
|
244
|
+
);
|
|
243
245
|
} catch {
|
|
244
246
|
}
|
|
245
247
|
}
|
|
@@ -456,7 +458,7 @@ function mb(bytes) {
|
|
|
456
458
|
return `${Math.round(bytes / (1024 * 1024))} MB`;
|
|
457
459
|
}
|
|
458
460
|
function registerEmbed(program) {
|
|
459
|
-
const cmd = program.command("embed").description("precompute the semantic index for instant `vg ask` (or --where / --clear)").option("--where", "show where the model is cached, and its size").option("--clear", "remove the downloaded model from the shared cache").addOption(new Option("--bg").hideHelp()).action(async function(opts) {
|
|
461
|
+
const cmd = program.command("embed").description("precompute the semantic index for instant `vg ask` (or --where / --clear)").option("--where", "show where the model is cached, and its size").option("--clear", "remove the downloaded model from the shared cache").addOption(new Option("--bg").hideHelp()).addOption(new Option("--download").hideHelp()).action(async function(opts) {
|
|
460
462
|
const global = readGlobal(this);
|
|
461
463
|
const modelId = resolveEmbedModel();
|
|
462
464
|
if (opts.where) return showWhere(rootOf(global), modelId, global.json);
|
|
@@ -477,8 +479,10 @@ function registerEmbed(program) {
|
|
|
477
479
|
let reason;
|
|
478
480
|
const embedder = await loadEmbedder({
|
|
479
481
|
local: global.local,
|
|
480
|
-
|
|
481
|
-
//
|
|
482
|
+
// Background warm-ups skip the download unless explicitly asked to fetch
|
|
483
|
+
// (`--bg --download`, spawned by `vg build` so the model is ready by the
|
|
484
|
+
// time `vg serve`/`vg ask` needs it).
|
|
485
|
+
noDownload: bg && opts.download !== true,
|
|
482
486
|
showDownloadProgress: !bg,
|
|
483
487
|
onUnavailable: (r) => reason = r
|
|
484
488
|
});
|
|
@@ -912,8 +916,9 @@ function registerInstall(program) {
|
|
|
912
916
|
const smallRepo = graph !== null && fileCount > 0 && fileCount < SMALL_REPO_FILES;
|
|
913
917
|
const launch = detectServeLaunch();
|
|
914
918
|
const results = targets.map((a) => ({ id: a.id, ...installAssistant(a, { root, hook: opts.hook, smallRepo, launch }) }));
|
|
919
|
+
const navConfig = writeNavigationConfig(root);
|
|
915
920
|
if (global.json) {
|
|
916
|
-
json({ root, smallRepo, launch: { command: launch.command, args: launch.args, note: launch.note ?? null }, results });
|
|
921
|
+
json({ root, smallRepo, navConfig, launch: { command: launch.command, args: launch.args, note: launch.note ?? null }, results });
|
|
917
922
|
return;
|
|
918
923
|
}
|
|
919
924
|
for (const r of results) {
|
|
@@ -921,6 +926,7 @@ function registerInstall(program) {
|
|
|
921
926
|
}
|
|
922
927
|
if (launch.note && results.some((r) => r.note)) info(`${c.yellow("!")} ${launch.note}`);
|
|
923
928
|
if (smallRepo) info(c.dim(` note: small repo (${fileCount} files) \u2014 nudge says searching is fine; vg is still used for impact/tests`));
|
|
929
|
+
info(c.dim(` wrote ${navConfig} \u2014 deferred-loading config for Claude-API agents (lower per-step token cost)`));
|
|
924
930
|
info(c.dim(" run `vg serve` is wired via MCP; build the map with `vg` if you have not yet"));
|
|
925
931
|
});
|
|
926
932
|
applyGlobalOptions(install);
|
|
@@ -1941,7 +1947,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
1941
1947
|
console.log(chalk5.green("\u2714") + ` Created ${chalk5.bold("vibgrate.config.ts")}`);
|
|
1942
1948
|
}
|
|
1943
1949
|
if (opts.baseline) {
|
|
1944
|
-
const { runBaseline } = await import('./baseline-
|
|
1950
|
+
const { runBaseline } = await import('./baseline-64EUPWUH.js');
|
|
1945
1951
|
await runBaseline(rootDir);
|
|
1946
1952
|
}
|
|
1947
1953
|
console.log("");
|