@vibgrate/cli 2026.720.2 → 2026.720.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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { G as GraphNode, a as GraphEdge, A as Area, R as ResolverKind, V as VgGr
2
2
  export { C as Centrality, D as DerivedBy, e as EpistemicTier, f as FactConfidence, g as FactKind, h as GraphMeta, N as NodeKind, P as Provenance, S as SCHEMA_VERSION, i as Span, T as Toolchain, U as Unknown } from './types-BgNa-FZQ.js';
3
3
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
4
4
 
5
- declare const VERSION = "2026.720.2";
5
+ declare const VERSION = "2026.720.3";
6
6
 
7
7
  /**
8
8
  * Analysis stage: importance, centrality, hubs, communities, and surprise.
@@ -660,11 +660,14 @@ declare function readSavings(root: string, days: number, now: number, ratePerM?:
660
660
  * ledger by ./ledger-tail.ts, so agents that shell out to `vg` instead of
661
661
  * calling MCP tools still show up here.
662
662
  *
663
- * Privacy: everything here lives and dies with the process — nothing is
663
+ * Privacy: everything here lives and dies with the serve session — nothing is
664
664
  * persisted or uploaded, so the display is always on (GUARDRAILS §3.4 applies
665
665
  * to the opt-in ledger/upload, which remain separate and off by default).
666
666
  * Counts only — never code, paths beyond what the operator already sees, or
667
- * question text.
667
+ * question text. Sibling serve processes in the same repo (an assistant's own
668
+ * spawned stdio server) surface their counts to a TTY display through the
669
+ * ephemeral live-stats bus (./live-stats.ts) — same counts-only data, swept
670
+ * on exit.
668
671
  *
669
672
  * Output discipline: stderr only. Under stdio transport, stdout IS the MCP
670
673
  * protocol stream and carries nothing else.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { ASSISTANTS, FREE_PACK, GraphIndex, GraphSource, ResourceLimitError, SCHEMA_VERSION, SKIP_DIRS, SKIP_FILES, TOOLS, UsageError, addLibrary, analyze, applyCoverage, applyStaticTestLinkage, assistantById, buildFacts, buildGraph, buildModuleResolver, cosine, coveringTests, createServer, decodeScipIndex, defaultGraphPath, inventory as dependencyInventory, detectRunner, discover, discoverModels, driftCount, driftFor, enrichOnline, exportGraph, findNodes, formatForExt, getNodeEmbeddings, groundGraph, hasDrift, identifierParts, impactOf, installAssistant, isTestFile, libId, loadCatalog, loadCoverage, loadEmbedder, loadGraph, loadSnapshot, nodeById, nodeEmbedText, parseGraph, parseJsonc, probeFreshness, queryGraph, queryGraphSemantic, readDoc, readSavings, recordSaving, refreshIfStale, relativeResolver, renderHtml, renderReport, resolveLib, resolveLimits, resolveOne, saveCatalog, savingsRecorded, scipEdges, serializeGraph, serveStdio, shortestPath, stableStringify, testsToRun, uninstallAssistant, verifyDeterminism, vibgrateDir, writeArtifacts, writeSnapshot } from './chunk-7R4O5CZD.js';
1
+ export { ASSISTANTS, FREE_PACK, GraphIndex, GraphSource, ResourceLimitError, SCHEMA_VERSION, SKIP_DIRS, SKIP_FILES, TOOLS, UsageError, addLibrary, analyze, applyCoverage, applyStaticTestLinkage, assistantById, buildFacts, buildGraph, buildModuleResolver, cosine, coveringTests, createServer, decodeScipIndex, defaultGraphPath, inventory as dependencyInventory, detectRunner, discover, discoverModels, driftCount, driftFor, enrichOnline, exportGraph, findNodes, formatForExt, getNodeEmbeddings, groundGraph, hasDrift, identifierParts, impactOf, installAssistant, isTestFile, libId, loadCatalog, loadCoverage, loadEmbedder, loadGraph, loadSnapshot, nodeById, nodeEmbedText, parseGraph, parseJsonc, probeFreshness, queryGraph, queryGraphSemantic, readDoc, readSavings, recordSaving, refreshIfStale, relativeResolver, renderHtml, renderReport, resolveLib, resolveLimits, resolveOne, saveCatalog, savingsRecorded, scipEdges, serializeGraph, serveStdio, shortestPath, stableStringify, testsToRun, uninstallAssistant, verifyDeterminism, vibgrateDir, writeArtifacts, writeSnapshot } from './chunk-ZFDVHKID.js';
2
2
  export { LANGUAGES, allLanguageIds, grammarsSourceDir, langById, langForExtension, parseSource } from './chunk-BHA7QIPD.js';
3
- export { VERSION } from './chunk-OD5654VF.js';
3
+ export { VERSION } from './chunk-B6ZWB3WH.js';
4
4
  import { redactUrlCredentials, redactSecrets } from './chunk-RXP66R2E.js';
5
5
  import './chunk-GI6W53LM.js';
6
6
  import { execFileSync } from 'child_process';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibgrate/cli",
3
- "version": "2026.720.2",
3
+ "version": "2026.720.3",
4
4
  "description": "vg — local codebase intelligence CLI + MCP server for AI coding agents: deterministic code graph, drift reporting, and version-correct library docs (Apache-2.0)",
5
5
  "//mcpName": "Official MCP registry ownership proof: the registry fetches the published npm package and requires this field to match the com.vibgrate/ai-context server entry (see docs/marketing/mcp-registry/README.md). Must ship in the published @vibgrate/cli package.json.",
6
6
  "mcpName": "com.vibgrate/ai-context",
@@ -3,26 +3,31 @@ name: vg
3
3
  description: Query the local code graph (vg) for structure, impact, and navigation instead of grepping/reading many files.
4
4
  ---
5
5
 
6
+ <!-- vg:v2 · managed by `vg install` — auto-refreshed when these instructions evolve; remove this line to opt out -->
7
+
6
8
  # vg — the code map
7
9
 
8
10
  This repo has a deterministic code graph built by `vg`. Prefer it over reading or
9
11
  grepping many files — it is smaller, more relevant context, and free.
10
12
 
11
- ## Prefer the MCP tools
13
+ ## Use the MCP tools — not the CLI
12
14
 
13
- If the `vg` MCP server is registered (it is after `vg install`), call its
14
- read-only tools directly they are the **fastest** path. The server keeps the
15
- map parsed, the relation index warm, and the embedding model loaded across calls,
16
- so each query is cheaper than spawning the CLI fresh. Use:
15
+ When the `vg` MCP server is registered (it is after `vg install`), **always call
16
+ its read-only tools instead of shelling out to the CLI.** The server keeps the
17
+ map parsed, the relation index warm, and the embedding model loaded across
18
+ calls, so an MCP call answers in milliseconds while every CLI invocation pays
19
+ Node startup plus a fresh map parse, hundreds of times more. Tools:
17
20
  `query_graph`, `get_node`, `impact_of`, `find_path`, `list_hubs`, `list_areas`,
18
21
  `get_graph_summary`, `search_symbols`. They are side-effect-free and
19
22
  auto-approvable, and the server records which client is calling automatically.
23
+ Reach for the CLI only when the MCP server is genuinely unavailable — never as
24
+ the first resort.
20
25
 
21
- ## If you use the `vg` CLI instead
26
+ ## CLI fallback only when the MCP server is unavailable
22
27
 
23
- When the MCP server isn't available, use the CLI — and **always pass
24
- `--client=<your-ai>`** so your calls are counted (that's how the CLI-vs-MCP split
25
- is measured and the tools improved):
28
+ If (and only if) no `vg` MCP server is available, use the CLI — and **always
29
+ pass `--client=<your-ai>`** so your calls are counted (that's how the CLI-vs-MCP split is
30
+ measured and the tools improved):
26
31
 
27
32
  - **Understand code:** `vg "<question>" --client=<your-ai>` — a budget-bounded, fact-annotated context block.
28
33
  - **Find a symbol:** `vg show <name> --client=<your-ai>` — what it is, what it calls, what calls it.
@@ -37,6 +42,21 @@ is measured and the tools improved):
37
42
  - **Version-correct docs:** `vg lib <name>` returns drift-annotated, version-
38
43
  specific usage docs for a library — inject these instead of guessing an API.
39
44
 
45
+ ### Library-docs discipline
46
+
47
+ When a task needs a library's API, use the docs tools before web search or
48
+ training-data recall — they are official content matched to the version **this
49
+ project has installed**, and they win when the two conflict.
50
+
51
+ - **Workflow:** `resolve_library` once per library, then `library_docs` with the
52
+ returned `targetId` and a focused query (good: "zod refine custom error
53
+ message"; bad: "zod"). Never guess a targetId.
54
+ - **Budget:** at most **3 docs calls per task**. If 2 `library_docs` calls have
55
+ not surfaced the section you need, read the package source under
56
+ `node_modules` instead of searching again.
57
+ - **Skip the docs tools** for language built-ins, stable well-known syntax, or
58
+ an API already shown in the current context — they add nothing there.
59
+
40
60
  ## Keep it fresh
41
61
 
42
62
  The map keeps itself fresh: `vg ask` and the MCP tools detect changed files
@@ -1,6 +0,0 @@
1
- export { baselineCommand, runBaseline } from './chunk-DDQ5JGBV.js';
2
- import './chunk-OD5654VF.js';
3
- import './chunk-RXP66R2E.js';
4
- import './chunk-GI6W53LM.js';
5
- //# sourceMappingURL=baseline-WIZAFIJS.js.map
6
- //# sourceMappingURL=baseline-WIZAFIJS.js.map