Commit Graph

1305 Commits

Author SHA1 Message Date
Mike Ryan fec70d086f feat(angular): checkpoint 2 - core and package 2026-07-23 07:14:55 -07:00
Benjamin Taylor d5ad1efcd0 fix(examples): adk-angular a11y + keep dev inspector out of the prod bundle
Two issues found after the example merged:

1. The closed chat panel is only translated off-screen, so its inputs/buttons
   stayed in the tab order and the a11y tree. Mark the <aside> `inert` while
   closed (`[attr.inert]`), so focus/AT skip it; removed when open.
2. The dev web inspector (and its @copilotkit/web-inspector dep, ~660 kB) shipped
   in the production initial bundle. Gate it behind `@defer (when isDev)` so it's
   split into a lazy chunk that a prod build (isDev=false) never loads.

Verified: prod `ng build` initial bundle 4.59 MB -> 3.93 MB with web-inspector now
a lazy chunk; dev serve still mounts the inspector; closed-panel focus is blocked
(activeElement falls back to body), open panel unaffected.
2026-07-22 12:01:41 -05:00
Benjamin Taylor 5a27e2ecbb feat(examples): adk-angular chat docks + pushes content when there's room
When the viewport is wide enough (>=1200px) the chat starts expanded and DOCKS:
.layout--pushed adds a right margin equal to the chat width so the proverbs
content reflows beside the chat instead of being covered (mirrors React's
CopilotSidebar margin-inline-end push). Below the breakpoint the chat starts
closed and OVERLAYS on open, so narrow screens aren't smushed.

- DOCK_BREAKPOINT_PX (1200) gates the initial open state; a matching
  @media (min-width:1200px) rule applies the push margin
- --chat-width var keeps the panel width and push margin in sync

Verified live: 1400px starts expanded, content pushed beside the chat (right
929 <= chat left 960), 0 overflow; 1000px starts closed, opening overlays with
no push and no overflow.
2026-07-22 09:25:18 -05:00
Benjamin Taylor 336bcdbf6c fix(examples): match React's toggle FAB — MessageCircle only, covered when open
Previously the FAB swapped to an X when open and sat above the panel, so an open
chat showed TWO X's (header + bottom-right). React never does that: its toggle
FAB is always a MessageCircle, and the sidebar (z-1200) covers the FAB (z-1100)
when open, so the only visible close is the header X.

- FAB icon is always MessageCircle (no X swap)
- chat panel z-index 1200 > FAB 1100, so an open panel covers the FAB

Verified live: OPEN shows only the top-right header X (FAB covered); CLOSED shows
the bottom-right MessageCircle FAB to reopen. No bottom-right X in either state.
2026-07-22 08:41:44 -05:00
Benjamin Taylor 920709f55a feat(examples): align adk-angular chat toggle/close to React's CopilotSidebar
Replace the hand-rolled unicode/emoji controls with lucide icons matching React:
- header close = lucide X (in a title-left/close-right, border-b bar like CopilotModalHeader)
- toggle FAB = lucide MessageCircle (open) / X (close), ALWAYS visible, fixed
  bottom-6 right-6, h-14 w-14, rounded-full, primary-dark — matches CopilotChatToggleButton

Verified live: FAB shows X when open / MessageCircle when closed and stays visible
(React's toggle behavior); close + FAB both drive chatOpen; 0 console errors.
2026-07-22 08:31:19 -05:00
Benjamin Taylor 07da747088 feat(examples): adk-angular chat as a floating slide-over (not a fixed column)
Replaces the permanent 420px chat column with a collapsible slide-over panel
(toggle FAB + close button), mirroring React's CopilotSidebar. The chat now
OVERLAYS rather than reserving a grid track, so the threads drawer's desktop
push no longer smushes the content and the medium-width layout has room.

- app.ts: 2-track grid (drawer + content); fixed .chat slide-over + open FAB;
  chatOpen signal (defaults open, like React defaultOpen). Theme var hoisted to
  the component HOST so the weather card (now in the fixed chat) still inherits it.
- styles.css + web-inspector.ts: move the dev inspector FAB to bottom-left; its
  default top-right anchor (max z-index, transform-positioned) sat over the chat's
  close button and ate the click.

Verified live (real Gemini key): open/close/reopen slide-over; content 880px at
1200w (no smush); 0 horizontal overflow + no clipping at 580/1050/1200; inspector
clears both the close button and open-FAB; 'set theme to teal, then weather in
Paris' recolors the panel AND renders a teal-themed weather card in the floating chat.
2026-07-22 08:21:07 -05:00
Benjamin Taylor 236bcd5a31 fix(examples): border-box reset so adk-angular content doesn't clip on small screens
The proverbs card is width:100% + padding:2rem; with the default content-box the
padding was added ON TOP of 100%, making the card wider than its column and
getting clipped by the layout's overflow:hidden (visible as cut-off content on
narrow/medium screens). React/Next examples get border-box from Tailwind's
preflight; the Angular app had no global reset.

