@jam-overture/loom 0.1.0 → 0.2.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 (290) hide show
  1. package/README.md +3 -1
  2. package/dist/application/application.d.ts +109 -0
  3. package/dist/application/application.js +97 -0
  4. package/dist/application/memory.d.ts +20 -0
  5. package/dist/application/memory.js +79 -0
  6. package/dist/application/store.d.ts +101 -0
  7. package/dist/application/store.js +25 -0
  8. package/dist/audience/audience.d.ts +36 -0
  9. package/dist/audience/audience.js +41 -0
  10. package/dist/cli/templates.js +19 -0
  11. package/dist/data/plan.js +0 -0
  12. package/dist/data/resolution.d.ts +23 -1
  13. package/dist/data/resolve.d.ts +30 -3
  14. package/dist/data/resolve.js +11 -3
  15. package/dist/ids.d.ts +10 -0
  16. package/dist/ids.js +11 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +1 -0
  19. package/dist/patch.d.ts +54 -0
  20. package/dist/patch.js +44 -0
  21. package/dist/project/closing.d.ts +51 -0
  22. package/dist/project/closing.js +53 -0
  23. package/dist/project/memory.d.ts +20 -0
  24. package/dist/project/memory.js +97 -0
  25. package/dist/project/project.d.ts +90 -0
  26. package/dist/project/project.js +91 -0
  27. package/dist/project/store.d.ts +135 -0
  28. package/dist/project/store.js +41 -0
  29. package/dist/registered.d.ts +64 -0
  30. package/dist/registered.js +118 -0
  31. package/dist/render/behaviour-adjust.d.ts +11 -19
  32. package/dist/render/behaviour-adjust.js +75 -21
  33. package/dist/render/behaviour-present.d.ts +8 -0
  34. package/dist/render/behaviour-present.js +57 -6
  35. package/dist/render/behaviour.d.ts +98 -17
  36. package/dist/render/behaviour.js +91 -26
  37. package/dist/render/control-name.d.ts +68 -0
  38. package/dist/render/control-name.js +37 -0
  39. package/dist/render/diagnostics.d.ts +72 -0
  40. package/dist/render/diagnostics.js +7 -0
  41. package/dist/render/index.d.ts +2 -0
  42. package/dist/render/index.js +2 -0
  43. package/dist/render/reads.d.ts +11 -0
  44. package/dist/render/reads.js +12 -1
  45. package/dist/render/render.js +102 -7
  46. package/dist/render/slots.d.ts +52 -0
  47. package/dist/render/slots.js +24 -0
  48. package/dist/render/theme.d.ts +54 -1
  49. package/dist/render/theme.js +23 -1
  50. package/dist/render/unshown.d.ts +152 -0
  51. package/dist/render/unshown.js +80 -0
  52. package/dist/runtime/analysis.d.ts +94 -9
  53. package/dist/runtime/analysis.js +54 -9
  54. package/dist/runtime/assessment.d.ts +36 -2
  55. package/dist/runtime/assessment.js +27 -2
  56. package/dist/runtime/checks.d.ts +148 -0
  57. package/dist/runtime/checks.js +112 -0
  58. package/dist/runtime/disposition.d.ts +96 -0
  59. package/dist/runtime/disposition.js +46 -0
  60. package/dist/runtime/gate.js +22 -0
  61. package/dist/runtime/index.d.ts +3 -0
  62. package/dist/runtime/index.js +3 -0
  63. package/dist/runtime/irreversibility.d.ts +64 -0
  64. package/dist/runtime/irreversibility.js +45 -0
  65. package/dist/runtime/pipeline.d.ts +43 -0
  66. package/dist/runtime/pipeline.js +10 -2
  67. package/dist/runtime/policy-change.d.ts +93 -0
  68. package/dist/runtime/policy-change.js +299 -0
  69. package/dist/runtime/policy-log.d.ts +406 -0
  70. package/dist/runtime/policy-log.js +285 -0
  71. package/dist/runtime/reversibility.d.ts +11 -9
  72. package/dist/runtime/stakes.d.ts +129 -1
  73. package/dist/runtime/stakes.js +240 -26
  74. package/dist/runtime/vocabulary.d.ts +164 -7
  75. package/dist/runtime/vocabulary.js +181 -8
  76. package/dist/sdk/audit.d.ts +174 -3
  77. package/dist/sdk/audit.js +176 -17
  78. package/dist/sdk/catalogue.d.ts +9 -1
  79. package/dist/sdk/conformance.d.ts +37 -3
  80. package/dist/sdk/conformance.js +25 -4
  81. package/dist/sdk/definition.d.ts +65 -0
  82. package/dist/sdk/definition.js +22 -0
  83. package/dist/sdk/registry.d.ts +29 -2
  84. package/dist/sdk/registry.js +63 -1
  85. package/dist/signals/action-change.d.ts +507 -0
  86. package/dist/signals/action-change.js +265 -0
  87. package/dist/signals/action.d.ts +331 -0
  88. package/dist/signals/action.js +182 -0
  89. package/dist/signals/applied-window.contract.d.ts +23 -0
  90. package/dist/signals/applied-window.contract.js +160 -0
  91. package/dist/signals/arriving.d.ts +210 -0
  92. package/dist/signals/arriving.js +133 -0
  93. package/dist/signals/audiences.d.ts +528 -0
  94. package/dist/signals/audiences.js +255 -0
  95. package/dist/signals/broadcast.d.ts +8 -2
  96. package/dist/signals/broadcast.js +58 -8
  97. package/dist/signals/change.d.ts +378 -0
  98. package/dist/signals/change.js +327 -0
  99. package/dist/signals/collect.d.ts +41 -0
  100. package/dist/signals/collect.js +88 -7
  101. package/dist/signals/copy-change.d.ts +553 -0
  102. package/dist/signals/copy-change.js +377 -0
  103. package/dist/signals/copy.d.ts +337 -0
  104. package/dist/signals/copy.js +211 -0
  105. package/dist/signals/counters.d.ts +46 -0
  106. package/dist/signals/counters.js +102 -0
  107. package/dist/signals/deliver.d.ts +23 -4
  108. package/dist/signals/deliver.js +34 -6
  109. package/dist/signals/deployment-change.d.ts +371 -0
  110. package/dist/signals/deployment-change.js +268 -0
  111. package/dist/signals/deployment.d.ts +265 -0
  112. package/dist/signals/deployment.js +152 -0
  113. package/dist/signals/door.d.ts +92 -0
  114. package/dist/signals/door.js +53 -0
  115. package/dist/signals/fold.d.ts +10 -0
  116. package/dist/signals/fold.js +5 -1
  117. package/dist/signals/form-action.d.ts +302 -0
  118. package/dist/signals/form-action.js +169 -0
  119. package/dist/signals/form-copy.d.ts +523 -0
  120. package/dist/signals/form-copy.js +346 -0
  121. package/dist/signals/forms.d.ts +247 -0
  122. package/dist/signals/forms.js +147 -0
  123. package/dist/signals/funnel-change.d.ts +548 -0
  124. package/dist/signals/funnel-change.js +361 -0
  125. package/dist/signals/funnel.d.ts +532 -0
  126. package/dist/signals/funnel.js +216 -0
  127. package/dist/signals/health.d.ts +497 -0
  128. package/dist/signals/health.js +361 -0
  129. package/dist/signals/index.d.ts +41 -0
  130. package/dist/signals/index.js +41 -0
  131. package/dist/signals/ingest.d.ts +56 -1
  132. package/dist/signals/ingest.js +91 -1
  133. package/dist/signals/journal.d.ts +11 -0
  134. package/dist/signals/kinds.d.ts +8 -6
  135. package/dist/signals/kinds.js +14 -6
  136. package/dist/signals/library-action.d.ts +430 -0
  137. package/dist/signals/library-action.js +336 -0
  138. package/dist/signals/library-change.d.ts +477 -0
  139. package/dist/signals/library-change.js +335 -0
  140. package/dist/signals/library-copy-change.d.ts +498 -0
  141. package/dist/signals/library-copy-change.js +476 -0
  142. package/dist/signals/library-pace.d.ts +319 -0
  143. package/dist/signals/library-pace.js +305 -0
  144. package/dist/signals/library-reach-change.d.ts +636 -0
  145. package/dist/signals/library-reach-change.js +534 -0
  146. package/dist/signals/library-reach.d.ts +377 -0
  147. package/dist/signals/library-reach.js +227 -0
  148. package/dist/signals/library-word-reach-change.d.ts +567 -0
  149. package/dist/signals/library-word-reach-change.js +568 -0
  150. package/dist/signals/library.d.ts +306 -0
  151. package/dist/signals/library.js +178 -0
  152. package/dist/signals/memory.d.ts +9 -0
  153. package/dist/signals/memory.js +105 -14
  154. package/dist/signals/migrate.d.ts +17 -2
  155. package/dist/signals/migrate.js +122 -5
  156. package/dist/signals/notice.d.ts +334 -0
  157. package/dist/signals/notice.js +228 -0
  158. package/dist/signals/pace-change.d.ts +501 -0
  159. package/dist/signals/pace-change.js +310 -0
  160. package/dist/signals/pace.d.ts +296 -0
  161. package/dist/signals/pace.js +291 -0
  162. package/dist/signals/page-views.d.ts +365 -0
  163. package/dist/signals/page-views.js +218 -0
  164. package/dist/signals/parts.d.ts +344 -0
  165. package/dist/signals/parts.js +273 -0
  166. package/dist/signals/postgres.d.ts +16 -2
  167. package/dist/signals/postgres.js +390 -87
  168. package/dist/signals/progress.d.ts +212 -0
  169. package/dist/signals/progress.js +150 -0
  170. package/dist/signals/ratios.d.ts +108 -0
  171. package/dist/signals/ratios.js +40 -0
  172. package/dist/signals/reach.d.ts +309 -0
  173. package/dist/signals/reach.js +93 -0
  174. package/dist/signals/readable.d.ts +34 -0
  175. package/dist/signals/readable.js +34 -0
  176. package/dist/signals/readership.d.ts +381 -0
  177. package/dist/signals/readership.js +308 -0
  178. package/dist/signals/region-pages.d.ts +173 -0
  179. package/dist/signals/region-pages.js +62 -0
  180. package/dist/signals/region.d.ts +287 -0
  181. package/dist/signals/region.js +198 -0
  182. package/dist/signals/retention.d.ts +141 -0
  183. package/dist/signals/retention.js +58 -0
  184. package/dist/signals/rollup.d.ts +67 -3
  185. package/dist/signals/rollup.js +0 -0
  186. package/dist/signals/schema.d.ts +432 -1
  187. package/dist/signals/schema.js +157 -3
  188. package/dist/signals/signal.d.ts +237 -11
  189. package/dist/signals/signal.js +70 -10
  190. package/dist/signals/silence-census.d.ts +205 -0
  191. package/dist/signals/silence-census.js +87 -0
  192. package/dist/signals/silences.d.ts +848 -0
  193. package/dist/signals/silences.js +753 -0
  194. package/dist/signals/tally.d.ts +140 -11
  195. package/dist/signals/window-figures.d.ts +148 -0
  196. package/dist/signals/window-figures.js +42 -0
  197. package/dist/signals/window.d.ts +866 -0
  198. package/dist/signals/window.js +693 -0
  199. package/dist/signals/words.d.ts +24 -0
  200. package/dist/signals/words.js +24 -0
  201. package/dist/store/index.d.ts +19 -0
  202. package/dist/store/index.js +19 -0
  203. package/dist/store/memory.d.ts +2 -1
  204. package/dist/store/memory.js +48 -12
  205. package/dist/store/migrate.d.ts +80 -0
  206. package/dist/store/migrate.js +259 -7
  207. package/dist/store/postgres-applications.d.ts +4 -0
  208. package/dist/store/postgres-applications.js +197 -0
  209. package/dist/store/postgres-holds.d.ts +10 -1
  210. package/dist/store/postgres-holds.js +116 -101
  211. package/dist/store/postgres-policy-log.d.ts +14 -0
  212. package/dist/store/postgres-policy-log.js +240 -0
  213. package/dist/store/postgres-projects.d.ts +4 -0
  214. package/dist/store/postgres-projects.js +217 -0
  215. package/dist/store/postgres.d.ts +16 -1
  216. package/dist/store/postgres.js +59 -9
  217. package/dist/store/replay.d.ts +102 -1
  218. package/dist/store/replay.js +190 -19
  219. package/dist/store/reseed.d.ts +238 -0
  220. package/dist/store/reseed.js +308 -0
  221. package/dist/store/schema.d.ts +450 -2
  222. package/dist/store/schema.js +141 -5
  223. package/dist/store/store.d.ts +29 -6
  224. package/dist/submit/resolve.js +2 -1
  225. package/dist/telemetry/calibration.d.ts +25 -0
  226. package/dist/telemetry/calibration.js +27 -1
  227. package/dist/telemetry/event.d.ts +391 -33
  228. package/dist/telemetry/event.js +84 -20
  229. package/dist/telemetry/index.d.ts +1 -0
  230. package/dist/telemetry/index.js +1 -0
  231. package/dist/telemetry/journal.d.ts +72 -3
  232. package/dist/telemetry/journal.js +9 -0
  233. package/dist/telemetry/lookup.d.ts +27 -0
  234. package/dist/telemetry/lookup.js +18 -0
  235. package/dist/telemetry/memory.js +23 -0
  236. package/dist/telemetry/migrate.js +22 -1
  237. package/dist/telemetry/postgres.d.ts +10 -1
  238. package/dist/telemetry/postgres.js +172 -90
  239. package/dist/telemetry/remeasure.d.ts +78 -0
  240. package/dist/telemetry/remeasure.js +83 -0
  241. package/dist/telemetry/retention.d.ts +2 -2
  242. package/dist/telemetry/schema.d.ts +17 -0
  243. package/dist/telemetry/schema.js +27 -1
  244. package/dist/telemetry/sink.d.ts +2 -2
  245. package/dist/testing/application-contract.d.ts +14 -0
  246. package/dist/testing/application-contract.js +270 -0
  247. package/dist/testing/contracts.d.ts +12 -7
  248. package/dist/testing/contracts.js +12 -7
  249. package/dist/testing/definitions.d.ts +78 -0
  250. package/dist/testing/definitions.js +134 -9
  251. package/dist/testing/doubles.d.ts +103 -0
  252. package/dist/testing/doubles.js +143 -0
  253. package/dist/testing/index.d.ts +2 -2
  254. package/dist/testing/index.js +2 -2
  255. package/dist/testing/journal-contract.js +140 -2
  256. package/dist/testing/model-contract.d.ts +110 -0
  257. package/dist/testing/model-contract.js +150 -0
  258. package/dist/testing/policy-log-contract.d.ts +26 -0
  259. package/dist/testing/policy-log-contract.js +344 -0
  260. package/dist/testing/project-contract.d.ts +14 -0
  261. package/dist/testing/project-contract.js +266 -0
  262. package/dist/testing/reader-signal-contract.d.ts +27 -2
  263. package/dist/testing/reader-signal-contract.js +475 -5
  264. package/dist/testing/store-contract.d.ts +7 -1
  265. package/dist/testing/store-contract.js +84 -3
  266. package/dist/theme/apply.d.ts +20 -1
  267. package/dist/theme/apply.js +5 -3
  268. package/dist/theme/derive.d.ts +22 -0
  269. package/dist/theme/derive.js +54 -1
  270. package/dist/theme/library.js +1 -1
  271. package/dist/theme/measure.d.ts +34 -0
  272. package/dist/theme/measure.js +30 -1
  273. package/dist/theme/palettes.js +7 -7
  274. package/dist/theme/ramp.d.ts +64 -0
  275. package/dist/theme/ramp.js +114 -0
  276. package/dist/theme/registry.d.ts +9 -0
  277. package/dist/theme/registry.js +11 -1
  278. package/dist/theme/separation.d.ts +97 -3
  279. package/dist/theme/separation.js +75 -0
  280. package/dist/tree/compare.d.ts +9 -0
  281. package/dist/tree/compare.js +18 -0
  282. package/dist/write/computed.d.ts +60 -0
  283. package/dist/write/computed.js +61 -0
  284. package/dist/write/held.d.ts +59 -0
  285. package/dist/write/index.d.ts +5 -2
  286. package/dist/write/index.js +5 -2
  287. package/dist/write/reseed.d.ts +151 -0
  288. package/dist/write/reseed.js +184 -0
  289. package/dist/write/revert.js +2 -16
  290. package/package.json +98 -19
