Commit Graph

4085 Commits

Author SHA1 Message Date
Tyler Slaton 88de23324a Merge remote-tracking branch 'origin/main' into codex/bia-root-review-fix 2026-06-12 16:47:25 -07:00
Tyler Slaton 1adaf1b839 fix(shell-docs): harden built-in-agent root migration 2026-06-12 16:41:13 -07:00
Tyler Slaton 6d6a65c531 docs: testing that previews are up
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-06-12 16:27:57 -07:00
Tyler Slaton 5c8c56071b feat(shell-docs): serve Built-in Agent docs at the docs root
The default framework's docs now live at bare root URLs (/quickstart,
/server-tools, ...) instead of under /built-in-agent/. The root
catch-all resolves BIA-authored pages first, /built-in-agent/:path*
permanently redirects to /:path*, and sidebar/landing/selector hrefs
are root-relative.

The whole root surface shares ONE sidebar: the Built-in Agent IA with
the agnostic root sections (Concepts, Runtime, Deploy, Platforms, Other)
folded in via buildRootSurfaceNav. Empty ---Section--- placeholders in
the BIA meta.json position each folded-in section; appendSharedRootSections
fills them, dropEmptySections clears any that stay empty, and route-group
nodes (e.g. the (other) tree) are excluded so the fold never emits a bogus
/(other)/... href. Without this, navigating from a BIA page to an agnostic
page (/concepts/*, /backend/*) swapped the sidebar between two overlapping
IAs. The fold is scoped to the root surface only — deepagents keeps
Platforms-only and generated frameworks are untouched.

Duplicate pages that the fold would otherwise double up are consolidated
onto their canonical root homes:
- The three BIA backend wrappers (copilot-runtime, custom-agent, ag-ui)
  are retired; the folded-in Runtime section is their single home. This
  resolves the /backend/ag-ui collision (the wrapper had shadowed the
  real root page). The bare /ag-ui segment belongs to the AG-UI protocol
  docs, so old /built-in-agent/ag-ui links redirect to /backend/ag-ui.
- The BIA troubleshooting wrappers are retired in favor of the canonical
  /troubleshooting/* pages surfaced by the folded-in Other section, so
  Troubleshooting appears once.

Stale redirect R25 (/runtime-server-adapter -> /backend/copilot-runtime)
is removed: runtime-server-adapter is a distinct, current 'Deploy to any
runtime' page linked from the sidebar, and the redirect had made it
unreachable at its own URL.

Middleware rules that would shadow or loop against the new surface
(M2 /quickstart, BIA_DEFAULT_ROOT_REDIRECTS, MV-telemetry) are retired,
and remaining live destinations move off the old prefix. The sitemap,
llms.txt, per-page .md/.mdx, and OG image routes resolve the same
content the pages serve. The client-side RouterPivot bounce is removed
since root URLs now render real content in place.
2026-06-12 16:08:35 -07:00
Maxim 954e3b613d feat(showcase): align card internals and add severity icons to StatusBadge
Override the basic catalog's Text (its built-in 8px margin misaligned
card rows), keep badges content-sized instead of stretched by flex
parents, and prefix each badge with a hardcoded lucide icon per variant
(error/warning/success/info). Renderer-only — payloads and fixtures are
unaffected.
2026-06-13 00:16:54 +02:00
Maxim 1e0d200f53 feat(showcase): dashboard-grade surfaces on every declarative-gen-ui pill
Hero loses its surrounding card (bare KPI strip over the chart cards,
pinned to all six months); team performance pairs the rep table with a
quota-attainment bar chart; top account pairs the fact card with a
product-line pie (new dataset entry); at-risk becomes a risk panel — KPI
strip (ARR at risk / accounts / biggest exposure) over three side-by-side
severity cards with reason + next action. Fixtures re-captured from live
responses; D5 probe drops declarative-card from the hero set; e2e asserts
the accompanying charts and the risk panel; QA docs updated.
2026-06-13 00:16:53 +02:00
Maxim 06c819d0fb feat(showcase): match declarative-gen-ui renderers to beautiful-chat's sales dashboard
Ports beautiful-chat's exact visual language into the catalog renderers:
DashboardCard chrome (12px radius, 20px padding, soft shadow) for Card and
chart wrappers, its Metric typography with colored trend deltas, a recharts
donut (innerRadius 40, paddingAngle 2, tooltip, no legend) replacing the
custom SVG donut, and uniform blue bars on a dashed grid. E2E pie
fingerprints move from circle/legend assertions to recharts sectors; the
hero surface-count guard allows the two ResponsiveContainers (pie + bar)
one composed dashboard now produces.
2026-06-13 00:16:53 +02:00
Maxim 667114cfa4 test(showcase): assert pill clicks dispatched in declarative-gen-ui e2e
Click a pill, then require the user-message bubble before asserting on
the surface; retry the click if it was swallowed. On slow dev-server
hydration the first click can land before the chat send pipeline is
wired, which previously burned the full surface-assertion budget and
masked the real failure point.
2026-06-13 00:14:49 +02:00
Maxim a558adc2d8 test(showcase): source gen-ui-declarative fixtures from captured live responses
Replaces the hand-authored surface payloads with real gpt-5.4 responses
captured via the langgraph dev threads API during OSS-136 prompt
iteration (catalogId injected, since the replay path resolves the catalog
from recorded tool args). Verified: fixture suite 738/738, LGP container
e2e 6/6, ADK container e2e 6/6.
2026-06-13 00:14:48 +02:00
Maxim 513bf87234 test(showcase): regenerate gen-ui-declarative aimock fixtures for the new pills
Same three-call choreography per pill (outer generate_a2ui, inner design
toolcall discriminated by toolName, narration matched by toolCallId), now
keyed to the sales-analyst prompts and emitting Vantage Threads payloads:
composed hero dashboard, rep DataTable, at-risk StatusBadge cards, and
top-account InfoRows. Verified by the LGP Playwright run against the
aimock-backed container (6/6).
2026-06-13 00:14:48 +02:00
Maxim 7c68e95b04 test(harness): sync gen-ui-declarative D5 probe to the sales-analyst pill set
Hero pill asserts the composed dashboard conjunctively (card + metric +
pie + bar); pills 2-4 each require a testid the hero is steered not to
mount (data-table / status-badge / info-row), preserving the
newly-mounted anti-masking gate.
2026-06-13 00:14:48 +02:00
Maxim 4de75ff900 feat(showcase): rework declarative-gen-ui demo into a sales-analyst dashboard (OSS-136)
The demo now plays an embedded sales analyst for a fictional company:
suggestion pills are natural business questions (chart-type steering moved
from user prompts into the system prompt), the hero pill composes a full
dashboard (KPI metrics + pie + bar in one surface) modelled on
beautiful-chat's sales dashboard, and the catalog gains DataTable,
gap-aware Row/Column, Metric trendValue, and the beautiful-chat palette.
Dataset + composition rules ship as frontend agent context
(sales-context.ts) so they reach both the primary agent and the secondary
A2UI planner in LGP and ADK alike. E2E specs and QA docs updated to the
new pill set.
2026-06-13 00:14:47 +02:00
Jordan Ritter 8b6052ac7e fix(showcase/scripts): ratchet aimock-fixtures ceilings + close BIA headless-complete reprompt-loop known-issue
* duplicate ceiling 290→291: tool-rendering.json's tightened 'current
  price of AAPL' matchers now share two match keys with the existing
  tool-rendering-custom-catchall.json entries in the same BIA context,
  runtime-disambiguated by feature route.
* shadow ceiling 134→132 (ratchet down): the bare 'AAPL' vs 'current
  price of AAPL' shadow pair on the tool-rendering.json side is gone.
* PARITY_NOTES: replaces the 'headless-complete turns 3+4 server-tool
  reprompt loop' known-issue section with a resolved-via-sequenceIndex
  description; the architectural reprompt loop now converges via the
  sequenceIndex-gated emitter + narration-fallback pattern in
  gen-ui-headless-complete.json.
2026-06-12 14:50:47 -07:00
Jordan Ritter 89a2dd52ef fix(showcase/aimock): gate gen-ui-headless-complete emitters with sequenceIndex to break BIA reprompt loop
BIA registers headless-complete's tools (get_weather, get_stock_price,
get_revenue_chart, highlight_note) as server-executed via TanStack's
chat() engine. After the LLM returns a tool call, TanStack runs the
server tool and reprompts the LLM with the result. The userMessage-keyed
toolcall fixtures fired again on every reprompt because the original
user pill text stays in conversation history — and the toolCallId-keyed
narration fallback never matched because BIA's /v1/responses endpoint
rewrites the assistant tool_call_id to a runtime-generated fc-… value.
Net effect: turns 3+4 (highlight, revenue chart) ballooned to 70+
assistant messages within the 60s timeout window.

Restructured each pill as a (sequenceIndex:0 emitter, narration
fallback) pair. The emitter matches the FIRST request for the pill
prompt (counter starts at 0) and emits the tool call; subsequent BIA
reprompt iterations fall through the now-exhausted emitter to the
narration fallback (no tool call), so the loop converges. sequenceIndex
is chosen over hasToolResult:false because hasToolResult is computed
across the entire thread — any earlier pill's tool result would
permanently disable a hasToolResult:false emitter, breaking multi-turn
sessions where turn 2+ would have hasToolResult=true globally.
2026-06-12 14:50:26 -07:00
Jordan Ritter ab05464c5e fix(showcase/aimock): tighten built-in-agent tool-rendering matchers to avoid shadowing gen-ui-headless-complete pills
The legacy bare 'AAPL' userMessage matchers in tool-rendering.json were
substrings of gen-ui-headless-complete's 'price of AAPL right now'
pill prompt, so when the BIA TanStack server-tool reprompt loop hit
iteration 2 (toolCallId chain broken by /v1/responses id rewriting),
the request fell through to tool-rendering.json's loose 'AAPL'
matchers and leaked wrong-card content. Tightened all four bare 'AAPL'
match keys to 'current price of AAPL' — preserves matching for the
tool-rendering 'Stock price' pill ("What's the current price of
AAPL?") and the custom-catchall probe's second prompt ("What's the
current price of AAPL?") while no longer matching the headless
probe's "What's the price of AAPL right now?".
2026-06-12 14:50:26 -07:00
Mark 60d39eae82 fix(showcase): pin page-registered A2UI catalog as defaultCatalogId fleet-wide (#5425)
## Problem

Asking for a sales dashboard in the beautiful-chat demo (reported on
`dojo.showcase.copilotkit.ai/?integration=langgraph-python&demo=beautiful-chat`)
fails with:

> A2UI render error: Catalog not found:
https://a2ui.org/specification/v0_9/basic_catalog.json

## Root cause

**Introduced by #5245** ("chore(showcase): upgrade langgraph A2UI to
stable releases + rewrite dynamic-schema docs", merged 2026-06-05): it
flipped the beautiful-chat routes to `injectA2UITool: true` — switching
them onto the runtime-injected `render_a2ui` tool — without adding the
`defaultCatalogId` the middleware contract expects the host to provide.
/cc @ranst91

The runtime-injected `render_a2ui` tool guide explicitly tells the model
**not** to send a `catalogId` ("the catalog id is set by the host, not
by you" — `@ag-ui/a2ui-middleware` `tools.ts`), and integrations whose
backend owns `generate_a2ui` see real models omit or late-stream the
argument. When the streamed `createSurface` is emitted without a
configured `defaultCatalogId`, the middleware falls back to the spec
basic catalog URL — which no showcase page registers, so the renderer
throws "Catalog not found".

The middleware contract expects the host to pin the catalog via
`a2ui.defaultCatalogId`; none of the showcase routes did. The pinned
`@ag-ui/a2ui-middleware@0.0.6` (resolved via
`@copilotkit/runtime@1.59.4` in the integration lockfiles) already
prefers the configured value over streamed args, so this is config-only.

## Fix

Add `defaultCatalogId` matching the catalog each page registers:

- 17 × `copilotkit-beautiful-chat` routes →
`copilotkit://app-dashboard-catalog` (every beautiful-chat page
registers this id)
- 14 × `copilotkit-declarative-gen-ui` routes →
`declarative-gen-ui-catalog` (all declarative catalogs use this id)

Left untouched: the 3 declarative routes with no `a2ui` block (ag2,
claude-sdk-typescript, strands) — `isA2UIEnabled` is false there, the
middleware never attaches, so the fallback path can't fire.
`copilotkit-a2ui-fixed-schema` routes are also untouched (direct tools
carry their catalog in the result envelope).

## Verification

- RUNBOOK-canonical D6 isolate run (`bin/showcase test langgraph-python
--d6 --isolate ...`) on this branch: **all A2UI pills green**
(`gen-ui-declarative`, `gen-ui-a2ui-fixed`, all five beautiful-chat
pills) — these stream through the middleware with the new
`defaultCatalogId` active (config preference). Aggregate green; the only
non-green features are pre-existing and unrelated (2×
`crypto.randomUUID` insecure-context in headless demos, 1× agent-config
fixture-length assertion).
- All 31 patched files parse-checked clean; full `tsc --noEmit` on
langgraph-python shows zero errors in the patched routes.
- Confirmed published middleware 0.0.6 (what the integration lockfiles
resolve) contains the host-preference logic for `defaultCatalogId`.
- Caveat: the Sales Dashboard pill itself could not be manually verified
end-to-end — its aimock fixture chain is broken by a pre-existing
fixture-shadowing collision from the `1e66a5f8d` fixture reorg (a
`userMessage: "First"` substring catch-all shadows the pill prompt;
three overlapping fixture chains mismatch on `toolCallId`
mid-conversation → `404 no_fixture_match` → `RUN_ERROR`). Broken
identically on `main`; tracked as a follow-up issue.

## Follow-ups (not in this PR)

- The canonical `examples/integrations/langgraph-python` route has the
same gap (`a2ui: { injectA2UITool: false }`, no `defaultCatalogId`,
pages register `copilotkit://app-dashboard-catalog`) — needs the same
fix through the parity sync flow.
- Test gap that let this ship: the D5 declarative fixture is a text-only
stub and beautiful-chat's D5 mapping reuses the agentic-chat
conversation, so no fixture exercises a `generate_a2ui` call that omits
`catalogId` the way real models do.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-12 13:58:09 -07:00
Austin Merrick 018b957305 docs(shell-docs): add @copilotkit/react-native reference documentation (#5397)
Adds a **React Native** SDK to the reference docs at
`/reference/react-native`, covering the full `@copilotkit/react-native`
public API. Modeled on the existing React/Core/Bots reference sections.

**Nav:** register `react-native` in `reference-items.ts`, add the SDK
selector label + an overview card.

**Content (22 pages, written from package source):** index, 8
components, 13 hooks. `CopilotChat` and `CopilotModal` exist in both a
headless (root) and prebuilt-UI (`/components`) form; each page
documents both, split by import path.

**Verified:** `next build` passes, all pages render, `oxlint` + `tsc`
clean, and content appears in `llms.txt` / `llms-full.txt`.

Out of scope per the issue: guide content and new demos.


---

## Preview

**Overview + SDK nav** — `/reference/react-native` (left sidebar shows
the new “React Native” SDK selector and all 8 components + 13 hooks)

![React Native reference
overview](https://raw.githubusercontent.com/CopilotKit/CopilotKit/0ce40a7546eeb5556580882a0b6ecf8923284490/pr-screenshots/rn-01-overview.png)

**Component page — `CopilotChat`** —
`/reference/react-native/components/CopilotChat` (headless + prebuilt-UI
split by import path)

![CopilotChat reference
page](https://raw.githubusercontent.com/CopilotKit/CopilotKit/0ce40a7546eeb5556580882a0b6ecf8923284490/pr-screenshots/rn-02-component-copilotchat.png)

**Hook page — `useAgent`** — `/reference/react-native/hooks/useAgent`
(re-export callout, react-native code examples)

![useAgent reference
page](https://raw.githubusercontent.com/CopilotKit/CopilotKit/0ce40a7546eeb5556580882a0b6ecf8923284490/pr-screenshots/rn-03-hook-useagent.png)
2026-06-12 13:20:35 -07:00
github-actions[bot] 43fed818f1 style: auto-fix formatting 2026-06-12 19:23:14 +00:00
Jordan Ritter 0ddf1c029b docs(showcase/built-in-agent): PARITY_NOTES known-issue for headless-complete server-tool reprompt loop 2026-06-12 12:22:13 -07:00
Jordan Ritter 07ce13a83c fix(showcase/aimock): BIA aimock fixtures for tool-rendering + tool-rendering-reasoning-chain + shadow-ceiling 128→134 2026-06-12 12:22:09 -07:00
Jordan Ritter 81e64bba3a fix(showcase/built-in-agent): align headless-complete bubbles with D6 conversation-runner cascade (data-message-role + get_weather wiring) 2026-06-12 12:13:12 -07:00
Jordan Ritter 0e3f7e3fa6 feat(showcase/built-in-agent): port headless-complete stock-card + chart-card + get_revenue_chart server tool + LGP-aligned suggestions 2026-06-12 12:13:07 -07:00
Jordan Ritter 9f4fd4c189 fix(showcase/built-in-agent): rename roll_dice → roll_d20 to match LGP canonical naming 2026-06-12 12:12:57 -07:00
Jordan Ritter 0009aff9cd feat(showcase/built-in-agent): port 5 LGP tool-rendering companion components (weather, flight, stock, d20, custom-catchall) + tool-renderers wiring 2026-06-12 12:12:11 -07:00
Mark Fogle 53801f8e04 test(showcase): make sales-dashboard e2e reproduce real-model catalogId omission
The injected/streamed a2ui fixtures all included catalogId, so aimock
replay never exercised the basic-catalog fallback that broke production
(real models omit catalogId per the tool-usage guide). Strip catalogId
from the langgraph-python sales-dashboard secondary-call fixtures and
hard-assert "Catalog not found" is absent outside the charts-rendered
soft branch, so the spec fails without a route defaultCatalogId.

Also repoint the on-demand e2e workflow at the d4/d5-recorded/d6/shared
fixture dirs — it still referenced feature-parity.json, deleted in the
1e66a5f8d fixture reorg, so every /test-aimock run died at aimock start.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:47:16 +00:00
Austin Merrick cf5126a04e docs(shell-docs): add @copilotkit/react-native reference documentation
Adds a "React Native" SDK to the reference section, documenting the full
public surface of @copilotkit/react-native at /reference/react-native.

Navigation wiring:
- Register `react-native` in REFERENCE_VERSIONS / VERSION_SUBDIRS
- Add the "React Native" label to the SDK version selector
- Add a React Native card to the reference overview page

Content (22 pages, sourced from package source for accuracy):
- index: install, polyfills, provider setup, and the headless vs prebuilt
  two-tier model
- components: CopilotKitProvider, CopilotChat, CopilotModal, CopilotSidebar,
  CopilotPopup, CopilotMarkdown, AssistantMessage, UserMessage — disambiguating
  the headless (root) and prebuilt-UI (/components) variants of CopilotChat and
  CopilotModal by import path
- hooks: RN-specific useAttachments and useRenderTool, plus the platform-
  agnostic hooks re-exported from react-core/v2 adapted to RN imports and
  primitives (useAgent, useCopilotKit, useFrontendTool, useAgentContext,
  useThreads, useCapabilities, useComponent, useHumanInTheLoop, useInterrupt,
  useSuggestions, useConfigureSuggestions)

Content is picked up automatically by llms.txt / llms-full.txt via the
reference content walker.

OSS-250
2026-06-12 11:37:55 -07:00
Mark Fogle fb3d64ef83 fix(showcase): pin page-registered A2UI catalog as defaultCatalogId fleet-wide
The injected render_a2ui tool guide instructs models to omit catalogId
("the catalog id is set by the host"), and backend-owned generate_a2ui
tools see real models omit or late-stream it. Without defaultCatalogId
the a2ui middleware falls back to the spec basic catalog, which no
showcase page registers — surfaces fail with "Catalog not found:
https://a2ui.org/specification/v0_9/basic_catalog.json" (reported on
beautiful-chat / langgraph-python).

Pin each route to the catalog its page registers: beautiful-chat ->
copilotkit://app-dashboard-catalog, declarative-gen-ui ->
declarative-gen-ui-catalog. Routes with no a2ui block never attach the
middleware and are left untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:32:14 +00:00
Jordan Ritter 4e4180bf88 fix(showcase/harness): redefine family lastSuccessAt — terminal-completion, not all-green (#5422)
## Symptom

Dashboard banner false alarm: *"Worker family E2E demos has not
completed successfully since 2h 40m ago"* (and the same on D5/D6) firing
while workers were healthy and emitting results every cycle.

## Triage (already done)

The D5/D6 family-silence banner fires because:

- `lastSuccessAt` is computed via `maxFinishedAtIso(completed)` where
`completed` requires the §5.2.1 `deriveOutcome` to return `"completed"`
(all jobs `done`, zero cell failures) — see
`showcase/harness/src/fleet/control-plane/run-view.ts` (pre-fix
`findCompletedBatch` + the `lastSuccessAt` line in `projectFamily`).
- With chronic content-reds present, every batch lands with
`jobs.done=1, jobs.failed=17` (cells failing inside the probes). The
outcome derives `"failed"`, no batch satisfies `outcome ===
"completed"`, and `findCompletedBatch` returns null.
- The family-silence monitor falls back to oldest-batch-`enqueuedAt` and
fires after `now − oldest > 3 × period` (see
`family-silence-monitor.ts`).
- The worker is fine: per-job `commError: null`, jobs completing with
real cell results, just `<100%` pass-rate.

This is a DEFINITIONAL bug. The worker is healthy; the definition of
"success" was conflating worker-completion with cells-all-green.

## The fix

Redefine "success" as **terminal-state accounting**, not pass-rate.

A batch counts as a terminal completion when:
1. Every job is in a terminal status (`done` or `failed`), AND
2. No job carries a `result.commError` (i.e. no worker-crashed-mid-job,
lease-expired, or other comm-level outage signal).

Cells red without a `commError` IS a terminal completion — the worker
reached the pool, ran the probe, and returned a result. Chronic content
reds become "known bad" instead of "stalled."

The strict §5.2.1 `outcome=="completed"` all-green semantic is unchanged
— it still drives `lastRun.outcome` and §6.2 dashboard rendering. No
external caller of run-view consumed the old strict `lastSuccessAt` for
logic beyond the banner and monitor (grep verified — every reference
outside this file is either a test fixture or the silence-banner display
surface), so renaming was unnecessary; only the definition was
redirected.

The fallback path in `family-silence-monitor.ts`
(oldest-batch-enqueuedAt when `lastSuccessAt` is null) is intentionally
**untouched** — with the new semantics, `lastSuccessAt` advances every
sweep on a healthy family, so the fallback only fires on true
never-completed envs (the rule it was designed for).

## Affected files

- `showcase/harness/src/fleet/control-plane/run-view.ts` — new
`isTerminalCompletionBatch` + `findTerminalCompletionBatch` predicates;
`projectFamily` now sources `lastSuccessAt` from terminal completion;
doc comment on the type updated.
- `showcase/harness/src/fleet/control-plane/run-view.test.ts` — 3 new
tests; 1 existing walk-back fixture updated to add a `commError` so its
original intent (skip non-completion batches) survives the new
predicate.
-
`showcase/harness/src/fleet/control-plane/family-silence-monitor.test.ts`
— 2 new tests: chronic-reds stays silent; real outage still fires.
- `showcase/harness/src/http/fleet-runs.test.ts` — T5 multi-page
walk-back fixture updated to flag its 20 "outage" batches with a
`commError` (so the walk-back still has to extend to page 2);
`batchFixture` gained an optional `resultFor` parameter.

## Tests (RED → GREEN)

Confirmed the 2 net-new predicate tests fail under the old
implementation and pass under the new:

- `lastSuccessAt advances when all jobs reach a terminal state with no
commError, even if cells failed` — old: `null`, new: newest finishedAt
- `lastSuccessAt does NOT count a batch where any job carries a
commError (worker-outage signal)` — old: `null` (walk-back to prior
worked but for the wrong reason — strict all-green semantics), new:
walks back past the comm-erroring batch to the terminal-completion batch

Negative cases preserved:
- `lastSuccessAt is null when every batch in the capped window has a
commError` — real outage stays loud
- `lastSuccessAt does NOT count a batch with non-terminal jobs` —
stall/abandon still excluded
- Family-silence monitor still alerts on real outages

Final test counts: harness `2700/2700` green, fleet/control-plane +
fleet-runs slice `355/355` green; format / lint / typecheck / build all
clean.

## Follow-up

Per the minimize-PRs directive, the D5+D6 banner remediation and
`redsCleared` semantic refresh are tracked separately in the coordinate
channel handoff — this PR is scoped to the `lastSuccessAt` definitional
fix.
2026-06-12 10:40:29 -07:00
Jordan Ritter 34ca7f1292 fix(showcase/harness): redefine family lastSuccessAt as terminal-completion, not all-green
Chronic content-reds in the D5/D6 worker families left `lastSuccessAt`
pinned to null on /api/runs, which tripped the dashboard "worker family X
has not completed successfully since Yh ago" silence banner even though
the workers were healthy. Each batch landed with jobs.done=1,
jobs.failed=17 (cells failing inside the probes), the §5.2.1 outcome
precedence derived "failed", findCompletedBatch returned null, and the
§9 family-silence monitor fell back to oldest-batch-enqueuedAt and fired
after 3 x period.

The fix is definitional: a batch counts as a "terminal completion" for
lastSuccessAt purposes when every job reaches a terminal state (done |
failed) with no `result.commError` on any row. Cell-level reds (rollup
counts) no longer block the timestamp; only worker-level outages
(crashed / reclaimed / lease-expired, surfaced via commError) do.

The strict §5.2.1 outcome=="completed" all-green semantic is unchanged
(it still drives lastRun.outcome and §6.2 dashboard rendering). No
caller of run-view consumed the old strict lastSuccessAt for logic
beyond the banner and monitor (grep verified — every external reference
is either a test fixture or the silence-banner display surface).

Tests added (RED -> GREEN):
- run-view.test.ts: lastSuccessAt advances when all jobs reach a terminal
  state with no commError, even if cells failed (the regression case)
- run-view.test.ts: lastSuccessAt does NOT count a batch where any job
  carries a commError (worker-outage signal stays loud)
- run-view.test.ts: lastSuccessAt does NOT count a batch with non-terminal
  jobs (stalled / abandoned still excluded)
- family-silence-monitor.test.ts: does not alert when the family runs every
  cycle with cell-level reds but no commError
- family-silence-monitor.test.ts: still alerts when the family stops
  emitting results entirely (real outage)

Two existing tests updated to add commError to their "no completion"
fixtures so their original intent (walk-back across non-completion
batches) survives the new predicate:
- run-view.test.ts: lastSuccessAt walk-back through a commError batch
- fleet-runs.test.ts: T5 multi-page walk-back coverage
2026-06-12 10:31:17 -07:00
Jordan Ritter bf37f3808d fix(showcase/built-in-agent): emit STATE_DELTA with op:add (not replace) so first /steps patch creates the path 2026-06-12 10:24:54 -07:00
Jordan Ritter c963268198 docs(showcase/built-in-agent): remove sub-agents TODO — diagnose confirms code correct, prior staging RED was image cache 2026-06-12 10:24:29 -07:00
Jordan Ritter 5b0908ab76 docs(showcase/built-in-agent): fix PARITY_NOTES NSF terminology + add sub-agents TODO 2026-06-12 10:24:16 -07:00
Jordan Ritter 29bd450534 chore(showcase/aimock): bump KNOWN_SHADOW_CEILING 123→128 for tracked runtime-disambiguated overlaps (PR #5412)
The 5 new substring shadows are in d6 fixtures landed by this PR:
- d6/ag2/gen-ui-declarative.json: 'Show me a quick KPI dashboard' inner-call mirror overlaps with pre-existing 'KPI dashboard' entry in render-a2ui.json (same toolName=render_a2ui, context=ag2). Runtime-disambiguated by load order (inner-call mirrors ordered BEFORE outer generate_a2ui fixtures per the _meta._note in that file).
- d6/claude-sdk-typescript/gen-ui-declarative.json: same pattern as ag2.
- d6/claude-sdk-typescript/tool-rendering.json: dropped userMessage/turnIndex gates on toolCallId-keyed follow-up fixtures (per _shape_note in that file — Anthropic /v1/messages shape needs toolCallId-only gating for multi-pill loop safety). The remaining ungated userMessage fixtures ('weather in Tokyo', 'AAPL') now substring-overlap with gen-ui-headless-complete and tool-rendering-reasoning-chain prompts in the same context. Runtime-disambiguated by toolCallId chains and first-match-wins ordering.

These overlaps are exactly the runtime-disambiguated pattern the test comment endorses for ceiling bumps.
2026-06-12 08:00:05 -07:00
Jordan Ritter 95f726a408 fix(showcase/aimock): consolidate content-red fixture fixes — d4 broad-matcher narrowing, d6 per-family content-shape alignment, chunkSize emoji guard, threadid context gates 2026-06-12 08:00:05 -07:00
Jordan Ritter dd9270fe60 fix(showcase): per-integration adjacencies — @ts-expect-error swaps + agno comment + built-in-agent headless-simple UUID fallback + error banner across agno/crewai-crews/langroid/mastra/pydantic-ai/strands mcp-apps routes 2026-06-12 08:00:05 -07:00
Jordan Ritter e89abefb0f fix(showcase/llamaindex): consolidate content-red fixes — gen-ui agent + beautiful-chat agent updates, mcp-apps + copilotkit route alias coherence, demo-files assets 2026-06-12 07:59:36 -07:00
Jordan Ritter e306e25e42 fix(showcase/claude-sdk-typescript): consolidate content-red fixes — per-content-block array refactor for text/thinking/tool_use replay order, per-block randomUUID, reasoning route + alias coherence 2026-06-12 07:59:36 -07:00
Jordan Ritter 3f601daaea fix(showcase/ag2): consolidate content-red fixes — manifest NSF reasoning canon, ASGI middleware for per-request user-message ContextVar, async OpenAI client, tool serialization, manifest demos cleanup (R9-A2) 2026-06-12 07:59:36 -07:00
Jordan Ritter df1b2d572d fix(showcase/spring-ai): consolidate content-red fixes — manifest NSF reasoning canon, Jackson @Primary mapper + RunErrorEvent wire-shape, error-banner pattern, Java tool JSON hardening, .ag-ui-sha pin + CI workflow 2026-06-12 07:59:35 -07:00
Jordan Ritter 9984c82c66 fix(showcase): D6 reds remediation on built-in-agent — testid backfill + PARITY_NOTES + aimock fixtures + STATE_DELTA wiring (#5413)
## Scope

Built-in-agent integration D6 readiness pass — companion to PR #5407
(merged) which fixed the claude-sdk-python integration. This PR follows
the same PARITY_NOTES pattern.

### What changed

- **~28 testids backfilled across 13 demos**: declarative-gen-ui
renderers, headless-complete (assistant-bubble, user-bubble,
weather-card, highlight-note, input-bar), headless-simple, gen-ui-agent,
a2ui-fixed-schema (definitions + renderers), auth (new `sign-in-card`
component), chat-slots welcome, gen-ui-interrupt cancel.
- **New components**: shared `not-supported-banner` for NSF demos (hitl,
shared-state-streaming); subagents extraction into LGP-mirror components
(`subagent-activity-card`, `delegation-log`,
`supervisor-activity-banner`).
- **2 aimock fixtures**: `gen-ui-a2ui-fixed.json` (new — routes
`display_flight` pill through the Card mount); `gen-ui-declarative.json`
(reshaped to BIA's two-call sequence + flat catalog shape).
- **1 backend wire-up**: `set_steps` tool registered in `state-tools`
and wired through `tanstack-factory` so `gen-ui-agent` emits
`STATE_DELTA` events on its agent-plan stream.
- **PARITY_NOTES.md**: tracks BIA-vs-LGP feature parity + a Known Issues
section.
- **feature-registry.json**: adds `threadid-frontend-tool-roundtrip`
feature entry.

## D6 verify status

- **3 GREEN**: auth, chat-slots, subagents.
- **1 expected-NSF**: gen-ui-interrupt (cancel testid verified).
- **3 still RED with documented downstream root causes** (all require
fixes in `packages/react-core`, outside this PR's scope — see
`PARITY_NOTES.md` "Known Issues"):
  - a2ui-fixed-schema: renderer host doesn't mount Card.
- gen-ui-agent: STATE_DELTA stream emits, but `useAgent`
state-subscription gap prevents the React side from observing the delta.
  - declarative-gen-ui: same renderer-host class as a2ui-fixed-schema.
- **2 additional reds are pre-existing harness issues NOT introduced
here**: headless-complete aimock fixture, headless-simple chip-text
drift.

Verify reports: `/tmp/cr/verify-5425/d6-direct-v2-REPORT.md`.

## Builds on

PR #5407's PARITY_NOTES pattern for documenting integration-vs-LGP gaps
with downstream-tracked known issues.
2026-06-12 07:57:13 -07:00
Ran Shemtov 246b907ed8 Merge branch 'main' into claude/stupefied-fermi-0c3310 2026-06-12 14:23:17 +02:00
Jordan Ritter 1427475a7e fix(showcase): bump generate-catalog test counts for threadid-frontend-tool-roundtrip feature add 2026-06-12 05:12:24 -07:00
Ran Shem Tov 10a4c38b46 fix(showcase-tests): skip generator in integration-smoke-registry when registry.json exists
Prevents a file-parallelism race where this suite's beforeAll generator
call atomically renamed catalog.json while generate-registry.test.ts was
mid-sentinel-test, clobbering the appended sentinel.
2026-06-12 14:06:53 +02:00
Jordan Ritter 02fcf43d6d docs(showcase): built-in-agent PARITY_NOTES + feature-registry threadid-frontend-tool-roundtrip + known issues
Documentation companion to the BIA D6 readiness work:

- PARITY_NOTES.md: tracks built-in-agent feature parity vs LGP +
  a 'Known Issues' section documenting 3 D6 demos that remain red
  due to downstream renderer/state gaps in @copilotkit/react-core
  (a2ui renderer host doesn't mount Card; STATE_DELTA → useAgent
  state-subscription gap; declarative-gen-ui renderer host shares
  the same class). All three require fixes outside this PR's scope.
- feature-registry.json: adds threadid-frontend-tool-roundtrip
  feature entry covering the new gen-ui-agent STATE_DELTA wiring.
2026-06-12 05:02:39 -07:00
Jordan Ritter 9abe8a183f fix(showcase/built-in-agent): wire set_steps tool for gen-ui-agent STATE_DELTA stream
Adds the set_steps tool definition to state-tools and wires it through
the tanstack factory so the gen-ui-agent demo emits STATE_DELTA events
on its agent-plan stream the same way the LGP integration does.
2026-06-12 05:02:32 -07:00
Jordan Ritter c49da076dd fix(showcase/aimock): add gen-ui-a2ui-fixed + reshape gen-ui-declarative fixtures for built-in-agent D6
Two aimock fixture updates to unblock built-in-agent D6 verification:

- gen-ui-a2ui-fixed.json: new fixture so display_flight pill routes
  the Card mount through the a2ui-fixed-schema renderer host
- gen-ui-declarative.json: reshaped to the built-in-agent two-call
  sequence with the flat catalog shape the BIA route emits
2026-06-12 05:02:26 -07:00
Jordan Ritter 99aafd0283 feat(showcase/built-in-agent): extract subagents DelegationCard into LGP-mirror components
Extracts the inline subagents page DelegationCard into three reusable
components that mirror the LGP integration layout, enabling D6 testid
coverage:

- subagent-activity-card.tsx: per-subagent activity panel
- delegation-log.tsx: cumulative delegation event log
- supervisor-activity-banner.tsx: supervisor-level status banner

The subagents page now composes these components instead of inlining
the markup, with data-testid hooks for D6 selectors.
2026-06-12 05:02:20 -07:00
Jordan Ritter b6750b7423 fix(showcase/built-in-agent): D6 testid backfill across 13 demos
Backfills data-testid attributes to enable D6 cross-integration test
coverage for the built-in-agent integration. Covers:

- declarative-gen-ui renderers (5 testids)
- headless-complete demo components (6 testids: assistant-bubble,
  user-bubble, weather-card, highlight-note, input-bar)
- headless-simple page (3 testids)
- gen-ui-agent page (3 testids including agent-step)
- a2ui-fixed-schema definitions + renderers (chat-slots, auth flow)
- new sign-in-card component for auth demo
- gen-ui-interrupt cancel testid on time-picker-card
- shared not-supported-banner component for hitl +
  shared-state-streaming NSF demos
2026-06-12 05:02:13 -07:00
Jordan Ritter dad8ff0a71 chore(showcase/claude-sdk-python): document LGP parity for headless-message testids
Adds inline comments next to the data-testid="headless-message-{user,assistant}"
markers in assistant-bubble.tsx, user-bubble.tsx, and headless-simple/page.tsx
explaining that the testids intentionally repeat once per message — mirroring
the canonical LGP implementation — and that role discrimination for the D6
conversation-runner is via data-message-role, not unique testids.
2026-06-12 03:25:32 -07:00
Jordan Ritter f9bb881555 fix(showcase/claude-sdk-python): D6 probe alignment — testid backfill + demo bugfixes + V2 import for gen-ui-interrupt
Backfills the data-testid markers the D6 probes assert against across the
auth, headless-simple, headless-complete, a2ui-fixed-schema,
declarative-gen-ui, and gen-ui-interrupt demos; aligns the python
a2ui_fixed agent + a2ui definitions/renderers with the canonical LGP
shapes; and switches the gen-ui-interrupt CopilotKit provider import to
@copilotkit/react-core/v2 so the demo mounts under the V2 runtime that
the D6 probe drives.
2026-06-12 03:25:18 -07:00