@vibgrate/cli 2026.801.1 → 2026.803.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/agent-JTA4YWMQ.js +24 -0
  2. package/dist/{agent-4DAECASW.js.map → agent-JTA4YWMQ.js.map} +1 -1
  3. package/dist/baseline-2V7PKA7Q.js +9 -0
  4. package/dist/{baseline-4BDH4F2W.js.map → baseline-2V7PKA7Q.js.map} +1 -1
  5. package/dist/{chunk-76TDXGGF.js → chunk-3Q3ZXJZP.js} +218 -51
  6. package/dist/chunk-3Q3ZXJZP.js.map +1 -0
  7. package/dist/{chunk-G7W4MFPZ.js → chunk-4ACXDVON.js} +4 -4
  8. package/dist/{chunk-G7W4MFPZ.js.map → chunk-4ACXDVON.js.map} +1 -1
  9. package/dist/{chunk-E6H2F2XF.js → chunk-6DFV4WCQ.js} +3 -3
  10. package/dist/{chunk-E6H2F2XF.js.map → chunk-6DFV4WCQ.js.map} +1 -1
  11. package/dist/{chunk-FF5ZQ6KI.js → chunk-6JP7HGIF.js} +4 -4
  12. package/dist/{chunk-FF5ZQ6KI.js.map → chunk-6JP7HGIF.js.map} +1 -1
  13. package/dist/chunk-7KNFG44U.js +6 -0
  14. package/dist/{chunk-TGDHOAXX.js.map → chunk-7KNFG44U.js.map} +1 -1
  15. package/dist/{chunk-T6DRYOMT.js → chunk-CPLG4GFB.js} +4 -4
  16. package/dist/{chunk-T6DRYOMT.js.map → chunk-CPLG4GFB.js.map} +1 -1
  17. package/dist/{chunk-SDG242R4.js → chunk-HC44772H.js} +132 -365
  18. package/dist/chunk-HC44772H.js.map +1 -0
  19. package/dist/{chunk-MPP4S4OE.js → chunk-K6Q6HTFD.js} +32 -11
  20. package/dist/chunk-K6Q6HTFD.js.map +1 -0
  21. package/dist/{chunk-7G5S5KZN.js → chunk-KUZLILN3.js} +16 -3
  22. package/dist/chunk-KUZLILN3.js.map +1 -0
  23. package/dist/{chunk-XEJJGDGX.js → chunk-KYX2YCXT.js} +134 -9
  24. package/dist/chunk-KYX2YCXT.js.map +1 -0
  25. package/dist/{chunk-V2QK3IUY.js → chunk-L5PUNO3T.js} +4 -4
  26. package/dist/{chunk-V2QK3IUY.js.map → chunk-L5PUNO3T.js.map} +1 -1
  27. package/dist/{chunk-7PVCHLR2.js → chunk-M452MRWI.js} +109 -10
  28. package/dist/chunk-M452MRWI.js.map +1 -0
  29. package/dist/{chunk-WIDZ5IE7.js → chunk-M7773OUN.js} +14 -7
  30. package/dist/chunk-M7773OUN.js.map +1 -0
  31. package/dist/{chunk-XRN7DQGR.js → chunk-NJFQCDGA.js} +3 -3
  32. package/dist/{chunk-XRN7DQGR.js.map → chunk-NJFQCDGA.js.map} +1 -1
  33. package/dist/{chunk-BNEHDLVZ.js → chunk-NSWEJPLV.js} +129 -20
  34. package/dist/chunk-NSWEJPLV.js.map +1 -0
  35. package/dist/{chunk-JLWI2JGA.js → chunk-NUZM7UOR.js} +117 -6
  36. package/dist/chunk-NUZM7UOR.js.map +1 -0
  37. package/dist/{chunk-B3OMGYZZ.js → chunk-PXM3VZYR.js} +4 -4
  38. package/dist/{chunk-B3OMGYZZ.js.map → chunk-PXM3VZYR.js.map} +1 -1
  39. package/dist/chunk-QMME6TB4.js +457 -0
  40. package/dist/chunk-QMME6TB4.js.map +1 -0
  41. package/dist/{chunk-G25STLE7.js → chunk-SJFBXCII.js} +30 -3
  42. package/dist/chunk-SJFBXCII.js.map +1 -0
  43. package/dist/{chunk-A43I2AJ4.js → chunk-TM5XQY3L.js} +3 -3
  44. package/dist/{chunk-A43I2AJ4.js.map → chunk-TM5XQY3L.js.map} +1 -1
  45. package/dist/{chunk-KL65SSR7.js → chunk-TNADGCOX.js} +323 -152
  46. package/dist/chunk-TNADGCOX.js.map +1 -0
  47. package/dist/{chunk-V3X3DBZL.js → chunk-UXR7FBE3.js} +6 -6
  48. package/dist/{chunk-V3X3DBZL.js.map → chunk-UXR7FBE3.js.map} +1 -1
  49. package/dist/{chunk-IPICO2RV.js → chunk-VIWZ4QT7.js} +14 -3
  50. package/dist/chunk-VIWZ4QT7.js.map +1 -0
  51. package/dist/{chunk-IRCYOTRG.js → chunk-WGPS3NZQ.js} +240 -13
  52. package/dist/chunk-WGPS3NZQ.js.map +1 -0
  53. package/dist/{chunk-I6RBAIS3.js → chunk-XK5LKOBF.js} +4 -4
  54. package/dist/{chunk-I6RBAIS3.js.map → chunk-XK5LKOBF.js.map} +1 -1
  55. package/dist/cli.js +796 -359
  56. package/dist/cli.js.map +1 -1
  57. package/dist/ensure-map-TAVYMPEG.js +29 -0
  58. package/dist/{ensure-map-SMWHKOUY.js.map → ensure-map-TAVYMPEG.js.map} +1 -1
  59. package/dist/{graph-backend-I4I72J4W.js → graph-backend-WF4LGBGD.js} +5 -5
  60. package/dist/{graph-backend-I4I72J4W.js.map → graph-backend-WF4LGBGD.js.map} +1 -1
  61. package/dist/index.d.ts +143 -7
  62. package/dist/index.js +17 -16
  63. package/dist/index.js.map +1 -1
  64. package/dist/{interactive-TMQR6TXM.js → interactive-6PN237LX.js} +49 -32
  65. package/dist/interactive-6PN237LX.js.map +1 -0
  66. package/dist/load-T2FOJUPI.js +10 -0
  67. package/dist/{load-E3OTM7BS.js.map → load-T2FOJUPI.js.map} +1 -1
  68. package/dist/model-manager-GJ2YSTSK.js +1 -1
  69. package/dist/{run-outcome-QWLNBASF.js → run-outcome-AMIKAASL.js} +6 -6
  70. package/dist/{run-outcome-QWLNBASF.js.map → run-outcome-AMIKAASL.js.map} +1 -1
  71. package/dist/runtime-session-QAVOPSSH.js +20 -0
  72. package/dist/{runtime-session-UQ7UVAPL.js.map → runtime-session-QAVOPSSH.js.map} +1 -1
  73. package/dist/session-SCHQQTHN.js +15 -0
  74. package/dist/{session-MG6BJVAG.js.map → session-SCHQQTHN.js.map} +1 -1
  75. package/dist/session-store-F7NX7SZN.js +4 -0
  76. package/dist/{session-store-SQECEXUU.js.map → session-store-F7NX7SZN.js.map} +1 -1
  77. package/dist/{stream-json-GM44SP7L.js → stream-json-A6K2MONY.js} +48 -16
  78. package/dist/stream-json-A6K2MONY.js.map +1 -0
  79. package/dist/{vg-mcp-bridge-3WFC7LGE.js → vg-mcp-bridge-3TSFOL4V.js} +13 -11
  80. package/dist/vg-mcp-bridge-3TSFOL4V.js.map +1 -0
  81. package/dist/{vgd-ZUSBEVUL.js → vgd-B67JCNJP.js} +9 -9
  82. package/dist/vgd-B67JCNJP.js.map +1 -0
  83. package/package.json +1 -1
  84. package/dist/agent-4DAECASW.js +0 -22
  85. package/dist/baseline-4BDH4F2W.js +0 -9
  86. package/dist/chunk-76TDXGGF.js.map +0 -1
  87. package/dist/chunk-7G5S5KZN.js.map +0 -1
  88. package/dist/chunk-7PVCHLR2.js.map +0 -1
  89. package/dist/chunk-BNEHDLVZ.js.map +0 -1
  90. package/dist/chunk-G25STLE7.js.map +0 -1
  91. package/dist/chunk-IPICO2RV.js.map +0 -1
  92. package/dist/chunk-IRCYOTRG.js.map +0 -1
  93. package/dist/chunk-JLWI2JGA.js.map +0 -1
  94. package/dist/chunk-KL65SSR7.js.map +0 -1
  95. package/dist/chunk-MPP4S4OE.js.map +0 -1
  96. package/dist/chunk-SDG242R4.js.map +0 -1
  97. package/dist/chunk-TGDHOAXX.js +0 -6
  98. package/dist/chunk-WIDZ5IE7.js.map +0 -1
  99. package/dist/chunk-XEJJGDGX.js.map +0 -1
  100. package/dist/chunk-ZKNB4YH4.js +0 -102
  101. package/dist/chunk-ZKNB4YH4.js.map +0 -1
  102. package/dist/ensure-map-SMWHKOUY.js +0 -28
  103. package/dist/interactive-TMQR6TXM.js.map +0 -1
  104. package/dist/load-E3OTM7BS.js +0 -10
  105. package/dist/runtime-session-UQ7UVAPL.js +0 -20
  106. package/dist/session-MG6BJVAG.js +0 -13
  107. package/dist/session-store-SQECEXUU.js +0 -4
  108. package/dist/stream-json-GM44SP7L.js.map +0 -1
  109. package/dist/vg-mcp-bridge-3WFC7LGE.js.map +0 -1
  110. package/dist/vgd-ZUSBEVUL.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ export { ensureCodeMap } from './chunk-4ACXDVON.js';