@@ -6,6 +6,7 @@ import type { RuntimeEventEnvelope } from "../runtime/events.js";
6
6
  import { type IntentOrigin } from "../runtime/intent.js";
7
7
  import { type ProposedChange } from "../runtime/proposal.js";
8
8
  import { type StakeLevel } from "../runtime/stake-level.js";
9
+ import { type StakeFactorCode } from "../runtime/stakes.js";
9
10
  /**
10
11
  * What §6 keeps, and what it deliberately does not.
11
12
  *
@@ -113,49 +114,112 @@ export declare const assessmentSummarySchema: z.ZodObject<{
113
114
  configuredNodeCount: z.ZodNumber;
114
115
  touchedPrimitiveTypes: z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">;
115
116
  /**
116
- * Bounded, non-identifying, a subset of the touched types, and the input to
117
- * the only `critical` stake factor. A corpus that cannot group by "the Gate
118
- * saw this type destroyed" cannot ask the question the factor exists for.
117
+ * Bounded, non-identifying, a subset of the touched types, and *which* types a
118
+ * removal destroyed. It was written as the input to "the only `critical` stake
119
+ * factor", which it no longer is — two later rules reach that level (0173,
120
+ * 0179), and `stakeFactorCodes` below carries all thirteen. What is left is
121
+ * the half a code cannot say: `protected-type-removed` says a rule fired, this
122
+ * says what it fired about.
119
123
  */