Verified live at 580px (card 578px, no clip, 0 overflow) and 1050px (card fits
its grid track, no overlap with the chat). Matches the React adk's overflow-free
responsive behavior.
2026-07-22 07:57:05 -05:00
Benjamin Taylor 06522b7675 fix(examples): expose frontend tools to the adk-angular agent via AGUIToolset
setThemeColor (and any frontend-registered tool) never reached the LLM: the ADK
agent's tools were static [set_proverbs, get_weather], and ag_ui_adk only injects
the run's forwarded client tools when the agent's tools include an AGUIToolset
placeholder (it swaps it for a ClientProxyToolset wired to input.tools). Added
AGUIToolset() so gemini-2.5-flash sees the forwarded setThemeColor and calls it.

Verified LIVE (real Gemini key): 'Set the theme to green' now recolors the panel
(--app-theme-color: green) — previously the agent declined ('I can only help with
proverbs or the weather'). Same root cause affects the React adk example (fixed
in a companion change).
2026-07-22 07:28:14 -05:00
Benjamin Taylor 2ab0ebcb03 fix(examples): render the adk-angular weather card (drop agentId from renderToolCalls)
The get_weather generative-UI card never rendered: a CR round-3 "consistency"
tweak added agentId: AGENT_ID to the renderToolCalls entry, which scoped the
renderer such that the incoming (server-side) tool call didn't match and the
card was filtered out. The internal examples/v2/angular/demo renderer sets no
agentId; omitting it here restores rendering.

Verified LIVE against the running app (real Gemini key): the WeatherCard now
renders for 'Get the weather in San Francisco' (location + weather chrome),
matching the React adk reference. Caught by a live React-vs-Angular comparison
that the static CR loop could not.

(Note: setThemeColor NOT calling the agent is inherited — the React adk example
behaves identically; ag_ui_adk doesn't bridge forwarded client tools into the
ADK LLM tool set. Separate upstream concern, tracked as bucket-d follow-up.)
2026-07-21 17:21:54 -05:00
Benjamin Taylor 2cbc38b18c feat(examples): add CopilotKit web inspector to adk-angular
Mounts the framework-agnostic cpk-web-inspector web component (dev aid for
watching AG-UI events / agent state / runtime connectivity), handing it the
shared CopilotKit.core. Mirrors the internal examples/v2/angular/demo pattern —
@copilotkit/angular does not integrate the inspector via the provider the way
React's <CopilotKit inspectorDefaultAnchor> does. Matches the richer React
integration examples (langgraph-python et al.); a deliberate extra vs. the
leaner adk reference.

- add @copilotkit/web-inspector@1.63.1
- src/app/web-inspector.ts + <app-web-inspector /> in app.ts
- README file map updated

ng build green; oxlint 0/0.
2026-07-21 15:52:33 -05:00
Benjamin Taylor 2668ba51dd docs(examples): adk-angular CR round 4 comment/doc polish
- app.ts: setThemeColor comment notes it also recolors the weather card
- server.ts: identifyUser comment notes the id must exist in the platform
- README: document that INTELLIGENCE_API_KEY must accompany COPILOTKIT_LICENSE_TOKEN

