@vibgrate/cli 2026.731.3 → 2026.803.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.
Files changed (116) hide show
  1. package/dist/agent-HNV2VUCO.js +24 -0
  2. package/dist/{agent-6XOI7RVW.js.map → agent-HNV2VUCO.js.map} +1 -1
  3. package/dist/baseline-6WTULHM5.js +9 -0
  4. package/dist/{baseline-PY6TETA5.js.map → baseline-6WTULHM5.js.map} +1 -1
  5. package/dist/{chunk-B6S2DSBS.js → chunk-2TLQDF6C.js} +129 -20
  6. package/dist/chunk-2TLQDF6C.js.map +1 -0
  7. package/dist/{chunk-X634FZVG.js → chunk-3LOWJSAF.js} +11 -16
  8. package/dist/{chunk-X634FZVG.js.map → chunk-3LOWJSAF.js.map} +1 -1
  9. package/dist/{chunk-BMUTNUB7.js → chunk-4HFSUIIN.js} +117 -6
  10. package/dist/chunk-4HFSUIIN.js.map +1 -0
  11. package/dist/{chunk-3VSU7G75.js → chunk-536J6HUR.js} +235 -13
  12. package/dist/chunk-536J6HUR.js.map +1 -0
  13. package/dist/{chunk-EETK7S43.js → chunk-5VH3Y4QC.js} +111 -33
  14. package/dist/chunk-5VH3Y4QC.js.map +1 -0
  15. package/dist/{chunk-PHGAUWWF.js → chunk-6I4TXAI6.js} +3 -3
  16. package/dist/{chunk-PHGAUWWF.js.map → chunk-6I4TXAI6.js.map} +1 -1
  17. package/dist/{chunk-FF5ZQ6KI.js → chunk-6JP7HGIF.js} +4 -4
  18. package/dist/{chunk-FF5ZQ6KI.js.map → chunk-6JP7HGIF.js.map} +1 -1
  19. package/dist/chunk-AJ2KE3NT.js +446 -0
  20. package/dist/chunk-AJ2KE3NT.js.map +1 -0
  21. package/dist/{chunk-WK52LWRX.js → chunk-B2KLJPFY.js} +5 -5
  22. package/dist/{chunk-WK52LWRX.js.map → chunk-B2KLJPFY.js.map} +1 -1
  23. package/dist/{chunk-Z7VH4RPO.js → chunk-BBFQZ7CA.js} +4 -4
  24. package/dist/{chunk-Z7VH4RPO.js.map → chunk-BBFQZ7CA.js.map} +1 -1
  25. package/dist/{chunk-FHJBGPJZ.js → chunk-BWMMR5XA.js} +4 -4
  26. package/dist/{chunk-FHJBGPJZ.js.map → chunk-BWMMR5XA.js.map} +1 -1
  27. package/dist/{chunk-KLO2XBUX.js → chunk-CC6F75GI.js} +14 -7
  28. package/dist/chunk-CC6F75GI.js.map +1 -0
  29. package/dist/{chunk-SCTLOFNH.js → chunk-CE45STY5.js} +4 -4
  30. package/dist/{chunk-SCTLOFNH.js.map → chunk-CE45STY5.js.map} +1 -1
  31. package/dist/{chunk-MOLBANFB.js → chunk-DIU3MXB3.js} +4 -4
  32. package/dist/{chunk-MOLBANFB.js.map → chunk-DIU3MXB3.js.map} +1 -1
  33. package/dist/{chunk-5IA2TA57.js → chunk-FKFRASAB.js} +323 -152
  34. package/dist/chunk-FKFRASAB.js.map +1 -0
  35. package/dist/{chunk-EVLS2M5G.js → chunk-JFE7XCAE.js} +3 -3
  36. package/dist/{chunk-EVLS2M5G.js.map → chunk-JFE7XCAE.js.map} +1 -1
  37. package/dist/{chunk-RGEVBSLK.js → chunk-JUSXLCSE.js} +3 -3
  38. package/dist/{chunk-RGEVBSLK.js.map → chunk-JUSXLCSE.js.map} +1 -1
  39. package/dist/{chunk-7G5S5KZN.js → chunk-KUZLILN3.js} +16 -3
  40. package/dist/chunk-KUZLILN3.js.map +1 -0
  41. package/dist/{chunk-AVCBKQKA.js → chunk-N4IDP2M2.js} +218 -51
  42. package/dist/chunk-N4IDP2M2.js.map +1 -0
  43. package/dist/{chunk-XRN7DQGR.js → chunk-NJFQCDGA.js} +3 -3
  44. package/dist/{chunk-XRN7DQGR.js.map → chunk-NJFQCDGA.js.map} +1 -1
  45. package/dist/{chunk-LTTVCI5C.js → chunk-O7MTBC52.js} +134 -9
  46. package/dist/chunk-O7MTBC52.js.map +1 -0
  47. package/dist/chunk-QT2PMGN3.js +6 -0
  48. package/dist/{chunk-DEKGSQHL.js.map → chunk-QT2PMGN3.js.map} +1 -1
  49. package/dist/{chunk-5XIEVZLW.js → chunk-S4NSF5AZ.js} +6 -6
  50. package/dist/{chunk-5XIEVZLW.js.map → chunk-S4NSF5AZ.js.map} +1 -1
  51. package/dist/{chunk-TRKRRX2S.js → chunk-SJFBXCII.js} +35 -6
  52. package/dist/chunk-SJFBXCII.js.map +1 -0
  53. package/dist/{chunk-RIWLXMMT.js → chunk-SNKTD23L.js} +109 -10
  54. package/dist/chunk-SNKTD23L.js.map +1 -0
  55. package/dist/{chunk-IPICO2RV.js → chunk-VIWZ4QT7.js} +14 -3
  56. package/dist/chunk-VIWZ4QT7.js.map +1 -0
  57. package/dist/{chunk-US2DAKCM.js → chunk-Y7YKUZ3T.js} +8 -7
  58. package/dist/chunk-Y7YKUZ3T.js.map +1 -0
  59. package/dist/cli.js +732 -347
  60. package/dist/cli.js.map +1 -1
  61. package/dist/ensure-map-5YEI7R7V.js +29 -0
  62. package/dist/{ensure-map-UQL7SM34.js.map → ensure-map-5YEI7R7V.js.map} +1 -1
  63. package/dist/{graph-backend-G5Y6QQV4.js → graph-backend-CPHLUKUC.js} +5 -5
  64. package/dist/{graph-backend-G5Y6QQV4.js.map → graph-backend-CPHLUKUC.js.map} +1 -1
  65. package/dist/index.d.ts +127 -9
  66. package/dist/index.js +17 -16
  67. package/dist/index.js.map +1 -1
  68. package/dist/{interactive-QWT7ERXJ.js → interactive-TNRE4OEK.js} +46 -33
  69. package/dist/interactive-TNRE4OEK.js.map +1 -0
  70. package/dist/{llm-host-DZBD5D36.js → llm-host-XFYFOAAX.js} +4 -4
  71. package/dist/{llm-host-DZBD5D36.js.map → llm-host-XFYFOAAX.js.map} +1 -1
  72. package/dist/load-MWG6WZTK.js +10 -0
  73. package/dist/{load-WA53B3GW.js.map → load-MWG6WZTK.js.map} +1 -1
  74. package/dist/model-manager-GJ2YSTSK.js +1 -1
  75. package/dist/{run-outcome-J2IDIVYI.js → run-outcome-375HMSQG.js} +6 -6
  76. package/dist/{run-outcome-J2IDIVYI.js.map → run-outcome-375HMSQG.js.map} +1 -1
  77. package/dist/runtime-session-3MPWXNRL.js +20 -0
  78. package/dist/{runtime-session-52P2Y5LX.js.map → runtime-session-3MPWXNRL.js.map} +1 -1
  79. package/dist/session-2NGJLI5Y.js +15 -0
  80. package/dist/{session-L7SJNE55.js.map → session-2NGJLI5Y.js.map} +1 -1
  81. package/dist/session-store-F7NX7SZN.js +4 -0
  82. package/dist/{session-store-SQECEXUU.js.map → session-store-F7NX7SZN.js.map} +1 -1
  83. package/dist/{stream-json-TSGYC2MQ.js → stream-json-AUMU3NLV.js} +48 -16
  84. package/dist/stream-json-AUMU3NLV.js.map +1 -0
  85. package/dist/{vg-mcp-bridge-IFAXEQMZ.js → vg-mcp-bridge-D463EHQI.js} +13 -11
  86. package/dist/vg-mcp-bridge-D463EHQI.js.map +1 -0
  87. package/dist/{vgd-PNR7UKLL.js → vgd-Z23PXSP4.js} +10 -10
  88. package/dist/vgd-Z23PXSP4.js.map +1 -0
  89. package/package.json +4 -2
  90. package/dist/agent-6XOI7RVW.js +0 -22
  91. package/dist/baseline-PY6TETA5.js +0 -9
  92. package/dist/chunk-3VSU7G75.js.map +0 -1
  93. package/dist/chunk-5IA2TA57.js.map +0 -1
  94. package/dist/chunk-7G5S5KZN.js.map +0 -1
  95. package/dist/chunk-AVCBKQKA.js.map +0 -1
  96. package/dist/chunk-B6S2DSBS.js.map +0 -1
  97. package/dist/chunk-BMUTNUB7.js.map +0 -1
  98. package/dist/chunk-DEKGSQHL.js +0 -6
  99. package/dist/chunk-EETK7S43.js.map +0 -1
  100. package/dist/chunk-IPICO2RV.js.map +0 -1
  101. package/dist/chunk-KLO2XBUX.js.map +0 -1
  102. package/dist/chunk-LTTVCI5C.js.map +0 -1
  103. package/dist/chunk-RIWLXMMT.js.map +0 -1
  104. package/dist/chunk-TRKRRX2S.js.map +0 -1
  105. package/dist/chunk-US2DAKCM.js.map +0 -1
  106. package/dist/chunk-ZKNB4YH4.js +0 -102
  107. package/dist/chunk-ZKNB4YH4.js.map +0 -1
  108. package/dist/ensure-map-UQL7SM34.js +0 -28
  109. package/dist/interactive-QWT7ERXJ.js.map +0 -1
  110. package/dist/load-WA53B3GW.js +0 -10
  111. package/dist/runtime-session-52P2Y5LX.js +0 -20
  112. package/dist/session-L7SJNE55.js +0 -13
  113. package/dist/session-store-SQECEXUU.js +0 -4
  114. package/dist/stream-json-TSGYC2MQ.js.map +0 -1
  115. package/dist/vg-mcp-bridge-IFAXEQMZ.js.map +0 -1
  116. package/dist/vgd-PNR7UKLL.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ export { ensureCodeMap } from './chunk-CE45STY5.js';