2
+ import './chunk-KYX2YCXT.js';
3
+ import './chunk-CT5BS56U.js';
4
+ import './chunk-TNADGCOX.js';
5
+ import './chunk-M452MRWI.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-XK5LKOBF.js';
14
+ import './chunk-3LSG7Z4I.js';
15
+ import './chunk-J7LKEB2R.js';
16
+ import './chunk-HC44772H.js';
17
+ import './chunk-UTNNGKKX.js';
18
+ import './chunk-RXP66R2E.js';
19
+ import './chunk-CPLG4GFB.js';
20
+ import './chunk-3Q3ZXJZP.js';
21
+ import './chunk-7KNFG44U.js';
22
+ import './chunk-QMME6TB4.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-TAVYMPEG.js.map
29
+ //# sourceMappingURL=ensure-map-TAVYMPEG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ensure-map-SMWHKOUY.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ensure-map-TAVYMPEG.js"}
@@ -1,11 +1,11 @@
1
- export { localGraphBackend, resolveGraphBackend, vgdGraphBackend } from './chunk-A43I2AJ4.js';
1
+ export { localGraphBackend, resolveGraphBackend, vgdGraphBackend } from './chunk-TM5XQY3L.js';
2
2
  import './chunk-RBIRXQR6.js';
3
3
  import './chunk-J7LKEB2R.js';
