Commit Graph

26 Commits

Author SHA1 Message Date
Atai Barkai 1695b51bac fix(a2ui-hello-world): patch .d.ts and .d.mts in local-install
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 09:06:11 -07:00
Atai Barkai 99e1e1a1eb refactor(a2ui-hello-world): use streamingSurfaces array config
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 08:53:28 -07:00
Atai Barkai fed92b61a4 chore(a2ui-hello-world): remove unused streamingThrottleMs from route config
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 08:37:33 -07:00
Atai Barkai e2b44a96a5 feat(a2ui-hello-world): add streaming A2UI flight search example
New tool search_flights_streaming: schema is registered on the middleware
config and emitted at TOOL_CALL_START. As the LLM streams flight data
as tool args, the middleware partial-parses and emits dataModelUpdate
progressively — flight cards appear one by one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 00:45:10 -07:00
Atai Barkai 3d4decbee9 fix(a2ui-hello-world): add List wrapper to flight schema for data binding
The Card schema's data paths (/flightNumber, /origin, etc.) need a
List root with dataBinding: /flights to scope each card's data context.
Without it, paths resolve at the root where data lives under /flights/0/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 21:45:29 -07:00
Atai Barkai a57de4fe73 fix(a2ui-hello-world): patch monorepo middleware in local-install, add List to flight schema
local-install now copies locally built a2ui-middleware into the monorepo
node_modules so the runtime resolves the version with a2ui_operations
container support. Flight schema now wraps cards in a List with
dataBinding: /flights for proper data context scoping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 21:40:44 -07:00
Atai Barkai 0dd826e8af fix(a2ui-hello-world): use A2UI_OPERATIONS_KEY constant across Python SDK and renderer
Restores a2ui.render() usage in search_flights. The constant
"a2ui_operations" is now defined in all three layers: Python SDK,
ag-ui middleware, and A2UIMessageRenderer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 21:24:24 -07:00
Atai Barkai afa9f7ac73 feat(a2ui-hello-world): use uv.sources for local Python SDK linking
pyproject.toml [tool.uv.sources] points copilotkit at the local
sdk-python directory. Survives uv sync / LangGraph CLI restarts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 20:34:19 -07:00
Atai Barkai 4e0d857146 feat(a2ui-hello-world): add copilotkit.a2ui Python SDK module and a2ui_operations container
- copilotkit/a2ui.py: load_schema(), surface_update(), data_model_update(),
  begin_rendering(), render() — canonical SDK for building A2UI operations
- A2UIMessageRenderer reads a2ui_operations (with operations fallback)
- local-install script now includes editable pip install of Python SDK
- search_flights uses `from copilotkit import a2ui` pattern

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 19:54:43 -07:00
Atai Barkai de222fb9e7 refactor(a2ui-hello-world): load A2UI schema from JSON file
Schema is now a plain .json file — paste-able directly from a schema
builder. load_schema() reads it, a2ui_surface() does the rest.
Updated Flight TypedDict to match new schema's data bindings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 19:37:44 -07:00
Atai Barkai a58feaddd4 refactor(a2ui-hello-world): extract flight schema to dedicated file
Tool file is now just the TypedDict + one a2ui_surface() call.
Schema lives in a2ui_flight_schema.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 19:35:19 -07:00
Atai Barkai a3d63b6ed8 refactor(a2ui-hello-world): extract a2ui_surface helper, simplify search_flights
a2ui.py handles operations assembly, data typing, and normalization.
search_flights is now just schema + one a2ui_surface() call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 19:28:24 -07:00
Atai Barkai 39890b533a refactor(a2ui-hello-world): clarify schema/data separation in search_flights
Make it explicit in code that the tool emits three separate A2UI
messages: schema (surfaceUpdate), data (dataModelUpdate), and
render trigger (beginRendering). The schema is fixed; only data
changes per invocation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 19:17:12 -07:00
Atai Barkai 49197b9d67 feat(a2ui-hello-world): add fixed schema A2UI flight search example
Adds a data-bound declarative UI tool (search_flights) demonstrating the
full A2UI lifecycle: surfaceUpdate → dataModelUpdate → beginRendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 18:06:48 -07:00
Atai Barkai 15904a53b8 feat(a2ui-hello-world): add AG-UI local linking to local-install
Extends .pnpmfile.cjs and local-install script to also build and link
AG-UI packages from a sibling ag-ui/ repo, enabling local development
across both CopilotKit and AG-UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 16:59:57 -07:00
Atai Barkai 567e134445 fix(a2ui-hello-world): remove pie chart streaming animation
The CSS transition on stroke-dasharray/dashoffset looked jarring
during streaming. Just render slices instantly instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:55:09 -07:00
Atai Barkai 79697e6a9d fix(a2ui-hello-world): rebalance demo data for better pie chart distribution
Adjust revenue figures so no single category exceeds ~35%, producing
a more visually balanced pie chart during demos.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 00:22:04 -07:00
Atai Barkai e202ec6f1a feat(a2ui-hello-world): redesign generative UI components
Custom SVG donut chart with CSS-transitioned streaming animations,
animated bar chart with slide-in entrance for new bars, polished
meeting time picker with Lucide icons and larger touch targets,
and refined tool rendering with monospace names and styled arg blocks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 00:22:00 -07:00
Atai Barkai 36c2b86845 feat(a2ui-hello-world): set inspector default position to top-left
Use the new inspectorDefaultAnchor prop to place the inspector button
in the top-left corner, avoiding overlap with the Chat/App toggle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 23:16:37 -07:00
Atai Barkai 5e26c8d47b feat(a2ui-hello-world): add local-install for iterating on CopilotKit SDKs
Add .pnpmfile.cjs hook and `pnpm run local-install` script that builds
CopilotKit packages from the monorepo and symlinks them into the example
app via COPILOTKIT_LOCAL env var. Default `pnpm install` still pulls from
npm, preserving the template experience.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 22:49:42 -07:00
Tyler Slaton af77b019f1 feat(langgraph-python): better prompt, tasks -> todos
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-12 20:44:56 -04:00
Tyler Slaton c672be411d fix(langgraph-python): sync lockfiles
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-12 20:21:06 -04:00
Tyler Slaton ccd4cc4437 feat: improve UI, better a2ui example, faster model
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-12 20:09:51 -04:00
Jordan Ritter fd34bbfbf6 style: format all example files with prettier
Run prettier on ~1,865 files across examples/ to match the monorepo's
formatting standards. These files were imported as-is from standalone
repos that used different prettier configs.
2026-03-12 13:06:04 -07:00
Jordan Ritter 34268b756a fix: remove SVG from LFS tracking
SVG files are text-based XML averaging ~218 bytes each. LFS tracking
adds per-file HTTP fetch overhead with no storage benefit, suppresses
git diff output, and breaks tutorial clone instructions that use
GIT_LFS_SKIP_SMUDGE=1 (users get LFS pointers instead of icons).
2026-03-12 13:06:03 -07:00
Jordan Ritter ec3a5ff114 feat: consolidate 47 demo repos into examples/ 2026-03-12 13:06:02 -07:00