@fenglimg/fabric-server 2.2.0 → 2.3.0-rc.10

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/README.md CHANGED
@@ -6,7 +6,7 @@ Fabric MCP knowledge server. Runs over stdio transport and serves Claude Code an
6
6
 
7
7
  - `fab_recall` — single-step recall: returns candidate descriptions + native read paths (no body delivery over MCP; read a body on demand via a native Read of the returned path)
8
8
  - `fab_archive_scan` — scan recent work for archive-worthy knowledge candidates
9
- - `fab_extract_knowledge` — persist a pending knowledge entry
9
+ - `fab_propose` — persist a pending knowledge entry
10
10
  - `fab_review` — list / approve / reject / modify / defer pending entries
11
11
 
12
12
  ## Install
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { FabExtractKnowledgeInput, FabExtractKnowledgeOutput, FabReviewInput, FabReviewOutput } from '@fenglimg/fabric-shared/schemas/api-contracts';
3
- import { EventLedgerEventInput, EventLedgerEvent, RuleDescriptionIndexItem, LedgerEntry, AgentsMeta } from '@fenglimg/fabric-shared';
2
+ import { FabExtractKnowledgeInput, FabExtractKnowledgeOutput, FabReviewInput, FabReviewOutput, FabPendingInput, FabPendingOutput } from '@fenglimg/fabric-shared/schemas/api-contracts';
3
+ import { RuleDescription, EventLedgerEventInput, EventLedgerEvent, RuleDescriptionIndexItem, RecallScore, RecallScoreBreakdown, LedgerEntry, AgentsMeta } from '@fenglimg/fabric-shared';
4
4
  import { PayloadGuardOptions } from '@fenglimg/fabric-shared/node/mcp-payload-guard';
5
5
 
6
6
  interface InFlightTracker {
@@ -32,6 +32,16 @@ type DoctorHealth = {
32
32
  warnings: number;
33
33
  };
34
34
  };
35
+ type BacklogAgeMetric = {
36
+ count: number;
37
+ oldest_days: number | null;
38
+ median_age_days: number;
39
+ ages_days: number[];
40
+ };
41
+ declare function checkBacklogAge(projectRoot: string, nowMs?: number): Promise<BacklogAgeMetric>;
42
+ declare function renderBacklogAgeLine(metric: BacklogAgeMetric): string;
43
+
44
+ declare function extractRuleDescription(source: string): RuleDescription | undefined;
35
45
 
