@vibgrate/cli 2026.722.2 → 2026.727.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 +418 -196
- package/README.md +34 -7
- package/dist/baseline-K7YBFKZI.js +7 -0
- package/dist/{baseline-BD3A7EXD.js.map → baseline-K7YBFKZI.js.map} +1 -1
- package/dist/chunk-3BVSDMHV.js +2496 -0
- package/dist/chunk-3BVSDMHV.js.map +1 -0
- package/dist/{chunk-PY3DNX5H.js → chunk-3Q7QBWFW.js} +13 -2
- package/dist/chunk-3Q7QBWFW.js.map +1 -0
- package/dist/chunk-4CQ3MGNN.js +136 -0
- package/dist/chunk-4CQ3MGNN.js.map +1 -0
- package/dist/chunk-5I4VSBWQ.js +764 -0
- package/dist/chunk-5I4VSBWQ.js.map +1 -0
- package/dist/chunk-5Q54GEHM.js +29 -0
- package/dist/chunk-5Q54GEHM.js.map +1 -0
- package/dist/{chunk-2O5YZVZV.js → chunk-65MEOA4E.js} +21 -18
- package/dist/chunk-65MEOA4E.js.map +1 -0
- package/dist/{chunk-WNIIKCNF.js → chunk-6IOQJGFT.js} +29 -238
- package/dist/chunk-6IOQJGFT.js.map +1 -0
- package/dist/{chunk-CS37OBE3.js → chunk-7JHPQ6WF.js} +791 -783
- package/dist/chunk-7JHPQ6WF.js.map +1 -0
- package/dist/chunk-BPF3YX2U.js +64 -0
- package/dist/chunk-BPF3YX2U.js.map +1 -0
- package/dist/chunk-BWPBB45M.js +88 -0
- package/dist/chunk-BWPBB45M.js.map +1 -0
- package/dist/chunk-C4CKTAZP.js +1695 -0
- package/dist/chunk-C4CKTAZP.js.map +1 -0
- package/dist/chunk-EDAAG7BL.js +612 -0
- package/dist/chunk-EDAAG7BL.js.map +1 -0
- package/dist/chunk-EDBV33B7.js +57 -0
- package/dist/chunk-EDBV33B7.js.map +1 -0
- package/dist/chunk-HABUT7HW.js +233 -0
- package/dist/chunk-HABUT7HW.js.map +1 -0
- package/dist/{chunk-NONYJLOJ.js → chunk-HYZVHJ3Q.js} +3 -3
- package/dist/{chunk-NONYJLOJ.js.map → chunk-HYZVHJ3Q.js.map} +1 -1
- package/dist/chunk-IS7VTH2Q.js +627 -0
- package/dist/chunk-IS7VTH2Q.js.map +1 -0
- package/dist/chunk-IZDH67DX.js +289 -0
- package/dist/chunk-IZDH67DX.js.map +1 -0
- package/dist/chunk-J7LKEB2R.js +51 -0
- package/dist/chunk-J7LKEB2R.js.map +1 -0
- package/dist/chunk-JIBOJTGS.js +313 -0
- package/dist/chunk-JIBOJTGS.js.map +1 -0
- package/dist/chunk-JZYGEZTU.js +82 -0
- package/dist/chunk-JZYGEZTU.js.map +1 -0
- package/dist/chunk-K7REHDQS.js +776 -0
- package/dist/chunk-K7REHDQS.js.map +1 -0
- package/dist/chunk-KHJO4D5N.js +108 -0
- package/dist/chunk-KHJO4D5N.js.map +1 -0
- package/dist/chunk-NDMDSPFX.js +69 -0
- package/dist/chunk-NDMDSPFX.js.map +1 -0
- package/dist/chunk-OOIG3RUM.js +276 -0
- package/dist/chunk-OOIG3RUM.js.map +1 -0
- package/dist/{chunk-6CXTPC74.js → chunk-OXQNQW5J.js} +27 -6
- package/dist/chunk-OXQNQW5J.js.map +1 -0
- package/dist/chunk-PMYWZRRS.js +62 -0
- package/dist/chunk-PMYWZRRS.js.map +1 -0
- package/dist/chunk-PXHNTC6D.js +382 -0
- package/dist/chunk-PXHNTC6D.js.map +1 -0
- package/dist/{chunk-3MXNNBLI.js → chunk-S6CYDZEW.js} +1395 -1975
- package/dist/chunk-S6CYDZEW.js.map +1 -0
- package/dist/chunk-SZLF66FJ.js +843 -0
- package/dist/chunk-SZLF66FJ.js.map +1 -0
- package/dist/chunk-VXGV6NTD.js +476 -0
- package/dist/chunk-VXGV6NTD.js.map +1 -0
- package/dist/{chunk-5BDHQ7DD.js → chunk-WLETRGAC.js} +16 -9
- package/dist/chunk-WLETRGAC.js.map +1 -0
- package/dist/{chunk-I7GY7MVN.js → chunk-YDAT7LD2.js} +51 -11
- package/dist/chunk-YDAT7LD2.js.map +1 -0
- package/dist/cli.js +3412 -513
- package/dist/cli.js.map +1 -1
- package/dist/execution-env-3BN7Z737.js +3 -0
- package/dist/execution-env-3BN7Z737.js.map +1 -0
- package/dist/federation-EPZDUWCK.js +6 -0
- package/dist/federation-EPZDUWCK.js.map +1 -0
- package/dist/git-ref-HPRLUFFW.js +3 -0
- package/dist/git-ref-HPRLUFFW.js.map +1 -0
- package/dist/graph-backend-ZMSYOZMW.js +10 -0
- package/dist/graph-backend-ZMSYOZMW.js.map +1 -0
- package/dist/index.d.ts +432 -126
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/{interactive-A4DISSIW.js → interactive-ICL7D7LO.js} +185 -226
- package/dist/interactive-ICL7D7LO.js.map +1 -0
- package/dist/llm-host-2RAYQSDQ.js +8 -0
- package/dist/llm-host-2RAYQSDQ.js.map +1 -0
- package/dist/load-OHVKDX4R.js +7 -0
- package/dist/load-OHVKDX4R.js.map +1 -0
- package/dist/local-runtime-OJFLX2HI.js +4 -0
- package/dist/local-runtime-OJFLX2HI.js.map +1 -0
- package/dist/model-execution-profile-MQ2QCP24.js +3 -0
- package/dist/model-execution-profile-MQ2QCP24.js.map +1 -0
- package/dist/model-orchestrator-FFTZI3U2.js +8 -0
- package/dist/model-orchestrator-FFTZI3U2.js.map +1 -0
- package/dist/parse-worker.d.ts +1 -1
- package/dist/parse-worker.js +1 -1
- package/dist/paths-MCH75O3G.js +5 -0
- package/dist/paths-MCH75O3G.js.map +1 -0
- package/dist/resolve-gguf-4UPIGPEE.js +7 -0
- package/dist/resolve-gguf-4UPIGPEE.js.map +1 -0
- package/dist/runtime-session-IDU5BDUJ.js +17 -0
- package/dist/runtime-session-IDU5BDUJ.js.map +1 -0
- package/dist/session-L2OSDRPI.js +10 -0
- package/dist/{session-POJUDFPH.js.map → session-L2OSDRPI.js.map} +1 -1
- package/dist/{stream-json-Q2JGWPHB.js → stream-json-F74W5FCK.js} +16 -6
- package/dist/stream-json-F74W5FCK.js.map +1 -0
- package/dist/{types-Jl6RJ175.d.ts → types-ZMg1mSuu.d.ts} +3 -1
- package/dist/vgd-EGBQD7BW.js +16 -0
- package/dist/vgd-EGBQD7BW.js.map +1 -0
- package/package.json +9 -6
- package/dist/baseline-BD3A7EXD.js +0 -7
- package/dist/chunk-2O5YZVZV.js.map +0 -1
- package/dist/chunk-3MXNNBLI.js.map +0 -1
- package/dist/chunk-5BDHQ7DD.js.map +0 -1
- package/dist/chunk-6CXTPC74.js.map +0 -1
- package/dist/chunk-CS37OBE3.js.map +0 -1
- package/dist/chunk-GGJZA3Q6.js +0 -961
- package/dist/chunk-GGJZA3Q6.js.map +0 -1
- package/dist/chunk-I7GY7MVN.js.map +0 -1
- package/dist/chunk-JBXNQCGE.js +0 -484
- package/dist/chunk-JBXNQCGE.js.map +0 -1
- package/dist/chunk-PY3DNX5H.js.map +0 -1
- package/dist/chunk-WNIIKCNF.js.map +0 -1
- package/dist/interactive-A4DISSIW.js.map +0 -1
- package/dist/session-POJUDFPH.js +0 -6
- package/dist/stream-json-Q2JGWPHB.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { G as GraphNode, a as GraphEdge, A as Area, R as ResolverKind, V as VgGraph, F as FileParse, E as EdgeKind, b as Fact, c as GroundingKind, d as GroundingEdge } from './types-
|
|
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-
|
|
1
|
+
import { G as GraphNode, a as GraphEdge, A as Area, R as ResolverKind, V as VgGraph, F as FileParse, E as EdgeKind, b as Fact, c as GroundingKind, d as GroundingEdge } from './types-ZMg1mSuu.js';
|
|
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-ZMg1mSuu.js';
|
|
3
3
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
4
4
|
|
|
5
|
-
declare const VERSION = "2026.
|
|
5
|
+
declare const VERSION = "2026.727.1";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Analysis stage: importance, centrality, hubs, communities, and surprise.
|
|
@@ -214,7 +214,13 @@ interface BuildResult {
|
|
|
214
214
|
}
|
|
215
215
|
declare function buildGraph(options: BuildOptions): Promise<BuildResult>;
|
|
216
216
|
|
|
217
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Load the code map for a repository.
|
|
219
|
+
*
|
|
220
|
+
* When `graphPath` is omitted, prefers an existing global-store snapshot, then
|
|
221
|
+
* the legacy `.vibgrate/graph.json`, matching {@link resolveGraphPath}.
|
|
222
|
+
* Returns null if none exists at the resolved path.
|
|
223
|
+
*/
|
|
218
224
|
declare function loadGraph(root: string, graphPath?: string): VgGraph | null;
|
|
219
225
|
|
|
220
226
|
/**
|
|
@@ -231,9 +237,19 @@ declare function stableStringify(value: unknown, indent?: number): string;
|
|
|
231
237
|
declare function parseGraph(json: string): VgGraph;
|
|
232
238
|
|
|
233
239
|
/**
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
240
|
+
* Graph artifact layout (Fusion Runtime Phase 1).
|
|
241
|
+
*
|
|
242
|
+
* By default the code map lives in the **global** application store
|
|
243
|
+
* (XDG / Application Support), keyed by repository id — not inside the repo.
|
|
244
|
+
* That keeps `vg` / `vg serve` / auto-refresh from dirtying the working tree.
|
|
245
|
+
*
|
|
246
|
+
* Legacy in-repo path `.vibgrate/graph.json` is still **read** when present
|
|
247
|
+
* (migration), and is still the write target when:
|
|
248
|
+
* - `VIBGRATE_GRAPH_IN_REPO=1` (or true/yes), or
|
|
249
|
+
* - callers pass an explicit `graphPath` / `--graph`.
|
|
250
|
+
*
|
|
251
|
+
* `vg share` continues to opt into a committed in-repo map by writing under
|
|
252
|
+
* `.vibgrate/` (and rewriting its gitignore).
|
|
237
253
|
*/
|
|
238
254
|
interface WriteOptions {
|
|
239
255
|
root: string;
|
|
@@ -248,7 +264,31 @@ interface WrittenArtifacts {
|
|
|
248
264
|
factsPath?: string;
|
|
249
265
|
}
|
|
250
266
|
declare function vibgrateDir(root: string): string;
|
|
251
|
-
|
|
267
|
+
/** Historical in-repo map path (still read as a fallback). */
|
|
268
|
+
declare function legacyGraphPath(root: string): string;
|
|
269
|
+
/**
|
|
270
|
+
* When true, default writes go to `.vibgrate/graph.json` (pre–Phase-1 layout).
|
|
271
|
+
* Useful for CI that asserts in-repo artifacts, and for `vg share` workflows.
|
|
272
|
+
*/
|
|
273
|
+
declare function preferInRepoGraph(env?: NodeJS.ProcessEnv): boolean;
|
|
274
|
+
/**
|
|
275
|
+
* Default **write** path for the map. Global store unless the operator opts
|
|
276
|
+
* into the legacy in-repo layout. When git is available, prefer a
|
|
277
|
+
* branch-keyed snapshot (Fusion §4.1.1) so switching branches does not
|
|
278
|
+
* overwrite another ref's on-disk map.
|
|
279
|
+
*/
|
|
280
|
+
declare function defaultGraphPath(root: string, env?: NodeJS.ProcessEnv): string;
|
|
281
|
+
/**
|
|
282
|
+
* Resolve where to **read** the map from.
|
|
283
|
+
* Order: explicit override → legacy in-repo when `VIBGRATE_GRAPH_IN_REPO` is set
|
|
284
|
+
* → branch-keyed global (if on a git ref) → `current` global snapshot →
|
|
285
|
+
* legacy in-repo → default write path.
|
|
286
|
+
*
|
|
287
|
+
* The in-repo env short-circuit matters for CI and the release benchmark: they
|
|
288
|
+
* force portable `.vibgrate/graph.json` artifacts and must not pay a synchronous
|
|
289
|
+
* `git rev-parse` (or prefer a leftover global snapshot) on every resolve.
|
|
290
|
+
*/
|
|
291
|
+
declare function resolveGraphPath(root: string, override?: string, env?: NodeJS.ProcessEnv): string;
|
|
252
292
|
declare function writeArtifacts(graph: VgGraph, options: WriteOptions): WrittenArtifacts;
|
|
253
293
|
|
|
254
294
|
interface VerifyResult {
|
|
@@ -432,8 +472,10 @@ declare function loadEmbedder(options?: LoadEmbedderOptions): Promise<Embedder |
|
|
|
432
472
|
* strongest available signal — the node's **doc-comment / docstring** summary —
|
|
433
473
|
* plus lightweight context already on the graph (file-path words, area label), so
|
|
434
474
|
* a tersely-named symbol (`Table`, `NotificationJob`) a concept query can reach.
|
|
435
|
-
*
|
|
436
|
-
*
|
|
475
|
+
*
|
|
476
|
+
* `document` nodes (markdown, manifests, Docker, CI, OpenAPI, …) put the
|
|
477
|
+
* scrubbed body in `doc` — that body is the primary embed signal so `vg ask`
|
|
478
|
+
* can answer project-context questions, not only code symbols.
|
|
437
479
|
*/
|
|
438
480
|
declare function nodeEmbedText(node: GraphNode, areaLabel?: string): string;
|
|
439
481
|
declare function cosine(a: number[], b: number[]): number;
|
|
@@ -605,6 +647,121 @@ interface VgTool {
|
|
|
605
647
|
}
|
|
606
648
|
declare const TOOLS: VgTool[];
|
|
607
649
|
|
|
650
|
+
/** The graph-affecting discovery/build scope, replayed verbatim on refresh. */
|
|
651
|
+
interface BuildScope {
|
|
652
|
+
only?: string[];
|
|
653
|
+
exclude?: string[];
|
|
654
|
+
paths?: string[];
|
|
655
|
+
deep?: boolean;
|
|
656
|
+
noGround?: boolean;
|
|
657
|
+
scip?: string;
|
|
658
|
+
noScip?: boolean;
|
|
659
|
+
noTsc?: boolean;
|
|
660
|
+
cluster?: string;
|
|
661
|
+
grammarsDir?: string;
|
|
662
|
+
}
|
|
663
|
+
interface SnapshotFile {
|
|
664
|
+
version: string;
|
|
665
|
+
/** corpusHash of the build this snapshot belongs to. */
|
|
666
|
+
corpusHash: string;
|
|
667
|
+
scope: BuildScope;
|
|
668
|
+
files: Record<string, {
|
|
669
|
+
size: number;
|
|
670
|
+
mtimeMs: number;
|
|
671
|
+
hash: string;
|
|
672
|
+
}>;
|
|
673
|
+
}
|
|
674
|
+
interface Drift {
|
|
675
|
+
/** Files whose *content* changed (stat moved AND hash differs). */
|
|
676
|
+
changed: string[];
|
|
677
|
+
/** Files present now but absent from the snapshot. */
|
|
678
|
+
added: string[];
|
|
679
|
+
/** Snapshot files no longer present. */
|
|
680
|
+
removed: string[];
|
|
681
|
+
}
|
|
682
|
+
interface ProbeResult {
|
|
683
|
+
drift: Drift;
|
|
684
|
+
/** The recorded build scope — what a refresh must replay. */
|
|
685
|
+
scope: BuildScope;
|
|
686
|
+
/** corpusHash the current map was built from. */
|
|
687
|
+
corpusHash: string;
|
|
688
|
+
}
|
|
689
|
+
/** Persist the snapshot after a successful build. Best-effort (cache-only). */
|
|
690
|
+
declare function writeSnapshot(root: string, corpusHash: string, fileStats: FileStat[], scope?: BuildScope): void;
|
|
691
|
+
declare function loadSnapshot(root: string): SnapshotFile | null;
|
|
692
|
+
declare function hasDrift(drift: Drift): boolean;
|
|
693
|
+
/** Total drifted files — the number shown to humans. */
|
|
694
|
+
declare function driftCount(drift: Drift): number;
|
|
695
|
+
/**
|
|
696
|
+
* Compare the working tree to the snapshot. Returns null when no snapshot
|
|
697
|
+
* exists (nothing was ever built on this machine — auto-refresh stays off
|
|
698
|
+
* rather than guessing the build scope). Stat-only except for files whose
|
|
699
|
+
* stat moved; touch-only moves are absorbed back into the snapshot.
|
|
700
|
+
*/
|
|
701
|
+
declare function probeFreshness(root: string): ProbeResult | null;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Auto-refresh: bring the code map back in sync with the working tree when the
|
|
705
|
+
* freshness probe says it drifted. The rebuild is the ordinary incremental
|
|
706
|
+
* `buildGraph` (warm parse cache → only changed files re-parse), replaying the
|
|
707
|
+
* scope recorded at the last explicit build, guarded by a cross-process lock
|
|
708
|
+
* so a serving MCP process and a foreground command never write at once.
|
|
709
|
+
*
|
|
710
|
+
* Two properties keep this safe to run implicitly:
|
|
711
|
+
* - **No git churn**: if the rebuilt corpusHash equals the snapshot's (e.g. a
|
|
712
|
+
* drift that reverted itself), `graph.json` is left untouched — the artifact
|
|
713
|
+
* stays byte-identical.
|
|
714
|
+
* - **No surprise artifacts**: `GRAPH_REPORT.md`/`graph.html` are rewritten
|
|
715
|
+
* only if they already exist; a refresh never adds files a user's explicit
|
|
716
|
+
* build chose not to produce.
|
|
717
|
+
*/
|
|
718
|
+
interface RefreshOptions {
|
|
719
|
+
/** Force single-threaded parsing (tests / constrained hosts). */
|
|
720
|
+
inline?: boolean;
|
|
721
|
+
/** Worker count for the parse pool. */
|
|
722
|
+
jobs?: number;
|
|
723
|
+
/**
|
|
724
|
+
* The map path already resolved by the caller (e.g. `vg serve`'s startup
|
|
725
|
+
* resolution). Passed straight through to `writeArtifacts` so a refresh
|
|
726
|
+
* never re-resolves it: `defaultGraphPath` shells out to `git rev-parse`
|
|
727
|
+
* (Fusion §4.1.1 branch keying), and re-running that on every drift-driven
|
|
728
|
+
* refresh put a synchronous git spawn back on the hot tool-call path this
|
|
729
|
+
* function exists to keep off of. Omit only when no caller-known path
|
|
730
|
+
* exists (falls back to a fresh `defaultGraphPath` resolution).
|
|
731
|
+
*/
|
|
732
|
+
graphPath?: string;
|
|
733
|
+
}
|
|
734
|
+
type RefreshOutcome =
|
|
735
|
+
/** Map already matches the working tree. */
|
|
736
|
+
{
|
|
737
|
+
status: 'fresh';
|
|
738
|
+
}
|
|
739
|
+
/** No freshness snapshot — no build ever ran here, so scope is unknown. */
|
|
740
|
+
| {
|
|
741
|
+
status: 'no-snapshot';
|
|
742
|
+
}
|
|
743
|
+
/** Another vg process is rebuilding right now; its write will land shortly. */
|
|
744
|
+
| {
|
|
745
|
+
status: 'locked';
|
|
746
|
+
}
|
|
747
|
+
/** Rebuilt. `wrote` is false when the corpus turned out unchanged. */
|
|
748
|
+
| {
|
|
749
|
+
status: 'refreshed';
|
|
750
|
+
drift: Drift;
|
|
751
|
+
ms: number;
|
|
752
|
+
reparsed: number;
|
|
753
|
+
totalFiles: number;
|
|
754
|
+
wrote: boolean;
|
|
755
|
+
} | {
|
|
756
|
+
status: 'error';
|
|
757
|
+
message: string;
|
|
758
|
+
};
|
|
759
|
+
/**
|
|
760
|
+
* Probe, and rebuild incrementally if the tree drifted from the map.
|
|
761
|
+
* Silent (no output) — callers own the messaging for their surface.
|
|
762
|
+
*/
|
|
763
|
+
declare function refreshIfStale(root: string, opts?: RefreshOptions): Promise<RefreshOutcome>;
|
|
764
|
+
|
|
608
765
|
/**
|
|
609
766
|
* How a navigation call reached the map:
|
|
610
767
|
* - `mcp` — a tool call over the local `vg serve` MCP server;
|
|
@@ -732,6 +889,19 @@ declare class SessionStats {
|
|
|
732
889
|
private rowFor;
|
|
733
890
|
}
|
|
734
891
|
|
|
892
|
+
type RefreshImpl = typeof refreshIfStale;
|
|
893
|
+
interface GraphSourceTuning {
|
|
894
|
+
probeIntervalMs?: number;
|
|
895
|
+
refreshBudgetMs?: number;
|
|
896
|
+
/**
|
|
897
|
+
* Workspace root for freshness probes. Prefer passing this explicitly —
|
|
898
|
+
* deriving it from `graphPath` via `dirname` twice only works for the legacy
|
|
899
|
+
* `root/.vibgrate/graph.json` layout, not the global branch-keyed store.
|
|
900
|
+
*/
|
|
901
|
+
root?: string;
|
|
902
|
+
/** Tests only: inject a slow/fake refresh to assert the micro-budget. */
|
|
903
|
+
refreshImpl?: RefreshImpl;
|
|
904
|
+
}
|
|
735
905
|
interface ServeOptions {
|
|
736
906
|
/** Record local, counts-only usage savings (opt-in). */
|
|
737
907
|
savings?: boolean;
|
|
@@ -748,6 +918,11 @@ interface ServeOptions {
|
|
|
748
918
|
dedup?: boolean;
|
|
749
919
|
/** Auto-refresh the map when the working tree drifts (default true). */
|
|
750
920
|
refresh?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* Workspace root (project directory). When set, freshness probes and tools
|
|
923
|
+
* use this instead of inferring root from the graph path.
|
|
924
|
+
*/
|
|
925
|
+
root?: string;
|
|
751
926
|
/**
|
|
752
927
|
* In-memory session stats behind the live `vg serve` status display. Always
|
|
753
928
|
* safe to pass: nothing recorded here is persisted or uploaded — it dies with
|
|
@@ -758,22 +933,21 @@ interface ServeOptions {
|
|
|
758
933
|
declare class GraphSource {
|
|
759
934
|
readonly graphPath: string;
|
|
760
935
|
private readonly refresh;
|
|
761
|
-
/** Timing overrides (tests
|
|
936
|
+
/** Timing / root overrides (production passes `root`; tests may pass more). */
|
|
762
937
|
private readonly tuning;
|
|
763
938
|
private cachedMtimeMs;
|
|
764
939
|
private cached;
|
|
765
|
-
|
|
940
|
+
/** Project root used for freshness probes and rebuilds. */
|
|
941
|
+
readonly root: string;
|
|
766
942
|
private lastProbeAt;
|
|
767
943
|
private failedUntil;
|
|
768
944
|
private inflight;
|
|
769
|
-
/** Self-tuned: grows with measured probe cost so huge repos aren't penalized. */
|
|
945
|
+
/** Self-tuned: grows with measured probe/rebuild cost so huge repos aren't penalized. */
|
|
770
946
|
private probeIntervalMs;
|
|
947
|
+
private readonly refreshImpl;
|
|
771
948
|
constructor(graphPath: string, refresh?: boolean,
|
|
772
|
-
/** Timing overrides (tests
|
|
773
|
-
tuning?:
|
|
774
|
-
probeIntervalMs?: number;
|
|
775
|
-
refreshBudgetMs?: number;
|
|
776
|
-
});
|
|
949
|
+
/** Timing / root overrides (production passes `root`; tests may pass more). */
|
|
950
|
+
tuning?: GraphSourceTuning);
|
|
777
951
|
/** Current graph: auto-refreshed if the tree drifted, reloaded if the file changed. */
|
|
778
952
|
get(): Promise<VgGraph>;
|
|
779
953
|
/**
|
|
@@ -785,111 +959,6 @@ declare class GraphSource {
|
|
|
785
959
|
declare function createServer(source: GraphSource, opts?: ServeOptions): Server;
|
|
786
960
|
declare function serveStdio(graphPath: string, opts?: ServeOptions): Promise<void>;
|
|
787
961
|
|
|
788
|
-
/** The graph-affecting discovery/build scope, replayed verbatim on refresh. */
|
|
789
|
-
interface BuildScope {
|
|
790
|
-
only?: string[];
|
|
791
|
-
exclude?: string[];
|
|
792
|
-
paths?: string[];
|
|
793
|
-
deep?: boolean;
|
|
794
|
-
noGround?: boolean;
|
|
795
|
-
scip?: string;
|
|
796
|
-
noScip?: boolean;
|
|
797
|
-
noTsc?: boolean;
|
|
798
|
-
cluster?: string;
|
|
799
|
-
grammarsDir?: string;
|
|
800
|
-
}
|
|
801
|
-
interface SnapshotFile {
|
|
802
|
-
version: string;
|
|
803
|
-
/** corpusHash of the build this snapshot belongs to. */
|
|
804
|
-
corpusHash: string;
|
|
805
|
-
scope: BuildScope;
|
|
806
|
-
files: Record<string, {
|
|
807
|
-
size: number;
|
|
808
|
-
mtimeMs: number;
|
|
809
|
-
hash: string;
|
|
810
|
-
}>;
|
|
811
|
-
}
|
|
812
|
-
interface Drift {
|
|
813
|
-
/** Files whose *content* changed (stat moved AND hash differs). */
|
|
814
|
-
changed: string[];
|
|
815
|
-
/** Files present now but absent from the snapshot. */
|
|
816
|
-
added: string[];
|
|
817
|
-
/** Snapshot files no longer present. */
|
|
818
|
-
removed: string[];
|
|
819
|
-
}
|
|
820
|
-
interface ProbeResult {
|
|
821
|
-
drift: Drift;
|
|
822
|
-
/** The recorded build scope — what a refresh must replay. */
|
|
823
|
-
scope: BuildScope;
|
|
824
|
-
/** corpusHash the current map was built from. */
|
|
825
|
-
corpusHash: string;
|
|
826
|
-
}
|
|
827
|
-
/** Persist the snapshot after a successful build. Best-effort (cache-only). */
|
|
828
|
-
declare function writeSnapshot(root: string, corpusHash: string, fileStats: FileStat[], scope?: BuildScope): void;
|
|
829
|
-
declare function loadSnapshot(root: string): SnapshotFile | null;
|
|
830
|
-
declare function hasDrift(drift: Drift): boolean;
|
|
831
|
-
/** Total drifted files — the number shown to humans. */
|
|
832
|
-
declare function driftCount(drift: Drift): number;
|
|
833
|
-
/**
|
|
834
|
-
* Compare the working tree to the snapshot. Returns null when no snapshot
|
|
835
|
-
* exists (nothing was ever built on this machine — auto-refresh stays off
|
|
836
|
-
* rather than guessing the build scope). Stat-only except for files whose
|
|
837
|
-
* stat moved; touch-only moves are absorbed back into the snapshot.
|
|
838
|
-
*/
|
|
839
|
-
declare function probeFreshness(root: string): ProbeResult | null;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* Auto-refresh: bring the code map back in sync with the working tree when the
|
|
843
|
-
* freshness probe says it drifted. The rebuild is the ordinary incremental
|
|
844
|
-
* `buildGraph` (warm parse cache → only changed files re-parse), replaying the
|
|
845
|
-
* scope recorded at the last explicit build, guarded by a cross-process lock
|
|
846
|
-
* so a serving MCP process and a foreground command never write at once.
|
|
847
|
-
*
|
|
848
|
-
* Two properties keep this safe to run implicitly:
|
|
849
|
-
* - **No git churn**: if the rebuilt corpusHash equals the snapshot's (e.g. a
|
|
850
|
-
* drift that reverted itself), `graph.json` is left untouched — the artifact
|
|
851
|
-
* stays byte-identical.
|
|
852
|
-
* - **No surprise artifacts**: `GRAPH_REPORT.md`/`graph.html` are rewritten
|
|
853
|
-
* only if they already exist; a refresh never adds files a user's explicit
|
|
854
|
-
* build chose not to produce.
|
|
855
|
-
*/
|
|
856
|
-
interface RefreshOptions {
|
|
857
|
-
/** Force single-threaded parsing (tests / constrained hosts). */
|
|
858
|
-
inline?: boolean;
|
|
859
|
-
/** Worker count for the parse pool. */
|
|
860
|
-
jobs?: number;
|
|
861
|
-
}
|
|
862
|
-
type RefreshOutcome =
|
|
863
|
-
/** Map already matches the working tree. */
|
|
864
|
-
{
|
|
865
|
-
status: 'fresh';
|
|
866
|
-
}
|
|
867
|
-
/** No freshness snapshot — no build ever ran here, so scope is unknown. */
|
|
868
|
-
| {
|
|
869
|
-
status: 'no-snapshot';
|
|
870
|
-
}
|
|
871
|
-
/** Another vg process is rebuilding right now; its write will land shortly. */
|
|
872
|
-
| {
|
|
873
|
-
status: 'locked';
|
|
874
|
-
}
|
|
875
|
-
/** Rebuilt. `wrote` is false when the corpus turned out unchanged. */
|
|
876
|
-
| {
|
|
877
|
-
status: 'refreshed';
|
|
878
|
-
drift: Drift;
|
|
879
|
-
ms: number;
|
|
880
|
-
reparsed: number;
|
|
881
|
-
totalFiles: number;
|
|
882
|
-
wrote: boolean;
|
|
883
|
-
} | {
|
|
884
|
-
status: 'error';
|
|
885
|
-
message: string;
|
|
886
|
-
};
|
|
887
|
-
/**
|
|
888
|
-
* Probe, and rebuild incrementally if the tree drifted from the map.
|
|
889
|
-
* Silent (no output) — callers own the messaging for their surface.
|
|
890
|
-
*/
|
|
891
|
-
declare function refreshIfStale(root: string, opts?: RefreshOptions): Promise<RefreshOutcome>;
|
|
892
|
-
|
|
893
962
|
/**
|
|
894
963
|
* Test-awareness (VG-ENGINE-TEARDOWN §3.6) — the wedge Graphify has no answer to.
|
|
895
964
|
*
|
|
@@ -1042,8 +1111,8 @@ declare function enrichOnline(records: DepRecord[], fetchImpl?: typeof fetch): P
|
|
|
1042
1111
|
/**
|
|
1043
1112
|
* Local-model discovery (VG-LOCAL-MODELS §9.2) — be a no-key *consumer* of the
|
|
1044
1113
|
* developer's local model fleet. Fully offline and deterministic: inspect the
|
|
1045
|
-
* on-disk layouts of Ollama / LM Studio / llama.cpp
|
|
1046
|
-
* runtime is built or launched.
|
|
1114
|
+
* on-disk layouts of Ollama / LM Studio / llama.cpp / the Vibgrate weight store,
|
|
1115
|
+
* never the network. No runtime is built or launched.
|
|
1047
1116
|
*/
|
|
1048
1117
|
interface LocalModel {
|
|
1049
1118
|
runtime: 'ollama' | 'lm-studio' | 'gguf';
|
|
@@ -1211,4 +1280,241 @@ declare function redactGraph(graph: VgGraph): VgGraph;
|
|
|
1211
1280
|
*/
|
|
1212
1281
|
declare function grammarsSourceDir(): string | null;
|
|
1213
1282
|
|
|
1214
|
-
|
|
1283
|
+
/** The graph-grounded context handed to the model, plus what fed it. */
|
|
1284
|
+
interface CodeContext {
|
|
1285
|
+
instruction: string;
|
|
1286
|
+
/** Symbols the retrieval surfaced as most relevant, with their relations. */
|
|
1287
|
+
seeds: {
|
|
1288
|
+
node: GraphNode;
|
|
1289
|
+
why: string;
|
|
1290
|
+
}[];
|
|
1291
|
+
/** Files the edit is expected to touch, in stable order. */
|
|
1292
|
+
targetFiles: string[];
|
|
1293
|
+
/** Blast radius: symbols that call/depend on the seeds (impact-aware review). */
|
|
1294
|
+
impacted: {
|
|
1295
|
+
node: GraphNode;
|
|
1296
|
+
via: string;
|
|
1297
|
+
}[];
|
|
1298
|
+
/** Hard constraints (declared facts) pinned so compaction can't drop them. */
|
|
1299
|
+
pinnedFacts: string[];
|
|
1300
|
+
/** The rendered, budget-bounded prompt block. */
|
|
1301
|
+
rendered: string;
|
|
1302
|
+
tokensEstimate: number;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Graph-grounded context assembly for `vg code` (VG-CLI-CODE §3).
|
|
1307
|
+
*
|
|
1308
|
+
* A generic coding agent starts blind and reconstructs structure by grepping and
|
|
1309
|
+
* reading whole files — which is exactly what blows the context window and
|
|
1310
|
+
* degrades the model. This module instead uses the deterministic code graph to
|
|
1311
|
+
* hand the planner a *small, high-signal, budget-bounded* context: the symbols
|
|
1312
|
+
* most relevant to the instruction, their immediate relations, the blast radius
|
|
1313
|
+
* of changing them, and any declared facts (hard constraints) that must not be
|
|
1314
|
+
* dropped by later compaction. Deterministic given a graph + instruction, so it
|
|
1315
|
+
* is fully offline-testable and benchmarkable.
|
|
1316
|
+
*/
|
|
1317
|
+
|
|
1318
|
+
interface BuildContextOptions {
|
|
1319
|
+
/** Approx token budget for the rendered block (default 3000). */
|
|
1320
|
+
budget?: number;
|
|
1321
|
+
/** How many retrieval seeds to expand (default 8). */
|
|
1322
|
+
seeds?: number;
|
|
1323
|
+
/** Impact BFS depth for the blast radius (default 2). */
|
|
1324
|
+
impactDepth?: number;
|
|
1325
|
+
/** Restrict the edit surface to these files (from `--file`), if given. */
|
|
1326
|
+
files?: string[];
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Build the context block for a coding instruction. The ordering is
|
|
1330
|
+
* cache-stable by design (see router.ts): the invariant, repo-derived material
|
|
1331
|
+
* (facts, symbols, relations) comes first and the volatile instruction is
|
|
1332
|
+
* echoed last, so a provider's prompt cache can reuse the stable prefix across
|
|
1333
|
+
* turns.
|
|
1334
|
+
*/
|
|
1335
|
+
declare function buildCodeContext(graph: VgGraph, instruction: string, options?: BuildContextOptions): CodeContext;
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Source-bearing Task Capsule compiler (Fusion Runtime Phase 0).
|
|
1339
|
+
*
|
|
1340
|
+
* Today's {@link buildCodeContext} pays for graph metadata, then the model still
|
|
1341
|
+
* calls `read_file` — double payment. This module compiles a Task Capsule that
|
|
1342
|
+
* includes exact source ranges (from Tree-sitter spans already on graph nodes)
|
|
1343
|
+
* so the first inference can solve without navigation tool calls (ZNS@1 path).
|
|
1344
|
+
*
|
|
1345
|
+
* Deterministic given (graph, instruction, file contents, options). Injectable
|
|
1346
|
+
* `readFile` keeps unit tests offline and pure.
|
|
1347
|
+
*
|
|
1348
|
+
* Schema: docs/fusion/task-capsule-v0.schema.json
|
|
1349
|
+
*/
|
|
1350
|
+
|
|
1351
|
+
declare const TASK_CAPSULE_SCHEMA_VERSION: "task-capsule/0";
|
|
1352
|
+
/** Frozen ranking policy id — bump when the heuristic changes (benchmark gate). */
|
|
1353
|
+
declare const CAPSULE_RANKING_VERSION: "capsule-rank@2026.07.0";
|
|
1354
|
+
declare const CAPSULE_COMPILER_ID: "vg-task-capsule/0";
|
|
1355
|
+
interface BuildCapsuleOptions extends BuildContextOptions {
|
|
1356
|
+
/**
|
|
1357
|
+
* Read file contents relative to the repository root. Required for source
|
|
1358
|
+
* slices; when omitted, the capsule still builds metadata + empty slices
|
|
1359
|
+
* (useful for schema/shape tests).
|
|
1360
|
+
*/
|
|
1361
|
+
readFile?: (relativePath: string) => string | null;
|
|
1362
|
+
/** Extra lines of context around each symbol span (default 1). */
|
|
1363
|
+
padding?: number;
|
|
1364
|
+
/** Max source slices after merge (default 12). */
|
|
1365
|
+
maxSlices?: number;
|
|
1366
|
+
repositoryId?: string | null;
|
|
1367
|
+
/** Optional provenance from the Model Execution Profile / security ladder. */
|
|
1368
|
+
provenance?: CapsuleProvenanceExtras;
|
|
1369
|
+
/**
|
|
1370
|
+
* Extra pinned facts (e.g. high-confidence federation bridge edges) appended
|
|
1371
|
+
* after graph-derived facts. Secret-free, short strings only.
|
|
1372
|
+
*/
|
|
1373
|
+
extraPinnedFacts?: string[];
|
|
1374
|
+
}
|
|
1375
|
+
interface CapsuleSymbolRef {
|
|
1376
|
+
id: string;
|
|
1377
|
+
qualifiedName: string;
|
|
1378
|
+
kind: string;
|
|
1379
|
+
file: string;
|
|
1380
|
+
span: {
|
|
1381
|
+
start: number;
|
|
1382
|
+
end: number;
|
|
1383
|
+
};
|
|
1384
|
+
signature?: string | null;
|
|
1385
|
+
why: string;
|
|
1386
|
+
importance: number;
|
|
1387
|
+
}
|
|
1388
|
+
interface SourceSlice {
|
|
1389
|
+
file: string;
|
|
1390
|
+
start: number;
|
|
1391
|
+
end: number;
|
|
1392
|
+
content: string;
|
|
1393
|
+
contentHash: string;
|
|
1394
|
+
symbolIds: string[];
|
|
1395
|
+
}
|
|
1396
|
+
interface CapsuleRelationship {
|
|
1397
|
+
kind: 'calls' | 'called-by' | 'impacts' | 'contains' | 'other';
|
|
1398
|
+
from: string;
|
|
1399
|
+
to: string;
|
|
1400
|
+
}
|
|
1401
|
+
interface VerificationPlan {
|
|
1402
|
+
syntaxFiles: string[];
|
|
1403
|
+
suggestedTests: string[];
|
|
1404
|
+
notes: string[];
|
|
1405
|
+
}
|
|
1406
|
+
interface TaskCapsule {
|
|
1407
|
+
schemaVersion: typeof TASK_CAPSULE_SCHEMA_VERSION;
|
|
1408
|
+
instruction: string;
|
|
1409
|
+
primary: CapsuleSymbolRef[];
|
|
1410
|
+
supporting: CapsuleSymbolRef[];
|
|
1411
|
+
sourceSlices: SourceSlice[];
|
|
1412
|
+
relationships: CapsuleRelationship[];
|
|
1413
|
+
pinnedFacts: string[];
|
|
1414
|
+
targetFiles: string[];
|
|
1415
|
+
verificationPlan: VerificationPlan;
|
|
1416
|
+
rendered: string;
|
|
1417
|
+
tokensEstimate: number;
|
|
1418
|
+
provenance: {
|
|
1419
|
+
compiler: string;
|
|
1420
|
+
rankingVersion: string;
|
|
1421
|
+
graphCorpusHash: string | null;
|
|
1422
|
+
repositoryId: string | null;
|
|
1423
|
+
/** Model Execution Profile id when resolved (Fusion Phase 4/7). */
|
|
1424
|
+
modelProfileId?: string | null;
|
|
1425
|
+
/** Security tier for shell during this task. */
|
|
1426
|
+
securityTier?: string | null;
|
|
1427
|
+
/** Frozen policy / ranking patch id if any. */
|
|
1428
|
+
policyVersion?: string | null;
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
interface CapsuleProvenanceExtras {
|
|
1432
|
+
modelProfileId?: string | null;
|
|
1433
|
+
securityTier?: string | null;
|
|
1434
|
+
policyVersion?: string | null;
|
|
1435
|
+
}
|
|
1436
|
+
/** Host-safe capsule summary for VS Code / stream-json capsule transparency. */
|
|
1437
|
+
interface CapsuleSummary {
|
|
1438
|
+
schemaVersion: string;
|
|
1439
|
+
instruction: string;
|
|
1440
|
+
primary: Array<{
|
|
1441
|
+
qualifiedName: string;
|
|
1442
|
+
file: string;
|
|
1443
|
+
kind: string;
|
|
1444
|
+
}>;
|
|
1445
|
+
supporting: Array<{
|
|
1446
|
+
qualifiedName: string;
|
|
1447
|
+
file: string;
|
|
1448
|
+
kind: string;
|
|
1449
|
+
}>;
|
|
1450
|
+
sourceSliceCount: number;
|
|
1451
|
+
sourceFiles: string[];
|
|
1452
|
+
tokensEstimate: number;
|
|
1453
|
+
rankingVersion: string;
|
|
1454
|
+
/** Truncated rendered capsule for display (not the full prompt dump). */
|
|
1455
|
+
preview: string;
|
|
1456
|
+
}
|
|
1457
|
+
/** Host-safe capsule summary (capsule transparency UI / stream-json). */
|
|
1458
|
+
declare function summarizeCapsule(capsule: TaskCapsule): CapsuleSummary;
|
|
1459
|
+
/**
|
|
1460
|
+
* Compile a source-bearing Task Capsule. Reuses the same seed / impact /
|
|
1461
|
+
* fact-pinning path as {@link buildCodeContext}, then attaches exact source
|
|
1462
|
+
* slices and a verification sketch.
|
|
1463
|
+
*/
|
|
1464
|
+
declare function buildTaskCapsule(graph: VgGraph, instruction: string, options?: BuildCapsuleOptions): TaskCapsule;
|
|
1465
|
+
/**
|
|
1466
|
+
* Project a capsule into the legacy {@link CodeContext} shape so the existing
|
|
1467
|
+
* agent prompt path can consume it without a full rewrite (A/B flag).
|
|
1468
|
+
*/
|
|
1469
|
+
declare function capsuleToCodeContext(capsule: TaskCapsule): CodeContext;
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* `search_symbols` — the hybrid flashlight next to the map
|
|
1473
|
+
* (docs/graph/VG-GRAPH-OPTIMIZATION-PLAN.md P1).
|
|
1474
|
+
*
|
|
1475
|
+
* Two passes, both bounded and deterministic:
|
|
1476
|
+
* 1. symbol pass — the graph's own name index via findNodes (exact id /
|
|
1477
|
+
* qualified name / short name / case-insensitive / substring), ranked;
|
|
1478
|
+
* 2. literal pass — a repo-root-jailed substring scan over source files for
|
|
1479
|
+
* strings the graph does not model (config keys, log messages, comments),
|
|
1480
|
+
* only run when the symbol pass has spare result budget.
|
|
1481
|
+
*
|
|
1482
|
+
* Rows are tiny by contract ({kind, name, file, line, score|preview}) — this
|
|
1483
|
+
* tool exists to make "I know the name" discovery one cheap call, so the model
|
|
1484
|
+
* never flails through graph queries for a plain string lookup.
|
|
1485
|
+
*/
|
|
1486
|
+
interface SymbolHit {
|
|
1487
|
+
kind: string;
|
|
1488
|
+
name: string;
|
|
1489
|
+
file: string;
|
|
1490
|
+
line: number;
|
|
1491
|
+
score: number;
|
|
1492
|
+
}
|
|
1493
|
+
interface TextHit {
|
|
1494
|
+
kind: 'text';
|
|
1495
|
+
file: string;
|
|
1496
|
+
line: number;
|
|
1497
|
+
preview: string;
|
|
1498
|
+
}
|
|
1499
|
+
interface SearchResult {
|
|
1500
|
+
matches: (SymbolHit | TextHit)[];
|
|
1501
|
+
moreAvailable: boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* Total literal (text) matches across the scanned tree, reported when a
|
|
1504
|
+
* literal sweep ran (a whitespace/phrase query). Lets a caller doing a "find
|
|
1505
|
+
* every occurrence" sweep know whether the shown text rows are the complete
|
|
1506
|
+
* set (`totalTextMatches` === shown text rows) or a page of a larger set
|
|
1507
|
+
* (`totalTextMatches` > shown) — so it never mistakes a truncated list for a
|
|
1508
|
+
* complete one, and never has to fall back to grep to be sure. A trailing `+`
|
|
1509
|
+
* intent is signalled via `moreAvailable`; absent for single-name lookups.
|
|
1510
|
+
*/
|
|
1511
|
+
totalTextMatches?: number;
|
|
1512
|
+
/**
|
|
1513
|
+
* Present when nothing matched (the pivot to take) or when a literal sweep was
|
|
1514
|
+
* truncated (how to get the rest).
|
|
1515
|
+
*/
|
|
1516
|
+
hint?: string;
|
|
1517
|
+
}
|
|
1518
|
+
declare function searchSymbols(graph: VgGraph, root: string, query: string, limit: number): Promise<SearchResult>;
|
|
1519
|
+
|
|
1520
|
+
export { ASSISTANTS, type AnalyzeOptions, type AnalyzeResult, Area, type Assistant, type BuildCapsuleOptions, type BuildContextOptions, type BuildOptions, type BuildResult, type BuildScope, CAPSULE_COMPILER_ID, CAPSULE_RANKING_VERSION, type CapsuleSummary, type CapsuleSymbolRef, type ClusterMode, type DepRecord, type DiscoverOptions, type DiscoveredFile, type Drift, type DriftInventory, type DriftNote, EdgeKind, type Embedder, type ExportContext, type ExportFormat, FREE_PACK, Fact, FileParse, GraphEdge, GraphIndex, GraphNode, GraphSource, type GraphUploadEnvelope, GroundingEdge, GroundingKind, type ImpactItem, type ImpactResult, type KnowledgePack, LANGUAGES, type LanguageDef, type LibCatalog, type LibEntry, type LibSource, type LoadEmbedderOptions, type LocalModel, type ModuleResolver, type PackEntry, type PathResult, type ProbeResult, type QueryMatch, type QueryOptions, type QueryResult, type RefreshOptions, type RefreshOutcome, ResolverKind, ResourceLimitError, type ResourceLimits, SKIP_DIRS, SKIP_FILES, type SavingsReport, type ScipDocument, type ScipIndex, type ScipOccurrence, type SearchResult, type SemanticQueryOptions, type ServeOptions, type SourceSlice, type SymbolHit, TASK_CAPSULE_SCHEMA_VERSION, TOOLS, type TaskCapsule, type TextHit, UsageError, VERSION, type VerifyResult, VgGraph, type VgTool, type WriteOptions, type WrittenArtifacts, addLibrary, allLanguageIds, analyze, applyCoverage, applyStaticTestLinkage, assistantById, buildCodeContext, buildEnvelope, buildFacts, buildGraph, buildModuleResolver, buildTaskCapsule, capsuleToCodeContext, cosine, coveringTests, createServer, decodeScipIndex, defaultGraphPath, inventory as dependencyInventory, detectRunner, discover, discoverModels, driftCount, driftFor, enrichOnline, exportGraph, findNodes, formatForExt, getNodeEmbeddings, grammarsSourceDir, groundGraph, hasDrift, identifierParts, impactOf, installAssistant, isTestFile, langById, langForExtension, legacyGraphPath, libId, loadCatalog, loadCoverage, loadEmbedder, loadGraph, loadSnapshot, nodeById, nodeEmbedText, parseGraph, parseJsonc, parseSource, preferInRepoGraph, probeFreshness, queryGraph, queryGraphSemantic, readDoc, readSavings, recordSaving, redactGraph, refreshIfStale, relativeResolver, renderHtml, renderReport, resolveGraphPath, resolveLib, resolveLimits, resolveOne, saveCatalog, savingsRecorded, scipEdges, searchSymbols, serializeGraph, serveStdio, shortestPath, stableStringify, summarizeCapsule, testsToRun, uninstallAssistant, verifyDeterminism, vibgrateDir, writeArtifacts, writeSnapshot };
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
export { GraphSource, createServer, exportGraph, formatForExt, serveStdio } from './chunk-
|
|
2
|
-
export { ASSISTANTS, FREE_PACK, ResourceLimitError, SCHEMA_VERSION, SKIP_DIRS, SKIP_FILES, TOOLS, UsageError, analyze, applyCoverage,
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
1
|
+
export { GraphSource, createServer, exportGraph, formatForExt, serveStdio } from './chunk-65MEOA4E.js';
|
|
2
|
+
export { ASSISTANTS, FREE_PACK, ResourceLimitError, SCHEMA_VERSION, SKIP_DIRS, SKIP_FILES, TOOLS, UsageError, analyze, applyCoverage, assistantById, buildFacts, buildGraph, coveringTests, decodeScipIndex, detectRunner, discover, driftCount, groundGraph, hasDrift, installAssistant, loadCoverage, loadSnapshot, probeFreshness, refreshIfStale, resolveLimits, scipEdges, searchSymbols, shortestPath, testsToRun, uninstallAssistant, verifyDeterminism, writeSnapshot } from './chunk-S6CYDZEW.js';
|
|
3
|
+
export { VERSION } from './chunk-WLETRGAC.js';
|
|
4
|
+
export { addLibrary, applyStaticTestLinkage, buildModuleResolver, inventory as dependencyInventory, driftFor, enrichOnline, isTestFile, libId, loadCatalog, parseJsonc, readDoc, relativeResolver, resolveLib, saveCatalog } from './chunk-C4CKTAZP.js';
|
|
5
|
+
export { findNodes, nodeById, resolveOne } from './chunk-J7LKEB2R.js';
|
|
6
|
+
export { discoverModels } from './chunk-OOIG3RUM.js';
|
|
7
|
+
export { CAPSULE_COMPILER_ID, CAPSULE_RANKING_VERSION, TASK_CAPSULE_SCHEMA_VERSION, buildCodeContext, buildTaskCapsule, capsuleToCodeContext, readSavings, recordSaving, savingsRecorded, summarizeCapsule } from './chunk-EDAAG7BL.js';
|
|
8
|
+
export { GraphIndex, cosine, getNodeEmbeddings, identifierParts, impactOf, loadEmbedder, nodeEmbedText, queryGraph, queryGraphSemantic } from './chunk-6IOQJGFT.js';
|
|
9
|
+
export { LANGUAGES, allLanguageIds, grammarsSourceDir, langById, langForExtension, parseSource } from './chunk-3Q7QBWFW.js';
|
|
6
10
|
import { redactUrlCredentials, redactSecrets } from './chunk-RXP66R2E.js';
|
|
11
|
+
export { defaultGraphPath, legacyGraphPath, loadGraph, preferInRepoGraph, renderHtml, renderReport, resolveGraphPath, vibgrateDir, writeArtifacts } from './chunk-HABUT7HW.js';
|
|
12
|
+
export { parseGraph, serializeGraph, stableStringify } from './chunk-5Q54GEHM.js';
|
|
13
|
+
import './chunk-BWPBB45M.js';
|
|
14
|
+
import './chunk-JFGYT6BI.js';
|
|
15
|
+
import './chunk-BPF3YX2U.js';
|
|
7
16
|
import './chunk-GI6W53LM.js';
|
|
8
17
|
import './chunk-CRAMOEBE.js';
|
|
9
|
-
export { GraphIndex, cosine, getNodeEmbeddings, identifierParts, impactOf, loadEmbedder, nodeEmbedText, parseGraph, queryGraph, queryGraphSemantic, readSavings, recordSaving, savingsRecorded, serializeGraph, stableStringify } from './chunk-WNIIKCNF.js';
|
|
10
|
-
import './chunk-JFGYT6BI.js';
|
|
11
18
|
import { execFileSync } from 'child_process';
|
|
12
19
|
|
|
13
20
|
function buildEnvelope(root, graph, scanIngestId) {
|