120
124
  removedPrimitiveTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
121
125
  relocatedPrimitiveTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
122
126
  relocatedNodeCount: z.ZodOptional<z.ZodNumber>;
123
127
  shallowestAffectedDepth: z.ZodNumber;
128
+ /**
129
+ * How many nodes the change named, which is the one thing `broad-change`
130
+ * reads. `affectedNodeIds` itself is content — the ids name parts of a
131
+ * particular page and do not cross (0023) — and the rule compares its
132
+ * *length* against `breadthThreshold`, so the count is the whole of what a
133
+ * later reader needs and the ids never have to be journalled.
134
+ */
135
+ affectedNodeCount: z.ZodOptional<z.ZodNumber>;
136
+ /**
137
+ * The prop names the change set, which is the only input to
138
+ * `protected-prop-configured`.
139
+ *
140
+ * Names and not values: a key is vocabulary the host registered, where a value
141
+ * is what a visitor will read. Bounded by the declaration that accepts them,
142
+ * for the reason `touchedPrimitiveTypes` is bounded by the catalogue.
143
+ */
144
+ configuredPropKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
124
145
  /** Nodes the inverse would have to carry — the content a removal destroyed. */
125
146
  retainedNodeCount: z.ZodNumber;
126
147
  irreversibilityReasons: z.ZodArray<z.ZodString, "many">;
