feat(cockpit): langgraph client-tools Node backend using @threadplane/middleware#674
Merged
Conversation
…/middleware) JS/TS twin of cockpit/langgraph/client-tools/python — same graph behavior built on @threadplane/middleware/langgraph (clientToolsChannel + bindClientTools + clientToolsRouter). Served by langgraphjs dev on the same port (5308) and graph id (client-tools) as the Python backend, so the shared Angular frontend connects unchanged. Scaffold complete; install + serve + live smoke land once @threadplane/middleware is published to npm (the backend consumes the published package, mirroring how the Python backend consumes the published PyPI package). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a TypeScript/LangGraph.js backend to the langgraph client-tools demo —
cockpit/langgraph/client-tools/node/— the JS twin of../python, built on the published@threadplane/middleware/langgraph.The graph is the middleware:
clientToolsChannel()declares the state channels,bindClientToolsbinds the browser-declared catalog onto the model, andclientToolsRouter([])ends the turn on a client-tool call so the browser executes it. Served bylanggraphjs dev --port 5308on the same port + graph id (client-tools) as the Python backend, so the shared Angular frontend connects unchanged — only the backend runtime (Node vs Python) differs.Live-LLM smoke ✅ (real OpenAI, all three tool kinds, zero console errors)
Drove the existing Angular frontend against this Node backend:
get_weather→ called → browser-executed → model summarized ("It's 68°F and sunny in Tokyo…")weather_card→ Paris card rendered (59°F, Partly Cloudy, 60% / 10 mph) + continuationconfirm_booking→ confirm card → froze to "Booking confirmed ✓" (ask-card freeze) + continuationThis is the deferred live demo, done over the native LangGraph transport (the AG-UI canonical demo is untouched — it keeps its Python server; there is no TypeScript AG-UI server in the repo).
Run:
npm install && OPENAI_API_KEY=… npm run dev, thennpx nx serve cockpit-langgraph-client-tools-angular --port 4308.🤖 Generated with Claude Code