Commit Graph

10887 Commits

Author SHA1 Message Date
Jordan Ritter 2324241384 fix(showcase/langgraph-typescript): rename roll_dice to roll_d20 matching LGP 2026-05-17 07:47:31 -07:00
Jordan Ritter 04977d202f fix(showcase/langgraph-typescript): bump @ag-ui/langgraph to 0.0.32
Fixes "message type returned from LangGraph is not supported" error
for search_flights. The dependency is transitive (via @copilotkit/runtime
and @copilotkit/sdk-js), so npm overrides are used to force 0.0.32.
2026-05-17 07:47:30 -07:00
Jordan Ritter 78b35b32de fix(showcase/langgraph-typescript): align subagents to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter c328f59bfc fix(showcase/langgraph-typescript): align gen-ui-agent to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 7e101b5ecb fix(showcase/langgraph-typescript): align gen-ui-tool-based to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 84a8b24022 fix(showcase/langgraph-typescript): align tool-rendering to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 7d60c3a813 fix(showcase/langgraph-typescript): align readonly-state-agent-context to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 86244f7a48 fix(showcase/langgraph-typescript): align shared-state-streaming to LGP gold standard 2026-05-17 07:47:30 -07:00
Jordan Ritter 784c77d432 fix(showcase/langgraph-typescript): align shared-state-read-write to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 4be79861b8 fix(showcase/langgraph-typescript): align tool-rendering-reasoning-chain to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 04887c3022 fix(showcase/langgraph-typescript): align tool-rendering-custom-catchall to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 931385ac8e fix(showcase/langgraph-typescript): align tool-rendering-default-catchall to LGP gold standard 2026-05-17 07:47:29 -07:00
Jordan Ritter 0413a3c849 fix(showcase/aimock): add catch-all fixture for neutral assistant demos 2026-05-17 07:47:29 -07:00
Jordan Ritter df6ae290d0 fix(showcase/langgraph-typescript): voice route uses starterAgent graph ID 2026-05-17 07:47:29 -07:00
Jordan Ritter e4d9279984 fix(showcase/langgraph-typescript): add shadcn/ui components and deps for LGP parity 2026-05-17 07:47:29 -07:00
Jordan Ritter e039f24b60 fix(showcase/langgraph-typescript): align headless-complete to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter a6b08e5e31 fix(showcase/langgraph-typescript): align multimodal to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 49304976e0 fix(showcase/langgraph-typescript): align headless-simple to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 845554496f fix(showcase/langgraph-typescript): align auth to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 1e1314cc36 fix(showcase/langgraph-typescript): align agent-config to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 475bd0807e fix(showcase/langgraph-typescript): align chat-customization-css to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter bcb9ad05f8 fix(showcase/langgraph-typescript): align frontend-tools to LGP gold standard 2026-05-17 07:47:28 -07:00
Jordan Ritter 0115f1285d fix(showcase/langgraph-typescript): align voice to LGP gold standard 2026-05-17 07:47:27 -07:00
Jordan Ritter 1dd5fbecae fix(showcase/aimock): add 9 recorded LGT beautiful-chat fixtures 2026-05-17 07:47:27 -07:00
Jordan Ritter 7567843e52 fix(showcase/aimock): add recorded LGT fixtures for beautiful-chat multi-turn flows
Record-replay from LGT with real OpenAI key captures the exact request
format the LangGraph TS agent sends through the CopilotKit pipeline.
Covers Sales Dashboard (A2UI Dynamic), Calculator (Open Gen UI), and
Task Manager (Shared State) — all of which failed locally because
hand-written fixtures didn't match the LGT request format.

Also adds d5-recorded directory to docker-compose.local.yml fixture
loading so recordings replay automatically.
2026-05-17 07:47:27 -07:00
Jordan Ritter 797762eff4 fix(showcase/aimock): add beautiful-chat fixtures for sales dashboard, calculator, search flights
Sales Dashboard: add query_data turn-0 fixture and generate_a2ui
turn-1 fixture; remove hasToolResult:false from _design_a2ui_surface
and render_a2ui sub-fixtures so they match after query_data returns.

