Commit Graph

10887 Commits

Author SHA1 Message Date
Jordan Ritter b284d89615 fix(built-in-agent): pin @copilotkit/runtime 1.59.4 + tanstack; remove obsolete SSOT override 2026-06-07 22:19:51 -07:00
Jordan Ritter fe3af73086 fix(mastra): gen-a2ui throw + role normalizer + cmdk bump; probe-YAML comment fixes; dashboard validateCell tag enforcement 2026-06-07 22:19:47 -07:00
Jordan Ritter 54e426c2dd fix(spring-ai): controller error-path lifecycle (RUN_STARTED ordering, finalize) 2026-06-07 22:19:41 -07:00
Jordan Ritter e89581d12c fix(ms-agent-dotnet): A2uiSecondaryToolCaller fail-loud + error mapping + guards 2026-06-07 22:19:30 -07:00
Jordan Ritter 154c1cfab1 fix(showcase): harden header-forwarding shims (fail-loud, async-detect) across python integrations 2026-06-07 22:19:26 -07:00
Jordan Ritter f0fe456a43 fix(agno): HITL tool-pairing, reasoning RUN_ERROR/TOOL_CALL_RESULT, reasoning route wiring, uvloop loop-pin for header forwarding 2026-06-07 22:19:19 -07:00
Jordan Ritter ebe80e257e fix(showcase): dashboard-green follow-ups (byoc race, D4 probe, declarative, beautiful-chart) (#5310)
## Summary
Follow-ups to #5309 that further lower the d5/d6 dashboard red floor:
- **byoc browser-pool race:** guard `newContext()` against a
disconnected shared browser (the d5 contention source).
- **D4 probe:** `networkidle`→`load` — networkidle never settles on
CopilotKit's persistent-SSE demo pages, so D4 timed out locally and
gated every cell red on the local rig; staging unaffected but the fix is
correct and unblocks local==staging visual testing.
- **strands + spring-ai declarative-hashbrown/json-render:** dedicated
backend agents/controllers + tuned prompts + regenerated d6 fixtures +
manifest coherence (json-render is a real byoc-feature-type cell, at
parity with strands).
- **beautiful-chart:** port the pie/bar/scheduler generative-UI
renderers to built-in-agent + claude-sdk-python (backends already emit
the tool-calls).
- **cleanup:** remove the temporary x-diag-probe instrumentation (keeps
the permanent CVDIAG + the #5309 forwarding fixes).

Showcase-only; no package releases.

## Test plan
- [ ] CI rebuilds :latest; redeploy
- [ ] PB re-pivot:
byoc/declarative-hashbrown/json-render/beautiful-chart-chart cells green
on the fixed backends
- [ ] d5 contention sawtooth reduced (byoc guard)

## Deferred (separate follow-ups)
- Flap-band: decouple PB sampling from live run / detector cold-start
retry / warm+pool (the ±70 churn band)
- #67 backlog: harness accounting (d6 hung-teardown, d4 body-fallback
false-green), forwarding-shim hardening, spring-ai controller error-path
lifecycle (class-wide), built-in-agent @copilotkit/runtime pin
2026-06-07 14:13:01 -07:00
Jordan Ritter 29fc959052 chore(showcase): ratchet pin-drift baseline for mastra ai v5 bump 2026-06-07 14:07:06 -07:00
Jordan Ritter ca2bc2c152 fix(showcase): specialize strands + spring-ai declarative-hashbrown/json-render backends (+ fixtures, manifests, controller guards) 2026-06-07 13:53:28 -07:00
Jordan Ritter 8d9dc82606 fix(showcase): render beautiful-chat chart/scheduler generative-UI on built-in-agent and claude-sdk-python 2026-06-07 13:53:19 -07:00
Jordan Ritter ffa51c7ee8 chore(showcase): remove the temporary x-diag-probe instrumentation 2026-06-07 13:53:07 -07:00
Jordan Ritter 6b924a7a44 fix(showcase): use waitUntil:load for the D4 chat-roundtrip probe (networkidle never settles on persistent-SSE pages) 2026-06-07 13:53:07 -07:00
Jordan Ritter ebd5f53549 fix(showcase): guard browser-pool context acquisition against a disconnected shared browser (byoc) 2026-06-07 13:52:57 -07:00
Jordan Ritter 362b8c5793 fix(showcase): green the d5/d6 dashboard — forwarding, routes, LFS, harness (#5309)
## Summary
Greens the staging d5/d6 showcase dashboard, which was red across ~450
cells. Root causes were a small set of genuine code/CI bugs (not a
single regression — the 06-01/06-06 flap edges were a harness
error-banner detector turning on + D5 starting to run the already-broken
D6 pill set):

- **ASSET-404 (multimodal):** CI checked out Git LFS files as pointer
stubs (`lfs:false` + no `git lfs pull`), so images served 130-byte
pointers instead of real assets. Now pulls LFS during build.
- **ROUTE-404 (beautiful-chat / declarative-hashbrown /
declarative-json-render):** 5 backends shipped the demo pages but no
per-pill API route → 404. Routes added (mirrored from same-language
siblings; injectA2UITool set per whether the backend already owns the
tool).
- **Gen-UI header forwarding:** the secondary `generate_a2ui` LLM call
dropped `x-aimock-context` — in Python because it runs in a thread-pool
executor that doesn't propagate the ContextVar (ported ag2's
`install_executor_contextvar_propagation` to
agno/ms-agent-python/pydantic-ai/strands), and in .NET because the AG-UI
SSE pump runs on a non-inheriting ExecutionContext (moved AsyncLocal →
HttpContext.Items, removed a racing finally-wipe). pydantic-ai
additionally sent a system-only prompt (StateDeps.copilotkit was always
None → now reads the real conversation). mastra's gen-a2ui threw
AI_UnsupportedModelVersionError (ai v4 vs @ai-sdk/openai v2 → bumped ai
to v5).
- **Harness measurement:** the fleet worker ignored the YAML
`timeout_ms` (used a hardcoded 10-min default → slow backends
false-aborted); now conveyed. Stopped rendering
`ms-agent-harness-dotnet`, which was flipped deployed:true but excluded
from all probes → perpetual stale red.

Showcase-only; no package releases.

## Test plan
- [ ] CI rebuilds `:latest` images with LFS assets; staging redeploys
- [ ] PB re-pivot: multimodal / beautiful-chat / declarative-* / gen-ui
cells green across backends
- [ ] aimock journal: secondary gen-ui calls carry `x-aimock-context`
(no ctx-absent 503s on real-pill traffic)
- [ ] ms-agent-dotnet d5 no longer abort-cascades

## Deferred to follow-ups (out of this PR's subject)
- strands + spring-ai declarative-hashbrown/json-render need backend
prompt specialization (separate PR)
- pre-existing bucket-(c)/(d): diag-hop labeling (reverts with the
temporary x-diag-probe), harness deploy-churn/total-invariant
accounting, .NET secondary-caller error-mapping, forwarding-shim
hardening, baseline-only stale-render partners
2026-06-07 10:33:09 -07:00
github-actions[bot] b4b5f10d55 style: auto-fix formatting 2026-06-07 17:04:33 +00:00
Jordan Ritter f0edcd5d94 fix(showcase): convey timeout_ms to fleet worker and stop rendering unprobed ms-agent-harness-dotnet 2026-06-07 10:00:47 -07:00
Jordan Ritter 94f564a0f8 fix(showcase): align mastra to ai SDK v5 for the gen-a2ui secondary call 2026-06-07 10:00:40 -07:00
Jordan Ritter 6e34ea836e fix(showcase): pydantic-ai gen-ui forwards the real conversation to its secondary call 2026-06-07 10:00:40 -07:00
Jordan Ritter 4920128332 fix(showcase): forward x-aimock-context across the AG-UI SSE-pump boundary in ms-agent-dotnet 2026-06-07 10:00:35 -07:00
Jordan Ritter e1cf704e13 fix(showcase): propagate x-aimock-context to off-thread gen-ui secondary call across Python backends 2026-06-07 10:00:29 -07:00
Jordan Ritter 46e66d8d4b fix(showcase): add missing per-pill copilotkit routes for agno/langroid/llamaindex/spring-ai/strands 2026-06-07 10:00:24 -07:00
Jordan Ritter 7bde1eef3a ci(showcase): pull Git LFS assets during build so demo images ship real binaries 2026-06-07 10:00:16 -07:00
Jordan Ritter 79d61b68ee docs(shell-docs): add shared-state/prebuilt guides, sidebar wiring, css, model-selection, whats-new 2026-06-06 16:10:13 -07:00
Jordan Ritter aade9d0e86 docs(shell-docs): add troubleshooting, migration, and concepts guides 2026-06-06 16:10:09 -07:00
Jordan Ritter 1c33e99f49 docs(shell-docs): add reference hook pages and retire orphaned v2 useAgent 2026-06-06 16:10:04 -07:00
Jordan Ritter e529593650 docs(shell-docs): add MS Agent Framework + Mastra integration samples 2026-06-06 16:10:00 -07:00
Jordan Ritter 58887baeda docs(shell-docs): add backend runtime/runner/self-managed docs 2026-06-06 16:09:56 -07:00
Jordan Ritter 19f8ef89c8 fix(react-core): correct useCoAgent JSDoc link and stale run description 2026-06-06 16:09:52 -07:00
Jordan Ritter 6f360b9f66 diag(showcase): ungated x-diag-probe (thread+ctx) to localize native-tool context loss (#5305)
TEMPORARY DIAGNOSTIC (to be reverted after reading). Adds one ungated
header `x-diag-probe: thread=<name>;ctx=<present|EMPTY>;keys=<n>` on
every outbound LLM call (before the context gate) across the 7 backends
whose native tool calls drop x-aimock-context. The aimock journal
(HTTP-readable) will then show, per dropping call, which thread it ran
on and whether the forwarded-headers contextvar was empty — pinning the
context-losing run-path. Additive, try/except-wrapped (never throws), no
change to existing forwarding/injection/gating. py_compile clean.
2026-06-06 12:35:58 -07:00
github-actions[bot] c73afd1e3d style: auto-fix formatting 2026-06-06 19:26:25 +00:00
Jordan Ritter 469d79b029 diag(showcase): ungated x-diag-probe (thread+ctx) on outbound LLM calls to localize native-tool context loss 2026-06-06 12:24:44 -07:00
Jordan Ritter ffb8af32b0 fix(showcase): restore sandboxed-UI jsFunctions in D6 gen-ui-open-advanced fixtures (#5294)
## Summary

The `generateSandboxedUi` calculator (and the ping-host /
inline-evaluator pills) rendered static HTML with no interactivity — the
`=` and keypad buttons were no-ops — because the affected
per-integration fixtures omitted the `jsFunctions` key that the
`OpenGenerativeUIRenderer` injects into the iframe to wire click
handlers to the host bridge
(`Websandbox.connection.remote.evaluateExpression` / `notifyHost`).

This copies the `jsFunctions` VERBATIM from the canonical
langgraph-typescript fixture (apples-to-apples) into agno, crewai-crews,
langgraph-fastapi, and mastra, and creates the missing langgraph-python
advanced fixture (Calculator + Ping pills; the inline evaluator already
lives in `gen-ui-open.json`). Fixture-only change; the renderer is
correct.

## Verification

Proven in a prior session against the D6 path.
2026-06-06 12:09:42 -07:00
Jordan Ritter 23b6fef129 fix(showcase): gate LGP AAPL tool-rendering fixture on toolName not hasToolResult (#5292)
## Summary

The D6 cell `tool-rendering-custom-catchall` for langgraph-python
deterministically timed out (30s no-response). The probe sends two turns
in one thread: turn 1 "weather in Tokyo" -> `get_weather`, turn 2
"What's the price of AAPL?" -> `get_stock_price`. The AAPL first-leg
fixture was gated on `hasToolResult:false`, but aimock implements that
gate as `messages.some(m => m.role === "tool")` — i.e. ANY tool message
anywhere in the thread. Turn 1's `get_weather` leaves a tool result, so
on turn 2 `hasToolResult` is permanently true and the false gate can
never match -> `no_fixture_match` -> 503 -> 30s timeout.

This replaces the broken `hasToolResult:false` gate with
`toolName:"get_stock_price"` (the same pattern the sibling weather/chain
first-leg fixtures already use). A `toolName` gate fires whenever the
tool is registered, regardless of prior tool results; the `toolCallId`
follow-up fixture still wins on iteration 2.

Fixture-only change.

## Verification

Proven in a prior session via the D6 Docker path:
`tool-rendering-custom-catchall` now green (turn 1 `get_weather` + turn
2 `get_stock_price` both render, no 503/timeout);
`tool-rendering-default-catchall` still green (no regression).
2026-06-06 12:09:38 -07:00
Jordan Ritter 1b50eacc98 feat(showcase): CVDIAG diagnostic instrumentation for x-aimock-context / CV-rung propagation (#5304)
## Summary
Diagnostic instrumentation to localize **where `x-aimock-context` is
dropped on the CV/D5 rung** (sustained fleet-wide aimock 503
`no_fixture_match`). Adds a uniform, durable, HTTP-readable per-hop
trace. **Instrumentation-only** — on non-diagnostic traffic every
forwarder is byte-identical to before (verified across all 22 breadcrumb
sites).

- **Shared contract + sink:** single-line `CVDIAG` log format (12-char
redacted header prefix), `x-diag-run-id`/`x-diag-hops` correlation +
breadcrumb headers, and a best-effort PocketBase `diag_events`
collection (anonymously HTTP-readable, so it's queryable mid-incident
without Railway logs).
- **Harness:** mint a run_id per D5/D6 run, inject the correlation
headers alongside `x-aimock-context`, and a timeout-bounded post-run
aimock-journal join that records a `cv-verdict` row tagged
`harness-d5`/`harness-d6` (localizing whether the header reached
aimock). Plus claim/worker_id/snapshot/pool-condition breadcrumbs and
surfaced previously-swallowed catches.
- **Per-framework forwarders** (LangGraph py/ts/fastapi, google-adk,
self-contained Node + 9 Python shims, spring-ai Java, ms-agent .NET ×2):
CVDIAG at each hop + a `route-<fw>`/`backend-<fw>` `x-diag-hops`
breadcrumb, gated on diagnostic-header presence. Surfaces
previously-silent forwarding misses (empty LangGraph `configurable`,
missing httpx event-hooks target, swallowed hook-install errors).

## Why
CV/D5 has been red ~42h fleet-wide; the aimock journal shows ~95% of
503s arrive with **no** `x-aimock-context`. Forwarding is divergent per
framework (LangGraph `configurable` SPOF; `claude-sdk-python` middleware
not wired; google-adk async path uses aiohttp, bypassing the httpx
hook). This makes the drop point visible per hop and durable, so the fix
can be made once — and it preserves apples-to-apples by adding a
*uniform* trace layer rather than more bespoke per-framework code.

## Test plan
- [x] Harness typecheck green; 2105/2105 harness tests pass
- [x] 7-agent CR converged (2 fix rounds); instrumentation-only
invariant verified across every outbound forwarder
- [ ] CI green (integration builds incl. Java/.NET)
- [ ] Post-deploy: read `/__aimock/journal` + PB `diag_events` to
localize the drop hop per framework and settle the open D5-vs-D6
question with data

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-06 10:58:04 -07:00
github-actions[bot] 1e5a9b77cd style: auto-fix formatting 2026-06-06 17:44:07 +00:00
Jordan Ritter bd77954ab5 feat(showcase): instrument per-framework x-aimock-context forwarding with gated CVDIAG breadcrumb
Add CVDIAG logging + x-diag-hops breadcrumb (route-<fw>/backend-<fw>) at each forwarding hop across LangGraph (py/ts/fastapi), google-adk, the self-contained Node + Python shims, spring-ai (Java) and ms-agent (.NET). Breadcrumb append is gated on diagnostic-header presence so non-diagnostic traffic stays byte-identical; surfaces previously-silent forwarding misses (empty configurable, missing httpx event-hooks target, swallowed hook-install errors).
2026-06-06 10:40:25 -07:00
Jordan Ritter 32d0afaba0 feat(showcase-harness): instrument D5/D6 drivers, orchestrator, pool & scheduler with CVDIAG
Mint a run_id per D5/D6 feature run, inject x-diag-run-id + seed x-diag-hops=harness alongside x-aimock-context, and do a post-run aimock-journal join (timeout-bounded) that records a cv-verdict row (tagged harness-d5/harness-d6) localizing whether the context header reached aimock. Add claim/worker_id/snapshot/pool-condition breadcrumbs and surface previously-swallowed catches.
2026-06-06 10:40:25 -07:00
Jordan Ritter acf9f6fe2c feat(showcase-harness): add CVDIAG diagnostic contract + durable diag_events sink
Shared single-line CVDIAG log format (redacted 12-char header prefix), x-diag-run-id/x-diag-hops correlation header constants, and a best-effort PocketBase diag_events sink (anonymously HTTP-readable) so the CV/x-aimock-context propagation chain can be traced mid-incident without Railway log access.
2026-06-06 10:40:24 -07:00
Ben Taylor 0acc358fb6 fix(examples): correct Threads locked-state license command to copilotkit license (#5301)
## Summary

The Threads locked-state card in every integration example tells users
to add a CopilotKit Intelligence license with `copilotkit
add-intelligence`. That's the wrong command:

1. `add-intelligence` is intentionally not wired into the CLI dispatch
yet.
2. Even when implemented, it only drops the Intelligence overlay — it
does not issue a license (licensed behavior is deferred to ENT-725).

The command that actually issues a license key and writes it to `.env`
is **`copilotkit license`**.

## Changes

- `locked-state.tsx` in all 18 examples: `copilotkit add-intelligence` →
`copilotkit license` (oxfmt collapsed the now-shorter `<code>` element
onto one line)
- `threads-drawer.module.css` descriptive comments (11 examples):
"add-intelligence command" → "license command"
- `examples/integrations/_intelligence/` references to `copilotkit
add-intelligence` are untouched — those describe the overlay scaffold
command, not licensing.

## Verification

- `git grep add-intelligence -- 'examples/**'` only matches
`_intelligence/` scaffold docs
- `pnpm parity:check` — no new findings (threads-drawer/** is
allowedDivergence; only pre-existing next-env.d.ts warns)

Closes ENT-804

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-06 12:09:59 -05:00
Benjamin Taylor 3a7f546fbd fix(examples): correct Threads locked-state license command to copilotkit license (ENT-804)
The locked-state card told users to add an Intelligence license with
`copilotkit add-intelligence`, but that command only drops the
Intelligence overlay and does not issue a license (and is not yet wired
into the CLI dispatch). The command that issues a license key is
`copilotkit license`.
2026-06-06 10:29:41 -05:00
Jordan Ritter da03e1626a fix(showcase): reconcile harness-workers SSOT key with the Railway service name
The pool-fleet worker's Railway service is named `harness-workers` (PLURAL),
but the SSOT keyed it `showcase-harness-worker` (singular). The image-ref gate
matches SSOT keys to Railway service names verbatim, so the gate reported
`harness-workers` as an untracked Railway service AND the stale singular key
matched nothing. Rename the SSOT key (and every test/fixture reference) to the
exact Railway name `harness-workers`.

It stays the staging-only, domainless, probe-disabled worker that runs the
shared `showcase-harness` image: serviceId c2aa8a0b-…, staging instance
362c1e37-…, ciBuilt:false, gateIgnore:true, no build slot (so no dispatchName),
single `staging` env with no domain. Add a focused test pinning that shape.
Counts are unchanged (29 services / 26 CI_BUILT) — this is a rename, not an
addition; both harness workers already existed on main.

Verified LOCALLY against Railway: verify-railway-image-refs reports
`54 env-scoped instances verified (2 skipped)` — 0 violations, 0 missing, 0
untracked (harness-workers reconciled, harness-workers + harness-legacy the 2
gateIgnore'd skips). emit --check zero drift, Ruby parity green (borrowed
.up.railway.app host is parity-excluded), full scripts suite + typecheck green.
2026-06-06 07:51:00 -07:00
Jordan Ritter 9b76a2d2a4 refactor(showcase): unify railway-envs SSOT into per-env environments map (Option C)
Replace ServiceEntry's parallel prodInstanceId/stagingInstanceId/domains/probe/
repoNameOverride fields with a single environments: Record<string, {instanceId,
domain?, probe?, repoName?}> map plus a hoisted env-independent probeDriver.
EnvName becomes an open string backed by an ENV_ID_BY_NAME registry so
accessors resolve arbitrary env names; a single-env service (the staging-only
showcase-harness-worker) now simply omits the absent env instead of carrying a
placeholder ID/borrowed host.

Accessors instanceIdFor/domainFor/repoNameFor index environments[env]
(domainFor still throws on missing/scheme); add envsFor(name),
serviceEnvPairs(), and probeEnabled(name, env). Generalize the image-ref gate
(iterate each service's declared environments, resolve env-id via the
registry, sum/iterate missingByEnv over registry env names) and verify-deploy's
host->env reverse-map (envForTarget iterates environments).

Pure TS-internal: emit-railway-envs-json.ts projects the env-map back onto the
FROZEN legacy JSON shape (prodInstanceId/stagingInstanceId/domains/probe/
repoNameOverride) via a documented legacyJsonCompat shim for the two domainless
harness workers, so railway-envs.generated.json stays byte-identical and Ruby
(bin/railway) + workflow jq + the parity test are untouched. Verified: emit
--check zero drift, Ruby test_expected_domains_parity green, golden snapshot
toEqual proves byte-identical resolution for every real (service, env) pair,
full scripts vitest suite green, showcase scripts typecheck clean.
2026-06-06 07:48:14 -07:00
Jordan Ritter a8b5214b5f test(showcase): add railway-envs golden snapshot (behavior-preservation guard)
Serializes the fully-resolved {service -> env -> {instanceId, domain, probe,
driver, repoName}} projection for all 29 services x 2 envs via the public
accessors (instanceIdFor/domainFor/repoNameFor) + per-entry probe config,
frozen as a fixture. This is the behavior-preservation guard for the
forthcoming env-map (Option C) refactor: resolved values must stay
byte-identical before and after.
2026-06-06 07:32:10 -07:00
Jordan Ritter 5387e4de38 fix(showcase): add D6 entry to coverage dashboard legend 2026-06-06 02:30:36 -07:00
Jordan Ritter d408766cce fix(harness): balance fleet claim distribution to reduce settle-timeout contention 2026-06-06 02:30:36 -07:00
Jordan Ritter d6b0e895ae fix(harness): restore resource_snapshots in the fleet worker + per-replica attribution
Wire the resource-snapshot writer back into the fleet worker path with
per-replica attribution, add the worker_id column migration, and stamp
the legacy single-process path's worker_id as "" (empty string) to match
PocketBase storage and the surrounding codebase convention.
2026-06-06 02:30:32 -07:00
Jordan Ritter 5240ba813c fix(showcase): quarantine gen-ui-interrupt/interrupt-headless pills via not_supported_features
Move gen-ui-interrupt + interrupt-headless from features: to
not_supported_features: across affected integration manifests, and align
the generate-registry/generate-catalog scripts tests to the resulting
wired-feature counts (derive expected lengths from the parsed manifest
rather than hardcoding pre-quarantine numbers).
2026-06-06 02:30:26 -07:00
Jordan Ritter 182e3e2fd9 fix(showcase): add follow-up-turn aimock fixtures for multi-pill D6 sessions 2026-06-06 02:30:17 -07:00
Jordan Ritter 0cbc990e42 fix(showcase): forward x-aimock-context on all built-in-agent demo routes 2026-06-06 02:30:17 -07:00
Jordan Ritter 5c72d1addd fix(showcase): propagate x-aimock-context across AG-UI SDK pooled-thread hop in spring-ai 2026-06-06 02:30:13 -07:00