@vibgrate/cli 2026.717.1 → 2026.718.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/README.md +26 -0
- package/dist/baseline-DKPQWOQ6.js +6 -0
- package/dist/{baseline-YWGSHCKW.js.map → baseline-DKPQWOQ6.js.map} +1 -1
- package/dist/{chunk-WZNIDXZP.js → chunk-BFXDF6ZE.js} +3 -3
- package/dist/{chunk-WZNIDXZP.js.map → chunk-BFXDF6ZE.js.map} +1 -1
- package/dist/{chunk-L42NVMD6.js → chunk-H5M7CXE6.js} +35 -12
- package/dist/chunk-H5M7CXE6.js.map +1 -0
- package/dist/{chunk-M62BGJMK.js → chunk-RME7BFMU.js} +3 -3
- package/dist/{chunk-M62BGJMK.js.map → chunk-RME7BFMU.js.map} +1 -1
- package/dist/cli.js +192 -12
- 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-YWGSHCKW.js +0 -6
- package/dist/chunk-L42NVMD6.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hashString, langById, shortId, canonicalize, grammarSetVersion, hashBytes, langForExtension, setGrammarsOverride, parseSource } from './chunk-VFO5UDAT.js';
|
|
2
|
-
import { writeTextFile, pathExists, readJsonFile, loadConfig, computeUpgradeImpact, getChangelogSignals, gitHistoryAvailable, buildVersionTimelines, findPackageTimeline, severityRank, projectTypeToVulnEcosystem, VERSION } from './chunk-
|
|
2
|
+
import { writeTextFile, pathExists, readJsonFile, loadConfig, computeUpgradeImpact, getChangelogSignals, gitHistoryAvailable, buildVersionTimelines, findPackageTimeline, severityRank, projectTypeToVulnEcosystem, VERSION } from './chunk-RME7BFMU.js';
|
|
3
3
|
import * as fs19 from 'fs';
|
|
4
4
|
import { spawnSync, execFileSync } from 'child_process';
|
|
5
5
|
import * as path19 from 'path';
|
|
@@ -6596,11 +6596,14 @@ var TOOLS = [
|
|
|
6596
6596
|
},
|
|
6597
6597
|
{
|
|
6598
6598
|
name: "resolve_library",
|
|
6599
|
-
description: "Resolve a library to its canonical id and the version YOUR project uses (drift-annotated).",
|
|
6599
|
+
description: "Resolve a library to its canonical id and the version YOUR project uses (drift-annotated). Call once per library and reuse the returned targetId for every library_docs follow-up \u2014 never guess an id.",
|
|
6600
6600
|
// Canonical §4: `query` (+ optional `context_project`). `name` kept as a back-compat alias.
|
|
6601
6601
|
inputSchema: obj(
|
|
6602
6602
|
{
|
|
6603
|
-
query: {
|
|
6603
|
+
query: {
|
|
6604
|
+
type: "string",
|
|
6605
|
+
description: 'the package name as written in the dependency file. Good: "react-hook-form". Bad: "forms"'
|
|
6606
|
+
},
|
|
6604
6607
|
name: { type: "string" },
|
|
6605
6608
|
context_project: { type: "string" }
|
|
6606
6609
|
},
|
|
@@ -6645,17 +6648,22 @@ var TOOLS = [
|
|
|
6645
6648
|
},
|
|
6646
6649
|
{
|
|
6647
6650
|
name: "library_docs",
|
|
6648
|
-
description: "Version-correct usage docs for a library, sliced to a token budget.",
|
|
6651
|
+
description: "Version-correct usage docs for a library, sliced to a token budget \u2014 official content matched to the version this project has installed, not web-search results. Ask a focused question via query; one call usually answers. After 2 calls without the section you need, stop and read the package source under node_modules instead of searching again.",
|
|
6649
6652
|
// Canonical §4: `targetId`/`query`, `verbosity`, `max_tokens`. `name`/`tokens` kept as aliases.
|
|
6650
6653
|
inputSchema: obj(
|
|
6651
6654
|
{
|
|
6652
|
-
targetId: { type: "string", description: "id from resolve_library" },
|
|
6653
|
-
query: {
|
|
6655
|
+
targetId: { type: "string", description: "id from resolve_library (preferred over query)" },
|
|
6656
|
+
query: {
|
|
6657
|
+
type: "string",
|
|
6658
|
+
description: 'the library plus the specific need. Good: "zod refine custom error message". Bad: "zod" or "docs"'
|
|
6659
|
+
},
|
|
6654
6660
|
name: { type: "string" },
|
|
6655
6661
|
context_project: { type: "string" },
|
|
6656
6662
|
verbosity: { type: "string", enum: ["concise", "balanced", "exhaustive"] },
|
|
6657
|
-
|
|
6658
|
-
|
|
6663
|
+
// Tolerant on purpose: models often send budgets as strings — the
|
|
6664
|
+
// handler coerces, so don't fail validation over "4000" vs 4000.
|
|
6665
|
+
max_tokens: { type: ["number", "string"], description: "token budget (a numeric string is accepted)" },
|
|
6666
|
+
tokens: { type: ["number", "string"] },
|
|
6659
6667
|
enterprise_strict: { type: "boolean" },
|
|
6660
6668
|
follow_up: { type: "boolean" }
|
|
6661
6669
|
},
|
|
@@ -6881,7 +6889,7 @@ function createServer(source, opts = {}) {
|
|
|
6881
6889
|
// Routing guidance once at the server level (hosts that surface
|
|
6882
6890
|
// `instructions` get it at zero per-step schema cost): the flashlight
|
|
6883
6891
|
// vs the map.
|
|
6884
|
-
instructions: 'vg is a code map. Use search_symbols to find a known name or literal string fast \u2014 a multi-word/quoted phrase runs a complete literal sweep and reports totalTextMatches, so reach for it instead of grep even for plain-string "find every occurrence" lookups. Use orient/query_graph for meaning: symptoms, relationships, and what-breaks-if. Responses are concise by default; pass response_format:"detailed" only when a node proves load-bearing. Navigate as little as possible: one good search/query usually locates the code. As soon as you have the file and line, read that file and make the edit \u2014 do not call further graph tools unless the edit fails or the match was wrong.'
|
|
6892
|
+
instructions: 'vg is a code map. Use search_symbols to find a known name or literal string fast \u2014 a multi-word/quoted phrase runs a complete literal sweep and reports totalTextMatches, so reach for it instead of grep even for plain-string "find every occurrence" lookups. Use orient/query_graph for meaning: symptoms, relationships, and what-breaks-if. Responses are concise by default; pass response_format:"detailed" only when a node proves load-bearing. Navigate as little as possible: one good search/query usually locates the code. As soon as you have the file and line, read that file and make the edit \u2014 do not call further graph tools unless the edit fails or the match was wrong. For how-do-I-use-this-library questions call resolve_library once, then library_docs with the returned targetId and a focused query: the docs are official and matched to the version THIS project has installed (drift-annotated) \u2014 prefer them over web search or training-data recall when they conflict. Skip them for language built-ins or APIs already shown in context. If two library_docs calls have not surfaced the section you need, read the package source under node_modules instead of searching again.'
|
|
6885
6893
|
}
|
|
6886
6894
|
);
|
|
6887
6895
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
@@ -7043,6 +7051,21 @@ tools improved):
|
|
|
7043
7051
|
- **Version-correct docs:** \`vg lib <name>\` returns drift-annotated, version-
|
|
7044
7052
|
specific usage docs for a library \u2014 inject these instead of guessing an API.
|
|
7045
7053
|
|
|
7054
|
+
### Library-docs discipline
|
|
7055
|
+
|
|
7056
|
+
When a task needs a library's API, use the docs tools before web search or
|
|
7057
|
+
training-data recall \u2014 they are official content matched to the version **this
|
|
7058
|
+
project has installed**, and they win when the two conflict.
|
|
7059
|
+
|
|
7060
|
+
- **Workflow:** \`resolve_library\` once per library, then \`library_docs\` with the
|
|
7061
|
+
returned \`targetId\` and a focused query (good: "zod refine custom error
|
|
7062
|
+
message"; bad: "zod"). Never guess a targetId.
|
|
7063
|
+
- **Budget:** at most **3 docs calls per task**. If 2 \`library_docs\` calls have
|
|
7064
|
+
not surfaced the section you need, read the package source under
|
|
7065
|
+
\`node_modules\` instead of searching again.
|
|
7066
|
+
- **Skip the docs tools** for language built-ins, stable well-known syntax, or
|
|
7067
|
+
an API already shown in the current context \u2014 they add nothing there.
|
|
7068
|
+
|
|
7046
7069
|
## Keep it fresh
|
|
7047
7070
|
|
|
7048
7071
|
The map keeps itself fresh: \`vg ask\` and the MCP tools detect changed files
|
|
@@ -7541,6 +7564,6 @@ function spdx(ctx) {
|
|
|
7541
7564
|
return JSON.stringify(doc, null, 2) + "\n";
|
|
7542
7565
|
}
|
|
7543
7566
|
|
|
7544
|
-
export { ASSISTANTS, CLI_TOOL_ALIASES, CliError, ECOSYSTEMS, ExitCode, FREE_PACK, GraphIndex, GraphSource, NPX_INVOCATION, ResourceLimitError, SCHEMA_VERSION, SKIP_DIRS, SKIP_FILES, TOOLS, UsageError, addLibrary, analyze, applyCoverage, applyStaticTestLinkage, assessDocQuality, assistantById, availableRegionIds, buildFacts, buildGraph, buildModuleResolver, cacheDir, catalogPath, clearModelCache, clearStoredCredentials, cosine, countPending, countTokens, coveringTests, createServer, createWorkspaceDsn, credentialsPath, dashHostForIngestHost, decodeScipIndex, defaultGraphPath, detectAssistants, detectRunner, detectServeLaunch, discover, discoverModels, driftCount, driftFor, dsnCommand, embeddingsCached, enrichOnline, ensureGitignored, epistemicBreakdown, exportGraph, fetchHostedDocsCached, findGitRoot, findNodes, formatForExt, getNodeEmbeddings, gitignoreEntryForCredentials, groundGraph, hasDrift, identifierParts, impactOf, indexFor, ingestHostForRegionId, installAssistant, inventory, isModelReady, isTestFile, libDir, libId, loadCatalog, loadCoverage, loadEmbedder, loadGraph, loadSnapshot, localApiSurface, localPackageDocs, modelCacheInfo, nodeById, nodeEmbedText, parseDsn, parseGraph, parseJsonc, probeFreshness, publishPrivateLibrary, pushCommand, queryGraph, queryGraphSemantic, readDoc, readSavings, readScanArtifact, readUsage, recordCliCall, recordSaving, refreshIfStale, relativeResolver, renderHtml, renderReport, resolveCliInvocation, resolveDsn, resolveEmbedModel, resolveIngestHost, resolveLib, resolveLimits, resolveOne, resolveVersion, saveCatalog, savingsRecorded, scipEdges, selectForBudget, serializeGraph, serveStdio, shortestPath, stableStringify, symbolsFromApi, testsToRun, unavailableMessage, uninstallAssistant, uploadScanArtifact, usageError, verifyDeterminism, vibgrateDir, writeArtifacts, writeNavigationConfig, writeSnapshot, writeStoredCredentials };
|
|
7545
|
-
//# sourceMappingURL=chunk-
|
|
7546
|
-
//# sourceMappingURL=chunk-
|
|
7567
|
+
export { ASSISTANTS, CLI_TOOL_ALIASES, CliError, ECOSYSTEMS, ExitCode, FREE_PACK, GraphIndex, GraphSource, NPX_INVOCATION, ResourceLimitError, SCHEMA_VERSION, SKIP_DIRS, SKIP_FILES, TOOLS, UsageError, addLibrary, analyze, applyCoverage, applyStaticTestLinkage, assessDocQuality, assistantById, availableRegionIds, buildFacts, buildGraph, buildModuleResolver, cacheDir, catalogPath, clearModelCache, clearStoredCredentials, cosine, countPending, countTokens, coveringTests, createServer, createWorkspaceDsn, credentialsPath, dashHostForIngestHost, decodeScipIndex, defaultGraphPath, detectAssistants, detectRunner, detectServeLaunch, discover, discoverModels, driftCount, driftFor, dsnCommand, embeddingsCached, enrichOnline, ensureGitignored, epistemicBreakdown, exportGraph, fetchHostedDocsCached, findGitRoot, findNodes, formatForExt, getNodeEmbeddings, gitignoreEntryForCredentials, groundGraph, hasDrift, homeCredentialsPath, hostedBase, identifierParts, impactOf, indexFor, ingestHostForRegionId, installAssistant, inventory, isModelReady, isTestFile, libDir, libId, loadCatalog, loadCoverage, loadEmbedder, loadGraph, loadSnapshot, localApiSurface, localPackageDocs, modelCacheInfo, nodeById, nodeEmbedText, parseDsn, parseGraph, parseJsonc, probeFreshness, projectCredentialsPath, publishPrivateLibrary, pushCommand, queryGraph, queryGraphSemantic, readDoc, readSavings, readScanArtifact, readStoredCredentials, readUsage, recordCliCall, recordSaving, refreshIfStale, relativeResolver, renderHtml, renderReport, resolveCliInvocation, resolveDsn, resolveEmbedModel, resolveIngestHost, resolveLib, resolveLimits, resolveOne, resolveVersion, saveCatalog, savingsRecorded, scipEdges, selectForBudget, serializeGraph, serveStdio, shortestPath, stableStringify, symbolsFromApi, testsToRun, unavailableMessage, uninstallAssistant, uploadScanArtifact, usageError, verifyDeterminism, vibgrateDir, writeArtifacts, writeNavigationConfig, writeSnapshot, writeStoredCredentials };
|
|
7568
|
+
//# sourceMappingURL=chunk-H5M7CXE6.js.map
|
|
7569
|
+
//# sourceMappingURL=chunk-H5M7CXE6.js.map
|