36
46
  interface AlwaysActiveBody {
37
47
  /** store-qualified id (`<alias>:<stableId>`). */
@@ -78,6 +88,16 @@ interface KnowledgeCensus {
78
88
  */
79
89
  declare function buildKnowledgeCensus(projectRoot: string): Promise<KnowledgeCensus>;
80
90
  declare function buildAlwaysActiveBodies(projectRoot: string): Promise<AlwaysActiveBody[]>;
91
+ interface StoreCanonicalEntry {
92
+ stableId: string;
93
+ qualifiedId: string;
94
+ file: string;
95
+ type: string;
96
+ layer: "team" | "personal";
97
+ body: string;
98
+ description: NonNullable<ReturnType<typeof extractRuleDescription>>;
99
+ }
100
+ declare function collectStoreCanonicalEntries(projectRoot: string): Promise<StoreCanonicalEntry[]>;
81
101
 
82
102
  interface UnboundProjectViolation {
83
103
  /** The store already bound as the active write target. */
@@ -196,6 +216,11 @@ type CiteCoverageReport = {
196
216
  uncorrelatable_edits?: number;
197
217
  recall_backed_edits?: number;
198
218
  recall_coverage_rate?: number | null;
219
+ recall_diagnostics?: {
220
+ recalls_in_window: number;
221
+ recall_sessions: number;
222
+ recall_sessions_correlated: number;
223
+ };
199
224
  exposed_and_mutated?: {
200
225
  count: number;
201
226
  ids?: string[];
@@ -379,24 +404,49 @@ declare function enrichDescriptions(projectRoot: string, opts?: {
379
404
  dryRun?: boolean;
380
405
  }): Promise<EnrichDescriptionsReport>;
381
406
 
407
+ type Bm25Field = "title" | "summary" | "tags" | "body";
382
408
  interface Bm25Document {
383
409
  id: string;
384
- tokens: string[];
410
+ /** Pre-tokenized terms per field. Omitted/empty fields contribute nothing. */
411
+ fields: Record<Bm25Field, string[]>;
385
412
  }
386
413
  interface Bm25Model {
387
414
  /**
388
- * BM25 score of document `id` against the (pre-tokenized) query terms.
389
- * Returns 0 for an unknown id, an empty document, no query terms, or no
390
- * term overlap. Query-term duplicates are collapsed — repeating a term in
391
- * the query does not inflate the score (term frequency is a document
392
- * property, not a query property).
415
+ * BM25F score of document `id` against the (pre-tokenized) query terms.
416
+ * Returns 0 for an unknown id, no query terms, or no term overlap in any
417
+ * field. Query-term duplicates are collapsed — repeating a term in the query
418
+ * does not inflate the score (term frequency is a document property, not a
419
+ * query property).
393
420
  */
394
421
  scoreDoc(id: string, queryTerms: string[]): number;
422
+ /**
423
+ * P1 recall-engine-refactor (TASK-002): the plain JSON-safe snapshot of the
424
+ * corpus statistics this model scores against, attached so the model can be
425
+ * serialized to disk (`serializeBm25Model`) and a cold hook can `rehydrate`
426
+ * an identical scorer without re-tokenizing the corpus.
427
+ */
428
+ readonly __serialized: SerializedBm25Model;
429
+ }
430
+ interface SerializedBm25Model {
431
+ /** Schema/format version — bump on any layout change so a stale on-disk cache
432
+ * (different shape) is detected and discarded rather than mis-rehydrated. */
433
+ version: 1;
434
+ totalDocs: number;
435
+ /** term → document frequency (union-of-fields df), as [term, count] pairs. */
436
+ documentFrequency: [string, number][];
437
+ /** Per-field corpus average length. */
438
+ avgFieldLength: Record<Bm25Field, number>;
439
+ /** Per-doc stats: id → { per-field [term,freq] pairs, per-field length }. */
440
+ perDoc: {
441
+ id: string;
442
+ fieldTermFreq: Record<Bm25Field, [string, number][]>;
443
+ fieldLength: Record<Bm25Field, number>;
444
+ }[];
395
445
  }
396
446
  /**
397
- * Build a BM25 model over `docs`. The corpus statistics (document frequency,
398
- * average document length) are computed once here; `scoreDoc` is then O(query
399
- * terms) per call.
447
+ * Build a BM25F model over `docs`. Corpus statistics (per-field document
448
+ * frequency over the union of fields, per-field average length) are computed
449
+ * once here; `scoreDoc` is then O(query terms × fields) per call.
400
450
  */
401
451
  declare function buildBm25Model(docs: Bm25Document[]): Bm25Model;
402
452
 
@@ -505,8 +555,90 @@ declare function runDoctorConflictLint(projectRoot: string, opts?: {
505
555
  judge?: ConflictJudge;
506
556
  }): Promise<ConflictLintReport>;
507
557
 
558
+ declare function readEmbedConfig(projectRoot: string): {
559
+ enabled: boolean;
560
+ weight: number;
561
+ model: string;
562
+ };
563
+ declare function readFusion(projectRoot: string): "additive" | "rrf" | "auto";
564
+
565
+ interface Embedder {
566
+ embed(texts: string[]): Promise<number[][]>;
567
+ }
568
+ declare const OPTIONAL_EMBED_PACKAGE = "fastembed";
569
+ /**
570
+ * Is the optional embedder package resolvable FROM THE SERVER'S module location —
571
+ * i.e. from exactly where `loadEmbedder`'s dynamic `import()` will look for it?
572
+ *
573
+ * This is the honest "is fastembed installed?" probe. The naive alternative — a
574
+ * `createRequire(import.meta.url)` check run inside the CLI package — answers from
575
+ * the WRONG base: in a pnpm / non-hoisted layout (or a dev-linked global install)
576
+ * fastembed lives under the SERVER's `node_modules` (it is the server's
577
+ * optionalDependency), so the CLI cannot resolve it even though the server — the
578
+ * only code that actually imports it — can. That mismatch made `fabric info
579
+ * --recall` report "not installed" on a perfectly working setup. Callers that
580
+ * surface embedder availability MUST use this server-anchored probe.
581
+ */
582
+ declare function isEmbedderResolvable(): boolean;
583
+ declare function defaultEmbedCacheDir(): string;
584
+ /**
585
+ * Lazy-load the optional fastembed embedder, pinned to CPU + cache-only. Returns
586
+ * null (cached) when the package is not installed or initialization throws, so
587
+ * every caller degrades to the text-only path. Never throws.
588
+ *
589
+ * v2.1 ③: `modelName` (a fastembed EmbeddingModel enum value) selects the
590
+ * embedding model — the caller threads `embed_model` config through so the
591
+ * Chinese-heavy KB no longer embeds against fastembed's English default. The
592
+ * load is cached per-process; the FIRST model wins (a config change needs a
593
+ * server restart, already the norm for MCP config changes).
594
+ */
595
+ declare function loadEmbedder(modelName?: string): Promise<Embedder | null>;
596
+
597
+ interface RetiredToken {
598
+ /** The exact dead token as it appears in agent-facing text. */
599
+ token: string;
600
+ /** What replaced it (shown in the remediation), or null when simply removed. */
601
+ replacement: string | null;
602
+ /** Short why-retired note. */
603
+ reason: string;
604
+ }
605
+ declare const RETIRED_TOKENS: readonly RetiredToken[];
606
+ interface RetiredReferenceHit {
607
+ /** Project-relative POSIX path of the offending file. */
608
+ path: string;
609
+ token: string;
610
+ line: number;
611
+ replacement: string | null;
612
+ }
613
+ interface RetiredReferenceInspection {
614
+ status: "ok" | "warn" | "skipped";
615
+ scannedFiles: number;
616
+ hits: RetiredReferenceHit[];
617
+ }
618
+ declare function inspectRetiredReferences(projectRoot: string): Promise<RetiredReferenceInspection>;
619
+
620
+ type SurfaceVerdict = "not_found" | "store_unbound" | "project_mismatch" | "narrow_timing" | "should_surface";
621
+ interface WhyNotSurfacedResult {
622
+ /** The id exactly as queried. */
623
+ query: string;
624
+ /** Normalized LOCAL stable id (store-qualified `alias:ID` → `ID`). */
625
+ localId: string;
626
+ verdict: SurfaceVerdict;
627
+ /** Store the entry physically lives in, or null when not found. */
628
+ storeAlias: string | null;
629
+ /** Whether that store is in this project's read-set (null when not found). */
630
+ storeBound: boolean | null;
631
+ /** Entry's semantic_scope coordinate (audience axis), or null. */
632
+ semanticScope: string | null;
633
+ /** This repo's bound project coordinate segment, or null when unbound. */
634
+ activeProject: string | null;
635
+ /** Entry's relevance_scope (timing axis); defaults to "broad" when absent. */
636
+ relevanceScope: "broad" | "narrow" | null;
637
+ }
638
+ declare function explainWhyNotSurfaced(projectRoot: string, query: string): Promise<WhyNotSurfacedResult>;
639
+
508
640
  /**
509
- * Append-evidence-on-collision service for fab_extract_knowledge.
641
+ * Append-evidence-on-collision service for fab_propose.
510
642
  *
511
643
  * Idempotency_key = sha256({source_session: source_sessions[0], type, slug}).
512
644
  * The `source_session` key inside the hash payload is FROZEN for backward
@@ -523,10 +655,12 @@ declare function runDoctorConflictLint(projectRoot: string, opts?: {
523
655
  declare function extractKnowledge(projectRoot: string, input: FabExtractKnowledgeInput): Promise<FabExtractKnowledgeOutput>;
524
656
 
525
657
  /**
526
- * v2.0 rc.3 fab_review service.
658
+ * v2.0 rc.3 fab_review service (W3-K K2: WRITE-only).
527
659
  *
528
- * Pure async dispatcher over a discriminated union of 6 actions (list, approve,
529
- * reject, modify, search, defer). All branches are implemented as of TASK-002.
660
+ * Pure async dispatcher over a discriminated union of 6 WRITE actions (approve,
661
+ * reject, modify, modify-content, modify-layer, defer). The two READ actions
662
+ * (list / search) were lifted out into `reviewPending` (the fab_pending tool) —
663
+ * pure relocation, ZERO behavior change.
530
664
  *
531
665
  * Approve performs late-bind id allocation (KP-/KT- + type-code + monotonic
532
666
  * counter via KnowledgeIdAllocator), emits 2-phase events (knowledge_promote_started
@@ -540,6 +674,19 @@ declare function extractKnowledge(projectRoot: string, input: FabExtractKnowledg
540
674
  * the file across layer roots, emits knowledge_layer_changed.
541
675
  */
542
676
  declare function reviewKnowledge(projectRoot: string, input: FabReviewInput): Promise<FabReviewOutput>;
677
+ /**
678
+ * fab_pending service (W3-K K2: READ-only).
679
+ *
680
+ * Pure async dispatcher over the two READ actions (list / search) relocated
681
+ * from `reviewKnowledge`. list browses the store-backed pending backlog;
682
+ * search ranges over BOTH pending and canonical knowledge. Neither mutates
683
+ * state — the fab_pending tool is registered readOnlyHint:true / idempotentHint:true.
684
+ * P1 recall-engine-refactor (TASK-005): search now routes through `triageSearch`,
685
+ * which gates on the substring query then RANKS the matches via the shared
686
+ * rankDescriptionItems('triage') — NO top_k, NO floor, so pending review never
687
+ * silently drops a match. The old substring-only search machine is gone.
688
+ */
689
+ declare function reviewPending(projectRoot: string, input: FabPendingInput): Promise<FabPendingOutput>;
543
690
 
544
691
  /** A summary to be cold-judged, keyed by its stable_id. */
545
692
  interface ColdEvalCandidate {
@@ -572,6 +719,148 @@ declare const COLD_EVAL_RUBRIC: string;
572
719
  */
573
720
  declare function buildColdEvalBatch(candidates: ColdEvalCandidate[]): ColdEvalBatch;
574
721
 
722
+ interface RelatedBrokenLink {
723
+ /** The entry (store-qualified id) that declared the `related` edge. */
724
+ source: string;
725
+ /** The unresolvable related value. */
726
+ target: string;
727
+ }
728
+ interface RelatedHubEntry {
729
+ stableId: string;
730
+ inDegree: number;
731
+ }
732
+ interface RelatedGraphInspection {
733
+ brokenLinks: RelatedBrokenLink[];
734
+ hubEntries: RelatedHubEntry[];
735
+ /** Total canonical entries scanned. */
736
+ totalEntries: number;
737
+ }
738
+ /** A single node fed into the pure graph builder. */
739
+ interface RelatedGraphNode {
740
+ /** Store-qualified id (`<alias>:<stableId>`). */
741
+ qualifiedId: string;
742
+ /** The entry's declared `related` edges (frontmatter), if any. */
743
+ related?: string[];
744
+ }
745
+ /**
746
+ * Build the related-edge graph from a list of nodes and report broken links +
747
+ * hub ranking. Pure — no I/O — so the broken-link / in-degree logic can be
748
+ * tested with hand-built fixtures.
749
+ *
750
+ * A "broken link" is a `related` value that does not appear as any node's
751
+ * store-qualified id NOR bare stable_id in the corpus. Store-qualified
752
+ * references (`alias:id`) and bare references (`id`) both resolve, because the
753
+ * id index carries both forms for every node.
754
+ */
755
+ declare function buildRelatedGraph(nodes: RelatedGraphNode[]): RelatedGraphInspection;
756
+ /**
757
+ * Walk the store canonical corpus and build the related graph. Never throws —
758
+ * collectStoreCanonicalEntries degrades to [] when no store is in the read-set.
759
+ *
760
+ * Note: the previous (dead, never-wired) draft of this module re-parsed each
761
+ * entry's frontmatter via extractRuleDescription(entry.file) — passing a FILE
762
+ * PATH where a raw-markdown SOURCE was expected, which silently produced no
763
+ * edges. StoreCanonicalEntry already carries the parsed `description`, so we
764
+ * read `description.related` directly (the single source the recall path uses).
765
+ */
766
+ declare function inspectRelatedGraph(projectRoot: string): Promise<RelatedGraphInspection>;
767
+
768
+ interface StoreReachability {
769
+ uuid: string;
770
+ alias: string;
771
+ reachable: boolean;
772
+ reason?: string;
773
+ }
774
+ interface PrecheckResult {
775
+ stores: StoreReachability[];
776
+ allReachable: boolean;
777
+ }
778
+ declare function clearPrecheckCache(): void;
779
+ /**
780
+ * Evaluate a single store directory's reachability. A store is reachable when
781
+ * BOTH hold:
782
+ * 1. The store directory exists on disk.
783
+ * 2. The directory contains either a `store.json` (valid JSON, local-only
784
+ * store) OR a `.git/` subdirectory (git-cloned store).
785
+ *
786
+ * Pure (filesystem-only, no config resolution) so the rule is testable with a
787
+ * temp directory regardless of the machine's ~/.fabric layout.
788
+ */
789
+ declare function evaluateStoreDir(storeDir: string, identity: {
790
+ uuid: string;
791
+ alias: string;
792
+ }): StoreReachability;
793
+ /**
794
+ * Check that every store in the project's read-set is reachable on disk.
795
+ * Results are cached for 60s (CACHE_TTL_MS). Call `clearPrecheckCache()` when a
796
+ * store mount / unmount operation invalidates the cache.
797
+ *
798
+ * `globalRoot` is injectable for hermetic tests; production callers use the
799
+ * resolved ~/.fabric root.
800
+ */
801
+ declare function precheckStoreReachability(projectRoot: string, globalRoot?: string, now?: number): Promise<PrecheckResult>;
802
+
803
+ interface ConsumptionLintConfig {
804
+ /** Rolling window in days (default 30). */
805
+ windowDays: number;
806
+ /** How many top-consumed entries to report (default 10). */
807
+ topN: number;
808
+ /** Minimum CORPUS size before the lint runs at all (fresh-install guard). */
809
+ minTotalEntries: number;
810
+ /**
811
+ * Data-maturity gate axis 1: minimum number of metrics windows (rows) that
812
+ * recorded ≥1 consumption counter before zero-consumed is trustworthy.
813
+ */
814
+ minConsumedWindows: number;
815
+ /**
816
+ * Data-maturity gate axis 2: minimum total consumption events in the window
817
+ * before zero-consumed is trustworthy.
818
+ */
819
+ minConsumedEvents: number;
820
+ }
821
+ interface ConsumptionEntry {
822
+ /** Store-qualified id (`<alias>:<stableId>`). */
823
+ stableId: string;
824
+ count: number;
825
+ }
826
+ interface ConsumptionInspection {
827
+ topConsumed: ConsumptionEntry[];
828
+ /**
829
+ * Corpus entries never consumed in the window. ALWAYS [] when the data is not
830
+ * mature (dataMature === false) — the gate suppresses the noisy signal.
831
+ */
832
+ zeroConsumed: string[];
833
+ /** Total corpus entries considered for the zero-consumed denominator. */
834
+ totalEntries: number;
835
+ /** Distinct entries with ≥1 consumption in the window. */
836
+ consumedEntries: number;
837
+ /** Number of metrics windows (rows) that carried ≥1 consumption counter. */
838
+ consumedWindows: number;
839
+ /** Sum of all consumption counts in the window. */
840
+ totalConsumedEvents: number;
841
+ /** True when both maturity axes clear their thresholds. */
842
+ dataMature: boolean;
843
+ windowDays: number;
844
+ }
845
+ /**
846
+ * Aggregate consumption from metrics rows against the canonical corpus id list.
847
+ * Pure — no I/O — so the windowing, prefix parsing, top-N ranking, zero-consumed
848
+ * computation, and the maturity gate are all testable with fixtures.
849
+ *
850
+ * @param rows metrics.jsonl rows (any window/order)
851
+ * @param allQualifiedIds store-qualified ids of the canonical corpus
852
+ * @param now current epoch ms (injected for deterministic windowing)
853
+ */
854
+ declare function aggregateConsumption(rows: MetricsRow[], allQualifiedIds: string[], now: number, config?: Partial<ConsumptionLintConfig>): ConsumptionInspection;
855
+ /**
856
+ * Read metrics.jsonl + the canonical corpus and aggregate consumption. Never
857
+ * throws — readMetrics returns [] on a missing ledger and collectStoreCanonical
858
+ * Entries returns [] when no store is in the read-set.
859
+ *
860
+ * `now` is injectable for deterministic tests.
861
+ */
862
+ declare function inspectConsumption(projectRoot: string, config?: Partial<ConsumptionLintConfig>, now?: number): Promise<ConsumptionInspection>;
863
+
575
864
  type StoredEventLedgerEvent = EventLedgerEvent;
576
865
  type ReadEventLedgerOptions = {
577
866
  event_type?: EventLedgerEvent["event_type"];
@@ -662,12 +951,16 @@ type PlanContextResult = {
662
951
  entries: PlanContextEntry[];
663
952
  intent?: string;
664
953
  candidates: RuleDescriptionIndexItem[];
665
- omitted_candidate_count?: number;
954
+ dropped?: {
955
+ id: string;
956
+ reason: "retrieval_budget" | "payload_budget";
957
+ }[];
666
958
  preflight_diagnostics: PreflightDiagnostic[];
667
959
  auto_healed?: boolean;
668
960
  previous_revision_hash?: string;
669
961
  redirects?: Record<string, string>;
670
962
  related_appended?: Record<string, string>;
963
+ candidate_scores?: Map<string, RecallScore>;
671
964
  /** Internal service→tool signal; stripped before MCP output. */
672
965
  payload_trimmed?: boolean;
673
966
  /** Internal service→tool signal; stripped before MCP output. */
@@ -703,15 +996,22 @@ type RecallInput = PlanContextInput & {
703
996
  */
704
997
  include_related?: boolean;
705
998
  };
706
- type RecallPath = {
999
+ type FullRuleDescription = PlanContextResult["candidates"][number]["description"];
1000
+ type RecallEntryDescription = Pick<FullRuleDescription, "summary" | "must_read_if" | "intent_clues"> & Partial<Pick<FullRuleDescription, "knowledge_type">>;
1001
+ type RecallEntry = {
707
1002
  stable_id: string;
708
- path: string;
1003
+ rank: number;
1004
+ description: RecallEntryDescription;
1005
+ read_path?: string;
709
1006
  store?: {
710
1007
  alias: string;
711
1008
  };
1009
+ body_in_context?: boolean;
1010
+ score?: number;
1011
+ score_breakdown?: RecallScoreBreakdown;
712
1012
  };
713
- type RecallResult = Omit<PlanContextResult, "selection_token" | "payload_trimmed" | "payload_over_budget"> & {
714
- paths: RecallPath[];
1013
+ type RecallResult = Omit<PlanContextResult, "selection_token" | "payload_trimmed" | "payload_over_budget" | "entries" | "candidates" | "candidate_scores"> & {
1014
+ entries: RecallEntry[];
715
1015
  directive: string;
716
1016
  next_steps?: string[];
717
1017
  };
@@ -857,4 +1157,4 @@ interface ShutdownHandlerDeps {
857
1157
  */
858
1158
  declare function createShutdownHandler(deps: ShutdownHandlerDeps): () => void;
859
1159
 
860
- export { AGENTS_MD_RESOURCE_URI, type AlwaysActiveBody, type ArchiveHistoryEntry, type ArchiveHistoryReport, COLD_EVAL_RUBRIC, type CiteCoverageReport, type ColdEvalBatch, type ColdEvalCandidate, type ColdEvalVerdict, type ConflictEntry, type ConflictJudge, type ConflictLintReport, type ConflictPair, type ConflictVerdict, DEFAULT_CONFLICT_SIMILARITY_THRESHOLD, type DoctorApplyLintMutation, type DoctorApplyLintMutationKind, type DoctorApplyLintReport, type DoctorFixReport, type DoctorIssue, type DoctorReport, EVENT_LEDGER_PATH, type EnrichDescriptionsCandidate, type EnrichDescriptionsMode, type EnrichDescriptionsReport, FABRIC_SERVER_INSTRUCTIONS, type HistoryAllReport, type HistoryDayRow, type InFlightTracker, type KnowledgeCensus, LEDGER_PATH, LEGACY_LEDGER_PATH, METRICS_LEDGER_PATH, METRIC_COUNTER_NAMES, type MetricCounterName, type MetricsRow, type PlanContextInput, type PlanContextResult, type RecallInput, type RecallResult, type RequirementProfile, type SelectionTokenState, type ShutdownHandlerDeps, type UnboundProjectViolation, appendEventLedgerEvent, buildAlwaysActiveBodies, buildColdEvalBatch, buildKnowledgeCensus, bumpCounter, contextCache, createFabricServer, createInFlightTracker, createShutdownHandler, detectUnboundProject, drainCounters, enrichDescriptions, extractKnowledge, findConflictCandidates, flushAndSyncEventLedger, flushMetrics, formatPreexistingRootMessage, getEventLedgerPath, getLedgerPath, getLegacyLedgerPath, getMetricsLedgerPath, lintConflicts, loadConflictEntries, pairSimilarity, planContext, readEventLedger, readLedger, readMetrics, readSelectionToken, recall, rehydrateAgentsMetaAt, resolveLedgerPaths, reviewKnowledge, runDoctorApplyLint, runDoctorArchiveHistory, runDoctorCiteCoverage, runDoctorConflictLint, runDoctorFix, runDoctorHistoryAll, runDoctorReport, startMetricsFlush, startRotationTick, startStdioServer, stopMetricsFlush, stopRotationTick };
1160
+ export { AGENTS_MD_RESOURCE_URI, type AlwaysActiveBody, type ArchiveHistoryEntry, type ArchiveHistoryReport, type BacklogAgeMetric, COLD_EVAL_RUBRIC, type CiteCoverageReport, type ColdEvalBatch, type ColdEvalCandidate, type ColdEvalVerdict, type ConflictEntry, type ConflictJudge, type ConflictLintReport, type ConflictPair, type ConflictVerdict, type ConsumptionEntry, type ConsumptionInspection, type ConsumptionLintConfig, DEFAULT_CONFLICT_SIMILARITY_THRESHOLD, type DoctorApplyLintMutation, type DoctorApplyLintMutationKind, type DoctorApplyLintReport, type DoctorFixReport, type DoctorIssue, type DoctorReport, EVENT_LEDGER_PATH, type EnrichDescriptionsCandidate, type EnrichDescriptionsMode, type EnrichDescriptionsReport, FABRIC_SERVER_INSTRUCTIONS, type HistoryAllReport, type HistoryDayRow, type InFlightTracker, type KnowledgeCensus, LEDGER_PATH, LEGACY_LEDGER_PATH, METRICS_LEDGER_PATH, METRIC_COUNTER_NAMES, type MetricCounterName, type MetricsRow, OPTIONAL_EMBED_PACKAGE, type PlanContextInput, type PlanContextResult, type PrecheckResult, RETIRED_TOKENS, type RecallInput, type RecallResult, type RelatedBrokenLink, type RelatedGraphInspection, type RelatedGraphNode, type RelatedHubEntry, type RequirementProfile, type RetiredReferenceHit, type RetiredReferenceInspection, type RetiredToken, type SelectionTokenState, type ShutdownHandlerDeps, type StoreCanonicalEntry, type StoreReachability, type SurfaceVerdict, type UnboundProjectViolation, type WhyNotSurfacedResult, aggregateConsumption, appendEventLedgerEvent, buildAlwaysActiveBodies, buildColdEvalBatch, buildKnowledgeCensus, buildRelatedGraph, bumpCounter, checkBacklogAge, clearPrecheckCache, collectStoreCanonicalEntries, contextCache, createFabricServer, createInFlightTracker, createShutdownHandler, defaultEmbedCacheDir, detectUnboundProject, drainCounters, enrichDescriptions, evaluateStoreDir, explainWhyNotSurfaced, extractKnowledge, findConflictCandidates, flushAndSyncEventLedger, flushMetrics, formatPreexistingRootMessage, getEventLedgerPath, getLedgerPath, getLegacyLedgerPath, getMetricsLedgerPath, inspectConsumption, inspectRelatedGraph, inspectRetiredReferences, isEmbedderResolvable, lintConflicts, loadConflictEntries, loadEmbedder, pairSimilarity, planContext, precheckStoreReachability, readEmbedConfig, readEventLedger, readFusion, readLedger, readMetrics, readSelectionToken, recall, rehydrateAgentsMetaAt, renderBacklogAgeLine, resolveLedgerPaths, reviewKnowledge, reviewPending, runDoctorApplyLint, runDoctorArchiveHistory, runDoctorCiteCoverage, runDoctorConflictLint, runDoctorFix, runDoctorHistoryAll, runDoctorReport, startMetricsFlush, startRotationTick, startStdioServer, stopMetricsFlush, stopRotationTick };