148
+ /**
149
+ * Which of the touched types this policy declared reach outside the page.
150
+ *
151
+ * `irreversibilityReasons` above keeps the codes, and for
152
+ * `retention-budget-exceeded` that is almost lossless — `retainedNodeCount`
153
+ * is journalled beside it, so a screen can say *this one takes nine parts off
154
+ * the page*. For `out-of-tree-effect` the code alone leaves a reader told to
155
+ * go and check something and not told what, and `touchedPrimitiveTypes` above
156
+ * cannot answer it: it is a superset, and naming one of its members as the
157
+ * offender would be a guess on the screen where a guess costs most.
158
+ *
159
+ * Non-identifying for the reason `removedPrimitiveTypes` above is: a type
160
+ * name is vocabulary the deployment registered, not content a visitor typed.
161
+ * Absent when no out-of-tree reason fired, and on a record written before the
162
+ * field existed (0045).
163
+ */
164
+ outOfTreeEffectTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
165
+ /**
166
+ * Which rules the Gate raised, in the order it raised them (0198).
167
+ *
168
+ * `stakes` above is the highest level any of them reached, which is what the
169
+ * Gate compares against a ceiling and is not what a reader of the record wants
170
+ * to know. Three factors are `critical`, so *this project refused four changes
171
+ * as too risky* and *this project refused four changes because the model
172
+ * invented parts that do not exist here* were the same row, and only the
173
+ * second is something an operator can act on.
174
+ *
175
+ * The codes and not the factors: a code is one of thirteen fixed strings,
176
+ * while a factor's `detail` is a sentence naming nodes and types, which is
177
+ * content and does not cross (0023). The level does not cross either, because
178
+ * it is recoverable — twelve of the thirteen are fixed at their code, and
179
+ * `large-removal` is decided by `removedNodeCount` here against the
180
+ * `removalThresholds` of the policy `policyFingerprint` names.
181
+ */
182
+ stakeFactorCodes: z.ZodOptional<z.ZodArray<z.ZodEnum<["protected-type-removed", "protected-type-touched", "protected-type-relocated", "protected-prop-configured", "large-removal", "broad-change", "shallow-structural-change", "discards-later-work", "nested-target", "unknown-primitive", "invalid-props", "unread-binding", "unplaced-slot", "redirected-submission", "repointed-binding"]>, "many">>;
127
183
  }, "strip", z.ZodTypeAny, {
128
184
  proposalId: string & z.BRAND<"ProposalId">;
185
+ retainedNodeCount: number;
129
186
  removedNodeCount: number;
130
187
  stakes: "low" | "medium" | "high" | "critical";
131
188
  reversible: boolean;
189
+ irreversibilityReasons: string[];
132
190
  operationCount: number;
133
191
  insertedNodeCount: number;
134
192
  movedNodeCount: number;
135
193
  configuredNodeCount: number;
136
194
  touchedPrimitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
137
195
  shallowestAffectedDepth: number;
138
- retainedNodeCount: number;
139
- irreversibilityReasons: string[];
196
+ outOfTreeEffectTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
140
197
  removedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
141
198
  relocatedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
142
199
  relocatedNodeCount?: number | undefined;
200
+ affectedNodeCount?: number | undefined;
201
+ configuredPropKeys?: string[] | undefined;
202
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
143
203
  }, {
144
204
  proposalId: string;
205
+ retainedNodeCount: number;
145
206
  removedNodeCount: number;
146
207
  stakes: "low" | "medium" | "high" | "critical";
147
208
  reversible: boolean;
209
+ irreversibilityReasons: string[];
148
210
  operationCount: number;
149
211
  insertedNodeCount: number;
150
212
  movedNodeCount: number;
151
213
  configuredNodeCount: number;
152
214
  touchedPrimitiveTypes: string[];
153
215
  shallowestAffectedDepth: number;
154
- retainedNodeCount: number;
155
- irreversibilityReasons: string[];
216
+ outOfTreeEffectTypes?: string[] | undefined;
156
217
  removedPrimitiveTypes?: string[] | undefined;
157
218
  relocatedPrimitiveTypes?: string[] | undefined;
158
219
  relocatedNodeCount?: number | undefined;
220
+ affectedNodeCount?: number | undefined;
221
+ configuredPropKeys?: string[] | undefined;
222
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
159
223
  }>;
160
224
  export type AssessmentSummary = {
161
225
  readonly proposalId: ProposalId;
@@ -172,8 +236,16 @@ export type AssessmentSummary = {
172
236
  readonly relocatedPrimitiveTypes?: readonly PrimitiveType[];
173
237
  readonly relocatedNodeCount?: number;
174
238
  readonly shallowestAffectedDepth: number;
239
+ /** Absent on a record written before the field existed, never defaulted (0045). */
240
+ readonly affectedNodeCount?: number;
241
+ /** Absent on a record written before the field existed, never defaulted (0045). */
242
+ readonly configuredPropKeys?: readonly string[];
175
243
  readonly retainedNodeCount: number;
176
244
  readonly irreversibilityReasons: readonly string[];
245
+ /** Absent when no out-of-tree reason fired, and before the field existed (0045). */
246
+ readonly outOfTreeEffectTypes?: readonly PrimitiveType[];
247
+ /** Absent on a record written before the field existed, never defaulted (0045). */
248
+ readonly stakeFactorCodes?: readonly StakeFactorCode[];
177
249
  };
178
250
  export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
179
251
  type: z.ZodLiteral<"intent-received">;
@@ -636,87 +708,158 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
636
708
  configuredNodeCount: z.ZodNumber;
637
709
  touchedPrimitiveTypes: z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">;
638
710
  /**
639
- * Bounded, non-identifying, a subset of the touched types, and the input to
640
- * the only `critical` stake factor. A corpus that cannot group by "the Gate
641
- * saw this type destroyed" cannot ask the question the factor exists for.
711
+ * Bounded, non-identifying, a subset of the touched types, and *which* types a
712
+ * removal destroyed. It was written as the input to "the only `critical` stake
713
+ * factor", which it no longer is — two later rules reach that level (0173,
714
+ * 0179), and `stakeFactorCodes` below carries all thirteen. What is left is
715
+ * the half a code cannot say: `protected-type-removed` says a rule fired, this
716
+ * says what it fired about.
642
717
  */
643
718
  removedPrimitiveTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
644
719
  relocatedPrimitiveTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
645
720
  relocatedNodeCount: z.ZodOptional<z.ZodNumber>;
646
721
  shallowestAffectedDepth: z.ZodNumber;
722
+ /**
723
+ * How many nodes the change named, which is the one thing `broad-change`
724
+ * reads. `affectedNodeIds` itself is content — the ids name parts of a
725
+ * particular page and do not cross (0023) — and the rule compares its
726
+ * *length* against `breadthThreshold`, so the count is the whole of what a
727
+ * later reader needs and the ids never have to be journalled.
728
+ */
729
+ affectedNodeCount: z.ZodOptional<z.ZodNumber>;
730
+ /**
731
+ * The prop names the change set, which is the only input to
732
+ * `protected-prop-configured`.
733
+ *
734
+ * Names and not values: a key is vocabulary the host registered, where a value
735
+ * is what a visitor will read. Bounded by the declaration that accepts them,
736
+ * for the reason `touchedPrimitiveTypes` is bounded by the catalogue.
737
+ */
738
+ configuredPropKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
647
739
  /** Nodes the inverse would have to carry — the content a removal destroyed. */
648
740
  retainedNodeCount: z.ZodNumber;
649
741
  irreversibilityReasons: z.ZodArray<z.ZodString, "many">;
742
+ /**
743
+ * Which of the touched types this policy declared reach outside the page.
744
+ *
745
+ * `irreversibilityReasons` above keeps the codes, and for
746
+ * `retention-budget-exceeded` that is almost lossless — `retainedNodeCount`
747
+ * is journalled beside it, so a screen can say *this one takes nine parts off
748
+ * the page*. For `out-of-tree-effect` the code alone leaves a reader told to
749
+ * go and check something and not told what, and `touchedPrimitiveTypes` above
750
+ * cannot answer it: it is a superset, and naming one of its members as the
751
+ * offender would be a guess on the screen where a guess costs most.
752
+ *
753
+ * Non-identifying for the reason `removedPrimitiveTypes` above is: a type
754
+ * name is vocabulary the deployment registered, not content a visitor typed.
755
+ * Absent when no out-of-tree reason fired, and on a record written before the
756
+ * field existed (0045).
757
+ */
758
+ outOfTreeEffectTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
759
+ /**
760
+ * Which rules the Gate raised, in the order it raised them (0198).
761
+ *
762
+ * `stakes` above is the highest level any of them reached, which is what the
763
+ * Gate compares against a ceiling and is not what a reader of the record wants
764
+ * to know. Three factors are `critical`, so *this project refused four changes
765
+ * as too risky* and *this project refused four changes because the model
766
+ * invented parts that do not exist here* were the same row, and only the
767
+ * second is something an operator can act on.
768
+ *
769
+ * The codes and not the factors: a code is one of thirteen fixed strings,
770
+ * while a factor's `detail` is a sentence naming nodes and types, which is
771
+ * content and does not cross (0023). The level does not cross either, because
772
+ * it is recoverable — twelve of the thirteen are fixed at their code, and
773
+ * `large-removal` is decided by `removedNodeCount` here against the
774
+ * `removalThresholds` of the policy `policyFingerprint` names.
775
+ */
776
+ stakeFactorCodes: z.ZodOptional<z.ZodArray<z.ZodEnum<["protected-type-removed", "protected-type-touched", "protected-type-relocated", "protected-prop-configured", "large-removal", "broad-change", "shallow-structural-change", "discards-later-work", "nested-target", "unknown-primitive", "invalid-props", "unread-binding", "unplaced-slot", "redirected-submission", "repointed-binding"]>, "many">>;
650
777
  }, "strip", z.ZodTypeAny, {
651
778
  proposalId: string & z.BRAND<"ProposalId">;
779
+ retainedNodeCount: number;
652
780
  removedNodeCount: number;
653
781
  stakes: "low" | "medium" | "high" | "critical";
654
782
  reversible: boolean;
783
+ irreversibilityReasons: string[];
655
784
  operationCount: number;
656
785
  insertedNodeCount: number;
657
786
  movedNodeCount: number;
658
787
  configuredNodeCount: number;
659
788
  touchedPrimitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
660
789
  shallowestAffectedDepth: number;
661
- retainedNodeCount: number;
662
- irreversibilityReasons: string[];
790
+ outOfTreeEffectTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
663
791
  removedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
664
792
  relocatedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
665
793
  relocatedNodeCount?: number | undefined;
794
+ affectedNodeCount?: number | undefined;
795
+ configuredPropKeys?: string[] | undefined;
796
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
666
797
  }, {
667
798
  proposalId: string;
799
+ retainedNodeCount: number;
668
800
  removedNodeCount: number;
669
801
  stakes: "low" | "medium" | "high" | "critical";
670
802
  reversible: boolean;
803
+ irreversibilityReasons: string[];
671
804
  operationCount: number;
672
805
  insertedNodeCount: number;
673
806
  movedNodeCount: number;
674
807
  configuredNodeCount: number;
675
808
  touchedPrimitiveTypes: string[];
676
809
  shallowestAffectedDepth: number;
677
- retainedNodeCount: number;
678
- irreversibilityReasons: string[];
810
+ outOfTreeEffectTypes?: string[] | undefined;
679
811
  removedPrimitiveTypes?: string[] | undefined;
680
812
  relocatedPrimitiveTypes?: string[] | undefined;
681
813
  relocatedNodeCount?: number | undefined;
814
+ affectedNodeCount?: number | undefined;
815
+ configuredPropKeys?: string[] | undefined;
816
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
682
817
  }>;
