@lax-wp/editor 0.4.13 → 0.4.15-beta.0

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.
Files changed (160) hide show
  1. package/README.md +25 -0
  2. package/dist/api/audit.d.ts +79 -0
  3. package/dist/api/derivedRulebook.d.ts +470 -0
  4. package/dist/api/documentVersions.d.ts +519 -0
  5. package/dist/api/effectiveRules.d.ts +372 -0
  6. package/dist/api/methodology.d.ts +62 -0
  7. package/dist/api/playbook.d.ts +604 -0
  8. package/dist/api/promotions.d.ts +1432 -0
  9. package/dist/api/r1.d.ts +1097 -0
  10. package/dist/api/r1.fixtures.d.ts +111 -0
  11. package/dist/api/redlineJobs.d.ts +377 -0
  12. package/dist/api/redlineStream.d.ts +2979 -0
  13. package/dist/api/redlines.d.ts +504 -0
  14. package/dist/api/regsync.d.ts +2355 -0
  15. package/dist/api/ruleAuthoring.d.ts +305 -0
  16. package/dist/api/ruleBuilder.d.ts +1009 -0
  17. package/dist/api/ruleOverrides.d.ts +31 -0
  18. package/dist/api/ruleStats.d.ts +84 -0
  19. package/dist/api/rulesCatalog.d.ts +234 -0
  20. package/dist/api/versions.d.ts +76 -0
  21. package/dist/api/workspace.d.ts +41 -0
  22. package/dist/components/EditorSidebar.d.ts +4 -1
  23. package/dist/components/audit/AuditView.d.ts +8 -0
  24. package/dist/components/capturededits/AddAsRuleModal.d.ts +8 -0
  25. package/dist/components/capturededits/CapturedEditCard.d.ts +15 -0
  26. package/dist/components/capturededits/CapturedEditsTray.d.ts +4 -0
  27. package/dist/components/capturededits/capturedEditIntent.d.ts +23 -0
  28. package/dist/components/common/EscDropdown.d.ts +2 -0
  29. package/dist/components/compliance/MethodologyPanel.d.ts +14 -0
  30. package/dist/components/compliance/RegSyncPanel.d.ts +18 -0
  31. package/dist/components/compliance/index.d.ts +8 -0
  32. package/dist/components/compliance/primitives.d.ts +41 -0
  33. package/dist/components/documents/DocumentVersionHistory.d.ts +12 -0
  34. package/dist/components/documents/documentDiff.d.ts +68 -0
  35. package/dist/components/documents/index.d.ts +4 -0
  36. package/dist/components/flowdown/FlowdownPanel.d.ts +28 -0
  37. package/dist/components/flowdown/FlowdownRowCard.d.ts +27 -0
  38. package/dist/components/flowdown/flowdownModel.d.ts +150 -0
  39. package/dist/components/history/PlaybookVersionHistory.d.ts +10 -0
  40. package/dist/components/history/versionDiff.d.ts +14 -0
  41. package/dist/components/playbook/AllPlaybooksView.d.ts +41 -0
  42. package/dist/components/playbook/DerivedRulebookView.d.ts +9 -0
  43. package/dist/components/playbook/DraftedRulePreview.d.ts +17 -0
  44. package/dist/components/playbook/EffectiveRulesView.d.ts +11 -0
  45. package/dist/components/playbook/NewRuleDrawer.d.ts +11 -0
  46. package/dist/components/playbook/PlaybookCard.d.ts +13 -0
  47. package/dist/components/playbook/PlaybookPage.d.ts +29 -0
  48. package/dist/components/playbook/PlaybookPanel.d.ts +73 -0
  49. package/dist/components/playbook/PromotionSuggestions.d.ts +1 -0
  50. package/dist/components/playbook/ReprioritizeDialog.d.ts +16 -0
  51. package/dist/components/playbook/RuleDetail.d.ts +27 -0
  52. package/dist/components/playbook/RuleEditorFields.d.ts +42 -0
  53. package/dist/components/playbook/RuleEditorModal.d.ts +27 -0
  54. package/dist/components/playbook/RulePerformancePanel.d.ts +4 -0
  55. package/dist/components/playbook/RuleRow.d.ts +26 -0
  56. package/dist/components/playbook/ThisDocumentView.d.ts +45 -0
  57. package/dist/components/playbook/ViewTabs.d.ts +8 -0
  58. package/dist/components/playbook/index.d.ts +14 -0
  59. package/dist/components/playbook/predicateSummary.d.ts +10 -0
  60. package/dist/components/playbook/primitives.d.ts +82 -0
  61. package/dist/components/playbook/useFocusTrap.d.ts +6 -0
  62. package/dist/components/playbook/usePlaybookData.d.ts +161 -0
  63. package/dist/components/playbook/usePlaybookLabel.d.ts +18 -0
  64. package/dist/components/r1/ApprovalPanel.d.ts +10 -0
  65. package/dist/components/r1/CandidateRuleCard.d.ts +8 -0
  66. package/dist/components/r1/ExecSummaryPanel.d.ts +23 -0
  67. package/dist/components/r1/PrimeUploadPanel.d.ts +8 -0
  68. package/dist/components/r1/ReviewStartControls.d.ts +24 -0
  69. package/dist/components/r1/ReviewSummaryTab.d.ts +38 -0
  70. package/dist/components/r1/index.d.ts +13 -0
  71. package/dist/components/r1/primitives.d.ts +59 -0
  72. package/dist/components/redline/AiReviewPanel.d.ts +194 -0
  73. package/dist/components/redline/RedlineHoverCard.d.ts +13 -0
  74. package/dist/components/redline/RedlineItem.d.ts +12 -0
  75. package/dist/components/redline/ReviewCard.d.ts +49 -0
  76. package/dist/components/redline/index.d.ts +6 -0
  77. package/dist/components/redline/reviewItems.d.ts +49 -0
  78. package/dist/components/redline/reviewPrefs.d.ts +18 -0
  79. package/dist/components/redline/useRunScopedCards.d.ts +16 -0
  80. package/dist/components/rulebuilder/AuthorForms.d.ts +28 -0
  81. package/dist/components/rulebuilder/CandidateQueue.d.ts +21 -0
  82. package/dist/components/rulebuilder/DraftPane.d.ts +12 -0
  83. package/dist/components/rulebuilder/RuleBuilderPanel.d.ts +6 -0
  84. package/dist/components/rulebuilder/RuleCard.d.ts +16 -0
  85. package/dist/components/rulebuilder/TestBench.d.ts +10 -0
  86. package/dist/components/rulebuilder/VocabularyPanel.d.ts +26 -0
  87. package/dist/components/rulebuilder/index.d.ts +13 -0
  88. package/dist/components/rulebuilder/primitives.d.ts +54 -0
  89. package/dist/components/rulebuilder/useRuleBuilder.d.ts +291 -0
  90. package/dist/components/sidebar/ExpandableSidebar.d.ts +2 -0
  91. package/dist/components/sidebar/WorkspaceRetentionPanel.d.ts +18 -0
  92. package/dist/components/sidebar/content/TrackChangesContent.d.ts +8 -0
  93. package/dist/components/sidebar/content/anonymization-page/PIIAnonymization.d.ts +1 -1
  94. package/dist/components/sidebar/content/anonymization-page/PiiIdleView.d.ts +12 -0
  95. package/dist/components/sidebar/content/anonymization-page/PiiRecoveryView.d.ts +16 -0
  96. package/dist/components/sidebar/content/anonymization-page/PiiSummaryView.d.ts +34 -0
  97. package/dist/components/sidebar/content/anonymization-page/PiiUnavailableView.d.ts +1 -0
  98. package/dist/components/sidebar/content/anonymization-page/RestoreConfirmDialog.d.ts +9 -0
  99. package/dist/components/sidebar/content/anonymization-page/anonymizationUtils.d.ts +38 -17
  100. package/dist/components/sidebar/content/anonymization-page/piiVault.d.ts +18 -0
  101. package/dist/components/sidebar/content/index.d.ts +0 -1
  102. package/dist/components/toolbar/AutocompletionToggle.d.ts +1 -0
  103. package/dist/components/trackChanges/TrackChangesCards.d.ts +1 -0
  104. package/dist/components/trackChanges/index.d.ts +2 -0
  105. package/dist/components/trackChanges/utils.d.ts +5 -0
  106. package/dist/config/EditorConfig.d.ts +197 -73
  107. package/dist/constants/Extensions.d.ts +12 -0
  108. package/dist/constants/playbook.d.ts +108 -0
  109. package/dist/contexts/CapturedEditsContext.d.ts +56 -0
  110. package/dist/contexts/EditorShellContext.d.ts +4 -1
  111. package/dist/editor.css +1 -1
  112. package/dist/extensions/AnonymizedText.d.ts +31 -2
  113. package/dist/extensions/VariableText.d.ts +20 -0
  114. package/dist/extensions/index.d.ts +1 -1
  115. package/dist/extensions/plugins/CapturedEditsPlugin.d.ts +90 -0
  116. package/dist/extensions/plugins/MarkHighlightPlugin.d.ts +0 -1
  117. package/dist/extensions/plugins/RedlinePlugin.d.ts +9 -0
  118. package/dist/extensions/redline/changeTypes.d.ts +70 -0
  119. package/dist/extensions/redline/constants.d.ts +25 -0
  120. package/dist/extensions/redline/engine/blockNodes.d.ts +31 -0
  121. package/dist/extensions/redline/engine/clipboard.d.ts +16 -0
  122. package/dist/extensions/redline/engine/deletion.d.ts +34 -0
  123. package/dist/extensions/redline/engine/formatSplit.d.ts +16 -0
  124. package/dist/extensions/redline/engine/insertion.d.ts +26 -0
  125. package/dist/extensions/redline/engine/predicates.d.ts +73 -0
  126. package/dist/extensions/redline/engine/textReplace.d.ts +19 -0
  127. package/dist/extensions/redline/id.d.ts +7 -0
  128. package/dist/extensions/redline/index.d.ts +36 -0
  129. package/dist/extensions/redline/plugin.d.ts +34 -0
  130. package/dist/extensions/redline/query/scan.d.ts +52 -0
  131. package/dist/extensions/redline/review/applyChange.d.ts +25 -0
  132. package/dist/extensions/redline/review/index.d.ts +1 -0
  133. package/dist/extensions/redline/review/nodeResolvers.d.ts +29 -0
  134. package/dist/extensions/redline/review/pairedNodes.d.ts +38 -0
  135. package/dist/extensions/redline/review/structuralRevert.d.ts +20 -0
  136. package/dist/extensions/redline/review/textResolver.d.ts +9 -0
  137. package/dist/extensions/redline/schema/marks.d.ts +65 -0
  138. package/dist/extensions/redline/schema/shared.d.ts +34 -0
  139. package/dist/extensions/redline/session.d.ts +71 -0
  140. package/dist/extensions/redline/types.d.ts +24 -0
  141. package/dist/extensions/trackedChanges/TrackedChanges.d.ts +64 -0
  142. package/dist/extensions/trackedChanges/constants.d.ts +34 -0
  143. package/dist/extensions/trackedChanges/engine.d.ts +32 -0
  144. package/dist/extensions/trackedChanges/index.d.ts +13 -0
  145. package/dist/extensions/trackedChanges/marks.d.ts +20 -0
  146. package/dist/extensions/trackedChanges/normalize.d.ts +2 -0
  147. package/dist/extensions/trackedChanges/plugin.d.ts +32 -0
  148. package/dist/extensions/trackedChanges/query.d.ts +3 -0
  149. package/dist/extensions/trackedChanges/review.d.ts +34 -0
  150. package/dist/extensions/trackedChanges/types.d.ts +72 -0
  151. package/dist/extensions/trackedChanges/utils.d.ts +20 -0
  152. package/dist/hooks/useMediaQuery.d.ts +2 -0
  153. package/dist/hooks/useRedlineHover.d.ts +17 -0
  154. package/dist/hooks/useRedlineReview.d.ts +83 -0
  155. package/dist/index.d.ts +46 -0
  156. package/dist/index.es.js +38491 -22189
  157. package/dist/index.umd.js +224 -125
  158. package/dist/utils/cdts.d.ts +37 -0
  159. package/dist/utils/groundingAdapter.d.ts +36 -0
  160. package/package.json +39 -33
