@fenglimg/fabric-shared 2.3.0-rc.3 → 2.3.0-rc.5

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.
@@ -47,21 +47,19 @@ var structuredWarningSchema = z3.object({
47
47
  });
48
48
  var _knowledgeTypeEnum = z3.enum(["models", "decisions", "guidelines", "pitfalls", "processes"]);
49
49
  var _maturityEnum = z3.enum(["draft", "verified", "proven"]);
50
- var _layerEnum = z3.enum(["personal", "team"]);
51
50
  var _ruleDescriptionSchema = z3.object({
52
51
  summary: z3.string(),
53
52
  intent_clues: z3.array(z3.string()),
54
53
  tech_stack: z3.array(z3.string()),
55
54
  impact: z3.array(z3.string()),
56
55
  must_read_if: z3.string(),
57
- entities: z3.array(z3.string()).optional(),
58
56
  // v2.0: optional knowledge-entry fields. Absent for v1.x rules; present for
59
- // entries that declare frontmatter `id/type/maturity/layer`.
57
+ // entries that declare frontmatter `id/type/maturity`. W4/Track1: the redundant
58
+ // `knowledge_layer` field was removed — a candidate's layer is derived from its
59
+ // stable_id prefix (KP-→personal, else team; KT-DEC-0004).
60
60
  id: z3.string().optional(),
61
61
  knowledge_type: _knowledgeTypeEnum.optional(),
62
62
  maturity: _maturityEnum.optional(),
63
- knowledge_layer: _layerEnum.optional(),
64
- layer_reason: z3.string().optional(),
65
63
  created_at: z3.string().optional(),
66
64
  // v2.0.0-rc.38 UX-3 (D-MCP fold ③): these three were previously carried ONLY
67
65
  // as top-level mirrors on the index item. With the mirrors removed,
@@ -194,7 +192,11 @@ var planContextHintNarrowEntrySchema = z3.object({
194
192
  // W2-2 (KT-DEC-0027): the entry's must_read_if trigger hook, forwarded for the
195
193
  // SessionStart REFERENCE rendering (decision/pitfall/process → title + hook).
196
194
  // Optional — omitted when the frontmatter declares none.
197
- must_read_if: z3.string().optional()
195
+ must_read_if: z3.string().optional(),
196
+ // TASK-003 (impact-map MVP): the entry's impact list, forwarded so the narrow
197
+ // PreToolUse hint can surface the consequences of ignoring this knowledge when
198
+ // editing a matching relevance path. Optional — omitted when none declared.
199
+ impact: z3.array(z3.string()).optional()
198
200
  });
199
201
  var planContextHintOutputSchema = z3.object({
200
202
  version: z3.literal(1),
@@ -242,8 +244,8 @@ var knowledgeSectionsOutputSchema = z3.object({
242
244
  diagnostics: z3.array(
243
245
  // v2.0.0-rc.23 TASK-013 (F8b): `missing_section` was removed alongside the
244
246
  // A-set enum. `missing_knowledge_metadata` stays as the warn-level signal
245
- // for un-migrated v1.x entries (no knowledge_type AND no knowledge_layer
246
- // in frontmatter). Does NOT block selection.
247
+ // for un-migrated v1.x entries (no knowledge_type in frontmatter). Does NOT
248
+ // block selection.
247
249
  z3.object({
248
250
  code: z3.enum(["missing_knowledge_metadata", "unresolved_selected_id"]),
249
251
  severity: z3.literal("warn"),
@@ -1092,8 +1094,6 @@ var KnowledgeEntryFrontmatterSchema = z3.object({
1092
1094
  // draft | verified | proven
1093
1095
  layer: LayerSchema,
1094
1096
  // personal | team
1095
- layer_reason: z3.string().optional(),
1096
- // why this layer (for ambiguous cases)
1097
1097
  created_at: z3.string()
1098
1098
  // ISO 8601 timestamp
1099
1099
  // Note: 'tags' and other fields can be added later but core schema is these 6
@@ -5,7 +5,7 @@ import {
5
5
  enMessages,
6
6
  resolveFabricLocale,
7
7
  zhCNMessages
8
- } from "../chunk-UPYKUYHN.js";
8
+ } from "../chunk-P6INRP3A.js";
9
9
  import {
10
10
  detectNodeLocale,
11
11
  normalizeLocale,
@@ -8,13 +8,10 @@ interface RuleDescription {
8
8
  tech_stack: string[];
9
9
  impact: string[];
10
10
  must_read_if: string;
11
- entities?: string[];
12
11
  id?: string;
13
12
  knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes";
14
13
  maturity?: "draft" | "verified" | "proven";
15
- knowledge_layer?: "personal" | "team";
16
14
  semantic_scope?: string;
17
- layer_reason?: string;
18
15
  created_at?: string;
19
16
  tags?: string[];
20
17
  relevance_scope?: "narrow" | "broad";
@@ -477,7 +474,7 @@ declare const fabricConfigSchema: z.ZodObject<{
477
474
  fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
478
475
  onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
479
476
  broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
480
- hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
477
+ hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance", "narrow", "cite-evict"]>, "many">>;
481
478
  cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
482
479
  self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
483
480
  hint_narrow_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -557,7 +554,7 @@ declare const fabricConfigSchema: z.ZodObject<{
557
554
  } | undefined;
558
555
  cite_nudge_ignore_globs?: string[] | undefined;
559
556
  fabric_event_retention_days?: 7 | 30 | 90 | undefined;
560
- hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
557
+ hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
561
558
  orphan_demote_proven_days?: number | undefined;
562
559
  orphan_demote_verified_days?: number | undefined;
563
560
  orphan_demote_draft_days?: number | undefined;
@@ -613,7 +610,7 @@ declare const fabricConfigSchema: z.ZodObject<{
613
610
  fabric_event_retention_days?: 7 | 30 | 90 | undefined;
614
611
  onboard_slots_opted_out?: string[] | undefined;
615
612
  broad_index_backstop?: number | undefined;
616
- hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
613
+ hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
617
614
  cite_policy_enabled?: boolean | undefined;
618
615
  self_archive_policy_enabled?: boolean | undefined;
619
616
  hint_narrow_top_k?: number | undefined;
@@ -706,7 +703,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
706
703
  fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
707
704
  onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
708
705
  broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
709
- hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
706
+ hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance", "narrow", "cite-evict"]>, "many">>;
710
707
  cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
711
708
  self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
712
709
  hint_narrow_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -797,7 +794,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
797
794
  } | undefined;
798
795
  cite_nudge_ignore_globs?: string[] | undefined;
799
796
  fabric_event_retention_days?: 7 | 30 | 90 | undefined;
800
- hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
797
+ hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
801
798
  orphan_demote_proven_days?: number | undefined;
802
799
  orphan_demote_verified_days?: number | undefined;
803
800
  orphan_demote_draft_days?: number | undefined;
@@ -853,7 +850,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
853
850
  fabric_event_retention_days?: 7 | 30 | 90 | undefined;
854
851
  onboard_slots_opted_out?: string[] | undefined;
855
852
  broad_index_backstop?: number | undefined;
856
- hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
853
+ hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
857
854
  cite_policy_enabled?: boolean | undefined;
858
855
  self_archive_policy_enabled?: boolean | undefined;
859
856
  hint_narrow_top_k?: number | undefined;