2
+ import './chunk-O7MTBC52.js';
3
+ import './chunk-CT5BS56U.js';
4
+ import './chunk-FKFRASAB.js';
5
+ import './chunk-SNKTD23L.js';
6
+ import './chunk-NJFQCDGA.js';
7
+ import './chunk-HTLDXEHW.js';
8
+ import './chunk-CQDUBAQY.js';
9
+ import './chunk-OV4KGXPD.js';
10
+ import './chunk-DT4KIVRI.js';
11
+ import './chunk-CRAMOEBE.js';
12
+ import './chunk-VIWZ4QT7.js';
13
+ import './chunk-BWMMR5XA.js';
14
+ import './chunk-3LSG7Z4I.js';
15
+ import './chunk-J7LKEB2R.js';
16
+ import './chunk-5VH3Y4QC.js';
17
+ import './chunk-UTNNGKKX.js';
18
+ import './chunk-RXP66R2E.js';
19
+ import './chunk-DIU3MXB3.js';
20
+ import './chunk-N4IDP2M2.js';
21
+ import './chunk-QT2PMGN3.js';
22
+ import './chunk-AJ2KE3NT.js';
23
+ import './chunk-5I4VSBWQ.js';
24
+ import './chunk-BWPBB45M.js';
25
+ import './chunk-JFGYT6BI.js';
26
+ import './chunk-BPF3YX2U.js';
27
+ import './chunk-Z6ZWNWWR.js';
28
+ //# sourceMappingURL=ensure-map-5YEI7R7V.js.map
29
+ //# sourceMappingURL=ensure-map-5YEI7R7V.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ensure-map-UQL7SM34.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ensure-map-5YEI7R7V.js"}
@@ -1,11 +1,11 @@
1
- export { localGraphBackend, resolveGraphBackend, vgdGraphBackend } from './chunk-RGEVBSLK.js';
1
+ export { localGraphBackend, resolveGraphBackend, vgdGraphBackend } from './chunk-JUSXLCSE.js';
2
2
  import './chunk-RBIRXQR6.js';
3
3
  import './chunk-J7LKEB2R.js';
4
- import './chunk-EETK7S43.js';
5
- import './chunk-ZKNB4YH4.js';
4
+ import './chunk-5VH3Y4QC.js';
5
+ import './chunk-AJ2KE3NT.js';
6
6
  import './chunk-BWPBB45M.js';
7
7
  import './chunk-JFGYT6BI.js';
8
8
  import './chunk-BPF3YX2U.js';
9
9
  import './chunk-Z6ZWNWWR.js';