@@ -0,0 +1,2979 @@
1
+ /**
2
+ * Redline stream API module — SSE client for `POST /v1/redline/stream`.
3
+ *
4
+ * Mirrors `playbook.ts`'s conventions (module-level mutable config merged
5
+ * with Vite env defaults, an error class with a `kind` discriminant, zod
6
+ * schemas with `.passthrough()` at the boundary). Uses
7
+ * `@microsoft/fetch-event-source` because the endpoint requires POST, which
8
+ * the native `EventSource` can't do.
9
+ *
10
+ * Dev note (AUTH_DISABLED=true on the backend): deliberately sends NO
11
+ * `Authorization` and NO `X-Workspace-Id` header — a stray bearer token
12
+ * silently switches the backend's resolved workspace to a hardcoded
13
+ * "ws-from-jwt". `workspaceId` is accepted in config for shape-parity with
14
+ * `PlaybookApiConfig` but is not sent as a header.
15
+ */
16
+ import { z } from "zod";
17
+ declare const suggestionSchema: z.ZodObject<{
18
+ id: z.ZodString;
19
+ document_id: z.ZodString;
20
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
21
+ position_path: z.ZodString;
22
+ /**
23
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
24
+ * this as insertion|deletion|replace, but that comment is stale —
25
+ * `finding/finding.go` is authoritative and the grammar lane has always
26
+ * emitted `"flag"` for findings that point at a span without proposing a
27
+ * replacement.
28
+ */
29
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
30
+ text: z.ZodString;
31
+ /** Absent on grammar findings, which have no acting reviewer. */
32
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
33
+ rationale: z.ZodString;
34
+ category: z.ZodString;
35
+ severity: z.ZodString;
36
+ state: z.ZodString;
37
+ citation: z.ZodObject<{
38
+ playbook_id: z.ZodString;
39
+ playbook_scope: z.ZodOptional<z.ZodObject<{
40
+ category: z.ZodOptional<z.ZodString>;
41
+ domain: z.ZodOptional<z.ZodString>;
42
+ type: z.ZodOptional<z.ZodString>;
43
+ subtype: z.ZodOptional<z.ZodString>;
44
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
45
+ category: z.ZodOptional<z.ZodString>;
46
+ domain: z.ZodOptional<z.ZodString>;
47
+ type: z.ZodOptional<z.ZodString>;
48
+ subtype: z.ZodOptional<z.ZodString>;
49
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
50
+ category: z.ZodOptional<z.ZodString>;
51
+ domain: z.ZodOptional<z.ZodString>;
52
+ type: z.ZodOptional<z.ZodString>;
53
+ subtype: z.ZodOptional<z.ZodString>;
54
+ }, z.ZodTypeAny, "passthrough">>>;
55
+ playbook_regime: z.ZodString;
56
+ rule_id: z.ZodString;
57
+ verbatim_excerpt: z.ZodString;
58
+ bundle_hash: z.ZodOptional<z.ZodString>;
59
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
60
+ playbook_id: z.ZodString;
61
+ playbook_scope: z.ZodOptional<z.ZodObject<{
62
+ category: z.ZodOptional<z.ZodString>;
63
+ domain: z.ZodOptional<z.ZodString>;
64
+ type: z.ZodOptional<z.ZodString>;
65
+ subtype: z.ZodOptional<z.ZodString>;
66
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
67
+ category: z.ZodOptional<z.ZodString>;
68
+ domain: z.ZodOptional<z.ZodString>;
69
+ type: z.ZodOptional<z.ZodString>;
70
+ subtype: z.ZodOptional<z.ZodString>;
71
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
72
+ category: z.ZodOptional<z.ZodString>;
73
+ domain: z.ZodOptional<z.ZodString>;
74
+ type: z.ZodOptional<z.ZodString>;
75
+ subtype: z.ZodOptional<z.ZodString>;
76
+ }, z.ZodTypeAny, "passthrough">>>;
77
+ playbook_regime: z.ZodString;
78
+ rule_id: z.ZodString;
79
+ verbatim_excerpt: z.ZodString;
80
+ bundle_hash: z.ZodOptional<z.ZodString>;
81
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
82
+ playbook_id: z.ZodString;
83
+ playbook_scope: z.ZodOptional<z.ZodObject<{
84
+ category: z.ZodOptional<z.ZodString>;
85
+ domain: z.ZodOptional<z.ZodString>;
86
+ type: z.ZodOptional<z.ZodString>;
87
+ subtype: z.ZodOptional<z.ZodString>;
88
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
89
+ category: z.ZodOptional<z.ZodString>;
90
+ domain: z.ZodOptional<z.ZodString>;
91
+ type: z.ZodOptional<z.ZodString>;
92
+ subtype: z.ZodOptional<z.ZodString>;
93
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
94
+ category: z.ZodOptional<z.ZodString>;
95
+ domain: z.ZodOptional<z.ZodString>;
96
+ type: z.ZodOptional<z.ZodString>;
97
+ subtype: z.ZodOptional<z.ZodString>;
98
+ }, z.ZodTypeAny, "passthrough">>>;
99
+ playbook_regime: z.ZodString;
100
+ rule_id: z.ZodString;
101
+ verbatim_excerpt: z.ZodString;
102
+ bundle_hash: z.ZodOptional<z.ZodString>;
103
+ }, z.ZodTypeAny, "passthrough">>;
104
+ reviewed_by: z.ZodOptional<z.ZodString>;
105
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ /**
107
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
108
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
109
+ * the template text was used verbatim. A plain string, not an enum — the
110
+ * vocabulary is backend-owned and absent on most lanes.
111
+ */
112
+ text_provenance: z.ZodOptional<z.ZodString>;
113
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
114
+ id: z.ZodString;
115
+ document_id: z.ZodString;
116
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
117
+ position_path: z.ZodString;
118
+ /**
119
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
120
+ * this as insertion|deletion|replace, but that comment is stale —
121
+ * `finding/finding.go` is authoritative and the grammar lane has always
122
+ * emitted `"flag"` for findings that point at a span without proposing a
123
+ * replacement.
124
+ */
125
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
126
+ text: z.ZodString;
127
+ /** Absent on grammar findings, which have no acting reviewer. */
128
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
129
+ rationale: z.ZodString;
130
+ category: z.ZodString;
131
+ severity: z.ZodString;
132
+ state: z.ZodString;
133
+ citation: z.ZodObject<{
134
+ playbook_id: z.ZodString;
135
+ playbook_scope: z.ZodOptional<z.ZodObject<{
136
+ category: z.ZodOptional<z.ZodString>;
137
+ domain: z.ZodOptional<z.ZodString>;
138
+ type: z.ZodOptional<z.ZodString>;
139
+ subtype: z.ZodOptional<z.ZodString>;
140
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
141
+ category: z.ZodOptional<z.ZodString>;
142
+ domain: z.ZodOptional<z.ZodString>;
143
+ type: z.ZodOptional<z.ZodString>;
144
+ subtype: z.ZodOptional<z.ZodString>;
145
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
146
+ category: z.ZodOptional<z.ZodString>;
147
+ domain: z.ZodOptional<z.ZodString>;
148
+ type: z.ZodOptional<z.ZodString>;
149
+ subtype: z.ZodOptional<z.ZodString>;
150
+ }, z.ZodTypeAny, "passthrough">>>;
151
+ playbook_regime: z.ZodString;
152
+ rule_id: z.ZodString;
153
+ verbatim_excerpt: z.ZodString;
154
+ bundle_hash: z.ZodOptional<z.ZodString>;
155
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
156
+ playbook_id: z.ZodString;
157
+ playbook_scope: z.ZodOptional<z.ZodObject<{
158
+ category: z.ZodOptional<z.ZodString>;
159
+ domain: z.ZodOptional<z.ZodString>;
160
+ type: z.ZodOptional<z.ZodString>;
161
+ subtype: z.ZodOptional<z.ZodString>;
162
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
163
+ category: z.ZodOptional<z.ZodString>;
164
+ domain: z.ZodOptional<z.ZodString>;
165
+ type: z.ZodOptional<z.ZodString>;
166
+ subtype: z.ZodOptional<z.ZodString>;
167
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
168
+ category: z.ZodOptional<z.ZodString>;
169
+ domain: z.ZodOptional<z.ZodString>;
170
+ type: z.ZodOptional<z.ZodString>;
171
+ subtype: z.ZodOptional<z.ZodString>;
172
+ }, z.ZodTypeAny, "passthrough">>>;
173
+ playbook_regime: z.ZodString;
174
+ rule_id: z.ZodString;
175
+ verbatim_excerpt: z.ZodString;
176
+ bundle_hash: z.ZodOptional<z.ZodString>;
177
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
178
+ playbook_id: z.ZodString;
179
+ playbook_scope: z.ZodOptional<z.ZodObject<{
180
+ category: z.ZodOptional<z.ZodString>;
181
+ domain: z.ZodOptional<z.ZodString>;
182
+ type: z.ZodOptional<z.ZodString>;
183
+ subtype: z.ZodOptional<z.ZodString>;
184
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
185
+ category: z.ZodOptional<z.ZodString>;
186
+ domain: z.ZodOptional<z.ZodString>;
187
+ type: z.ZodOptional<z.ZodString>;
188
+ subtype: z.ZodOptional<z.ZodString>;
189
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
190
+ category: z.ZodOptional<z.ZodString>;
191
+ domain: z.ZodOptional<z.ZodString>;
192
+ type: z.ZodOptional<z.ZodString>;
193
+ subtype: z.ZodOptional<z.ZodString>;
194
+ }, z.ZodTypeAny, "passthrough">>>;
195
+ playbook_regime: z.ZodString;
196
+ rule_id: z.ZodString;
197
+ verbatim_excerpt: z.ZodString;
198
+ bundle_hash: z.ZodOptional<z.ZodString>;
199
+ }, z.ZodTypeAny, "passthrough">>;
200
+ reviewed_by: z.ZodOptional<z.ZodString>;
201
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
202
+ /**
203
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
204
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
205
+ * the template text was used verbatim. A plain string, not an enum — the
206
+ * vocabulary is backend-owned and absent on most lanes.
207
+ */
208
+ text_provenance: z.ZodOptional<z.ZodString>;
209
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
210
+ id: z.ZodString;
211
+ document_id: z.ZodString;
212
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
213
+ position_path: z.ZodString;
214
+ /**
215
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
216
+ * this as insertion|deletion|replace, but that comment is stale —
217
+ * `finding/finding.go` is authoritative and the grammar lane has always
218
+ * emitted `"flag"` for findings that point at a span without proposing a
219
+ * replacement.
220
+ */
221
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
222
+ text: z.ZodString;
223
+ /** Absent on grammar findings, which have no acting reviewer. */
224
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
225
+ rationale: z.ZodString;
226
+ category: z.ZodString;
227
+ severity: z.ZodString;
228
+ state: z.ZodString;
229
+ citation: z.ZodObject<{
230
+ playbook_id: z.ZodString;
231
+ playbook_scope: z.ZodOptional<z.ZodObject<{
232
+ category: z.ZodOptional<z.ZodString>;
233
+ domain: z.ZodOptional<z.ZodString>;
234
+ type: z.ZodOptional<z.ZodString>;
235
+ subtype: z.ZodOptional<z.ZodString>;
236
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
237
+ category: z.ZodOptional<z.ZodString>;
238
+ domain: z.ZodOptional<z.ZodString>;
239
+ type: z.ZodOptional<z.ZodString>;
240
+ subtype: z.ZodOptional<z.ZodString>;
241
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
242
+ category: z.ZodOptional<z.ZodString>;
243
+ domain: z.ZodOptional<z.ZodString>;
244
+ type: z.ZodOptional<z.ZodString>;
245
+ subtype: z.ZodOptional<z.ZodString>;
246
+ }, z.ZodTypeAny, "passthrough">>>;
247
+ playbook_regime: z.ZodString;
248
+ rule_id: z.ZodString;
249
+ verbatim_excerpt: z.ZodString;
250
+ bundle_hash: z.ZodOptional<z.ZodString>;
251
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
252
+ playbook_id: z.ZodString;
253
+ playbook_scope: z.ZodOptional<z.ZodObject<{
254
+ category: z.ZodOptional<z.ZodString>;
255
+ domain: z.ZodOptional<z.ZodString>;
256
+ type: z.ZodOptional<z.ZodString>;
257
+ subtype: z.ZodOptional<z.ZodString>;
258
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
259
+ category: z.ZodOptional<z.ZodString>;
260
+ domain: z.ZodOptional<z.ZodString>;
261
+ type: z.ZodOptional<z.ZodString>;
262
+ subtype: z.ZodOptional<z.ZodString>;
263
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
264
+ category: z.ZodOptional<z.ZodString>;
265
+ domain: z.ZodOptional<z.ZodString>;
266
+ type: z.ZodOptional<z.ZodString>;
267
+ subtype: z.ZodOptional<z.ZodString>;
268
+ }, z.ZodTypeAny, "passthrough">>>;
269
+ playbook_regime: z.ZodString;
270
+ rule_id: z.ZodString;
271
+ verbatim_excerpt: z.ZodString;
272
+ bundle_hash: z.ZodOptional<z.ZodString>;
273
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
274
+ playbook_id: z.ZodString;
275
+ playbook_scope: z.ZodOptional<z.ZodObject<{
276
+ category: z.ZodOptional<z.ZodString>;
277
+ domain: z.ZodOptional<z.ZodString>;
278
+ type: z.ZodOptional<z.ZodString>;
279
+ subtype: z.ZodOptional<z.ZodString>;
280
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
281
+ category: z.ZodOptional<z.ZodString>;
282
+ domain: z.ZodOptional<z.ZodString>;
283
+ type: z.ZodOptional<z.ZodString>;
284
+ subtype: z.ZodOptional<z.ZodString>;
285
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
286
+ category: z.ZodOptional<z.ZodString>;
287
+ domain: z.ZodOptional<z.ZodString>;
288
+ type: z.ZodOptional<z.ZodString>;
289
+ subtype: z.ZodOptional<z.ZodString>;
290
+ }, z.ZodTypeAny, "passthrough">>>;
291
+ playbook_regime: z.ZodString;
292
+ rule_id: z.ZodString;
293
+ verbatim_excerpt: z.ZodString;
294
+ bundle_hash: z.ZodOptional<z.ZodString>;
295
+ }, z.ZodTypeAny, "passthrough">>;
296
+ reviewed_by: z.ZodOptional<z.ZodString>;
297
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
298
+ /**
299
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
300
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
301
+ * the template text was used verbatim. A plain string, not an enum — the
302
+ * vocabulary is backend-owned and absent on most lanes.
303
+ */
304
+ text_provenance: z.ZodOptional<z.ZodString>;
305
+ }, z.ZodTypeAny, "passthrough">>;
306
+ /**
307
+ * `event: panel` — multi-persona section panel (agent/panellane.go). The wire
308
+ * shape is a FLATTENED v6 suggestion with `personas` and `escalated` inline
309
+ * (verified against panellane.go's `sink.Emit(Event{Type: EventPanel, Data: s})`
310
+ * and the archived capstone SSE) — NOT `{personas, escalated, suggestion:{…}}`.
311
+ * `escalated` is omitted (not false) when the panel did not escalate.
312
+ */
313
+ declare const panelEventDataSchema: z.ZodObject<{
314
+ id: z.ZodString;
315
+ document_id: z.ZodString;
316
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
317
+ position_path: z.ZodString;
318
+ /**
319
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
320
+ * this as insertion|deletion|replace, but that comment is stale —
321
+ * `finding/finding.go` is authoritative and the grammar lane has always
322
+ * emitted `"flag"` for findings that point at a span without proposing a
323
+ * replacement.
324
+ */
325
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
326
+ text: z.ZodString;
327
+ /** Absent on grammar findings, which have no acting reviewer. */
328
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
329
+ rationale: z.ZodString;
330
+ category: z.ZodString;
331
+ severity: z.ZodString;
332
+ state: z.ZodString;
333
+ citation: z.ZodObject<{
334
+ playbook_id: z.ZodString;
335
+ playbook_scope: z.ZodOptional<z.ZodObject<{
336
+ category: z.ZodOptional<z.ZodString>;
337
+ domain: z.ZodOptional<z.ZodString>;
338
+ type: z.ZodOptional<z.ZodString>;
339
+ subtype: z.ZodOptional<z.ZodString>;
340
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
341
+ category: z.ZodOptional<z.ZodString>;
342
+ domain: z.ZodOptional<z.ZodString>;
343
+ type: z.ZodOptional<z.ZodString>;
344
+ subtype: z.ZodOptional<z.ZodString>;
345
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
346
+ category: z.ZodOptional<z.ZodString>;
347
+ domain: z.ZodOptional<z.ZodString>;
348
+ type: z.ZodOptional<z.ZodString>;
349
+ subtype: z.ZodOptional<z.ZodString>;
350
+ }, z.ZodTypeAny, "passthrough">>>;
351
+ playbook_regime: z.ZodString;
352
+ rule_id: z.ZodString;
353
+ verbatim_excerpt: z.ZodString;
354
+ bundle_hash: z.ZodOptional<z.ZodString>;
355
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
356
+ playbook_id: z.ZodString;
357
+ playbook_scope: z.ZodOptional<z.ZodObject<{
358
+ category: z.ZodOptional<z.ZodString>;
359
+ domain: z.ZodOptional<z.ZodString>;
360
+ type: z.ZodOptional<z.ZodString>;
361
+ subtype: z.ZodOptional<z.ZodString>;
362
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
363
+ category: z.ZodOptional<z.ZodString>;
364
+ domain: z.ZodOptional<z.ZodString>;
365
+ type: z.ZodOptional<z.ZodString>;
366
+ subtype: z.ZodOptional<z.ZodString>;
367
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
368
+ category: z.ZodOptional<z.ZodString>;
369
+ domain: z.ZodOptional<z.ZodString>;
370
+ type: z.ZodOptional<z.ZodString>;
371
+ subtype: z.ZodOptional<z.ZodString>;
372
+ }, z.ZodTypeAny, "passthrough">>>;
373
+ playbook_regime: z.ZodString;
374
+ rule_id: z.ZodString;
375
+ verbatim_excerpt: z.ZodString;
376
+ bundle_hash: z.ZodOptional<z.ZodString>;
377
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
378
+ playbook_id: z.ZodString;
379
+ playbook_scope: z.ZodOptional<z.ZodObject<{
380
+ category: z.ZodOptional<z.ZodString>;
381
+ domain: z.ZodOptional<z.ZodString>;
382
+ type: z.ZodOptional<z.ZodString>;
383
+ subtype: z.ZodOptional<z.ZodString>;
384
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
385
+ category: z.ZodOptional<z.ZodString>;
386
+ domain: z.ZodOptional<z.ZodString>;
387
+ type: z.ZodOptional<z.ZodString>;
388
+ subtype: z.ZodOptional<z.ZodString>;
389
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
390
+ category: z.ZodOptional<z.ZodString>;
391
+ domain: z.ZodOptional<z.ZodString>;
392
+ type: z.ZodOptional<z.ZodString>;
393
+ subtype: z.ZodOptional<z.ZodString>;
394
+ }, z.ZodTypeAny, "passthrough">>>;
395
+ playbook_regime: z.ZodString;
396
+ rule_id: z.ZodString;
397
+ verbatim_excerpt: z.ZodString;
398
+ bundle_hash: z.ZodOptional<z.ZodString>;
399
+ }, z.ZodTypeAny, "passthrough">>;
400
+ reviewed_by: z.ZodOptional<z.ZodString>;
401
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
402
+ /**
403
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
404
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
405
+ * the template text was used verbatim. A plain string, not an enum — the
406
+ * vocabulary is backend-owned and absent on most lanes.
407
+ */
408
+ text_provenance: z.ZodOptional<z.ZodString>;
409
+ } & {
410
+ personas: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
411
+ escalated: z.ZodOptional<z.ZodBoolean>;
412
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
413
+ id: z.ZodString;
414
+ document_id: z.ZodString;
415
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
416
+ position_path: z.ZodString;
417
+ /**
418
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
419
+ * this as insertion|deletion|replace, but that comment is stale —
420
+ * `finding/finding.go` is authoritative and the grammar lane has always
421
+ * emitted `"flag"` for findings that point at a span without proposing a
422
+ * replacement.
423
+ */
424
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
425
+ text: z.ZodString;
426
+ /** Absent on grammar findings, which have no acting reviewer. */
427
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
428
+ rationale: z.ZodString;
429
+ category: z.ZodString;
430
+ severity: z.ZodString;
431
+ state: z.ZodString;
432
+ citation: z.ZodObject<{
433
+ playbook_id: z.ZodString;
434
+ playbook_scope: z.ZodOptional<z.ZodObject<{
435
+ category: z.ZodOptional<z.ZodString>;
436
+ domain: z.ZodOptional<z.ZodString>;
437
+ type: z.ZodOptional<z.ZodString>;
438
+ subtype: z.ZodOptional<z.ZodString>;
439
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
440
+ category: z.ZodOptional<z.ZodString>;
441
+ domain: z.ZodOptional<z.ZodString>;
442
+ type: z.ZodOptional<z.ZodString>;
443
+ subtype: z.ZodOptional<z.ZodString>;
444
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
445
+ category: z.ZodOptional<z.ZodString>;
446
+ domain: z.ZodOptional<z.ZodString>;
447
+ type: z.ZodOptional<z.ZodString>;
448
+ subtype: z.ZodOptional<z.ZodString>;
449
+ }, z.ZodTypeAny, "passthrough">>>;
450
+ playbook_regime: z.ZodString;
451
+ rule_id: z.ZodString;
452
+ verbatim_excerpt: z.ZodString;
453
+ bundle_hash: z.ZodOptional<z.ZodString>;
454
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
455
+ playbook_id: z.ZodString;
456
+ playbook_scope: z.ZodOptional<z.ZodObject<{
457
+ category: z.ZodOptional<z.ZodString>;
458
+ domain: z.ZodOptional<z.ZodString>;
459
+ type: z.ZodOptional<z.ZodString>;
460
+ subtype: z.ZodOptional<z.ZodString>;
461
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
462
+ category: z.ZodOptional<z.ZodString>;
463
+ domain: z.ZodOptional<z.ZodString>;
464
+ type: z.ZodOptional<z.ZodString>;
465
+ subtype: z.ZodOptional<z.ZodString>;
466
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
467
+ category: z.ZodOptional<z.ZodString>;
468
+ domain: z.ZodOptional<z.ZodString>;
469
+ type: z.ZodOptional<z.ZodString>;
470
+ subtype: z.ZodOptional<z.ZodString>;
471
+ }, z.ZodTypeAny, "passthrough">>>;
472
+ playbook_regime: z.ZodString;
473
+ rule_id: z.ZodString;
474
+ verbatim_excerpt: z.ZodString;
475
+ bundle_hash: z.ZodOptional<z.ZodString>;
476
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
477
+ playbook_id: z.ZodString;
478
+ playbook_scope: z.ZodOptional<z.ZodObject<{
479
+ category: z.ZodOptional<z.ZodString>;
480
+ domain: z.ZodOptional<z.ZodString>;
481
+ type: z.ZodOptional<z.ZodString>;
482
+ subtype: z.ZodOptional<z.ZodString>;
483
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
484
+ category: z.ZodOptional<z.ZodString>;
485
+ domain: z.ZodOptional<z.ZodString>;
486
+ type: z.ZodOptional<z.ZodString>;
487
+ subtype: z.ZodOptional<z.ZodString>;
488
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
489
+ category: z.ZodOptional<z.ZodString>;
490
+ domain: z.ZodOptional<z.ZodString>;
491
+ type: z.ZodOptional<z.ZodString>;
492
+ subtype: z.ZodOptional<z.ZodString>;
493
+ }, z.ZodTypeAny, "passthrough">>>;
494
+ playbook_regime: z.ZodString;
495
+ rule_id: z.ZodString;
496
+ verbatim_excerpt: z.ZodString;
497
+ bundle_hash: z.ZodOptional<z.ZodString>;
498
+ }, z.ZodTypeAny, "passthrough">>;
499
+ reviewed_by: z.ZodOptional<z.ZodString>;
500
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
501
+ /**
502
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
503
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
504
+ * the template text was used verbatim. A plain string, not an enum — the
505
+ * vocabulary is backend-owned and absent on most lanes.
506
+ */
507
+ text_provenance: z.ZodOptional<z.ZodString>;
508
+ } & {
509
+ personas: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
510
+ escalated: z.ZodOptional<z.ZodBoolean>;
511
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
512
+ id: z.ZodString;
513
+ document_id: z.ZodString;
514
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
515
+ position_path: z.ZodString;
516
+ /**
517
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
518
+ * this as insertion|deletion|replace, but that comment is stale —
519
+ * `finding/finding.go` is authoritative and the grammar lane has always
520
+ * emitted `"flag"` for findings that point at a span without proposing a
521
+ * replacement.
522
+ */
523
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
524
+ text: z.ZodString;
525
+ /** Absent on grammar findings, which have no acting reviewer. */
526
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
527
+ rationale: z.ZodString;
528
+ category: z.ZodString;
529
+ severity: z.ZodString;
530
+ state: z.ZodString;
531
+ citation: z.ZodObject<{
532
+ playbook_id: z.ZodString;
533
+ playbook_scope: z.ZodOptional<z.ZodObject<{
534
+ category: z.ZodOptional<z.ZodString>;
535
+ domain: z.ZodOptional<z.ZodString>;
536
+ type: z.ZodOptional<z.ZodString>;
537
+ subtype: z.ZodOptional<z.ZodString>;
538
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
539
+ category: z.ZodOptional<z.ZodString>;
540
+ domain: z.ZodOptional<z.ZodString>;
541
+ type: z.ZodOptional<z.ZodString>;
542
+ subtype: z.ZodOptional<z.ZodString>;
543
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
544
+ category: z.ZodOptional<z.ZodString>;
545
+ domain: z.ZodOptional<z.ZodString>;
546
+ type: z.ZodOptional<z.ZodString>;
547
+ subtype: z.ZodOptional<z.ZodString>;
548
+ }, z.ZodTypeAny, "passthrough">>>;
549
+ playbook_regime: z.ZodString;
550
+ rule_id: z.ZodString;
551
+ verbatim_excerpt: z.ZodString;
552
+ bundle_hash: z.ZodOptional<z.ZodString>;
553
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
554
+ playbook_id: z.ZodString;
555
+ playbook_scope: z.ZodOptional<z.ZodObject<{
556
+ category: z.ZodOptional<z.ZodString>;
557
+ domain: z.ZodOptional<z.ZodString>;
558
+ type: z.ZodOptional<z.ZodString>;
559
+ subtype: z.ZodOptional<z.ZodString>;
560
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
561
+ category: z.ZodOptional<z.ZodString>;
562
+ domain: z.ZodOptional<z.ZodString>;
563
+ type: z.ZodOptional<z.ZodString>;
564
+ subtype: z.ZodOptional<z.ZodString>;
565
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
566
+ category: z.ZodOptional<z.ZodString>;
567
+ domain: z.ZodOptional<z.ZodString>;
568
+ type: z.ZodOptional<z.ZodString>;
569
+ subtype: z.ZodOptional<z.ZodString>;
570
+ }, z.ZodTypeAny, "passthrough">>>;
571
+ playbook_regime: z.ZodString;
572
+ rule_id: z.ZodString;
573
+ verbatim_excerpt: z.ZodString;
574
+ bundle_hash: z.ZodOptional<z.ZodString>;
575
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
576
+ playbook_id: z.ZodString;
577
+ playbook_scope: z.ZodOptional<z.ZodObject<{
578
+ category: z.ZodOptional<z.ZodString>;
579
+ domain: z.ZodOptional<z.ZodString>;
580
+ type: z.ZodOptional<z.ZodString>;
581
+ subtype: z.ZodOptional<z.ZodString>;
582
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
583
+ category: z.ZodOptional<z.ZodString>;
584
+ domain: z.ZodOptional<z.ZodString>;
585
+ type: z.ZodOptional<z.ZodString>;
586
+ subtype: z.ZodOptional<z.ZodString>;
587
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
588
+ category: z.ZodOptional<z.ZodString>;
589
+ domain: z.ZodOptional<z.ZodString>;
590
+ type: z.ZodOptional<z.ZodString>;
591
+ subtype: z.ZodOptional<z.ZodString>;
592
+ }, z.ZodTypeAny, "passthrough">>>;
593
+ playbook_regime: z.ZodString;
594
+ rule_id: z.ZodString;
595
+ verbatim_excerpt: z.ZodString;
596
+ bundle_hash: z.ZodOptional<z.ZodString>;
597
+ }, z.ZodTypeAny, "passthrough">>;
598
+ reviewed_by: z.ZodOptional<z.ZodString>;
599
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
600
+ /**
601
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
602
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
603
+ * the template text was used verbatim. A plain string, not an enum — the
604
+ * vocabulary is backend-owned and absent on most lanes.
605
+ */
606
+ text_provenance: z.ZodOptional<z.ZodString>;
607
+ } & {
608
+ personas: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
609
+ escalated: z.ZodOptional<z.ZodBoolean>;
610
+ }, z.ZodTypeAny, "passthrough">>;
611
+ /**
612
+ * `event: rulebook_insertion` — a missing-clause insertion proposal
613
+ * (rulecheck/insertions.go): a v6 suggestion (kind "insertion",
614
+ * `position_path` = anchor node) plus where to put it relative to that node.
615
+ */
616
+ declare const rulebookInsertionEventDataSchema: z.ZodObject<{
617
+ id: z.ZodString;
618
+ document_id: z.ZodString;
619
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
620
+ position_path: z.ZodString;
621
+ /**
622
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
623
+ * this as insertion|deletion|replace, but that comment is stale —
624
+ * `finding/finding.go` is authoritative and the grammar lane has always
625
+ * emitted `"flag"` for findings that point at a span without proposing a
626
+ * replacement.
627
+ */
628
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
629
+ text: z.ZodString;
630
+ /** Absent on grammar findings, which have no acting reviewer. */
631
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
632
+ rationale: z.ZodString;
633
+ category: z.ZodString;
634
+ severity: z.ZodString;
635
+ state: z.ZodString;
636
+ citation: z.ZodObject<{
637
+ playbook_id: z.ZodString;
638
+ playbook_scope: z.ZodOptional<z.ZodObject<{
639
+ category: z.ZodOptional<z.ZodString>;
640
+ domain: z.ZodOptional<z.ZodString>;
641
+ type: z.ZodOptional<z.ZodString>;
642
+ subtype: z.ZodOptional<z.ZodString>;
643
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
644
+ category: z.ZodOptional<z.ZodString>;
645
+ domain: z.ZodOptional<z.ZodString>;
646
+ type: z.ZodOptional<z.ZodString>;
647
+ subtype: z.ZodOptional<z.ZodString>;
648
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
649
+ category: z.ZodOptional<z.ZodString>;
650
+ domain: z.ZodOptional<z.ZodString>;
651
+ type: z.ZodOptional<z.ZodString>;
652
+ subtype: z.ZodOptional<z.ZodString>;
653
+ }, z.ZodTypeAny, "passthrough">>>;
654
+ playbook_regime: z.ZodString;
655
+ rule_id: z.ZodString;
656
+ verbatim_excerpt: z.ZodString;
657
+ bundle_hash: z.ZodOptional<z.ZodString>;
658
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
659
+ playbook_id: z.ZodString;
660
+ playbook_scope: z.ZodOptional<z.ZodObject<{
661
+ category: z.ZodOptional<z.ZodString>;
662
+ domain: z.ZodOptional<z.ZodString>;
663
+ type: z.ZodOptional<z.ZodString>;
664
+ subtype: z.ZodOptional<z.ZodString>;
665
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
666
+ category: z.ZodOptional<z.ZodString>;
667
+ domain: z.ZodOptional<z.ZodString>;
668
+ type: z.ZodOptional<z.ZodString>;
669
+ subtype: z.ZodOptional<z.ZodString>;
670
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
671
+ category: z.ZodOptional<z.ZodString>;
672
+ domain: z.ZodOptional<z.ZodString>;
673
+ type: z.ZodOptional<z.ZodString>;
674
+ subtype: z.ZodOptional<z.ZodString>;
675
+ }, z.ZodTypeAny, "passthrough">>>;
676
+ playbook_regime: z.ZodString;
677
+ rule_id: z.ZodString;
678
+ verbatim_excerpt: z.ZodString;
679
+ bundle_hash: z.ZodOptional<z.ZodString>;
680
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
681
+ playbook_id: z.ZodString;
682
+ playbook_scope: z.ZodOptional<z.ZodObject<{
683
+ category: z.ZodOptional<z.ZodString>;
684
+ domain: z.ZodOptional<z.ZodString>;
685
+ type: z.ZodOptional<z.ZodString>;
686
+ subtype: z.ZodOptional<z.ZodString>;
687
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
688
+ category: z.ZodOptional<z.ZodString>;
689
+ domain: z.ZodOptional<z.ZodString>;
690
+ type: z.ZodOptional<z.ZodString>;
691
+ subtype: z.ZodOptional<z.ZodString>;
692
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
693
+ category: z.ZodOptional<z.ZodString>;
694
+ domain: z.ZodOptional<z.ZodString>;
695
+ type: z.ZodOptional<z.ZodString>;
696
+ subtype: z.ZodOptional<z.ZodString>;
697
+ }, z.ZodTypeAny, "passthrough">>>;
698
+ playbook_regime: z.ZodString;
699
+ rule_id: z.ZodString;
700
+ verbatim_excerpt: z.ZodString;
701
+ bundle_hash: z.ZodOptional<z.ZodString>;
702
+ }, z.ZodTypeAny, "passthrough">>;
703
+ reviewed_by: z.ZodOptional<z.ZodString>;
704
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
705
+ /**
706
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
707
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
708
+ * the template text was used verbatim. A plain string, not an enum — the
709
+ * vocabulary is backend-owned and absent on most lanes.
710
+ */
711
+ text_provenance: z.ZodOptional<z.ZodString>;
712
+ } & {
713
+ /** "before" | "after" | "child" relative to `position_path`'s node. */
714
+ placement: z.ZodOptional<z.ZodString>;
715
+ /** ProseMirror node type to insert, e.g. "paragraph". */
716
+ node_type: z.ZodOptional<z.ZodString>;
717
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
718
+ id: z.ZodString;
719
+ document_id: z.ZodString;
720
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
721
+ position_path: z.ZodString;
722
+ /**
723
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
724
+ * this as insertion|deletion|replace, but that comment is stale —
725
+ * `finding/finding.go` is authoritative and the grammar lane has always
726
+ * emitted `"flag"` for findings that point at a span without proposing a
727
+ * replacement.
728
+ */
729
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
730
+ text: z.ZodString;
731
+ /** Absent on grammar findings, which have no acting reviewer. */
732
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
733
+ rationale: z.ZodString;
734
+ category: z.ZodString;
735
+ severity: z.ZodString;
736
+ state: z.ZodString;
737
+ citation: z.ZodObject<{
738
+ playbook_id: z.ZodString;
739
+ playbook_scope: z.ZodOptional<z.ZodObject<{
740
+ category: z.ZodOptional<z.ZodString>;
741
+ domain: z.ZodOptional<z.ZodString>;
742
+ type: z.ZodOptional<z.ZodString>;
743
+ subtype: z.ZodOptional<z.ZodString>;
744
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
745
+ category: z.ZodOptional<z.ZodString>;
746
+ domain: z.ZodOptional<z.ZodString>;
747
+ type: z.ZodOptional<z.ZodString>;
748
+ subtype: z.ZodOptional<z.ZodString>;
749
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
750
+ category: z.ZodOptional<z.ZodString>;
751
+ domain: z.ZodOptional<z.ZodString>;
752
+ type: z.ZodOptional<z.ZodString>;
753
+ subtype: z.ZodOptional<z.ZodString>;
754
+ }, z.ZodTypeAny, "passthrough">>>;
755
+ playbook_regime: z.ZodString;
756
+ rule_id: z.ZodString;
757
+ verbatim_excerpt: z.ZodString;
758
+ bundle_hash: z.ZodOptional<z.ZodString>;
759
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
760
+ playbook_id: z.ZodString;
761
+ playbook_scope: z.ZodOptional<z.ZodObject<{
762
+ category: z.ZodOptional<z.ZodString>;
763
+ domain: z.ZodOptional<z.ZodString>;
764
+ type: z.ZodOptional<z.ZodString>;
765
+ subtype: z.ZodOptional<z.ZodString>;
766
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
767
+ category: z.ZodOptional<z.ZodString>;
768
+ domain: z.ZodOptional<z.ZodString>;
769
+ type: z.ZodOptional<z.ZodString>;
770
+ subtype: z.ZodOptional<z.ZodString>;
771
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
772
+ category: z.ZodOptional<z.ZodString>;
773
+ domain: z.ZodOptional<z.ZodString>;
774
+ type: z.ZodOptional<z.ZodString>;
775
+ subtype: z.ZodOptional<z.ZodString>;
776
+ }, z.ZodTypeAny, "passthrough">>>;
777
+ playbook_regime: z.ZodString;
778
+ rule_id: z.ZodString;
779
+ verbatim_excerpt: z.ZodString;
780
+ bundle_hash: z.ZodOptional<z.ZodString>;
781
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
782
+ playbook_id: z.ZodString;
783
+ playbook_scope: z.ZodOptional<z.ZodObject<{
784
+ category: z.ZodOptional<z.ZodString>;
785
+ domain: z.ZodOptional<z.ZodString>;
786
+ type: z.ZodOptional<z.ZodString>;
787
+ subtype: z.ZodOptional<z.ZodString>;
788
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
789
+ category: z.ZodOptional<z.ZodString>;
790
+ domain: z.ZodOptional<z.ZodString>;
791
+ type: z.ZodOptional<z.ZodString>;
792
+ subtype: z.ZodOptional<z.ZodString>;
793
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
794
+ category: z.ZodOptional<z.ZodString>;
795
+ domain: z.ZodOptional<z.ZodString>;
796
+ type: z.ZodOptional<z.ZodString>;
797
+ subtype: z.ZodOptional<z.ZodString>;
798
+ }, z.ZodTypeAny, "passthrough">>>;
799
+ playbook_regime: z.ZodString;
800
+ rule_id: z.ZodString;
801
+ verbatim_excerpt: z.ZodString;
802
+ bundle_hash: z.ZodOptional<z.ZodString>;
803
+ }, z.ZodTypeAny, "passthrough">>;
804
+ reviewed_by: z.ZodOptional<z.ZodString>;
805
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
806
+ /**
807
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
808
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
809
+ * the template text was used verbatim. A plain string, not an enum — the
810
+ * vocabulary is backend-owned and absent on most lanes.
811
+ */
812
+ text_provenance: z.ZodOptional<z.ZodString>;
813
+ } & {
814
+ /** "before" | "after" | "child" relative to `position_path`'s node. */
815
+ placement: z.ZodOptional<z.ZodString>;
816
+ /** ProseMirror node type to insert, e.g. "paragraph". */
817
+ node_type: z.ZodOptional<z.ZodString>;
818
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
819
+ id: z.ZodString;
820
+ document_id: z.ZodString;
821
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
822
+ position_path: z.ZodString;
823
+ /**
824
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
825
+ * this as insertion|deletion|replace, but that comment is stale —
826
+ * `finding/finding.go` is authoritative and the grammar lane has always
827
+ * emitted `"flag"` for findings that point at a span without proposing a
828
+ * replacement.
829
+ */
830
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
831
+ text: z.ZodString;
832
+ /** Absent on grammar findings, which have no acting reviewer. */
833
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
834
+ rationale: z.ZodString;
835
+ category: z.ZodString;
836
+ severity: z.ZodString;
837
+ state: z.ZodString;
838
+ citation: z.ZodObject<{
839
+ playbook_id: z.ZodString;
840
+ playbook_scope: z.ZodOptional<z.ZodObject<{
841
+ category: z.ZodOptional<z.ZodString>;
842
+ domain: z.ZodOptional<z.ZodString>;
843
+ type: z.ZodOptional<z.ZodString>;
844
+ subtype: z.ZodOptional<z.ZodString>;
845
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
846
+ category: z.ZodOptional<z.ZodString>;
847
+ domain: z.ZodOptional<z.ZodString>;
848
+ type: z.ZodOptional<z.ZodString>;
849
+ subtype: z.ZodOptional<z.ZodString>;
850
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
851
+ category: z.ZodOptional<z.ZodString>;
852
+ domain: z.ZodOptional<z.ZodString>;
853
+ type: z.ZodOptional<z.ZodString>;
854
+ subtype: z.ZodOptional<z.ZodString>;
855
+ }, z.ZodTypeAny, "passthrough">>>;
856
+ playbook_regime: z.ZodString;
857
+ rule_id: z.ZodString;
858
+ verbatim_excerpt: z.ZodString;
859
+ bundle_hash: z.ZodOptional<z.ZodString>;
860
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
861
+ playbook_id: z.ZodString;
862
+ playbook_scope: z.ZodOptional<z.ZodObject<{
863
+ category: z.ZodOptional<z.ZodString>;
864
+ domain: z.ZodOptional<z.ZodString>;
865
+ type: z.ZodOptional<z.ZodString>;
866
+ subtype: z.ZodOptional<z.ZodString>;
867
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
868
+ category: z.ZodOptional<z.ZodString>;
869
+ domain: z.ZodOptional<z.ZodString>;
870
+ type: z.ZodOptional<z.ZodString>;
871
+ subtype: z.ZodOptional<z.ZodString>;
872
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
873
+ category: z.ZodOptional<z.ZodString>;
874
+ domain: z.ZodOptional<z.ZodString>;
875
+ type: z.ZodOptional<z.ZodString>;
876
+ subtype: z.ZodOptional<z.ZodString>;
877
+ }, z.ZodTypeAny, "passthrough">>>;
878
+ playbook_regime: z.ZodString;
879
+ rule_id: z.ZodString;
880
+ verbatim_excerpt: z.ZodString;
881
+ bundle_hash: z.ZodOptional<z.ZodString>;
882
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
883
+ playbook_id: z.ZodString;
884
+ playbook_scope: z.ZodOptional<z.ZodObject<{
885
+ category: z.ZodOptional<z.ZodString>;
886
+ domain: z.ZodOptional<z.ZodString>;
887
+ type: z.ZodOptional<z.ZodString>;
888
+ subtype: z.ZodOptional<z.ZodString>;
889
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
890
+ category: z.ZodOptional<z.ZodString>;
891
+ domain: z.ZodOptional<z.ZodString>;
892
+ type: z.ZodOptional<z.ZodString>;
893
+ subtype: z.ZodOptional<z.ZodString>;
894
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
895
+ category: z.ZodOptional<z.ZodString>;
896
+ domain: z.ZodOptional<z.ZodString>;
897
+ type: z.ZodOptional<z.ZodString>;
898
+ subtype: z.ZodOptional<z.ZodString>;
899
+ }, z.ZodTypeAny, "passthrough">>>;
900
+ playbook_regime: z.ZodString;
901
+ rule_id: z.ZodString;
902
+ verbatim_excerpt: z.ZodString;
903
+ bundle_hash: z.ZodOptional<z.ZodString>;
904
+ }, z.ZodTypeAny, "passthrough">>;
905
+ reviewed_by: z.ZodOptional<z.ZodString>;
906
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
907
+ /**
908
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
909
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
910
+ * the template text was used verbatim. A plain string, not an enum — the
911
+ * vocabulary is backend-owned and absent on most lanes.
912
+ */
913
+ text_provenance: z.ZodOptional<z.ZodString>;
914
+ } & {
915
+ /** "before" | "after" | "child" relative to `position_path`'s node. */
916
+ placement: z.ZodOptional<z.ZodString>;
917
+ /** ProseMirror node type to insert, e.g. "paragraph". */
918
+ node_type: z.ZodOptional<z.ZodString>;
919
+ }, z.ZodTypeAny, "passthrough">>;
920
+ declare const groundingSchema: z.ZodObject<{
921
+ suggestion_id: z.ZodString;
922
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
923
+ node_path: z.ZodArray<z.ZodNumber, "many">;
924
+ redline_user_id: z.ZodString;
925
+ redline_timestamp: z.ZodString;
926
+ rule_id: z.ZodString;
927
+ playbook_id: z.ZodString;
928
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
929
+ regime: z.ZodString;
930
+ verbatim_excerpt: z.ZodString;
931
+ v6_category: z.ZodString;
932
+ v6_severity: z.ZodString;
933
+ rationale: z.ZodString;
934
+ kind: z.ZodString;
935
+ text: z.ZodString;
936
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
937
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
938
+ suggestion_id: z.ZodString;
939
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
940
+ node_path: z.ZodArray<z.ZodNumber, "many">;
941
+ redline_user_id: z.ZodString;
942
+ redline_timestamp: z.ZodString;
943
+ rule_id: z.ZodString;
944
+ playbook_id: z.ZodString;
945
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
946
+ regime: z.ZodString;
947
+ verbatim_excerpt: z.ZodString;
948
+ v6_category: z.ZodString;
949
+ v6_severity: z.ZodString;
950
+ rationale: z.ZodString;
951
+ kind: z.ZodString;
952
+ text: z.ZodString;
953
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
954
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
955
+ suggestion_id: z.ZodString;
956
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
957
+ node_path: z.ZodArray<z.ZodNumber, "many">;
958
+ redline_user_id: z.ZodString;
959
+ redline_timestamp: z.ZodString;
960
+ rule_id: z.ZodString;
961
+ playbook_id: z.ZodString;
962
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
963
+ regime: z.ZodString;
964
+ verbatim_excerpt: z.ZodString;
965
+ v6_category: z.ZodString;
966
+ v6_severity: z.ZodString;
967
+ rationale: z.ZodString;
968
+ kind: z.ZodString;
969
+ text: z.ZodString;
970
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
971
+ }, z.ZodTypeAny, "passthrough">>;
972
+ declare const redlineEventDataSchema: z.ZodObject<{
973
+ suggestion: z.ZodObject<{
974
+ id: z.ZodString;
975
+ document_id: z.ZodString;
976
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
977
+ position_path: z.ZodString;
978
+ /**
979
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
980
+ * this as insertion|deletion|replace, but that comment is stale —
981
+ * `finding/finding.go` is authoritative and the grammar lane has always
982
+ * emitted `"flag"` for findings that point at a span without proposing a
983
+ * replacement.
984
+ */
985
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
986
+ text: z.ZodString;
987
+ /** Absent on grammar findings, which have no acting reviewer. */
988
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
989
+ rationale: z.ZodString;
990
+ category: z.ZodString;
991
+ severity: z.ZodString;
992
+ state: z.ZodString;
993
+ citation: z.ZodObject<{
994
+ playbook_id: z.ZodString;
995
+ playbook_scope: z.ZodOptional<z.ZodObject<{
996
+ category: z.ZodOptional<z.ZodString>;
997
+ domain: z.ZodOptional<z.ZodString>;
998
+ type: z.ZodOptional<z.ZodString>;
999
+ subtype: z.ZodOptional<z.ZodString>;
1000
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1001
+ category: z.ZodOptional<z.ZodString>;
1002
+ domain: z.ZodOptional<z.ZodString>;
1003
+ type: z.ZodOptional<z.ZodString>;
1004
+ subtype: z.ZodOptional<z.ZodString>;
1005
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1006
+ category: z.ZodOptional<z.ZodString>;
1007
+ domain: z.ZodOptional<z.ZodString>;
1008
+ type: z.ZodOptional<z.ZodString>;
1009
+ subtype: z.ZodOptional<z.ZodString>;
1010
+ }, z.ZodTypeAny, "passthrough">>>;
1011
+ playbook_regime: z.ZodString;
1012
+ rule_id: z.ZodString;
1013
+ verbatim_excerpt: z.ZodString;
1014
+ bundle_hash: z.ZodOptional<z.ZodString>;
1015
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1016
+ playbook_id: z.ZodString;
1017
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1018
+ category: z.ZodOptional<z.ZodString>;
1019
+ domain: z.ZodOptional<z.ZodString>;
1020
+ type: z.ZodOptional<z.ZodString>;
1021
+ subtype: z.ZodOptional<z.ZodString>;
1022
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1023
+ category: z.ZodOptional<z.ZodString>;
1024
+ domain: z.ZodOptional<z.ZodString>;
1025
+ type: z.ZodOptional<z.ZodString>;
1026
+ subtype: z.ZodOptional<z.ZodString>;
1027
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1028
+ category: z.ZodOptional<z.ZodString>;
1029
+ domain: z.ZodOptional<z.ZodString>;
1030
+ type: z.ZodOptional<z.ZodString>;
1031
+ subtype: z.ZodOptional<z.ZodString>;
1032
+ }, z.ZodTypeAny, "passthrough">>>;
1033
+ playbook_regime: z.ZodString;
1034
+ rule_id: z.ZodString;
1035
+ verbatim_excerpt: z.ZodString;
1036
+ bundle_hash: z.ZodOptional<z.ZodString>;
1037
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1038
+ playbook_id: z.ZodString;
1039
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1040
+ category: z.ZodOptional<z.ZodString>;
1041
+ domain: z.ZodOptional<z.ZodString>;
1042
+ type: z.ZodOptional<z.ZodString>;
1043
+ subtype: z.ZodOptional<z.ZodString>;
1044
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1045
+ category: z.ZodOptional<z.ZodString>;
1046
+ domain: z.ZodOptional<z.ZodString>;
1047
+ type: z.ZodOptional<z.ZodString>;
1048
+ subtype: z.ZodOptional<z.ZodString>;
1049
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1050
+ category: z.ZodOptional<z.ZodString>;
1051
+ domain: z.ZodOptional<z.ZodString>;
1052
+ type: z.ZodOptional<z.ZodString>;
1053
+ subtype: z.ZodOptional<z.ZodString>;
1054
+ }, z.ZodTypeAny, "passthrough">>>;
1055
+ playbook_regime: z.ZodString;
1056
+ rule_id: z.ZodString;
1057
+ verbatim_excerpt: z.ZodString;
1058
+ bundle_hash: z.ZodOptional<z.ZodString>;
1059
+ }, z.ZodTypeAny, "passthrough">>;
1060
+ reviewed_by: z.ZodOptional<z.ZodString>;
1061
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1062
+ /**
1063
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1064
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1065
+ * the template text was used verbatim. A plain string, not an enum — the
1066
+ * vocabulary is backend-owned and absent on most lanes.
1067
+ */
1068
+ text_provenance: z.ZodOptional<z.ZodString>;
1069
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1070
+ id: z.ZodString;
1071
+ document_id: z.ZodString;
1072
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1073
+ position_path: z.ZodString;
1074
+ /**
1075
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1076
+ * this as insertion|deletion|replace, but that comment is stale —
1077
+ * `finding/finding.go` is authoritative and the grammar lane has always
1078
+ * emitted `"flag"` for findings that point at a span without proposing a
1079
+ * replacement.
1080
+ */
1081
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1082
+ text: z.ZodString;
1083
+ /** Absent on grammar findings, which have no acting reviewer. */
1084
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1085
+ rationale: z.ZodString;
1086
+ category: z.ZodString;
1087
+ severity: z.ZodString;
1088
+ state: z.ZodString;
1089
+ citation: z.ZodObject<{
1090
+ playbook_id: z.ZodString;
1091
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1092
+ category: z.ZodOptional<z.ZodString>;
1093
+ domain: z.ZodOptional<z.ZodString>;
1094
+ type: z.ZodOptional<z.ZodString>;
1095
+ subtype: z.ZodOptional<z.ZodString>;
1096
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1097
+ category: z.ZodOptional<z.ZodString>;
1098
+ domain: z.ZodOptional<z.ZodString>;
1099
+ type: z.ZodOptional<z.ZodString>;
1100
+ subtype: z.ZodOptional<z.ZodString>;
1101
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1102
+ category: z.ZodOptional<z.ZodString>;
1103
+ domain: z.ZodOptional<z.ZodString>;
1104
+ type: z.ZodOptional<z.ZodString>;
1105
+ subtype: z.ZodOptional<z.ZodString>;
1106
+ }, z.ZodTypeAny, "passthrough">>>;
1107
+ playbook_regime: z.ZodString;
1108
+ rule_id: z.ZodString;
1109
+ verbatim_excerpt: z.ZodString;
1110
+ bundle_hash: z.ZodOptional<z.ZodString>;
1111
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1112
+ playbook_id: z.ZodString;
1113
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1114
+ category: z.ZodOptional<z.ZodString>;
1115
+ domain: z.ZodOptional<z.ZodString>;
1116
+ type: z.ZodOptional<z.ZodString>;
1117
+ subtype: z.ZodOptional<z.ZodString>;
1118
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1119
+ category: z.ZodOptional<z.ZodString>;
1120
+ domain: z.ZodOptional<z.ZodString>;
1121
+ type: z.ZodOptional<z.ZodString>;
1122
+ subtype: z.ZodOptional<z.ZodString>;
1123
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1124
+ category: z.ZodOptional<z.ZodString>;
1125
+ domain: z.ZodOptional<z.ZodString>;
1126
+ type: z.ZodOptional<z.ZodString>;
1127
+ subtype: z.ZodOptional<z.ZodString>;
1128
+ }, z.ZodTypeAny, "passthrough">>>;
1129
+ playbook_regime: z.ZodString;
1130
+ rule_id: z.ZodString;
1131
+ verbatim_excerpt: z.ZodString;
1132
+ bundle_hash: z.ZodOptional<z.ZodString>;
1133
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1134
+ playbook_id: z.ZodString;
1135
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1136
+ category: z.ZodOptional<z.ZodString>;
1137
+ domain: z.ZodOptional<z.ZodString>;
1138
+ type: z.ZodOptional<z.ZodString>;
1139
+ subtype: z.ZodOptional<z.ZodString>;
1140
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1141
+ category: z.ZodOptional<z.ZodString>;
1142
+ domain: z.ZodOptional<z.ZodString>;
1143
+ type: z.ZodOptional<z.ZodString>;
1144
+ subtype: z.ZodOptional<z.ZodString>;
1145
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1146
+ category: z.ZodOptional<z.ZodString>;
1147
+ domain: z.ZodOptional<z.ZodString>;
1148
+ type: z.ZodOptional<z.ZodString>;
1149
+ subtype: z.ZodOptional<z.ZodString>;
1150
+ }, z.ZodTypeAny, "passthrough">>>;
1151
+ playbook_regime: z.ZodString;
1152
+ rule_id: z.ZodString;
1153
+ verbatim_excerpt: z.ZodString;
1154
+ bundle_hash: z.ZodOptional<z.ZodString>;
1155
+ }, z.ZodTypeAny, "passthrough">>;
1156
+ reviewed_by: z.ZodOptional<z.ZodString>;
1157
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1158
+ /**
1159
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1160
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1161
+ * the template text was used verbatim. A plain string, not an enum — the
1162
+ * vocabulary is backend-owned and absent on most lanes.
1163
+ */
1164
+ text_provenance: z.ZodOptional<z.ZodString>;
1165
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1166
+ id: z.ZodString;
1167
+ document_id: z.ZodString;
1168
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1169
+ position_path: z.ZodString;
1170
+ /**
1171
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1172
+ * this as insertion|deletion|replace, but that comment is stale —
1173
+ * `finding/finding.go` is authoritative and the grammar lane has always
1174
+ * emitted `"flag"` for findings that point at a span without proposing a
1175
+ * replacement.
1176
+ */
1177
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1178
+ text: z.ZodString;
1179
+ /** Absent on grammar findings, which have no acting reviewer. */
1180
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1181
+ rationale: z.ZodString;
1182
+ category: z.ZodString;
1183
+ severity: z.ZodString;
1184
+ state: z.ZodString;
1185
+ citation: z.ZodObject<{
1186
+ playbook_id: z.ZodString;
1187
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1188
+ category: z.ZodOptional<z.ZodString>;
1189
+ domain: z.ZodOptional<z.ZodString>;
1190
+ type: z.ZodOptional<z.ZodString>;
1191
+ subtype: z.ZodOptional<z.ZodString>;
1192
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1193
+ category: z.ZodOptional<z.ZodString>;
1194
+ domain: z.ZodOptional<z.ZodString>;
1195
+ type: z.ZodOptional<z.ZodString>;
1196
+ subtype: z.ZodOptional<z.ZodString>;
1197
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1198
+ category: z.ZodOptional<z.ZodString>;
1199
+ domain: z.ZodOptional<z.ZodString>;
1200
+ type: z.ZodOptional<z.ZodString>;
1201
+ subtype: z.ZodOptional<z.ZodString>;
1202
+ }, z.ZodTypeAny, "passthrough">>>;
1203
+ playbook_regime: z.ZodString;
1204
+ rule_id: z.ZodString;
1205
+ verbatim_excerpt: z.ZodString;
1206
+ bundle_hash: z.ZodOptional<z.ZodString>;
1207
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1208
+ playbook_id: z.ZodString;
1209
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1210
+ category: z.ZodOptional<z.ZodString>;
1211
+ domain: z.ZodOptional<z.ZodString>;
1212
+ type: z.ZodOptional<z.ZodString>;
1213
+ subtype: z.ZodOptional<z.ZodString>;
1214
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1215
+ category: z.ZodOptional<z.ZodString>;
1216
+ domain: z.ZodOptional<z.ZodString>;
1217
+ type: z.ZodOptional<z.ZodString>;
1218
+ subtype: z.ZodOptional<z.ZodString>;
1219
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1220
+ category: z.ZodOptional<z.ZodString>;
1221
+ domain: z.ZodOptional<z.ZodString>;
1222
+ type: z.ZodOptional<z.ZodString>;
1223
+ subtype: z.ZodOptional<z.ZodString>;
1224
+ }, z.ZodTypeAny, "passthrough">>>;
1225
+ playbook_regime: z.ZodString;
1226
+ rule_id: z.ZodString;
1227
+ verbatim_excerpt: z.ZodString;
1228
+ bundle_hash: z.ZodOptional<z.ZodString>;
1229
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1230
+ playbook_id: z.ZodString;
1231
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1232
+ category: z.ZodOptional<z.ZodString>;
1233
+ domain: z.ZodOptional<z.ZodString>;
1234
+ type: z.ZodOptional<z.ZodString>;
1235
+ subtype: z.ZodOptional<z.ZodString>;
1236
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1237
+ category: z.ZodOptional<z.ZodString>;
1238
+ domain: z.ZodOptional<z.ZodString>;
1239
+ type: z.ZodOptional<z.ZodString>;
1240
+ subtype: z.ZodOptional<z.ZodString>;
1241
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1242
+ category: z.ZodOptional<z.ZodString>;
1243
+ domain: z.ZodOptional<z.ZodString>;
1244
+ type: z.ZodOptional<z.ZodString>;
1245
+ subtype: z.ZodOptional<z.ZodString>;
1246
+ }, z.ZodTypeAny, "passthrough">>>;
1247
+ playbook_regime: z.ZodString;
1248
+ rule_id: z.ZodString;
1249
+ verbatim_excerpt: z.ZodString;
1250
+ bundle_hash: z.ZodOptional<z.ZodString>;
1251
+ }, z.ZodTypeAny, "passthrough">>;
1252
+ reviewed_by: z.ZodOptional<z.ZodString>;
1253
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1254
+ /**
1255
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1256
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1257
+ * the template text was used verbatim. A plain string, not an enum — the
1258
+ * vocabulary is backend-owned and absent on most lanes.
1259
+ */
1260
+ text_provenance: z.ZodOptional<z.ZodString>;
1261
+ }, z.ZodTypeAny, "passthrough">>;
1262
+ grounding: z.ZodObject<{
1263
+ suggestion_id: z.ZodString;
1264
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1265
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1266
+ redline_user_id: z.ZodString;
1267
+ redline_timestamp: z.ZodString;
1268
+ rule_id: z.ZodString;
1269
+ playbook_id: z.ZodString;
1270
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1271
+ regime: z.ZodString;
1272
+ verbatim_excerpt: z.ZodString;
1273
+ v6_category: z.ZodString;
1274
+ v6_severity: z.ZodString;
1275
+ rationale: z.ZodString;
1276
+ kind: z.ZodString;
1277
+ text: z.ZodString;
1278
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1279
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1280
+ suggestion_id: z.ZodString;
1281
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1282
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1283
+ redline_user_id: z.ZodString;
1284
+ redline_timestamp: z.ZodString;
1285
+ rule_id: z.ZodString;
1286
+ playbook_id: z.ZodString;
1287
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1288
+ regime: z.ZodString;
1289
+ verbatim_excerpt: z.ZodString;
1290
+ v6_category: z.ZodString;
1291
+ v6_severity: z.ZodString;
1292
+ rationale: z.ZodString;
1293
+ kind: z.ZodString;
1294
+ text: z.ZodString;
1295
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1296
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1297
+ suggestion_id: z.ZodString;
1298
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1299
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1300
+ redline_user_id: z.ZodString;
1301
+ redline_timestamp: z.ZodString;
1302
+ rule_id: z.ZodString;
1303
+ playbook_id: z.ZodString;
1304
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1305
+ regime: z.ZodString;
1306
+ verbatim_excerpt: z.ZodString;
1307
+ v6_category: z.ZodString;
1308
+ v6_severity: z.ZodString;
1309
+ rationale: z.ZodString;
1310
+ kind: z.ZodString;
1311
+ text: z.ZodString;
1312
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1313
+ }, z.ZodTypeAny, "passthrough">>;
1314
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1315
+ suggestion: z.ZodObject<{
1316
+ id: z.ZodString;
1317
+ document_id: z.ZodString;
1318
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1319
+ position_path: z.ZodString;
1320
+ /**
1321
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1322
+ * this as insertion|deletion|replace, but that comment is stale —
1323
+ * `finding/finding.go` is authoritative and the grammar lane has always
1324
+ * emitted `"flag"` for findings that point at a span without proposing a
1325
+ * replacement.
1326
+ */
1327
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1328
+ text: z.ZodString;
1329
+ /** Absent on grammar findings, which have no acting reviewer. */
1330
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1331
+ rationale: z.ZodString;
1332
+ category: z.ZodString;
1333
+ severity: z.ZodString;
1334
+ state: z.ZodString;
1335
+ citation: z.ZodObject<{
1336
+ playbook_id: z.ZodString;
1337
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1338
+ category: z.ZodOptional<z.ZodString>;
1339
+ domain: z.ZodOptional<z.ZodString>;
1340
+ type: z.ZodOptional<z.ZodString>;
1341
+ subtype: z.ZodOptional<z.ZodString>;
1342
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1343
+ category: z.ZodOptional<z.ZodString>;
1344
+ domain: z.ZodOptional<z.ZodString>;
1345
+ type: z.ZodOptional<z.ZodString>;
1346
+ subtype: z.ZodOptional<z.ZodString>;
1347
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1348
+ category: z.ZodOptional<z.ZodString>;
1349
+ domain: z.ZodOptional<z.ZodString>;
1350
+ type: z.ZodOptional<z.ZodString>;
1351
+ subtype: z.ZodOptional<z.ZodString>;
1352
+ }, z.ZodTypeAny, "passthrough">>>;
1353
+ playbook_regime: z.ZodString;
1354
+ rule_id: z.ZodString;
1355
+ verbatim_excerpt: z.ZodString;
1356
+ bundle_hash: z.ZodOptional<z.ZodString>;
1357
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1358
+ playbook_id: z.ZodString;
1359
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1360
+ category: z.ZodOptional<z.ZodString>;
1361
+ domain: z.ZodOptional<z.ZodString>;
1362
+ type: z.ZodOptional<z.ZodString>;
1363
+ subtype: z.ZodOptional<z.ZodString>;
1364
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1365
+ category: z.ZodOptional<z.ZodString>;
1366
+ domain: z.ZodOptional<z.ZodString>;
1367
+ type: z.ZodOptional<z.ZodString>;
1368
+ subtype: z.ZodOptional<z.ZodString>;
1369
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1370
+ category: z.ZodOptional<z.ZodString>;
1371
+ domain: z.ZodOptional<z.ZodString>;
1372
+ type: z.ZodOptional<z.ZodString>;
1373
+ subtype: z.ZodOptional<z.ZodString>;
1374
+ }, z.ZodTypeAny, "passthrough">>>;
1375
+ playbook_regime: z.ZodString;
1376
+ rule_id: z.ZodString;
1377
+ verbatim_excerpt: z.ZodString;
1378
+ bundle_hash: z.ZodOptional<z.ZodString>;
1379
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1380
+ playbook_id: z.ZodString;
1381
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1382
+ category: z.ZodOptional<z.ZodString>;
1383
+ domain: z.ZodOptional<z.ZodString>;
1384
+ type: z.ZodOptional<z.ZodString>;
1385
+ subtype: z.ZodOptional<z.ZodString>;
1386
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1387
+ category: z.ZodOptional<z.ZodString>;
1388
+ domain: z.ZodOptional<z.ZodString>;
1389
+ type: z.ZodOptional<z.ZodString>;
1390
+ subtype: z.ZodOptional<z.ZodString>;
1391
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1392
+ category: z.ZodOptional<z.ZodString>;
1393
+ domain: z.ZodOptional<z.ZodString>;
1394
+ type: z.ZodOptional<z.ZodString>;
1395
+ subtype: z.ZodOptional<z.ZodString>;
1396
+ }, z.ZodTypeAny, "passthrough">>>;
1397
+ playbook_regime: z.ZodString;
1398
+ rule_id: z.ZodString;
1399
+ verbatim_excerpt: z.ZodString;
1400
+ bundle_hash: z.ZodOptional<z.ZodString>;
1401
+ }, z.ZodTypeAny, "passthrough">>;
1402
+ reviewed_by: z.ZodOptional<z.ZodString>;
1403
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1404
+ /**
1405
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1406
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1407
+ * the template text was used verbatim. A plain string, not an enum — the
1408
+ * vocabulary is backend-owned and absent on most lanes.
1409
+ */
1410
+ text_provenance: z.ZodOptional<z.ZodString>;
1411
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1412
+ id: z.ZodString;
1413
+ document_id: z.ZodString;
1414
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1415
+ position_path: z.ZodString;
1416
+ /**
1417
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1418
+ * this as insertion|deletion|replace, but that comment is stale —
1419
+ * `finding/finding.go` is authoritative and the grammar lane has always
1420
+ * emitted `"flag"` for findings that point at a span without proposing a
1421
+ * replacement.
1422
+ */
1423
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1424
+ text: z.ZodString;
1425
+ /** Absent on grammar findings, which have no acting reviewer. */
1426
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1427
+ rationale: z.ZodString;
1428
+ category: z.ZodString;
1429
+ severity: z.ZodString;
1430
+ state: z.ZodString;
1431
+ citation: z.ZodObject<{
1432
+ playbook_id: z.ZodString;
1433
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1434
+ category: z.ZodOptional<z.ZodString>;
1435
+ domain: z.ZodOptional<z.ZodString>;
1436
+ type: z.ZodOptional<z.ZodString>;
1437
+ subtype: z.ZodOptional<z.ZodString>;
1438
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1439
+ category: z.ZodOptional<z.ZodString>;
1440
+ domain: z.ZodOptional<z.ZodString>;
1441
+ type: z.ZodOptional<z.ZodString>;
1442
+ subtype: z.ZodOptional<z.ZodString>;
1443
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1444
+ category: z.ZodOptional<z.ZodString>;
1445
+ domain: z.ZodOptional<z.ZodString>;
1446
+ type: z.ZodOptional<z.ZodString>;
1447
+ subtype: z.ZodOptional<z.ZodString>;
1448
+ }, z.ZodTypeAny, "passthrough">>>;
1449
+ playbook_regime: z.ZodString;
1450
+ rule_id: z.ZodString;
1451
+ verbatim_excerpt: z.ZodString;
1452
+ bundle_hash: z.ZodOptional<z.ZodString>;
1453
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1454
+ playbook_id: z.ZodString;
1455
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1456
+ category: z.ZodOptional<z.ZodString>;
1457
+ domain: z.ZodOptional<z.ZodString>;
1458
+ type: z.ZodOptional<z.ZodString>;
1459
+ subtype: z.ZodOptional<z.ZodString>;
1460
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1461
+ category: z.ZodOptional<z.ZodString>;
1462
+ domain: z.ZodOptional<z.ZodString>;
1463
+ type: z.ZodOptional<z.ZodString>;
1464
+ subtype: z.ZodOptional<z.ZodString>;
1465
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1466
+ category: z.ZodOptional<z.ZodString>;
1467
+ domain: z.ZodOptional<z.ZodString>;
1468
+ type: z.ZodOptional<z.ZodString>;
1469
+ subtype: z.ZodOptional<z.ZodString>;
1470
+ }, z.ZodTypeAny, "passthrough">>>;
1471
+ playbook_regime: z.ZodString;
1472
+ rule_id: z.ZodString;
1473
+ verbatim_excerpt: z.ZodString;
1474
+ bundle_hash: z.ZodOptional<z.ZodString>;
1475
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1476
+ playbook_id: z.ZodString;
1477
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1478
+ category: z.ZodOptional<z.ZodString>;
1479
+ domain: z.ZodOptional<z.ZodString>;
1480
+ type: z.ZodOptional<z.ZodString>;
1481
+ subtype: z.ZodOptional<z.ZodString>;
1482
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1483
+ category: z.ZodOptional<z.ZodString>;
1484
+ domain: z.ZodOptional<z.ZodString>;
1485
+ type: z.ZodOptional<z.ZodString>;
1486
+ subtype: z.ZodOptional<z.ZodString>;
1487
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1488
+ category: z.ZodOptional<z.ZodString>;
1489
+ domain: z.ZodOptional<z.ZodString>;
1490
+ type: z.ZodOptional<z.ZodString>;
1491
+ subtype: z.ZodOptional<z.ZodString>;
1492
+ }, z.ZodTypeAny, "passthrough">>>;
1493
+ playbook_regime: z.ZodString;
1494
+ rule_id: z.ZodString;
1495
+ verbatim_excerpt: z.ZodString;
1496
+ bundle_hash: z.ZodOptional<z.ZodString>;
1497
+ }, z.ZodTypeAny, "passthrough">>;
1498
+ reviewed_by: z.ZodOptional<z.ZodString>;
1499
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1500
+ /**
1501
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1502
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1503
+ * the template text was used verbatim. A plain string, not an enum — the
1504
+ * vocabulary is backend-owned and absent on most lanes.
1505
+ */
1506
+ text_provenance: z.ZodOptional<z.ZodString>;
1507
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1508
+ id: z.ZodString;
1509
+ document_id: z.ZodString;
1510
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1511
+ position_path: z.ZodString;
1512
+ /**
1513
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1514
+ * this as insertion|deletion|replace, but that comment is stale —
1515
+ * `finding/finding.go` is authoritative and the grammar lane has always
1516
+ * emitted `"flag"` for findings that point at a span without proposing a
1517
+ * replacement.
1518
+ */
1519
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1520
+ text: z.ZodString;
1521
+ /** Absent on grammar findings, which have no acting reviewer. */
1522
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1523
+ rationale: z.ZodString;
1524
+ category: z.ZodString;
1525
+ severity: z.ZodString;
1526
+ state: z.ZodString;
1527
+ citation: z.ZodObject<{
1528
+ playbook_id: z.ZodString;
1529
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1530
+ category: z.ZodOptional<z.ZodString>;
1531
+ domain: z.ZodOptional<z.ZodString>;
1532
+ type: z.ZodOptional<z.ZodString>;
1533
+ subtype: z.ZodOptional<z.ZodString>;
1534
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1535
+ category: z.ZodOptional<z.ZodString>;
1536
+ domain: z.ZodOptional<z.ZodString>;
1537
+ type: z.ZodOptional<z.ZodString>;
1538
+ subtype: z.ZodOptional<z.ZodString>;
1539
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1540
+ category: z.ZodOptional<z.ZodString>;
1541
+ domain: z.ZodOptional<z.ZodString>;
1542
+ type: z.ZodOptional<z.ZodString>;
1543
+ subtype: z.ZodOptional<z.ZodString>;
1544
+ }, z.ZodTypeAny, "passthrough">>>;
1545
+ playbook_regime: z.ZodString;
1546
+ rule_id: z.ZodString;
1547
+ verbatim_excerpt: z.ZodString;
1548
+ bundle_hash: z.ZodOptional<z.ZodString>;
1549
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1550
+ playbook_id: z.ZodString;
1551
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1552
+ category: z.ZodOptional<z.ZodString>;
1553
+ domain: z.ZodOptional<z.ZodString>;
1554
+ type: z.ZodOptional<z.ZodString>;
1555
+ subtype: z.ZodOptional<z.ZodString>;
1556
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1557
+ category: z.ZodOptional<z.ZodString>;
1558
+ domain: z.ZodOptional<z.ZodString>;
1559
+ type: z.ZodOptional<z.ZodString>;
1560
+ subtype: z.ZodOptional<z.ZodString>;
1561
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1562
+ category: z.ZodOptional<z.ZodString>;
1563
+ domain: z.ZodOptional<z.ZodString>;
1564
+ type: z.ZodOptional<z.ZodString>;
1565
+ subtype: z.ZodOptional<z.ZodString>;
1566
+ }, z.ZodTypeAny, "passthrough">>>;
1567
+ playbook_regime: z.ZodString;
1568
+ rule_id: z.ZodString;
1569
+ verbatim_excerpt: z.ZodString;
1570
+ bundle_hash: z.ZodOptional<z.ZodString>;
1571
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1572
+ playbook_id: z.ZodString;
1573
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1574
+ category: z.ZodOptional<z.ZodString>;
1575
+ domain: z.ZodOptional<z.ZodString>;
1576
+ type: z.ZodOptional<z.ZodString>;
1577
+ subtype: z.ZodOptional<z.ZodString>;
1578
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1579
+ category: z.ZodOptional<z.ZodString>;
1580
+ domain: z.ZodOptional<z.ZodString>;
1581
+ type: z.ZodOptional<z.ZodString>;
1582
+ subtype: z.ZodOptional<z.ZodString>;
1583
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1584
+ category: z.ZodOptional<z.ZodString>;
1585
+ domain: z.ZodOptional<z.ZodString>;
1586
+ type: z.ZodOptional<z.ZodString>;
1587
+ subtype: z.ZodOptional<z.ZodString>;
1588
+ }, z.ZodTypeAny, "passthrough">>>;
1589
+ playbook_regime: z.ZodString;
1590
+ rule_id: z.ZodString;
1591
+ verbatim_excerpt: z.ZodString;
1592
+ bundle_hash: z.ZodOptional<z.ZodString>;
1593
+ }, z.ZodTypeAny, "passthrough">>;
1594
+ reviewed_by: z.ZodOptional<z.ZodString>;
1595
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1596
+ /**
1597
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1598
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1599
+ * the template text was used verbatim. A plain string, not an enum — the
1600
+ * vocabulary is backend-owned and absent on most lanes.
1601
+ */
1602
+ text_provenance: z.ZodOptional<z.ZodString>;
1603
+ }, z.ZodTypeAny, "passthrough">>;
1604
+ grounding: z.ZodObject<{
1605
+ suggestion_id: z.ZodString;
1606
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1607
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1608
+ redline_user_id: z.ZodString;
1609
+ redline_timestamp: z.ZodString;
1610
+ rule_id: z.ZodString;
1611
+ playbook_id: z.ZodString;
1612
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1613
+ regime: z.ZodString;
1614
+ verbatim_excerpt: z.ZodString;
1615
+ v6_category: z.ZodString;
1616
+ v6_severity: z.ZodString;
1617
+ rationale: z.ZodString;
1618
+ kind: z.ZodString;
1619
+ text: z.ZodString;
1620
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1621
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1622
+ suggestion_id: z.ZodString;
1623
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1624
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1625
+ redline_user_id: z.ZodString;
1626
+ redline_timestamp: z.ZodString;
1627
+ rule_id: z.ZodString;
1628
+ playbook_id: z.ZodString;
1629
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1630
+ regime: z.ZodString;
1631
+ verbatim_excerpt: z.ZodString;
1632
+ v6_category: z.ZodString;
1633
+ v6_severity: z.ZodString;
1634
+ rationale: z.ZodString;
1635
+ kind: z.ZodString;
1636
+ text: z.ZodString;
1637
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1638
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1639
+ suggestion_id: z.ZodString;
1640
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1641
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1642
+ redline_user_id: z.ZodString;
1643
+ redline_timestamp: z.ZodString;
1644
+ rule_id: z.ZodString;
1645
+ playbook_id: z.ZodString;
1646
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1647
+ regime: z.ZodString;
1648
+ verbatim_excerpt: z.ZodString;
1649
+ v6_category: z.ZodString;
1650
+ v6_severity: z.ZodString;
1651
+ rationale: z.ZodString;
1652
+ kind: z.ZodString;
1653
+ text: z.ZodString;
1654
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1655
+ }, z.ZodTypeAny, "passthrough">>;
1656
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1657
+ suggestion: z.ZodObject<{
1658
+ id: z.ZodString;
1659
+ document_id: z.ZodString;
1660
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1661
+ position_path: z.ZodString;
1662
+ /**
1663
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1664
+ * this as insertion|deletion|replace, but that comment is stale —
1665
+ * `finding/finding.go` is authoritative and the grammar lane has always
1666
+ * emitted `"flag"` for findings that point at a span without proposing a
1667
+ * replacement.
1668
+ */
1669
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1670
+ text: z.ZodString;
1671
+ /** Absent on grammar findings, which have no acting reviewer. */
1672
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1673
+ rationale: z.ZodString;
1674
+ category: z.ZodString;
1675
+ severity: z.ZodString;
1676
+ state: z.ZodString;
1677
+ citation: z.ZodObject<{
1678
+ playbook_id: z.ZodString;
1679
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1680
+ category: z.ZodOptional<z.ZodString>;
1681
+ domain: z.ZodOptional<z.ZodString>;
1682
+ type: z.ZodOptional<z.ZodString>;
1683
+ subtype: z.ZodOptional<z.ZodString>;
1684
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1685
+ category: z.ZodOptional<z.ZodString>;
1686
+ domain: z.ZodOptional<z.ZodString>;
1687
+ type: z.ZodOptional<z.ZodString>;
1688
+ subtype: z.ZodOptional<z.ZodString>;
1689
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1690
+ category: z.ZodOptional<z.ZodString>;
1691
+ domain: z.ZodOptional<z.ZodString>;
1692
+ type: z.ZodOptional<z.ZodString>;
1693
+ subtype: z.ZodOptional<z.ZodString>;
1694
+ }, z.ZodTypeAny, "passthrough">>>;
1695
+ playbook_regime: z.ZodString;
1696
+ rule_id: z.ZodString;
1697
+ verbatim_excerpt: z.ZodString;
1698
+ bundle_hash: z.ZodOptional<z.ZodString>;
1699
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1700
+ playbook_id: z.ZodString;
1701
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1702
+ category: z.ZodOptional<z.ZodString>;
1703
+ domain: z.ZodOptional<z.ZodString>;
1704
+ type: z.ZodOptional<z.ZodString>;
1705
+ subtype: z.ZodOptional<z.ZodString>;
1706
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1707
+ category: z.ZodOptional<z.ZodString>;
1708
+ domain: z.ZodOptional<z.ZodString>;
1709
+ type: z.ZodOptional<z.ZodString>;
1710
+ subtype: z.ZodOptional<z.ZodString>;
1711
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1712
+ category: z.ZodOptional<z.ZodString>;
1713
+ domain: z.ZodOptional<z.ZodString>;
1714
+ type: z.ZodOptional<z.ZodString>;
1715
+ subtype: z.ZodOptional<z.ZodString>;
1716
+ }, z.ZodTypeAny, "passthrough">>>;
1717
+ playbook_regime: z.ZodString;
1718
+ rule_id: z.ZodString;
1719
+ verbatim_excerpt: z.ZodString;
1720
+ bundle_hash: z.ZodOptional<z.ZodString>;
1721
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1722
+ playbook_id: z.ZodString;
1723
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1724
+ category: z.ZodOptional<z.ZodString>;
1725
+ domain: z.ZodOptional<z.ZodString>;
1726
+ type: z.ZodOptional<z.ZodString>;
1727
+ subtype: z.ZodOptional<z.ZodString>;
1728
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1729
+ category: z.ZodOptional<z.ZodString>;
1730
+ domain: z.ZodOptional<z.ZodString>;
1731
+ type: z.ZodOptional<z.ZodString>;
1732
+ subtype: z.ZodOptional<z.ZodString>;
1733
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1734
+ category: z.ZodOptional<z.ZodString>;
1735
+ domain: z.ZodOptional<z.ZodString>;
1736
+ type: z.ZodOptional<z.ZodString>;
1737
+ subtype: z.ZodOptional<z.ZodString>;
1738
+ }, z.ZodTypeAny, "passthrough">>>;
1739
+ playbook_regime: z.ZodString;
1740
+ rule_id: z.ZodString;
1741
+ verbatim_excerpt: z.ZodString;
1742
+ bundle_hash: z.ZodOptional<z.ZodString>;
1743
+ }, z.ZodTypeAny, "passthrough">>;
1744
+ reviewed_by: z.ZodOptional<z.ZodString>;
1745
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1746
+ /**
1747
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1748
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1749
+ * the template text was used verbatim. A plain string, not an enum — the
1750
+ * vocabulary is backend-owned and absent on most lanes.
1751
+ */
1752
+ text_provenance: z.ZodOptional<z.ZodString>;
1753
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1754
+ id: z.ZodString;
1755
+ document_id: z.ZodString;
1756
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1757
+ position_path: z.ZodString;
1758
+ /**
1759
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1760
+ * this as insertion|deletion|replace, but that comment is stale —
1761
+ * `finding/finding.go` is authoritative and the grammar lane has always
1762
+ * emitted `"flag"` for findings that point at a span without proposing a
1763
+ * replacement.
1764
+ */
1765
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1766
+ text: z.ZodString;
1767
+ /** Absent on grammar findings, which have no acting reviewer. */
1768
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1769
+ rationale: z.ZodString;
1770
+ category: z.ZodString;
1771
+ severity: z.ZodString;
1772
+ state: z.ZodString;
1773
+ citation: z.ZodObject<{
1774
+ playbook_id: z.ZodString;
1775
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1776
+ category: z.ZodOptional<z.ZodString>;
1777
+ domain: z.ZodOptional<z.ZodString>;
1778
+ type: z.ZodOptional<z.ZodString>;
1779
+ subtype: z.ZodOptional<z.ZodString>;
1780
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1781
+ category: z.ZodOptional<z.ZodString>;
1782
+ domain: z.ZodOptional<z.ZodString>;
1783
+ type: z.ZodOptional<z.ZodString>;
1784
+ subtype: z.ZodOptional<z.ZodString>;
1785
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1786
+ category: z.ZodOptional<z.ZodString>;
1787
+ domain: z.ZodOptional<z.ZodString>;
1788
+ type: z.ZodOptional<z.ZodString>;
1789
+ subtype: z.ZodOptional<z.ZodString>;
1790
+ }, z.ZodTypeAny, "passthrough">>>;
1791
+ playbook_regime: z.ZodString;
1792
+ rule_id: z.ZodString;
1793
+ verbatim_excerpt: z.ZodString;
1794
+ bundle_hash: z.ZodOptional<z.ZodString>;
1795
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1796
+ playbook_id: z.ZodString;
1797
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1798
+ category: z.ZodOptional<z.ZodString>;
1799
+ domain: z.ZodOptional<z.ZodString>;
1800
+ type: z.ZodOptional<z.ZodString>;
1801
+ subtype: z.ZodOptional<z.ZodString>;
1802
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1803
+ category: z.ZodOptional<z.ZodString>;
1804
+ domain: z.ZodOptional<z.ZodString>;
1805
+ type: z.ZodOptional<z.ZodString>;
1806
+ subtype: z.ZodOptional<z.ZodString>;
1807
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1808
+ category: z.ZodOptional<z.ZodString>;
1809
+ domain: z.ZodOptional<z.ZodString>;
1810
+ type: z.ZodOptional<z.ZodString>;
1811
+ subtype: z.ZodOptional<z.ZodString>;
1812
+ }, z.ZodTypeAny, "passthrough">>>;
1813
+ playbook_regime: z.ZodString;
1814
+ rule_id: z.ZodString;
1815
+ verbatim_excerpt: z.ZodString;
1816
+ bundle_hash: z.ZodOptional<z.ZodString>;
1817
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1818
+ playbook_id: z.ZodString;
1819
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1820
+ category: z.ZodOptional<z.ZodString>;
1821
+ domain: z.ZodOptional<z.ZodString>;
1822
+ type: z.ZodOptional<z.ZodString>;
1823
+ subtype: z.ZodOptional<z.ZodString>;
1824
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1825
+ category: z.ZodOptional<z.ZodString>;
1826
+ domain: z.ZodOptional<z.ZodString>;
1827
+ type: z.ZodOptional<z.ZodString>;
1828
+ subtype: z.ZodOptional<z.ZodString>;
1829
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1830
+ category: z.ZodOptional<z.ZodString>;
1831
+ domain: z.ZodOptional<z.ZodString>;
1832
+ type: z.ZodOptional<z.ZodString>;
1833
+ subtype: z.ZodOptional<z.ZodString>;
1834
+ }, z.ZodTypeAny, "passthrough">>>;
1835
+ playbook_regime: z.ZodString;
1836
+ rule_id: z.ZodString;
1837
+ verbatim_excerpt: z.ZodString;
1838
+ bundle_hash: z.ZodOptional<z.ZodString>;
1839
+ }, z.ZodTypeAny, "passthrough">>;
1840
+ reviewed_by: z.ZodOptional<z.ZodString>;
1841
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1842
+ /**
1843
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1844
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1845
+ * the template text was used verbatim. A plain string, not an enum — the
1846
+ * vocabulary is backend-owned and absent on most lanes.
1847
+ */
1848
+ text_provenance: z.ZodOptional<z.ZodString>;
1849
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1850
+ id: z.ZodString;
1851
+ document_id: z.ZodString;
1852
+ /** e.g. "[12,0]" or "12,0" — a STRING, not an array. */
1853
+ position_path: z.ZodString;
1854
+ /**
1855
+ * Four values, not three (FE_GRAMMAR_R2 §8.3): `v6/types.go` annotates
1856
+ * this as insertion|deletion|replace, but that comment is stale —
1857
+ * `finding/finding.go` is authoritative and the grammar lane has always
1858
+ * emitted `"flag"` for findings that point at a span without proposing a
1859
+ * replacement.
1860
+ */
1861
+ kind: z.ZodEnum<["insertion", "deletion", "replace", "flag"]>;
1862
+ text: z.ZodString;
1863
+ /** Absent on grammar findings, which have no acting reviewer. */
1864
+ author: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1865
+ rationale: z.ZodString;
1866
+ category: z.ZodString;
1867
+ severity: z.ZodString;
1868
+ state: z.ZodString;
1869
+ citation: z.ZodObject<{
1870
+ playbook_id: z.ZodString;
1871
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1872
+ category: z.ZodOptional<z.ZodString>;
1873
+ domain: z.ZodOptional<z.ZodString>;
1874
+ type: z.ZodOptional<z.ZodString>;
1875
+ subtype: z.ZodOptional<z.ZodString>;
1876
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1877
+ category: z.ZodOptional<z.ZodString>;
1878
+ domain: z.ZodOptional<z.ZodString>;
1879
+ type: z.ZodOptional<z.ZodString>;
1880
+ subtype: z.ZodOptional<z.ZodString>;
1881
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1882
+ category: z.ZodOptional<z.ZodString>;
1883
+ domain: z.ZodOptional<z.ZodString>;
1884
+ type: z.ZodOptional<z.ZodString>;
1885
+ subtype: z.ZodOptional<z.ZodString>;
1886
+ }, z.ZodTypeAny, "passthrough">>>;
1887
+ playbook_regime: z.ZodString;
1888
+ rule_id: z.ZodString;
1889
+ verbatim_excerpt: z.ZodString;
1890
+ bundle_hash: z.ZodOptional<z.ZodString>;
1891
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1892
+ playbook_id: z.ZodString;
1893
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1894
+ category: z.ZodOptional<z.ZodString>;
1895
+ domain: z.ZodOptional<z.ZodString>;
1896
+ type: z.ZodOptional<z.ZodString>;
1897
+ subtype: z.ZodOptional<z.ZodString>;
1898
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1899
+ category: z.ZodOptional<z.ZodString>;
1900
+ domain: z.ZodOptional<z.ZodString>;
1901
+ type: z.ZodOptional<z.ZodString>;
1902
+ subtype: z.ZodOptional<z.ZodString>;
1903
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1904
+ category: z.ZodOptional<z.ZodString>;
1905
+ domain: z.ZodOptional<z.ZodString>;
1906
+ type: z.ZodOptional<z.ZodString>;
1907
+ subtype: z.ZodOptional<z.ZodString>;
1908
+ }, z.ZodTypeAny, "passthrough">>>;
1909
+ playbook_regime: z.ZodString;
1910
+ rule_id: z.ZodString;
1911
+ verbatim_excerpt: z.ZodString;
1912
+ bundle_hash: z.ZodOptional<z.ZodString>;
1913
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1914
+ playbook_id: z.ZodString;
1915
+ playbook_scope: z.ZodOptional<z.ZodObject<{
1916
+ category: z.ZodOptional<z.ZodString>;
1917
+ domain: z.ZodOptional<z.ZodString>;
1918
+ type: z.ZodOptional<z.ZodString>;
1919
+ subtype: z.ZodOptional<z.ZodString>;
1920
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1921
+ category: z.ZodOptional<z.ZodString>;
1922
+ domain: z.ZodOptional<z.ZodString>;
1923
+ type: z.ZodOptional<z.ZodString>;
1924
+ subtype: z.ZodOptional<z.ZodString>;
1925
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1926
+ category: z.ZodOptional<z.ZodString>;
1927
+ domain: z.ZodOptional<z.ZodString>;
1928
+ type: z.ZodOptional<z.ZodString>;
1929
+ subtype: z.ZodOptional<z.ZodString>;
1930
+ }, z.ZodTypeAny, "passthrough">>>;
1931
+ playbook_regime: z.ZodString;
1932
+ rule_id: z.ZodString;
1933
+ verbatim_excerpt: z.ZodString;
1934
+ bundle_hash: z.ZodOptional<z.ZodString>;
1935
+ }, z.ZodTypeAny, "passthrough">>;
1936
+ reviewed_by: z.ZodOptional<z.ZodString>;
1937
+ reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1938
+ /**
1939
+ * How the suggestion's text was produced (playbook-restructure Phase 8):
1940
+ * "drafted" when the LLM drafting step succeeded, "template_fallback" when
1941
+ * the template text was used verbatim. A plain string, not an enum — the
1942
+ * vocabulary is backend-owned and absent on most lanes.
1943
+ */
1944
+ text_provenance: z.ZodOptional<z.ZodString>;
1945
+ }, z.ZodTypeAny, "passthrough">>;
1946
+ grounding: z.ZodObject<{
1947
+ suggestion_id: z.ZodString;
1948
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1949
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1950
+ redline_user_id: z.ZodString;
1951
+ redline_timestamp: z.ZodString;
1952
+ rule_id: z.ZodString;
1953
+ playbook_id: z.ZodString;
1954
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1955
+ regime: z.ZodString;
1956
+ verbatim_excerpt: z.ZodString;
1957
+ v6_category: z.ZodString;
1958
+ v6_severity: z.ZodString;
1959
+ rationale: z.ZodString;
1960
+ kind: z.ZodString;
1961
+ text: z.ZodString;
1962
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1963
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1964
+ suggestion_id: z.ZodString;
1965
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1966
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1967
+ redline_user_id: z.ZodString;
1968
+ redline_timestamp: z.ZodString;
1969
+ rule_id: z.ZodString;
1970
+ playbook_id: z.ZodString;
1971
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1972
+ regime: z.ZodString;
1973
+ verbatim_excerpt: z.ZodString;
1974
+ v6_category: z.ZodString;
1975
+ v6_severity: z.ZodString;
1976
+ rationale: z.ZodString;
1977
+ kind: z.ZodString;
1978
+ text: z.ZodString;
1979
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1980
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1981
+ suggestion_id: z.ZodString;
1982
+ /** e.g. [12,0] — an ARRAY, same address as position_path, different encoding. */
1983
+ node_path: z.ZodArray<z.ZodNumber, "many">;
1984
+ redline_user_id: z.ZodString;
1985
+ redline_timestamp: z.ZodString;
1986
+ rule_id: z.ZodString;
1987
+ playbook_id: z.ZodString;
1988
+ playbook_scope: z.ZodRecord<z.ZodString, z.ZodString>;
1989
+ regime: z.ZodString;
1990
+ verbatim_excerpt: z.ZodString;
1991
+ v6_category: z.ZodString;
1992
+ v6_severity: z.ZodString;
1993
+ rationale: z.ZodString;
1994
+ kind: z.ZodString;
1995
+ text: z.ZodString;
1996
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1997
+ }, z.ZodTypeAny, "passthrough">>;
1998
+ }, z.ZodTypeAny, "passthrough">>;
1999
+ declare const findingEventDataSchema: z.ZodObject<{
2000
+ id: z.ZodString;
2001
+ /**
2002
+ * The rule this finding was produced by, when one exists. The rulecheck
2003
+ * lane's clause-presence flags carry their `baseline:gov:*` rule id here —
2004
+ * it is the join key to the sibling `rulebook_insertion` (whose
2005
+ * `citation.rule_id` carries the same value) and resolves on
2006
+ * `GET /v1/rules/{id}` (US-B5). Absent for lanes without a backing rule.
2007
+ */
2008
+ rule_id: z.ZodOptional<z.ZodString>;
2009
+ document_id: z.ZodString;
2010
+ position_path: z.ZodString;
2011
+ kind: z.ZodEnum<["replace", "insertion", "deletion", "flag"]>;
2012
+ text: z.ZodString;
2013
+ rationale: z.ZodString;
2014
+ category: z.ZodString;
2015
+ severity: z.ZodString;
2016
+ type: z.ZodString;
2017
+ source: z.ZodString;
2018
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2019
+ id: z.ZodString;
2020
+ /**
2021
+ * The rule this finding was produced by, when one exists. The rulecheck
2022
+ * lane's clause-presence flags carry their `baseline:gov:*` rule id here —
2023
+ * it is the join key to the sibling `rulebook_insertion` (whose
2024
+ * `citation.rule_id` carries the same value) and resolves on
2025
+ * `GET /v1/rules/{id}` (US-B5). Absent for lanes without a backing rule.
2026
+ */
2027
+ rule_id: z.ZodOptional<z.ZodString>;
2028
+ document_id: z.ZodString;
2029
+ position_path: z.ZodString;
2030
+ kind: z.ZodEnum<["replace", "insertion", "deletion", "flag"]>;
2031
+ text: z.ZodString;
2032
+ rationale: z.ZodString;
2033
+ category: z.ZodString;
2034
+ severity: z.ZodString;
2035
+ type: z.ZodString;
2036
+ source: z.ZodString;
2037
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2038
+ id: z.ZodString;
2039
+ /**
2040
+ * The rule this finding was produced by, when one exists. The rulecheck
2041
+ * lane's clause-presence flags carry their `baseline:gov:*` rule id here —
2042
+ * it is the join key to the sibling `rulebook_insertion` (whose
2043
+ * `citation.rule_id` carries the same value) and resolves on
2044
+ * `GET /v1/rules/{id}` (US-B5). Absent for lanes without a backing rule.
2045
+ */
2046
+ rule_id: z.ZodOptional<z.ZodString>;
2047
+ document_id: z.ZodString;
2048
+ position_path: z.ZodString;
2049
+ kind: z.ZodEnum<["replace", "insertion", "deletion", "flag"]>;
2050
+ text: z.ZodString;
2051
+ rationale: z.ZodString;
2052
+ category: z.ZodString;
2053
+ severity: z.ZodString;
2054
+ type: z.ZodString;
2055
+ source: z.ZodString;
2056
+ }, z.ZodTypeAny, "passthrough">>;
2057
+ declare const clauseStartEventDataSchema: z.ZodObject<{
2058
+ index: z.ZodNumber;
2059
+ heading: z.ZodString;
2060
+ cdts: z.ZodObject<{
2061
+ category: z.ZodOptional<z.ZodString>;
2062
+ domain: z.ZodOptional<z.ZodString>;
2063
+ type: z.ZodOptional<z.ZodString>;
2064
+ subtype: z.ZodOptional<z.ZodString>;
2065
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2066
+ category: z.ZodOptional<z.ZodString>;
2067
+ domain: z.ZodOptional<z.ZodString>;
2068
+ type: z.ZodOptional<z.ZodString>;
2069
+ subtype: z.ZodOptional<z.ZodString>;
2070
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2071
+ category: z.ZodOptional<z.ZodString>;
2072
+ domain: z.ZodOptional<z.ZodString>;
2073
+ type: z.ZodOptional<z.ZodString>;
2074
+ subtype: z.ZodOptional<z.ZodString>;
2075
+ }, z.ZodTypeAny, "passthrough">>;
2076
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2077
+ index: z.ZodNumber;
2078
+ heading: z.ZodString;
2079
+ cdts: z.ZodObject<{
2080
+ category: z.ZodOptional<z.ZodString>;
2081
+ domain: z.ZodOptional<z.ZodString>;
2082
+ type: z.ZodOptional<z.ZodString>;
2083
+ subtype: z.ZodOptional<z.ZodString>;
2084
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2085
+ category: z.ZodOptional<z.ZodString>;
2086
+ domain: z.ZodOptional<z.ZodString>;
2087
+ type: z.ZodOptional<z.ZodString>;
2088
+ subtype: z.ZodOptional<z.ZodString>;
2089
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2090
+ category: z.ZodOptional<z.ZodString>;
2091
+ domain: z.ZodOptional<z.ZodString>;
2092
+ type: z.ZodOptional<z.ZodString>;
2093
+ subtype: z.ZodOptional<z.ZodString>;
2094
+ }, z.ZodTypeAny, "passthrough">>;
2095
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2096
+ index: z.ZodNumber;
2097
+ heading: z.ZodString;
2098
+ cdts: z.ZodObject<{
2099
+ category: z.ZodOptional<z.ZodString>;
2100
+ domain: z.ZodOptional<z.ZodString>;
2101
+ type: z.ZodOptional<z.ZodString>;
2102
+ subtype: z.ZodOptional<z.ZodString>;
2103
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2104
+ category: z.ZodOptional<z.ZodString>;
2105
+ domain: z.ZodOptional<z.ZodString>;
2106
+ type: z.ZodOptional<z.ZodString>;
2107
+ subtype: z.ZodOptional<z.ZodString>;
2108
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2109
+ category: z.ZodOptional<z.ZodString>;
2110
+ domain: z.ZodOptional<z.ZodString>;
2111
+ type: z.ZodOptional<z.ZodString>;
2112
+ subtype: z.ZodOptional<z.ZodString>;
2113
+ }, z.ZodTypeAny, "passthrough">>;
2114
+ }, z.ZodTypeAny, "passthrough">>;
2115
+ declare const errorEventDataSchema: z.ZodObject<{
2116
+ error: z.ZodString;
2117
+ clause: z.ZodOptional<z.ZodNumber>;
2118
+ lane: z.ZodOptional<z.ZodString>;
2119
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2120
+ error: z.ZodString;
2121
+ clause: z.ZodOptional<z.ZodNumber>;
2122
+ lane: z.ZodOptional<z.ZodString>;
2123
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2124
+ error: z.ZodString;
2125
+ clause: z.ZodOptional<z.ZodNumber>;
2126
+ lane: z.ZodOptional<z.ZodString>;
2127
+ }, z.ZodTypeAny, "passthrough">>;
2128
+ /**
2129
+ * D4 collision on a prime-linked review: a derived rule was displaced by a
2130
+ * regulatory one. Emitted once per distinct rule id per review (§2.B).
2131
+ */
2132
+ declare const supersededEventDataSchema: z.ZodObject<{
2133
+ rule_id: z.ZodString;
2134
+ playbook_id: z.ZodOptional<z.ZodString>;
2135
+ winner_rule_id: z.ZodOptional<z.ZodString>;
2136
+ reason: z.ZodOptional<z.ZodString>;
2137
+ authority: z.ZodOptional<z.ZodString>;
2138
+ source: z.ZodOptional<z.ZodString>;
2139
+ prime_contract_id: z.ZodOptional<z.ZodString>;
2140
+ prime_section_ref: z.ZodOptional<z.ZodString>;
2141
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2142
+ rule_id: z.ZodString;
2143
+ playbook_id: z.ZodOptional<z.ZodString>;
2144
+ winner_rule_id: z.ZodOptional<z.ZodString>;
2145
+ reason: z.ZodOptional<z.ZodString>;
2146
+ authority: z.ZodOptional<z.ZodString>;
2147
+ source: z.ZodOptional<z.ZodString>;
2148
+ prime_contract_id: z.ZodOptional<z.ZodString>;
2149
+ prime_section_ref: z.ZodOptional<z.ZodString>;
2150
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2151
+ rule_id: z.ZodString;
2152
+ playbook_id: z.ZodOptional<z.ZodString>;
2153
+ winner_rule_id: z.ZodOptional<z.ZodString>;
2154
+ reason: z.ZodOptional<z.ZodString>;
2155
+ authority: z.ZodOptional<z.ZodString>;
2156
+ source: z.ZodOptional<z.ZodString>;
2157
+ prime_contract_id: z.ZodOptional<z.ZodString>;
2158
+ prime_section_ref: z.ZodOptional<z.ZodString>;
2159
+ }, z.ZodTypeAny, "passthrough">>;
2160
+ /** A clause's LLM loop hit MaxTurns — its output is likely incomplete. */
2161
+ declare const clauseTruncatedEventDataSchema: z.ZodObject<{
2162
+ index: z.ZodNumber;
2163
+ turns: z.ZodOptional<z.ZodNumber>;
2164
+ max_turns: z.ZodOptional<z.ZodNumber>;
2165
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2166
+ index: z.ZodNumber;
2167
+ turns: z.ZodOptional<z.ZodNumber>;
2168
+ max_turns: z.ZodOptional<z.ZodNumber>;
2169
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2170
+ index: z.ZodNumber;
2171
+ turns: z.ZodOptional<z.ZodNumber>;
2172
+ max_turns: z.ZodOptional<z.ZodNumber>;
2173
+ }, z.ZodTypeAny, "passthrough">>;
2174
+ /** Clause coverage. Emitted at most once per review. */
2175
+ declare const uncoveredEventDataSchema: z.ZodObject<{
2176
+ clauses_total: z.ZodNumber;
2177
+ covered: z.ZodNumber;
2178
+ uncovered: z.ZodArray<z.ZodObject<{
2179
+ clause_index: z.ZodNumber;
2180
+ position_path: z.ZodString;
2181
+ heading: z.ZodOptional<z.ZodString>;
2182
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2183
+ clause_index: z.ZodNumber;
2184
+ position_path: z.ZodString;
2185
+ heading: z.ZodOptional<z.ZodString>;
2186
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2187
+ clause_index: z.ZodNumber;
2188
+ position_path: z.ZodString;
2189
+ heading: z.ZodOptional<z.ZodString>;
2190
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2191
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2192
+ clauses_total: z.ZodNumber;
2193
+ covered: z.ZodNumber;
2194
+ uncovered: z.ZodArray<z.ZodObject<{
2195
+ clause_index: z.ZodNumber;
2196
+ position_path: z.ZodString;
2197
+ heading: z.ZodOptional<z.ZodString>;
2198
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2199
+ clause_index: z.ZodNumber;
2200
+ position_path: z.ZodString;
2201
+ heading: z.ZodOptional<z.ZodString>;
2202
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2203
+ clause_index: z.ZodNumber;
2204
+ position_path: z.ZodString;
2205
+ heading: z.ZodOptional<z.ZodString>;
2206
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2207
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2208
+ clauses_total: z.ZodNumber;
2209
+ covered: z.ZodNumber;
2210
+ uncovered: z.ZodArray<z.ZodObject<{
2211
+ clause_index: z.ZodNumber;
2212
+ position_path: z.ZodString;
2213
+ heading: z.ZodOptional<z.ZodString>;
2214
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2215
+ clause_index: z.ZodNumber;
2216
+ position_path: z.ZodString;
2217
+ heading: z.ZodOptional<z.ZodString>;
2218
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2219
+ clause_index: z.ZodNumber;
2220
+ position_path: z.ZodString;
2221
+ heading: z.ZodOptional<z.ZodString>;
2222
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2223
+ }, z.ZodTypeAny, "passthrough">>;
2224
+ /** Bare top-level array on the wire, not an object — schema accordingly. */
2225
+ declare const ruleFatigueEventDataSchema: z.ZodArray<z.ZodObject<{
2226
+ rule_id: z.ZodString;
2227
+ rejections: z.ZodNumber;
2228
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2229
+ rule_id: z.ZodString;
2230
+ rejections: z.ZodNumber;
2231
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2232
+ rule_id: z.ZodString;
2233
+ rejections: z.ZodNumber;
2234
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2235
+ /**
2236
+ * `event: scope_warning` — the review's scope collapsed (e2e-verdict-fixes
2237
+ * wire contract): FAR/DFARS indicia without the gov regime, low playbook /
2238
+ * classification coverage, or an empty rulebook. `reason` is one of
2239
+ * "gov_indicia_without_gov_regime" | "low_scope_coverage" | "empty_rulebook"
2240
+ * (kept a plain string for forward tolerance); every other field is optional
2241
+ * — absent when not applicable. At most one event per reason.
2242
+ */
2243
+ declare const scopeWarningEventDataSchema: z.ZodObject<{
2244
+ reason: z.ZodString;
2245
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2246
+ detected: z.ZodOptional<z.ZodObject<{
2247
+ far_refs: z.ZodOptional<z.ZodNumber>;
2248
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2249
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2250
+ far_refs: z.ZodOptional<z.ZodNumber>;
2251
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2252
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2253
+ far_refs: z.ZodOptional<z.ZodNumber>;
2254
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2255
+ }, z.ZodTypeAny, "passthrough">>>;
2256
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2257
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2258
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2259
+ reason: z.ZodString;
2260
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2261
+ detected: z.ZodOptional<z.ZodObject<{
2262
+ far_refs: z.ZodOptional<z.ZodNumber>;
2263
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2264
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2265
+ far_refs: z.ZodOptional<z.ZodNumber>;
2266
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2267
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2268
+ far_refs: z.ZodOptional<z.ZodNumber>;
2269
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2270
+ }, z.ZodTypeAny, "passthrough">>>;
2271
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2272
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2273
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2274
+ reason: z.ZodString;
2275
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2276
+ detected: z.ZodOptional<z.ZodObject<{
2277
+ far_refs: z.ZodOptional<z.ZodNumber>;
2278
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2279
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2280
+ far_refs: z.ZodOptional<z.ZodNumber>;
2281
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2282
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2283
+ far_refs: z.ZodOptional<z.ZodNumber>;
2284
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2285
+ }, z.ZodTypeAny, "passthrough">>>;
2286
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2287
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2288
+ }, z.ZodTypeAny, "passthrough">>;
2289
+ /**
2290
+ * Run summary. The doc marks tier1..3 "always (may be null/empty)", so they
2291
+ * are nullish-with-default rather than required — a null tier list must not
2292
+ * fail the whole frame. Counters the doc marks "always" stay required.
2293
+ */
2294
+ declare const summaryEventDataSchema: z.ZodObject<{
2295
+ review_id: z.ZodOptional<z.ZodString>;
2296
+ tier1: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2297
+ tier2: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2298
+ tier3: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2299
+ redlines: z.ZodNumber;
2300
+ findings: z.ZodNumber;
2301
+ dropped: z.ZodNumber;
2302
+ clause_errors: z.ZodNumber;
2303
+ truncated_clauses: z.ZodOptional<z.ZodNumber>;
2304
+ grammar_suggestions: z.ZodNumber;
2305
+ rulebook_findings: z.ZodNumber;
2306
+ irregularity_findings: z.ZodNumber;
2307
+ rulebook_insertions: z.ZodOptional<z.ZodNumber>;
2308
+ panel_suggestions: z.ZodOptional<z.ZodNumber>;
2309
+ chronology_findings: z.ZodOptional<z.ZodNumber>;
2310
+ lanes_degraded: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2311
+ govcon_findings: z.ZodOptional<z.ZodNumber>;
2312
+ superseded: z.ZodOptional<z.ZodNumber>;
2313
+ strictness: z.ZodOptional<z.ZodString>;
2314
+ severity_mix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2315
+ finding_provenance: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2316
+ escalations: z.ZodOptional<z.ZodNumber>;
2317
+ panel_escalations: z.ZodOptional<z.ZodNumber>;
2318
+ escalations_total: z.ZodOptional<z.ZodNumber>;
2319
+ scope_warnings: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2320
+ reason: z.ZodString;
2321
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2322
+ detected: z.ZodOptional<z.ZodObject<{
2323
+ far_refs: z.ZodOptional<z.ZodNumber>;
2324
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2325
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2326
+ far_refs: z.ZodOptional<z.ZodNumber>;
2327
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2328
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2329
+ far_refs: z.ZodOptional<z.ZodNumber>;
2330
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2331
+ }, z.ZodTypeAny, "passthrough">>>;
2332
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2333
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2334
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2335
+ reason: z.ZodString;
2336
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2337
+ detected: z.ZodOptional<z.ZodObject<{
2338
+ far_refs: z.ZodOptional<z.ZodNumber>;
2339
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2340
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2341
+ far_refs: z.ZodOptional<z.ZodNumber>;
2342
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2343
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2344
+ far_refs: z.ZodOptional<z.ZodNumber>;
2345
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2346
+ }, z.ZodTypeAny, "passthrough">>>;
2347
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2348
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2349
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2350
+ reason: z.ZodString;
2351
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2352
+ detected: z.ZodOptional<z.ZodObject<{
2353
+ far_refs: z.ZodOptional<z.ZodNumber>;
2354
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2355
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2356
+ far_refs: z.ZodOptional<z.ZodNumber>;
2357
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2358
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2359
+ far_refs: z.ZodOptional<z.ZodNumber>;
2360
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2361
+ }, z.ZodTypeAny, "passthrough">>>;
2362
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2363
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2364
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
2365
+ suppressed: z.ZodOptional<z.ZodNumber>;
2366
+ suppressed_note: z.ZodOptional<z.ZodString>;
2367
+ missing_flowdowns: z.ZodOptional<z.ZodNumber>;
2368
+ fallback_accepted: z.ZodOptional<z.ZodNumber>;
2369
+ disabled_rule_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2370
+ /** Echo of the request's per-run playbook exclusions (workspace-controls §2). */
2371
+ disabled_playbook_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2372
+ rule_allowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2373
+ coverage: z.ZodOptional<z.ZodObject<{
2374
+ clauses_total: z.ZodNumber;
2375
+ covered: z.ZodNumber;
2376
+ uncovered: z.ZodArray<z.ZodObject<{
2377
+ clause_index: z.ZodNumber;
2378
+ position_path: z.ZodString;
2379
+ heading: z.ZodOptional<z.ZodString>;
2380
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2381
+ clause_index: z.ZodNumber;
2382
+ position_path: z.ZodString;
2383
+ heading: z.ZodOptional<z.ZodString>;
2384
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2385
+ clause_index: z.ZodNumber;
2386
+ position_path: z.ZodString;
2387
+ heading: z.ZodOptional<z.ZodString>;
2388
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2389
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2390
+ clauses_total: z.ZodNumber;
2391
+ covered: z.ZodNumber;
2392
+ uncovered: z.ZodArray<z.ZodObject<{
2393
+ clause_index: z.ZodNumber;
2394
+ position_path: z.ZodString;
2395
+ heading: z.ZodOptional<z.ZodString>;
2396
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2397
+ clause_index: z.ZodNumber;
2398
+ position_path: z.ZodString;
2399
+ heading: z.ZodOptional<z.ZodString>;
2400
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2401
+ clause_index: z.ZodNumber;
2402
+ position_path: z.ZodString;
2403
+ heading: z.ZodOptional<z.ZodString>;
2404
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2405
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2406
+ clauses_total: z.ZodNumber;
2407
+ covered: z.ZodNumber;
2408
+ uncovered: z.ZodArray<z.ZodObject<{
2409
+ clause_index: z.ZodNumber;
2410
+ position_path: z.ZodString;
2411
+ heading: z.ZodOptional<z.ZodString>;
2412
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2413
+ clause_index: z.ZodNumber;
2414
+ position_path: z.ZodString;
2415
+ heading: z.ZodOptional<z.ZodString>;
2416
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2417
+ clause_index: z.ZodNumber;
2418
+ position_path: z.ZodString;
2419
+ heading: z.ZodOptional<z.ZodString>;
2420
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2421
+ }, z.ZodTypeAny, "passthrough">>>;
2422
+ rule_fatigue: z.ZodOptional<z.ZodArray<z.ZodObject<{
2423
+ rule_id: z.ZodString;
2424
+ rejections: z.ZodNumber;
2425
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2426
+ rule_id: z.ZodString;
2427
+ rejections: z.ZodNumber;
2428
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2429
+ rule_id: z.ZodString;
2430
+ rejections: z.ZodNumber;
2431
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2432
+ would_fire: z.ZodOptional<z.ZodNumber>;
2433
+ provenance: z.ZodOptional<z.ZodObject<{
2434
+ model: z.ZodOptional<z.ZodString>;
2435
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2436
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2437
+ playbook_id: z.ZodString;
2438
+ version: z.ZodOptional<z.ZodNumber>;
2439
+ bundle_hash: z.ZodOptional<z.ZodString>;
2440
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2441
+ playbook_id: z.ZodString;
2442
+ version: z.ZodOptional<z.ZodNumber>;
2443
+ bundle_hash: z.ZodOptional<z.ZodString>;
2444
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2445
+ playbook_id: z.ZodString;
2446
+ version: z.ZodOptional<z.ZodNumber>;
2447
+ bundle_hash: z.ZodOptional<z.ZodString>;
2448
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2449
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2450
+ model: z.ZodOptional<z.ZodString>;
2451
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2452
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2453
+ playbook_id: z.ZodString;
2454
+ version: z.ZodOptional<z.ZodNumber>;
2455
+ bundle_hash: z.ZodOptional<z.ZodString>;
2456
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2457
+ playbook_id: z.ZodString;
2458
+ version: z.ZodOptional<z.ZodNumber>;
2459
+ bundle_hash: z.ZodOptional<z.ZodString>;
2460
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2461
+ playbook_id: z.ZodString;
2462
+ version: z.ZodOptional<z.ZodNumber>;
2463
+ bundle_hash: z.ZodOptional<z.ZodString>;
2464
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2465
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2466
+ model: z.ZodOptional<z.ZodString>;
2467
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2468
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2469
+ playbook_id: z.ZodString;
2470
+ version: z.ZodOptional<z.ZodNumber>;
2471
+ bundle_hash: z.ZodOptional<z.ZodString>;
2472
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2473
+ playbook_id: z.ZodString;
2474
+ version: z.ZodOptional<z.ZodNumber>;
2475
+ bundle_hash: z.ZodOptional<z.ZodString>;
2476
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2477
+ playbook_id: z.ZodString;
2478
+ version: z.ZodOptional<z.ZodNumber>;
2479
+ bundle_hash: z.ZodOptional<z.ZodString>;
2480
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2481
+ }, z.ZodTypeAny, "passthrough">>>;
2482
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2483
+ review_id: z.ZodOptional<z.ZodString>;
2484
+ tier1: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2485
+ tier2: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2486
+ tier3: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2487
+ redlines: z.ZodNumber;
2488
+ findings: z.ZodNumber;
2489
+ dropped: z.ZodNumber;
2490
+ clause_errors: z.ZodNumber;
2491
+ truncated_clauses: z.ZodOptional<z.ZodNumber>;
2492
+ grammar_suggestions: z.ZodNumber;
2493
+ rulebook_findings: z.ZodNumber;
2494
+ irregularity_findings: z.ZodNumber;
2495
+ rulebook_insertions: z.ZodOptional<z.ZodNumber>;
2496
+ panel_suggestions: z.ZodOptional<z.ZodNumber>;
2497
+ chronology_findings: z.ZodOptional<z.ZodNumber>;
2498
+ lanes_degraded: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2499
+ govcon_findings: z.ZodOptional<z.ZodNumber>;
2500
+ superseded: z.ZodOptional<z.ZodNumber>;
2501
+ strictness: z.ZodOptional<z.ZodString>;
2502
+ severity_mix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2503
+ finding_provenance: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2504
+ escalations: z.ZodOptional<z.ZodNumber>;
2505
+ panel_escalations: z.ZodOptional<z.ZodNumber>;
2506
+ escalations_total: z.ZodOptional<z.ZodNumber>;
2507
+ scope_warnings: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2508
+ reason: z.ZodString;
2509
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2510
+ detected: z.ZodOptional<z.ZodObject<{
2511
+ far_refs: z.ZodOptional<z.ZodNumber>;
2512
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2513
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2514
+ far_refs: z.ZodOptional<z.ZodNumber>;
2515
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2516
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2517
+ far_refs: z.ZodOptional<z.ZodNumber>;
2518
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2519
+ }, z.ZodTypeAny, "passthrough">>>;
2520
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2521
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2522
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2523
+ reason: z.ZodString;
2524
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2525
+ detected: z.ZodOptional<z.ZodObject<{
2526
+ far_refs: z.ZodOptional<z.ZodNumber>;
2527
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2528
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2529
+ far_refs: z.ZodOptional<z.ZodNumber>;
2530
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2531
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2532
+ far_refs: z.ZodOptional<z.ZodNumber>;
2533
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2534
+ }, z.ZodTypeAny, "passthrough">>>;
2535
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2536
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2537
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2538
+ reason: z.ZodString;
2539
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2540
+ detected: z.ZodOptional<z.ZodObject<{
2541
+ far_refs: z.ZodOptional<z.ZodNumber>;
2542
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2543
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2544
+ far_refs: z.ZodOptional<z.ZodNumber>;
2545
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2546
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2547
+ far_refs: z.ZodOptional<z.ZodNumber>;
2548
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2549
+ }, z.ZodTypeAny, "passthrough">>>;
2550
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2551
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2552
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
2553
+ suppressed: z.ZodOptional<z.ZodNumber>;
2554
+ suppressed_note: z.ZodOptional<z.ZodString>;
2555
+ missing_flowdowns: z.ZodOptional<z.ZodNumber>;
2556
+ fallback_accepted: z.ZodOptional<z.ZodNumber>;
2557
+ disabled_rule_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2558
+ /** Echo of the request's per-run playbook exclusions (workspace-controls §2). */
2559
+ disabled_playbook_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2560
+ rule_allowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2561
+ coverage: z.ZodOptional<z.ZodObject<{
2562
+ clauses_total: z.ZodNumber;
2563
+ covered: z.ZodNumber;
2564
+ uncovered: z.ZodArray<z.ZodObject<{
2565
+ clause_index: z.ZodNumber;
2566
+ position_path: z.ZodString;
2567
+ heading: z.ZodOptional<z.ZodString>;
2568
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2569
+ clause_index: z.ZodNumber;
2570
+ position_path: z.ZodString;
2571
+ heading: z.ZodOptional<z.ZodString>;
2572
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2573
+ clause_index: z.ZodNumber;
2574
+ position_path: z.ZodString;
2575
+ heading: z.ZodOptional<z.ZodString>;
2576
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2577
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2578
+ clauses_total: z.ZodNumber;
2579
+ covered: z.ZodNumber;
2580
+ uncovered: z.ZodArray<z.ZodObject<{
2581
+ clause_index: z.ZodNumber;
2582
+ position_path: z.ZodString;
2583
+ heading: z.ZodOptional<z.ZodString>;
2584
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2585
+ clause_index: z.ZodNumber;
2586
+ position_path: z.ZodString;
2587
+ heading: z.ZodOptional<z.ZodString>;
2588
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2589
+ clause_index: z.ZodNumber;
2590
+ position_path: z.ZodString;
2591
+ heading: z.ZodOptional<z.ZodString>;
2592
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2593
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2594
+ clauses_total: z.ZodNumber;
2595
+ covered: z.ZodNumber;
2596
+ uncovered: z.ZodArray<z.ZodObject<{
2597
+ clause_index: z.ZodNumber;
2598
+ position_path: z.ZodString;
2599
+ heading: z.ZodOptional<z.ZodString>;
2600
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2601
+ clause_index: z.ZodNumber;
2602
+ position_path: z.ZodString;
2603
+ heading: z.ZodOptional<z.ZodString>;
2604
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2605
+ clause_index: z.ZodNumber;
2606
+ position_path: z.ZodString;
2607
+ heading: z.ZodOptional<z.ZodString>;
2608
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2609
+ }, z.ZodTypeAny, "passthrough">>>;
2610
+ rule_fatigue: z.ZodOptional<z.ZodArray<z.ZodObject<{
2611
+ rule_id: z.ZodString;
2612
+ rejections: z.ZodNumber;
2613
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2614
+ rule_id: z.ZodString;
2615
+ rejections: z.ZodNumber;
2616
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2617
+ rule_id: z.ZodString;
2618
+ rejections: z.ZodNumber;
2619
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2620
+ would_fire: z.ZodOptional<z.ZodNumber>;
2621
+ provenance: z.ZodOptional<z.ZodObject<{
2622
+ model: z.ZodOptional<z.ZodString>;
2623
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2624
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2625
+ playbook_id: z.ZodString;
2626
+ version: z.ZodOptional<z.ZodNumber>;
2627
+ bundle_hash: z.ZodOptional<z.ZodString>;
2628
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2629
+ playbook_id: z.ZodString;
2630
+ version: z.ZodOptional<z.ZodNumber>;
2631
+ bundle_hash: z.ZodOptional<z.ZodString>;
2632
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2633
+ playbook_id: z.ZodString;
2634
+ version: z.ZodOptional<z.ZodNumber>;
2635
+ bundle_hash: z.ZodOptional<z.ZodString>;
2636
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2637
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2638
+ model: z.ZodOptional<z.ZodString>;
2639
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2640
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2641
+ playbook_id: z.ZodString;
2642
+ version: z.ZodOptional<z.ZodNumber>;
2643
+ bundle_hash: z.ZodOptional<z.ZodString>;
2644
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2645
+ playbook_id: z.ZodString;
2646
+ version: z.ZodOptional<z.ZodNumber>;
2647
+ bundle_hash: z.ZodOptional<z.ZodString>;
2648
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2649
+ playbook_id: z.ZodString;
2650
+ version: z.ZodOptional<z.ZodNumber>;
2651
+ bundle_hash: z.ZodOptional<z.ZodString>;
2652
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2653
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2654
+ model: z.ZodOptional<z.ZodString>;
2655
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2656
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2657
+ playbook_id: z.ZodString;
2658
+ version: z.ZodOptional<z.ZodNumber>;
2659
+ bundle_hash: z.ZodOptional<z.ZodString>;
2660
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2661
+ playbook_id: z.ZodString;
2662
+ version: z.ZodOptional<z.ZodNumber>;
2663
+ bundle_hash: z.ZodOptional<z.ZodString>;
2664
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2665
+ playbook_id: z.ZodString;
2666
+ version: z.ZodOptional<z.ZodNumber>;
2667
+ bundle_hash: z.ZodOptional<z.ZodString>;
2668
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2669
+ }, z.ZodTypeAny, "passthrough">>>;
2670
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2671
+ review_id: z.ZodOptional<z.ZodString>;
2672
+ tier1: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2673
+ tier2: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2674
+ tier3: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
2675
+ redlines: z.ZodNumber;
2676
+ findings: z.ZodNumber;
2677
+ dropped: z.ZodNumber;
2678
+ clause_errors: z.ZodNumber;
2679
+ truncated_clauses: z.ZodOptional<z.ZodNumber>;
2680
+ grammar_suggestions: z.ZodNumber;
2681
+ rulebook_findings: z.ZodNumber;
2682
+ irregularity_findings: z.ZodNumber;
2683
+ rulebook_insertions: z.ZodOptional<z.ZodNumber>;
2684
+ panel_suggestions: z.ZodOptional<z.ZodNumber>;
2685
+ chronology_findings: z.ZodOptional<z.ZodNumber>;
2686
+ lanes_degraded: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2687
+ govcon_findings: z.ZodOptional<z.ZodNumber>;
2688
+ superseded: z.ZodOptional<z.ZodNumber>;
2689
+ strictness: z.ZodOptional<z.ZodString>;
2690
+ severity_mix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2691
+ finding_provenance: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2692
+ escalations: z.ZodOptional<z.ZodNumber>;
2693
+ panel_escalations: z.ZodOptional<z.ZodNumber>;
2694
+ escalations_total: z.ZodOptional<z.ZodNumber>;
2695
+ scope_warnings: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2696
+ reason: z.ZodString;
2697
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2698
+ detected: z.ZodOptional<z.ZodObject<{
2699
+ far_refs: z.ZodOptional<z.ZodNumber>;
2700
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2701
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2702
+ far_refs: z.ZodOptional<z.ZodNumber>;
2703
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2704
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2705
+ far_refs: z.ZodOptional<z.ZodNumber>;
2706
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2707
+ }, z.ZodTypeAny, "passthrough">>>;
2708
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2709
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2710
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2711
+ reason: z.ZodString;
2712
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2713
+ detected: z.ZodOptional<z.ZodObject<{
2714
+ far_refs: z.ZodOptional<z.ZodNumber>;
2715
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2716
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2717
+ far_refs: z.ZodOptional<z.ZodNumber>;
2718
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2719
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2720
+ far_refs: z.ZodOptional<z.ZodNumber>;
2721
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2722
+ }, z.ZodTypeAny, "passthrough">>>;
2723
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2724
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2725
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2726
+ reason: z.ZodString;
2727
+ regimes_requested: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2728
+ detected: z.ZodOptional<z.ZodObject<{
2729
+ far_refs: z.ZodOptional<z.ZodNumber>;
2730
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2731
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2732
+ far_refs: z.ZodOptional<z.ZodNumber>;
2733
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2734
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2735
+ far_refs: z.ZodOptional<z.ZodNumber>;
2736
+ dfars_refs: z.ZodOptional<z.ZodNumber>;
2737
+ }, z.ZodTypeAny, "passthrough">>>;
2738
+ classified_ratio: z.ZodOptional<z.ZodNumber>;
2739
+ covered_ratio: z.ZodOptional<z.ZodNumber>;
2740
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
2741
+ suppressed: z.ZodOptional<z.ZodNumber>;
2742
+ suppressed_note: z.ZodOptional<z.ZodString>;
2743
+ missing_flowdowns: z.ZodOptional<z.ZodNumber>;
2744
+ fallback_accepted: z.ZodOptional<z.ZodNumber>;
2745
+ disabled_rule_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2746
+ /** Echo of the request's per-run playbook exclusions (workspace-controls §2). */
2747
+ disabled_playbook_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2748
+ rule_allowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2749
+ coverage: z.ZodOptional<z.ZodObject<{
2750
+ clauses_total: z.ZodNumber;
2751
+ covered: z.ZodNumber;
2752
+ uncovered: z.ZodArray<z.ZodObject<{
2753
+ clause_index: z.ZodNumber;
2754
+ position_path: z.ZodString;
2755
+ heading: z.ZodOptional<z.ZodString>;
2756
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2757
+ clause_index: z.ZodNumber;
2758
+ position_path: z.ZodString;
2759
+ heading: z.ZodOptional<z.ZodString>;
2760
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2761
+ clause_index: z.ZodNumber;
2762
+ position_path: z.ZodString;
2763
+ heading: z.ZodOptional<z.ZodString>;
2764
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2765
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2766
+ clauses_total: z.ZodNumber;
2767
+ covered: z.ZodNumber;
2768
+ uncovered: z.ZodArray<z.ZodObject<{
2769
+ clause_index: z.ZodNumber;
2770
+ position_path: z.ZodString;
2771
+ heading: z.ZodOptional<z.ZodString>;
2772
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2773
+ clause_index: z.ZodNumber;
2774
+ position_path: z.ZodString;
2775
+ heading: z.ZodOptional<z.ZodString>;
2776
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2777
+ clause_index: z.ZodNumber;
2778
+ position_path: z.ZodString;
2779
+ heading: z.ZodOptional<z.ZodString>;
2780
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2781
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2782
+ clauses_total: z.ZodNumber;
2783
+ covered: z.ZodNumber;
2784
+ uncovered: z.ZodArray<z.ZodObject<{
2785
+ clause_index: z.ZodNumber;
2786
+ position_path: z.ZodString;
2787
+ heading: z.ZodOptional<z.ZodString>;
2788
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2789
+ clause_index: z.ZodNumber;
2790
+ position_path: z.ZodString;
2791
+ heading: z.ZodOptional<z.ZodString>;
2792
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2793
+ clause_index: z.ZodNumber;
2794
+ position_path: z.ZodString;
2795
+ heading: z.ZodOptional<z.ZodString>;
2796
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2797
+ }, z.ZodTypeAny, "passthrough">>>;
2798
+ rule_fatigue: z.ZodOptional<z.ZodArray<z.ZodObject<{
2799
+ rule_id: z.ZodString;
2800
+ rejections: z.ZodNumber;
2801
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2802
+ rule_id: z.ZodString;
2803
+ rejections: z.ZodNumber;
2804
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2805
+ rule_id: z.ZodString;
2806
+ rejections: z.ZodNumber;
2807
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2808
+ would_fire: z.ZodOptional<z.ZodNumber>;
2809
+ provenance: z.ZodOptional<z.ZodObject<{
2810
+ model: z.ZodOptional<z.ZodString>;
2811
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2812
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2813
+ playbook_id: z.ZodString;
2814
+ version: z.ZodOptional<z.ZodNumber>;
2815
+ bundle_hash: z.ZodOptional<z.ZodString>;
2816
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2817
+ playbook_id: z.ZodString;
2818
+ version: z.ZodOptional<z.ZodNumber>;
2819
+ bundle_hash: z.ZodOptional<z.ZodString>;
2820
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2821
+ playbook_id: z.ZodString;
2822
+ version: z.ZodOptional<z.ZodNumber>;
2823
+ bundle_hash: z.ZodOptional<z.ZodString>;
2824
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2825
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2826
+ model: z.ZodOptional<z.ZodString>;
2827
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2828
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2829
+ playbook_id: z.ZodString;
2830
+ version: z.ZodOptional<z.ZodNumber>;
2831
+ bundle_hash: z.ZodOptional<z.ZodString>;
2832
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2833
+ playbook_id: z.ZodString;
2834
+ version: z.ZodOptional<z.ZodNumber>;
2835
+ bundle_hash: z.ZodOptional<z.ZodString>;
2836
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2837
+ playbook_id: z.ZodString;
2838
+ version: z.ZodOptional<z.ZodNumber>;
2839
+ bundle_hash: z.ZodOptional<z.ZodString>;
2840
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2841
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2842
+ model: z.ZodOptional<z.ZodString>;
2843
+ prompt_sha256: z.ZodOptional<z.ZodString>;
2844
+ playbooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2845
+ playbook_id: z.ZodString;
2846
+ version: z.ZodOptional<z.ZodNumber>;
2847
+ bundle_hash: z.ZodOptional<z.ZodString>;
2848
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2849
+ playbook_id: z.ZodString;
2850
+ version: z.ZodOptional<z.ZodNumber>;
2851
+ bundle_hash: z.ZodOptional<z.ZodString>;
2852
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2853
+ playbook_id: z.ZodString;
2854
+ version: z.ZodOptional<z.ZodNumber>;
2855
+ bundle_hash: z.ZodOptional<z.ZodString>;
2856
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2857
+ }, z.ZodTypeAny, "passthrough">>>;
2858
+ }, z.ZodTypeAny, "passthrough">>;
2859
+ export type RedlineSuggestion = z.infer<typeof suggestionSchema>;
2860
+ export type PanelEventPayload = z.infer<typeof panelEventDataSchema>;
2861
+ export type RulebookInsertionEventPayload = z.infer<typeof rulebookInsertionEventDataSchema>;
2862
+ export type RedlineGrounding = z.infer<typeof groundingSchema>;
2863
+ export type RedlineEventPayload = z.infer<typeof redlineEventDataSchema>;
2864
+ export type FindingEventPayload = z.infer<typeof findingEventDataSchema>;
2865
+ export type ClauseStartEventPayload = z.infer<typeof clauseStartEventDataSchema>;
2866
+ export type ErrorEventPayload = z.infer<typeof errorEventDataSchema>;
2867
+ export type SummaryPayload = z.infer<typeof summaryEventDataSchema>;
2868
+ export type SupersededEventPayload = z.infer<typeof supersededEventDataSchema>;
2869
+ export type ClauseTruncatedEventPayload = z.infer<typeof clauseTruncatedEventDataSchema>;
2870
+ export type UncoveredEventPayload = z.infer<typeof uncoveredEventDataSchema>;
2871
+ export type RuleFatiguePayload = z.infer<typeof ruleFatigueEventDataSchema>;
2872
+ export type ScopeWarningPayload = z.infer<typeof scopeWarningEventDataSchema>;
2873
+ export type RedlineStreamEvent = {
2874
+ type: "clause_start";
2875
+ data: ClauseStartEventPayload;
2876
+ } | {
2877
+ type: "redline";
2878
+ data: RedlineEventPayload;
2879
+ } | {
2880
+ type: "grammar";
2881
+ data: RedlineSuggestion;
2882
+ } | {
2883
+ type: "chronology";
2884
+ data: RedlineSuggestion;
2885
+ } | {
2886
+ type: "panel";
2887
+ data: PanelEventPayload;
2888
+ } | {
2889
+ type: "rulebook_insertion";
2890
+ data: RulebookInsertionEventPayload;
2891
+ } | {
2892
+ type: "finding" | "irregularity" | "rulebook" | "escalation" | "govcon";
2893
+ data: FindingEventPayload;
2894
+ } | {
2895
+ type: "superseded";
2896
+ data: SupersededEventPayload;
2897
+ } | {
2898
+ type: "clause_truncated";
2899
+ data: ClauseTruncatedEventPayload;
2900
+ } | {
2901
+ type: "scope_warning";
2902
+ data: ScopeWarningPayload;
2903
+ } | {
2904
+ type: "uncovered";
2905
+ data: UncoveredEventPayload;
2906
+ } | {
2907
+ type: "rule_fatigue";
2908
+ data: RuleFatiguePayload;
2909
+ } | {
2910
+ type: "error";
2911
+ data: ErrorEventPayload;
2912
+ } | {
2913
+ type: "summary";
2914
+ data: SummaryPayload;
2915
+ } | {
2916
+ type: "done";
2917
+ data: null;
2918
+ } | {
2919
+ type: "knowledge_map" | "graph_enrichment" | "lineitem";
2920
+ data: unknown;
2921
+ };
2922
+ export type RedlineStreamApiErrorKind = "network" | "http";
2923
+ export declare class RedlineStreamApiError extends Error {
2924
+ readonly kind: RedlineStreamApiErrorKind;
2925
+ readonly status?: number;
2926
+ constructor(kind: RedlineStreamApiErrorKind, message: string, status?: number);
2927
+ }
2928
+ export interface RedlineStreamApiConfig {
2929
+ baseUrl?: string;
2930
+ workspaceId?: string;
2931
+ }
2932
+ /** Configure once from the consumer (App.tsx / lax-web-portal). */
2933
+ export declare const configureRedlineStreamApi: (next: RedlineStreamApiConfig) => void;
2934
+ export interface RedlineStreamRequest {
2935
+ documentId: string;
2936
+ doc: Record<string, unknown>;
2937
+ regimes: string[];
2938
+ markupMode?: string;
2939
+ schemaVersion?: string;
2940
+ /**
2941
+ * R1 prime linkage (FE_INTEGRATION_API §2.B). Loads the prime's ACTIVE
2942
+ * derived rulebook server-side — the stream needs NO derived playbook ids.
2943
+ */
2944
+ primeContractId?: string;
2945
+ /** `"commercial_sub" | "noncommercial_sub" | "unknown"`. Note the `_sub`
2946
+ * suffix: an unrecognized value silently folds to `unknown` (§4.10). */
2947
+ counterpartyType?: "commercial_sub" | "noncommercial_sub" | "unknown";
2948
+ /**
2949
+ * One dial, three behaviors (§2.B):
2950
+ * "" low-severity findings suppressed, cascade ON
2951
+ * "strict" no suppression, cascade OFF
2952
+ * "permissive" also suppresses medium grammar, fallback as primary
2953
+ * Any other value is a 400.
2954
+ */
2955
+ strictness?: "" | "strict" | "permissive";
2956
+ /**
2957
+ * Per-run rule subset (R2 §2). Suppresses these rule ids for THIS run only —
2958
+ * no playbook mutation. A disabled rule can neither fire, surface as
2959
+ * needs-review/superseded, nor appear via the document-level rulebook lane.
2960
+ */
2961
+ disabledRuleIds?: readonly string[];
2962
+ /**
2963
+ * Per-run playbook exclusions (workspace-controls §2), exactly parallel to
2964
+ * `disabledRuleIds` but one level coarser: every rule of a disabled playbook
2965
+ * is dropped for THIS run only — no playbook mutation. Disabled wins over
2966
+ * any allowlist. Echoed on the summary as `disabled_playbook_ids`.
2967
+ */
2968
+ disabledPlaybookIds?: readonly string[];
2969
+ /** When non-empty, ONLY these rules run. Disabled wins on intersection. */
2970
+ ruleIds?: readonly string[];
2971
+ }
2972
+ /**
2973
+ * Streams a redline review. Resolves once the SSE connection closes
2974
+ * (normally, via abort, or after a terminal error). Never rejects for
2975
+ * mid-stream `error` events — those are dispatched via `onEvent`; only a
2976
+ * genuine transport/HTTP failure (surfaced through `onerror`) rejects.
2977
+ */
2978
+ export declare function streamRedlineReview(req: RedlineStreamRequest, onEvent: (e: RedlineStreamEvent) => void, signal: AbortSignal): Promise<void>;
2979
+ export {};