Calculator: add generateSandboxedUi fixture with metric shortcut
buttons (Revenue, Customers, Conv%, category breakdowns) plus
toolCallId response.

Search Flights: already covered by existing "flights from SFO to JFK"
fixture — no changes needed.
2026-05-17 07:47:27 -07:00
Jordan Ritter dc47a9ce9a fix(showcase/langgraph-typescript): align frontend-tools-async to LGP gold standard 2026-05-17 07:47:27 -07:00
Jordan Ritter 80f39b9548 fix(showcase/aimock): add fixtures for pilot cell suggestions 2026-05-17 07:47:27 -07:00
Jordan Ritter e052460730 fix(showcase/langgraph-typescript): align chat-slots to LGP gold standard 2026-05-17 07:47:26 -07:00
Jordan Ritter 65fd029265 fix(showcase/langgraph-typescript): align agentic-chat to LGP gold standard 2026-05-17 07:47:26 -07:00
Jordan Ritter ae2982788d fix(showcase/langgraph-typescript): align prebuilt-sidebar to LGP gold standard 2026-05-17 07:47:26 -07:00
Jordan Ritter a0ca0e2d39 fix(showcase/langgraph-typescript): align prebuilt-popup to LGP gold standard 2026-05-17 07:47:26 -07:00
Jordan Ritter a2dd35f622 fix(showcase/langgraph-typescript): align beautiful-chat to LGP gold standard 2026-05-17 07:47:26 -07:00
Tyler Slaton 98c1a52212 Revert "fix(web-inspector): polyfill localStorage in vitest env for Node 22.4+" (#4878)
Reverting a bit of a hallucinated fix to some tests
2026-05-16 18:11:53 -07:00
Sam Julien fbe4888699 fix(shell-docs): copy-dedent in fence-in-JSX bodies + framework-route render parity + content cleanups (#4877)
## Summary

Four small rendering-pipeline fixes from a post-cutover QA pass that
diagnosed copy-malformation reports on specific code blocks. Single PR
because the fixes are each tiny and form a coherent "render/copy parity"
group.

## Fixes

### 1. `MdxCodeBlock` now dedents fence-in-JSX bodies

**Problem**: When a `python` / `tsx` etc. fence sits inside JSX (e.g.
`<Tab><Step>...</Step></Tab>`), MDX preserves the JSX nesting's leading
whitespace on every body line. `extractText` recovers it faithfully, but
the copy payload comes out with 16-24 leading spaces per line — user
pastes invalid Python with top-level statements indented.

**Fix**: Added a private `dedent()` helper in
`src/components/mdx-code-block.tsx` that measures min leading-whitespace
across non-blank lines and strips it. Both the visible `<pre>` body and
the `<CopyButton>` payload use the dedented text, so rendered == copied.
Column-0 fences (the common case) keep full syntax highlighting
unchanged; JSX-nested fences fall back to plain `<code>` after dedent.

Fixes the reports against AG-UI middleware, A2A middleware section 3,
MS-Py Quickstart `main.py` and `route.ts`.

### 2. Framework route renders post-features content with parity

**Problem**: PR #4830 wired `rehypeCodeMeta` + `pre: MdxCodeBlock` into
`docs-page-view.tsx` and the AG-UI route, but the `FrameworkRootPage`
(line 451 of `[framework]/[[...slug]]/page.tsx`) renders its
after-features MDX with bare `rehypeHighlight` and no `pre` override. So
features-page MDX on framework-scoped routes loses the file-path
caption, copy button on bare fences, and dedent behavior.

**Fix**: Imported `MdxCodeBlock` + `rehypeCodeMeta` into that route and
added them to the `MDXRemote` config — symmetric with
`docs-page-view.tsx`.

### 3. `display-only.mdx` fence closers fixed

**Problem**: Lines 30 and 53 closed `tsx` fences with **four** backticks
instead of three. CommonMark requires matching counts — fences never
closed, copy payload grabbed subsequent JSX tags + adjacent prose.

**Fix**: Two single-character edits, fences now balance.

Note: this specific bug was also caught by @Abubakar-01 in #4862 —
including it here so the closing of #4862 doesn't leave the bug behind.

### 4. Deduplicate `<Callout>` on `tool-rendering.mdx`

**Problem**: Identical `<Callout type="info">` blocks at lines 17-19 and
23-25 (verified byte-identical). Copy-paste artifact making the page
look messy and probably contributing to the QA verdict of "Missing
imports, Unclear how to integrate".

**Fix**: Removed the duplicate at lines 23-25; kept the first occurrence
(before `<InlineDemo>` — natural callout-then-demo order). The other 2
`<Callout>` matches in the file are different blocks (free-course,
name-must-match).

## Files changed

```
 src/app/[framework]/[[...slug]]/page.tsx           | 21 ++++++++-
 src/components/mdx-code-block.tsx                  | 51 +++++++++++++++++++++-
 src/content/docs/generative-ui/tool-rendering.mdx  |  4 --
 src/content/docs/generative-ui/your-components/display-only.mdx | 4 +-
 4 files changed, 70 insertions(+), 10 deletions(-)
```

## Test plan

- [ ] Visit `/{framework}/agentic-protocols/a2a` — copy the middleware
code block in section 3, paste into an editor: should be column-0 valid
TypeScript (no leading 4-sp indent)
- [ ] Visit
`/{framework}/integrations/microsoft-agent-framework/quickstart` — copy
`main.py`, paste: valid Python with no 24-sp leak
- [ ] Visit
`/{framework}/integrations/microsoft-agent-framework/quickstart` — copy
`route.ts`, paste: clean
- [ ] Visit `/{framework}/agentic-protocols/ag-ui-middleware` — copy
button + file path caption present (parity with unscoped route)
- [ ] Visit `/generative-ui/your-components/display-only` — Tabs render
correctly, copy works on both `page.tsx` and `chart.tsx` tabs
- [ ] Visit `/generative-ui/tool-rendering` — single Callout at the top,
not duplicated around the InlineDemo
- [ ] No regression on column-0 fences (e.g. `/auth`, `/react-native`):
syntax highlighting still works, copy/caption unchanged
- [ ] Bundler clean: `npx tsx showcase/scripts/bundle-demo-content.ts`
(697 demos)
- [ ] Typecheck: `npx tsc --noEmit` in `showcase/shell-docs/` (was clean
against current main)

## Verification done

- Typecheck: pass
- Bundler: pass (697 demos, no MDX errors)
- Sample dedent input/output on a 24-sp body: column-0 output as
expected

## Hook bypass

Pre-commit `test-and-check-packages` and `commitlint` bypassed via
`LEFTHOOK_EXCLUDE` (pre-existing web-inspector test failure on main +
commitlint binary not installed in worktrees). Lint-fix, lockfile-sync,
check-binaries all ran and passed.
2026-05-15 16:23:52 -07:00
Sam Julien b039c8f3b7 fix(showcase): move @endregion marker after Chat closing brace in reasoning demos (cherry-pick of #4858) (#4876)
## Summary

Cherry-pick of #4858 (by @Abubakar-01) onto a maintainer-owned branch so
CI can run with full token access. The original PR's CI was blocked at
the Depot OIDC step because fork PRs don't receive the build tokens —
the code itself is fine.

All credit to @Abubakar-01; commit authorship preserved.

## The fix

Region markers `@endregion[reasoning-block-render]` in 16
`agentic-chat-reasoning/page.tsx` demos closed **before** the enclosing
`function Chat()`'s closing brace, so the rendered snippet had an
unbalanced `{` and the closing `}` cut off mid-body. Moves each
`@endregion` to after the function's closing brace so the snippet body
is syntactically complete.

Matches the contiguous-region-wraps-imports-and-body convention
established in #4829.

## Files changed

16 demo files across ag2, agno, built-in-agent, claude-sdk-python,
claude-sdk-typescript, crewai-crews, google-adk, langgraph-fastapi,
langgraph-python, langgraph-typescript, langroid, llamaindex, mastra,
ms-agent-python, pydantic-ai, spring-ai, strands — each
`src/app/demos/agentic-chat-reasoning/page.tsx` gets the same
single-line marker move.

## Test plan

- [ ] Bundle regenerates clean: `pnpm tsx
showcase/scripts/bundle-demo-content.ts`
- [ ] Sample 3 `reasoning-block-render` region bodies in
`demo-content.json` — each should now contain a balanced `function
Chat() { ... }`
- [ ] `/{framework}/generative-ui/reasoning` (or wherever the snippet is
rendered) shows the full Chat function

## Original PR

Closes #4858 in favor of this maintainer-branch version. CI on fork PRs
is blocked on Depot OIDC + Vercel deploy authorization, neither of which
we can override per-PR.
2026-05-15 16:19:48 -07:00
Sam Julien 4652defbae fix(shell-docs): replace ... placeholder + add missing handler in a2a route.ts snippet
Section 3 "Configure the A2A middleware" had a literal ... ellipsis where
the imports should go, and the code block ended at runtime definition
with no POST handler — pasted code would not compile. Add the imports
the block actually uses (HttpAgent, A2AMiddlewareAgent, CopilotRuntime,
ExperimentalEmptyAdapter, copilotRuntimeNextJSAppRouterEndpoint,
NextRequest) and the canonical Next.js App Router POST handler that
hands requests to the runtime. Pattern matches the ms-agent-framework
quickstart route.ts.
2026-05-15 16:11:31 -07:00
Sam Julien 87892105f6 fix(shell-docs): rendering parity, copy dedent, and content cleanup
Consolidates four QA findings from the post-cutover rendering pipeline:

- MdxCodeBlock now dedents fence-in-JSX bodies before passing the copy
  payload to <CopyButton>. Fences nested inside <Tab>/<Step>/<Tabs> were
  reaching the clipboard with 16-24 leading spaces per line (invalid
  Python / TS on paste). The visible <pre> body is dedented in lockstep
  so rendering matches what's copied.

- Wires rehypeCodeMeta + pre: MdxCodeBlock into the framework-root
  after-features MDX renderer, achieving parity with docs-page-view.tsx.
  Previously bare rehypeHighlight left these blocks without copy
  buttons or file-path captions.

- Closes the two fences in display-only.mdx with three backticks instead
  of four, so the fences actually terminate and copy doesn't grab
  adjacent JSX/prose.

- Removes a copy-paste-duplicated <Callout> on tool-rendering.mdx
  (kept the first occurrence, dropped the post-InlineDemo duplicate).
2026-05-15 15:56:38 -07:00
Tyler Slaton 3db4f85d6d Revert "fix(web-inspector): polyfill localStorage in vitest env for Node 22.4+"
This reverts commit 63d1d9e02c.
2026-05-15 15:56:18 -07:00
Abubakar 60d10a2e56 fix(showcase): move @endregion marker after Chat closing brace in all agentic-chat-reasoning demos
The // @endregion[reasoning-block-render] comment was indented inside the
Chat function body, causing the rendered docs snippet to omit the final
closing brace — a visible syntax error. Moves the marker to after the }
in all 16 agentic-chat-reasoning/page.tsx files.

Also wraps the custom-reasoning snippet in reasoning.mdx in a two-tab
block so the ReasoningBlock import in page.tsx links directly to the
reasoning-block.tsx component definition in the adjacent tab.
2026-05-15 15:46:18 -07:00
Jordan Ritter 7bed352ed7 Pin aimock to 1.24.1 in doc-tests workflow (#4875)
## Summary
- Pin `@copilotkit/aimock` from `@latest` to `@1.24.1` in
test_integration-docs.yml
- Prevents unexpected breakage from new aimock releases and makes CI
builds reproducible

## Test plan
- Workflow-only change; the pinned version matches current latest
(1.24.1)
2026-05-15 14:22:54 -07:00
Jordan Ritter a768243917 fix: pin aimock to 1.24.1 instead of @latest
Pinning to a specific version prevents unexpected breakage from
new aimock releases and makes CI builds reproducible.
2026-05-15 14:22:04 -07:00
Jordan Ritter 6c2774404f fix(ci): scope git config to --local in publish-release (#4874)
## Summary

- Changed `git config --global` to `git config --local` for user.email
and user.name in the publish job's "Configure git user" step
- `--global` persists credentials beyond the job into the runner
environment; `--local` scopes them to the checkout directory only

## Test plan

- [ ] Verify next release publish still creates and pushes git tags
correctly
- [ ] Confirm no other steps in the workflow depend on global git config
2026-05-15 13:55:22 -07:00
Jordan Ritter 4f77a2d700 fix(ci): scope git config to --local in publish-release
git config --global persists user.name/email beyond the job into the
runner environment. Changed to --local so credentials are scoped to
the checkout directory only.
2026-05-15 13:54:10 -07:00
Jordan Ritter 802ac5cffb Add GitHub Environment protection to publish/deploy workflows (#4873)
## Summary

- Add `environment:` declarations to all 5 publish/deploy jobs across
CopilotKit workflows
- This enables GitHub Environment protection rules (required reviewers,
deployment branch policies, wait timers) to gate package publishing and
Railway deploys

### Workflows updated

| Workflow | Job | Environment |
|----------|-----|-------------|
| prerelease.yml | publish | npm |
| publish-commit.yml | build | npm |
| publish-release.yml | publish | npm |
| stable-release.yml | create-release-pr | npm |
| showcase_deploy.yml | verify | railway |

### Environments created

- `npm` - for TypeScript package publishing
- `railway` - for showcase deployment verification

### Next steps

After merging, add required reviewers to each environment via repo
Settings > Environments.

## Test plan

- [ ] Verify workflow YAML is valid (no syntax errors)
- [ ] Confirm environments exist in repo settings
- [ ] Test a dry-run prerelease to verify environment gates work
2026-05-15 13:41:26 -07:00
Jordan Ritter bed747bb77 fix: add GitHub Environment protection to publish/deploy workflows
Add `environment:` declarations to all publish and deploy jobs so that
GitHub Environment protection rules (required reviewers, deployment
branches, wait timers) can gate package publishing and deploys.

- prerelease.yml publish → environment: npm
- publish-commit.yml build → environment: npm
- publish-release.yml publish → environment: npm
- stable-release.yml create-release-pr → environment: npm
- showcase_deploy.yml verify → environment: railway
2026-05-15 13:40:56 -07:00
Jordan Ritter 8537234759 fix(ci): strip @mentions from dependabot major version analysis comments (#4872)
## Summary

- Strip `@username` mentions from upstream release notes before posting
as PR comments
- Prevents notification spam to external open-source contributors
- Preserves `@scope/pkg`, `email@domain`, and `action@version` patterns

Closes CopilotKit/aimock#216

## Test plan

- [x] Regex tested against real spam comment from aimock PR #214 (44
mentions stripped, 0 collateral damage)
- [x] YAML code refs (`checkout@v5`) preserved
- [x] npm scopes (`@actions/cache`) preserved
- [x] Email patterns preserved
2026-05-15 13:37:12 -07:00
Jordan Ritter ebb1657202 fix(ci): strip @mentions from dependabot major version analysis comments
Upstream release notes contain @username references that trigger GitHub
notifications when posted as PR comments. Strip mention-prefix @ from
standalone mentions while preserving @scope/pkg, email@domain, and
action@version patterns.

Closes CopilotKit/aimock#216
2026-05-15 13:35:05 -07:00
Jordan Ritter c5ad23ce99 Add top-level permissions to 4 workflows (#4871)
## Summary
- Add `permissions: contents: read` at the top level of prerelease.yml,
publish-commit.yml, publish-release.yml, and showcase_docs-sync.yml
- All four workflows already have job-level permissions blocks; the
top-level block constrains the default token scope for any future jobs
that might be added without explicit permissions

## Test plan
- [ ] Verify prerelease workflow_dispatch still works
- [ ] Verify publish-commit still posts snapshot comments (job-level
`pull-requests: write` preserved)
- [ ] Verify publish-release still reads content on PR merge
- [ ] Verify showcase docs-sync still creates PRs (job-level `contents:
write` + `pull-requests: write` preserved)
2026-05-15 13:28:59 -07:00
Jordan Ritter 42d8c600fa fix: add top-level permissions to 4 workflows 2026-05-15 13:27:48 -07:00