@ai-matrx/content-ir-react 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/index.cjs +37 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +45 -7
- package/dist/index.js.map +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +6 -4
- package/dist/react.js.map +1 -1
- package/dist/{route-Bu85A41G.d.cts → route-B9U-9QCw.d.cts} +35 -1
- package/dist/{route-DoFoDKBn.d.ts → route-gNpJ8zzW.d.ts} +35 -1
- package/dist/route.cjs +38 -2
- package/dist/route.cjs.map +1 -1
- package/dist/route.d.cts +1 -1
- package/dist/route.d.ts +1 -1
- package/dist/route.js +40 -2
- package/dist/route.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.2
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/content-ir-react/v0.11.1..npm/content-ir-react/v0.11.2 -- apps/shared/content-ir-react`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.11.1 — 2026-09-09
|
|
10
|
+
|
|
11
|
+
- **A completed partial kind now hands off directly to its real renderer.**
|
|
12
|
+
Workflow run pages shadow the raw text channel while server-built blocks
|
|
13
|
+
stream, so a `superseded` terminal can arrive on a completed `code` block
|
|
14
|
+
without a verified `__ir` envelope. The shared route now reconstructs a
|
|
15
|
+
render-local complete envelope from the block's closed JSON, verifies that
|
|
16
|
+
its root `__kind` matches the producer-confirmed kind, and routes through the
|
|
17
|
+
normal component path in that same frame. Retracted, malformed, and
|
|
18
|
+
mismatched terminals remain on the host's honest fallback.
|
|
19
|
+
|
|
20
|
+
### Consumer action
|
|
21
|
+
|
|
22
|
+
- Hosts rendering server-built workflow blocks should call the new
|
|
23
|
+
`resolveSupersededKindRender` binding before ordinary kind routing so a
|
|
24
|
+
finished node cannot flash raw Shape JSON while sibling nodes continue.
|
|
25
|
+
|
|
3
26
|
## 0.11.0 — 2026-09-08
|
|
4
27
|
|
|
5
28
|
**THE DIRECTIVE TIER — `/directives`.** Every AI Matrx UI draws a Kind
|
package/dist/index.cjs
CHANGED
|
@@ -70,6 +70,7 @@ __export(index_exports, {
|
|
|
70
70
|
resetSourcelessDbRowReports: () => resetSourcelessDbRowReports,
|
|
71
71
|
resolveAnnouncedKindLoading: () => resolveAnnouncedKindLoading,
|
|
72
72
|
resolveProvisionalKindRender: () => resolveProvisionalKindRender,
|
|
73
|
+
resolveSupersededKindRender: () => resolveSupersededKindRender,
|
|
73
74
|
routeEnvOf: () => routeEnvOf,
|
|
74
75
|
useContentIrHost: () => useContentIrHost,
|
|
75
76
|
useContentIrHostOrNull: () => useContentIrHostOrNull,
|
|
@@ -653,6 +654,36 @@ function resolveAnnouncedKindLoading(block, options) {
|
|
|
653
654
|
if (verified && verified.root.status === "complete") return null;
|
|
654
655
|
return { kind, envelope: envelopeFromPartialKind(event) };
|
|
655
656
|
}
|
|
657
|
+
function parseCompletedJsonObject(content) {
|
|
658
|
+
let source = content.trim();
|
|
659
|
+
const fenced = source.match(/^```(?:json)?\s*\n?([\s\S]*?)\n?```$/i);
|
|
660
|
+
if (fenced?.[1]) source = fenced[1].trim();
|
|
661
|
+
try {
|
|
662
|
+
const value = JSON.parse(source);
|
|
663
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
664
|
+
} catch {
|
|
665
|
+
return null;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
function resolveSupersededKindRender(block, env, options) {
|
|
669
|
+
const event = (0, import_content_ir2.readPartialKindEvent)(block.metadata);
|
|
670
|
+
if (event?.state !== "superseded") return null;
|
|
671
|
+
if ((0, import_content_ir2.readEnvelope)(block.metadata)?.root.status === "complete") return null;
|
|
672
|
+
const value = parseCompletedJsonObject(block.content);
|
|
673
|
+
if (!value || (0, import_content_ir2.readObjectKind)(value) !== event.kind) return null;
|
|
674
|
+
const { [import_content_ir2.IR_PARTIAL_KEY]: _partial, ...rest } = block.metadata ?? {};
|
|
675
|
+
void _partial;
|
|
676
|
+
const envelope = (0, import_content_ir2.envelopeFromCompleteValue)(value, event.kind);
|
|
677
|
+
const terminalBlock = {
|
|
678
|
+
...block,
|
|
679
|
+
// A code/json block's serverData is an annotation, not kind data.
|
|
680
|
+
serverData: void 0,
|
|
681
|
+
metadata: { ...rest, [import_content_ir2.IR_ENVELOPE_KEY]: envelope }
|
|
682
|
+
};
|
|
683
|
+
const routed = applyIrKindRoute(terminalBlock, env, options);
|
|
684
|
+
if (routed === terminalBlock) return null;
|
|
685
|
+
return { block: routed, kind: event.kind, seq: event.seq, envelope };
|
|
686
|
+
}
|
|
656
687
|
function resolveProvisionalKindRender(block, env, options) {
|
|
657
688
|
if (options?.streamActive === false) return null;
|
|
658
689
|
const event = (0, import_content_ir2.readPartialKindEvent)(block.metadata);
|
|
@@ -693,7 +724,12 @@ function createKindRouteBinding(env, options) {
|
|
|
693
724
|
resolveProvisionalKindRender: (block, streamOptions) => resolveProvisionalKindRender(block, env, {
|
|
694
725
|
...streamOptions,
|
|
695
726
|
...ownedTypes ? { ownedTypes } : null
|
|
696
|
-
})
|
|
727
|
+
}),
|
|
728
|
+
resolveSupersededKindRender: (block) => resolveSupersededKindRender(
|
|
729
|
+
block,
|
|
730
|
+
env,
|
|
731
|
+
ownedTypes ? { ownedTypes } : void 0
|
|
732
|
+
)
|
|
697
733
|
};
|
|
698
734
|
}
|
|
699
735
|
|