@fenglimg/fabric-shared 2.0.0-rc.26 → 2.0.0-rc.27

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.
@@ -368,7 +368,23 @@ var _fabReviewFiltersSchema = z2.object({
368
368
  // rc.4 TASK-006 fix (c): ISO-8601 lower bound on entry created_at; entries
369
369
  // strictly older than this threshold are excluded from list / search
370
370
  // results. Additive optional field — existing callers unaffected.
371
- created_after: z2.string().datetime().optional()
371
+ created_after: z2.string().datetime().optional(),
372
+ // v2.0.0-rc.27 TASK-001 (§2.2/§2.3): opt-in surfacing of lifecycle-filtered
373
+ // entries. Default (omit both) hides rejected entries and deferred entries
374
+ // whose deferred_until is in the future. Pass true to include them — e.g.
375
+ // for vacuum tooling, audit dashboards, or "show me what I parked" UX.
376
+ include_rejected: z2.boolean().optional(),
377
+ include_deferred: z2.boolean().optional(),
378
+ // v2.0.0-rc.27 TASK-006 (audit §2.23): opt-in body inspection. Default
379
+ // list/search return only frontmatter-derived fields — a malicious
380
+ // pending entry could hide a prompt-injection payload under `## Evidence`
381
+ // body content that frontmatter inspection never surfaces. Setting
382
+ // `include_body: true` attaches the full post-frontmatter content to
383
+ // each item, and (for search) extends the haystack to body text. The
384
+ // default-off design keeps the wire payload small for routine list
385
+ // calls; reviewer workflows pass `true` before approving so the body
386
+ // is rendered into the reviewer's UI for visual scan.
387
+ include_body: z2.boolean().optional()
372
388
  }).optional();