10
- //# sourceMappingURL=graph-backend-G5Y6QQV4.js.map
11
- //# sourceMappingURL=graph-backend-G5Y6QQV4.js.map
10
+ //# sourceMappingURL=graph-backend-CPHLUKUC.js.map
11
+ //# sourceMappingURL=graph-backend-CPHLUKUC.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"graph-backend-G5Y6QQV4.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"graph-backend-CPHLUKUC.js"}
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 { e as AnalysisTier, C as Centrality, D as DerivedBy, f as EpistemicTier, g as FactConfidence, h as FactKind, i as GraphMeta, j as GraphSummaries, H as HubBlastSummary, N as NodeKind, P as Provenance, S as SCHEMA_VERSION, k as Span, T as Toolchain, U as Unknown } from './types-DLH-Ritr.js';
3
3
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
4
4
 
5
- declare const VERSION = "2026.731.3";
5
+ declare const VERSION = "2026.803.1";
6
6
 
7
7
  /**
8
8
  * Analysis stage: importance, centrality, hubs, communities, and surprise.
@@ -142,6 +142,9 @@ interface ResolveResult {
142
142
  edges: GraphEdge[];
143
143
  /** References the heuristic rung could not resolve (deduped, sorted). */
144
144
  unresolved: UnresolvedRef[];
145
+ /** File-level resolved import targets (rel → rels), for downstream
146
+ * change-scoping (the tsc cache's dependency-closure keys). Not serialized. */
147
+ importsByFile: Map<string, Set<string>>;
145
148
  /** Diagnostic counts, surfaced by `vg status`. */
