@swarmvaultai/engine 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -51,6 +51,17 @@ declare const agentTypeSchema: z.ZodEnum<{
51
51
  type AgentType = z.infer<typeof agentTypeSchema>;
52
52
  type PageKind = "index" | "source" | "module" | "concept" | "entity" | "output" | "insight" | "graph_report" | "community_summary";
53
53
  type Freshness = "fresh" | "stale";
54
+ /**
55
+ * Consolidation tier for insight pages (LLM Wiki v2 memory model).
56
+ * - `working`: raw recent observations from ad-hoc query/explore output.
57
+ * - `episodic`: session-scoped digest rolled up from multiple working pages.
58
+ * - `semantic`: cross-session durable facts repeated across episodic pages.
59
+ * - `procedural`: how-to workflows inferred from repeated sequences.
60
+ * Non-insight pages (sources, modules, concepts, entities, outputs) leave
61
+ * `tier` undefined. Pages without a `tier` field default to `working` when
62
+ * loaded so 0.9.0 vaults require no migration.
63
+ */
64
+ type MemoryTier = "working" | "episodic" | "semantic" | "procedural";
54
65
  type ClaimStatus = "extracted" | "inferred" | "conflicted" | "stale";
55
66
  type EvidenceClass = "extracted" | "inferred" | "ambiguous";
56
67
  type Polarity = "positive" | "negative" | "neutral";
@@ -228,11 +239,36 @@ interface VaultConfig {
228
239
  };
229
240
  graph?: {
230
241
  communityResolution?: number;
242
+ /**
243
+ * Minimum IDF weight a similarity feature must carry to contribute to an
244
+ * inferred `semantically_similar_to` edge. Features below the floor are
245
+ * dropped entirely. Defaults to 0.5.
246
+ */
247
+ similarityIdfFloor?: number;
248
+ /**
249
+ * Hard cap on the number of inferred similarity edges emitted. Defaults
250
+ * to `min(5 * nodeCount, 20000)` so very large repos do not produce
251
+ * O(n²) similarity fan-out.
252
+ */
253
+ similarityEdgeCap?: number;
254
+ /**
255
+ * Upper bound on god-node entries surfaced in the graph report and
256
+ * tooling. Defaults to 20 for small repos and 10 for large ones.
257
+ */
258
+ godNodeLimit?: number;
259
+ /**
260
+ * Report rollup threshold: communities with fewer members than this are
261
+ * folded into the fragmented-community rollup instead of listed
262
+ * individually. Defaults to `max(3, ceil(totalCommunities / 50))`.
263
+ */
264
+ foldCommunitiesBelow?: number;
231
265
  };
232
266
  webSearch?: {
233
267
  providers: Record<string, WebSearchProviderConfig>;
234
268
  tasks: {
235
269
  deepLintProvider: string;
270
+ queryProvider?: string;
271
+ exploreProvider?: string;
236
272
  };
237
273
  };
238
274
  search?: {
@@ -243,6 +279,81 @@ interface VaultConfig {
243
279
  candidate?: {
244
280
  autoPromote?: CandidatePromotionConfig;
245
281
  };
282
+ redaction?: RedactionSettings;
283
+ freshness?: FreshnessConfig;
284
+ consolidation?: ConsolidationConfig;
285
+ watch?: WatchConfig;
286
+ }
287
+ /**
288
+ * Explicit user control over which repository roots `swarmvault watch --repo` tracks.
289
+ * Absent config preserves the existing auto-discovery behavior over managed sources and manifests.
290
+ */
291
+ interface WatchConfig {
292
+ repoRoots?: string[];
293
+ excludeRepoRoots?: string[];
294
+ }
295
+ /**
296
+ * Heuristic configuration for the LLM Wiki v2 consolidation tier rollup.
297
+ *
298
+ * Defaults are baked in so 0.9.0 configs keep working without migration:
299
+ * - enabled: true
300
+ * - workingToEpisodic: { minPages: 3, sessionWindowHours: 24, minSharedNodeRatio: 0.3 }
301
+ * - episodicToSemantic: { minOccurrences: 3 }
302
+ * - semanticToProcedural: { minWorkflowSteps: 3 }
303
+ */
304
+ interface ConsolidationConfig {
305
+ enabled?: boolean;
306
+ workingToEpisodic?: {
307
+ minPages?: number;
308
+ sessionWindowHours?: number;
309
+ minSharedNodeRatio?: number;
310
+ };
311
+ episodicToSemantic?: {
312
+ minOccurrences?: number;
313
+ };
314
+ semanticToProcedural?: {
315
+ minWorkflowSteps?: number;
316
+ };
317
+ }
318
+ interface ConsolidationPromotion {
319
+ pageId: string;
320
+ fromTier: MemoryTier;
321
+ toTier: MemoryTier;
322
+ }
323
+ interface ConsolidationResult {
324
+ promoted: ConsolidationPromotion[];
325
+ newPages: GraphPage[];
326
+ decisions: string[];
327
+ }
328
+ interface FreshnessConfig {
329
+ /** Default half-life in days when the page's source class is unknown. Defaults to 365. */
330
+ defaultHalfLifeDays?: number;
331
+ /** Below this score a page is considered stale. Defaults to 0.3. */
332
+ staleThreshold?: number;
333
+ /** Per-source-class half-life overrides in days. */
334
+ halfLifeDaysBySourceClass?: Partial<Record<SourceClass, number>>;
335
+ }
336
+ interface RedactionPatternConfig {
337
+ id: string;
338
+ pattern: string;
339
+ flags?: string;
340
+ placeholder?: string;
341
+ description?: string;
342
+ }
343
+ interface RedactionSettings {
344
+ enabled?: boolean;
345
+ placeholder?: string;
346
+ useDefaults?: boolean;
347
+ patterns?: RedactionPatternConfig[];
348
+ }
349
+ interface RedactionMatchSummary {
350
+ patternId: string;
351
+ count: number;
352
+ }
353
+ interface RedactionSummary {
354
+ sourceId: string;
355
+ title: string;
356
+ matches: RedactionMatchSummary[];
246
357
  }
247
358
  interface CandidatePromotionConfig {
248
359
  enabled: boolean;
@@ -362,6 +473,13 @@ interface IngestOptions {
362
473
  gitignore?: boolean;
363
474
  extractClasses?: SourceClass[];
364
475
  resume?: string;
476
+ /**
477
+ * Override the config-level redaction flag for this run. Defaults to the
478
+ * effective value in `VaultConfig.redaction.enabled` (which itself defaults
479
+ * to `true` when the config block is absent). Pass `false` to skip
480
+ * redaction entirely for this run.
481
+ */
482
+ redact?: boolean;
365
483
  }
366
484
  interface DirectoryIngestSkip {
367
485
  path: string;
@@ -382,6 +500,11 @@ interface DirectoryIngestResult {
382
500
  failed?: DirectoryIngestFailure[];
383
501
  runId?: string;
384
502
  statePath?: string;
503
+ /**
504
+ * Per-source redaction counts surfaced to CLI/MCP callers. Empty when
505
+ * redaction was disabled or no matches were found on the ingested inputs.
506
+ */
507
+ redactions?: RedactionSummary[];
385
508
  }
386
509
  interface InputIngestResult {
387
510
  input: string;
@@ -391,6 +514,11 @@ interface InputIngestResult {
391
514
  unchanged: SourceManifest[];
392
515
  removed: SourceManifest[];
393
516
  skipped: DirectoryIngestSkip[];
517
+ /**
518
+ * Per-source redaction counts surfaced to CLI/MCP callers. Empty when
519
+ * redaction was disabled or no matches were found on the ingested inputs.
520
+ */
521
+ redactions?: RedactionSummary[];
394
522
  }
395
523
  interface SourceManifest {
396
524
  sourceId: string;
@@ -506,7 +634,14 @@ interface SourceRationale {
506
634
  id: string;
507
635
  text: string;
508
636
  citation: string;
509
- kind: "docstring" | "comment" | "marker";
637
+ /**
638
+ * Structural kind for code rationales (`docstring`, `comment`, `marker`) or
639
+ * the lowercased fixed-prefix marker for non-code rationales (`note`,
640
+ * `why`, `hack`, `important`, `rationale`, `todo`, `fixme`, `warning`,
641
+ * `warn`). Non-code kinds are parser-selected from markdown blockquotes /
642
+ * list items and plain-text paragraphs, never swept from whole files.
643
+ */
644
+ kind: "docstring" | "comment" | "marker" | "note" | "why" | "hack" | "important" | "rationale" | "todo" | "fixme" | "warning" | "warn";
510
645
  symbolName?: string;
511
646
  }
512
647
  interface CodeIndexEntry {
@@ -560,8 +695,24 @@ interface GraphNode {
560
695
  degree?: number;
561
696
  bridgeScore?: number;
562
697
  isGodNode?: boolean;
698
+ /**
699
+ * Human-readable explanation of why this node was flagged as a god-node
700
+ * (high-degree hub). Populated for god nodes only. Deterministic.
701
+ */
702
+ surpriseReason?: string;
563
703
  tags?: string[];
564
704
  }
705
+ /**
706
+ * Graph edges use an open-string `relation` so new semantics can land
707
+ * without churning every consumer. Commonly produced relations include:
708
+ * - `mentions`, `contains_code`, `defines`, `exports`, `imports`,
709
+ * `contradicts`, `supports`, `builds_on`.
710
+ * - `superseded_by`: the source node/page has been replaced by the
711
+ * target. The older page is expected to carry `freshness: "stale"`
712
+ * and `supersededBy` pointing at the target page id. Compile,
713
+ * ingest, and human review can all produce this relation; lint
714
+ * surfaces broken supersession links.
715
+ */
565
716
  interface GraphEdge {
566
717
  id: string;
567
718
  source: string;
@@ -595,6 +746,26 @@ interface GraphPage {
595
746
  projectIds: string[];
596
747
  nodeIds: string[];
597
748
  freshness: Freshness;
749
+ /**
750
+ * Numeric freshness score in [0, 1] that decays over time based on the
751
+ * source-class half-life. `1` means fully fresh (just confirmed), `0`
752
+ * means fully decayed. Pages that predate decay tracking are treated as
753
+ * `1` so old vaults are not penalized. See `freshness.ts` for the decay
754
+ * function and thresholds.
755
+ */
756
+ decayScore?: number;
757
+ /**
758
+ * ISO timestamp of the last time compile or ingest confirmed this page
759
+ * against a live source/claim. Missing on pages that existed before
760
+ * decay tracking landed.
761
+ */
762
+ lastConfirmedAt?: string;
763
+ /**
764
+ * If set, this page has been superseded by another page. The value is
765
+ * the replacement page id. A matching `superseded_by` relation edge
766
+ * connects the old page's node to the replacement in the graph.
767
+ */
768
+ supersededBy?: string;
598
769
  status: PageStatus;
599
770
  confidence: number;
600
771
  backlinks: string[];
@@ -612,6 +783,24 @@ interface GraphPage {
612
783
  question?: string;
613
784
  outputFormat?: OutputFormat;
614
785
  outputAssets?: OutputAsset[];
786
+ /**
787
+ * Memory-tier assignment for insight pages. Undefined on non-insight
788
+ * pages. When an insight page on disk is missing this field, callers
789
+ * default it to `"working"` in memory; no on-disk migration happens.
790
+ */
791
+ tier?: MemoryTier;
792
+ /**
793
+ * Lower-tier page ids that were rolled up into this page during a
794
+ * consolidation pass. Populated only on pages produced by
795
+ * `runConsolidation` (episodic/semantic/procedural). Empty/undefined on
796
+ * working-tier or non-insight pages.
797
+ */
798
+ consolidatedFromPageIds?: string[];
799
+ /**
800
+ * Heuristic confidence (0..1) that the consolidation rollup is
801
+ * meaningful. Missing when the page was not produced by consolidation.
802
+ */
803
+ consolidationConfidence?: number;
615
804
  }
616
805
  interface GraphArtifact {
617
806
  generatedAt: string;
@@ -860,6 +1049,7 @@ interface QueryOptions {
860
1049
  save?: boolean;
861
1050
  format?: OutputFormat;
862
1051
  review?: boolean;
1052
+ gapFill?: boolean;
863
1053
  }
864
1054
  interface QueryResult {
865
1055
  answer: string;
@@ -903,6 +1093,7 @@ interface WatchOptions {
903
1093
  debounceMs?: number;
904
1094
  repo?: boolean;
905
1095
  codeOnly?: boolean;
1096
+ overrideRoots?: string[];
906
1097
  }
907
1098
  interface PendingSemanticRefreshEntry {
908
1099
  id: string;
@@ -1074,12 +1265,24 @@ interface LintOptions {
1074
1265
  deep?: boolean;
1075
1266
  web?: boolean;
1076
1267
  conflicts?: boolean;
1268
+ /**
1269
+ * When true, only decay-related lint rules run
1270
+ * (`decayed-pages`, `broken_supersession`, `inconsistent_decay`).
1271
+ */
1272
+ decay?: boolean;
1273
+ /**
1274
+ * When true, only consolidation-tier lint rules run
1275
+ * (`stale_working_tier`, `broken_consolidation_basis`,
1276
+ * `semantic_without_episodic_basis`).
1277
+ */
1278
+ tiers?: boolean;
1077
1279
  }
1078
1280
  interface ExploreOptions {
1079
1281
  question: string;
1080
1282
  steps?: number;
1081
1283
  format?: OutputFormat;
1082
1284
  review?: boolean;
1285
+ gapFill?: boolean;
1083
1286
  }
1084
1287
  interface ExploreStepResult {
1085
1288
  step: number;
@@ -1224,6 +1427,27 @@ interface BenchmarkSummary {
1224
1427
  avgReduction: number;
1225
1428
  reductionRatio: number;
1226
1429
  }
1430
+ /**
1431
+ * Per-source-class slice of a benchmark run. The graph-guided tokens are
1432
+ * computed against the same traversal seeds that produced the corpus-wide
1433
+ * numbers, then narrowed to nodes/edges/pages whose `sourceClass` matches
1434
+ * this class. The naive tokens come from manifests whose
1435
+ * {@link SourceManifest.sourceClass} matches this class. Empty classes are
1436
+ * represented as zeroed entries rather than being omitted so downstream
1437
+ * consumers never have to branch on `undefined`.
1438
+ */
1439
+ interface BenchmarkByClassEntry {
1440
+ sourceClass: SourceClass;
1441
+ sourceCount: number;
1442
+ pageCount: number;
1443
+ nodeCount: number;
1444
+ godNodeCount: number;
1445
+ corpusWords: number;
1446
+ corpusTokens: number;
1447
+ finalContextTokens: number;
1448
+ reductionRatio: number;
1449
+ perQuestion: BenchmarkQuestionResult[];
1450
+ }
1227
1451
  interface BenchmarkArtifact {
1228
1452
  generatedAt: string;
1229
1453
  graphHash: string;
@@ -1236,6 +1460,7 @@ interface BenchmarkArtifact {
1236
1460
  sampleQuestions: string[];
1237
1461
  perQuestion: BenchmarkQuestionResult[];
1238
1462
  summary: BenchmarkSummary;
1463
+ byClass: Record<SourceClass, BenchmarkByClassEntry>;
1239
1464
  }
1240
1465
  interface EmbeddingCacheEntry {
1241
1466
  itemId: string;
@@ -1281,6 +1506,21 @@ interface GraphReportArtifact {
1281
1506
  stale: boolean;
1282
1507
  summary: BenchmarkSummary;
1283
1508
  questionCount: number;
1509
+ /**
1510
+ * Compact per-source-class mirror of the benchmark summary. Populated
1511
+ * from {@link BenchmarkArtifact.byClass} whenever the benchmark artifact
1512
+ * is available at report build time. Kept optional so older benchmark
1513
+ * files without a `byClass` field still produce a valid report.
1514
+ */
1515
+ byClass?: Record<SourceClass, {
1516
+ sourceCount: number;
1517
+ pageCount: number;
1518
+ nodeCount: number;
1519
+ godNodeCount: number;
1520
+ finalContextTokens: number;
1521
+ naiveCorpusTokens: number;
1522
+ reductionRatio: number;
1523
+ }>;
1284
1524
  };
1285
1525
  godNodes: Array<{
1286
1526
  nodeId: string;
@@ -1288,6 +1528,12 @@ interface GraphReportArtifact {
1288
1528
  pageId?: string;
1289
1529
  degree?: number;
1290
1530
  bridgeScore?: number;
1531
+ /**
1532
+ * Deterministic one-line explanation of why the node is surfaced as a
1533
+ * god-node — e.g. "degree 42 across 7 communities" or
1534
+ * "degree 38 (2.1σ above mean)". Omitted when no degree signal exists.
1535
+ */
1536
+ surpriseReason?: string;
1291
1537
  }>;
1292
1538
  bridgeNodes: Array<{
1293
1539
  nodeId: string;
@@ -1386,7 +1632,11 @@ interface ScheduledExploreTask {
1386
1632
  steps?: number;
1387
1633
  format?: OutputFormat;
1388
1634
  }
1389
- type ScheduledTaskConfig = ScheduledCompileTask | ScheduledLintTask | ScheduledQueryTask | ScheduledExploreTask;
1635
+ interface ScheduledConsolidateTask {
1636
+ type: "consolidate";
1637
+ dryRun?: boolean;
1638
+ }
1639
+ type ScheduledTaskConfig = ScheduledCompileTask | ScheduledLintTask | ScheduledQueryTask | ScheduledExploreTask | ScheduledConsolidateTask;
1390
1640
  interface ScheduleTriggerConfig {
1391
1641
  cron?: string;
1392
1642
  every?: string;
@@ -1484,6 +1734,202 @@ declare function initWorkspace(rootDir: string, options?: {
1484
1734
  paths: ResolvedPaths;
1485
1735
  }>;
1486
1736
 
1737
+ /**
1738
+ * LLM Wiki v2 consolidation tiers. This pass is a lightweight deterministic
1739
+ * rollup that groups working-tier insight pages into episodic digests and
1740
+ * episodic pages into semantic/procedural pages. The LLM provider (if any)
1741
+ * is only consulted for nicer titles and summaries — promotion decisions
1742
+ * themselves are heuristic so the pass works without any provider access.
1743
+ *
1744
+ * The function never deletes pages. Lower-tier pages that are rolled up get
1745
+ * a `supersededBy` pointer to the new higher-tier page. Consumers use
1746
+ * `tier` and `consolidatedFromPageIds` on the generated page to trace the
1747
+ * basis of every rollup.
1748
+ */
1749
+ declare const DEFAULT_CONSOLIDATION_CONFIG: Required<{
1750
+ enabled: boolean;
1751
+ workingToEpisodic: Required<NonNullable<ConsolidationConfig["workingToEpisodic"]>>;
1752
+ episodicToSemantic: Required<NonNullable<ConsolidationConfig["episodicToSemantic"]>>;
1753
+ semanticToProcedural: Required<NonNullable<ConsolidationConfig["semanticToProcedural"]>>;
1754
+ }>;
1755
+ interface RunConsolidationOptions {
1756
+ /** When true, compute decisions and return them without writing any files. */
1757
+ dryRun?: boolean;
1758
+ /** Fixed clock for deterministic tests. */
1759
+ now?: Date;
1760
+ }
1761
+ /**
1762
+ * Resolve the default-backed consolidation config. Missing/partial config
1763
+ * objects are treated as "use all defaults".
1764
+ */
1765
+ declare function resolveConsolidationConfig(config?: ConsolidationConfig): {
1766
+ enabled: boolean;
1767
+ workingToEpisodic: Required<NonNullable<ConsolidationConfig["workingToEpisodic"]>>;
1768
+ episodicToSemantic: Required<NonNullable<ConsolidationConfig["episodicToSemantic"]>>;
1769
+ semanticToProcedural: Required<NonNullable<ConsolidationConfig["semanticToProcedural"]>>;
1770
+ };
1771
+ declare function runConsolidation(rootDir: string, config?: ConsolidationConfig, provider?: ProviderAdapter, options?: RunConsolidationOptions): Promise<ConsolidationResult>;
1772
+
1773
+ /**
1774
+ * Decay and supersession helpers for the LLM Wiki v2 lifecycle layer.
1775
+ *
1776
+ * Pages accumulate a numeric `decayScore` (0..1) that ticks down over time
1777
+ * based on the elapsed days since `lastConfirmedAt`, controlled by a
1778
+ * source-class half-life. Decay never deletes or hides pages — it informs
1779
+ * ranking, lint, and UI prioritization. Callers are expected to:
1780
+ *
1781
+ * 1. Call `resetDecay` whenever compile or ingest confirms a page still
1782
+ * matches a live source/claim (e.g. same semantic hash reappears).
1783
+ * 2. Call `applyDecayToPages` at the end of a compile pass to recompute
1784
+ * `decayScore` and downgrade `freshness` below the threshold.
1785
+ * 3. Call `markSuperseded` when a newer page replaces an older one,
1786
+ * emitting a `superseded_by` edge alongside.
1787
+ *
1788
+ * Defaults (matching the A.3 feature spec):
1789
+ * - defaultHalfLifeDays = 365
1790
+ * - staleThreshold = 0.3
1791
+ * - halfLifeDaysBySourceClass = {
1792
+ * first_party: 365 (slow decay)
1793
+ * third_party: 90 (fast — deps churn)
1794
+ * resource: 730 (slowest — assets)
1795
+ * generated: 30 (fastest — build output)
1796
+ * }
1797
+ */
1798
+ declare const DEFAULT_HALF_LIFE_DAYS = 365;
1799
+ declare const DEFAULT_STALE_THRESHOLD = 0.3;
1800
+ declare const DEFAULT_HALF_LIFE_DAYS_BY_SOURCE_CLASS: Record<SourceClass, number>;
1801
+ interface DecayConfig {
1802
+ halfLifeDaysBySourceClass?: Partial<Record<SourceClass, number>>;
1803
+ defaultHalfLifeDays?: number;
1804
+ staleThreshold?: number;
1805
+ }
1806
+ interface ApplyDecayResult {
1807
+ updated: GraphPage[];
1808
+ markedStale: string[];
1809
+ }
1810
+ /**
1811
+ * Compute a numeric decay score using a straight exponential half-life model.
1812
+ *
1813
+ * score = 0.5 ^ (ageDays / halfLifeDays)
1814
+ *
1815
+ * `lastConfirmedAt` missing returns 1 so pages from pre-decay vaults are
1816
+ * not penalized until they are next reconfirmed. Future timestamps (clock
1817
+ * skew) also return 1.
1818
+ */
1819
+ declare function computeDecayScore(lastConfirmedAt: string | undefined, sourceClass: SourceClass | undefined, config: DecayConfig, now?: Date): number;
1820
+ /**
1821
+ * Recompute `decayScore` and `freshness` for the supplied pages. Pure
1822
+ * function: returns a new array and does not mutate the inputs. Pages
1823
+ * with `supersededBy` set stay `"stale"` regardless of score. Pages
1824
+ * above the threshold are upgraded back to `"fresh"` so re-confirmation
1825
+ * outside of compile (e.g. human review) can take effect.
1826
+ */
1827
+ declare function applyDecayToPages(pages: GraphPage[], config: DecayConfig, now?: Date): ApplyDecayResult;
1828
+ /**
1829
+ * Reset decay for a single page. Typically invoked when compile or
1830
+ * ingest observes the same source/claim signature as before, confirming
1831
+ * the page is still anchored in live evidence. Does not touch
1832
+ * `supersededBy`: if the page has been superseded it remains stale.
1833
+ */
1834
+ declare function resetDecay(page: GraphPage, now?: Date): GraphPage;
1835
+ /**
1836
+ * Mark an older page as superseded by a replacement. The caller is
1837
+ * responsible for emitting the `superseded_by` graph edge separately.
1838
+ */
1839
+ declare function markSuperseded(oldPage: GraphPage, newPageId: string, now?: Date): GraphPage;
1840
+ /**
1841
+ * Build a DecayConfig from the user-facing FreshnessConfig. Missing
1842
+ * fields fall back to defaults.
1843
+ */
1844
+ declare function resolveDecayConfig(config?: FreshnessConfig): DecayConfig;
1845
+ /**
1846
+ * Write decay/supersession frontmatter into every page's markdown file
1847
+ * on disk. Pages that do not live under `wikiDir` (e.g. ephemeral or
1848
+ * missing files) are skipped silently.
1849
+ */
1850
+ declare function persistDecayFrontmatter(wikiDir: string, pages: GraphPage[]): Promise<string[]>;
1851
+ /**
1852
+ * Full compile-time decay pass. For each live page:
1853
+ * - If the page was just produced by compile, reset decay to 1 and
1854
+ * stamp `lastConfirmedAt = now` (it has been re-confirmed by a
1855
+ * live analysis).
1856
+ * - Otherwise, recompute decay from the existing `lastConfirmedAt`.
1857
+ * - Downgrade freshness to "stale" when the score falls below the
1858
+ * configured threshold, upgrade it back to "fresh" when the score
1859
+ * recovers and the page is not superseded.
1860
+ *
1861
+ * Returns the updated pages so callers can update `graph.json`, plus
1862
+ * the paths of any page files whose frontmatter was rewritten on disk.
1863
+ */
1864
+ declare function runDecayPass(input: {
1865
+ wikiDir: string;
1866
+ graphPath: string;
1867
+ pages: GraphPage[];
1868
+ /** Pages (by id) that compile confirmed in this run. Their decay resets to 1. */
1869
+ confirmedPageIds: Iterable<string>;
1870
+ config?: FreshnessConfig;
1871
+ now?: Date;
1872
+ }): Promise<{
1873
+ pages: GraphPage[];
1874
+ updatedPaths: string[];
1875
+ markedStale: string[];
1876
+ }>;
1877
+
1878
+ /**
1879
+ * Viewer-only hub node synthesized from a group-pattern hyperedge. Hubs are
1880
+ * never written back to `state/graph.json` — callers can treat them as
1881
+ * transient UI scaffolding that turns a single `GraphHyperedge` into a tiny
1882
+ * star of pairwise edges that Cytoscape (or vis.js) can render natively.
1883
+ */
1884
+ type SynthesizedHubNode = {
1885
+ id: string;
1886
+ hyperedgeId: string;
1887
+ label: string;
1888
+ relation: string;
1889
+ participantIds: string[];
1890
+ confidence: number;
1891
+ evidenceClass: string;
1892
+ why: string;
1893
+ };
1894
+ /**
1895
+ * Viewer-only edge that connects a synthesized hub to one of the hyperedge
1896
+ * participants. IDs are stable across renders so Cytoscape can reuse them and
1897
+ * tests can assert their presence.
1898
+ */
1899
+ type SynthesizedHubEdge = {
1900
+ id: string;
1901
+ hyperedgeId: string;
1902
+ source: string;
1903
+ target: string;
1904
+ relation: string;
1905
+ confidence: number;
1906
+ evidenceClass: string;
1907
+ };
1908
+ type SynthesizedHyperedgeHubs = {
1909
+ hubNodes: SynthesizedHubNode[];
1910
+ hubEdges: SynthesizedHubEdge[];
1911
+ };
1912
+ type MinimalHyperedge = {
1913
+ id: string;
1914
+ label: string;
1915
+ relation: string;
1916
+ nodeIds: string[];
1917
+ confidence?: number;
1918
+ evidenceClass?: string;
1919
+ why?: string;
1920
+ };
1921
+ type MinimalNode = {
1922
+ id: string;
1923
+ };
1924
+ /**
1925
+ * Turn every group-pattern hyperedge with `>= 2` participants into a star:
1926
+ * one synthetic hub node plus a pairwise edge to each participant. Degenerate
1927
+ * hyperedges (zero or one participant) are skipped because a hub with no
1928
+ * "group" to anchor is noisy and contributes nothing to the layout. Nothing
1929
+ * here mutates `state/graph.json`; the caller layers hubs on top of the real
1930
+ * graph for rendering only.
1931
+ */
1932
+ declare function synthesizeHyperedgeHubs(hyperedges: ReadonlyArray<MinimalHyperedge>, nodes: ReadonlyArray<MinimalNode>): SynthesizedHyperedgeHubs;
1487
1933
  declare function exportGraphFormat(rootDir: string, format: Exclude<GraphExportFormat, "html" | "report" | "obsidian" | "canvas">, outputPath: string): Promise<GraphExportResult>;
1488
1934
  declare function exportGraphReportHtml(rootDir: string, outputPath: string): Promise<GraphExportResult>;
1489
1935
  declare function exportObsidianVault(rootDir: string, outputDir: string): Promise<GraphExportResult>;
@@ -1530,6 +1976,49 @@ declare function importInbox(rootDir: string, inputDir?: string): Promise<InboxI
1530
1976
  declare function listManifests(rootDir: string): Promise<SourceManifest[]>;
1531
1977
  declare function readExtractedText(rootDir: string, manifest: SourceManifest): Promise<string | undefined>;
1532
1978
 
1979
+ /**
1980
+ * Effective tuning thresholds for graph output. These knobs keep report and
1981
+ * similarity surfaces readable on large repositories while preserving
1982
+ * friendly defaults on small ones. Every caller that picks a graph limit
1983
+ * should route through {@link resolveLargeRepoDefaults} so user-provided
1984
+ * overrides stay authoritative and defaults adjust automatically based on
1985
+ * node count.
1986
+ */
1987
+ interface ResolvedLargeRepoDefaults {
1988
+ /** Upper bound on god-node entries surfaced in the report/tooling. */
1989
+ godNodeLimit: number;
1990
+ /**
1991
+ * Community rollup threshold: any community with fewer than this many
1992
+ * members is folded into the rollup summary in the report. Defaults to
1993
+ * `max(3, ceil(totalCommunities / 50))` when `totalCommunities` is
1994
+ * provided, otherwise to 3.
1995
+ */
1996
+ foldCommunitiesBelow: number;
1997
+ /**
1998
+ * Hard cap on the number of inferred similarity edges emitted per graph.
1999
+ * Prevents degenerate O(n²) fan-out on very large repos.
2000
+ */
2001
+ similarityEdgeCap: number;
2002
+ /**
2003
+ * Minimum IDF weight a similarity feature must carry to contribute to an
2004
+ * edge score. Features below the floor are dropped entirely.
2005
+ */
2006
+ similarityIdfFloor: number;
2007
+ }
2008
+ /** Node count at which tighter defaults begin firing. */
2009
+ declare const LARGE_REPO_NODE_THRESHOLD = 1000;
2010
+ /**
2011
+ * Resolve effective numeric thresholds for a graph of `nodeCount` nodes.
2012
+ * User-configured values on `config.graph` always win — defaults only fire
2013
+ * when the caller has left the knob unset. Pass `totalCommunities` when the
2014
+ * community rollup threshold needs to scale with the community count.
2015
+ */
2016
+ declare function resolveLargeRepoDefaults(input: {
2017
+ nodeCount: number;
2018
+ totalCommunities?: number;
2019
+ config?: VaultConfig | null;
2020
+ }): ResolvedLargeRepoDefaults;
2021
+
1533
2022
  declare function createMcpServer(rootDir: string): Promise<McpServer>;
1534
2023
  declare function startMcpServer(rootDir: string, stdin?: Readable, stdout?: Writable): Promise<{
1535
2024
  close: () => Promise<void>;
@@ -1539,6 +2028,70 @@ declare function createProvider(id: string, config: ProviderConfig, rootDir: str
1539
2028
  declare function getProviderForTask(rootDir: string, task: keyof Awaited<ReturnType<typeof loadVaultConfig>>["config"]["tasks"]): Promise<ProviderAdapter>;
1540
2029
  declare function assertProviderCapability(provider: ProviderAdapter, capability: ProviderCapability): void;
1541
2030
 
2031
+ interface RedactionPattern {
2032
+ id: string;
2033
+ pattern: RegExp | string;
2034
+ placeholder?: string;
2035
+ description?: string;
2036
+ }
2037
+ interface RedactionMatch {
2038
+ patternId: string;
2039
+ count: number;
2040
+ }
2041
+ interface Redactor {
2042
+ redact(text: string): {
2043
+ text: string;
2044
+ matches: RedactionMatch[];
2045
+ };
2046
+ }
2047
+ /**
2048
+ * Built-in safety-by-default patterns. These cover common cloud, SaaS, and
2049
+ * cryptographic credentials that should never be captured verbatim into the
2050
+ * immutable `raw/` store or compiled wiki pages. Each pattern is expressed as
2051
+ * a named regex literal so readability is preserved when auditing what gets
2052
+ * scrubbed.
2053
+ */
2054
+ declare const DEFAULT_REDACTION_PATTERNS: RedactionPattern[];
2055
+ /**
2056
+ * Build a redactor from a list of patterns. Callers should construct this
2057
+ * once per ingest run and reuse it across prepared inputs so regex compilation
2058
+ * and global-flag normalization happen only once.
2059
+ */
2060
+ declare function buildRedactor(patterns: RedactionPattern[], defaultPlaceholder?: string): Redactor;
2061
+ interface ConfiguredRedactionPattern {
2062
+ id: string;
2063
+ pattern: string;
2064
+ flags?: string;
2065
+ placeholder?: string;
2066
+ description?: string;
2067
+ }
2068
+ interface RedactionConfig {
2069
+ enabled?: boolean;
2070
+ placeholder?: string;
2071
+ useDefaults?: boolean;
2072
+ patterns?: ConfiguredRedactionPattern[];
2073
+ }
2074
+ /**
2075
+ * Compile a possibly-absent `redaction` config block into a concrete
2076
+ * pattern list. Missing config means "enabled with defaults" — this is
2077
+ * safety-by-default so a fresh 0.9.0 vault upgrades without silently losing
2078
+ * redaction coverage.
2079
+ *
2080
+ * Invalid user-supplied regex sources throw eagerly with a helpful message
2081
+ * so the failure is surfaced at ingest start instead of silently skipped.
2082
+ */
2083
+ declare function resolveRedactionPatterns(config?: RedactionConfig | null): {
2084
+ enabled: boolean;
2085
+ placeholder: string;
2086
+ patterns: RedactionPattern[];
2087
+ };
2088
+ /**
2089
+ * Convenience helper used by the ingest pipeline: build the redactor once
2090
+ * from config, or return `null` if redaction is disabled. Returning `null`
2091
+ * makes the caller's fast-path trivial (skip bytes/string work entirely).
2092
+ */
2093
+ declare function buildConfiguredRedactor(config?: RedactionConfig | null): Redactor | null;
2094
+
1542
2095
  declare function listSchedules(rootDir: string): Promise<ScheduleStateRecord[]>;
1543
2096
  declare function runSchedule(rootDir: string, jobId: string): Promise<ScheduledRunResult>;
1544
2097
  declare function serveSchedules(rootDir: string, pollMs?: number): Promise<ScheduleController>;
@@ -1653,6 +2206,20 @@ declare function runAutoPromotion(rootDir: string, options?: {
1653
2206
  dryRun?: boolean;
1654
2207
  }): Promise<PromotionSession>;
1655
2208
  declare function previewCandidatePromotions(rootDir: string): Promise<PromotionDecision[]>;
2209
+ /**
2210
+ * Human-in-the-loop supersession: wire up a `superseded_by` edge between
2211
+ * two existing pages and flip the older page's frontmatter to stale. The
2212
+ * edge is written into `state/graph.json` and the older page's markdown
2213
+ * file is updated via `markSuperseded`. Caller supplies either page ids
2214
+ * or page paths for resolution convenience.
2215
+ */
2216
+ declare function createSupersessionEdge(rootDir: string, oldPageIdOrPath: string, newPageIdOrPath: string): Promise<{
2217
+ oldPageId: string;
2218
+ newPageId: string;
2219
+ edgeId: string;
2220
+ graphPath: string;
2221
+ updatedPagePath: string;
2222
+ }>;
1656
2223
  declare function archiveCandidate(rootDir: string, target: string): Promise<CandidateRecord>;
1657
2224
  declare function initVault(rootDir: string, options?: InitOptions): Promise<void>;
1658
2225
  declare function compileVault(rootDir: string, options?: CompileOptions): Promise<CompileResult>;
@@ -1696,6 +2263,14 @@ declare function bootstrapDemo(rootDir: string, input?: string): Promise<{
1696
2263
  manifestId?: string;
1697
2264
  compile?: CompileResult;
1698
2265
  }>;
2266
+ /**
2267
+ * Vault-level wrapper around the consolidation engine so the CLI, MCP,
2268
+ * and schedule callers all go through a single entry point. The provider
2269
+ * is optional; the rollup is purely heuristic otherwise.
2270
+ */
2271
+ declare function consolidateVault(rootDir: string, options?: {
2272
+ dryRun?: boolean;
2273
+ }): Promise<ConsolidationResult>;
1699
2274
 
1700
2275
  declare function startGraphServer(rootDir: string, port?: number, options?: {
1701
2276
  full?: boolean;
@@ -1721,11 +2296,41 @@ type WatchCycleResult = {
1721
2296
  changedPages: string[];
1722
2297
  lintFindingCount?: number;
1723
2298
  };
2299
+ /**
2300
+ * Compute the effective list of repository roots that `swarmvault watch --repo` should track.
2301
+ * Resolution order (highest wins):
2302
+ * 1. `options.overrideRoots` (CLI `--root <path>`) — used verbatim, config and discovery skipped.
2303
+ * 2. Explicit `config.watch.repoRoots` — skips auto-discovery but still honors `excludeRepoRoots`.
2304
+ * 3. Auto-discovery via `listTrackedRepoRoots` — preserves pre-0.11 behavior.
2305
+ * `config.watch.excludeRepoRoots` always applies as a deny list (unless `overrideRoots` is set).
2306
+ */
2307
+ declare function resolveWatchedRepoRoots(rootDir: string, options?: {
2308
+ overrideRoots?: string[];
2309
+ config?: VaultConfig;
2310
+ }): Promise<string[]>;
2311
+ /**
2312
+ * Public helper mirroring `resolveWatchedRepoRoots` for CLI and MCP callers that only need the
2313
+ * final list without the full watch cycle machinery.
2314
+ */
2315
+ declare function listWatchedRoots(rootDir: string, options?: {
2316
+ overrideRoots?: string[];
2317
+ }): Promise<string[]>;
2318
+ /**
2319
+ * Add a repo root to the persisted `watch.repoRoots` list in `swarmvault.config.json`.
2320
+ * Returns the resolved absolute path that was added (or already present). Dedupes on resolved path.
2321
+ */
2322
+ declare function addWatchedRoot(rootDir: string, candidate: string): Promise<string>;
2323
+ /**
2324
+ * Remove a repo root from the persisted `watch.repoRoots` list. Missing path is a no-op.
2325
+ * Returns `true` when the path was removed, `false` when it was absent.
2326
+ */
2327
+ declare function removeWatchedRoot(rootDir: string, candidate: string): Promise<boolean>;
1724
2328
  declare function runWatchCycle(rootDir: string, options?: WatchOptions): Promise<WatchCycleResult>;
1725
2329
  declare function watchVault(rootDir: string, options?: WatchOptions): Promise<WatchController>;
1726
2330
  declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
1727
2331
 
1728
2332
  declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
1729
- declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
2333
+ type WebSearchTaskId = "deepLintProvider" | "queryProvider" | "exploreProvider";
2334
+ declare function getWebSearchAdapterForTask(rootDir: string, task: WebSearchTaskId): Promise<WebSearchAdapter>;
1730
2335
 
1731
- export { type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalBundleType, type ApprovalChangeType, type ApprovalDetail, type ApprovalDiffHunk, type ApprovalDiffLine, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryLabel, type ApprovalEntryStatus, type ApprovalFrontmatterChange, type ApprovalManifest, type ApprovalStructuredDiff, type ApprovalSummary, type AudioTranscriptionRequest, type AudioTranscriptionResponse, type BenchmarkArtifact, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type CandidatePromotionConfig, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, DEFAULT_PROMOTION_CONFIG, type DirectoryIngestFailure, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphDiffResult, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphPushCounts, type GraphPushNeo4jOptions, type GraphPushResult, type GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type GuidedSessionMode, type GuidedSourceSessionAnswers, type GuidedSourceSessionQuestion, type GuidedSourceSessionRecord, type GuidedSourceSessionStatus, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InputIngestResult, type InstallAgentOptions, type InstallAgentResult, type LintFinding, type LintOptions, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type Neo4jGraphSinkConfig, type OrchestrationConfig, type OrchestrationFinding, type OrchestrationProposal, type OrchestrationRole, type OrchestrationRoleConfig, type OrchestrationRoleResult, type OutputAsset, type OutputAssetRole, type OutputFormat, type OutputOrigin, type PageKind, type PageManager, type PageStatus, type PendingSemanticRefreshEntry, type Polarity, type PromotionDecision, type PromotionGateKind, type PromotionGateResult, type PromotionSession, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RepoSyncResult, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceClass, type SourceExtractionArtifact, type SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type VaultConfig, type VaultDashboardPack, type VaultProfileConfig, type VaultProfilePreset, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, addInput, addManagedSource, agentTypeSchema, archiveCandidate, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportObsidianCanvas, exportObsidianVault, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listPages, listSchedules, listTrackedRepoRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, pathGraphVault, previewCandidatePromotions, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readExtractedText, readGraphReport, readPage, rejectApproval, reloadManagedSources, resolvePaths, resumeSourceSession, reviewManagedSource, reviewSourceScope, runAutoPromotion, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, syncTrackedRepos, syncTrackedReposForWatch, trimToTokenBudget, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };
2336
+ export { type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalBundleType, type ApprovalChangeType, type ApprovalDetail, type ApprovalDiffHunk, type ApprovalDiffLine, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryLabel, type ApprovalEntryStatus, type ApprovalFrontmatterChange, type ApprovalManifest, type ApprovalStructuredDiff, type ApprovalSummary, type AudioTranscriptionRequest, type AudioTranscriptionResponse, type BenchmarkArtifact, type BenchmarkByClassEntry, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type CandidatePromotionConfig, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type ConsolidationConfig, type ConsolidationPromotion, type ConsolidationResult, DEFAULT_CONSOLIDATION_CONFIG, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HALF_LIFE_DAYS_BY_SOURCE_CLASS, DEFAULT_PROMOTION_CONFIG, DEFAULT_REDACTION_PATTERNS, DEFAULT_STALE_THRESHOLD, type DirectoryIngestFailure, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type FreshnessConfig, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphDiffResult, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphPushCounts, type GraphPushNeo4jOptions, type GraphPushResult, type GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type GuidedSessionMode, type GuidedSourceSessionAnswers, type GuidedSourceSessionQuestion, type GuidedSourceSessionRecord, type GuidedSourceSessionStatus, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InputIngestResult, type InstallAgentOptions, type InstallAgentResult, LARGE_REPO_NODE_THRESHOLD, type LintFinding, type LintOptions, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type MemoryTier, type Neo4jGraphSinkConfig, type OrchestrationConfig, type OrchestrationFinding, type OrchestrationProposal, type OrchestrationRole, type OrchestrationRoleConfig, type OrchestrationRoleResult, type OutputAsset, type OutputAssetRole, type OutputFormat, type OutputOrigin, type PageKind, type PageManager, type PageStatus, type PendingSemanticRefreshEntry, type Polarity, type PromotionDecision, type PromotionGateKind, type PromotionGateResult, type PromotionSession, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RedactionMatchSummary, type RedactionPatternConfig, type RedactionSettings, type RedactionSummary, type RepoSyncResult, type ResolvedLargeRepoDefaults, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledConsolidateTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceClass, type SourceExtractionArtifact, type SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type SynthesizedHubEdge, type SynthesizedHubNode, type SynthesizedHyperedgeHubs, type VaultConfig, type VaultDashboardPack, type VaultProfileConfig, type VaultProfilePreset, type WatchConfig, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, addInput, addManagedSource, addWatchedRoot, agentTypeSchema, applyDecayToPages, archiveCandidate, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, buildConfiguredRedactor, buildRedactor, compileVault, computeDecayScore, consolidateVault, createMcpServer, createProvider, createSupersessionEdge, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportObsidianCanvas, exportObsidianVault, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listPages, listSchedules, listTrackedRepoRoots, listWatchedRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, markSuperseded, pathGraphVault, persistDecayFrontmatter, previewCandidatePromotions, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readExtractedText, readGraphReport, readPage, rejectApproval, reloadManagedSources, removeWatchedRoot, resetDecay, resolveConsolidationConfig, resolveDecayConfig, resolveLargeRepoDefaults, resolvePaths, resolveRedactionPatterns, resolveWatchedRepoRoots, resumeSourceSession, reviewManagedSource, reviewSourceScope, runAutoPromotion, runConsolidation, runDecayPass, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, syncTrackedRepos, syncTrackedReposForWatch, synthesizeHyperedgeHubs, trimToTokenBudget, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };