@vibgrate/cli 2026.708.2 → 2026.709.1
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 +9 -1
- package/dist/baseline-7AFTGG3I.js +6 -0
- package/dist/{baseline-AMQ7VEB5.js.map → baseline-7AFTGG3I.js.map} +1 -1
- package/dist/chunk-IRZCYPFC.js +3735 -0
- package/dist/chunk-IRZCYPFC.js.map +1 -0
- package/dist/{chunk-AWEAREOE.js → chunk-MPKMAERO.js} +496 -405
- package/dist/chunk-MPKMAERO.js.map +1 -0
- package/dist/{chunk-ICBBG6U3.js → chunk-PXZ5KPVN.js} +4 -4
- package/dist/{chunk-ICBBG6U3.js.map → chunk-PXZ5KPVN.js.map} +1 -1
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +823 -476
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/skills/vg/SKILL.md +26 -15
- package/dist/baseline-AMQ7VEB5.js +0 -6
- package/dist/chunk-AWEAREOE.js.map +0 -1
- package/dist/chunk-GHLYQZWT.js +0 -31
- package/dist/chunk-GHLYQZWT.js.map +0 -1
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-CXnp1uGj.js';
|
|
3
3
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
4
4
|
|
|
5
|
-
declare const VERSION = "2026.
|
|
5
|
+
declare const VERSION = "2026.709.1";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Analysis stage: importance, centrality, hubs, communities, and surprise.
|
|
@@ -592,6 +592,13 @@ declare const TOOLS: VgTool[];
|
|
|
592
592
|
interface ServeOptions {
|
|
593
593
|
/** Record local, counts-only usage savings (opt-in). */
|
|
594
594
|
savings?: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Periodically upload the counts-only ledger to Vibgrate (opt-in; off by
|
|
597
|
+
* default). Implies recording. The upload itself is driven by the serve
|
|
598
|
+
* command (see commands/serve.ts + engine/stats-share.ts); here it just also
|
|
599
|
+
* turns recording on so there's something to send.
|
|
600
|
+
*/
|
|
601
|
+
shareStats?: boolean;
|
|
595
602
|
/** Air-gapped mode (no model downloads). */
|
|
596
603
|
local?: boolean;
|
|
597
604
|
/** Collapse repeat heavy relation lists within a session (opt-in). */
|
|
@@ -896,6 +903,17 @@ interface LocalModel {
|
|
|
896
903
|
}
|
|
897
904
|
declare function discoverModels(home?: string): LocalModel[];
|
|
898
905
|
|
|
906
|
+
/**
|
|
907
|
+
* How a navigation call reached the map:
|
|
908
|
+
* - `mcp` — a tool call over the local `vg serve` MCP server;
|
|
909
|
+
* - `cli` — a `vg <subcommand>` invocation that identified itself with `--client`.
|
|
910
|
+
* Both are recorded into one ledger under a shared tool vocabulary (CLI
|
|
911
|
+
* subcommands are normalised to their MCP tool names via CLI_TOOL_ALIASES), so
|
|
912
|
+
* `(tool, source)` is the command-vs-MCP split and the token math stays unified.
|
|
913
|
+
* Absent on ledger lines written before sources existed → read as `mcp` (the
|
|
914
|
+
* only path that recorded then).
|
|
915
|
+
*/
|
|
916
|
+
type Source = 'mcp' | 'cli';
|
|
899
917
|
/**
|
|
900
918
|
* Outcome of a recorded navigation call:
|
|
901
919
|
* - `complete` — returned results, with nothing capped or paginated;
|
|
@@ -909,6 +927,8 @@ interface SavingEntry {
|
|
|
909
927
|
outcome?: Outcome;
|
|
910
928
|
vgTokens: number;
|
|
911
929
|
baselineTokens: number;
|
|
930
|
+
source?: Source;
|
|
931
|
+
client?: string;
|
|
912
932
|
}
|
|
913
933
|
/** Whether a savings ledger exists for this repo (i.e. `vg serve --savings` has recorded). */
|
|
914
934
|
declare function savingsRecorded(root: string): boolean;
|
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-
|
|
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-MPKMAERO.js';
|
|
2
2
|
export { LANGUAGES, allLanguageIds, grammarsSourceDir, langById, langForExtension, parseSource } from './chunk-X5YT263H.js';
|
|
3
|
-
export { VERSION } from './chunk-
|
|
3
|
+
export { VERSION } from './chunk-PXZ5KPVN.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.
|
|
3
|
+
"version": "2026.709.1",
|
|
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
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -99,6 +99,6 @@
|
|
|
99
99
|
"vitest": "^4.0.0"
|
|
100
100
|
},
|
|
101
101
|
"engines": {
|
|
102
|
-
"node": ">=
|
|
102
|
+
"node": ">=22.0.0"
|
|
103
103
|
}
|
|
104
104
|
}
|
package/skills/vg/SKILL.md
CHANGED
|
@@ -8,13 +8,26 @@ description: Query the local code graph (vg) for structure, impact, and navigati
|
|
|
8
8
|
This repo has a deterministic code graph built by `vg`. Prefer it over reading or
|
|
9
9
|
grepping many files — it is smaller, more relevant context, and free.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Prefer the MCP tools
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
17
|
+
`query_graph`, `get_node`, `impact_of`, `find_path`, `list_hubs`, `list_areas`,
|
|
18
|
+
`get_graph_summary`, `search_symbols`. They are side-effect-free and
|
|
19
|
+
auto-approvable, and the server records which client is calling automatically.
|
|
20
|
+
|
|
21
|
+
## If you use the `vg` CLI instead
|
|
22
|
+
|
|
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):
|
|
26
|
+
|
|
27
|
+
- **Understand code:** `vg "<question>" --client=<your-ai>` — a budget-bounded, fact-annotated context block.
|
|
28
|
+
- **Find a symbol:** `vg show <name> --client=<your-ai>` — what it is, what it calls, what calls it.
|
|
29
|
+
- **Before changing something:** `vg impact <name> --client=<your-ai>` — what breaks if you change it.
|
|
30
|
+
- **Navigate:** `vg path <A> <B> --client=<your-ai>`, `vg tree <name> --client=<your-ai>`.
|
|
18
31
|
|
|
19
32
|
## Dependencies & library docs
|
|
20
33
|
|
|
@@ -24,19 +37,17 @@ grepping many files — it is smaller, more relevant context, and free.
|
|
|
24
37
|
- **Version-correct docs:** `vg lib <name>` returns drift-annotated, version-
|
|
25
38
|
specific usage docs for a library — inject these instead of guessing an API.
|
|
26
39
|
|
|
27
|
-
## Via MCP
|
|
28
|
-
|
|
29
|
-
If the `vg` MCP server is registered, call its read-only tools directly:
|
|
30
|
-
`query_graph`, `get_node`, `impact_of`, `find_path`, `list_hubs`, `list_areas`,
|
|
31
|
-
`get_graph_summary`. They are side-effect-free and auto-approvable.
|
|
32
|
-
|
|
33
40
|
## Keep it fresh
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
The map keeps itself fresh: `vg ask` and the MCP tools detect changed files
|
|
43
|
+
and rebuild it incrementally before answering — you can edit code and query
|
|
44
|
+
immediately. Running `vg` after a large pull still warms everything in one go.
|
|
45
|
+
The map lives at `.vibgrate/graph.json` and is deterministic (byte-identical
|
|
46
|
+
across machines).
|
|
37
47
|
|
|
38
48
|
---
|
|
39
49
|
|
|
40
50
|
> This is the canonical reference copy. `vg install <assistant>` writes this skill
|
|
41
|
-
> into each assistant's expected location
|
|
51
|
+
> into each assistant's expected location (substituting the assistant's own name
|
|
52
|
+
> for `<your-ai>` in the `--client` flag) and registers the local MCP server. The
|
|
42
53
|
> source of truth is `src/install/content.ts`.
|