683
818
  }, "strip", z.ZodTypeAny, {
684
819
  type: "change-assessed";
685
820
  assessment: {
686
821
  proposalId: string & z.BRAND<"ProposalId">;
822
+ retainedNodeCount: number;
687
823
  removedNodeCount: number;
688
824
  stakes: "low" | "medium" | "high" | "critical";
689
825
  reversible: boolean;
826
+ irreversibilityReasons: string[];
690
827
  operationCount: number;
691
828
  insertedNodeCount: number;
692
829
  movedNodeCount: number;
693
830
  configuredNodeCount: number;
694
831
  touchedPrimitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
695
832
  shallowestAffectedDepth: number;
696
- retainedNodeCount: number;
697
- irreversibilityReasons: string[];
833
+ outOfTreeEffectTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
698
834
  removedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
699
835
  relocatedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
700
836
  relocatedNodeCount?: number | undefined;
837
+ affectedNodeCount?: number | undefined;
838
+ configuredPropKeys?: string[] | undefined;
839
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
701
840
  };
702
841
  }, {
703
842
  type: "change-assessed";
704
843
  assessment: {
705
844
  proposalId: string;
845
+ retainedNodeCount: number;
706
846
  removedNodeCount: number;
707
847
  stakes: "low" | "medium" | "high" | "critical";
708
848
  reversible: boolean;
849
+ irreversibilityReasons: string[];
709
850
  operationCount: number;
710
851
  insertedNodeCount: number;
711
852
  movedNodeCount: number;
712
853
  configuredNodeCount: number;
713
854
  touchedPrimitiveTypes: string[];
714
855
  shallowestAffectedDepth: number;
715
- retainedNodeCount: number;
716
- irreversibilityReasons: string[];
856
+ outOfTreeEffectTypes?: string[] | undefined;
717
857
  removedPrimitiveTypes?: string[] | undefined;
718
858
  relocatedPrimitiveTypes?: string[] | undefined;
719
859
  relocatedNodeCount?: number | undefined;
860
+ affectedNodeCount?: number | undefined;
861
+ configuredPropKeys?: string[] | undefined;
862
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
720
863
  };
721
864
  }>, z.ZodObject<{
722
865
  type: z.ZodLiteral<"disposition-decided">;
@@ -738,6 +881,29 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
738
881
  confidence: z.ZodNumber;
739
882
  policyId: z.ZodDefault<z.ZodString>;
740
883
  policyFingerprint: z.ZodOptional<z.ZodString>;
884
+ wiredChecks: z.ZodOptional<z.ZodArray<z.ZodEnum<["props", "bindings", "regions"]>, "many">>;
885
+ irreversibilityReasons: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
886
+ code: z.ZodLiteral<"out-of-tree-effect">;
887
+ primitiveTypes: z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">;
888
+ }, "strip", z.ZodTypeAny, {
889
+ code: "out-of-tree-effect";
890
+ primitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
891
+ }, {
892
+ code: "out-of-tree-effect";
893
+ primitiveTypes: string[];
894
+ }>, z.ZodObject<{
895
+ code: z.ZodLiteral<"retention-budget-exceeded">;
896
+ retainedNodeCount: z.ZodNumber;
897
+ budget: z.ZodNumber;
898
+ }, "strip", z.ZodTypeAny, {
899
+ code: "retention-budget-exceeded";
900
+ retainedNodeCount: number;
901
+ budget: number;
902
+ }, {
903
+ code: "retention-budget-exceeded";
904
+ retainedNodeCount: number;
905
+ budget: number;
906
+ }>]>, "many">>;
741
907
  }, "strip", z.ZodTypeAny, {
742
908
  kind: "rejected" | "accepted" | "requires-confirmation";
743
909
  confidence: number;
@@ -749,6 +915,15 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
749
915
  stakes: "low" | "medium" | "high" | "critical";
750
916
  reversible: boolean;
751
917
  policyFingerprint?: string | undefined;
918
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
919
+ irreversibilityReasons?: ({
920
+ code: "out-of-tree-effect";
921
+ primitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
922
+ } | {
923
+ code: "retention-budget-exceeded";
924
+ retainedNodeCount: number;
925
+ budget: number;
926
+ })[] | undefined;
752
927
  }, {
753
928
  kind: "rejected" | "accepted" | "requires-confirmation";
754
929
  confidence: number;
@@ -760,6 +935,15 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
760
935
  reversible: boolean;
761
936
  policyId?: string | undefined;
762
937
  policyFingerprint?: string | undefined;
938
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
939
+ irreversibilityReasons?: ({
940
+ code: "out-of-tree-effect";
941
+ primitiveTypes: string[];
942
+ } | {
943
+ code: "retention-budget-exceeded";
944
+ retainedNodeCount: number;
945
+ budget: number;
946
+ })[] | undefined;
763
947
  }>;
