@ai-matrx/content-ir-react 0.5.1 → 0.7.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.
package/dist/index.d.cts CHANGED
@@ -482,10 +482,16 @@ type GenericFallbackReason =
482
482
  | "generic-row"
483
483
  /**
484
484
  * The envelope carries a kind-preserved RAW: the payload identified a
485
- * registered kind but its value failed the schema (or the schema never
486
- * arrived before the region closed). The instance is BROKEN, not
487
- * component-less — the repair is fixing the payload/schema, and the generic
488
- * floor must acknowledge the kind and surface the recorded problems.
485
+ * registered kind and its value FAILED a check a schema violation, an
486
+ * array-item kind mismatch, a duplicate key, a contradicted speculation.
487
+ * The instance is BROKEN, not component-less — the repair is fixing the
488
+ * payload or the schema, and the generic floor must acknowledge the kind and
489
+ * surface the recorded problems.
490
+ *
491
+ * NOT this: a kind whose schema was never available (`kindState:
492
+ * "unverified"`). Nothing checked that value, so calling it broken is a
493
+ * false accusation — it routes to its component. The two were one state
494
+ * until 2026-08-29 and conflating them was a platform-wide outage.
489
495
  */
490
496
  | "broken-instance"
491
497
  /**
@@ -701,6 +707,23 @@ declare function isRecordValue(value: unknown): value is Record<string, unknown>
701
707
  * decision order; requires the resolver warm tier for db rows (see the warm
702
708
  * tick in {@link KindInstanceRender}).
703
709
  */
710
+ /**
711
+ * Is there a render path for this kind that is NOT the generic key/value floor?
712
+ *
713
+ * 🚨 READ THIS BEFORE USING IT AS A HEALTH SIGNAL. It answers a narrow
714
+ * question — "will a direct-object render mount something other than the
715
+ * generic view?" — and it is the right question for the fallback decision it
716
+ * was written for. It is the WRONG question for "does this kind work".
717
+ *
718
+ * It cannot see any of: whether the kind's schema loads, whether a streamed
719
+ * payload is recognized from text, or what `applyIrKindRoute` returns for a
720
+ * real envelope. On 2026-08-29 every one of ~221 kinds that had stopped
721
+ * rendering in chat still answered `true` here, because their component rows
722
+ * were fine — the recognition step ahead of the component was not.
723
+ *
724
+ * For "does this kind work", run the render paths
725
+ * (`features/content-ir/render-paths`) and read the route's actual answer.
726
+ */
704
727
  declare function kindIsRoutable(kind: string, host: ContentIrHost): boolean;
705
728
  interface KindInstanceRenderProps {
706
729
  kind: string;
package/dist/index.d.ts CHANGED
@@ -482,10 +482,16 @@ type GenericFallbackReason =
482
482
  | "generic-row"
483
483
  /**
484
484
  * The envelope carries a kind-preserved RAW: the payload identified a
485
- * registered kind but its value failed the schema (or the schema never
486
- * arrived before the region closed). The instance is BROKEN, not
487
- * component-less — the repair is fixing the payload/schema, and the generic
488
- * floor must acknowledge the kind and surface the recorded problems.
485
+ * registered kind and its value FAILED a check a schema violation, an
486
+ * array-item kind mismatch, a duplicate key, a contradicted speculation.
487
+ * The instance is BROKEN, not component-less — the repair is fixing the
488
+ * payload or the schema, and the generic floor must acknowledge the kind and
489
+ * surface the recorded problems.
490
+ *
491
+ * NOT this: a kind whose schema was never available (`kindState:
492
+ * "unverified"`). Nothing checked that value, so calling it broken is a
493
+ * false accusation — it routes to its component. The two were one state
494
+ * until 2026-08-29 and conflating them was a platform-wide outage.
489
495
  */
490
496
  | "broken-instance"
491
497
  /**
@@ -701,6 +707,23 @@ declare function isRecordValue(value: unknown): value is Record<string, unknown>
701
707
  * decision order; requires the resolver warm tier for db rows (see the warm
702
708
  * tick in {@link KindInstanceRender}).
703
709
  */
710
+ /**
711
+ * Is there a render path for this kind that is NOT the generic key/value floor?
712
+ *
713
+ * 🚨 READ THIS BEFORE USING IT AS A HEALTH SIGNAL. It answers a narrow
714
+ * question — "will a direct-object render mount something other than the
715
+ * generic view?" — and it is the right question for the fallback decision it
716
+ * was written for. It is the WRONG question for "does this kind work".
717
+ *
718
+ * It cannot see any of: whether the kind's schema loads, whether a streamed
719
+ * payload is recognized from text, or what `applyIrKindRoute` returns for a
720
+ * real envelope. On 2026-08-29 every one of ~221 kinds that had stopped
721
+ * rendering in chat still answered `true` here, because their component rows
722
+ * were fine — the recognition step ahead of the component was not.
723
+ *
724
+ * For "does this kind work", run the render paths
725
+ * (`features/content-ir/render-paths`) and read the route's actual answer.
726
+ */
704
727
  declare function kindIsRoutable(kind: string, host: ContentIrHost): boolean;
705
728
  interface KindInstanceRenderProps {
706
729
  kind: string;
package/dist/index.js CHANGED
@@ -567,9 +567,9 @@ function isRecordValue(value) {
567
567
  }
568
568
  function kindIsRoutable(kind, host) {
569
569
  if (host.kinds.getDefinition(kind)?.legacyBlockType) return true;
570
- return Boolean(
571
- host.components.resolve(kind, host.platform, "output")?.isActive
572
- );
570
+ const resolution = host.components.resolve(kind, host.platform, "output");
571
+ if (!resolution?.isActive) return false;
572
+ return resolution.componentKey !== GENERIC_STRUCTURED_COMPONENT_KEY;
573
573
  }
574
574
  function KindInstanceRender({
575
575
  kind,