@ai-matrx/content-ir-react 0.15.2 → 0.16.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.
@@ -33,8 +33,17 @@ interface DirectiveApplyState {
33
33
  state: "not_applied" | "in_flight" | "applied";
34
34
  /** The ledger row's sentence ("Created task."), never composed client-side. */
35
35
  message?: string | null;
36
- /** The records the original apply wrote — the tally's doors. */
36
+ /**
37
+ * The records the LATEST apply wrote — the tally's doors. After "Run again"
38
+ * that is the newest copy, never the first.
39
+ */
37
40
  records?: DirectiveRecordRef[];
41
+ /**
42
+ * How many times the ledger holds this block as applied: 1 for the original,
43
+ * one more for every "Run again". Absent → 1. A create that ran twice made
44
+ * two records, and the card says so (reviewer, 2026-10-02).
45
+ */
46
+ copies?: number;
38
47
  }
39
48
  /** One record a directive names: the noun it is, and its id. */
40
49
  interface DirectiveRecordRef {
@@ -133,6 +142,14 @@ interface DirectiveHost {
133
142
  * is idempotent. Absent → the card starts at Apply, as before.
134
143
  */
135
144
  applyState?: (shell: DirectiveShell) => Promise<DirectiveApplyState>;
145
+ /**
146
+ * Read the CURRENT values of ONE existing record, so an update says what it
147
+ * replaces — "Status open → done", never just "→ done" (reviewer,
148
+ * 2026-10-02). Resolve `null` when the record cannot be read (no access, no
149
+ * such record, a noun the host cannot read); reject only for a real failure.
150
+ * Absent → an update row shows the new values alone, as before.
151
+ */
152
+ readRecord?: (ref: DirectiveRecordRef) => Promise<Record<string, unknown> | null>;
136
153
  /**
137
154
  * Draw ONE existing record by its live name, as a way to open it. Used on
138
155
  * update/delete rows (the record that will change), in the host's own ask
@@ -665,4 +682,4 @@ interface KindRouteBinding {
665
682
  /** Bind the pure routes to one host's env + owned block types. */
666
683
  declare function createKindRouteBinding(env: KindRouteEnv, options?: KindRouteOptions): KindRouteBinding;
667
684
 
668
- export { createKindRouteBinding as A, envelopeFromPartialKind as B, type ContentIrHost as C, DB_KIND_COMPONENT_KEY as D, isPartialReadyKind as E, isProvisionalBlock as F, GENERIC_STRUCTURED_COMPONENT_KEY as G, kindServerDataFromStoredValue as H, IR_PROVISIONAL_KEY as I, markKindPartialUnsafe as J, type KindRouteEnv as K, readIrRouteMarker as L, resetPartialUnsafeKinds as M, resetSourcelessDbRowReports as N, resolveAnnouncedKindLoading as O, type PartialRenderOptions as P, resolveProvisionalKindRender as Q, resolveSupersededKindRender as R, type StructuredValueRenderProps as S, routeEnvOf as T, useDirectiveHost as U, useDirectiveScope as V, type KindDefinitionSource as a, type ContentIrRenderSeams as b, DIRECTIVE_BLOCK_TYPE as c, type DirectiveApplyResult as d, type DirectiveApplyState as e, type DirectiveAskRequest as f, type DirectiveCopyProps as g, type DirectiveHost as h, DirectiveHostProvider as i, type DirectiveHostProviderProps as j, type DirectiveOpenItemOptions as k, type DirectiveRecordProps as l, type DirectiveRecordRef as m, type DirectiveScope as n, DirectiveScopeProvider as o, type DirectiveShell as p, type GenericFallbackReason as q, IR_ROUTE_KEY as r, type IrRenderBlock as s, type IrRoutableBlock as t, type IrRouteMarker as u, type KindRouteBinding as v, type KindRouteOptions as w, type ProvisionalKindRender as x, type SupersededKindRender as y, applyIrKindRoute as z };
685
+ export { createKindRouteBinding as A, envelopeFromPartialKind as B, type ContentIrHost as C, type DirectiveRecordRef as D, isPartialReadyKind as E, isProvisionalBlock as F, GENERIC_STRUCTURED_COMPONENT_KEY as G, kindServerDataFromStoredValue as H, IR_PROVISIONAL_KEY as I, markKindPartialUnsafe as J, type KindRouteEnv as K, readIrRouteMarker as L, resetPartialUnsafeKinds as M, resetSourcelessDbRowReports as N, resolveAnnouncedKindLoading as O, type PartialRenderOptions as P, resolveProvisionalKindRender as Q, resolveSupersededKindRender as R, type StructuredValueRenderProps as S, routeEnvOf as T, useDirectiveHost as U, useDirectiveScope as V, type KindDefinitionSource as a, type ContentIrRenderSeams as b, DB_KIND_COMPONENT_KEY as c, DIRECTIVE_BLOCK_TYPE as d, type DirectiveApplyResult as e, type DirectiveApplyState as f, type DirectiveAskRequest as g, type DirectiveCopyProps as h, type DirectiveHost as i, DirectiveHostProvider as j, type DirectiveHostProviderProps as k, type DirectiveOpenItemOptions as l, type DirectiveRecordProps as m, type DirectiveScope as n, DirectiveScopeProvider as o, type DirectiveShell as p, type GenericFallbackReason as q, IR_ROUTE_KEY as r, type IrRenderBlock as s, type IrRoutableBlock as t, type IrRouteMarker as u, type KindRouteBinding as v, type KindRouteOptions as w, type ProvisionalKindRender as x, type SupersededKindRender as y, applyIrKindRoute as z };
@@ -33,8 +33,17 @@ interface DirectiveApplyState {
33
33
  state: "not_applied" | "in_flight" | "applied";
34
34
  /** The ledger row's sentence ("Created task."), never composed client-side. */
35
35
  message?: string | null;
36
- /** The records the original apply wrote — the tally's doors. */
36
+ /**
37
+ * The records the LATEST apply wrote — the tally's doors. After "Run again"
38
+ * that is the newest copy, never the first.
39
+ */
37
40
  records?: DirectiveRecordRef[];
41
+ /**
42
+ * How many times the ledger holds this block as applied: 1 for the original,
43
+ * one more for every "Run again". Absent → 1. A create that ran twice made
44
+ * two records, and the card says so (reviewer, 2026-10-02).
45
+ */
46
+ copies?: number;
38
47
  }
39
48
  /** One record a directive names: the noun it is, and its id. */
40
49
  interface DirectiveRecordRef {
@@ -133,6 +142,14 @@ interface DirectiveHost {
133
142
  * is idempotent. Absent → the card starts at Apply, as before.
134
143
  */
135
144
  applyState?: (shell: DirectiveShell) => Promise<DirectiveApplyState>;
145
+ /**
146
+ * Read the CURRENT values of ONE existing record, so an update says what it
147
+ * replaces — "Status open → done", never just "→ done" (reviewer,
148
+ * 2026-10-02). Resolve `null` when the record cannot be read (no access, no
149
+ * such record, a noun the host cannot read); reject only for a real failure.
150
+ * Absent → an update row shows the new values alone, as before.
151
+ */
152
+ readRecord?: (ref: DirectiveRecordRef) => Promise<Record<string, unknown> | null>;
136
153
  /**
137
154
  * Draw ONE existing record by its live name, as a way to open it. Used on
138
155
  * update/delete rows (the record that will change), in the host's own ask
@@ -665,4 +682,4 @@ interface KindRouteBinding {
665
682
  /** Bind the pure routes to one host's env + owned block types. */
666
683
  declare function createKindRouteBinding(env: KindRouteEnv, options?: KindRouteOptions): KindRouteBinding;
667
684
 
668
- export { createKindRouteBinding as A, envelopeFromPartialKind as B, type ContentIrHost as C, DB_KIND_COMPONENT_KEY as D, isPartialReadyKind as E, isProvisionalBlock as F, GENERIC_STRUCTURED_COMPONENT_KEY as G, kindServerDataFromStoredValue as H, IR_PROVISIONAL_KEY as I, markKindPartialUnsafe as J, type KindRouteEnv as K, readIrRouteMarker as L, resetPartialUnsafeKinds as M, resetSourcelessDbRowReports as N, resolveAnnouncedKindLoading as O, type PartialRenderOptions as P, resolveProvisionalKindRender as Q, resolveSupersededKindRender as R, type StructuredValueRenderProps as S, routeEnvOf as T, useDirectiveHost as U, useDirectiveScope as V, type KindDefinitionSource as a, type ContentIrRenderSeams as b, DIRECTIVE_BLOCK_TYPE as c, type DirectiveApplyResult as d, type DirectiveApplyState as e, type DirectiveAskRequest as f, type DirectiveCopyProps as g, type DirectiveHost as h, DirectiveHostProvider as i, type DirectiveHostProviderProps as j, type DirectiveOpenItemOptions as k, type DirectiveRecordProps as l, type DirectiveRecordRef as m, type DirectiveScope as n, DirectiveScopeProvider as o, type DirectiveShell as p, type GenericFallbackReason as q, IR_ROUTE_KEY as r, type IrRenderBlock as s, type IrRoutableBlock as t, type IrRouteMarker as u, type KindRouteBinding as v, type KindRouteOptions as w, type ProvisionalKindRender as x, type SupersededKindRender as y, applyIrKindRoute as z };
685
+ export { createKindRouteBinding as A, envelopeFromPartialKind as B, type ContentIrHost as C, type DirectiveRecordRef as D, isPartialReadyKind as E, isProvisionalBlock as F, GENERIC_STRUCTURED_COMPONENT_KEY as G, kindServerDataFromStoredValue as H, IR_PROVISIONAL_KEY as I, markKindPartialUnsafe as J, type KindRouteEnv as K, readIrRouteMarker as L, resetPartialUnsafeKinds as M, resetSourcelessDbRowReports as N, resolveAnnouncedKindLoading as O, type PartialRenderOptions as P, resolveProvisionalKindRender as Q, resolveSupersededKindRender as R, type StructuredValueRenderProps as S, routeEnvOf as T, useDirectiveHost as U, useDirectiveScope as V, type KindDefinitionSource as a, type ContentIrRenderSeams as b, DB_KIND_COMPONENT_KEY as c, DIRECTIVE_BLOCK_TYPE as d, type DirectiveApplyResult as e, type DirectiveApplyState as f, type DirectiveAskRequest as g, type DirectiveCopyProps as h, type DirectiveHost as i, DirectiveHostProvider as j, type DirectiveHostProviderProps as k, type DirectiveOpenItemOptions as l, type DirectiveRecordProps as m, type DirectiveScope as n, DirectiveScopeProvider as o, type DirectiveShell as p, type GenericFallbackReason as q, IR_ROUTE_KEY as r, type IrRenderBlock as s, type IrRoutableBlock as t, type IrRouteMarker as u, type KindRouteBinding as v, type KindRouteOptions as w, type ProvisionalKindRender as x, type SupersededKindRender as y, applyIrKindRoute as z };
package/dist/route.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender } from './route-BCtPhF7W.cjs';
1
+ export { c as DB_KIND_COMPONENT_KEY, d as DIRECTIVE_BLOCK_TYPE, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender } from './route-YcoyR3Fj.cjs';
2
2
  import './component-resolution.types-DLO2w-0n.cjs';
3
3
  import 'react';
4
4
  import '@ai-matrx/content-ir';
package/dist/route.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { D as DB_KIND_COMPONENT_KEY, c as DIRECTIVE_BLOCK_TYPE, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender } from './route-DDbgc-ID.js';
1
+ export { c as DB_KIND_COMPONENT_KEY, d as DIRECTIVE_BLOCK_TYPE, G as GENERIC_STRUCTURED_COMPONENT_KEY, q as GenericFallbackReason, I as IR_PROVISIONAL_KEY, r as IR_ROUTE_KEY, u as IrRouteMarker, v as KindRouteBinding, w as KindRouteOptions, P as PartialRenderOptions, x as ProvisionalKindRender, y as SupersededKindRender, z as applyIrKindRoute, A as createKindRouteBinding, B as envelopeFromPartialKind, E as isPartialReadyKind, F as isProvisionalBlock, H as kindServerDataFromStoredValue, J as markKindPartialUnsafe, L as readIrRouteMarker, M as resetPartialUnsafeKinds, N as resetSourcelessDbRowReports, O as resolveAnnouncedKindLoading, Q as resolveProvisionalKindRender, R as resolveSupersededKindRender } from './route-De9c5YgW.js';
2
2
  import './component-resolution.types-DLO2w-0n.js';
3
3
  import 'react';
4
4
  import '@ai-matrx/content-ir';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/content-ir-react",
3
- "version": "0.15.2",
3
+ "version": "0.16.0",
4
4
  "description": "The shared AI Matrx Content IR RENDER layer: kind routing, the component resolver, provisional (streaming) rendering, the runtime-wrapper chrome, and the generic structured floor — as portable React.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",