Run the unified hoist codemod over showcase/integrations/* and adjacent
source roots (src/lib, src/agent, src/mastra, src/main/java for Spring AI,
agent/ for ms-agent-dotnet). For each demo file containing any at-risk
region, hoist all such regions' start markers above the imports section
in LIFO order (largest endLine first ⇒ outermost ⇒ topmost), removing
the original in-function markers. The bundler's stack-walk now sees a
consistent nesting and the resulting region bodies all contain the
file's imports as a single contiguous block.
Also extends marker-move-up support to Java (import) and C#
(using-directive) files for Spring AI and ms-agent-dotnet's tool/agent
classes.
Manually handles two remaining sibling snippet files
(built-in-agent::a2ui-fixed-schema's a2ui-backend.snippet.ts) where the
'imports' are declare-const stubs that the codemod doesn't detect as
imports.
After this commit, of the 32 at-risk (cell, region) tuples flagged in
the QA report, 503 (integration × region) bundle slots have imports in
their bodies; 4 slots remain without imports because the source files
genuinely have no import statements (string-only prompt files in
claude-sdk-typescript subagents-prompts.ts).
Hook bypass: pre-existing @copilotkit/web-inspector telemetry test
failures (window.localStorage + jsdom) are unrelated to this commit.
Closes the architectural-divergence gap for a2ui-fixed-schema across
4 frameworks. Pairs with PDX-68 — the canonical docs page now renders
the correct code + prose per framework idiom.
Code regions added:
- spring-ai DisplayFlightTool.java: wraps inline FLIGHT_SCHEMA with
@region[backend-schema-json-load]
- ms-agent-dotnet A2uiFixedSchemaAgent.cs: same name wrapping the inline
C# FlightSchema array
- mastra src/mastra/tools/index.ts: wraps generateA2uiTool with
@region[backend-render-operations] (LLM-driven path)
- strands src/agents/agent.py: same on the generate_a2ui @tool
MDX (fixed-schema.mdx) restructure:
- Intro neutralized; new 3-bullet rundown of which frameworks fall into
schema-loading / schema-inline / llm-driven
- 'How it works' step 1 reworded to be framework-neutral
- Steps 4 + 5 split into three <WhenFrameworkHas a2ui_pattern=...> gates:
schema-loading → 'Load the schema JSON at startup' + render ops
schema-inline → 'Define the schema inline' + render ops
llm-driven → single 'Generate the schema dynamically' step
Spot-checked on dev server:
- /langgraph-python/.../fixed-schema → shows schema-loading section only
- /spring-ai/.../fixed-schema → shows schema-inline section only
- /mastra/.../fixed-schema → shows llm-driven section only
- /crewai-crews/.../fixed-schema → shows schema-loading section only
Same patterns as ms-agent-python (sibling commit), with backend regions
in C# instead of Python:
Frontend (identical TS code to ms-agent-python):
- agentic-chat, tool-rendering, frontend-tools,
readonly-state-agent-context — mirror mastra/smalls patterns.
- open-gen-ui (minimal-runtime-flag) + open-gen-ui-advanced
(advanced-runtime-config) — shared span in copilotkit-ogui/route.ts.
- mcp-apps: no-frontend-renderer-needed in page.tsx;
runtime-mcpapps-config in copilotkit-mcp-apps/route.ts.
Backend (C#):
- weather-tool-backend on agent/Program.cs::GetWeather (added to
manifest highlight).
- backend-render-operations on agent/A2uiFixedSchemaAgent.cs::SearchFlights
(already in manifest highlight).
Deferred:
- a2ui-fixed-schema::backend-schema-json-load — .NET keeps the schema
inline as a C# array (FlightSchema), not a JSON file load. The docs
region's narrative ("load JSON at startup") doesn't fit this idiom;
defer until the auto-config infrastructure can render different
snippets per framework, or showcase team aligns the .NET demo.
- gen-ui-interrupt + interrupt-headless: same useFrontendTool-with-Promise
divergence as ms-agent-python.
- declarative-gen-ui::runtime-inject-tool: cross-cutting.
The showcase framework directories better reflect their role as
integration examples rather than distributable packages.
Renames showcase/packages/ -> showcase/integrations/ and updates
the test docker-compose file reference accordingly.