764
948
  }, "strip", z.ZodTypeAny, {
765
949
  type: "disposition-decided";
@@ -775,6 +959,15 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
775
959
  stakes: "low" | "medium" | "high" | "critical";
776
960
  reversible: boolean;
777
961
  policyFingerprint?: string | undefined;
962
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
963
+ irreversibilityReasons?: ({
964
+ code: "out-of-tree-effect";
965
+ primitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
966
+ } | {
967
+ code: "retention-budget-exceeded";
968
+ retainedNodeCount: number;
969
+ budget: number;
970
+ })[] | undefined;
778
971
  };
779
972
  }, {
780
973
  type: "disposition-decided";
@@ -790,6 +983,15 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
790
983
  reversible: boolean;
791
984
  policyId?: string | undefined;
792
985
  policyFingerprint?: string | undefined;
986
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
987
+ irreversibilityReasons?: ({
988
+ code: "out-of-tree-effect";
989
+ primitiveTypes: string[];
990
+ } | {
991
+ code: "retention-budget-exceeded";
992
+ retainedNodeCount: number;
993
+ budget: number;
994
+ })[] | undefined;
793
995
  };
794
996
  }>, z.ZodObject<{
795
997
  type: z.ZodLiteral<"repair-requested">;
@@ -1566,87 +1768,158 @@ export declare const telemetryRecordSchema: z.ZodObject<{
1566
1768
  configuredNodeCount: z.ZodNumber;
1567
1769
  touchedPrimitiveTypes: z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">;
1568
1770
  /**
1569
- * Bounded, non-identifying, a subset of the touched types, and the input to
1570
- * the only `critical` stake factor. A corpus that cannot group by "the Gate
1571
- * saw this type destroyed" cannot ask the question the factor exists for.
1771
+ * Bounded, non-identifying, a subset of the touched types, and *which* types a
1772
+ * removal destroyed. It was written as the input to "the only `critical` stake
1773
+ * factor", which it no longer is — two later rules reach that level (0173,
1774
+ * 0179), and `stakeFactorCodes` below carries all thirteen. What is left is
1775
+ * the half a code cannot say: `protected-type-removed` says a rule fired, this
1776
+ * says what it fired about.
1572
1777
  */
1573
1778
  removedPrimitiveTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
1574
1779
  relocatedPrimitiveTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
1575
1780
  relocatedNodeCount: z.ZodOptional<z.ZodNumber>;
1576
1781
  shallowestAffectedDepth: z.ZodNumber;
1782
+ /**
1783
+ * How many nodes the change named, which is the one thing `broad-change`
1784
+ * reads. `affectedNodeIds` itself is content — the ids name parts of a
1785
+ * particular page and do not cross (0023) — and the rule compares its
1786
+ * *length* against `breadthThreshold`, so the count is the whole of what a
1787
+ * later reader needs and the ids never have to be journalled.
1788
+ */
1789
+ affectedNodeCount: z.ZodOptional<z.ZodNumber>;
1790
+ /**
1791
+ * The prop names the change set, which is the only input to
1792
+ * `protected-prop-configured`.
1793
+ *
1794
+ * Names and not values: a key is vocabulary the host registered, where a value
1795
+ * is what a visitor will read. Bounded by the declaration that accepts them,
1796
+ * for the reason `touchedPrimitiveTypes` is bounded by the catalogue.
1797
+ */
1798
+ configuredPropKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1577
1799
  /** Nodes the inverse would have to carry — the content a removal destroyed. */
1578
1800
  retainedNodeCount: z.ZodNumber;
1579
1801
  irreversibilityReasons: z.ZodArray<z.ZodString, "many">;
1802
+ /**
1803
+ * Which of the touched types this policy declared reach outside the page.
1804
+ *
1805
+ * `irreversibilityReasons` above keeps the codes, and for
1806
+ * `retention-budget-exceeded` that is almost lossless — `retainedNodeCount`
1807
+ * is journalled beside it, so a screen can say *this one takes nine parts off
1808
+ * the page*. For `out-of-tree-effect` the code alone leaves a reader told to
1809
+ * go and check something and not told what, and `touchedPrimitiveTypes` above
1810
+ * cannot answer it: it is a superset, and naming one of its members as the
1811
+ * offender would be a guess on the screen where a guess costs most.
1812
+ *
1813
+ * Non-identifying for the reason `removedPrimitiveTypes` above is: a type
1814
+ * name is vocabulary the deployment registered, not content a visitor typed.
1815
+ * Absent when no out-of-tree reason fired, and on a record written before the
1816
+ * field existed (0045).
1817
+ */
1818
+ outOfTreeEffectTypes: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">>;
1819
+ /**
1820
+ * Which rules the Gate raised, in the order it raised them (0198).
1821
+ *
1822
+ * `stakes` above is the highest level any of them reached, which is what the
1823
+ * Gate compares against a ceiling and is not what a reader of the record wants
1824
+ * to know. Three factors are `critical`, so *this project refused four changes
1825
+ * as too risky* and *this project refused four changes because the model
1826
+ * invented parts that do not exist here* were the same row, and only the
1827
+ * second is something an operator can act on.
1828
+ *
1829
+ * The codes and not the factors: a code is one of thirteen fixed strings,
1830
+ * while a factor's `detail` is a sentence naming nodes and types, which is
1831
+ * content and does not cross (0023). The level does not cross either, because
1832
+ * it is recoverable — twelve of the thirteen are fixed at their code, and
1833
+ * `large-removal` is decided by `removedNodeCount` here against the
1834
+ * `removalThresholds` of the policy `policyFingerprint` names.
1835
+ */
1836
+ stakeFactorCodes: z.ZodOptional<z.ZodArray<z.ZodEnum<["protected-type-removed", "protected-type-touched", "protected-type-relocated", "protected-prop-configured", "large-removal", "broad-change", "shallow-structural-change", "discards-later-work", "nested-target", "unknown-primitive", "invalid-props", "unread-binding", "unplaced-slot", "redirected-submission", "repointed-binding"]>, "many">>;
1580
1837
  }, "strip", z.ZodTypeAny, {
1581
1838
  proposalId: string & z.BRAND<"ProposalId">;
1839
+ retainedNodeCount: number;
1582
1840
  removedNodeCount: number;
1583
1841
  stakes: "low" | "medium" | "high" | "critical";
1584
1842
  reversible: boolean;
1843
+ irreversibilityReasons: string[];
1585
1844
  operationCount: number;
1586
1845
  insertedNodeCount: number;
1587
1846
  movedNodeCount: number;
1588
1847
  configuredNodeCount: number;
1589
1848
  touchedPrimitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
1590
1849
  shallowestAffectedDepth: number;
1591
- retainedNodeCount: number;
1592
- irreversibilityReasons: string[];
1850
+ outOfTreeEffectTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
1593
1851
  removedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
1594
1852
  relocatedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
1595
1853
  relocatedNodeCount?: number | undefined;
1854
+ affectedNodeCount?: number | undefined;
1855
+ configuredPropKeys?: string[] | undefined;
1856
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
1596
1857
  }, {
1597
1858
  proposalId: string;
1859
+ retainedNodeCount: number;
1598
1860
  removedNodeCount: number;
1599
1861
  stakes: "low" | "medium" | "high" | "critical";
1600
1862
  reversible: boolean;
1863
+ irreversibilityReasons: string[];
1601
1864
  operationCount: number;
1602
1865
  insertedNodeCount: number;
1603
1866
  movedNodeCount: number;
1604
1867
  configuredNodeCount: number;
1605
1868
  touchedPrimitiveTypes: string[];
1606
1869
  shallowestAffectedDepth: number;
1607
- retainedNodeCount: number;
1608
- irreversibilityReasons: string[];
1870
+ outOfTreeEffectTypes?: string[] | undefined;
1609
1871
  removedPrimitiveTypes?: string[] | undefined;
1610
1872
  relocatedPrimitiveTypes?: string[] | undefined;
1611
1873
  relocatedNodeCount?: number | undefined;
1874
+ affectedNodeCount?: number | undefined;
1875
+ configuredPropKeys?: string[] | undefined;
1876
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
1612
1877
  }>;
1613
1878
  }, "strip", z.ZodTypeAny, {
1614
1879
  type: "change-assessed";
1615
1880
  assessment: {
1616
1881
  proposalId: string & z.BRAND<"ProposalId">;
1882
+ retainedNodeCount: number;
1617
1883
  removedNodeCount: number;
1618
1884
  stakes: "low" | "medium" | "high" | "critical";
1619
1885
  reversible: boolean;
1886
+ irreversibilityReasons: string[];
1620
1887
  operationCount: number;
1621
1888
  insertedNodeCount: number;
1622
1889
  movedNodeCount: number;
1623
1890
  configuredNodeCount: number;
1624
1891
  touchedPrimitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
1625
1892
  shallowestAffectedDepth: number;
1626
- retainedNodeCount: number;
1627
- irreversibilityReasons: string[];
1893
+ outOfTreeEffectTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
1628
1894
  removedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
1629
1895
  relocatedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
1630
1896
  relocatedNodeCount?: number | undefined;
1897
+ affectedNodeCount?: number | undefined;
1898
+ configuredPropKeys?: string[] | undefined;
1899
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
1631
1900
  };
1632
1901
  }, {
1633
1902
  type: "change-assessed";
1634
1903
  assessment: {
1635
1904
  proposalId: string;
1905
+ retainedNodeCount: number;
1636
1906
  removedNodeCount: number;
1637
1907
  stakes: "low" | "medium" | "high" | "critical";
1638
1908
  reversible: boolean;
1909
+ irreversibilityReasons: string[];
1639
1910
  operationCount: number;
1640
1911
  insertedNodeCount: number;
1641
1912
  movedNodeCount: number;
1642
1913
  configuredNodeCount: number;
1643
1914
  touchedPrimitiveTypes: string[];
1644
1915
  shallowestAffectedDepth: number;
1645
- retainedNodeCount: number;
1646
- irreversibilityReasons: string[];
1916
+ outOfTreeEffectTypes?: string[] | undefined;
1647
1917
  removedPrimitiveTypes?: string[] | undefined;
1648
1918
  relocatedPrimitiveTypes?: string[] | undefined;
1649
1919
  relocatedNodeCount?: number | undefined;
1920
+ affectedNodeCount?: number | undefined;
1921
+ configuredPropKeys?: string[] | undefined;
1922
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
1650
1923
  };
1651
1924
  }>, z.ZodObject<{
1652
1925
  type: z.ZodLiteral<"disposition-decided">;
@@ -1668,6 +1941,29 @@ export declare const telemetryRecordSchema: z.ZodObject<{
1668
1941
  confidence: z.ZodNumber;
1669
1942
  policyId: z.ZodDefault<z.ZodString>;
1670
1943
  policyFingerprint: z.ZodOptional<z.ZodString>;
1944
+ wiredChecks: z.ZodOptional<z.ZodArray<z.ZodEnum<["props", "bindings", "regions"]>, "many">>;
1945
+ irreversibilityReasons: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
1946
+ code: z.ZodLiteral<"out-of-tree-effect">;
1947
+ primitiveTypes: z.ZodArray<z.ZodBranded<z.ZodString, "PrimitiveType">, "many">;
1948
+ }, "strip", z.ZodTypeAny, {
1949
+ code: "out-of-tree-effect";
1950
+ primitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
1951
+ }, {
1952
+ code: "out-of-tree-effect";
1953
+ primitiveTypes: string[];
1954
+ }>, z.ZodObject<{
1955
+ code: z.ZodLiteral<"retention-budget-exceeded">;
1956
+ retainedNodeCount: z.ZodNumber;
1957
+ budget: z.ZodNumber;
1958
+ }, "strip", z.ZodTypeAny, {
1959
+ code: "retention-budget-exceeded";
1960
+ retainedNodeCount: number;
1961
+ budget: number;
1962
+ }, {
1963
+ code: "retention-budget-exceeded";
1964
+ retainedNodeCount: number;
1965
+ budget: number;
1966
+ }>]>, "many">>;
1671
1967
  }, "strip", z.ZodTypeAny, {
1672
1968
  kind: "rejected" | "accepted" | "requires-confirmation";
1673
1969
  confidence: number;
@@ -1679,6 +1975,15 @@ export declare const telemetryRecordSchema: z.ZodObject<{
1679
1975
  stakes: "low" | "medium" | "high" | "critical";
1680
1976
  reversible: boolean;
1681
1977
  policyFingerprint?: string | undefined;
1978
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
1979
+ irreversibilityReasons?: ({
1980
+ code: "out-of-tree-effect";
1981
+ primitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
1982
+ } | {
1983
+ code: "retention-budget-exceeded";
1984
+ retainedNodeCount: number;
1985
+ budget: number;
1986
+ })[] | undefined;
1682
1987
  }, {
1683
1988
  kind: "rejected" | "accepted" | "requires-confirmation";
1684
1989
  confidence: number;
@@ -1690,6 +1995,15 @@ export declare const telemetryRecordSchema: z.ZodObject<{
1690
1995
  reversible: boolean;
1691
1996
  policyId?: string | undefined;
1692
1997
  policyFingerprint?: string | undefined;
1998
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
1999
+ irreversibilityReasons?: ({
2000
+ code: "out-of-tree-effect";
2001
+ primitiveTypes: string[];
2002
+ } | {
2003
+ code: "retention-budget-exceeded";
2004
+ retainedNodeCount: number;
2005
+ budget: number;
2006
+ })[] | undefined;
1693
2007
  }>;
1694
2008
  }, "strip", z.ZodTypeAny, {
1695
2009
  type: "disposition-decided";
@@ -1705,6 +2019,15 @@ export declare const telemetryRecordSchema: z.ZodObject<{
1705
2019
  stakes: "low" | "medium" | "high" | "critical";
1706
2020
  reversible: boolean;
1707
2021
  policyFingerprint?: string | undefined;
2022
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
2023
+ irreversibilityReasons?: ({
2024
+ code: "out-of-tree-effect";
2025
+ primitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
2026
+ } | {
2027
+ code: "retention-budget-exceeded";
2028
+ retainedNodeCount: number;
2029
+ budget: number;
2030
+ })[] | undefined;
1708
2031
  };
1709
2032
  }, {
1710
2033
  type: "disposition-decided";
@@ -1720,6 +2043,15 @@ export declare const telemetryRecordSchema: z.ZodObject<{
1720
2043
  reversible: boolean;
1721
2044
  policyId?: string | undefined;
1722
2045
  policyFingerprint?: string | undefined;
2046
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
2047
+ irreversibilityReasons?: ({
2048
+ code: "out-of-tree-effect";
2049
+ primitiveTypes: string[];
2050
+ } | {
2051
+ code: "retention-budget-exceeded";
2052
+ retainedNodeCount: number;
2053
+ budget: number;
2054
+ })[] | undefined;
1723
2055
  };
1724
2056
  }>, z.ZodObject<{
1725
2057
  type: z.ZodLiteral<"repair-requested">;
@@ -2024,20 +2356,24 @@ export declare const telemetryRecordSchema: z.ZodObject<{
2024
2356
  type: "change-assessed";
2025
2357
  assessment: {
2026
2358
  proposalId: string & z.BRAND<"ProposalId">;
2359
+ retainedNodeCount: number;
2027
2360
  removedNodeCount: number;
2028
2361
  stakes: "low" | "medium" | "high" | "critical";
2029
2362
  reversible: boolean;
2363
+ irreversibilityReasons: string[];
2030
2364
  operationCount: number;
2031
2365
  insertedNodeCount: number;
2032
2366
  movedNodeCount: number;
2033
2367
  configuredNodeCount: number;
2034
2368
  touchedPrimitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
2035
2369
  shallowestAffectedDepth: number;
2036
- retainedNodeCount: number;
2037
- irreversibilityReasons: string[];
2370
+ outOfTreeEffectTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
2038
2371
  removedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
2039
2372
  relocatedPrimitiveTypes?: (string & z.BRAND<"PrimitiveType">)[] | undefined;
2040
2373
  relocatedNodeCount?: number | undefined;
2374
+ affectedNodeCount?: number | undefined;
2375
+ configuredPropKeys?: string[] | undefined;
2376
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
2041
2377
  };
2042
2378
  } | {
2043
2379
  type: "disposition-decided";
@@ -2053,6 +2389,15 @@ export declare const telemetryRecordSchema: z.ZodObject<{
2053
2389
  stakes: "low" | "medium" | "high" | "critical";
2054
2390
  reversible: boolean;
2055
2391
  policyFingerprint?: string | undefined;
2392
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
2393
+ irreversibilityReasons?: ({
2394
+ code: "out-of-tree-effect";
2395
+ primitiveTypes: (string & z.BRAND<"PrimitiveType">)[];
2396
+ } | {
2397
+ code: "retention-budget-exceeded";
2398
+ retainedNodeCount: number;
2399
+ budget: number;
2400
+ })[] | undefined;
2056
2401
  };
2057
2402
  } | {
2058
2403
  type: "repair-requested";
@@ -2199,20 +2544,24 @@ export declare const telemetryRecordSchema: z.ZodObject<{
2199
2544
  type: "change-assessed";
2200
2545
  assessment: {
2201
2546
  proposalId: string;
2547
+ retainedNodeCount: number;
2202
2548
  removedNodeCount: number;
2203
2549
  stakes: "low" | "medium" | "high" | "critical";
2204
2550
  reversible: boolean;
2551
+ irreversibilityReasons: string[];
2205
2552
  operationCount: number;
2206
2553
  insertedNodeCount: number;
2207
2554
  movedNodeCount: number;
2208
2555
  configuredNodeCount: number;
2209
2556
  touchedPrimitiveTypes: string[];
2210
2557
  shallowestAffectedDepth: number;
2211
- retainedNodeCount: number;
2212
- irreversibilityReasons: string[];
2558
+ outOfTreeEffectTypes?: string[] | undefined;
2213
2559
  removedPrimitiveTypes?: string[] | undefined;
2214
2560
  relocatedPrimitiveTypes?: string[] | undefined;
2215
2561
  relocatedNodeCount?: number | undefined;
2562
+ affectedNodeCount?: number | undefined;
2563
+ configuredPropKeys?: string[] | undefined;
2564
+ stakeFactorCodes?: ("protected-type-removed" | "protected-type-touched" | "protected-type-relocated" | "protected-prop-configured" | "large-removal" | "broad-change" | "shallow-structural-change" | "discards-later-work" | "nested-target" | "unknown-primitive" | "invalid-props" | "unread-binding" | "unplaced-slot" | "redirected-submission" | "repointed-binding")[] | undefined;
2216
2565
  };
2217
2566
  } | {
2218
2567
  type: "disposition-decided";
@@ -2228,6 +2577,15 @@ export declare const telemetryRecordSchema: z.ZodObject<{
2228
2577
  reversible: boolean;
2229
2578
  policyId?: string | undefined;
2230
2579
  policyFingerprint?: string | undefined;
2580
+ wiredChecks?: ("props" | "bindings" | "regions")[] | undefined;
2581
+ irreversibilityReasons?: ({
2582
+ code: "out-of-tree-effect";
2583
+ primitiveTypes: string[];
2584
+ } | {
2585
+ code: "retention-budget-exceeded";
2586
+ retainedNodeCount: number;
2587
+ budget: number;
2588
+ })[] | undefined;
2231
2589
  };
2232
2590
  } | {
2233
2591
  type: "repair-requested";