@fenglimg/fabric-shared 2.3.0-rc.2 → 2.3.0-rc.4

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.
@@ -5,12 +5,12 @@ import {
5
5
  enMessages,
6
6
  resolveFabricLocale,
7
7
  zhCNMessages
8
- } from "../chunk-ZYBWITH7.js";
8
+ } from "../chunk-LDFQYCY7.js";
9
9
  import {
10
10
  detectNodeLocale,
11
11
  normalizeLocale,
12
12
  resolveGlobalLocale
13
- } from "../chunk-ANUDBQBK.js";
13
+ } from "../chunk-ASS2KBB7.js";
14
14
  export {
15
15
  PROTECTED_TOKENS,
16
16
  createTranslator,
@@ -496,7 +496,7 @@ declare const fabricConfigSchema: z.ZodObject<{
496
496
  embed_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
497
497
  embed_weight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
498
498
  embed_model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fast-bge-small-zh-v1.5", "fast-multilingual-e5-large", "fast-bge-small-en-v1.5", "fast-bge-small-en", "fast-bge-base-en-v1.5", "fast-bge-base-en", "fast-all-MiniLM-L6-v2"]>>>;
499
- fusion: z.ZodDefault<z.ZodOptional<z.ZodEnum<["additive", "rrf"]>>>;
499
+ fusion: z.ZodDefault<z.ZodOptional<z.ZodEnum<["additive", "rrf", "auto"]>>>;
500
500
  }, "strip", z.ZodTypeAny, {
501
501
  default_layer_filter: "personal" | "team" | "both";
502
502
  nudge_mode: "silent" | "minimal" | "normal" | "verbose";
@@ -525,7 +525,7 @@ declare const fabricConfigSchema: z.ZodObject<{
525
525
  embed_enabled: boolean;
526
526
  embed_weight: number;
527
527
  embed_model: "fast-bge-small-zh-v1.5" | "fast-multilingual-e5-large" | "fast-bge-small-en-v1.5" | "fast-bge-small-en" | "fast-bge-base-en-v1.5" | "fast-bge-base-en" | "fast-all-MiniLM-L6-v2";
528
- fusion: "additive" | "rrf";
528
+ fusion: "additive" | "rrf" | "auto";
529
529
  clientPaths?: {
530
530
  claudeCodeCLI?: string | undefined;
531
531
  claudeCodeDesktop?: string | undefined;
@@ -632,7 +632,7 @@ declare const fabricConfigSchema: z.ZodObject<{
632
632
  embed_enabled?: boolean | undefined;
633
633
  embed_weight?: number | undefined;
634
634
  embed_model?: "fast-bge-small-zh-v1.5" | "fast-multilingual-e5-large" | "fast-bge-small-en-v1.5" | "fast-bge-small-en" | "fast-bge-base-en-v1.5" | "fast-bge-base-en" | "fast-all-MiniLM-L6-v2" | undefined;
635
- fusion?: "additive" | "rrf" | undefined;
635
+ fusion?: "additive" | "rrf" | "auto" | undefined;
636
636
  }>;
637
637
  declare const fabricConfigLoadSchema: z.ZodObject<{
638
638
  clientPaths: z.ZodOptional<z.ZodObject<{
@@ -725,7 +725,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
725
725
  embed_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
726
726
  embed_weight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
727
727
  embed_model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fast-bge-small-zh-v1.5", "fast-multilingual-e5-large", "fast-bge-small-en-v1.5", "fast-bge-small-en", "fast-bge-base-en-v1.5", "fast-bge-base-en", "fast-all-MiniLM-L6-v2"]>>>;
728
- fusion: z.ZodDefault<z.ZodOptional<z.ZodEnum<["additive", "rrf"]>>>;
728
+ fusion: z.ZodDefault<z.ZodOptional<z.ZodEnum<["additive", "rrf", "auto"]>>>;
729
729
  } & {
730
730
  required_stores: z.ZodOptional<z.ZodArray<z.ZodObject<{
731
731
  id: z.ZodString;
@@ -765,7 +765,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
765
765
  embed_enabled: boolean;
766
766
  embed_weight: number;
767
767
  embed_model: "fast-bge-small-zh-v1.5" | "fast-multilingual-e5-large" | "fast-bge-small-en-v1.5" | "fast-bge-small-en" | "fast-bge-base-en-v1.5" | "fast-bge-base-en" | "fast-all-MiniLM-L6-v2";
768
- fusion: "additive" | "rrf";
768
+ fusion: "additive" | "rrf" | "auto";
769
769
  clientPaths?: {
770
770
  claudeCodeCLI?: string | undefined;
771
771
  claudeCodeDesktop?: string | undefined;
@@ -872,7 +872,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
872
872
  embed_enabled?: boolean | undefined;
873
873
  embed_weight?: number | undefined;
874
874
  embed_model?: "fast-bge-small-zh-v1.5" | "fast-multilingual-e5-large" | "fast-bge-small-en-v1.5" | "fast-bge-small-en" | "fast-bge-base-en-v1.5" | "fast-bge-base-en" | "fast-all-MiniLM-L6-v2" | undefined;
875
- fusion?: "additive" | "rrf" | undefined;
875
+ fusion?: "additive" | "rrf" | "auto" | undefined;
876
876
  }>;
877
877
 
878
878
  interface ClientPaths {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, S as StoreIdentity, c as StoreProject, G as GlobalConfig, F as FabricConfig, M as MountedStore, R as RequiredStoreEntry, d as AgentsMeta, L as LedgerEntry } from './index-BO7itJ8e.js';
2
- export { e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, j as FabricLanguage, k as GLOBAL_BINDINGS_DIR, l as GLOBAL_STATE_DIR, m as HumanLedgerEntry, n as McpPayloadLimits, P as PERSONAL_STORE_SENTINEL, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem, s as STORES_ROOT_DIR, t as STORE_ALIAS_PATTERN, u as STORE_KNOWLEDGE_TYPE_DIRS, v as STORE_LAYOUT, w as STORE_MOUNT_GROUPS, x as STORE_MOUNT_NAME_PATTERN, y as STORE_PROJECT_ID_PATTERN, z as STORE_UUID_PATTERN, B as StoreLayout, E as StoreMountGroup, I as StoreProjectsFile, J as auditModeSchema, K as clientPathsSchema, N as defaultLayerFilterSchema, O as deriveMountLabel, Q as fabricConfigLoadSchema, T as fabricLanguageSchema, U as globalConfigSchema, V as isNonPersonalRequiredStore, W as mcpPayloadLimitsSchema, X as migrateRequiredStores, Y as mountedStoreSchema, Z as nudgeModeSchema, _ as observeConfigSchema, $ as planContextTopKSchema, a0 as requiredStoreEntrySchema, a1 as selectionTokenTtlMsSchema, a2 as storeAliasSchema, a3 as storeIdentitySchema, a4 as storeKnowledgeTypeDir, a5 as storeMountGroup, a6 as storeMountNameSchema, a7 as storeMountSubPath, a8 as storeProjectSchema, a9 as storeProjectsFileSchema, aa as storeRelativePath, ab as storeRelativePathForMount, ac as storeUuidSchema, ad as writeRouteSchema } from './index-BO7itJ8e.js';
1
+ import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, S as StoreIdentity, c as StoreProject, G as GlobalConfig, F as FabricConfig, M as MountedStore, R as RequiredStoreEntry, d as AgentsMeta, L as LedgerEntry } from './index-C0cijMSw.js';
2
+ export { e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, j as FabricLanguage, k as GLOBAL_BINDINGS_DIR, l as GLOBAL_STATE_DIR, m as HumanLedgerEntry, n as McpPayloadLimits, P as PERSONAL_STORE_SENTINEL, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem, s as STORES_ROOT_DIR, t as STORE_ALIAS_PATTERN, u as STORE_KNOWLEDGE_TYPE_DIRS, v as STORE_LAYOUT, w as STORE_MOUNT_GROUPS, x as STORE_MOUNT_NAME_PATTERN, y as STORE_PROJECT_ID_PATTERN, z as STORE_UUID_PATTERN, B as StoreLayout, E as StoreMountGroup, I as StoreProjectsFile, J as auditModeSchema, K as clientPathsSchema, N as defaultLayerFilterSchema, O as deriveMountLabel, Q as fabricConfigLoadSchema, T as fabricLanguageSchema, U as globalConfigSchema, V as isNonPersonalRequiredStore, W as mcpPayloadLimitsSchema, X as migrateRequiredStores, Y as mountedStoreSchema, Z as nudgeModeSchema, _ as observeConfigSchema, $ as planContextTopKSchema, a0 as requiredStoreEntrySchema, a1 as selectionTokenTtlMsSchema, a2 as storeAliasSchema, a3 as storeIdentitySchema, a4 as storeKnowledgeTypeDir, a5 as storeMountGroup, a6 as storeMountNameSchema, a7 as storeMountSubPath, a8 as storeProjectSchema, a9 as storeProjectsFileSchema, aa as storeRelativePath, ab as storeRelativePathForMount, ac as storeUuidSchema, ad as writeRouteSchema } from './index-C0cijMSw.js';
3
3
  import { T as Translator } from './types-qg4xXVuT.js';
4
4
  export { L as Locale, M as Messages, a as TranslationKey } from './types-qg4xXVuT.js';
5
5
  export { PROTECTED_TOKENS, ProtectedToken, createTranslator, defaultMessages, detectNodeLocale, enMessages, normalizeLocale, resolveFabricLocale, resolveGlobalLocale, zhCNMessages } from './i18n/index.js';
@@ -3351,13 +3351,13 @@ declare const forensicAssertionCoverageSchema: z.ZodObject<{
3351
3351
  matched: z.ZodNumber;
3352
3352
  co_occurring_patterns: z.ZodArray<z.ZodString, "many">;
3353
3353
  }, "strip", z.ZodTypeAny, {
3354
- ratio: number;
3355
3354
  total: number;
3355
+ ratio: number;
3356
3356
  matched: number;
3357
3357
  co_occurring_patterns: string[];
3358
3358
  }, {
3359
- ratio: number;
3360
3359
  total: number;
3360
+ ratio: number;
3361
3361
  matched: number;
3362
3362
  co_occurring_patterns: string[];
3363
3363
  }>;
@@ -3384,13 +3384,13 @@ declare const forensicAssertionSchema: z.ZodObject<{
3384
3384
  matched: z.ZodNumber;
3385
3385
  co_occurring_patterns: z.ZodArray<z.ZodString, "many">;
3386
3386
  }, "strip", z.ZodTypeAny, {
3387
- ratio: number;
3388
3387
  total: number;
3388
+ ratio: number;
3389
3389
  matched: number;
3390
3390
  co_occurring_patterns: string[];
3391
3391
  }, {
3392
- ratio: number;
3393
3392
  total: number;
3393
+ ratio: number;
3394
3394
  matched: number;
3395
3395
  co_occurring_patterns: string[];
3396
3396
  }>;
@@ -3406,8 +3406,8 @@ declare const forensicAssertionSchema: z.ZodObject<{
3406
3406
  snippet: string;
3407
3407
  }[];
3408
3408
  coverage: {
3409
- ratio: number;
3410
3409
  total: number;
3410
+ ratio: number;
3411
3411
  matched: number;
3412
3412
  co_occurring_patterns: string[];
3413
3413
  };
@@ -3423,8 +3423,8 @@ declare const forensicAssertionSchema: z.ZodObject<{
3423
3423
  snippet: string;
3424
3424
  }[];
3425
3425
  coverage: {
3426
- ratio: number;
3427
3426
  total: number;
3427
+ ratio: number;
3428
3428
  matched: number;
3429
3429
  co_occurring_patterns: string[];
3430
3430
  };
@@ -3602,13 +3602,13 @@ declare const forensicReportSchema: z.ZodObject<{
3602
3602
  matched: z.ZodNumber;
3603
3603
  co_occurring_patterns: z.ZodArray<z.ZodString, "many">;
3604
3604
  }, "strip", z.ZodTypeAny, {
3605
- ratio: number;
3606
3605
  total: number;
3606
+ ratio: number;
3607
3607
  matched: number;
3608
3608
  co_occurring_patterns: string[];
3609
3609
  }, {
3610
- ratio: number;
3611
3610
  total: number;
3611
+ ratio: number;
3612
3612
  matched: number;
3613
3613
  co_occurring_patterns: string[];
3614
3614
  }>;
@@ -3624,8 +3624,8 @@ declare const forensicReportSchema: z.ZodObject<{
3624
3624
  snippet: string;
3625
3625
  }[];
3626
3626
  coverage: {
3627
- ratio: number;
3628
3627
  total: number;
3628
+ ratio: number;
3629
3629
  matched: number;
3630
3630
  co_occurring_patterns: string[];
3631
3631
  };
@@ -3641,8 +3641,8 @@ declare const forensicReportSchema: z.ZodObject<{
3641
3641
  snippet: string;
3642
3642
  }[];
3643
3643
  coverage: {
3644
- ratio: number;
3645
3644
  total: number;
3645
+ ratio: number;
3646
3646
  matched: number;
3647
3647
  co_occurring_patterns: string[];
3648
3648
  };
@@ -3725,8 +3725,8 @@ declare const forensicReportSchema: z.ZodObject<{
3725
3725
  snippet: string;
3726
3726
  }[];
3727
3727
  coverage: {
3728
- ratio: number;
3729
3728
  total: number;
3729
+ ratio: number;
3730
3730
  matched: number;
3731
3731
  co_occurring_patterns: string[];
3732
3732
  };
@@ -3787,8 +3787,8 @@ declare const forensicReportSchema: z.ZodObject<{
3787
3787
  snippet: string;
3788
3788
  }[];
3789
3789
  coverage: {
3790
- ratio: number;
3791
3790
  total: number;
3791
+ ratio: number;
3792
3792
  matched: number;
3793
3793
  co_occurring_patterns: string[];
3794
3794
  };
@@ -5072,13 +5072,13 @@ declare const driftDetectedEventSchema: z.ZodObject<{
5072
5072
  matched: z.ZodNumber;
5073
5073
  co_occurring_patterns: z.ZodArray<z.ZodString, "many">;
5074
5074
  }, "strip", z.ZodTypeAny, {
5075
- ratio: number;
5076
5075
  total: number;
5076
+ ratio: number;
5077
5077
  matched: number;
5078
5078
  co_occurring_patterns: string[];
5079
5079
  }, {
5080
- ratio: number;
5081
5080
  total: number;
5081
+ ratio: number;
5082
5082
  matched: number;
5083
5083
  co_occurring_patterns: string[];
5084
5084
  }>;
@@ -5094,8 +5094,8 @@ declare const driftDetectedEventSchema: z.ZodObject<{
5094
5094
  snippet: string;
5095
5095
  }[];
5096
5096
  coverage: {
5097
- ratio: number;
5098
5097
  total: number;
5098
+ ratio: number;
5099
5099
  matched: number;
5100
5100
  co_occurring_patterns: string[];
5101
5101
  };
@@ -5111,8 +5111,8 @@ declare const driftDetectedEventSchema: z.ZodObject<{
5111
5111
  snippet: string;
5112
5112
  }[];
5113
5113
  coverage: {
5114
- ratio: number;
5115
5114
  total: number;
5115
+ ratio: number;
5116
5116
  matched: number;
5117
5117
  co_occurring_patterns: string[];
5118
5118
  };
@@ -5195,8 +5195,8 @@ declare const driftDetectedEventSchema: z.ZodObject<{
5195
5195
  snippet: string;
5196
5196
  }[];
5197
5197
  coverage: {
5198
- ratio: number;
5199
5198
  total: number;
5199
+ ratio: number;
5200
5200
  matched: number;
5201
5201
  co_occurring_patterns: string[];
5202
5202
  };
@@ -5257,8 +5257,8 @@ declare const driftDetectedEventSchema: z.ZodObject<{
5257
5257
  snippet: string;
5258
5258
  }[];
5259
5259
  coverage: {
5260
- ratio: number;
5261
5260
  total: number;
5261
+ ratio: number;
5262
5262
  matched: number;
5263
5263
  co_occurring_patterns: string[];
5264
5264
  };
@@ -5322,8 +5322,8 @@ declare const driftDetectedEventSchema: z.ZodObject<{
5322
5322
  snippet: string;
5323
5323
  }[];
5324
5324
  coverage: {
5325
- ratio: number;
5326
5325
  total: number;
5326
+ ratio: number;
5327
5327
  matched: number;
5328
5328
  co_occurring_patterns: string[];
5329
5329
  };
@@ -5387,8 +5387,8 @@ declare const driftDetectedEventSchema: z.ZodObject<{
5387
5387
  snippet: string;
5388
5388
  }[];
5389
5389
  coverage: {
5390
- ratio: number;
5391
5390
  total: number;
5391
+ ratio: number;
5392
5392
  matched: number;
5393
5393
  co_occurring_patterns: string[];
5394
5394
  };
@@ -6304,13 +6304,13 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6304
6304
  matched: z.ZodNumber;
6305
6305
  co_occurring_patterns: z.ZodArray<z.ZodString, "many">;
6306
6306
  }, "strip", z.ZodTypeAny, {
6307
- ratio: number;
6308
6307
  total: number;
6308
+ ratio: number;
6309
6309
  matched: number;
6310
6310
  co_occurring_patterns: string[];
6311
6311
  }, {
6312
- ratio: number;
6313
6312
  total: number;
6313
+ ratio: number;
6314
6314
  matched: number;
6315
6315
  co_occurring_patterns: string[];
6316
6316
  }>;
@@ -6326,8 +6326,8 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6326
6326
  snippet: string;
6327
6327
  }[];
6328
6328
  coverage: {
6329
- ratio: number;
6330
6329
  total: number;
6330
+ ratio: number;
6331
6331
  matched: number;
6332
6332
  co_occurring_patterns: string[];
6333
6333
  };
@@ -6343,8 +6343,8 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6343
6343
  snippet: string;
6344
6344
  }[];
6345
6345
  coverage: {
6346
- ratio: number;
6347
6346
  total: number;
6347
+ ratio: number;
6348
6348
  matched: number;
6349
6349
  co_occurring_patterns: string[];
6350
6350
  };
@@ -6427,8 +6427,8 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6427
6427
  snippet: string;
6428
6428
  }[];
6429
6429
  coverage: {
6430
- ratio: number;
6431
6430
  total: number;
6431
+ ratio: number;
6432
6432
  matched: number;
6433
6433
  co_occurring_patterns: string[];
6434
6434
  };
@@ -6489,8 +6489,8 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6489
6489
  snippet: string;
6490
6490
  }[];
6491
6491
  coverage: {
6492
- ratio: number;
6493
6492
  total: number;
6493
+ ratio: number;
6494
6494
  matched: number;
6495
6495
  co_occurring_patterns: string[];
6496
6496
  };
@@ -6554,8 +6554,8 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6554
6554
  snippet: string;
6555
6555
  }[];
