@fenglimg/fabric-shared 2.0.0-rc.10 → 2.0.0-rc.11

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.
@@ -278,6 +278,23 @@ var _FabExtractKnowledgeInputBaseSchema = z.object({
278
278
  // empty placeholders; cap is soft (no max), Skill caps at ~600 chars.
279
279
  session_context: z.string().min(20, { message: "session_context must be \u226520 chars (3-5 lines describing goal + turning point)" }).describe(
280
280
  "3-5 line markdown blob \u2014 session goal + key turning point. Reviewed by future-self without transcript access."
281
+ ),
282
+ // v2.0.0-rc.8 A1 (skill-contract-fix): relevance scope/paths on the
283
+ // creation surface. Mirrors `_fabReviewModifyChangesSchema.relevance_*`
284
+ // (L518-533) verbatim so callers can declare scope at archive time
285
+ // instead of waiting for a fab_review.modify follow-up. Both fields are
286
+ // optional — when omitted, the pending file omits the YAML lines entirely
287
+ // (knowledge-meta-builder defaults to broad + [] at parse time, see
288
+ // L1007-1021). Personal + narrow is silently degraded to broad + [] at
289
+ // service entry, mirroring the rc.5 review.ts:725-739 behaviour, and emits
290
+ // a `knowledge_scope_degraded` event keyed by `pending:<idempotency_key>`.
291
+ // NOTE: these fields MUST NOT be part of the idempotency hash inputs at
292
+ // extract-knowledge.ts:78 — preserves rc.5→rc.7 collision detection.
293
+ relevance_scope: z.enum(["narrow", "broad"]).optional().describe(
294
+ "Optional relevance scope. 'narrow' restricts plan-context-hint surfacing to relevance_paths; 'broad' always surfaces. Omit to let the meta-builder default to 'broad'. Personal + narrow is silently degraded to broad + []."
295
+ ),
296
+ relevance_paths: z.array(z.string()).optional().describe(
297
+ "Optional path anchors for narrow scope. Workspace-relative globs or paths. Omit to let the meta-builder default to []. Ignored when scope is broad (server preserves the array for audit)."
281
298
  )
282
299
  });
283
300
  var FabExtractKnowledgeInputSchema = _FabExtractKnowledgeInputBaseSchema.superRefine(
@@ -1036,6 +1036,23 @@ var PROTECTED_TOKENS = [
1036
1036
  ".fabric/knowledge/",
1037
1037
  // Event types templates reference verbatim
1038
1038
  "knowledge_proposed",
1039
+ // fabric-archive Phase 1.5 contract surface (rc.9 — bare `scope` was renamed)
1040
+ "relevance_scope",
1041
+ "relevance_paths",
1042
+ // Phase 1.5 scope enum values (rc.9 — TASK-008 D1)
1043
+ "narrow",
1044
+ "broad",
1045
+ // v2.0.0-rc.7 T5/T6 fab_extract_knowledge contract fields (TASK-008 D1)
1046
+ "source_sessions",
1047
+ "proposed_reason",
1048
+ "session_context",
1049
+ // Layer enum values + pending output path key (TASK-008 D1)
1050
+ "layer",
1051
+ "team",
1052
+ "personal",
1053
+ "pending_path",
1054
+ // Server event emitted when personal layer auto-degrades narrow → broad (TASK-008 D1)
1055
+ "knowledge_scope_degraded",
1039
1056
  // Human-lock marker
1040
1057
  "@HUMAN",
1041
1058
  // Hard-rule keywords AI clients rely on for compliance
@@ -12,7 +12,7 @@ declare function detectNodeLocale(): Locale;
12
12
 
13
13
  declare function normalizeLocale(raw: string | null | undefined): Locale;
14
14
 
15
- declare const PROTECTED_TOKENS: readonly ["fab_plan_context", "fab_get_knowledge_sections", "fab_extract_knowledge", "fab_review", "AGENTS.md", ".fabric/agents/", ".fabric/agents/_cross/", ".fabric/agents.meta.json", ".fabric/human-lock.json", ".fabric/events.jsonl", ".fabric/knowledge/", "knowledge_proposed", "@HUMAN", "MUST", "NEVER"];
15
+ declare const PROTECTED_TOKENS: readonly ["fab_plan_context", "fab_get_knowledge_sections", "fab_extract_knowledge", "fab_review", "AGENTS.md", ".fabric/agents/", ".fabric/agents/_cross/", ".fabric/agents.meta.json", ".fabric/human-lock.json", ".fabric/events.jsonl", ".fabric/knowledge/", "knowledge_proposed", "relevance_scope", "relevance_paths", "narrow", "broad", "source_sessions", "proposed_reason", "session_context", "layer", "team", "personal", "pending_path", "knowledge_scope_degraded", "@HUMAN", "MUST", "NEVER"];
16
16
  type ProtectedToken = (typeof PROTECTED_TOKENS)[number];
17
17
 
18
18
  declare const enMessages: Messages;
@@ -6,7 +6,7 @@ import {
6
6
  enMessages,
7
7
  normalizeLocale,
8
8
  zhCNMessages
9
- } from "../chunk-YGEE3WMC.js";
9
+ } from "../chunk-W4TKEXRG.js";
10
10
  export {
11
11
  PROTECTED_TOKENS,
12
12
  createTranslator,