@vibgrate/cli 2026.703.5 → 2026.703.7
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-HBRBXJHJ.js +6 -0
- package/dist/{baseline-AQKQEA2O.js.map → baseline-HBRBXJHJ.js.map} +1 -1
- package/dist/{chunk-L7YBNIBF.js → chunk-QWS7M7DG.js} +16 -16
- package/dist/chunk-QWS7M7DG.js.map +1 -0
- package/dist/{chunk-4M2MUQRO.js → chunk-UPPWLMVD.js} +130 -16
- package/dist/chunk-UPPWLMVD.js.map +1 -0
- package/dist/{chunk-W2QP2YH6.js → chunk-WGXDYBAN.js} +231 -205
- package/dist/chunk-WGXDYBAN.js.map +1 -0
- package/dist/{chunk-6T3R7RF2.js → chunk-ZNVLRKWK.js} +3 -3
- package/dist/{chunk-6T3R7RF2.js.map → chunk-ZNVLRKWK.js.map} +1 -1
- package/dist/cli.js +35 -17
- package/dist/cli.js.map +1 -1
- package/dist/{fs-7KZ4F3SB.js → fs-DSQZWBO5.js} +3 -3
- package/dist/fs-DSQZWBO5.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/baseline-AQKQEA2O.js +0 -6
- package/dist/chunk-4M2MUQRO.js.map +0 -1
- package/dist/chunk-L7YBNIBF.js.map +0 -1
- package/dist/chunk-W2QP2YH6.js.map +0 -1
- package/dist/fs-7KZ4F3SB.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runCoreScan, writeJsonFile } from './chunk-
|
|
1
|
+
import { runCoreScan, writeJsonFile } from './chunk-QWS7M7DG.js';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import { Command } from 'commander';
|
|
4
4
|
import chalk from 'chalk';
|
|
@@ -27,5 +27,5 @@ var baselineCommand = new Command("baseline").description("Create a drift baseli
|
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
export { baselineCommand, loadAdvancedScanHook, runBaseline };
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-ZNVLRKWK.js.map
|
|
31
|
+
//# sourceMappingURL=chunk-ZNVLRKWK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/reporting/advanced-hook.ts","../src/reporting/commands/baseline.ts"],"names":[],"mappings":";;;;;;AAUA,eAAsB,oBAAA,GAA8D;AAClF,EAAA,OAAO,MAAA;AACT;;;ACLA,eAAsB,YAAY,OAAA,EAAgC;AAChE,EAAA,OAAA,CAAQ,GAAA,CAAI,KAAA,CAAM,GAAA,CAAI,sBAAsB,CAAC,CAAA;AAE7C,EAAA,MAAM,QAAA,GAAW,MAAM,oBAAA,EAAqB;AAC5C,EAAA,MAAM,QAAA,GAAW,MAAM,WAAA,CAAY,OAAA,EAAS;AAAA,IAC1C,MAAA,EAAQ,MAAA;AAAA,IACR,WAAA,EAAa;AAAA,KACZ,QAAQ,CAAA;AAEX,EAAA,MAAM,YAAA,GAAoB,IAAA,CAAA,IAAA,CAAK,OAAA,EAAS,WAAA,EAAa,eAAe,CAAA;AACpE,EAAA,MAAM,aAAA,CAAc,cAAc,QAAQ,CAAA;AAC1C,EAAA,OAAA,CAAQ,GAAA,CAAI,KAAA,CAAM,KAAA,CAAM,QAAG,CAAA,GAAI,sBAAsB,KAAA,CAAM,IAAA,CAAK,yBAAyB,CAAC,CAAA,CAAE,CAAA;AAC5F,EAAA,OAAA,CAAQ,GAAA,CAAI,MAAM,GAAA,CAAI,CAAA,kBAAA,EAAqB,SAAS,KAAA,CAAM,KAAK,MAAM,CAAC,CAAA;AACxE;AAEO,IAAM,eAAA,GAAkB,IAAI,OAAA,CAAQ,UAAU,EAClD,WAAA,CAAY,kCAAkC,CAAA,CAC9C,QAAA,CAAS,UAAU,kBAAA,EAAoB,GAAG,CAAA,CAC1C,MAAA,CAAO,OAAO,UAAA,KAAuB;AACpC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B,CAAC","file":"chunk-ZNVLRKWK.js","sourcesContent":["import type { AdvancedScanHook } from '../core-open/index.js';\n\n/**\n * Open build: there is no proprietary advanced-analysis hook.\n *\n * In the public, Apache-2.0 distribution every reporting command runs purely on\n * the open base engine (`runCoreScan` from `@vibgrate/core-open`). This shim\n * keeps the call sites in `scan`/`baseline` unchanged while always resolving to\n * `undefined`, so the scan falls back to the open base engine.\n */\nexport async function loadAdvancedScanHook(): Promise<AdvancedScanHook | undefined> {\n return undefined;\n}\n","import * as path from 'node:path';\nimport { Command } from 'commander';\nimport chalk from 'chalk';\nimport { runCoreScan } from '../../core-open/index.js';\nimport { writeJsonFile } from '../utils/fs.js';\nimport { loadAdvancedScanHook } from '../advanced-hook.js';\n\nexport async function runBaseline(rootDir: string): Promise<void> {\n console.log(chalk.dim('Creating baseline...'));\n\n const advanced = await loadAdvancedScanHook();\n const artifact = await runCoreScan(rootDir, {\n format: 'text',\n concurrency: 8,\n }, advanced);\n\n const baselinePath = path.join(rootDir, '.vibgrate', 'baseline.json');\n await writeJsonFile(baselinePath, artifact);\n console.log(chalk.green('✔') + ` Baseline saved to ${chalk.bold('.vibgrate/baseline.json')}`);\n console.log(chalk.dim(` Baseline score: ${artifact.drift.score}/100`));\n}\n\nexport const baselineCommand = new Command('baseline')\n .description('Create a drift baseline snapshot')\n .argument('[path]', 'Path to baseline', '.')\n .action(async (targetPath: string) => {\n const rootDir = path.resolve(targetPath);\n await runBaseline(rootDir);\n });\n"]}
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { resolveDsn, resolveIngestHost, dashHostForIngestHost, availableRegionIds, createWorkspaceDsn, writeStoredCredentials, credentialsPath, findGitRoot, ensureGitignored, gitignoreEntryForCredentials, clearStoredCredentials, inventory, uploadScanArtifact, dsnCommand, pushCommand, ExitCode, CliError, 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, buildGraph, serializeGraph, coveringTests, FREE_PACK, readScanArtifact, enrichOnline, ECOSYSTEMS, discoverModels, readSavings, exportGraph, catalogPath, libDir, stableStringify, writeArtifacts, writeSnapshot, UsageError, cacheDir, probeFreshness, discover, vibgrateDir, modelCacheInfo, clearModelCache, GraphSource, createServer, assistantById, 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, uninstallAssistant, buildGraph, serializeGraph, coveringTests, FREE_PACK, readScanArtifact, enrichOnline, ECOSYSTEMS, discoverModels, readSavings, exportGraph, catalogPath, libDir, stableStringify, writeArtifacts, writeSnapshot, UsageError, cacheDir, probeFreshness, discover, vibgrateDir, modelCacheInfo, clearModelCache, GraphSource, createServer, assistantById, loadCatalog, driftFor, addLibrary, parseDsn as parseDsn$1, publishPrivateLibrary, resolveLib, libId, resolveVersion, readDoc, localPackageDocs, localApiSurface, assessDocQuality, symbolsFromApi, fetchHostedDocs, selectForBudget, formatForExt, renderHtml, isModelReady } from './chunk-WGXDYBAN.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-ZNVLRKWK.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-QWS7M7DG.js';
|
|
6
6
|
import './chunk-RXP66R2E.js';
|
|
7
|
-
import { pathExists as pathExists$1, parseExcludePatterns } from './chunk-
|
|
7
|
+
import { pathExists as pathExists$1, parseExcludePatterns } from './chunk-UPPWLMVD.js';
|
|
8
8
|
import * as fs4 from 'fs';
|
|
9
9
|
import fs4__default, { realpathSync } from 'fs';
|
|
10
10
|
import * as path9 from 'path';
|
|
@@ -1882,7 +1882,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
1882
1882
|
console.log(chalk5.green("\u2714") + ` Created ${chalk5.bold("vibgrate.config.ts")}`);
|
|
1883
1883
|
}
|
|
1884
1884
|
if (opts.baseline) {
|
|
1885
|
-
const { runBaseline } = await import('./baseline-
|
|
1885
|
+
const { runBaseline } = await import('./baseline-HBRBXJHJ.js');
|
|
1886
1886
|
await runBaseline(rootDir);
|
|
1887
1887
|
}
|
|
1888
1888
|
console.log("");
|
|
@@ -1925,7 +1925,9 @@ async function detectAiAssistant(rootDir) {
|
|
|
1925
1925
|
function printAiContextPrompt(detectedAssistant) {
|
|
1926
1926
|
const teal2 = chalk5.hex("#3FB0A4");
|
|
1927
1927
|
const mint2 = chalk5.hex("#4FE3C1");
|
|
1928
|
-
const
|
|
1928
|
+
const cli = resolveCliInvocation();
|
|
1929
|
+
const installArgs = detectedAssistant ? `install ${detectedAssistant}` : "install --all";
|
|
1930
|
+
const installCmd = `${cli} ${installArgs}`;
|
|
1929
1931
|
const detectedNote = detectedAssistant ? chalk5.dim(` (${detectedAssistant} config detected)`) : "";
|
|
1930
1932
|
console.log("");
|
|
1931
1933
|
console.log(teal2(" \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
|
|
@@ -2172,7 +2174,10 @@ var scanCommand = new Command("scan").description("Scan a project for upgrade dr
|
|
|
2172
2174
|
projectScanTimeout: opts.projectScanTimeout ? parseInt(opts.projectScanTimeout, 10) || void 0 : void 0,
|
|
2173
2175
|
repositoryName: opts.repositoryName?.trim() || void 0,
|
|
2174
2176
|
force: opts.force,
|
|
2175
|
-
quiet: opts.quiet
|
|
2177
|
+
quiet: opts.quiet,
|
|
2178
|
+
// Prefix for the upsell panel's `login → push` hint — `vg` when installed,
|
|
2179
|
+
// `npx @vibgrate/cli` when the user ran via npx (where bare `vg` fails).
|
|
2180
|
+
invocation: resolveCliInvocation()
|
|
2176
2181
|
};
|
|
2177
2182
|
const wantGraph = shouldBuildCodeMap({ graph: opts.graph, maxPrivacy: opts.maxPrivacy, noLocalArtifacts });
|
|
2178
2183
|
if (wantGraph) {
|
|
@@ -2984,7 +2989,14 @@ function openUrl(url) {
|
|
|
2984
2989
|
|
|
2985
2990
|
// src/reporting/commands/login.ts
|
|
2986
2991
|
var delay = (ms) => new Promise((resolve15) => setTimeout(resolve15, ms));
|
|
2987
|
-
|
|
2992
|
+
function isInside(dir, file) {
|
|
2993
|
+
const rel2 = path9.relative(dir, file);
|
|
2994
|
+
return !!rel2 && !rel2.startsWith("..") && !path9.isAbsolute(rel2);
|
|
2995
|
+
}
|
|
2996
|
+
var loginCommand = new Command("login").description("Authenticate the CLI with your Vibgrate workspace via the browser").option("--ingest <url>", "Ingest API URL (overrides --region)").option("--region <region>", `Data residency region (${availableRegionIds().join(", ")})`, "us").option("--no-browser", "Do not attempt to open a browser automatically").option(
|
|
2997
|
+
"--local",
|
|
2998
|
+
"Store credentials in this project (.vibgrate/credentials.json) instead of ~/.vibgrate"
|
|
2999
|
+
).action(async (opts) => {
|
|
2988
3000
|
let ingestHost;
|
|
2989
3001
|
try {
|
|
2990
3002
|
ingestHost = resolveIngestHost(opts.region, opts.ingest);
|
|
@@ -3073,17 +3085,19 @@ var loginCommand = new Command("login").description("Authenticate the CLI with y
|
|
|
3073
3085
|
process.exit(1);
|
|
3074
3086
|
}
|
|
3075
3087
|
}
|
|
3076
|
-
|
|
3088
|
+
const storeOpts = { local: opts.local === true };
|
|
3089
|
+
writeStoredCredentials(creds, storeOpts);
|
|
3090
|
+
const credsFile = credentialsPath(storeOpts);
|
|
3077
3091
|
console.log("");
|
|
3078
3092
|
console.log(chalk5.green("\u2714") + " Logged in.");
|
|
3079
3093
|
if (creds.workspaceId) {
|
|
3080
3094
|
console.log(" Workspace: " + chalk5.bold(creds.workspaceId));
|
|
3081
3095
|
}
|
|
3082
|
-
console.log(chalk5.dim(` Credentials saved to ${
|
|
3096
|
+
console.log(chalk5.dim(` Credentials saved to ${credsFile}`));
|
|
3083
3097
|
try {
|
|
3084
3098
|
const root = findGitRoot();
|
|
3085
|
-
if (root) {
|
|
3086
|
-
const res = ensureGitignored(gitignoreEntryForCredentials(root), root);
|
|
3099
|
+
if (root && isInside(root, credsFile)) {
|
|
3100
|
+
const res = ensureGitignored(gitignoreEntryForCredentials(root, credsFile), root);
|
|
3087
3101
|
if (res.status === "created") {
|
|
3088
3102
|
console.log(chalk5.dim(` Created .gitignore and ignored ${res.entry}`));
|
|
3089
3103
|
} else if (res.status === "added") {
|
|
@@ -3092,7 +3106,7 @@ var loginCommand = new Command("login").description("Authenticate the CLI with y
|
|
|
3092
3106
|
}
|
|
3093
3107
|
} catch {
|
|
3094
3108
|
}
|
|
3095
|
-
console.log(chalk5.dim(
|
|
3109
|
+
console.log(chalk5.dim(` You can now run "${resolveCliInvocation()} scan --push".`));
|
|
3096
3110
|
return;
|
|
3097
3111
|
}
|
|
3098
3112
|
if (token.status === "access_denied") {
|
|
@@ -3650,10 +3664,14 @@ function buildProgram() {
|
|
|
3650
3664
|
const program = new Command();
|
|
3651
3665
|
program.name("vg").description(
|
|
3652
3666
|
"vg \u2014 local codebase intelligence for AI coding agents: a deterministic, no-API-key code graph + MCP server, drift reporting, and version-correct library docs"
|
|
3653
|
-
).version(VERSION, "--version", "output the version number").showSuggestionAfterError(true).addHelpText(
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3667
|
+
).version(VERSION, "--version", "output the version number").showSuggestionAfterError(true).addHelpText("after", () => {
|
|
3668
|
+
const cli = resolveCliInvocation();
|
|
3669
|
+
const aliasNote = cli === "vg" ? "The `vibgrate` command is an alias for `vg`.\n" : cli === NPX_INVOCATION ? "Install globally (`npm i -g @vibgrate/cli`) to use the shorter `vg` command.\n" : "";
|
|
3670
|
+
return `
|
|
3671
|
+
Run \`${cli}\` to scan + map the current folder, \`${cli} "<question>"\` to ask, \`${cli} status\`/\`${cli} verify\` for state.
|
|
3672
|
+
Drift: \`${cli} scan\` / \`${cli} report\`. Wire into your AI agent: \`${cli} install\`.
|
|
3673
|
+
${aliasNote}Docs: https://vibgrate.com/help`;
|
|
3674
|
+
});
|
|
3657
3675
|
registerBuild(program);
|
|
3658
3676
|
registerStatus(program);
|
|
3659
3677
|
registerVerify(program);
|