4
- import './chunk-SDG242R4.js';
5
- import './chunk-ZKNB4YH4.js';
4
+ import './chunk-HC44772H.js';
5
+ import './chunk-QMME6TB4.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-I4I72J4W.js.map
11
- //# sourceMappingURL=graph-backend-I4I72J4W.js.map
10
+ //# sourceMappingURL=graph-backend-WF4LGBGD.js.map
11
+ //# sourceMappingURL=graph-backend-WF4LGBGD.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"graph-backend-I4I72J4W.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"graph-backend-WF4LGBGD.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.801.1";
5
+ declare const VERSION = "2026.803.3";
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,6 +526,25 @@ 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
  *
@@ -537,6 +562,21 @@ declare function getNodeEmbeddings(graph: VgGraph, embedder: Embedder, root: str
537
562
  interface QueryOptions {
538
563
  budget?: number;
539
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;
574
+ /** Previous conversational ask (multi-turn `vg code`). Its content terms —
575
+ * never its process verbs — join ranking at a damped weight (CARRY_WEIGHT)
576
+ * so a follow-up like "can we use direct debits?" keeps the prior turn's
577
+ * topic ("where is stripe used?") instead of ranking the repo on the
578
+ * follow-up's words alone. Absent → behaviour is unchanged. */
579
+ priorQuestion?: string | null;
540
580
  }
541
581
  interface QueryMatch {
542
582
  node: GraphNode;
@@ -556,11 +596,12 @@ interface SemanticQueryOptions extends QueryOptions {
556
596
  nodeVectors: Map<string, number[]>;
557
597
  }
558
598
  /**
559
- * Hybrid lexical + local-embedding retrieval. Blends the normalized lexical score
560
- * with cosine similarity to the query embedding (50/50), so a question like
561
- * "where do we handle auth failures?" can surface `verify_token` even with no
562
- * shared identifier. Deterministic given the same model + cached vectors;
563
- * embeddings live only in the cache, never in `graph.json`.
599
+ * Hybrid lexical + local-embedding retrieval, combined with Reciprocal Rank
600
+ * Fusion (Phase 3.2 replaces the former 50/50 score blend), so a question
601
+ * like "where do we handle auth failures?" can surface `verify_token` even
602
+ * with no shared identifier. Topic affinity and importance stay multiplicative
603
+ * tiebreakers on the fused score. Deterministic given the same model + cached
604
+ * vectors; embeddings live only in the cache, never in `graph.json`.
564
605
  */
565
606
  declare function queryGraphSemantic(graph: VgGraph, question: string, options: SemanticQueryOptions): Promise<QueryResult>;
566
607
  /**
@@ -673,6 +714,8 @@ interface ToolContext {
673
714
  dedup?: boolean;
674
715
  /** Per-session set of node ids already returned in full (drives `--dedup`). */
675
716
  seen?: Set<string>;
717
+ /** Path the served graph was loaded from (locates its tags sidecar). */
718
+ graphPath?: string;
676
719
  }
677
720
  interface VgTool {
678
721
  name: string;
@@ -681,6 +724,23 @@ interface VgTool {
681
724
  handler: (graph: VgGraph, args: Record<string, unknown>, ctx: ToolContext) => unknown | Promise<unknown>;
682
725
  }
683
726
  declare const TOOLS: VgTool[];
727
+ /**
728
+ * Server-side listing surface (the complement of the client-side deferral
729
+ * below, for hosts that cannot defer): `--surface hot` / `VG_MCP_SURFACE=hot`
730
+ * lists only the hot core, and `--tools a,b` / `VG_MCP_TOOLS=a,b` lists an
731
+ * explicit subset. LISTING ONLY — every tool in `TOOLS` stays callable
732
+ * whatever is listed (dispatch always resolves against the full array), so
733
+ * behaviour, ranking, and responses are byte-identical across surfaces; the
734
+ * only thing that changes is which schemas the host bills per step. Unknown
735
+ * names are dropped; an empty resolved set falls back to the full surface
736
+ * (fail-open — a typo must never produce a toolless server).
737
+ */
738
+ interface ToolSurface {
739
+ /** 'hot' lists only HOT_TOOLS; 'full' (default) lists everything. */
740
+ surface?: 'hot' | 'full';
741
+ /** Explicit tool names to list (wins over `surface`). */
742
+ tools?: string[];
743
+ }
684
744
 
685
745
  /** The graph-affecting discovery/build scope, replayed verbatim on refresh. */
686
746
  interface BuildScope {
@@ -953,6 +1013,13 @@ interface ServeOptions {
953
1013
  dedup?: boolean;
954
1014
  /** Auto-refresh the map when the working tree drifts (default true). */
955
1015
  refresh?: boolean;
1016
+ /**
1017
+ * Event-driven refresh: recursive fs.watch on the workspace so a save
1018
+ * rebuilds in ~400 ms instead of waiting out the freshness poll (default
1019
+ * true when refresh is on; `--no-watch` opts out). Where recursive watch is
1020
+ * unavailable the poll silently remains the only mechanism.
1021
+ */
1022
+ watch?: boolean;
956
1023
  /**
957
1024
  * Workspace root (project directory). When set, freshness probes and tools
958
1025
  * use this instead of inferring root from the graph path.
@@ -964,6 +1031,12 @@ interface ServeOptions {
964
1031
  * the process (the opt-in ledger above is a separate concern).
965
1032
  */
966
1033
  stats?: SessionStats;
1034
+ /**
1035
+ * Listing surface (`--surface hot` / `--tools a,b`). Filters ONLY what
1036
+ * `tools/list` advertises; every tool stays callable so behaviour is
1037
+ * byte-identical across surfaces. See `listedToolNames` in ./tools.ts.
1038
+ */
1039
+ toolSurface?: ToolSurface;
967
1040
  }
968
1041
  declare class GraphSource {
969
1042
  readonly graphPath: string;
@@ -980,6 +1053,16 @@ declare class GraphSource {
980
1053
  /** Self-tuned: grows with measured probe/rebuild cost so huge repos aren't penalized. */
981
1054
  private probeIntervalMs;
982
1055
  private readonly refreshImpl;
1056
+ /**
1057
+ * Files seen changing since the last COMMITTED refresh (watcher events,
1058
+ * filename → last-seen ms). Entries are cleared only after a refresh that
1059
+ * started at-or-after their last event completes with 'fresh'/'refreshed' —
1060
+ * a change landing mid-refresh stays pending, so the staleness signal can
1061
+ * be a false positive but never a false negative.
1062
+ */
1063
+ private readonly pendingChanges;
1064
+ private watcher;
1065
+ private watchTimer;
983
1066
  constructor(graphPath: string, refresh?: boolean,
984
1067
  /** Timing / root overrides (production passes `root`; tests may pass more). */
985
1068
  tuning?: GraphSourceTuning);
@@ -990,6 +1073,28 @@ declare class GraphSource {
990
1073
  * degrade to "answer from the current map", not break the tool call.
991
1074
  */
992
1075
  private maybeRefresh;
1076
+ /**
1077
+ * Record a source change (watcher event, or a test). Arms the next probe to
1078
+ * run immediately (bypassing the self-tuned interval — a real event is not a
1079
+ * poll) and schedules a debounced background refresh so the rebuild happens
1080
+ * BETWEEN tool calls instead of on the next call's 100 ms budget.
1081
+ */
1082
+ notePendingChange(filename: string): void;
1083
+ /**
1084
+ * Event-driven freshness (the serve-loop watcher): a recursive `fs.watch`
1085
+ * on the workspace feeds `notePendingChange`, so a save triggers a rebuild
1086
+ * in ~WATCH_DEBOUNCE_MS instead of waiting out the 2–30 s poll. The poll
1087
+ * stays armed as the fallback — on filesystems where recursive watch fails
1088
+ * (some containers/NFS) this returns false and behaviour is unchanged.
1089
+ */
1090
+ startWatching(): boolean;
1091
+ stopWatching(): void;
1092
+ /**
1093
+ * In-band staleness signal for tool responses: what has changed since the
1094
+ * last committed refresh. Null when the map is current (the common case —
1095
+ * responses carry zero overhead then).
1096
+ */
1097
+ stalenessNote(): string | null;
993
1098
  }
994
1099
  declare function createServer(source: GraphSource, opts?: ServeOptions): Server;
995
1100
  declare function serveStdio(graphPath: string, opts?: ServeOptions): Promise<void>;
@@ -1337,6 +1442,10 @@ interface CodeContext {
1337
1442
  }[];
1338
1443
  /** Hard constraints (declared facts) pinned so compaction can't drop them. */
1339
1444
  pinnedFacts: string[];
1445
+ /** Plain-language concept-map lines: how the ask's words were interpreted
1446
+ * (concept expansions, relevance topics, carried prior-turn terms). Empty
1447
+ * when nothing fired. Rendered so small models can follow the inference. */
1448
+ conceptMap: string[];
1340
1449
  /** The rendered, budget-bounded prompt block. */
1341
1450
  rendered: string;
1342
1451
  tokensEstimate: number;
@@ -1364,6 +1473,16 @@ interface BuildContextOptions {
1364
1473
  impactDepth?: number;
1365
1474
  /** Restrict the edit surface to these files (from `--file`), if given. */
1366
1475
  files?: string[];
1476
+ /** Optional pre-computed relevance analysis (engine/relevance-provider.ts),
1477
+ * loaded by the async caller; widens seed vocabulary deterministically. */
1478
+ relevance?: RelevanceAnalysis | null;
1479
+ /** Optional per-node topic tags (engine/relevance-enrich.ts). */
1480
+ topicTags?: Map<string, readonly string[]> | null;
1481
+ /** The previous conversational ask (multi-turn `vg code`). Its content
1482
+ * terms join seed ranking at a damped weight so follow-ups ("do we
1483
+ * support direct debits?" after "where is stripe used?") stay anchored to
1484
+ * the conversation's topic. Absent → single-turn behaviour, unchanged. */
1485
+ priorInstruction?: string | null;
1367
1486
  }
1368
1487
  /**
1369
1488
  * Build the context block for a coding instruction. The ordering is
@@ -1394,7 +1513,18 @@ declare const TASK_CAPSULE_SCHEMA_VERSION: "task-capsule/0";
1394
1513
  /** Bumped 2026.08.1: term roles (weak process verbs never seed alone), concept/bigram
1395
1514
  * expansion (payments→stripe, "direct debit"→sepa/bacs/mandate), multi-term coverage
1396
1515
  * bonus, directory-segment evidence — gated by the ask-quality corpus (bench/ask-corpus.mjs). */
1397
- declare const CAPSULE_RANKING_VERSION: "capsule-rank@2026.08.1";
1516
+ /** Bumped 2026.08.2: optional relevance-provider seam — sanitized provider expansions
1517
+ * join term preparation (own 0..1 weight capped at EXPANSION_WEIGHT; weak-provenance
1518
+ * dropped); provider version recorded as `relevanceVersion` provenance. Absent
1519
+ * provider = 2026.08.1 behaviour exactly — gated by the same corpus, dual-mode. */
1520
+ /** Bumped 2026.08.3: multi-turn field report ("do we support direct debits?" after a
1521
+ * stripe ask seeded direct* distractors). (a) Tokens consumed by a fired bigram
1522
+ * concept are demoted to the weak role — "direct" corroborates, never seeds.
1523
+ * (b) Conversation carry-over: the previous ask's content terms join ranking at
1524
+ * CARRY_WEIGHT when the caller passes `priorInstruction`. (c) A plain-language
1525
+ * "how the ask was interpreted" concept map is rendered for small local models.
1526
+ * No prior instruction + no bigram ask = 2026.08.2 behaviour exactly. */
1527
+ declare const CAPSULE_RANKING_VERSION: "capsule-rank@2026.08.3";
1398
1528
  declare const CAPSULE_COMPILER_ID: "vg-task-capsule/0";
1399
1529
  interface BuildCapsuleOptions extends BuildContextOptions {
1400
1530
  /**
@@ -1455,6 +1585,9 @@ interface TaskCapsule {
1455
1585
  sourceSlices: SourceSlice[];
1456
1586
  relationships: CapsuleRelationship[];
1457
1587
  pinnedFacts: string[];
1588
+ /** Plain-language interpretation of the ask (concept expansions, relevance
1589
+ * topics, carried prior-turn terms) — see engine/query.ts conceptMapLines. */
1590
+ conceptMap: string[];
1458
1591
  targetFiles: string[];
1459
1592
  verificationPlan: VerificationPlan;
1460
1593
  rendered: string;
@@ -1470,6 +1603,9 @@ interface TaskCapsule {
1470
1603
  securityTier?: string | null;
1471
1604
  /** Frozen policy / ranking patch id if any. */
1472
1605
  policyVersion?: string | null;
1606
+ /** Version of the optional relevance provider that widened seed
1607
+ * vocabulary for this capsule, or null when none was active. */
1608
+ relevanceVersion?: string | null;
1473
1609
  };
1474
1610
  }
1475
1611
  interface CapsuleProvenanceExtras {
package/dist/index.js CHANGED
@@ -1,28 +1,29 @@
1
- export { GraphSource, createServer, exportGraph, formatForExt, serveStdio } from './chunk-BNEHDLVZ.js';
2
- export { refreshIfStale } from './chunk-V3X3DBZL.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-KL65SSR7.js';
4
- export { FREE_PACK, TOOLS, coveringTests, detectRunner, shortestPath, testsToRun } from './chunk-7PVCHLR2.js';
5
- import './chunk-XRN7DQGR.js';
1
+ export { GraphSource, createServer, exportGraph, formatForExt, serveStdio } from './chunk-NSWEJPLV.js';
2
+ export { refreshIfStale } from './chunk-UXR7FBE3.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-TNADGCOX.js';
4
+ export { FREE_PACK, TOOLS, coveringTests, detectRunner, shortestPath, testsToRun } from './chunk-M452MRWI.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-MPP4S4OE.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-I6RBAIS3.js';
11
+ export { CAPSULE_COMPILER_ID, CAPSULE_RANKING_VERSION, TASK_CAPSULE_SCHEMA_VERSION, buildCodeContext, buildTaskCapsule, capsuleToCodeContext, readSavings, recordSaving, savingsRecorded, summarizeCapsule } from './chunk-K6Q6HTFD.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-XK5LKOBF.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-SDG242R4.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-HC44772H.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-T6DRYOMT.js';
19
- export { defaultGraphPath, legacyGraphPath, preferInRepoGraph, renderHtml, renderReport, resolveGraphPath, vibgrateDir, writeArtifacts } from './chunk-76TDXGGF.js';
20
- export { VERSION } from './chunk-TGDHOAXX.js';
21
- export { parseGraph, serializeGraph, stableStringify } from './chunk-ZKNB4YH4.js';
19
+ export { SCHEMA_VERSION, loadGraph } from './chunk-CPLG4GFB.js';
20
+ export { defaultGraphPath, legacyGraphPath, preferInRepoGraph, renderHtml, renderReport, resolveGraphPath, vibgrateDir, writeArtifacts } from './chunk-3Q3ZXJZP.js';
21
+ export { VERSION } from './chunk-7KNFG44U.js';
22
+ export { parseGraph, serializeGraph, stableStringify } from './chunk-QMME6TB4.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-E6H2F2XF.js';
2
- import { ensureCodeMap } from './chunk-G7W4MFPZ.js';
1
+ import { startCodeRuntimeSession } from './chunk-6DFV4WCQ.js';
2
+ import { ensureCodeMap } from './chunk-4ACXDVON.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-JLWI2JGA.js';
7
- import { BranchGraphSession } from './chunk-V2QK3IUY.js';
5
+ import { newSession, loadLatestSession, summarizeSession, saveSession, condenseSession, recordTask } from './chunk-KUZLILN3.js';
6
+ import { fetchCatalog, resolveProviders, topProviders } from './chunk-NUZM7UOR.js';
7
+ import { BranchGraphSession } from './chunk-L5PUNO3T.js';
8
+ import './chunk-7AVYKZEM.js';
8
9
  import './chunk-WHJMS7XC.js';
9
- import { nodeCodeFs, undoChanges } from './chunk-WIDZ5IE7.js';
10
- import { printCodeLogo } from './chunk-XEJJGDGX.js';
10
+ import { nodeCodeFs, undoChanges } from './chunk-M7773OUN.js';
11
+ import { printCodeLogo } from './chunk-KYX2YCXT.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
17
  import './chunk-3LOWJSAF.js';
18
- import { runAgent } from './chunk-IRCYOTRG.js';
18
+ import { runAgent } from './chunk-WGPS3NZQ.js';
19
19
  import './chunk-543E6WDJ.js';
20
- import { summarizeDiffs } from './chunk-G25STLE7.js';
20
+ import { summarizeDiffs } from './chunk-SJFBXCII.js';
21
21
  import './chunk-REIGWTTH.js';
22
- import { resolveGraphBackend } from './chunk-A43I2AJ4.js';
22
+ import { resolveGraphBackend } from './chunk-TM5XQY3L.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-V3X3DBZL.js';
27
- import './chunk-KL65SSR7.js';
28
- import './chunk-7PVCHLR2.js';
29
- import './chunk-XRN7DQGR.js';
25
+ import { refreshIfStale } from './chunk-UXR7FBE3.js';
26
+ import './chunk-TNADGCOX.js';
27
+ import './chunk-M452MRWI.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-MPP4S4OE.js';
33
- import './chunk-IPICO2RV.js';
34
- import './chunk-I6RBAIS3.js';
34
+ import { readModelSavings } from './chunk-K6Q6HTFD.js';
35
+ import './chunk-VIWZ4QT7.js';
36
+ import './chunk-XK5LKOBF.js';
35
37
  import './chunk-3LSG7Z4I.js';
36
38
  import './chunk-J7LKEB2R.js';
37
- import './chunk-SDG242R4.js';
38
- import { discoverModels } from './chunk-CQDUBAQY.js';
39
- import './chunk-OV4KGXPD.js';
39
+ import './chunk-HC44772H.js';
40
40
  import './chunk-UTNNGKKX.js';
41
41
  import './chunk-RXP66R2E.js';
42
- import { loadGraph } from './chunk-T6DRYOMT.js';
43
- import { resolveGraphPath } from './chunk-76TDXGGF.js';
44
- import './chunk-TGDHOAXX.js';
45
- import './chunk-ZKNB4YH4.js';
42
+ import { loadGraph } from './chunk-CPLG4GFB.js';
43
+ import { resolveGraphPath } from './chunk-3Q3ZXJZP.js';
44
+ import './chunk-7KNFG44U.js';
45
+ import './chunk-QMME6TB4.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-3WFC7LGE.js');
319
+ const { createVgBuiltinMcpTools, mergeExternalToolsets } = await import('./vg-mcp-bridge-3TSFOL4V.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 {
@@ -494,6 +503,9 @@ async function codingRepl(root, global, opts, selection, prompter) {
494
503
  stream: opts.stream,
495
504
  verify: opts.verify ? { ...opts.verify, maxRounds: opts.verify.maxRounds ?? modelProfile.maxRepairRounds } : void 0,
496
505
  priorSummary,
506
+ // Conversation carry-over for capsule seed ranking: the previous
507
+ // task's instruction keeps follow-up asks anchored to the topic.
508
+ priorInstruction: store.tasks.at(-1)?.instruction,
497
509
  externalTools: externalToolsMerged,
498
510
  meter,
499
511
  prompter,
@@ -501,7 +513,8 @@ async function codingRepl(root, global, opts, selection, prompter) {
501
513
  executionEnv,
502
514
  graphBackend,
503
515
  modelProfile,
504
- extraPinnedFacts
516
+ extraPinnedFacts,
517
+ llmCompaction: true
505
518
  });
506
519
  priorSummary = void 0;
507
520
  if (result.changes.length) {
@@ -624,6 +637,8 @@ async function agentTask(params) {
624
637
  if (!e.ok && e.summary.trim()) {
625
638
  for (const line of e.summary.split("\n").slice(0, 6)) info(c.dim(` ${line}`));
626
639
  }
640
+ } else if (e.type === "notice") {
641
+ info(c.dim(` \xB7 ${e.text}`));
627
642
  } else if (e.type === "session-graph") {
628
643
  info(c.dim(` \xB7 session graph updated (${e.reparsed} reparsed, ${e.dirty} dirty)`));
629
644
  } else if (e.type === "capsule") {
@@ -661,9 +676,11 @@ async function agentTask(params) {
661
676
  stream: params.stream,
662
677
  verify: params.verify,
663
678
  priorSummary: params.priorSummary,
679
+ priorInstruction: params.priorInstruction,
664
680
  externalTools: params.externalTools,
665
681
  capsule: params.capsule,
666
682
  files: params.files,
683
+ llmCompaction: params.llmCompaction,
667
684
  now: () => Date.now()
668
685
  });
669
686
  closeStream();
@@ -696,5 +713,5 @@ ${res.stderr}` : "");
696
713
  }
697
714
 
698
715
  export { agentTask, runInteractive };
699
- //# sourceMappingURL=interactive-TMQR6TXM.js.map
700
- //# sourceMappingURL=interactive-TMQR6TXM.js.map
716
+ //# sourceMappingURL=interactive-6PN237LX.js.map
717
+ //# sourceMappingURL=interactive-6PN237LX.js.map