@fenglimg/fabric-shared 2.0.0-rc.36 → 2.0.0-rc.37

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/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-VP2B2HB2.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-P4RNLXTM.js";
11
+ } from "./chunk-ZSRVKMYT.js";
20
12
  import {
21
13
  FabExtractKnowledgeInputSchema,
22
14
  FabExtractKnowledgeInputShape,
@@ -36,6 +28,9 @@ import {
36
28
  ProposedReasonSchema,
37
29
  StableIdSchema,
38
30
  annotateIntentRequestSchema,
31
+ archiveScanAnnotations,
32
+ archiveScanInputSchema,
33
+ archiveScanOutputSchema,
39
34
  citeContractMetricsSchema,
40
35
  citeCoverageReportSchema,
41
36
  citeLayerTypeBreakdownSchema,
@@ -57,9 +52,20 @@ import {
57
52
  planContextHintOutputSchema,
58
53
  planContextInputSchema,
59
54
  planContextOutputSchema,
55
+ recallAnnotations,
56
+ recallInputSchema,
57
+ recallOutputSchema,
60
58
  structuredWarningSchema
61
- } from "./chunk-Z26SD627.js";
62
- import "./chunk-LXNCAKJZ.js";
59
+ } from "./chunk-DRQTQEEV.js";
60
+ import {
61
+ BOOTSTRAP_CANONICAL,
62
+ BOOTSTRAP_MARKER_BEGIN,
63
+ BOOTSTRAP_MARKER_END,
64
+ BOOTSTRAP_REGEX,
65
+ LEGACY_KB_MARKER_BEGIN,
66
+ LEGACY_KB_MARKER_END,
67
+ LEGACY_KB_REGEX
68
+ } from "./chunk-VWJQVRSE.js";
63
69
 
64
70
  // src/schemas/agents-meta.ts
65
71
  import { z } from "zod";
@@ -531,6 +537,12 @@ var fabricConfigSchema = z5.object({
531
537
  // TRUNCATION_THRESHOLD=12 grouped-render kicks in. Mirrors the rc.7 T7 +
532
538
  // archive_max_* pattern of externalizing previously-hardcoded thresholds.
533
539
  hint_broad_top_k: z5.number().int().min(1).max(50).optional().default(8),
540
+ // v2.0.0-rc.37 NEW-16: durable per-signal dismiss for the fabric-hint Stop
541
+ // hook nudges. Any signal type listed here is suppressed at emit time across
542
+ // all sessions (the session-scoped sibling lives in a .fabric/.cache sidecar
543
+ // written on request). Mirrors the cite_evict_interval=0 opt-out convention —
544
+ // a knob for an existing surface, not a new feature. Unknown types ignored.
545
+ hint_dismiss_signals: z5.array(z5.enum(["archive", "review", "import", "maintenance"])).optional(),
534
546
  // v2.0.0-rc.33 W2-1 (P0-9): TopK upper bound for the narrow PreToolUse hint
535
547
  // emitted by knowledge-hint-narrow.cjs. After filtering to entries whose
536
548
  // `relevance_scope === "narrow"` (rc.27 TASK-005 audit §2.5 fix), the hook
@@ -1128,7 +1140,21 @@ var knowledgeLayerChangedEventSchema = z10.object({
1128
1140
  timestamp: z10.string().datetime(),
1129
1141
  reason: z10.string().optional(),
1130
1142
  from_layer: z10.enum(["team", "personal"]),
1131
- to_layer: z10.enum(["team", "personal"])
1143
+ to_layer: z10.enum(["team", "personal"]),
1144
+ // v2.0.0-rc.37 NEW-24: record the pre-flip stable_id so downstream consumers
1145
+ // (fab_plan_context redirect surface, fab_get_knowledge_sections.redirect_to)
1146
+ // can map a stale caller-held id back to the post-flip canonical id without
1147
+ // requiring the caller to re-issue plan-context. Optional for forward-
1148
+ // compatibility with rc ≤36 events that never carried this field.
1149
+ previous_stable_id: z10.string().optional()
1150
+ });
1151
+ var knowledgeIdRedirectEventSchema = z10.object({
1152
+ ...eventLedgerEnvelopeSchema,
1153
+ event_type: z10.literal("knowledge_id_redirect"),
1154
+ timestamp: z10.string().datetime(),
1155
+ previous_stable_id: z10.string(),
1156
+ new_stable_id: z10.string(),
1157
+ reason: z10.string().optional()
1132
1158
  });
1133
1159
  var knowledgeSlugRenamedEventSchema = z10.object({
1134
1160
  ...eventLedgerEnvelopeSchema,
@@ -1334,6 +1360,8 @@ var eventLedgerEventSchema = z10.discriminatedUnion("event_type", [
1334
1360
  knowledgePromotedEventSchema,
1335
1361
  knowledgePromoteFailedEventSchema,
1336
1362
  knowledgeLayerChangedEventSchema,
1363
+ // v2.0.0-rc.37 NEW-24: dedicated old→new stable_id mapping event
1364
+ knowledgeIdRedirectEventSchema,
1337
1365
  knowledgeSlugRenamedEventSchema,
1338
1366
  knowledgeDemotedEventSchema,
1339
1367
  knowledgeArchivedEventSchema,
@@ -1520,6 +1548,9 @@ export {
1520
1548
  aiLedgerEntrySchema,
1521
1549
  allocateKnowledgeId,
1522
1550
  annotateIntentRequestSchema,
1551
+ archiveScanAnnotations,
1552
+ archiveScanInputSchema,
1553
+ archiveScanOutputSchema,
1523
1554
  assistantTurnObservedEventSchema,
1524
1555
  auditModeSchema,
1525
1556
  bootstrapMarkerMigratedEventSchema,
@@ -1591,6 +1622,7 @@ export {
1591
1622
  knowledgeDemotedEventSchema,
1592
1623
  knowledgeDriftDetectedEventSchema,
1593
1624
  knowledgeEnrichedEventSchema,
1625
+ knowledgeIdRedirectEventSchema,
1594
1626
  knowledgeLayerChangedEventSchema,
1595
1627
  knowledgeMetaAutoHealedEventSchema,
1596
1628
  knowledgePathDangledEventSchema,
@@ -1633,6 +1665,9 @@ export {
1633
1665
  planContextInputSchema,
1634
1666
  planContextOutputSchema,
1635
1667
  reapplyCompletedEventSchema,
1668
+ recallAnnotations,
1669
+ recallInputSchema,
1670
+ recallOutputSchema,
1636
1671
  relevanceMigrationRunEventSchema,
1637
1672
  resolveFabricLocale,
1638
1673
  ruleDescriptionIndexItemSchema,