373
389
  var _fabReviewModifyChangesSchema = z2.object({
374
390
  title: z2.string().optional(),
@@ -445,6 +461,14 @@ var FabReviewInputShape = {
445
461
  };
446
462
  var _fabReviewListItemSchema = z2.object({
447
463
  pending_path: z2.string(),
464
+ // v2.0.0-rc.27 TASK-001 (§2.12): for personal-layer entries `pending_path`
465
+ // carries the human-friendly `~/...` form (legacy contract) while
466
+ // `pending_path_absolute` carries the os-expanded absolute path. Programmatic
467
+ // consumers (Read tool, fs.readFile, downstream MCP servers) should prefer
468
+ // the absolute variant — the `~` is a shell-only sigil that breaks every
469
+ // non-shell consumer. Team entries omit this field because their
470
+ // `pending_path` is already project-relative and unambiguous.
471
+ pending_path_absolute: z2.string().optional(),
448
472
  type: z2.enum(["decisions", "pitfalls", "guidelines", "models", "processes"]),
449
473
  layer: z2.enum(["team", "personal"]),
450
474
  maturity: z2.enum(["draft", "verified", "proven"]),
@@ -455,7 +479,19 @@ var _fabReviewListItemSchema = z2.object({
455
479
  // 'personal' = ~/.fabric/knowledge/pending. Distinct from `layer` (frontmatter):
456
480
  // origin reflects where the pending file actually lives on disk; layer reflects
457
481
  // the declared classification that will drive the approve destination.
458
- origin: z2.enum(["team", "personal"]).optional()
482
+ origin: z2.enum(["team", "personal"]).optional(),
483
+ // v2.0.0-rc.27 TASK-001 (§2.2/§2.3): frontmatter status markers. Default
484
+ // "active" (or absent). `rejected` entries are excluded from list/search
485
+ // unless filters.include_rejected=true; `deferred` entries are excluded
486
+ // when deferred_until is in the future. Authored by reject/defer write
487
+ // paths — never by extract or approve.
488
+ status: z2.enum(["active", "rejected", "deferred"]).optional(),
489
+ deferred_until: z2.string().datetime().optional(),
490
+ // v2.0.0-rc.27 TASK-006 (audit §2.23): full body content (everything
491
+ // after the closing `---` of frontmatter). Surfaced only when caller
492
+ // passes `filters.include_body: true`. Default-omitted to keep payload
493
+ // small for routine list calls.
494
+ body: z2.string().optional()
459
495
  });
460
496
  var FabReviewOutputSchema = z2.discriminatedUnion("action", [
461
497
  z2.object({
@@ -260,6 +260,13 @@ var enMessages = {
260
260
  "doctor.check.event_ledger_partial_write.message": "events.jsonl has a partial write at byte offset {byteOffset} ({byteLength} corrupted bytes). Run --fix to truncate and preserve corrupted bytes.",
261
261
  "doctor.check.event_ledger_partial_write.remediation": "Run `fab doctor --fix` to truncate the partial write and restore events.jsonl to a valid state.",
262
262
  "doctor.check.event_ledger_partial_write.ok.clean": "events.jsonl has no partial trailing write.",
263
+ // v2.0.0-rc.27 TASK-010 (audit §2.24): schema-compat forward-warn category.
264
+ "doctor.check.event_ledger_schema_compat.name": "Event ledger schema compat",
265
+ "doctor.check.event_ledger_schema_compat.ok.skipped": "No schema-compat check needed (ledger missing or not writable).",
266
+ "doctor.check.event_ledger_schema_compat.ok.clean": "events.jsonl rows all parse against the current schema.",
267
+ "doctor.check.event_ledger_schema_compat.message.schema_version": "events.jsonl has {count} row(s) with unsupported `schema_version` (samples: {samples}).",
268
+ "doctor.check.event_ledger_schema_compat.message.event_type": "events.jsonl has {count} row(s) with unknown `event_type` (samples: {samples}).",
269
+ "doctor.check.event_ledger_schema_compat.remediation": "Either upgrade the fab CLI to a server-compatible version, or archive `.fabric/events.jsonl` and run `fab doctor --fix` to recreate a fresh ledger.",
263
270
  "doctor.check.meta_manually_diverged.name": "Meta manual divergence",
264
271
  "doctor.check.meta_manually_diverged.ok.unreadable": "agents.meta.json not readable; skipping divergence check.",
265
272
  "doctor.check.meta_manually_diverged.message.extra.singular": "agents.meta.json has {count} entry with no backing file on disk. Run --fix to reconcile.",
@@ -1059,6 +1066,13 @@ var zhCNMessages = {
1059
1066
  "doctor.check.event_ledger_partial_write.message": "events.jsonl \u5728 byte offset {byteOffset} \u5904\u5B58\u5728 partial write\uFF08{byteLength} \u4E2A corrupted bytes\uFF09\u3002\u8FD0\u884C --fix \u622A\u65AD\u5E76\u4FDD\u7559 corrupted bytes\u3002",
1060
1067
  "doctor.check.event_ledger_partial_write.remediation": "\u8FD0\u884C `fab doctor --fix` \u622A\u65AD partial write \u5E76\u5C06 events.jsonl \u6062\u590D\u5230\u6709\u6548\u72B6\u6001\u3002",
1061
1068
  "doctor.check.event_ledger_partial_write.ok.clean": "events.jsonl \u6CA1\u6709 partial trailing write\u3002",
1069
+ // v2.0.0-rc.27 TASK-010 (audit §2.24): schema-compat 向前兼容警告类别。
1070
+ "doctor.check.event_ledger_schema_compat.name": "Event ledger schema \u517C\u5BB9\u6027",
1071
+ "doctor.check.event_ledger_schema_compat.ok.skipped": "\u65E0\u9700\u505A schema \u517C\u5BB9\u6027\u68C0\u67E5\uFF08events.jsonl \u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u5199\uFF09\u3002",
1072
+ "doctor.check.event_ledger_schema_compat.ok.clean": "events.jsonl \u6240\u6709\u884C\u90FD\u80FD\u89E3\u6790\u4E3A\u5F53\u524D schema\u3002",
1073
+ "doctor.check.event_ledger_schema_compat.message.schema_version": "events.jsonl \u542B {count} \u884C `schema_version` \u4E0D\u88AB\u5F53\u524D CLI \u8BC6\u522B\uFF08\u6837\u672C: {samples}\uFF09\u3002",
1074
+ "doctor.check.event_ledger_schema_compat.message.event_type": "events.jsonl \u542B {count} \u884C `event_type` \u4E0D\u5728\u5F53\u524D schema \u4E2D\uFF08\u6837\u672C: {samples}\uFF09\u3002",
1075
+ "doctor.check.event_ledger_schema_compat.remediation": "\u5347\u7EA7 fab CLI \u5230\u4E0E server \u517C\u5BB9\u7684\u7248\u672C\uFF0C\u6216\u5907\u4EFD `.fabric/events.jsonl` \u540E\u8DD1 `fab doctor --fix` \u91CD\u5EFA\u7A7A ledger\u3002",
1062
1076
  "doctor.check.meta_manually_diverged.name": "Meta manual divergence",
1063
1077
  "doctor.check.meta_manually_diverged.ok.unreadable": "agents.meta.json \u4E0D\u53EF\u8BFB\uFF0C\u8DF3\u8FC7 divergence \u68C0\u67E5\u3002",
1064
1078
  "doctor.check.meta_manually_diverged.message.extra.singular": "agents.meta.json \u4E2D\u6709 {count} \u4E2A entry \u5728\u78C1\u76D8\u4E0A\u6CA1\u6709\u5BF9\u5E94\u6587\u4EF6\u3002\u8FD0\u884C --fix \u6267\u884C reconcile\u3002",
@@ -7,7 +7,7 @@ import {
7
7
  normalizeLocale,
8
8
  resolveFabricLocale,
9
9
  zhCNMessages
10
- } from "../chunk-E5LHOWTN.js";
10
+ } from "../chunk-LXQ77R3D.js";
11
11
  export {
12
12
  PROTECTED_TOKENS,
13
13
  createTranslator,
package/dist/index.d.ts CHANGED
@@ -5480,7 +5480,7 @@ declare const metaReconciledEventSchema: z.ZodObject<{
5480
5480
  event_type: z.ZodLiteral<"meta_reconciled">;
5481
5481
  reconciled_files: z.ZodArray<z.ZodString, "many">;
5482
5482
  duration_ms: z.ZodNumber;
5483
- trigger: z.ZodEnum<["doctor", "manual", "auto-heal-description"]>;
5483
+ trigger: z.ZodEnum<["doctor", "manual", "auto-heal-description", "post-approve", "post-modify"]>;
5484
5484
  source: z.ZodLiteral<"reconcileKnowledge">;
5485
5485
  force_write_reason: z.ZodOptional<z.ZodEnum<["revision_drift"]>>;
5486
5486
  kind: z.ZodLiteral<"fabric-event">;
@@ -5498,7 +5498,7 @@ declare const metaReconciledEventSchema: z.ZodObject<{
5498
5498
  event_type: "meta_reconciled";
5499
5499
  reconciled_files: string[];
5500
5500
  duration_ms: number;
5501
- trigger: "manual" | "doctor" | "auto-heal-description";
5501
+ trigger: "manual" | "doctor" | "auto-heal-description" | "post-approve" | "post-modify";
5502
5502
  correlation_id?: string | undefined;
5503
5503
  session_id?: string | undefined;
5504
5504
  force_write_reason?: "revision_drift" | undefined;
@@ -5511,7 +5511,7 @@ declare const metaReconciledEventSchema: z.ZodObject<{
5511
5511
  event_type: "meta_reconciled";
5512
5512
  reconciled_files: string[];
5513
5513
  duration_ms: number;
5514
- trigger: "manual" | "doctor" | "auto-heal-description";
5514
+ trigger: "manual" | "doctor" | "auto-heal-description" | "post-approve" | "post-modify";
5515
5515
  correlation_id?: string | undefined;
5516
5516
  session_id?: string | undefined;
5517
5517
  force_write_reason?: "revision_drift" | undefined;
@@ -7038,7 +7038,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
7038
7038
  event_type: z.ZodLiteral<"meta_reconciled">;
7039
7039
  reconciled_files: z.ZodArray<z.ZodString, "many">;
7040
7040
  duration_ms: z.ZodNumber;
7041
- trigger: z.ZodEnum<["doctor", "manual", "auto-heal-description"]>;
7041
+ trigger: z.ZodEnum<["doctor", "manual", "auto-heal-description", "post-approve", "post-modify"]>;
7042
7042
  source: z.ZodLiteral<"reconcileKnowledge">;
7043
7043
  force_write_reason: z.ZodOptional<z.ZodEnum<["revision_drift"]>>;
7044
7044
  kind: z.ZodLiteral<"fabric-event">;
@@ -7056,7 +7056,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
7056
7056
  event_type: "meta_reconciled";
7057
7057
  reconciled_files: string[];
7058
7058
  duration_ms: number;
7059
- trigger: "manual" | "doctor" | "auto-heal-description";
7059
+ trigger: "manual" | "doctor" | "auto-heal-description" | "post-approve" | "post-modify";
7060
7060
  correlation_id?: string | undefined;
7061
7061
  session_id?: string | undefined;
7062
7062
  force_write_reason?: "revision_drift" | undefined;
@@ -7069,7 +7069,7 @@ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.Z
7069
7069
  event_type: "meta_reconciled";
7070
7070
  reconciled_files: string[];
7071
7071
  duration_ms: number;
7072
- trigger: "manual" | "doctor" | "auto-heal-description";
7072
+ trigger: "manual" | "doctor" | "auto-heal-description" | "post-approve" | "post-modify";
7073
7073
  correlation_id?: string | undefined;
7074
7074
  session_id?: string | undefined;
7075
7075
  force_write_reason?: "revision_drift" | undefined;
@@ -8161,6 +8161,12 @@ interface ParseCiteLineResult {
8161
8161
  *
8162
8162
  * Tolerates whitespace, CR/LF line endings, blank lines, and non-KB
8163
8163
  * interleaved prose. Index contract documented above.
8164
+ *
8165
+ * v2.0.0-rc.27 TASK-003 (audit §2.18): multi-id citations
8166
+ * (`KB: KT-DEC-0001, KT-PIT-0005 ...`) emit each id into cite_ids in
8167
+ * declaration order. The chained-from tag's embedded id (when present)
8168
+ * appends after the primary group. cite_tags still carries one tag per
8169
+ * LINE — multi-id lines don't multiply the tag stream.
8164
8170
  */
8165
8171
  declare function parseCiteLine(raw: string): ParseCiteLineResult;
8166
8172
 
package/dist/index.js CHANGED
@@ -1,12 +1,4 @@
1
- import {
2
- BOOTSTRAP_CANONICAL,
3
- BOOTSTRAP_MARKER_BEGIN,
4
- BOOTSTRAP_MARKER_END,
5
- BOOTSTRAP_REGEX,
6
- LEGACY_KB_MARKER_BEGIN,
7
- LEGACY_KB_MARKER_END,
8
- LEGACY_KB_REGEX
9
- } from "./chunk-4OQXR6JW.js";
1
+ import "./chunk-LXNCAKJZ.js";
10
2
  import {
11
3
  PROTECTED_TOKENS,
12
4
  createTranslator,
@@ -16,7 +8,7 @@ import {
16
8
  normalizeLocale,
17
9
  resolveFabricLocale,
18
10
  zhCNMessages
19
- } from "./chunk-E5LHOWTN.js";
11
+ } from "./chunk-LXQ77R3D.js";
20
12
  import {
21
13
  FabExtractKnowledgeInputSchema,
22
14
  FabExtractKnowledgeInputShape,
@@ -58,8 +50,16 @@ import {
58
50
  planContextInputSchema,
59
51
  planContextOutputSchema,
60
52
  structuredWarningSchema
61
- } from "./chunk-3RSYWMQU.js";
62
- import "./chunk-LXNCAKJZ.js";
53
+ } from "./chunk-G32HVF7H.js";
54
+ import {
55
+ BOOTSTRAP_CANONICAL,
56
+ BOOTSTRAP_MARKER_BEGIN,
57
+ BOOTSTRAP_MARKER_END,
58
+ BOOTSTRAP_REGEX,
59
+ LEGACY_KB_MARKER_BEGIN,
60
+ LEGACY_KB_MARKER_END,
61
+ LEGACY_KB_REGEX
62
+ } from "./chunk-4OQXR6JW.js";
63
63
 
64
64
  // src/schemas/agents-meta.ts
65
65
  import { z } from "zod";
@@ -915,7 +915,11 @@ var metaReconciledEventSchema = z10.object({
915
915
  // revision-hash gate cannot catch — a missing description doesn't move the
916
916
  // revision). Symmetric to rc.22 D2 read-side auto-heal but covers the
917
917
  // description-undefined case which the revision drift gate misses.
918
- trigger: z10.enum(["doctor", "manual", "auto-heal-description"]),
918
+ // v2.0.0-rc.27 TASK-001 (§2.9): `post-approve` / `post-modify` added so
919
+ // `fab_review` write-actions can flush newly-promoted entries into
920
+ // `agents.meta.json.nodes[id]` synchronously — without this the new entry
921
+ // remains description-less until the next plan_context auto-heal.
922
+ trigger: z10.enum(["doctor", "manual", "auto-heal-description", "post-approve", "post-modify"]),
919
923
  source: z10.literal("reconcileKnowledge"),
920
924
  // v2.0.0-rc.22 TASK-014 (Scope E): set when reconcileKnowledge forced a
921
925
  // writeKnowledgeMeta on revision drift alone (no per-file content drift).
@@ -1234,7 +1238,8 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
1234
1238
  // src/cite-line-parser.ts
1235
1239
  var ID_RE = /^K[TP]-[A-Z]+-\d+$/;
1236
1240
  var SENTINEL_RE = /^KB:\s*none\b\s*(?:\[[^\]]*\])?\s*$/i;
1237
- var FULL_RE = /^KB:\s+(K[TP]-[A-Z]+-\d+)(?:\s+\(([^)]*)\))?(?:\s+\[([^\]]+)\])?(?:\s+→\s*(.+))?\s*$/;
1241
+ var FULL_RE = /^KB:\s+(K[TP]-[A-Z]+-\d+(?:\s*,\s*K[TP]-[A-Z]+-\d+)*)(?:\s+\(([^)]*)\))?(?:\s+\[([^\]]+)\])?(?:\s+→\s*(.+))?\s*$/;
1242
+ var CHAINED_FROM_ID_RE = /chained-from\s+(K[TP]-[A-Z]+-\d+)/i;
1238
1243
  var ALLOWED_TAGS = /* @__PURE__ */ new Set([
1239
1244
  "planned",
1240
1245
  "recalled",
@@ -1276,15 +1281,24 @@ function parseLine(line) {
1276
1281
  const trimmed = line.trim();
1277
1282
  if (trimmed.length === 0) return null;
1278
1283
  if (SENTINEL_RE.test(trimmed)) {
1279
- return { id: null, tag: "none", commitment: null };
1284
+ return { ids: [], tag: "none", commitment: null };
1280
1285
  }
1281
1286
  const fullMatch = trimmed.match(FULL_RE);
1282
1287
  if (fullMatch) {
1283
- const id = fullMatch[1];
1284
- if (!ID_RE.test(id)) return null;
1288
+ const primaryIds = fullMatch[1].split(",").map((part) => part.trim()).filter((part) => part.length > 0);
1289
+ if (primaryIds.some((id) => !ID_RE.test(id))) return null;
1290
+ const rawTag = fullMatch[3];
1291
+ const tag = parseTag(rawTag);
1292
+ const chainedIds = [];
1293
+ if (rawTag !== void 0) {
1294
+ const chained = CHAINED_FROM_ID_RE.exec(rawTag);
1295
+ if (chained !== null && ID_RE.test(chained[1])) {
1296
+ chainedIds.push(chained[1]);
1297
+ }
1298
+ }
1285
1299
  return {
1286
- id,
1287
- tag: parseTag(fullMatch[3]),
1300
+ ids: [...primaryIds, ...chainedIds],
1301
+ tag,
1288
1302
  commitment: parseContractTail(fullMatch[4])
1289
1303
  };
1290
1304
  }
@@ -1301,9 +1315,13 @@ function parseCiteLine(raw) {
1301
1315
  const parsed = parseLine(line);
1302
1316
  if (!parsed) continue;
1303
1317
  result.cite_tags.push(parsed.tag);
1304
- if (parsed.id !== null) result.cite_ids.push(parsed.id);
1318
+ for (const id of parsed.ids) {
1319
+ result.cite_ids.push(id);
1320
+ }
1305
1321
  if (parsed.commitment !== null) {
1306
- result.cite_commitments.push(parsed.commitment);
1322
+ for (let i = 0; i < parsed.ids.length; i += 1) {
1323
+ result.cite_commitments.push(parsed.commitment);
1324
+ }
1307
1325
  }
1308
1326
  }
1309
1327
  return result;
@@ -1011,18 +1011,27 @@ declare const FabReviewInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObje
1011
1011
  maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
1012
1012
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1013
1013
  created_after: z.ZodOptional<z.ZodString>;
1014
+ include_rejected: z.ZodOptional<z.ZodBoolean>;
1015
+ include_deferred: z.ZodOptional<z.ZodBoolean>;
1016
+ include_body: z.ZodOptional<z.ZodBoolean>;
1014
1017
  }, "strip", z.ZodTypeAny, {
1015
1018
  layer?: "personal" | "team" | "both" | undefined;
1016
1019
  type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1017
1020
  maturity?: "draft" | "verified" | "proven" | undefined;
1018
1021
  tags?: string[] | undefined;
1019
1022
  created_after?: string | undefined;
1023
+ include_rejected?: boolean | undefined;
1024
+ include_deferred?: boolean | undefined;
1025
+ include_body?: boolean | undefined;
1020
1026
  }, {
1021
1027
  layer?: "personal" | "team" | "both" | undefined;
1022
1028
  type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1023
1029
  maturity?: "draft" | "verified" | "proven" | undefined;
1024
1030
  tags?: string[] | undefined;
1025
1031
  created_after?: string | undefined;
1032
+ include_rejected?: boolean | undefined;
1033
+ include_deferred?: boolean | undefined;
1034
+ include_body?: boolean | undefined;
1026
1035
  }>>;
1027
1036
  }, "strip", z.ZodTypeAny, {
1028
1037
  action: "list";
@@ -1032,6 +1041,9 @@ declare const FabReviewInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObje
1032
1041
  maturity?: "draft" | "verified" | "proven" | undefined;
1033
1042
  tags?: string[] | undefined;
1034
1043
  created_after?: string | undefined;
1044
+ include_rejected?: boolean | undefined;
1045
+ include_deferred?: boolean | undefined;
1046
+ include_body?: boolean | undefined;
1035
1047
  } | undefined;
1036
1048
  }, {
1037
1049
  action: "list";
@@ -1041,6 +1053,9 @@ declare const FabReviewInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObje
1041
1053
  maturity?: "draft" | "verified" | "proven" | undefined;
1042
1054
  tags?: string[] | undefined;
1043
1055
  created_after?: string | undefined;
1056
+ include_rejected?: boolean | undefined;
1057
+ include_deferred?: boolean | undefined;
1058
+ include_body?: boolean | undefined;
1044
1059
  } | undefined;
1045
1060
  }>, z.ZodObject<{
1046
1061
  action: z.ZodLiteral<"approve">;
@@ -1124,18 +1139,27 @@ declare const FabReviewInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObje
1124
1139
  maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
1125
1140
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1126
1141
  created_after: z.ZodOptional<z.ZodString>;
1142
+ include_rejected: z.ZodOptional<z.ZodBoolean>;
1143
+ include_deferred: z.ZodOptional<z.ZodBoolean>;
1144
+ include_body: z.ZodOptional<z.ZodBoolean>;
1127
1145
  }, "strip", z.ZodTypeAny, {
1128
1146
  layer?: "personal" | "team" | "both" | undefined;
1129
1147
  type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1130
1148
  maturity?: "draft" | "verified" | "proven" | undefined;
1131
1149
  tags?: string[] | undefined;
1132
1150
  created_after?: string | undefined;
1151
+ include_rejected?: boolean | undefined;
1152
+ include_deferred?: boolean | undefined;
1153
+ include_body?: boolean | undefined;
1133
1154
  }, {
1134
1155
  layer?: "personal" | "team" | "both" | undefined;
1135
1156
  type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1136
1157
  maturity?: "draft" | "verified" | "proven" | undefined;
1137
1158
  tags?: string[] | undefined;
1138
1159
  created_after?: string | undefined;
1160
+ include_rejected?: boolean | undefined;
1161
+ include_deferred?: boolean | undefined;
1162
+ include_body?: boolean | undefined;
1139
1163
  }>>;
1140
1164
  }, "strip", z.ZodTypeAny, {
1141
1165
  action: "search";
@@ -1146,6 +1170,9 @@ declare const FabReviewInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObje
1146
1170
  maturity?: "draft" | "verified" | "proven" | undefined;
1147
1171
  tags?: string[] | undefined;
1148
1172
  created_after?: string | undefined;
1173
+ include_rejected?: boolean | undefined;
1174
+ include_deferred?: boolean | undefined;
1175
+ include_body?: boolean | undefined;
1149
1176
  } | undefined;
1150
1177
  }, {
1151
1178
  action: "search";
@@ -1156,6 +1183,9 @@ declare const FabReviewInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObje
1156
1183
  maturity?: "draft" | "verified" | "proven" | undefined;
1157
1184
  tags?: string[] | undefined;
1158
1185
  created_after?: string | undefined;
1186
+ include_rejected?: boolean | undefined;
1187
+ include_deferred?: boolean | undefined;
1188
+ include_body?: boolean | undefined;
1159
1189
  } | undefined;
1160
1190
  }>, z.ZodObject<{
1161
1191
  action: z.ZodLiteral<"defer">;
@@ -1182,18 +1212,27 @@ declare const FabReviewInputShape: {
1182
1212
  maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
1183
1213
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1184
1214
  created_after: z.ZodOptional<z.ZodString>;
1215
+ include_rejected: z.ZodOptional<z.ZodBoolean>;
1216
+ include_deferred: z.ZodOptional<z.ZodBoolean>;
1217
+ include_body: z.ZodOptional<z.ZodBoolean>;
1185
1218
  }, "strip", z.ZodTypeAny, {
1186
1219
  layer?: "personal" | "team" | "both" | undefined;
1187
1220
  type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1188
1221
  maturity?: "draft" | "verified" | "proven" | undefined;
1189
1222
  tags?: string[] | undefined;
1190
1223
  created_after?: string | undefined;
1224
+ include_rejected?: boolean | undefined;
1225
+ include_deferred?: boolean | undefined;
1226
+ include_body?: boolean | undefined;
1191
1227
  }, {
1192
1228
  layer?: "personal" | "team" | "both" | undefined;
1193
1229
  type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1194
1230
  maturity?: "draft" | "verified" | "proven" | undefined;
1195
1231
  tags?: string[] | undefined;
1196
1232
  created_after?: string | undefined;
1233
+ include_rejected?: boolean | undefined;
1234
+ include_deferred?: boolean | undefined;
1235
+ include_body?: boolean | undefined;
1197
1236
  }>>;
1198
1237
  readonly pending_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1199
1238
  readonly pending_path: z.ZodOptional<z.ZodString>;
@@ -1230,6 +1269,7 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1230
1269
  action: z.ZodLiteral<"list">;
1231
1270
  items: z.ZodArray<z.ZodObject<{
1232
1271
  pending_path: z.ZodString;
1272
+ pending_path_absolute: z.ZodOptional<z.ZodString>;
1233
1273
  type: z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>;
1234
1274
  layer: z.ZodEnum<["team", "personal"]>;
1235
1275
  maturity: z.ZodEnum<["draft", "verified", "proven"]>;
@@ -1237,24 +1277,35 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1237
1277
  title: z.ZodOptional<z.ZodString>;
1238
1278
  summary: z.ZodOptional<z.ZodString>;
1239
1279
  origin: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1280
+ status: z.ZodOptional<z.ZodEnum<["active", "rejected", "deferred"]>>;
1281
+ deferred_until: z.ZodOptional<z.ZodString>;
1282
+ body: z.ZodOptional<z.ZodString>;
1240
1283
  }, "strip", z.ZodTypeAny, {
1241
1284
  layer: "personal" | "team";
1242
1285
  pending_path: string;
1243
1286
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1244
1287
  maturity: "draft" | "verified" | "proven";
1288
+ status?: "active" | "rejected" | "deferred" | undefined;
1245
1289
  summary?: string | undefined;
1246
1290
  tags?: string[] | undefined;
1291
+ body?: string | undefined;
1247
1292
  title?: string | undefined;
1293
+ pending_path_absolute?: string | undefined;
1248
1294
  origin?: "personal" | "team" | undefined;
1295
+ deferred_until?: string | undefined;
1249
1296
  }, {
1250
1297
  layer: "personal" | "team";
1251
1298
  pending_path: string;
1252
1299
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1253
1300
  maturity: "draft" | "verified" | "proven";
1301
+ status?: "active" | "rejected" | "deferred" | undefined;
1254
1302
  summary?: string | undefined;
1255
1303
  tags?: string[] | undefined;
1304
+ body?: string | undefined;
1256
1305
  title?: string | undefined;
1306
+ pending_path_absolute?: string | undefined;
1257
1307
  origin?: "personal" | "team" | undefined;
1308
+ deferred_until?: string | undefined;
1258
1309
  }>, "many">;
1259
1310
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1260
1311
  code: z.ZodString;
@@ -1279,10 +1330,14 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1279
1330
  pending_path: string;
1280
1331
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1281
1332
  maturity: "draft" | "verified" | "proven";
1333
+ status?: "active" | "rejected" | "deferred" | undefined;
1282
1334
  summary?: string | undefined;
1283
1335
  tags?: string[] | undefined;
1336
+ body?: string | undefined;
1284
1337
  title?: string | undefined;
1338
+ pending_path_absolute?: string | undefined;
1285
1339
  origin?: "personal" | "team" | undefined;
1340
+ deferred_until?: string | undefined;
1286
1341
  }[];
1287
1342
  warnings?: {
1288
1343
  file: string;
@@ -1297,10 +1352,14 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1297
1352
  pending_path: string;
1298
1353
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1299
1354
  maturity: "draft" | "verified" | "proven";
1355
+ status?: "active" | "rejected" | "deferred" | undefined;
1300
1356
  summary?: string | undefined;
1301
1357
  tags?: string[] | undefined;
1358
+ body?: string | undefined;
1302
1359
  title?: string | undefined;
1360
+ pending_path_absolute?: string | undefined;
1303
1361
  origin?: "personal" | "team" | undefined;
1362
+ deferred_until?: string | undefined;
1304
1363
  }[];
1305
1364
  warnings?: {
1306
1365
  file: string;
@@ -1444,6 +1503,7 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1444
1503
  action: z.ZodLiteral<"search">;
1445
1504
  items: z.ZodArray<z.ZodObject<{
1446
1505
  pending_path: z.ZodString;
1506
+ pending_path_absolute: z.ZodOptional<z.ZodString>;
1447
1507
  type: z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>;
1448
1508
  layer: z.ZodEnum<["team", "personal"]>;
1449
1509
  maturity: z.ZodEnum<["draft", "verified", "proven"]>;
@@ -1451,24 +1511,35 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1451
1511
  title: z.ZodOptional<z.ZodString>;
1452
1512
  summary: z.ZodOptional<z.ZodString>;
1453
1513
  origin: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1514
+ status: z.ZodOptional<z.ZodEnum<["active", "rejected", "deferred"]>>;
1515
+ deferred_until: z.ZodOptional<z.ZodString>;
1516
+ body: z.ZodOptional<z.ZodString>;
1454
1517
  }, "strip", z.ZodTypeAny, {
1455
1518
  layer: "personal" | "team";
1456
1519
  pending_path: string;
1457
1520
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1458
1521
  maturity: "draft" | "verified" | "proven";
1522
+ status?: "active" | "rejected" | "deferred" | undefined;
1459
1523
  summary?: string | undefined;
1460
1524
  tags?: string[] | undefined;
1525
+ body?: string | undefined;
1461
1526
  title?: string | undefined;
1527
+ pending_path_absolute?: string | undefined;
1462
1528
  origin?: "personal" | "team" | undefined;
1529
+ deferred_until?: string | undefined;
1463
1530
  }, {
1464
1531
  layer: "personal" | "team";
1465
1532
  pending_path: string;
1466
1533
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1467
1534
  maturity: "draft" | "verified" | "proven";
1535
+ status?: "active" | "rejected" | "deferred" | undefined;
1468
1536
  summary?: string | undefined;
1469
1537
  tags?: string[] | undefined;
1538
+ body?: string | undefined;
1470
1539
  title?: string | undefined;
1540
+ pending_path_absolute?: string | undefined;
1471
1541
  origin?: "personal" | "team" | undefined;
1542
+ deferred_until?: string | undefined;
1472
1543
  }>, "many">;
1473
1544
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1474
1545
  code: z.ZodString;
@@ -1493,10 +1564,14 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1493
1564
  pending_path: string;
1494
1565
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1495
1566
  maturity: "draft" | "verified" | "proven";
1567
+ status?: "active" | "rejected" | "deferred" | undefined;
1496
1568
  summary?: string | undefined;
1497
1569
  tags?: string[] | undefined;
1570
+ body?: string | undefined;
1498
1571
  title?: string | undefined;
1572
+ pending_path_absolute?: string | undefined;
1499
1573
  origin?: "personal" | "team" | undefined;
1574
+ deferred_until?: string | undefined;
1500
1575
  }[];
1501
1576
  warnings?: {
1502
1577
  file: string;
@@ -1511,10 +1586,14 @@ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObj
1511
1586
  pending_path: string;
1512
1587
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1513
1588
  maturity: "draft" | "verified" | "proven";
1589
+ status?: "active" | "rejected" | "deferred" | undefined;
1514
1590
  summary?: string | undefined;
1515
1591
  tags?: string[] | undefined;
1592
+ body?: string | undefined;
1516
1593
  title?: string | undefined;
1594
+ pending_path_absolute?: string | undefined;
1517
1595
  origin?: "personal" | "team" | undefined;
1596
+ deferred_until?: string | undefined;
1518
1597
  }[];
1519
1598
  warnings?: {
1520
1599
  file: string;
@@ -1565,6 +1644,7 @@ declare const FabReviewOutputShape: {
1565
1644
  readonly action: z.ZodEnum<["list", "approve", "reject", "modify", "search", "defer"]>;
1566
1645
  readonly items: z.ZodOptional<z.ZodArray<z.ZodObject<{
1567
1646
  pending_path: z.ZodString;
1647
+ pending_path_absolute: z.ZodOptional<z.ZodString>;
1568
1648
  type: z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>;
1569
1649
  layer: z.ZodEnum<["team", "personal"]>;
1570
1650
  maturity: z.ZodEnum<["draft", "verified", "proven"]>;
@@ -1572,24 +1652,35 @@ declare const FabReviewOutputShape: {
1572
1652
  title: z.ZodOptional<z.ZodString>;
1573
1653
  summary: z.ZodOptional<z.ZodString>;
1574
1654
  origin: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1655
+ status: z.ZodOptional<z.ZodEnum<["active", "rejected", "deferred"]>>;
1656
+ deferred_until: z.ZodOptional<z.ZodString>;
1657
+ body: z.ZodOptional<z.ZodString>;
1575
1658
  }, "strip", z.ZodTypeAny, {
1576
1659
  layer: "personal" | "team";
1577
1660
  pending_path: string;
1578
1661
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1579
1662
  maturity: "draft" | "verified" | "proven";
1663
+ status?: "active" | "rejected" | "deferred" | undefined;
1580
1664
  summary?: string | undefined;
1581
1665
  tags?: string[] | undefined;
1666
+ body?: string | undefined;
1582
1667
  title?: string | undefined;
1668
+ pending_path_absolute?: string | undefined;
1583
1669
  origin?: "personal" | "team" | undefined;
1670
+ deferred_until?: string | undefined;
1584
1671
  }, {
1585
1672
  layer: "personal" | "team";
1586
1673
  pending_path: string;
1587
1674
  type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1588
1675
  maturity: "draft" | "verified" | "proven";
1676
+ status?: "active" | "rejected" | "deferred" | undefined;
1589
1677
  summary?: string | undefined;
1590
1678
  tags?: string[] | undefined;
1679
+ body?: string | undefined;
1591
1680
  title?: string | undefined;
1681
+ pending_path_absolute?: string | undefined;
1592
1682
  origin?: "personal" | "team" | undefined;
1683
+ deferred_until?: string | undefined;
1593
1684
  }>, "many">>;
1594
1685
  readonly approved: z.ZodOptional<z.ZodArray<z.ZodObject<{
1595
1686
  pending_path: z.ZodString;
@@ -36,7 +36,7 @@ import {
36
36
  planContextInputSchema,
37
37
  planContextOutputSchema,
38
38
  structuredWarningSchema
39
- } from "../chunk-3RSYWMQU.js";
39
+ } from "../chunk-G32HVF7H.js";
40
40
  export {
41
41
  FabExtractKnowledgeInputSchema,
42
42
  FabExtractKnowledgeInputShape,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fenglimg/fabric-shared",
3
- "version": "2.0.0-rc.26",
3
+ "version": "2.0.0-rc.27",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",