Comment/doc only — no behavioral change.
2026-07-21 12:36:32 -05:00
Benjamin Taylor 8a48546481 fix(examples): address CR round 3 findings on adk-angular
- proverbs.ts: latch the seed one-shot UP FRONT (per agent instance) so a first
  snapshot with defined proverbs can't leave the effect subscribed and re-seed on
  a later transient undefined; spread existing state in the seed too. Comment now
  states the new-thread-hydration race honestly (inherited from React's [agent])
- server.ts: fix the runtime port at 8200 (matches the hardcoded UI runtimeUrl);
  don't read env PORT — resolves both the client/server port drift and the
  shared-PORT collision with the Python agent
- app.config.ts: pass agentId to the get_weather renderToolCalls entry (parity with
  the setThemeColor frontend tool; future-proofs multi-agent)
- app.ts: correct the theme comment (center panel themes via its input, not the var)

Verified: ng build green; oxlint 0/0. Deferred (bucket c/d, inherited from React adk):
Intelligence empty-API-key fail-loud, .sh||.bat + dev:debug + postinstall-uv script
patterns, demo-user stub, dead ProverbsState — aggregated for a cross-example follow-up.
2026-07-21 12:27:48 -05:00
Benjamin Taylor 9302a4bc6d fix(examples): address CR round 2 findings on adk-angular
- app.ts: theme via a demo-specific --app-theme-color, not --copilot-kit-primary-color
  (the chat re-declares that token on [data-copilotkit] hosts, shadowing the layout
  value, so the weather card never themed — round 1's fix was ineffective)
- app.ts: mobile overrides the desktop 100dvh on .center/.chat so the chat row isn't
  starved to 0 and clipped (regression introduced by round 1's mobile stack)
- proverbs.ts: seed ONCE per agent instance (mirror React [agent]) instead of on every
  state emission — stops transient undefined mid-run/on thread-restore from re-seeding
- proverbs.ts: remove() spreads existing state (setState is a full replace; was wiping
  any non-proverbs state)
- server.ts: read RUNTIME_PORT (not the shared PORT the Python agent also reads)
- main-content.ts: drop the redundant/shadowed --copilot-kit-primary-color binding
- weather-card.ts: location required (matches React/backend) + 'Weather' fallback label
- real favicon.ico (was a 12-byte stub); README file map + Node 20.19+/≥22 notes

Verified: ng build green; oxlint 0/0. Refuted in review: no dual @copilotkit/core
(published angular@0.2.0 depends on core/shared@1.63.1 exactly).
2026-07-21 12:15:45 -05:00
Benjamin Taylor 6b226afd81 fix(examples): address CR round 1 findings on adk-angular
- server.ts now loads .env (import dotenv/config) so COPILOTKIT_LICENSE_TOKEN /
  INTELLIGENCE_* / AGENT_URL / PORT are honored — Intelligence/threads were
  unreachable before (tsx does not auto-load .env like Next.js did)
- .env.example: drop PORT=8200 (the agent's load_dotenv read it and bound 8200,
  colliding with the runtime); align AGENT_URL trailing slash
- app.ts: set --copilot-kit-primary-color on the .layout root so setThemeColor
  reaches the chat-rendered weather card (was scoped to .main-content only)
- app.ts: mobile stacks center+chat instead of hiding the chat (kept assistant reachable)
- proverbs.ts: re-seed on every fresh thread (drop lifetime latch); mirror React
- agent-state.ts: proverbs?: string[] (code depends on undefined-before-seed)
- package.json: drop unused hono/@hono/node-server/@angular/forms/@angular/router; add dotenv
- .gitignore: !.env.example so the tracked template can't be dropped by the .env* rule
- scripts/run-agent.bat: quote cd path + exit guard (match setup-agent.bat)
- agent/main.py: fix garbled prompt rule 5, stray quote, wether/provers/incude/recipe typos
- README: Intelligence path needs Node >=22 + a real provisioned user (not demo-user)

Verified: ng build green; server.ts binds .env PORT (dotenv loads); oxlint 0/0
2026-07-21 12:00:07 -05:00
Benjamin Taylor b3cec10600 docs(examples): adk-angular README + lockfile 2026-07-21 11:45:39 -05:00
Benjamin Taylor 64d5019b63 feat(examples): adk-angular setThemeColor tool + static suggestions 2026-07-21 11:42:40 -05:00
Benjamin Taylor 87cc6e71b0 feat(examples): adk-angular weather generative-UI renderer 2026-07-21 11:41:51 -05:00
Benjamin Taylor 3234d8803d feat(examples): adk-angular proverbs shared-state card 2026-07-21 11:41:00 -05:00
Benjamin Taylor caf6190a73 feat(examples): adk-angular three-column layout with threads drawer + chat 2026-07-21 11:40:04 -05:00
Benjamin Taylor 1f92e807e4 feat(examples): adk-angular standalone Copilot Runtime with env-gated Intelligence 2026-07-21 11:39:09 -05:00
Benjamin Taylor 6f02e5cb31 feat(examples): adk-angular angular app skeleton (bare chat, builds) 2026-07-21 11:37:15 -05:00
Benjamin Taylor 0cc27a3c84 feat(examples): scaffold adk-angular agent + scripts (copy from adk) 2026-07-21 11:23:21 -05:00
Tyler Slaton 8f04764e9c fix(examples): upgrade slack bot's TanStack AI deps to fix OpenAI strict-schema 400 (#6088)
## Problem

The deployed Slack triage bot (`examples/slack`) started failing
**every** turn with:

```
400 Invalid schema for function 'save_diff_comment':
In context=('properties','anchor'), 'propertyNames' is not permitted.
```

No change on our side triggered it — Linear's hosted MCP server changed
the `save_diff_comment` tool schema. Its `anchor` param is now a
free-form map (open object declared with `propertyNames` + open
`additionalProperties`). The bot fetches Linear's tool list at runtime,
so it picked up the new schema automatically.

## Root cause

`@tanstack/ai-openai@0.15.2` (what the bot resolves to) forces `strict:
true` on every function tool. OpenAI's strict function-calling validator
only accepts a subset of JSON Schema and **rejects the entire request
(400, before the model runs)** for a free-form-map object like `anchor`.
One over-rich third-party tool takes down the whole turn.

## Fix — adopt the upstream fix via a dependency upgrade

Already fixed upstream: `@tanstack/openai-base@0.9.8`
([tanstack/ai#933](https://github.com/TanStack/ai/pull/933)) makes the
tool converter detect free-form-map schemas and emit those tools with
`strict: false` (so they stay callable) instead of forcing an invalid
strict schema. First ships in `@tanstack/ai-openai@0.17.0`.

The bot's `^0.15.2` range can't reach it, so this bumps the aligned set
and refreshes `pnpm-lock.yaml`:

| package | before | after |
|---|---|---|
| `@tanstack/ai` | `^0.32.0` | `^0.42.0` |
| `@tanstack/ai-openai` | `^0.15.2` | `^0.17.1` (→ `openai-base@0.9.9`)
|
| `@tanstack/ai-mcp` | `^0.1.3` | `^0.2.5` |

**zod stays at `^3.25.76`.** The repo pins zod to 3.x via a root
`pnpm.overrides` (`zod: ">=3.22.3"`), so the whole workspace resolves
zod 3 regardless. `ai-openai@0.17` peers `zod ^4` (unmet → advisory
warning only), but the strict-schema fix operates on plain JSON Schema,
not zod, so it's unaffected.

**No runtime code change** — the fix lives entirely in the upgraded
adapter (an earlier revision of this PR hand-rolled a schema sanitizer;
that's removed in favor of leaning on TanStack's built-in handling).

## Verification

⚠️ Not verifiable in this worktree (example deps aren't installed here).
Before merge, in an installed env:
- `pnpm --filter slack-example check-types` and `pnpm --filter
slack-example test`
- One live turn hitting Linear (previously-failing `save_diff_comment`
path)
- Sanity-check the bot runs on the workspace's pinned **zod 3** despite
`ai-openai@0.17`'s `zod ^4` peer (the fix path is zod-independent, but
confirm no other `@tanstack/ai` code the bot exercises needs a
zod-4-only API).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-07-21 07:07:18 -07:00
Alem Tuzlak d4e68b133f fix(examples): upgrade slack bot's TanStack AI deps to fix OpenAI strict-schema 400
Linear's save_diff_comment.anchor started shipping as a free-form map
(propertyNames + open additionalProperties). @tanstack/ai-openai@0.15.2 forced
strict:true on every tool and 400d the whole turn on such schemas.

@tanstack/openai-base@0.9.9 (via ai-openai@0.17) detects free-form-map schemas
and emits those tools with strict:false instead, so they stay callable. Bump the
aligned set and refresh the lockfile:

  @tanstack/ai        ^0.32.0 -> ^0.42.0
  @tanstack/ai-openai ^0.15.2 -> ^0.17.1
  @tanstack/ai-mcp    ^0.1.3  -> ^0.2.5

zod stays at ^3.25.76: the repo pins zod to 3.x via a root pnpm override, so the
whole workspace resolves zod 3. ai-openai@0.17 peers zod ^4 (unmet, advisory) but
the strict-schema fix operates on plain JSON Schema, not zod, so it is unaffected.

No runtime code change.
2026-07-21 13:46:21 +02:00
Ben Taylor 99ae28804b fix(vue-demo): use v2 entrypoint and BuiltInAgent (#5960)
## What does this PR do?

Updates the Vue v2 demo to consistently use current v2 APIs:

- imports all Vue demo pages, including the A2UI catalog page, from
`@copilotkit/vue/v2`;
- replaces the demo runtime's deprecated `BasicAgent` instances with
`BuiltInAgent`.

This is the focused, still-applicable demo correction recovered from
#5176. It does not change package exports, public APIs, documentation,
or unrelated demo behavior.

## Related PRs and Issues

- Extracts the Vue demo portion of #5176.

## Verification

- `pnpm nx run @copilotkit/vue-demo:lint` passed.
- Manual Vue demo smoke testing passed using the branch's Nx dev server.
- `pnpm nx run @copilotkit/vue-demo:build` completed Nuxt client and
server compilation locally, but did not exit during Nitro finalization
and was stopped after producing no further output.
- Vue package suite: 1,069 tests passed; two unrelated existing 5-second
timeout failures occurred in `CopilotChatMessageView` activity rendering
and `CopilotSidebarView` measured-margin coverage.
- `git diff --check` passed.

## Checklist

- [x] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] Documentation is not required because this only corrects the
existing v2 demo's imports and deprecated runtime construction.
- [x] "Allow edits by maintainers" is checked (lets us help iterate on
the PR directly).
2026-07-20 11:43:20 -05:00
Jordan Ritter 18a279867a fix(starters): add python-multipart to agno starter (fixes startup crash)
The agno starter's Dockerfile installs Python deps via 'uv pip install --system -e .', resolving from pyproject.toml (not uv.lock). agno>=1.7.8 now resolves to 2.7.4, which dropped python-multipart as a hard dependency. AgentOS registers a FastAPI form-data route, so the app raised 'RuntimeError: Form data requires python-multipart' at import time, crash-looping starter-agno. Pin python-multipart>=0.0.20 directly so it installs regardless of agno's transitive deps.
2026-07-19 20:12:38 -07:00
Tyler Slaton 02a93c3b8a docs(channels): clarify umbrella release availability 2026-07-15 10:13:18 -07:00
Tyler Slaton 8f6f97f231 docs(channels): dogfood the umbrella in channel examples 2026-07-15 10:13:17 -07:00
Benjamin Taylor a758faa19d fix(channels): CR follow-ups — honest stopped status + correct .env WS port (OSS-482)
Two fixes from the pre-merge adversarial CR of this PR (both pre-existing,
flagged as in-subject):

- ChannelManager.status() reported overall "online" for a manager stopped
  BEFORE activate() (e.g. SIGTERM during startup): `entries` is empty, so the
  empty-set fold returned "online" — a torn-down manager reading healthy. Now
  short-circuits to "stopped" when `this.stopped`, matching the documented
  status() contract. New red-green test covers the stop()-before-activate() case.

- examples/slack/.env.example: COPILOTKIT_INTELLIGENCE_WS_URL example was
  ws://localhost:4401, but derivation is a scheme-only swap of the :4201 API URL
  (→ ws://localhost:4201) and 4401 is used nowhere — a user uncommenting it hit a
  dead port. Corrected to :4201 and clarified the derivation note.
2026-07-15 10:50:20 -05:00
Benjamin Taylor 8eda1d64aa docs(examples): correct slack .env.example env accuracy (OSS-482)
Pre-existing .env.example issues noted in the OSS-473 CR:

- AGENT_MODEL example was `anthropic/claude-sonnet-4.5`, but runtime.ts is
  OpenAI-only (web search is an OpenAI hosted tool; it strips a leading
  `openai/` and passes the rest to `openaiText`). Use an OpenAI example and say
  so.
- Removed ANTHROPIC_API_KEY / GOOGLE_API_KEY — never read by this runtime.
- LINEAR_API_KEY, NOTION_TOKEN and NOTION_MCP_AUTH_TOKEN were non-blank
  placeholders, but runtime.ts turns the Linear/Notion MCPs ON purely on the
  presence of LINEAR_API_KEY / NOTION_MCP_AUTH_TOKEN — a placeholder wires a
  broken MCP. Blanked them (they're optional integrations, like the commented
  Discord/Telegram/WhatsApp creds).
- Documented NOTION_MCP_PORT (the `pnpm notion-mcp` sidecar port, default 3001;
  must match NOTION_MCP_URL).
- Added WhatsApp to the header list of supported adapters.
2026-07-15 07:44:35 -05:00
Benjamin Taylor 483880583f refactor(channels): scrub residual internal "bot" naming → "channel" (closes OSS-485)
Follow-up to the OSS-473 clean-break rename (#5963). Scrubs the last
internal "bot" vestiges deliberately left out of 473's atomic
telemetry-surface commit. Naming-only, no behavior change.

- `bot` local variable → `channel` in create-channel.ts factory internals
  and the ~15 test files that exercise it.
- `BotNode` type → `ChannelNode` in @copilotkit/channels-ui and every
  importer (channels, slack/teams/discord/telegram/whatsapp/intelligence
  adapters, and the slack/teams examples).
- `botName` adapter-SPI option → `channelName`: renamed on
  AdapterStartContext, its create-channel caller, and the one adapter that
  reads it (IntelligenceAdapter.start ctx) in the same change so the SPI
  cannot drift. The Phoenix wire contract was already `channelName` (473).
- Stale `bot-ui`/`bot-slack` package refs and "bot core"/"the bot" prose in
  channels/channels-ui comments → `channels-ui`/`channels-slack`/"channel".
- `Symbol.for("copilotkit.bot-ui.*")` → `"copilotkit.channels-ui.*"`.

Deliberately kept: the platform `isBot?` author flag (an unrelated
"is this message author a bot account" semantic), and example `bot`
instance variables / "demo bot" prose (user-facing, out of this ticket's
internal-symbol scope).

Validation: DoD grep returns zero internal bot symbols in
packages/channels + packages/channels-ui; check-types + test green across
all 8 channels packages (1093 tests) and both examples.
2026-07-15 07:39:50 -05:00
Benjamin Taylor 496bb57e15 refactor(channels): rename telemetry surface oss.bot.* → oss.channel.* (OSS-473) 2026-07-15 07:15:05 -05:00
Benjamin Taylor 9163d3225e feat(examples/slack): managed channels via the normal handler, no launcher (OSS-473) 2026-07-15 07:15:02 -05:00
Benjamin Taylor 229f3f1460 refactor(channels): rename Bot/createBot public API to Channel/createChannel across the workspace (OSS-473) 2026-07-15 07:14:59 -05:00
enekesabel 682441e3d3 fix(vue-demo): use v2 imports and BuiltInAgent 2026-07-14 11:34:53 +02:00
Tyler Slaton 68e43fefe1 refactor(channels-intelligence): rename remaining channel APIs 2026-07-10 14:39:56 -07:00
Tyler Slaton 779bb3df8d fix(examples/slack): exit nonzero when managed shutdown fails 2026-07-10 11:08:29 -07:00
Benjamin Taylor 57ddcb9532 fix(channels-intelligence): enforce runtimeInstanceId on OnChannel + leak-path tests + fail-loud managed entrypoint (OSS-406 review r3) 2026-07-10 12:31:24 -05:00
Benjamin Taylor 852bd04a13 fix(channels-intelligence): single-bot guard + startup/join socket cleanup + authoritative runtimeInstanceId (OSS-406 review r2) 2026-07-10 11:48:23 -05:00
Benjamin Taylor df7d3e348f fix(channels-intelligence): fail-fast bot names + richer activation join + stop() cleanup (OSS-406 review) 2026-07-10 11:40:32 -05:00
Benjamin Taylor 7207332d10 fix(examples/slack): managed mode must pass the current message as prompt
Managed getHistory (app-api /api/bots/history) doesn't include the in-flight
turn — unlike native adapters whose getHistory rebuilds the live thread — so
runAgent({context}) alone runs the agent with zero messages (→ provider 400).
Pass the current message (contentParts ?? text) as `prompt`, the sanctioned
mechanism for input not in the adapter's reconstructed history. Verified live:
the managed Slack bot now returns a real answer over the Phoenix loop.
2026-07-10 11:40:31 -05:00
github-actions[bot] f63578df21 style: auto-fix formatting 2026-07-10 11:40:31 -05:00
Benjamin Taylor 786d08171b feat(channels-intelligence): managed-over-Phoenix launcher + slack managed entrypoint (OSS-406 Phase 1)
The realtime primitives (startManagedBots, connectPhoenixHostedBotChannel,
PhoenixRealtimeTransport) existed but nothing composed them into a launcher, so
the managed path defaulted to HTTP and Phoenix was never actually used.

- startManagedBotsOnChannel(bots, { channel, scope, runtimeInstanceId }) — wraps
  an already-connected channel in a PhoenixRealtimeTransport (delivery source +
  render sink) and starts the bots via startManagedBots. Split out so the
  behavior is unit-testable against a fake channel.
- startManagedBotsOverPhoenix(bots, config) — thin glue: connect the gateway
  bot-IO channel, delegate, disconnect on stop().
- phoenixEgress: fail-loud EgressSink (Phoenix routes all egress through the
  render sink).
- examples/slack/app/managed.ts — a REAL consumer of the launcher: the same
  Slack bot as index.ts (agent/tools/context/commands/handlers identical) run in
  managed mode over Phoenix instead of the native slack() adapter. No native
  index.ts changes.

Tests drive a real createBot through the full managed path over a fake channel:
delivered turn → render frame → completion INTENT (never self-ack); throwing
handler → fail intent. Live-stack E2E + manual validation are the OSS-406 proof;
scale-out (Teams, etc.) is OSS-459.
2026-07-10 11:40:31 -05:00
Tyler Slaton d59000e5d7 fix(examples): guard empty submissions in claude-sdk headless-chat
CodeRabbit flagged that the form onSubmit added to headless-chat could submit
empty/whitespace messages. The handler now returns early on blank input and the
submit button is disabled when the message is empty. Applied to the claude-sdk
starters (where the form lives); headless-chat.tsx is already declared
allowedDivergence for these instances, so parity stays green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 17:32:57 -07:00
Tyler Slaton a54ae82fc4 fix(examples): keep CodeRabbit fixes on claude-sdk starters, revert north-star sync
Revert the cross-demo parity sync from b34a9a348: langgraph-python (north-star)
and the langgraph-js / langgraph-fastapi / strands-python instances are restored
to their origin/main state — this PR should not mutate the canonical demo or its
siblings.

Instead, keep the CodeRabbit fixes on the claude-sdk-* starters and declare the
affected shared files as per-instance `allowedDivergence` in the parity manifest,
so `pnpm parity:check` passes without touching the other demos. The starters
carry fixes the north-star has not caught up to yet:

- border-3 -> border-[3px]; bg-[--x] / text-[--x] -> [var(--x)] (Tailwind v4)
- JSX.IntrinsicElements -> React.JSX.IntrinsicElements; Recharts <Bar shape> type
- tool-rendering args?: unknown; mode-toggle a11y; headless-chat <form>
- docker-route-override AGENT_URL trailing-slash normalization

next.config.ts is left matching the north-star template (its ignoreBuildErrors is
a shared build-config concern and the Docker build re-adds it regardless).

parity:check green (5/5 instances, 0 errors); claude-sdk tsc + oxfmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 17:27:28 -07:00
Tyler Slaton 71d33bae59 fix(examples): sync CodeRabbit fixes through the parity north-star
The CodeRabbit fixes in d4ef84f2c edited verbatim parity-tracked files
directly in the claude-sdk-* instances, diverging them from the north-star
(langgraph-python) and failing `pnpm parity:check`.

Move the shared-surface fixes to the north-star and propagate to every
tracked instance via `pnpm parity:sync --all`:

- border-3 -> border-[3px] (border-3 is not a Tailwind utility)
- bg-[--x] / text-[--x] -> [var(--x)] (Tailwind v4 CSS-variable syntax)
- JSX.IntrinsicElements -> React.JSX.IntrinsicElements (@types/react 19)
- Recharts <Bar shape> callback typing
- tool-rendering args?: unknown
- mode-toggle aria-pressed/type/role, headless-chat <form> + aria-label
- docker-route-override AGENT_URL trailing-slash normalization

Also revert the next.config.ts `ignoreBuildErrors` removal: next.config.ts is
a north-star template file shared across all integration demos, so the
suppression can't be dropped on a subset without breaking parity, and dropping
it template-wide would need every demo verified to build clean without it. The
two real type errors it was masking are now fixed at the north-star, so the
shared surface is type-clean regardless.

parity:check green (5/5 instances, 0 errors); claude-sdk tsc + oxfmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 17:27:28 -07:00
Tyler Slaton c6061f2e47 fix(examples): address CodeRabbit review on Claude Agent SDK starters
Resolve the real issues surfaced by CodeRabbit on the new claude-sdk-python /
claude-sdk-typescript starters (frontend files are shared, so most fixes apply
to both):

- Fix two type errors that `ignoreBuildErrors` was masking: `JSX.IntrinsicElements`
  -> `React.JSX.IntrinsicElements` (@types/react 19) and the Recharts `<Bar shape>`
  callback type; then drop the blanket `typescript.ignoreBuildErrors` from
  next.config.ts so source type-checks. The Dockerfile's build-time patch still
  re-adds it for the `next@latest` Docker build, so deploy behavior is unchanged.
- Fix Tailwind v4 CSS-variable syntax: `bg-[--x]` -> `bg-[var(--x)]`, and
  `border-3` -> `border-[3px]` (border-3 is not a utility -> invisible spinner).
- Harden the agent tools: omit the empty ANTHROPIC_API_KEY, wrap the Anthropic
  call in try/catch (TS + Python), normalize the AGENT_URL trailing slash, and
  make the Flight schema's id/airlineLogo/statusIcon required to match the
  "must have" tool description.
- Minor a11y: mode-toggle `aria-pressed`/`type`/`role`, headless-chat `<form>`
  + `aria-label` (Enter-to-submit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 17:27:28 -07:00
Tyler Slaton 2a041c2a96 docs(examples): list Claude Agent SDK starters in the examples index
Add claude-sdk-python and claude-sdk-typescript to the Integrations table
in examples/README.md (17 → 19; total 48 → 50). The two starters were added
to examples/integrations/ but were missing from the index.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 17:27:28 -07:00
github-actions[bot] 7809896d3e style: auto-fix formatting 2026-07-09 17:27:28 -07:00
Tyler Slaton 36020b061f feat(examples): add Claude Agent SDK starters (Python + TypeScript)
Two clonable starter templates showing CopilotKit driving a Claude Agent SDK
agent over AG-UI, mirroring the langgraph-python showcase (todos canvas, charts,
flight cards, dynamic dashboards, HITL, theme, threads drawer).

Each agent is a thin, idiomatic layer on the official ag-ui-claude-sdk /
@ag-ui/claude-agent-sdk adapters: three backend tools (query_data, search_flights,
generate_a2ui) live in per-tool modules and are wired into ClaudeAgentAdapter,
while the shared todo board is driven by the adapter's built-in ag_ui_update_state
tool. The default model is claude-sonnet-5 and local dev uses a real
ANTHROPIC_API_KEY (matching the official AG-UI dojo). Both instances are
registered in the _parity manifest so their frontends stay synced with the
langgraph-python north-star.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 17:27:28 -07:00