Commit Graph

6 Commits

Author SHA1 Message Date
Alem Tuzlak c91a9c9aff fix(showcase/langgraph-python): A2UI fixed-schema loop + propagate rename to shared tools and aimock
Two follow-up fixes layered on the previous internal-tool rename:

(1) `a2ui_fixed.py` — fixed-schema demo infinite loop on deploy. The
`display_flight` tool returns the raw `a2ui.render(...)` JSON descriptor
as its tool result. gpt-4o-mini reads that opaque blob, can't tell the
flight was rendered, and re-calls `display_flight` indefinitely (visible
on the deployed showcase as 6+ duplicate flight cards stacked under
repeated assistant text). Local was just lucky.

Hardened the docstring + system prompt to spell out: the JSON return
value is the surface descriptor, the card is already rendered, do NOT
call again, reply with one short confirmation and stop.

(2) Rename `render_a2ui` → `_design_a2ui_surface` in shared and
langgraph-python parity copies of `tools/generate_a2ui.py` (+
`tools/__init__.py` re-export `RENDER_A2UI_TOOL_SCHEMA` →
`DESIGN_A2UI_SURFACE_TOOL_SCHEMA`), and in `showcase/shared/typescript/
tools/generate-a2ui.ts`. These shared helpers were the source-of-truth
for the secondary-LLM tool name across integrations; renaming here keeps
parity with the langgraph-python agents already renamed in
`beautiful_chat.py` / `a2ui_dynamic.py`. Other framework integrations
keep their own `render_a2ui` for now (separate parity sweep).

(3) `showcase/aimock/feature-parity.json` — added a sibling fixture
matching `toolName: "_design_a2ui_surface"` for the beautiful-chat Sales
Dashboard pill so the langgraph-python e2e suite still hits a
deterministic mock on Railway. The original `render_a2ui` fixture is
kept above it so other integrations whose secondary LLM still requests
`render_a2ui` continue to match.

(4) Comment update in `beautiful-chat.spec.ts` to name the new internal
tool.
2026-05-08 18:49:53 +02:00
Jordan Ritter f8bbb1390c feat: complete open-genui removal from tests, registries, middleware, and docs 2026-04-15 16:44:28 -07:00
Jordan Ritter cffecf1fc1 fix: resolve 3 starter crash root causes — Docker home dir, path depth, import rewriting
1. EACCES on /home/app: Dockerfile templates now create home dir for
   non-root user before USER app (langgraph-ts, claude-sdk-ts, mastra)
2. IndexError Path.parents[4]: search_flights.py schema fallback now
   guards against shallow Docker paths (agno, claude-sdk-py, ms-agent-py)
3. Wrong import path: rewritePythonImports() now converts
   from agents.X to relative imports in starter agent dirs (langroid, crewai)
2026-04-15 09:27:08 -07:00
Jordan Ritter 952ae8b06e feat: renderer adapter — 5 GenUI strategies with shared components and middleware
- RendererSelector: pill toggle for 5 modes (tool-based, A2UI, hashbrown, json-render, open-genui)
- useRenderMode: state + localStorage + useAgentContext forwarding
- 4 renderer adapters: ToolBasedDashboard, A2UIDashboard, HashBrownDashboard, OpenGenUIDashboard
- json-render: deferred (Zod 4 isolation needed), documented architecture
- New shared components: DealCard, Pipeline, MetricCard
- Python render_mode middleware for context-driven output switching
- 338 tests (181 React + 52 TS + 105 Python)
2026-04-13 21:37:37 -07:00
Jordan Ritter 2accac1d07 feat: add shared showcase packages with tools, components, and test coverage
- @copilotkit/showcase-shared: hooks, components, A2UI catalog, SalesDashboard
- Shared Python tools: 7 impls + 61 pytest tests (unit + parity + equivalence + wrappers)
- Shared TypeScript tools: equivalents + 52 vitest tests (incl generateA2uiImpl)
- React component tests: 68 tests (7 suites)
- Aimock: 18 deterministic demo fixtures

# Conflicts:
#	showcase/shared/frontend/src/components/__tests__/bar-chart.test.tsx
#	showcase/shared/frontend/src/components/__tests__/meeting-time-picker.test.tsx
#	showcase/shared/frontend/src/components/__tests__/pie-chart.test.tsx
#	showcase/shared/frontend/src/components/__tests__/sales-dashboard/todo-card.test.tsx
#	showcase/shared/frontend/src/components/__tests__/sales-dashboard/todo-list.test.tsx
#	showcase/shared/frontend/src/components/__tests__/tool-reasoning.test.tsx
#	showcase/shared/frontend/tsconfig.json
#	showcase/shared/manifest.schema.json
#	showcase/shared/typescript/tools/__tests__/get-weather.test.ts
#	showcase/shared/typescript/tools/__tests__/schedule-meeting.test.ts
#	showcase/shared/typescript/tools/__tests__/search-flights.test.ts
#	showcase/shared/typescript/tools/index.ts
#	showcase/shared/typescript/tools/sales-todos.ts
2026-04-13 19:57:45 -07:00
Jordan Ritter 25ee60e0dd feat: add shared showcase packages with tools, components, and test coverage
- @copilotkit/showcase-shared: React hooks, components, A2UI catalog, SalesDashboard
- Shared Python tools: 7 implementations + 54 pytest tests
- Shared TypeScript tools: equivalents + 43 vitest tests
- React component tests: 68 tests (7 suites)
- Aimock fixtures: 18 deterministic demo scenarios
2026-04-13 17:38:44 -07:00