6556
6556
  coverage: {
6557
- ratio: number;
6558
6557
  total: number;
6558
+ ratio: number;
6559
6559
  matched: number;
6560
6560
  co_occurring_patterns: string[];
6561
6561
  };
@@ -6619,8 +6619,8 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6619
6619
  snippet: string;
6620
6620
  }[];
6621
6621
  coverage: {
6622
- ratio: number;
6623
6622
  total: number;
6623
+ ratio: number;
6624
6624
  matched: number;
6625
6625
  co_occurring_patterns: string[];
6626
6626
  };
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  BOOTSTRAP_REGEX,
8
8
  matchBootstrapCanonicalLocale,
9
9
  resolveBootstrapCanonical
10
- } from "./chunk-OAYQHN6J.js";
10
+ } from "./chunk-KFFBQRL5.js";
11
11
  import "./chunk-LXNCAKJZ.js";
12
12
  import {
13
13
  PROTECTED_TOKENS,
@@ -16,7 +16,7 @@ import {
16
16
  enMessages,
17
17
  resolveFabricLocale,
18
18
  zhCNMessages
19
- } from "./chunk-ZYBWITH7.js";
19
+ } from "./chunk-LDFQYCY7.js";
20
20
  import {
21
21
  GLOBAL_BINDINGS_DIR,
22
22
  GLOBAL_STATE_DIR,
@@ -51,7 +51,7 @@ import {
51
51
  storeRelativePath,
52
52
  storeRelativePathForMount,
53
53
  storeUuidSchema
54
- } from "./chunk-ANUDBQBK.js";
54
+ } from "./chunk-ASS2KBB7.js";
55
55
  import {
56
56
  atomicWriteJson,
57
57
  withFileLock
@@ -766,15 +766,18 @@ var fabricConfigSchema = z5.object({
766
766
  "fast-bge-base-en",
767
767
  "fast-all-MiniLM-L6-v2"
768
768
  ]).optional().default("fast-bge-small-zh-v1.5"),
769
- // P1 recall-engine-refactor (TASK-003): content-channel fusion strategy.
770
- // 'additive' (DEFAULT) = the historical weighted-sum path (BM25_WEIGHT·bm25 +
771
- // vectorWeight·vector + structural). 'rrf' = Reciprocal Rank Fusion over the
772
- // two CONTENT channels (bm25_rank, vector_rank) plus the unchanged structural
773
- // boost. RRF is gated behind this flag and ships OFF — flipping the default to
774
- // 'rrf' is a separate human decision gated on a one-off shadow run against the
775
- // developer's real bound team store. no-query ranking is byte-identical under
776
- // both values (the content channels contribute nothing without query terms).
777
- fusion: z5.enum(["additive", "rrf"]).optional().default("additive")
769
+ // P1 recall-engine-refactor (TASK-003 + follow-up): content-channel fusion
770
+ // strategy. 'additive' = the weighted-sum path (BM25_WEIGHT·bm25 + vectorWeight·
771
+ // vector + structural); the vector term is structurally minor (cosine·30 vs an
772
+ // unbounded BM25), so additive is effectively BM25-led. 'rrf' = Reciprocal Rank
773
+ // Fusion over the two CONTENT channels (bm25_rank, vector_rank, equal footing)
774
+ // + a re-scaled structural tiebreaker lets semantic recall actually matter.
775
+ // 'auto' (DEFAULT) = adaptive: use 'rrf' WHEN the vector channel is actually
776
+ // producing scores (embeddings installed + model warm), else fall back to
777
+ // 'additive'. This is the safe default — real-store shadow showed single-channel
778
+ // rrf (no vectors) is strictly worse than additive, so auto never lets that
779
+ // happen. no-query ranking is byte-identical under every value.
780
+ fusion: z5.enum(["additive", "rrf", "auto"]).optional().default("auto")
778
781
  });
