@ai-matrx/content-ir-react 0.7.1 → 0.8.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 (46) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/component-resolution.types-BS1ySIg-.d.cts +104 -0
  3. package/dist/component-resolution.types-BS1ySIg-.d.ts +104 -0
  4. package/dist/component-resolution.types-fvR92hW7.d.cts +142 -0
  5. package/dist/component-resolution.types-fvR92hW7.d.ts +142 -0
  6. package/dist/db-component.cjs +226 -0
  7. package/dist/db-component.cjs.map +1 -0
  8. package/dist/db-component.d.cts +267 -0
  9. package/dist/db-component.d.ts +267 -0
  10. package/dist/db-component.js +194 -0
  11. package/dist/db-component.js.map +1 -0
  12. package/dist/host-types-CZ_Bkp4R.d.ts +131 -0
  13. package/dist/host-types-DvGv8s9L.d.cts +131 -0
  14. package/dist/host.cjs +74 -0
  15. package/dist/host.cjs.map +1 -0
  16. package/dist/host.d.cts +24 -0
  17. package/dist/host.d.ts +24 -0
  18. package/dist/host.js +52 -0
  19. package/dist/host.js.map +1 -0
  20. package/dist/index.cjs +356 -90
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +280 -672
  23. package/dist/index.d.ts +280 -672
  24. package/dist/index.js +316 -31
  25. package/dist/index.js.map +1 -1
  26. package/dist/react.cjs +361 -0
  27. package/dist/react.cjs.map +1 -0
  28. package/dist/react.d.cts +195 -0
  29. package/dist/react.d.ts +195 -0
  30. package/dist/react.js +344 -0
  31. package/dist/react.js.map +1 -0
  32. package/dist/resolver.cjs +327 -0
  33. package/dist/resolver.cjs.map +1 -0
  34. package/dist/resolver.d.cts +133 -0
  35. package/dist/resolver.d.ts +133 -0
  36. package/dist/resolver.js +304 -0
  37. package/dist/resolver.js.map +1 -0
  38. package/dist/route-C1XNcubB.d.ts +433 -0
  39. package/dist/route-C55jsF4B.d.cts +433 -0
  40. package/dist/route.cjs +259 -0
  41. package/dist/route.cjs.map +1 -0
  42. package/dist/route.d.cts +4 -0
  43. package/dist/route.d.ts +4 -0
  44. package/dist/route.js +247 -0
  45. package/dist/route.js.map +1 -0
  46. package/package.json +75 -2
