/** * The diagram adapter boundary. * * AK Render does not implement diagram layout. A host that owns a typed diagram * compiler — AgentKit's Engineer installs provide `ak:diagram` — registers an * adapter, and the compiler embeds that adapter's output inside the * `diagram-panel` block. Everything else keeps the structured semantic fallback. * * The boundary is deliberately narrow: * * - The adapter receives the bounded, structurally-opaque diagram spec from the * Page Spec plus its title. It never receives the page, the theme, or the * surrounding markup, so it cannot influence anything outside its own figure. * - Whatever the adapter returns is re-checked here. Output that could execute, * navigate, or frame is rejected and the semantic fallback is emitted instead, * with a diagnostic. An adapter is trusted code, but "trusted" still means * "verified before it reaches the artifact". * - The fallback text is always emitted, so the diagram's content is available * to assistive technology and to a reader whose adapter is not installed. * - Accepted markup is fitted to the page's Content Security Policy: its * `