779
782
  var fabricConfigLoadSchema = fabricConfigSchema.merge(
780
783
  z5.object({
@@ -949,7 +952,11 @@ var PANEL_FIELDS = [
949
952
  // when absent) — this introspection default mirrors the runtime read in
950
953
  // config-loader.ts so the panel never shows a default that contradicts behavior.
951
954
  makeEnumField("nudge_mode", "D_behavior", nudgeModeSchema.options, "normal"),
952
- makeBooleanField("embed_enabled", true)
955
+ makeBooleanField("embed_enabled", true),
956
+ // P1 recall-engine-refactor (follow-up): the content-channel fusion strategy,
957
+ // panel-editable so it sits next to embed_enabled (the two go together — rrf
958
+ // only pays off when embeddings are on). 'auto' is the safe adaptive default.
959
+ makeEnumField("fusion", "D_behavior", ["additive", "rrf", "auto"], "auto")
953
960
  ];
954
961
 
955
962
  // src/schemas/store-stable-id.ts
@@ -7,8 +7,8 @@ import {
7
7
  BOOTSTRAP_REGEX,
8
8
  matchBootstrapCanonicalLocale,
9
9
  resolveBootstrapCanonical
10
- } from "../chunk-OAYQHN6J.js";
11
- import "../chunk-ANUDBQBK.js";
10
+ } from "../chunk-KFFBQRL5.js";
11
+ import "../chunk-ASS2KBB7.js";
12
12
  export {
13
13
  BOOTSTRAP_CANONICAL_BY_LOCALE,
14
14
  BOOTSTRAP_CANONICAL_EN,
package/dist/theme.d.ts CHANGED
@@ -23,6 +23,7 @@ declare const SYMBOL_ASCII: {
23
23
  };
24
24
  declare function symbol(kind: keyof typeof SYMBOL_ASCII, colorOn?: boolean): string;
25
25
  declare function sectionBar(title: string, colorOn?: boolean): string;
26
+ declare function headerRule(title: string, colorOn?: boolean): string;
26
27
  declare const SCOPE_BADGE_TOKEN: {
27
28
  readonly team: "drift";
28
29
  readonly project: "ai";
@@ -30,4 +31,4 @@ declare const SCOPE_BADGE_TOKEN: {
30
31
  };
31
32
  declare function scopeBadge(scope: keyof typeof SCOPE_BADGE_TOKEN, colorOn?: boolean): string;
32
33
 
33
- export { ANSI, PALETTE, SYMBOL_ASCII, type ThemeToken, isColorEnabled, paint, scopeBadge, sectionBar, symbol };
34
+ export { ANSI, PALETTE, SYMBOL_ASCII, type ThemeToken, headerRule, isColorEnabled, paint, scopeBadge, sectionBar, symbol };
package/dist/theme.js CHANGED
@@ -40,6 +40,12 @@ function symbol(kind, colorOn = isColorEnabled()) {
40
40
  function sectionBar(title, colorOn = isColorEnabled()) {
41
41
  return colorOn ? `${ANSI.bold}${PALETTE.accent}\u258C ${title}${ANSI.reset}` : `# ${title}`;
42
42
  }
43
+ function headerRule(title, colorOn = isColorEnabled()) {
44
+ const head = colorOn ? `${ANSI.bold}${PALETTE.human}${title}${ANSI.reset}` : title;
45
+ const rule = paint("muted", (colorOn ? "\u2500" : "-").repeat(40), colorOn);
46
+ return `${head}
47
+ ${rule}`;
48
+ }
43
49
  var SCOPE_BADGE_TOKEN = { team: "drift", project: "ai", personal: "human" };
44
50
  function scopeBadge(scope, colorOn = isColorEnabled()) {
45
51
  const text = `[${scope}]`;
@@ -49,6 +55,7 @@ export {
49
55
  ANSI,
50
56
  PALETTE,
51
57
  SYMBOL_ASCII,
58
+ headerRule,
52
59
  isColorEnabled,
53
60
  paint,
54
61
  scopeBadge,
@@ -1,2 +1,2 @@
1
- export { a as AgentsIdentitySource, d as AgentsMeta, e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, b as AgentsTopologyType, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, j as FabricLanguage, m as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, n as McpPayloadLimits, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem } from '../index-BO7itJ8e.js';
1
+ export { a as AgentsIdentitySource, d as AgentsMeta, e as AgentsMetaCountersEnvelope, g as AgentsMetaKnowledgeTypeCounters, A as AgentsMetaNode, b as AgentsTopologyType, h as AiLedgerEntry, i as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, j as FabricLanguage, m as HumanLedgerEntry, H as HumanLockEntry, L as LedgerEntry, n as McpPayloadLimits, o as RecallScore, p as RecallScoreBreakdown, q as RuleDescription, r as RuleDescriptionIndexItem } from '../index-C0cijMSw.js';
2
2
  import 'zod';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fenglimg/fabric-shared",
3
- "version": "2.3.0-rc.2",
3
+ "version": "2.3.0-rc.4",
4
4
  "description": "Fabric shared types — Zod schemas, i18n, atomic-write helpers, MCP payload guard, error classes. Consumed by @fenglimg/fabric-server + @fenglimg/fabric-cli.",
5
5
  "license": "MIT",
6
6
  "author": "wangzhichao <fenglimg90@gmail.com>",