@@ -0,0 +1,433 @@
1
+ import { C as ComponentResolutionSource, b as ContentIrErrorReporter, a as ComponentResolution } from './component-resolution.types-fvR92hW7.cjs';
2
+ import { ReactNode } from 'react';
3
+ import { KindDefinition, CanonicalBlockIR, PartialKindEvent } from '@ai-matrx/content-ir';
4
+
5
+ /**
6
+ * THE HOST CONTRACT — everything this package refuses to decide.
7
+ *
8
+ * The kernel (`@ai-matrx/content-ir`) proved the shape: extract the portable
9
+ * part, let host capability enter through explicit named seams. The render
10
+ * layer needs four things it must never own:
11
+ *
12
+ * 1. WHERE KIND DEFINITIONS COME FROM (a bundled table, `content_ir`, a REST
13
+ * call). The route only asks "is this kind registered, and does it carry a
14
+ * legacy bridge / a partial-ready opt-in".
15
+ * 2. WHERE COMPONENT ROWS COME FROM — {@link ComponentResolutionSource}. The
16
+ * package ships `ComponentResolver`, which any host can construct with its
17
+ * own loaders; a host with its own resolver only has to satisfy the type.
18
+ * 3. HOW A ROUTED BLOCK ACTUALLY DRAWS. `applyIrKindRoute` decides a block's
19
+ * TYPE; turning that type into pixels is the host's dispatch table
20
+ * (matrx-frontend's `BlockRenderer`, the dashboard's small map). The
21
+ * package never imports a component library.
22
+ * 4. WHERE SCREAMS LAND — {@link ContentIrErrorReporter}.
23
+ *
24
+ * No Next.js, no Redux, no Supabase, no router, no host error capture. If a
25
+ * seam is missing, ADD A SEAM — never an import.
26
+ */
27
+
28
+ /**
29
+ * The minimum a render block must expose for the kind route to work. Hosts
30
+ * pass their own richer block type through; the route is generic over `T` and
31
+ * preserves every extra field.
32
+ */
33
+ interface IrRoutableBlock {
34
+ type: string;
35
+ serverData?: Record<string, unknown>;
36
+ metadata?: Record<string, unknown>;
37
+ }
38
+ /** A routable block that also carries its source text (the raw region). */
39
+ interface IrRenderBlock extends IrRoutableBlock {
40
+ content: string;
41
+ language?: string;
42
+ }
43
+ /**
44
+ * Where registered kinds come from. `getDefinition` is the only method the
45
+ * pure route needs; the rest drive the granular repaint and the warm-up tick
46
+ * that keeps a cold registry from being mistaken for "this kind has no
47
+ * component".
48
+ */
49
+ interface KindDefinitionSource {
50
+ getDefinition(kind: string): KindDefinition | undefined;
51
+ /** Monotonic per-kind version — the repaint snapshot key. */
52
+ getKindVersion(kind: string): number;
53
+ subscribeKind(kind: string, listener: () => void): () => void;
54
+ /** One definition load per app session. */
55
+ ensureWarm(): Promise<void>;
56
+ }
57
+ /**
58
+ * The rendering seams. Everything here returns host UI; the package supplies
59
+ * the DECISIONS and the chrome-free structure around them.
60
+ */
61
+ interface ContentIrRenderSeams {
62
+ /**
63
+ * Draw a block the kind route has already typed. This is the host's dispatch
64
+ * table — the single place a component key becomes a component.
65
+ */
66
+ renderBlock(block: IrRenderBlock): ReactNode;
67
+ /**
68
+ * THE FLOOR: render ANY JSON value as a human document. Reached when a kind
69
+ * has no render-trusted component, when the value is not an object at all,
70
+ * and by the generic structured view.
71
+ *
72
+ * This is deliberately a seam and not a bundled component. Rendering a value
73
+ * WELL means prose through the host's markdown renderer, media through the
74
+ * host's file handler, and uniform arrays through the host's data table —
75
+ * all of which are host property. A host that has none of those can pass a
76
+ * `<pre>`; it will be honest, just plain.
77
+ */
78
+ renderValue(props: StructuredValueRenderProps): ReactNode;
79
+ /**
80
+ * The "still arriving" indicator used by the provisional frame. Optional —
81
+ * hosts without a shimmer get plain text.
82
+ */
83
+ renderShimmer?(text: string): ReactNode;
84
+ /**
85
+ * The honest "this shape has no custom component yet" notice. Optional: the
86
+ * package draws a plain amber line when a host supplies nothing, and a host
87
+ * with an icon set or its own callout component supplies that instead. It is
88
+ * a seam and not a bundled component because this package depends on no icon
89
+ * library.
90
+ */
91
+ renderNotice?(text: string): ReactNode;
92
+ }
93
+ interface StructuredValueRenderProps {
94
+ value: unknown;
95
+ /** The kind slug this value claims, when known. Honesty line only — never a renderer choice. */
96
+ kind?: string;
97
+ /** Why this shape has no custom view, in human words. */
98
+ note?: string;
99
+ /** Show the "what this is / raw data" footer. Default true. */
100
+ footer?: boolean;
101
+ }
102
+ /**
103
+ * One host, wired once, read by every component in this package through
104
+ * {@link ContentIrRenderProvider}.
105
+ */
106
+ interface ContentIrHost extends ContentIrRenderSeams {
107
+ kinds: KindDefinitionSource;
108
+ components: ComponentResolutionSource;
109
+ reportError: ContentIrErrorReporter;
110
+ /**
111
+ * The `kind_component.platform` this host resolves as. "web" for every
112
+ * browser UI; the column already models "react-native" and friends, and a
113
+ * host that lies here renders the wrong component everywhere.
114
+ */
115
+ platform: string;
116
+ }
117
+ /**
118
+ * The pure route's dependencies — a strict subset of {@link ContentIrHost},
119
+ * because `applyIrKindRoute` is called OUTSIDE React (reducers, stream
120
+ * accumulators, tests) where there is no provider to read.
121
+ */
122
+ interface KindRouteEnv {
123
+ kinds: Pick<KindDefinitionSource, "getDefinition">;
124
+ components: Pick<ComponentResolutionSource, "resolve">;
125
+ reportError: ContentIrErrorReporter;
126
+ platform: string;
127
+ }
128
+ /** Narrow a host (or anything host-shaped) to what the pure route needs. */
129
+ declare function routeEnvOf(host: ContentIrHost): KindRouteEnv;
130
+
131
+ /**
132
+ * THE KIND ROUTE — the render flip, as a pure block transform.
133
+ *
134
+ * A block whose `metadata.__ir` envelope resolved a REGISTERED kind is routed
135
+ * to that kind's component: via the legacy-bridge facet (`legacyBlockType` +
136
+ * `toLegacyServerData`) when the kind has one, so the block enters the host's
137
+ * existing renderer as its real type with envelope-derived serverData;
138
+ * otherwise via the component resolver. Blocks with no envelope, an
139
+ * unregistered kind, or no bridge facet pass through UNTOUCHED — the strangler
140
+ * seam.
141
+ *
142
+ * This is where a bare/fenced JSON flashcard_set — which a text detector could
143
+ * only ever call "code" — becomes real flashcards, live while streaming.
144
+ *
145
+ * PORTABILITY. This function was matrx-frontend's `react/kind-route.ts` and is
146
+ * the single most-copied thing in the system: every UI that renders a kind has
147
+ * to make exactly these decisions in exactly this order, and a second
148
+ * implementation of them is a guaranteed divergence. It takes its registries,
149
+ * its platform, and its error sink as an {@link KindRouteEnv} argument rather
150
+ * than importing them, so it is callable from a reducer, a stream accumulator,
151
+ * a test, or a React render — in any app.
152
+ *
153
+ * Semantics: `matrx-frontend/features/content-ir/docs/SHAPE_SYSTEM.md`
154
+ * (registry, dual gate, `kind_component` resolution, rulings R1 + R6).
155
+ */
156
+
157
+ /**
158
+ * Runtime routing marker (the Shape System's verification hook): stamped on
159
+ * `metadata.__ir_route` whenever a block routes AND the component resolver
160
+ * produced the decision. `by` says which resolver tier answered ("compiled"
161
+ * floor vs a warm `content_ir.kind_component` row) — the live proof of
162
+ * registry-resolution vs hard-coded fallback. Metadata-only, non-breaking.
163
+ */
164
+ declare const IR_ROUTE_KEY: "__ir_route";
165
+ /**
166
+ * The component key the R6 generic fallback routes to — the official renderer
167
+ * for a KNOWN shape that nothing render-trusted claims. Hosts map this key to
168
+ * their generic structured view (the package ships one: `GenericStructuredView`).
169
+ */
170
+ declare const GENERIC_STRUCTURED_COMPONENT_KEY: "generic_structured";
171
+ /**
172
+ * The block type a DB-sourced (user-authored) kind component renders as.
173
+ * FE-synthesized: produced ONLY here, never emitted upstream. A host that has
174
+ * no sandbox for user components simply does not map this key — the block then
175
+ * falls to that host's unknown-type handling, which is honest.
176
+ */
177
+ declare const DB_KIND_COMPONENT_KEY: "db_kind_component";
178
+ /** Test-only reset of the once-per-kind console latch. */
179
+ declare function resetSourcelessDbRowReports(): void;
180
+ /** Why a block landed on the generic viewer instead of a real renderer. */
181
+ type GenericFallbackReason =
182
+ /** No compiled bridge and no `content_ir.kind_component` row at all. */
183
+ "no-component"
184
+ /** A component row exists but is held `is_active = false`. */
185
+ | "inactive"
186
+ /**
187
+ * An ACTIVE component row exists and names `generic_structured` — i.e. the
188
+ * fallback, registered under a component's name. This reads as coverage to
189
+ * every count-the-rows check on the platform and is not: the reader still
190
+ * gets a key/value dump. Kept as its own reason because the repair differs
191
+ * (author a component AND retire the decoy row), and because a page that
192
+ * silently marked itself `by: "bundled"` here is how 226 of 428 active
193
+ * kinds came to be certified as renderable while rendering generically
194
+ * (found 2026-08-23).
195
+ */
196
+ | "generic-row"
197
+ /**
198
+ * The envelope carries a kind-preserved RAW: the payload identified a
199
+ * registered kind and its value FAILED a check — a schema violation, an
200
+ * array-item kind mismatch, a duplicate key, a contradicted speculation.
201
+ * The instance is BROKEN, not component-less — the repair is fixing the
202
+ * payload or the schema, and the generic floor must acknowledge the kind and
203
+ * surface the recorded problems.
204
+ *
205
+ * NOT this: a kind whose schema was never available (`kindState:
206
+ * "unverified"`). Nothing checked that value, so calling it broken is a
207
+ * false accusation — it routes to its component. The two were one state
208
+ * until 2026-08-29 and conflating them was a platform-wide outage.
209
+ */
210
+ | "broken-instance"
211
+ /**
212
+ * The slug is not in the registry at all (typo, foreign emitter, a shape
213
+ * not yet created). Routed anyway — Arman's 2026-08-29 ruling: a root
214
+ * `__kind` key means the kind system owns the render, no exceptions. The
215
+ * repair is creating/registering the shape (or fixing the slug).
216
+ */
217
+ | "unregistered";
218
+ interface IrRouteMarker {
219
+ by: ComponentResolution["resolvedBy"] | "generic";
220
+ key: string;
221
+ /**
222
+ * Only on the generic fallback: the shape is NOT render-trusted, so the
223
+ * viewer must say so out loud (R6 — never an error, never hidden content).
224
+ */
225
+ unverified?: true;
226
+ reason?: GenericFallbackReason;
227
+ }
228
+ /** Read the routing marker a block picked up at the seam (or null). */
229
+ declare function readIrRouteMarker(metadata: Record<string, unknown> | null | undefined): IrRouteMarker | null;
230
+ interface KindRouteOptions {
231
+ /**
232
+ * Block types this host OWNS and the route must never re-type, however good
233
+ * the envelope on them looks.
234
+ *
235
+ * matrx-frontend passes `["artifact"]`: an artifact block has an identity, a
236
+ * version, and a Canvas to open in, and since 2026-08-18 it carries
237
+ * `metadata.__ir` so SELECTORS can read the envelope. That envelope is DATA
238
+ * there, not a route — re-typing it to the bare kind component would strip
239
+ * the artifact chrome and lose the door to the Canvas.
240
+ */
241
+ ownedTypes?: readonly string[];
242
+ }
243
+ declare function applyIrKindRoute<T extends IrRoutableBlock>(block: T, env: KindRouteEnv, options?: KindRouteOptions): T;
244
+ /**
245
+ * Rehydration route for STRUCTURED persisted artifacts.
246
+ *
247
+ * A materialized kind artifact stores its zero-loss value object (carrying
248
+ * `__kind`) alongside its row. Given that stored value, derive the registered
249
+ * kind's legacy `serverData` WITHOUT re-parsing any text: the value wraps into
250
+ * a complete envelope and runs through the same `toLegacyServerData` bridge the
251
+ * live stream uses. Returns null for non-objects, unregistered kinds, or kinds
252
+ * without a legacy bridge — callers fall back to their string-payload path.
253
+ */
254
+ declare function kindServerDataFromStoredValue(value: unknown, env: Pick<KindRouteEnv, "kinds">): Record<string, unknown> | null;
255
+
256
+ /**
257
+ * Routing the PROVISIONAL half of the streaming partial-kinds contract.
258
+ *
259
+ * Cross-repo system-of-record (read it before changing anything here):
260
+ * `common-docs/systems/content-ir-system/STREAMING_PARTIAL_KINDS.md` §8.
261
+ * The reader/validator half lives in `@ai-matrx/content-ir` (`wire/partial-kind`);
262
+ * the wire gate runs in each host's stream ingest.
263
+ *
264
+ * WHAT THIS DOES
265
+ * --------------
266
+ * While a structured region streams, the server announces what it thinks the
267
+ * region IS and what has arrived so far (`metadata.__ir_partial`). This module
268
+ * turns that provisional event into a routed block that renders through the
269
+ * EXACT SAME component the final value renders in — which is the entire point:
270
+ * a bespoke skeleton renderer would be a second render path and is banned.
271
+ *
272
+ * HOW, without touching the verified channel
273
+ * ------------------------------------------
274
+ * `root` is deliberately `IrStructuredNode`-shaped, so the event wraps into a
275
+ * `CanonicalBlockIR` and every existing reader — the compiled bridge, the
276
+ * component resolver, the db-component flip, the generic viewer — works
277
+ * unchanged. That provisional envelope is placed on a RENDER-LOCAL COPY of the
278
+ * block's metadata under `__ir`, never on the wire and never in host state. The
279
+ * block also carries `__ir_provisional: true` so any downstream reader can tell
280
+ * a provisional render from a verified one.
281
+ *
282
+ * THE POSTURE: WITHHOLD BY DEFAULT, OPT IN PER KIND
283
+ * -------------------------------------------------
284
+ * A provisional value MAY be missing required fields — that is what the
285
+ * `partial_unvalidated` notice declares — and §8 of the contract requires that
286
+ * a component which throws on an absent field is not routed one. Rather than
287
+ * audit every component, the default is WITHHOLD: nothing changes and the block
288
+ * keeps its loading skeleton. A kind opts in with `partialReady: true` on its
289
+ * registry definition. If an opted-in component throws anyway,
290
+ * `ProvisionalKindBoundary` screams and calls `markKindPartialUnsafe`, which
291
+ * drops that kind back to withhold for the rest of the session — loud recovery,
292
+ * never a broken surface.
293
+ *
294
+ * TERMINALS
295
+ * ---------
296
+ * `superseded` and `retracted` produce NO provisional render, so the swap to
297
+ * the final value happens in the same frame the terminal arrives — never a
298
+ * flicker through an empty state. Both are explicit EVENTS: the terminal is
299
+ * never inferred from the arrival of `__ir`, because a completed block often
300
+ * has no `__ir` at all (unregistered kind, schema drift, cold catalog) and
301
+ * inferring it would leave the skeleton up forever in exactly those cases.
302
+ */
303
+
304
+ /**
305
+ * Marker stamped on a render-local block whose `__ir` is PROVISIONAL. Never
306
+ * emitted by a producer, never persisted, never on the wire.
307
+ */
308
+ declare const IR_PROVISIONAL_KEY: "__ir_provisional";
309
+ /** True when this block's metadata carries a provisional (not verified) envelope. */
310
+ declare function isProvisionalBlock(metadata: Record<string, unknown> | null | undefined): boolean;
311
+ /** Wrap a validated `partial` event into the envelope shape every IR reader consumes. */
312
+ declare function envelopeFromPartialKind(event: PartialKindEvent): CanonicalBlockIR;
313
+ /** Loud recovery hook — called by ProvisionalKindBoundary when a render throws. */
314
+ declare function markKindPartialUnsafe(kind: string): void;
315
+ /** Test-only reset of the session latch. */
316
+ declare function resetPartialUnsafeKinds(): void;
317
+ /**
318
+ * Has this kind opted in to being handed a provisional value? Withhold is the
319
+ * default; see the module doc.
320
+ */
321
+ declare function isPartialReadyKind(kind: string, env: Pick<KindRouteEnv, "kinds">): boolean;
322
+ interface PartialRenderOptions extends KindRouteOptions {
323
+ /**
324
+ * Is the STREAM still running? Message-wide, deliberately — not this block's
325
+ * own completion.
326
+ *
327
+ * 🚨 THE ANTI-STUCK-SKELETON BACKSTOP. Law 1 of the contract says every
328
+ * partial ends in exactly one terminal, and that law is the ONLY thing
329
+ * standing between a user and a "Still arriving" skeleton that never
330
+ * resolves. It is a producer guarantee with at least three ways to not fire:
331
+ * the drain skips a block missing from the final block list, the emitter
332
+ * early-returns once the stream ended or was cancelled (so a client abort
333
+ * drops every retraction), and a flush failure is swallowed so it never kills
334
+ * a run.
335
+ *
336
+ * Once the stream is over, no terminal can ever arrive, so a still-open
337
+ * provisional is stuck by definition — drop it and let the block's own
338
+ * content and `__ir` be the truth. Correct to be message-wide: a terminal for
339
+ * THIS block may still be in flight while the block itself looks finished.
340
+ *
341
+ * `undefined` reads as active, so a caller that does not thread stream state
342
+ * keeps live rendering rather than silently losing it.
343
+ */
344
+ streamActive?: boolean;
345
+ }
346
+ /**
347
+ * The ANNOUNCED-but-not-yet-renderable state: the server has said what this
348
+ * region is, and the region cannot render its real component yet.
349
+ *
350
+ * WHY THIS EXISTS SEPARATELY FROM THE VERIFIED CHANNEL. On a chat stream the
351
+ * host's own accumulator fills `__ir` in as it parses. A WORKFLOW run's lane
352
+ * does not: when the server opens the block scope it marks the text channel
353
+ * `block_shadowed` and the lane stops feeding its accumulator, precisely so one
354
+ * region is never rendered twice under two sets of block ids
355
+ * (STREAMING_PARTIAL_KINDS.md §7b rule 4). So on a run page there is NO
356
+ * streaming `__ir` — the ONLY thing that knows what the region is, is the
357
+ * partial channel. Without this, a workflow node's structured answer fell
358
+ * through to the raw-text renderer: a generic loader, then raw JSON
359
+ * accumulating, then a swap at the end.
360
+ *
361
+ * Returns the provisional envelope to feed the kind's loading component, or
362
+ * null when there is nothing announced (no event, a terminal, a dead stream).
363
+ * Deliberately independent of `partialReady`: withholding a VALUE from a
364
+ * component that might throw on it is a real decision, but withholding the
365
+ * kind's own loading state is not — a skeleton cannot throw, and the reader
366
+ * seeing what is coming is the whole point.
367
+ */
368
+ declare function resolveAnnouncedKindLoading(block: {
369
+ metadata?: Record<string, unknown>;
370
+ }, options?: Pick<PartialRenderOptions, "streamActive">): {
371
+ kind: string;
372
+ envelope: CanonicalBlockIR;
373
+ } | null;
374
+ interface ProvisionalKindRender<T> {
375
+ /** The routed block — same type/serverData shape the final value produces. */
376
+ block: T;
377
+ /** The announced (speculative) kind. */
378
+ kind: string;
379
+ /** Per-block ordering key, for diagnostics. */
380
+ seq: number;
381
+ /** The provisional envelope — feeds the loading skeleton used as the throw fallback. */
382
+ envelope: CanonicalBlockIR;
383
+ }
384
+ /**
385
+ * Resolve a block's provisional render, or null when there is nothing to show
386
+ * provisionally (no event, a terminal event, a withheld kind, a kind nothing
387
+ * can route, or a verified envelope that already won).
388
+ *
389
+ * Pure: no React, no host state, no side effects beyond the registry reads.
390
+ */
391
+ declare function resolveProvisionalKindRender<T extends IrRoutableBlock & {
392
+ metadata?: Record<string, unknown>;
393
+ }>(block: T, env: KindRouteEnv, options?: PartialRenderOptions): ProvisionalKindRender<T> | null;
394
+
395
+ /**
396
+ * THE BOUND ROUTE — the pure route functions with a host's env and owned
397
+ * types partially applied, built ONCE in a host wiring module.
398
+ *
399
+ * Every host was writing the same wrapper file by hand: one function per pure
400
+ * route, each forwarding `matrx…Env` + `ownedTypes` (matrx-frontend carried
401
+ * two such modules; the dashboard a third). Per C22 that repeated delta is
402
+ * package-provided: a host module now only INJECTS (its env, its owned block
403
+ * types) and re-exports what this factory returns.
404
+ *
405
+ * The functions are the exact pure routes — read `kind-route.ts` /
406
+ * `partial-kind-route.ts` for semantics; nothing behavioral lives here.
407
+ */
408
+
409
+ interface KindRouteBinding {
410
+ /** Route one block through the bound registries. */
411
+ applyIrKindRoute<T extends IrRoutableBlock>(block: T): T;
412
+ /**
413
+ * Rehydration route for STRUCTURED persisted artifacts: given a stored
414
+ * zero-loss value object, derive the registered kind's legacy `serverData`
415
+ * with no re-parse. Null for non-objects, unregistered kinds, or kinds
416
+ * without a legacy bridge.
417
+ */
418
+ kindServerDataFromStoredValue(value: unknown): Record<string, unknown> | null;
419
+ /** Has this kind opted in to being handed a provisional value? */
420
+ isPartialReadyKind(kind: string): boolean;
421
+ /**
422
+ * Resolve a block's provisional render, or null when there is nothing to
423
+ * show provisionally (no event, a terminal event, a withheld kind, a kind
424
+ * nothing can route, or a verified envelope that already won).
425
+ */
426
+ resolveProvisionalKindRender<T extends IrRoutableBlock & {
427
+ metadata?: Record<string, unknown>;
428
+ }>(block: T, options?: Pick<PartialRenderOptions, "streamActive">): ProvisionalKindRender<T> | null;
429
+ }
430
+ /** Bind the pure routes to one host's env + owned block types. */
431
+ declare function createKindRouteBinding(env: KindRouteEnv, options?: KindRouteOptions): KindRouteBinding;
432
+
433
+ export { type ContentIrHost as C, DB_KIND_COMPONENT_KEY as D, GENERIC_STRUCTURED_COMPONENT_KEY as G, IR_PROVISIONAL_KEY as I, type KindRouteEnv as K, type PartialRenderOptions as P, type StructuredValueRenderProps as S, type KindDefinitionSource as a, type ContentIrRenderSeams as b, type GenericFallbackReason as c, IR_ROUTE_KEY as d, type IrRenderBlock as e, type IrRoutableBlock as f, type IrRouteMarker as g, type KindRouteBinding as h, type KindRouteOptions as i, type ProvisionalKindRender as j, applyIrKindRoute as k, createKindRouteBinding as l, envelopeFromPartialKind as m, isPartialReadyKind as n, isProvisionalBlock as o, kindServerDataFromStoredValue as p, markKindPartialUnsafe as q, readIrRouteMarker as r, resetPartialUnsafeKinds as s, resetSourcelessDbRowReports as t, resolveAnnouncedKindLoading as u, resolveProvisionalKindRender as v, routeEnvOf as w };