Conversation
…xample New @tanstack/ai-claude-code package that runs Claude Code (via @anthropic-ai/claude-agent-sdk) as a TanStack AI chat backend. Unlike HTTP provider adapters, this is a harness adapter: Claude Code owns the agent loop and executes its built-in tools (bash, file edits, search) server-side. - Stream translator maps Agent SDK messages to AG-UI events; harness tool activity arrives as already-resolved TOOL_CALL_*/TOOL_CALL_RESULT pairs and runs always finish with stop/length (never tool_calls), so the engine never re-executes harness tools. Every started tool call is guaranteed a result (synthesized on abort) to keep the engine's pending-call scan safe. - TanStack toolDefinition() server tools are bridged into the harness as an in-process MCP server (raw JSON Schema passthrough, no zod round-trip). Client-side/approval tools fail fast — documented v1 limitation. - Stateful sessions: session id surfaced via a claude-code.session-id CUSTOM event; resume via modelOptions.sessionId (+ forkSession). - Structured output uses the SDK's native outputFormat json_schema. - settingSources defaults to ['project'] so servers don't inherit user-level ~/.claude config from the host machine. - E2E: excluded from the aimock matrix (subprocess can't carry X-Test-Id isolation); covered by 44 unit tests plus a gated live smoke spec (CLAUDE_CODE_E2E=1). Also adds examples/ts-react-coding-agent: a TanStack Start app demoing session resume, the harness tool timeline, read-only/edit permission modes, tool bridging, and a sandboxed scratch workspace — with the agent registry structured so future Codex/Gemini CLI harness adapters can slot in. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ters Add two new coding-agent harness adapters alongside Claude Code: - @tanstack/ai-codex drives OpenAI Codex via @openai/codex-sdk with local tool execution, resumable sessions (modelOptions.sessionId), structured output, and a localhost MCP bridge for TanStack server tools. - @tanstack/ai-gemini-cli drives `gemini --acp` over the Agent Client Protocol with token-level streaming, resumable sessions, a configurable permission policy, and headless ACP auth method selection (authMethodId) so runs never stall on an interactive auth picker. Wire both into the ts-react-coding-agent example: the agent dropdown keeps every harness selectable, and a server function (createServerFn) reports which agents are actually configured at runtime so the UI can surface a setup dialog for unconfigured ones. Includes adapter docs and changesets. Co-authored-by: Cursor <cursoragent@cursor.com>
Add the @tanstack/ai-opencode package, an OpenCode harness adapter that drives OpenCode (via @opencode-ai/sdk) as a TanStack AI chat backend with local tool execution, token-level streaming, stateful sessions, and TanStack tool bridging over a localhost MCP server. Wires the adapter into the ts-react-coding-agent example, adds the OpenCode adapter docs page, and anchors the OpenCode.md gitignore entry so it no longer shadows the docs page on case-insensitive filesystems. Co-authored-by: Cursor <cursoragent@cursor.com>
Coco wraps a project's dev server with a reverse proxy that injects a Shadow-DOM AI chat panel into every HTML response. The panel drives the existing CLI-agent adapters (Claude Code, Codex, Gemini CLI, OpenCode) with cwd pinned to the project, and forwards the current route plus the currently picked element to the server as page context. Adds a bundled sample-app under examples/coco/sample-apps/simple-app (a freshly scaffolded TanStack Start app) so the example is exercisable out of the box. The sample-app is intentionally NOT a workspace package — pnpm scripts in coco's package.json handle install, dev, and a git-restore-based reset that leaves node_modules intact. Co-authored-by: Cursor <cursoragent@cursor.com>
So `pnpm --filter coco sample:reset` (which is `git restore` + `git clean`) preserves them across resets, instead of forcing a full reinstall and route-tree regenerate on every reset. Co-authored-by: Cursor <cursoragent@cursor.com>
The no-op devtools bridge that ChatClient falls back to (when no `devtoolsBridgeFactory` is supplied) was missing `mountWithTools`, `notifyToolsChanged`, and `recordStreamId`. `ChatClient.sendMessage` calls `mountDevtools()` which sets `devtoolsMounted = true` BEFORE invoking `mountWithTools`, so the first send died with `TypeError: this.devtoolsBridge.mountWithTools is not a function`, the promise rejected (often silently), and every subsequent send short-circuited past the broken line and worked. Symptom in the wild: "first message does nothing, the second one works". Also fix the structural-parity check that was supposed to prevent this drift. `const x: Missing = undefined as never` always typechecks (because `never` is assignable to anything), so the original assertion was a no-op. Replaced with `type _AssertBridgeParity<T extends never> = T`, which now fails the build the next time the real bridge grows a public method the no-op doesn't stub. Co-authored-by: Cursor <cursoragent@cursor.com>
The panel now makes it obvious when a turn is in progress so a quiet
agent (or a network/server failure) can't masquerade as "nothing
happened":
- A `status` state machine (idle → sending → streaming) drives:
- a spinning ring + green pulsing dot on the 🥥 launcher (visible
even when the panel is closed),
- a "Coco is calling the agent…" / "Coco is working…" pill with
three bouncing dots in the messages area,
- a status bar at the bottom of the panel ("Sending to claude-code…"
→ "Streaming from claude-code…" → "Ready (claude-code, edit)"
with a colored dot),
- the Send button disables and shows "…" while non-idle.
- Removed the silent "not configured" gate. Previously, pressing Send
before the async `/__coco/api/agents` check returned (or if it
errored) would silently open the setup dialog instead of sending.
`configured` is now `null` until the fetch lands, the panel never
blocks sends on it, and a `null` fetch result no longer falsely
shows every agent as unconfigured. The setup hint only appears once
we *know* the agent is missing credentials.
- Surface `sendMessage` rejections via `console.error('[coco] …')` and
the in-panel error band instead of swallowing them, plus a debug log
on every submit so the path can be traced from the browser console.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # .gitignore # packages/ai-client/src/devtools-noop.ts # pnpm-lock.yaml
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit a8014cf
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview6 package(s) bumped directly, 7 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
@tanstack/ai
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-skills
@tanstack/ai-codex
@tanstack/ai-devtools-core
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-gemini-cli
@tanstack/ai-grok
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-mcp
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
Resolve docs/config.json conflict: keep coco's new CLI-adapter doc entries (Claude Code, Codex, Gemini CLI, OpenCode) and main's updatedAt bump on the OpenAI-Compatible entry — both sides kept. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Work-in-progress on coco, a CLI dev-overlay coding agent bundled with a sample app, plus supporting harness adapters in the TanStack AI ecosystem.
This branch builds on the recently landed coco example and adds:
examples/coco/src/http-bridge.ts) for the dev overlayexamples/coco/src/vite/plugin.ts) integrationinitflow (examples/coco/src/init.ts) and package entry (src/index.ts)client/index.ts,client/panel.ts,agent-status.ts,cli.ts,proxy.ts)It also merges the latest
main, which brings in new e2e coverage, image/video generation specs, and the consolidatedNoOpChatDevtoolsBridgeparity stubs.Status / TODO
initflow UXNotes
examples/coco/**plus themainmerge.🤖 Generated with Claude Code