146
149
  stats: {
147
150
  callsResolved: number;
@@ -231,6 +234,9 @@ interface BuildResult {
231
234
  heritage: number;
232
235
  resolved: number;
233
236
  shards?: number;
237
+ /** Files whose checker output was reused from the tsc cache (change-scoped
238
+ * downstream, gap-closure 2c). Subset of `files`. */
239
+ reusedFiles?: number;
234
240
  };
235
241
  /** Present when a SCIP index was ingested. */
236
242
  scip?: {
@@ -520,19 +526,51 @@ type EmbedProgress = (done: number, total: number) => void;
520
526
  */
521
527
  declare function getNodeEmbeddings(graph: VgGraph, embedder: Embedder, root: string, onProgress?: EmbedProgress): Promise<Map<string, number[]>>;
522
528
 
529
+ interface RelevanceExpansion {
530
+ /** Single lowercase word, ready for identifier-part matching. */
531
+ term: string;
532
+ /** The question token/phrase (or topic id) that produced it. */
533
+ from: string;
534
+ /** 0..1 relative confidence; scales the expansion's scoring contribution. */
535
+ weight: number;
536
+ }
537
+ interface RelevanceTopic {
538
+ id: string;
539
+ /** 0..1, normalized within one analysis. */
540
+ score: number;
541
+ }
542
+ interface RelevanceAnalysis {
543
+ version: string;
544
+ topics: RelevanceTopic[];
545
+ expansions: RelevanceExpansion[];
546
+ }
547
+
523
548
  /**
524
549
  * Deterministic retrieval for `vg ask` (VG-CLI-SPEC §3.2).
525
550
  *
526
551
  * Builds a structured, fact-annotated, budget-bounded context block for a
527
552
  * question — designed to drop straight into an assistant's context. The default
528
- * is deterministic lexical+structural retrieval (identifier/term matching with
529
- * morphological prefix-fuzzing, ranked by importance). `--semantic`/`--deep` adds
553
+ * is deterministic lexical+structural retrieval: identifier/term matching with
554
+ * morphological prefix-fuzzing, term-role weighting (process verbs like "add"
555
+ * only corroborate, never seed — see engine/concepts.ts), static concept
556
+ * expansion ("payments" → stripe/billing/…, "direct debit" → sepa/bacs/mandate),
557
+ * and a multi-term coverage bonus, ranked with importance as a mild tiebreaker.
558
+ * `--semantic`/`--deep` adds
530
559
  * a hybrid local-embedding pass (`queryGraphSemantic`) that surfaces conceptually
531
560
  * related code even when no word is shared — still no API key.
532
561
  */
533
562
  interface QueryOptions {
534
563
  budget?: number;
535
564
  limit?: number;
565
+ /** Optional pre-computed relevance analysis (engine/relevance-provider.ts).
566
+ * Injected by async callers so this module stays pure and sync; when
567
+ * absent, ranking is exactly the built-in lexicon path. */
568
+ relevance?: RelevanceAnalysis | null;
569
+ /** Optional per-node topic tags (engine/relevance-enrich.ts). Combined with
570
+ * `relevance.topics` into a bounded affinity bonus: a node structurally
571
+ * tagged with a topic the question is about ranks above an equal textual
572
+ * match outside it. Never seeds alone — it multiplies existing evidence. */
573
+ topicTags?: Map<string, readonly string[]> | null;
536
574
  }
537
575
  interface QueryMatch {
538
576
  node: GraphNode;
@@ -552,11 +590,12 @@ interface SemanticQueryOptions extends QueryOptions {
552
590
  nodeVectors: Map<string, number[]>;
553
591
  }
554
592
  /**
555
- * Hybrid lexical + local-embedding retrieval. Blends the normalized lexical score
556
- * with cosine similarity to the query embedding (50/50), so a question like
557
- * "where do we handle auth failures?" can surface `verify_token` even with no
558
- * shared identifier. Deterministic given the same model + cached vectors;
559
- * embeddings live only in the cache, never in `graph.json`.
593
+ * Hybrid lexical + local-embedding retrieval, combined with Reciprocal Rank
594
+ * Fusion (Phase 3.2 replaces the former 50/50 score blend), so a question
595
+ * like "where do we handle auth failures?" can surface `verify_token` even
596
+ * with no shared identifier. Topic affinity and importance stay multiplicative
597
+ * tiebreakers on the fused score. Deterministic given the same model + cached
598
+ * vectors; embeddings live only in the cache, never in `graph.json`.
560
599
  */
561
600
  declare function queryGraphSemantic(graph: VgGraph, question: string, options: SemanticQueryOptions): Promise<QueryResult>;
562
601
  /**
@@ -669,6 +708,8 @@ interface ToolContext {
669
708
  dedup?: boolean;
670
709
  /** Per-session set of node ids already returned in full (drives `--dedup`). */
671
710
  seen?: Set<string>;
711
+ /** Path the served graph was loaded from (locates its tags sidecar). */
712
+ graphPath?: string;
672
713
  }
673
714
  interface VgTool {
674
715
  name: string;
@@ -677,6 +718,23 @@ interface VgTool {
677
718
  handler: (graph: VgGraph, args: Record<string, unknown>, ctx: ToolContext) => unknown | Promise<unknown>;
678
719
  }
679
720
  declare const TOOLS: VgTool[];
721
+ /**
722
+ * Server-side listing surface (the complement of the client-side deferral
723
+ * below, for hosts that cannot defer): `--surface hot` / `VG_MCP_SURFACE=hot`
724
+ * lists only the hot core, and `--tools a,b` / `VG_MCP_TOOLS=a,b` lists an
725
+ * explicit subset. LISTING ONLY — every tool in `TOOLS` stays callable
726
+ * whatever is listed (dispatch always resolves against the full array), so
727
+ * behaviour, ranking, and responses are byte-identical across surfaces; the
728
+ * only thing that changes is which schemas the host bills per step. Unknown
729
+ * names are dropped; an empty resolved set falls back to the full surface
730
+ * (fail-open — a typo must never produce a toolless server).
731
+ */
732
+ interface ToolSurface {
733
+ /** 'hot' lists only HOT_TOOLS; 'full' (default) lists everything. */
734
+ surface?: 'hot' | 'full';
735
+ /** Explicit tool names to list (wins over `surface`). */
736
+ tools?: string[];
737
+ }
680
738
 
681
739
  /** The graph-affecting discovery/build scope, replayed verbatim on refresh. */
682
740
  interface BuildScope {
@@ -949,6 +1007,13 @@ interface ServeOptions {
949
1007
  dedup?: boolean;
950
1008
  /** Auto-refresh the map when the working tree drifts (default true). */
951
1009
  refresh?: boolean;
1010
+ /**
1011
+ * Event-driven refresh: recursive fs.watch on the workspace so a save
1012
+ * rebuilds in ~400 ms instead of waiting out the freshness poll (default
1013
+ * true when refresh is on; `--no-watch` opts out). Where recursive watch is
1014
+ * unavailable the poll silently remains the only mechanism.
1015
+ */
1016
+ watch?: boolean;
952
1017
  /**
953
1018
  * Workspace root (project directory). When set, freshness probes and tools
954
1019
  * use this instead of inferring root from the graph path.
@@ -960,6 +1025,12 @@ interface ServeOptions {
960
1025
  * the process (the opt-in ledger above is a separate concern).
961
1026
  */
962
1027
  stats?: SessionStats;
1028
+ /**
1029
+ * Listing surface (`--surface hot` / `--tools a,b`). Filters ONLY what
1030
+ * `tools/list` advertises; every tool stays callable so behaviour is
1031
+ * byte-identical across surfaces. See `listedToolNames` in ./tools.ts.
1032
+ */
1033
+ toolSurface?: ToolSurface;
963
1034
  }
964
1035
  declare class GraphSource {
965
1036
  readonly graphPath: string;
@@ -976,6 +1047,16 @@ declare class GraphSource {
976
1047
  /** Self-tuned: grows with measured probe/rebuild cost so huge repos aren't penalized. */
977
1048
  private probeIntervalMs;
978
1049
  private readonly refreshImpl;
1050
+ /**
1051
+ * Files seen changing since the last COMMITTED refresh (watcher events,
1052
+ * filename → last-seen ms). Entries are cleared only after a refresh that
1053
+ * started at-or-after their last event completes with 'fresh'/'refreshed' —
1054
+ * a change landing mid-refresh stays pending, so the staleness signal can
1055
+ * be a false positive but never a false negative.
1056
+ */
1057
+ private readonly pendingChanges;
1058
+ private watcher;
1059
+ private watchTimer;
979
1060
  constructor(graphPath: string, refresh?: boolean,
980
1061
  /** Timing / root overrides (production passes `root`; tests may pass more). */
981
1062
  tuning?: GraphSourceTuning);
@@ -986,6 +1067,28 @@ declare class GraphSource {
986
1067
  * degrade to "answer from the current map", not break the tool call.
987
1068
  */
988
1069
  private maybeRefresh;
1070
+ /**
1071
+ * Record a source change (watcher event, or a test). Arms the next probe to
1072
+ * run immediately (bypassing the self-tuned interval — a real event is not a
1073
+ * poll) and schedules a debounced background refresh so the rebuild happens
1074
+ * BETWEEN tool calls instead of on the next call's 100 ms budget.
1075
+ */
1076
+ notePendingChange(filename: string): void;
1077
+ /**
1078
+ * Event-driven freshness (the serve-loop watcher): a recursive `fs.watch`
1079
+ * on the workspace feeds `notePendingChange`, so a save triggers a rebuild
1080
+ * in ~WATCH_DEBOUNCE_MS instead of waiting out the 2–30 s poll. The poll
1081
+ * stays armed as the fallback — on filesystems where recursive watch fails
1082
+ * (some containers/NFS) this returns false and behaviour is unchanged.
1083
+ */
1084
+ startWatching(): boolean;
1085
+ stopWatching(): void;
1086
+ /**
1087
+ * In-band staleness signal for tool responses: what has changed since the
1088
+ * last committed refresh. Null when the map is current (the common case —
1089
+ * responses carry zero overhead then).
1090
+ */
1091
+ stalenessNote(): string | null;
989
1092
  }
990
1093
  declare function createServer(source: GraphSource, opts?: ServeOptions): Server;
991
1094
  declare function serveStdio(graphPath: string, opts?: ServeOptions): Promise<void>;
@@ -1360,6 +1463,11 @@ interface BuildContextOptions {
1360
1463
  impactDepth?: number;
1361
1464
  /** Restrict the edit surface to these files (from `--file`), if given. */
1362
1465
  files?: string[];
1466
+ /** Optional pre-computed relevance analysis (engine/relevance-provider.ts),
1467
+ * loaded by the async caller; widens seed vocabulary deterministically. */
1468
+ relevance?: RelevanceAnalysis | null;
1469
+ /** Optional per-node topic tags (engine/relevance-enrich.ts). */
1470
+ topicTags?: Map<string, readonly string[]> | null;
1363
1471
  }
1364
1472
  /**
1365
1473
  * Build the context block for a coding instruction. The ordering is
@@ -1387,7 +1495,14 @@ declare function buildCodeContext(graph: VgGraph, instruction: string, options?:
1387
1495
  declare const TASK_CAPSULE_SCHEMA_VERSION: "task-capsule/0";
1388
1496
  /** Frozen ranking policy id — bump when the heuristic changes (benchmark gate). */
1389
1497
  /** Bumped 2026.07.1: strip URL/quoted needles from seed ranking (no path-token false positives). */
1390
- declare const CAPSULE_RANKING_VERSION: "capsule-rank@2026.07.1";
1498
+ /** Bumped 2026.08.1: term roles (weak process verbs never seed alone), concept/bigram
1499
+ * expansion (payments→stripe, "direct debit"→sepa/bacs/mandate), multi-term coverage
1500
+ * bonus, directory-segment evidence — gated by the ask-quality corpus (bench/ask-corpus.mjs). */
1501
+ /** Bumped 2026.08.2: optional relevance-provider seam — sanitized provider expansions
1502
+ * join term preparation (own 0..1 weight capped at EXPANSION_WEIGHT; weak-provenance
1503
+ * dropped); provider version recorded as `relevanceVersion` provenance. Absent
1504
+ * provider = 2026.08.1 behaviour exactly — gated by the same corpus, dual-mode. */
1505
+ declare const CAPSULE_RANKING_VERSION: "capsule-rank@2026.08.2";
1391
1506
  declare const CAPSULE_COMPILER_ID: "vg-task-capsule/0";
1392
1507
  interface BuildCapsuleOptions extends BuildContextOptions {
1393
1508
  /**
@@ -1463,6 +1578,9 @@ interface TaskCapsule {
1463
1578
  securityTier?: string | null;
1464
1579
  /** Frozen policy / ranking patch id if any. */
1465
1580
  policyVersion?: string | null;
1581
+ /** Version of the optional relevance provider that widened seed
1582
+ * vocabulary for this capsule, or null when none was active. */
1583
+ relevanceVersion?: string | null;
1466
1584
  };
1467
1585
  }
1468
1586
  interface CapsuleProvenanceExtras {
package/dist/index.js CHANGED
@@ -1,28 +1,29 @@
1
- export { GraphSource, createServer, exportGraph, formatForExt, serveStdio } from './chunk-B6S2DSBS.js';
2
- export { refreshIfStale } from './chunk-5XIEVZLW.js';
3
- export { ASSISTANTS, ResourceLimitError, SKIP_DIRS, SKIP_FILES, UsageError, analyze, applyCoverage, assistantById, buildFacts, buildGraph, decodeScipIndex, discover, driftCount, groundGraph, hasDrift, installAssistant, loadCoverage, loadSnapshot, probeFreshness, resolveLimits, scipEdges, uninstallAssistant, verifyDeterminism, writeSnapshot } from './chunk-5IA2TA57.js';
4
- export { FREE_PACK, TOOLS, coveringTests, detectRunner, shortestPath, testsToRun } from './chunk-RIWLXMMT.js';
5
- import './chunk-XRN7DQGR.js';
1
+ export { GraphSource, createServer, exportGraph, formatForExt, serveStdio } from './chunk-2TLQDF6C.js';
2
+ export { refreshIfStale } from './chunk-S4NSF5AZ.js';
3
+ export { ASSISTANTS, ResourceLimitError, SKIP_DIRS, SKIP_FILES, UsageError, analyze, applyCoverage, assistantById, buildFacts, buildGraph, decodeScipIndex, discover, driftCount, groundGraph, hasDrift, installAssistant, loadCoverage, loadSnapshot, probeFreshness, resolveLimits, scipEdges, uninstallAssistant, verifyDeterminism, writeSnapshot } from './chunk-FKFRASAB.js';
4
+ export { FREE_PACK, TOOLS, coveringTests, detectRunner, shortestPath, testsToRun } from './chunk-SNKTD23L.js';
5
+ import './chunk-NJFQCDGA.js';
6
6
  import './chunk-HTLDXEHW.js';
7
+ export { discoverModels } from './chunk-CQDUBAQY.js';
8
+ import './chunk-OV4KGXPD.js';
9
+ import './chunk-DT4KIVRI.js';
7
10
  import './chunk-CRAMOEBE.js';
8
- export { CAPSULE_COMPILER_ID, CAPSULE_RANKING_VERSION, TASK_CAPSULE_SCHEMA_VERSION, buildCodeContext, buildTaskCapsule, capsuleToCodeContext, readSavings, recordSaving, savingsRecorded, summarizeCapsule } from './chunk-US2DAKCM.js';
9
- export { applyStaticTestLinkage, buildModuleResolver, isTestFile, parseJsonc, relativeResolver } from './chunk-IPICO2RV.js';
10
- export { addLibrary, inventory as dependencyInventory, driftFor, enrichOnline, libId, loadCatalog, readDoc, resolveLib, saveCatalog, searchSymbols } from './chunk-FHJBGPJZ.js';
11
+ export { CAPSULE_COMPILER_ID, CAPSULE_RANKING_VERSION, TASK_CAPSULE_SCHEMA_VERSION, buildCodeContext, buildTaskCapsule, capsuleToCodeContext, readSavings, recordSaving, savingsRecorded, summarizeCapsule } from './chunk-Y7YKUZ3T.js';
12
+ export { applyStaticTestLinkage, buildModuleResolver, isTestFile, parseJsonc, relativeResolver } from './chunk-VIWZ4QT7.js';
13
+ export { addLibrary, inventory as dependencyInventory, driftFor, enrichOnline, libId, loadCatalog, readDoc, resolveLib, saveCatalog, searchSymbols } from './chunk-BWMMR5XA.js';
11
14
  import './chunk-3LSG7Z4I.js';
12
15
  export { findNodes, nodeById, resolveOne } from './chunk-J7LKEB2R.js';
13
- export { GraphIndex, cosine, getNodeEmbeddings, identifierParts, impactOf, loadEmbedder, nodeEmbedText, queryGraph, queryGraphSemantic } from './chunk-EETK7S43.js';
14
- export { discoverModels } from './chunk-CQDUBAQY.js';
15
- import './chunk-OV4KGXPD.js';
16
+ export { GraphIndex, cosine, getNodeEmbeddings, identifierParts, impactOf, loadEmbedder, nodeEmbedText, queryGraph, queryGraphSemantic } from './chunk-5VH3Y4QC.js';
16
17
  export { LANGUAGES, allLanguageIds, grammarsSourceDir, langById, langForExtension, parseSource } from './chunk-UTNNGKKX.js';
17
18
  import { redactUrlCredentials, redactSecrets } from './chunk-RXP66R2E.js';
18
- export { SCHEMA_VERSION, loadGraph } from './chunk-MOLBANFB.js';
19
- export { defaultGraphPath, legacyGraphPath, preferInRepoGraph, renderHtml, renderReport, resolveGraphPath, vibgrateDir, writeArtifacts } from './chunk-AVCBKQKA.js';
20
- export { VERSION } from './chunk-DEKGSQHL.js';
21
- export { parseGraph, serializeGraph, stableStringify } from './chunk-ZKNB4YH4.js';
19
+ export { SCHEMA_VERSION, loadGraph } from './chunk-DIU3MXB3.js';
20
+ export { defaultGraphPath, legacyGraphPath, preferInRepoGraph, renderHtml, renderReport, resolveGraphPath, vibgrateDir, writeArtifacts } from './chunk-N4IDP2M2.js';
21
+ export { VERSION } from './chunk-QT2PMGN3.js';
22
+ export { parseGraph, serializeGraph, stableStringify } from './chunk-AJ2KE3NT.js';
23
+ import './chunk-5I4VSBWQ.js';
22
24
  import './chunk-BWPBB45M.js';
23
25
  import './chunk-JFGYT6BI.js';
24
26
  import './chunk-BPF3YX2U.js';
25
- import './chunk-DT4KIVRI.js';
26
27
  import './chunk-Z6ZWNWWR.js';
27
28
  import { execFileSync } from 'child_process';
28
29
 
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/engine/push.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,SAAS,aAAA,CAAc,IAAA,EAAc,KAAA,EAAgB,YAAA,EAA4C;AACtG,EAAA,MAAM,MAAM,GAAA,CAAI,IAAA,EAAM,CAAC,WAAA,EAAa,MAAM,CAAC,CAAA,IAAK,0CAAA;AAChD,EAAA,MAAM,MAAA,GAAS,IAAI,IAAA,EAAM,CAAC,aAAa,cAAA,EAAgB,MAAM,CAAC,CAAA,IAAK,MAAA;AACnE,EAAA,MAAM,SAAA,GAAY,IAAI,IAAA,EAAM,CAAC,UAAU,OAAA,EAAS,mBAAmB,CAAC,CAAA,IAAK,MAAA;AACzE,EAAA,OAAO;AAAA,IACL,aAAA,EAAe,cAAA;AAAA,IACf,YAAA,EAAc,OAAA;AAAA,IACd,YAAA;AAAA,IACA,GAAA,EAAK,EAAE,GAAA,EAAK,QAAA,EAAU,IAAI,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA,EAAG,MAAA,EAAO;AAAA,IAC/C,YAAY,SAAA,GAAY,EAAE,WAAW,oBAAA,CAAqB,SAAS,GAAE,GAAI,MAAA;AAAA,IACzE,aAAa,KAAA,CAAM,WAAA;AAAA,IACnB,KAAA,EAAO,YAAY,KAAK;AAAA,GAC1B;AACF;AAOO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,OAAO;AAAA,IACL,GAAG,KAAA;AAAA,IACH,KAAA,EAAO,KAAA,CAAM,KAAA,CAAM,GAAA,CAAI,CAAC,CAAA,KAAM;AAC5B,MAAA,MAAM,YAAY,CAAA,CAAE,SAAA,GAAY,cAAc,CAAA,CAAE,SAAS,IAAI,CAAA,CAAE,SAAA;AAC/D,MAAA,MAAM,MAAM,CAAA,CAAE,GAAA,GAAM,cAAc,CAAA,CAAE,GAAG,IAAI,CAAA,CAAE,GAAA;AAC7C,MAAA,OAAO,SAAA,KAAc,CAAA,CAAE,SAAA,IAAa,GAAA,KAAQ,CAAA,CAAE,GAAA,GAAM,EAAE,GAAG,CAAA,EAAG,SAAA,EAAW,GAAA,EAAI,GAAI,CAAA;AAAA,IACjF,CAAC;AAAA,GACH;AACF;AAEA,SAAS,GAAA,CAAI,MAAc,IAAA,EAA+B;AACxD,EAAA,IAAI;AACF,IAAA,OAAO,YAAA,CAAa,KAAA,EAAO,IAAA,EAAM,EAAE,GAAA,EAAK,IAAA,EAAM,QAAA,EAAU,MAAA,EAAQ,CAAA,CAAE,IAAA,EAAK,IAAK,IAAA;AAAA,EAC9E,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF","file":"index.js","sourcesContent":["import { execFileSync } from 'node:child_process';\nimport { redactSecrets, redactUrlCredentials } from '../core-open/utils/redact.js';\nimport type { VgGraph } from '../schema.js';\n\n/**\n * The deferred, decoupled push envelope (VG-PACKAGE-AND-SCHEMA §7). In the open\n * CLI `vg push` is **specified but not built**: it assembles and redacts the\n * envelope and prints a notice, but performs **no network upload**. Nothing in\n * the free path depends on it. Drift-over-time/governance is the separate\n * commercial product.\n */\n\nexport interface GraphUploadEnvelope {\n schemaVersion: 'vg-graph/1.0';\n artifactType: 'graph';\n scanIngestId?: string;\n vcs: { sha: string; shortSha: string; branch: string };\n repository?: { name?: string; remoteUrl?: string };\n generatedAt: string;\n graph: VgGraph;\n}\n\nexport function buildEnvelope(root: string, graph: VgGraph, scanIngestId?: string): GraphUploadEnvelope {\n const sha = git(root, ['rev-parse', 'HEAD']) ?? '0000000000000000000000000000000000000000';\n const branch = git(root, ['rev-parse', '--abbrev-ref', 'HEAD']) ?? 'HEAD';\n const remoteUrl = git(root, ['config', '--get', 'remote.origin.url']) ?? undefined;\n return {\n schemaVersion: 'vg-graph/1.0',\n artifactType: 'graph',\n scanIngestId,\n vcs: { sha, shortSha: sha.slice(0, 12), branch },\n repository: remoteUrl ? { remoteUrl: redactUrlCredentials(remoteUrl) } : undefined,\n generatedAt: graph.generatedAt,\n graph: redactGraph(graph),\n };\n}\n\n/**\n * Redaction pass (GUARDRAILS §1: redact before storage). The graph is structure,\n * not content, but we defensively scrub any signature/name that matches a\n * credential-shaped pattern, and strip credentials from the remote URL.\n */\nexport function redactGraph(graph: VgGraph): VgGraph {\n return {\n ...graph,\n nodes: graph.nodes.map((n) => {\n const signature = n.signature ? redactSecrets(n.signature) : n.signature;\n const doc = n.doc ? redactSecrets(n.doc) : n.doc;\n return signature !== n.signature || doc !== n.doc ? { ...n, signature, doc } : n;\n }),\n };\n}\n\nfunction git(root: string, args: string[]): string | null {\n try {\n return execFileSync('git', args, { cwd: root, encoding: 'utf8' }).trim() || null;\n } catch {\n return null;\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/engine/push.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,SAAS,aAAA,CAAc,IAAA,EAAc,KAAA,EAAgB,YAAA,EAA4C;AACtG,EAAA,MAAM,MAAM,GAAA,CAAI,IAAA,EAAM,CAAC,WAAA,EAAa,MAAM,CAAC,CAAA,IAAK,0CAAA;AAChD,EAAA,MAAM,MAAA,GAAS,IAAI,IAAA,EAAM,CAAC,aAAa,cAAA,EAAgB,MAAM,CAAC,CAAA,IAAK,MAAA;AACnE,EAAA,MAAM,SAAA,GAAY,IAAI,IAAA,EAAM,CAAC,UAAU,OAAA,EAAS,mBAAmB,CAAC,CAAA,IAAK,MAAA;AACzE,EAAA,OAAO;AAAA,IACL,aAAA,EAAe,cAAA;AAAA,IACf,YAAA,EAAc,OAAA;AAAA,IACd,YAAA;AAAA,IACA,GAAA,EAAK,EAAE,GAAA,EAAK,QAAA,EAAU,IAAI,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA,EAAG,MAAA,EAAO;AAAA,IAC/C,YAAY,SAAA,GAAY,EAAE,WAAW,oBAAA,CAAqB,SAAS,GAAE,GAAI,MAAA;AAAA,IACzE,aAAa,KAAA,CAAM,WAAA;AAAA,IACnB,KAAA,EAAO,YAAY,KAAK;AAAA,GAC1B;AACF;AAOO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,OAAO;AAAA,IACL,GAAG,KAAA;AAAA,IACH,KAAA,EAAO,KAAA,CAAM,KAAA,CAAM,GAAA,CAAI,CAAC,CAAA,KAAM;AAC5B,MAAA,MAAM,YAAY,CAAA,CAAE,SAAA,GAAY,cAAc,CAAA,CAAE,SAAS,IAAI,CAAA,CAAE,SAAA;AAC/D,MAAA,MAAM,MAAM,CAAA,CAAE,GAAA,GAAM,cAAc,CAAA,CAAE,GAAG,IAAI,CAAA,CAAE,GAAA;AAC7C,MAAA,OAAO,SAAA,KAAc,CAAA,CAAE,SAAA,IAAa,GAAA,KAAQ,CAAA,CAAE,GAAA,GAAM,EAAE,GAAG,CAAA,EAAG,SAAA,EAAW,GAAA,EAAI,GAAI,CAAA;AAAA,IACjF,CAAC;AAAA,GACH;AACF;AAEA,SAAS,GAAA,CAAI,MAAc,IAAA,EAA+B;AACxD,EAAA,IAAI;AACF,IAAA,OAAO,YAAA,CAAa,KAAA,EAAO,IAAA,EAAM,EAAE,GAAA,EAAK,IAAA,EAAM,QAAA,EAAU,MAAA,EAAQ,CAAA,CAAE,IAAA,EAAK,IAAK,IAAA;AAAA,EAC9E,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF","file":"index.js","sourcesContent":["import { execFileSync } from 'node:child_process';\nimport { redactSecrets, redactUrlCredentials } from '../core-open/utils/redact.js';\nimport type { VgGraph } from '../schema.js';\n\n/**\n * The deferred, decoupled push envelope (VG-PACKAGE-AND-SCHEMA §7). In the open\n * CLI `vg push` is **specified but not built**: it assembles and redacts the\n * envelope and prints a notice, but performs **no network upload**. Nothing in\n * the free path depends on it. Drift-over-time/governance is the separate\n * commercial product.\n */\n\nexport interface GraphUploadEnvelope {\n schemaVersion: 'vg-graph/1.0';\n artifactType: 'graph';\n scanIngestId?: string;\n vcs: { sha: string; shortSha: string; branch: string };\n repository?: { name?: string; remoteUrl?: string };\n generatedAt: string;\n graph: VgGraph;\n}\n\nexport function buildEnvelope(root: string, graph: VgGraph, scanIngestId?: string): GraphUploadEnvelope {\n const sha = git(root, ['rev-parse', 'HEAD']) ?? '0000000000000000000000000000000000000000';\n const branch = git(root, ['rev-parse', '--abbrev-ref', 'HEAD']) ?? 'HEAD';\n const remoteUrl = git(root, ['config', '--get', 'remote.origin.url']) ?? undefined;\n return {\n schemaVersion: 'vg-graph/1.0',\n artifactType: 'graph',\n scanIngestId,\n vcs: { sha, shortSha: sha.slice(0, 12), branch },\n repository: remoteUrl ? { remoteUrl: redactUrlCredentials(remoteUrl) } : undefined,\n generatedAt: graph.generatedAt,\n graph: redactGraph(graph),\n };\n}\n\n/**\n * Redaction pass (GUARDRAILS §1: redact before storage). The graph is structure,\n * not content, but we defensively scrub any signature/name that matches a\n * credential-shaped pattern, and strip credentials from the remote URL.\n */\nexport function redactGraph(graph: VgGraph): VgGraph {\n return {\n ...graph,\n nodes: graph.nodes.map((n) => {\n const signature = n.signature ? redactSecrets(n.signature) : n.signature;\n const doc = n.doc ? redactSecrets(n.doc) : n.doc;\n return signature !== n.signature || doc !== n.doc ? { ...n, signature, doc } : n;\n }),\n };\n}\n\nfunction git(root: string, args: string[]): string | null {\n try {\n return execFileSync('git', args, { cwd: root, encoding: 'utf8' }).trim() || null;\n } catch {\n return null;\n }\n}\n"]}
@@ -1,52 +1,52 @@
1
- import { startCodeRuntimeSession } from './chunk-PHGAUWWF.js';
2
- import { ensureCodeMap } from './chunk-SCTLOFNH.js';
1
+ import { startCodeRuntimeSession } from './chunk-6I4TXAI6.js';
2
+ import { ensureCodeMap } from './chunk-CE45STY5.js';
3
3
  import { TtyPrompter, PromptCancelled } from './chunk-JYS4OBN2.js';
4
4
  import { McpToolset, defaultMcpConnect } from './chunk-LEPTUB4H.js';
5
- import { newSession, loadLatestSession, summarizeSession, saveSession, recordTask } from './chunk-7G5S5KZN.js';
6
- import { fetchCatalog, resolveProviders, topProviders } from './chunk-BMUTNUB7.js';
7
- import { BranchGraphSession } from './chunk-WK52LWRX.js';
5
+ import { newSession, loadLatestSession, summarizeSession, saveSession, condenseSession, recordTask } from './chunk-KUZLILN3.js';
6
+ import { fetchCatalog, resolveProviders, topProviders } from './chunk-4HFSUIIN.js';
7
+ import { BranchGraphSession } from './chunk-B2KLJPFY.js';
8
+ import './chunk-7AVYKZEM.js';
8
9
  import './chunk-WHJMS7XC.js';
9
- import { nodeCodeFs, undoChanges } from './chunk-KLO2XBUX.js';
10
- import { printCodeLogo } from './chunk-LTTVCI5C.js';
10
+ import { nodeCodeFs, undoChanges } from './chunk-CC6F75GI.js';
11
+ import { printCodeLogo } from './chunk-O7MTBC52.js';
11
12
  import { info, c, out } from './chunk-CT5BS56U.js';
12
- import { loadOrDiscoverFederation } from './chunk-5I4VSBWQ.js';
13
13
  import { resolveExecutionEnv } from './chunk-IS7VTH2Q.js';
14
14
  import { hasOllama, gatherSystemMemory, stopModel, pullModelClean } from './chunk-OWSFZQOP.js';
15
15
  import { estimateModelBytes, assessCapability, fmt } from './chunk-7N4Y3E47.js';
16
16
  import { mergeModelExecutionProfile, resolveModelExecutionProfile } from './chunk-IZDH67DX.js';
17
- import './chunk-X634FZVG.js';
18
- import { runAgent } from './chunk-3VSU7G75.js';
17
+ import './chunk-3LOWJSAF.js';
18
+ import { runAgent } from './chunk-536J6HUR.js';
19
19
  import './chunk-543E6WDJ.js';
20
- import { summarizeDiffs } from './chunk-TRKRRX2S.js';
20
+ import { summarizeDiffs } from './chunk-SJFBXCII.js';
21
21
  import './chunk-REIGWTTH.js';
22
- import { resolveGraphBackend } from './chunk-RGEVBSLK.js';
22
+ import { resolveGraphBackend } from './chunk-JUSXLCSE.js';
23
23
  import { vgdIsRunning, vgdRequest } from './chunk-RBIRXQR6.js';
24
24
  import './chunk-5HYCB55P.js';
25
- import './chunk-7AVYKZEM.js';
26
- import { refreshIfStale } from './chunk-5XIEVZLW.js';
27
- import './chunk-5IA2TA57.js';
28
- import './chunk-RIWLXMMT.js';
29
- import './chunk-XRN7DQGR.js';
25
+ import { refreshIfStale } from './chunk-S4NSF5AZ.js';
26
+ import './chunk-FKFRASAB.js';
27
+ import './chunk-SNKTD23L.js';
28
+ import './chunk-NJFQCDGA.js';
30
29
  import './chunk-HTLDXEHW.js';
30
+ import { discoverModels } from './chunk-CQDUBAQY.js';
31
+ import './chunk-OV4KGXPD.js';
32
+ import './chunk-DT4KIVRI.js';
31
33
  import './chunk-CRAMOEBE.js';
32
- import { readModelSavings } from './chunk-US2DAKCM.js';
33
- import './chunk-IPICO2RV.js';
34
- import './chunk-FHJBGPJZ.js';
34
+ import { readModelSavings } from './chunk-Y7YKUZ3T.js';
35
+ import './chunk-VIWZ4QT7.js';
36
+ import './chunk-BWMMR5XA.js';
35
37
  import './chunk-3LSG7Z4I.js';
36
38
  import './chunk-J7LKEB2R.js';
37
- import './chunk-EETK7S43.js';
38
- import { discoverModels } from './chunk-CQDUBAQY.js';
39
- import './chunk-OV4KGXPD.js';
39
+ import './chunk-5VH3Y4QC.js';
40
40
  import './chunk-UTNNGKKX.js';
41
41
  import './chunk-RXP66R2E.js';
42
- import { loadGraph } from './chunk-MOLBANFB.js';
43
- import { resolveGraphPath } from './chunk-AVCBKQKA.js';
44
- import './chunk-DEKGSQHL.js';
45
- import './chunk-ZKNB4YH4.js';
42
+ import { loadGraph } from './chunk-DIU3MXB3.js';
43
+ import { resolveGraphPath } from './chunk-N4IDP2M2.js';
44
+ import './chunk-QT2PMGN3.js';
45
+ import './chunk-AJ2KE3NT.js';
46
+ import { loadOrDiscoverFederation } from './chunk-5I4VSBWQ.js';
46
47
  import './chunk-BWPBB45M.js';
47
48
  import './chunk-JFGYT6BI.js';
48
49
  import './chunk-BPF3YX2U.js';
49
- import './chunk-DT4KIVRI.js';
50
50
  import './chunk-Z6ZWNWWR.js';
51
51
  import { spawnSync } from 'child_process';
52
52
 
@@ -316,7 +316,7 @@ async function codingRepl(root, global, opts, selection, prompter) {
316
316
  } else prompter.note(c.dim("no previous session to continue"));
317
317
  }
318
318
  const graphHolder = { current: null };
319
- const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-IFAXEQMZ.js');
319
+ const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-D463EHQI.js');
320
320
  const vgBuiltin = createVgBuiltinMcpTools({
321
321
  getGraph: () => {
322
322
  if (!graphHolder.current) throw new Error("graph not loaded yet");
@@ -401,7 +401,7 @@ async function codingRepl(root, global, opts, selection, prompter) {
401
401
  if (line.startsWith("/")) {
402
402
  const [cmd] = line.slice(1).split(/\s+/);
403
403
  if (cmd === "help") {
404
- prompter.note("commands: /undo /diff /model /cost /clear /exit");
404
+ prompter.note("commands: /undo /diff /model /cost /compact /clear /exit");
405
405
  } else if (cmd === "undo") {
406
406
  if (lastChanges.length === 0) prompter.note(c.dim("nothing to undo"));
407
407
  else {
@@ -429,6 +429,15 @@ async function codingRepl(root, global, opts, selection, prompter) {
429
429
  } else if (cmd === "cost") {
430
430
  prompter.note(`this session: ${meter.summary()}`);
431
431
  printCost(root);
432
+ } else if (cmd === "compact") {
433
+ if (store.tasks.length <= 1) prompter.note(c.dim("nothing to compact yet"));
434
+ else {
435
+ const before = store.tasks.length;
436
+ store = condenseSession(store, Date.now());
437
+ saveSession(root, store);
438
+ priorSummary = summarizeSession(store) || void 0;
439
+ prompter.note(c.green(`compacted ${before} task(s) into one checkpoint \u2014 future turns carry the short recap`));
440
+ }
432
441
  } else if (cmd === "clear") {
433
442
  prompter.note(c.dim("each task already starts fresh \u2014 nothing to clear"));
434
443
  } else {
@@ -501,7 +510,8 @@ async function codingRepl(root, global, opts, selection, prompter) {
501
510
  executionEnv,
502
511
  graphBackend,
503
512
  modelProfile,
504
- extraPinnedFacts
513
+ extraPinnedFacts,
514
+ llmCompaction: true
505
515
  });
506
516
  priorSummary = void 0;
507
517
  if (result.changes.length) {
@@ -624,6 +634,8 @@ async function agentTask(params) {
624
634
  if (!e.ok && e.summary.trim()) {
625
635
  for (const line of e.summary.split("\n").slice(0, 6)) info(c.dim(` ${line}`));
626
636
  }
637
+ } else if (e.type === "notice") {
638
+ info(c.dim(` \xB7 ${e.text}`));
627
639
  } else if (e.type === "session-graph") {
628
640
  info(c.dim(` \xB7 session graph updated (${e.reparsed} reparsed, ${e.dirty} dirty)`));
629
641
  } else if (e.type === "capsule") {
@@ -664,6 +676,7 @@ async function agentTask(params) {
664
676
  externalTools: params.externalTools,
665
677
  capsule: params.capsule,
666
678
  files: params.files,
679
+ llmCompaction: params.llmCompaction,
667
680
  now: () => Date.now()
668
681
  });
669
682
  closeStream();
@@ -696,5 +709,5 @@ ${res.stderr}` : "");
696
709
  }
697
710
 
698
711
  export { agentTask, runInteractive };
699
- //# sourceMappingURL=interactive-QWT7ERXJ.js.map
700
- //# sourceMappingURL=interactive-QWT7ERXJ.js.map
712
+ //# sourceMappingURL=interactive-TNRE4OEK.js.map
713
+ //# sourceMappingURL=interactive-TNRE4OEK.js.map