Skip to content

fix(showcase): bundle 0 + bundle 1 + interrupts-langraph rename + hardening - #4064

Merged
jpr5 merged 49 commits into
feat/showcase-opsfrom
fix/showcase-cleanup-bundle-0-1
Apr 22, 2026
Merged

jpr5 merged 49 commits into
feat/showcase-opsfrom
fix/showcase-cleanup-bundle-0-1

Conversation

@jpr5

@jpr5 jpr5 commented Apr 18, 2026 •

Copy link
Copy Markdown
Contributor

Rebased onto feat/showcase-ops. 10 commits, ~210 files, +8,200 / -2,150 (approximate — see git log).

Summary

Omnibus cleanup on top of feat/showcase-ops: QA parity, interrupts-langraph → interrupts-langgraph typo rename, hitl → hitl-in-chat catalog id rename, showcase documentation pass, workflow filename standardization, plus hardening across showcase scripts, shell components, and the LangGraph interrupts starter.

Scope

Bundle 0 — QA markdown parity (15 packages)

Stubs so every package has checklists for all 9 demos. Final inventory: 17 × 9 = 153 QA files. langgraph-python is intentionally excluded because it migrated its HITL demo into hitl-in-chat + hitl-in-app cells.

Bundle 1 — interrupts-langraph → interrupts-langgraph typo rename

Full directory rename plus internal Nx / pnpm / lockfile consistency. Starter published at 0.1.5 with dep bumps (@types/node ^22.19.11, typescript ^5.9.3, zod ^3.25.76, @langchain/langgraph 1.1.5, @langchain/core ^1.1.26) and hardening below.

Bundle 2 — hitl → hitl-in-chat catalog id rename

Catalog id renamed across 17 package manifests, shell registry, feature registry, constraints (YAML + JSON). QA markdown and e2e specs renamed. URL route /demos/hitl is intentionally retained (id vs route split documented in the validator).

Exposed + fixed two real bugs in the legacy hitl.spec.ts: phantom data-role="assistant" selector (matched nothing), and an always-passing approval assertion. Rewrote per-package HITL README content across all 17 packages (was describing the wrong "warm sunset gradient" flow instead of StepSelector).

Bundle 5 — Showcase documentation pass

Four new / updated docs consolidated here, subsuming sibling PR #4021:

  • showcase/TESTING.md — canonical test-gating matrix across every testing workflow, now using the test_<layer>-<target> names from Bundle 6
  • showcase/aimock/README.md — aimock fixture-sync docs
  • showcase/FRONTEND-STRATEGY.md — multi-shell consolidation rationale; inventory table uses current shell names (shell, shell-dojo, shell-docs, shell-dashboard). The sibling branch's shell-dojolike references were all audited and replaced
  • showcase/INTEGRATION-CHECKLIST.md — adds two new sections:
    • "Source of Truth: examples/integrations/* vs showcase/packages/*"
    • "LangGraph: Prebuilt vs Node-Based"

showcase/README.md from the sibling branch is not pulled — main's post-#4109 version is canonical with a different premise.

Bundle 6 — Workflow filename standardization

Renames 7 testing workflows to the test_<layer>-<target> naming scheme with CI UI name: fields normalized to test / <layer> / <target>. Subsumes sibling PR #4020:

  • e2e_dojo.yml → test_e2e-dojo.yml
  • e2e_examples.yml → test_e2e-legacy-v1.yml
  • showcase_aimock-e2e.yml → test_e2e-showcase-on-demand.yml
  • test_doc-examples.yml → test_integration-docs.yml
  • test_runtime-servers.yml → test_integration-runtime.yml
  • starter_deployed_smoke.yml → test_smoke-starter-deployed.yml
  • starter-smoke.yml → test_smoke-starter.yml

The 8th rename in the source branch (showcase_smoke-monitor.yml → test_smoke-showcase-deployed.yml) is skipped — feat/showcase-ops (#4113) deletes that workflow entirely in favor of runtime probes. For test_e2e-showcase-on-demand.yml, git mv uses main's current content (preserving 5 hardening commits for readiness probes, trust-gate layers, pip wheel fallback, and CR5–CR8 security fixes); only the name: field is pulled from the rename branch.

Consumer references updated in examples/e2e/AGENTS.md, showcase/QA-COVERAGE.md, showcase/TESTING.md, showcase/aimock/README.md, showcase/scripts/create-integration/index.ts, and showcase/scripts/__tests__/create-integration.test.ts.

Hardening

showcase/scripts/lib/manifest.ts

  • Tagged-union ParsedManifest parser (ok / missing / malformed{syntax|shape} / unreadable) with deep-frozen output
  • DemoId branded type with smart constructor
  • /demos/ route-prefix validation, empty-tail guard, duplicate-id detection
  • backend_url shape validation
  • ENOENT / EACCES discrimination via statSync

showcase/scripts/validate-parity.ts

  • routeToDirName helper for id-vs-route resolution
  • 13-variant PackageIssue discriminated union, deriveMessage as single render source
  • Typed error classes (ManifestMalformedError, ManifestUnreadableError, InvalidBaselineError)
  • ValidateParityExitCode literal union taxonomy
  • formatErrorChain with cycle guard + depth cap
  • Per-slug crash isolation: one malformed manifest no longer aborts the batch
  • Cooperates with feat/showcase-ops's auditableDemos filter (informational demos carrying a command: field are excluded from parity checks)

showcase/scripts/create-integration/index.ts

  • Strict parseArgs: duplicate-flag rejection, --slug regex guard (path-traversal protection), --name character allowlist (XSS guard on generated JSX)
  • probePath statSync-based fs probe replacing all existsSync call sites
  • Feature registry elementwise validation
  • updateWorkflows exported for unit testing; uses WORKFLOWS_DIR constant
  • showcase_drift-detection.yml edit removed — superseded by the showcase-ops service's aimock_wiring / image-drift probes which enumerate services from Railway at runtime
  • Generated health/debug routes distinguish unconfigured (env unset) from down (reachable but error)
  • Smoke route AbortSignal.timeout classification (Node 18+ TimeoutError)
  • Fail-fast rejection of --language dotnet (no .NET generator branches exist)
  • Dropped invalid X-Frame-Options: ALLOWALL from generated next.config.ts

showcase/scripts/__tests__/create-integration.test.ts

  • Hardening regression suite migrated off execSync + CREATE_INTEGRATION_SKIP_WORKFLOWS onto runGenerator() so every test writes entirely inside a per-suite tmpdir and never touches the real packages/ tree
  • Direct-import coverage for loadFeatureRegistry failure modes (ENOENT / invalid JSON / shape-invalid) and parseArgs guard coverage

showcase/scripts/capture-previews.ts

  • CaptureResult tagged union replacing boolean+optional shape
  • Strict parseArgs: hex/float/negative/zero --concurrency rejection, unknown flag rejection, duplicate-flag rejection
  • readAllManifests ENOENT/EACCES/EPERM discrimination
  • execFileSync replacing template-interpolated execSync (no shell injection)
  • Filtered empty-targets exit-nonzero
  • Response-timeout tagged as CaptureFailure
  • Renamed hitl → hitl-in-chat config key; parses manifest via shared lib/manifest.ts parseManifest instead of ad-hoc YAML.parse

showcase/shell/src/components/guided-flow.tsx

  • isGuidedAnswers runtime type guard on localStorage payload (validates shape before trusting JSON.parse output; prior code did a blind as GuidedAnswers cast)
  • StoredGuidedAnswers accepts legacy undefined language from pre-language-field versions while the in-memory shape stays strict
  • restoredRef gate preventing persist effect from clobbering restored data on initial render
  • persistWarnedRef / cleanupWarnedRef warn-once refs for localStorage diagnostics
  • Module-load invariants throw on FEATURE_OPTIONS/LANGUAGE_OPTIONS drift from their maps
  • FEATURE_MAP.tools → frontend-tools (was frontend-tools-sync which doesn't exist in the catalog), FEATURE_MAP.hitl → hitl-in-chat

examples/v2/interrupts-langgraph (new starter)

  • ApprovalResumeSchema zod validation at resume boundary (prevents silent fall-through to cancelled)
  • isAIMessage type predicate replacing unchecked cast
  • shouldContinue multi-tool-call routing (mixed frontend + backend batches)
  • bindTools presence guard replacing non-null !
  • Production LANGGRAPH_DEPLOYMENT_URL fail-fast at module load; dev warn-fallback
  • Production error-detail redaction in POST handler

Infra

  • lefthook.yml: lint-fix scoped to staged files via oxlint --fix / oxfmt --write on {staged_files} (guarded against empty expansion), replacing monorepo-wide pnpm run lint && pnpm run format on every commit
  • showcase/.gitignore: **/tsconfig.tsbuildinfo + packages/test-integration-tmp/ (fixture directory leaked by create-integration.test.ts when the suite is killed before cleanup)
  • Untracked 6 accidentally-committed tsconfig.tsbuildinfo files

Base

Rebased onto feat/showcase-ops (was main). Dropped paths that feat/showcase-ops or PR #4112 (shell-docs tech-debt) already addressed differently:

  • showcase/shell/src/app/docs/[[...slug]]/page.tsx — superseded by the shell-docs split in shell-docs tech-debt: CR-surfaced deferred findings from #4109 #4112
  • showcase/shell/src/content/docs/frontend-tools.mdx / human-in-the-loop.mdx — don't exist on current main
  • showcase/shell/src/data/{constraints,demo-content,registry}.json — auto-generated; feat/showcase-ops has fresher generation
  • showcase/shell-dojolike/* — directory deleted upstream

Test plan

  • pnpm -C showcase/scripts test — 1095 tests green locally (21 files)
  • pnpm -F @copilotkit/showcase-ops test — 261 tests green locally (24 files)
  • pnpm exec oxfmt --check on all changed files — clean
  • pnpm exec oxlint on all changed code files — 0 errors (pre-existing warnings, none new)
  • pnpm exec tsc --noEmit on showcase/shell-docs, showcase/scripts, showcase/ops — clean
  • YAML sanity: all 26 .github/workflows/*.yml parse
  • CI green on PR

@vercel

vercel Bot commented Apr 18, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment Apr 22, 2026 3:50am
docs Ready Ready Preview, Comment Apr 22, 2026 3:50am
form-filling Ready Ready Preview, Comment Apr 22, 2026 3:50am
research-canvas Ready Ready Preview, Comment Apr 22, 2026 3:50am
travel Ready Ready Preview, Comment Apr 22, 2026 3:50am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

@jpr5
jpr5 force-pushed the fix/showcase-cleanup-bundle-0-1 branch from 487f853 to f908604 Compare April 18, 2026 06:36
@jpr5 jpr5 changed the title feat(showcase): QA parity + interrupts-langraph typo + hitl rename feat(showcase): QA parity + interrupts-langraph typo rename Apr 18, 2026
@jpr5
jpr5 force-pushed the fix/showcase-cleanup-bundle-0-1 branch from 9168e91 to 0ac97e8 Compare April 18, 2026 06:58
jpr5 added 29 commits April 21, 2026 20:07
…roverb type, undefined guards

- useCopilotAction addProverb parameter now declares type: "string" for
  parity with setThemeColor and getWeather; was missing, which could
  produce an incorrect JSON schema for the LLM.
- React list key for proverbs switched from `${index}:${proverb}`
  (unstable on insert/delete despite the comment claiming otherwise)
  to the proverb content itself with a documented duplicate-content
  tradeoff and upgrade path to stable ids.
- WeatherCard renders a "Loading…" fallback when args.location is
  undefined (happens during streaming before the tool-call arg has
  arrived); previously rendered a blank <h3>.
- setThemeColor handler guards against undefined/non-string args so
  incomplete streaming args don't blank the CSS variable.
- Delete button's filter predicate now matches by proverb content
  instead of capturing the map-iteration index; index-based filtering
  raced against concurrent agent state updates and could delete the
  wrong proverb.
- Typo fix: "its" → "it's" in the seeded proverb text.
… to module scope

The POST handler previously constructed copilotRuntimeNextJSAppRouterEndpoint
on every request — redundant work and, worse, it silently downgraded
configuration errors into per-request 500s instead of deploy-time
failures. Moved construction to module scope; POST now only wraps
handleRequest(req) in try/catch. The existing production-throw for
missing LANGGRAPH_DEPLOYMENT_URL at line 21 already lived at module
scope and stays there.
…, add .env.examples

- Aligned engines.node to >=20.0.0 across root and both apps; README
  already said Node 20+; langgraph.json already pinned 20. Previously
  the root engines allowed >=18 while Next 16 + LangChain v1 require
  20+ — users on Node 18 would pnpm install cleanly then fail at
  runtime.
- Added private: true on agents/package.json (web had it; agent didn't)
  to block accidental npm publishes.
- Dropped the exact pin on @langchain/langgraph-checkpoint 1.0.0 so it
  resolves transitively under @langchain/langgraph 1.1.5 and can't
  drift out of sync with the checkpoint format.
- Replaced the agent's Nx build/lint targets — previously
  console.log shims that reported false-green in CI — with
  `tsc -p apps/agent/tsconfig.json --noEmit` so real type errors
  surface.
- Added .env.example files for both apps with the expected keys
  commented out. Adjusted the starter .gitignore to negate Next.js's
  default .env* exclusion so the examples are trackable.
- README troubleshooting section replaced the phantom error string
  ("I'm having trouble connecting to my tools" — not emitted anywhere
  in the codebase) with an accurate description pointing at the
  [copilotkit/route] handleRequest failed log line and its common
  causes.
…+ mixed-batch orphan fix

- deleteProverb: tightened the tool_call_id extraction. The canonical
  accessor IS config.toolCall?.id on a ToolRunnableConfig (verified by
  reading @langchain/core/tools StructuredTool.invoke and
  @langchain/langgraph/prebuilt tool_node.js — they both populate that
  field). Replaced the unsafe empty-string fallback with an explicit
  throw so a missing id fails loudly at the tool boundary instead of
  silently emitting a ToolMessage with tool_call_id="" (which OpenAI
  rejects on the next turn).
- shouldContinue mixed-batch routing: added intercept_frontend_tools
  and restore_frontend_tools nodes that mirror CopilotKit's canonical
  middleware pattern. Mixed batches (backend tool + frontend action in
  the same AIMessage) were previously routed to tool_node, which
  emitted ToolMessages only for the backend call, leaving the
  frontend-action tool_call orphaned. OpenAI then rejected the next
  modelWithTools.invoke with "tool_calls must be followed by tool
  messages." The new intercept strips frontend-action calls into a
  stash channel before tool_node runs; restore reattaches them to
  the AIMessage (preserving the original message id) so CopilotKit's
  runtime can still dispatch them to the client. Pure-backend batches
  skip both nodes.
- page.tsx: added a comment documenting that `available: "disabled"`
  with a `render:` callback is the canonical CopilotKit pattern for
  backend-executed tools with client-side generative UI — verified
  against @copilotkit/react-core hooks and the scene-creator
  showcase. No code change needed; Round 2 reviewers' "dead code"
  claim was incorrect.
…ix Nx cwd, align CHANGELOG

- route.ts: moved the production LANGGRAPH_DEPLOYMENT_URL throw and
  the LangGraphAgent/CopilotRuntime/endpoint construction out of
  module scope into a lazy getHandleRequest() closure, cached after
  first use. next build evaluates route modules with NODE_ENV=production
  during route collection, and runtime-only env vars aren't set at
  build time on Vercel/Railway/Docker, so the module-load throw was
  aborting production builds. The lazy construction also prevents
  "http://localhost:8125" from being baked into the compiled artifact
  if URL evaluation shifted to build-time.
- project.json: the Nx build/lint targets ran tsc against a path that
  resolved to the workspace root, not the starter root, so they
  silently passed without actually typechecking. Added the cwd option
  so the relative path resolves inside the starter.
- CHANGELOG: the Round-1 entry still described the old `${index}:
  ${proverb}` React key as if it were the shipped behavior. Rewrote
  to describe the actual key={proverb} pattern, the stability
  tradeoff, and the {id, text} upgrade path.
- intercept_frontend_tools: flush previous stash before re-intercept
  (was silently clobbering state when mixed-batch fired twice in one thread)
- Preserve AIMessage metadata (response_metadata, usage_metadata,
  additional_kwargs, tool_call_chunks) through intercept/restore rebuilds
- Remove dead if-block in shouldContinue; clarify routing comment
- Add emit_unknown_tools_notice node so unknown-only tool batches
  surface a user-visible AIMessage instead of silently terminating
- deleteProverb cancel path now returns Command+ToolMessage (match
  approved path); tool_call_id wired consistently
- Tighten zod catch: re-throw non-ZodError, log err.issues
- addProverb: guard non-string/empty payloads (mirrors setThemeColor,
  prevents undefined landing in state during streaming)
- Rename Dismiss button to Cancel request; tighten body copy so the
  user knows clicking sends a cancellation to the agent
- parseInterruptPayload now logs per-predicate reason strings on drift
  so schema skew between agent and web is diagnosable
- React key: composite (index + text) to avoid duplicate-key collapse
  when two identical proverbs exist
… (0.1.6)

- Add turbo.json (root scripts call turbo run but config was missing;
  only starter in examples/v2 that uses turbo)
- Add pnpm-workspace.yaml (pnpm v9+ does not read package.json
  workspaces; workspace:* links failed on standalone extraction)
- Agent tsconfig: target ES2016 -> ES2022 (engines declare Node 20+)
  and explicit lib ES2022 (drop DOM on pure Node code)
- Agent package.json: add build + lint scripts (project.json already
  declared targets); fill description + author
- Web .env.example: add LANGSMITH_TRACING=true (matches agent)
- Web tsconfig: add baseUrl for @/* path resolution
- Agent .gitignore: drop Python artifact leftovers from fork origin
- LICENSE: restore copyright year
- Bump all three package.json to 0.1.6; CHANGELOG 0.1.6 entry
- Web tsconfig target ES2017 -> ES2022 (agent was bumped in 0.1.6,
  web was missed)
- Web .env.example: add LANGSMITH_PROJECT=interrupts-langgraph
  (commented) to match agent
- CHANGELOG 0.1.5 React-key entry: rewrite to reflect the
  currently-shipped \`${index}-${proverb}\` composite key
  (prior entry described a reverted design)
- emit_unknown_tools_notice now synthesizes per-call status=error
  ToolMessages BEFORE appending the notice AIMessage and strips
  unknown calls from the prior AIMessage via rebuildAIMessageWithToolCalls
  so the history remains OpenAI-well-formed across turns
- restore_frontend_tools clears both slots on message-not-found
  (prevents stale slot from flushing onto unrelated AIMessage later)
- intercept_frontend_tools prior-flush path retains slot when flush
  did not land (terminal nodes clear; non-terminal retain for retry)
- shouldContinue: mixed frontend+unknown batch routes to
  emit_unknown_tools_notice instead of leaking unknown calls to the
  frontend via restore_frontend_tools
- deleteProverb: idx === -1 now returns Command+ToolMessage with
  status=error and honest 'no proverb matching X' content
- deleteProverb cancel path status=error (cancellation is not success)
- rebuildAIMessageWithToolCalls typed on AIMessage, no as-any;
  tool_call_chunks dropped (AIMessage constructor does not accept it)
…0.1.7)

- F5: LICENSE copyright changed from individual to "2025-2026 CopilotKit" to match apps/agent package.json author field.
- r1: Fixed broken `pnpm --filter agent` invocation in troubleshooting section to use correct package name `agent-langgraph-interrupt` with pnpm's `--filter`-before-script convention.
- r2: Replaced inline `echo "OPENAI_API_KEY=..." > .env` in Getting Started with `cp apps/agent/.env.example apps/agent/.env` + edit instructions.
- r3: Rewrote project-structure diagram callout from `# workspaces: ["apps/*"]` to `# pnpm workspaces via pnpm-workspace.yaml` (pnpm's actual source of truth).
- p1: Added `dist/` under a "# Build outputs" section in `.gitignore`.
- p2: Added `start` task to `turbo.json` with `dependsOn: ["^build"]`, `cache: false`, `persistent: true`.
- p3: Added `"cache": false` to the `build` target in `apps/web/project.json` for Nx parity with the `nx.targets.build` block in package.json.
- p4: Added `"noEmit": true` to `apps/agent/tsconfig.json` so direct `tsc` invocation matches script-driven builds.
- CHANGELOG: Added 0.1.7 entry at the top enumerating the above changes and referencing parallel-committed fixes.
…otice invariants + intercept stash guard

- F1a (emit_unknown_tools_notice): drop unknown tool_calls whose call.id is missing/empty from BOTH the synthetic error ToolMessage list AND strippedAIMessage.tool_calls; warn naming the tool. Matches deleteProverb's refusal to emit tool_call_id: "". No more "may be rejected on the next turn" fallback path.
- F1b (emit_unknown_tools_notice): suppress the trailing AIMessage(notice) when knownCalls.length > 0 (mixed frontend-action + unknown batch). Appending it there left strippedAIMessage's frontend-action tool_calls unanswered by any preceding ToolMessage, producing an ill-formed OpenAI transcript on replay. Pure-unknown batches (knownCalls.length === 0) retain the notice as before.
- F1c (graph edge): route emit_unknown_tools_notice → restore_frontend_tools → END instead of emit_unknown_tools_notice → END. Ensures any prior unflushed intercept stash is cleared on this terminal path, and surviving frontend-action calls in the mixed-batch case reach the frontend via the canonical restore terminal. restore_frontend_tools already no-ops on an empty slot, so the pure-unknown path still terminates cleanly. Pure-unknown batch additionally emits undefined for both slot keys here to make the clear explicit.
- F2 (intercept_frontend_tools mixed-batch return): before overwriting the intercept slot, attempt a second flush of the prior stash against the post-strip outgoingMessages array; if still unmatched, emit a console.warn naming the lost priorOriginalId + tool-call ids (mirroring restore_frontend_tools's "no matching AIMessage" warn style) and overwrite the slot anyway — merging two different AIMessage ids into one slot would corrupt originalAIMessageId. The frontendToolCalls.length === 0 branch is unchanged (non-terminal, retains slot).
- Comment block at the top of intercept_frontend_tools updated to describe the actual flush strategy (pre-strip pass, post-strip retry, warn+overwrite fallback) instead of the stale "retained for a future intercept pass" claim.

Pure-backend-tool path is unaffected: shouldContinue returns "tool_node" when only backend calls are present, bypassing both intercept_frontend_tools and emit_unknown_tools_notice. No backend tool logic, tool_node, chat_node, or the deleteProverb/getWeather tools were touched.
- F3: add explicit deps arrays to the setThemeColor (`[setThemeColor]`)
  and getWeather (`[themeColor]`) useCopilotAction declarations in
  apps/web/src/app/page.tsx so the WeatherCard renderer no longer
  stale-closes over themeColor; matches the array style already used
  by the addProverb declaration.
- F4: Next 16 removed `next lint`. Replace `"lint": "next lint"` with
  `"lint": "eslint . --max-warnings=0"` in apps/web/package.json, add
  a flat-config `eslint.config.mjs` (next/core-web-vitals +
  next/typescript, mirrors the sibling open-mcp-client starter), and
  add `eslint@^9`, `[email protected]`, and `@eslint/eslintrc@^3`
  to devDependencies.
- b1: gate the LANGSMITH_API_KEY warn at module load on
  `NODE_ENV !== "production"` so it does not fire during `next build`
  in CI (matches the existing LANGGRAPH_DEPLOYMENT_URL warn gate).
- b2: split the outer POST try/catch into two regions — one around
  `getHandleRequest()` (logs `runtime construction failed:`) and one
  around `handleRequest(req)` (logs `handleRequest dispatch failed:`).
  Response bodies unchanged. Also widened the cached handler type to
  `(req: Request) => Response | Promise<Response>` to match the
  signature returned by `copilotRuntimeNextJSAppRouterEndpoint` (was
  latent TS error exposed once eslint/typecheck actually runs).
- b3: refactor `parseInterruptPayload` to return
  `{ ok: true; value } | { ok: false; reason }`; remove the four
  internal `console.error` lines. The renderer caller now logs a
  single line with the reason + raw event value, eliminating the
  double-log.
- b4: remove the dead `.next/dev/types/**/*.ts` entry from the
  apps/web/tsconfig.json `include` array (Next 16 emits dev types
  under `.next/types/**`).
- b5: add a comment block at the top of the LANGSMITH section in
  apps/web/.env.example explaining that LANGSMITH_* vars are consumed
  by the agent / LangGraph deployment; the web app itself only
  observes LANGSMITH_API_KEY for the dev warn and to forward the key
  through to the LangGraphAgent client.

Verified with:
- `pnpm --filter web-langgraph-interrupt build` (passes)
- `pnpm --filter web-langgraph-interrupt lint` (0 errors, 0 warnings)
…v bootstrap + troubleshooting log-prefix split
…ne (A1 emit_unknown slotClear unconditional, A2 intercept retain→flush-or-clear, A3 intercept synthesize id on missing lastMessage.id)
…facing CHANGELOG

Removed internal CR-round references and "(handled in a parallel commit)"
parentheticals per the no-CR-meta-in-PR convention. CHANGELOG now describes
changes in user-visible terms only.
…otice keep unknown tool_calls on AIMessage for OpenAI transcript invariant

When strippedAIMessage.tool_calls=knownCalls (frontend actions only)
while errorToolMessages referenced the stripped unknown ids, the next
user turn resent history to OpenAI with orphaned ToolMessage.tool_call_ids.
OpenAI's chat-completions API rejects with "tool_call_id does not match
any preceding tool_calls" when a ToolMessage's tool_call_id is absent
from the immediately-preceding AIMessage's tool_calls[].

Fix: rebuild strippedAIMessage with retainedCalls = [...knownCalls,
...unknownWithId] so every errorToolMessage has a matching preceding
tool_call.id. Dropped-id unknowns (missing/empty tool_call_id) stay
omitted — they have no ToolMessage partner, so leaving them would
reintroduce the dangling-id problem this commit is closing.

Why this is safe for the CopilotKit frontend runtime:
- Frontend action dispatch is driven by live TOOL_CALL_START /
  TOOL_CALL_END SSE events in the current turn. emit_unknown_tools_notice
  writes only to state.messages; it does not re-emit tool-call events.
- On the next turn, the runtime parses SSE events into a messages
  snapshot and pairs each tool_call with its TOOL_CALL_RESULT /
  ToolMessage by id. Retained unknowns are paired with their error
  ToolMessages, so the pair is treated as already-resolved; the
  frontend runtime does not re-dispatch resolved calls.
- langchain/openai's completions converter (verified at
  node_modules/@langchain/openai/dist/converters/completions.js)
  serializes ToolMessages as {role: "tool", tool_call_id: ...} without
  filtering against the preceding AIMessage — meaning the API-level
  validation is all that was catching the bug, and all that we need
  to satisfy.

Traced both code paths by hand:
- Pure unknown (knownCalls=[], unknownWithId=[u1]): AIMessage.tool_calls=[u1]
  → ToolMessage(u1) → AIMessage(notice). Valid.
- Mixed (knownCalls=[f], unknownWithId=[u1]): AIMessage.tool_calls=[f,u1]
  → ToolMessage(u1) → restore_frontend_tools → END. Frontend dispatches
  f via the live stream and emits its own ToolMessage on the next
  turn, pairing with the retained f on the AIMessage. Valid.

Also updates the leading comment blocks on shouldContinue (item (b))
and emit_unknown_tools_notice (item #2) to describe the retain-unknowns
invariant and the frontend-dispatch argument, replacing the earlier
"strip unknowns off the AIMessage" wording.

Typecheck: 2 pre-existing errors at agent.ts:257 and :591 remain
(baseline @langchain/core nominal-type mismatch from the pnpm
multi-version resolution; unrelated to this change).
… from preserved-fields comment to match rebuildAIMessageWithToolCalls helper
…t-integration-tmp

- lefthook.yml: scope `lint-fix` to staged files via oxlint --fix / oxfmt
  --write on {staged_files}, guarded against empty expansion so a
  markdown-only commit doesn't default to the whole monorepo. Prior
  `pnpm run lint && pnpm run format` ran across everything on every
  commit — slow and noisy.
- showcase/.gitignore: add **/tsconfig.tsbuildinfo (incremental TS build
  state, regenerated on every tsc) and packages/test-integration-tmp/
  (fixture directory leaked by create-integration.test.ts when the
  suite is killed before its cleanup block runs).
- Untrack 6 accidentally-committed tsconfig.tsbuildinfo files so the
  new .gitignore rule doesn't race against tracked copies.
…ync, FRONTEND-STRATEGY, INTEGRATION-CHECKLIST

- showcase/TESTING.md (new) — canonical testing matrix across showcase surfaces
- showcase/aimock/README.md (new) — aimock fixture-sync docs
- showcase/FRONTEND-STRATEGY.md (new) — multi-shell transition rationale; uses
  current shell names (shell, shell-dojo, shell-docs, shell-dashboard); no
  shell-dojolike references remain
- showcase/INTEGRATION-CHECKLIST.md — adds two novel sections:
    * Source of Truth: examples/integrations vs showcase/packages
    * LangGraph: Prebuilt vs Node-Based

showcase/README.md from the sibling branch is intentionally NOT pulled — main's
post-#4109 version is canonical and has a different premise.
…nvention

Renames 7 workflows to the `test_<layer>-<target>` naming scheme, with `name:` fields
normalized to `test / <layer> / <target>` for the CI UI. The showcase_smoke-monitor
rename from the source branch is intentionally SKIPPED — showcase-ops (#4113) deletes
that workflow entirely in favor of runtime probes.

Renames (git mv):
- e2e_dojo.yml               → test_e2e-dojo.yml
- e2e_examples.yml           → test_e2e-legacy-v1.yml
- showcase_aimock-e2e.yml    → test_e2e-showcase-on-demand.yml
- test_doc-examples.yml      → test_integration-docs.yml
- test_runtime-servers.yml   → test_integration-runtime.yml
- starter_deployed_smoke.yml → test_smoke-starter-deployed.yml
- starter-smoke.yml          → test_smoke-starter.yml

For test_e2e-showcase-on-demand.yml: `git mv` on main's current content (not the
source branch's older version) preserves the 5 hardening commits — readiness probes,
trust-gate layers, pip wheel fallback, CR5-CR8 security fixes. Only the `name:` field
is updated from the rename branch.

Consumer references updated:
- examples/e2e/AGENTS.md            — 2 refs to e2e_examples.yml
- showcase/QA-COVERAGE.md           — 2 refs to showcase_aimock-e2e.yml
- showcase/scripts/create-integration/index.ts — 4 refs to starter-smoke.yml
- showcase/scripts/__tests__/create-integration.test.ts — 1 ref to starter-smoke.yml
- showcase/TESTING.md               — full matrix + footnotes + dropped the now-deleted showcase_smoke-monitor row
- showcase/aimock/README.md         — inline prose ref consistency

Self-references inside each renamed workflow also updated where present.
…st_smoke-starter.yml

Aligns the create-integration hermetic fixture with the workflow-file rename
from 49232f6 (standardize workflow filenames to test_<layer>-<target>).
The generator already references the new name; the test fixture was missed
in that commit and surfaced as VT-M2-C regression (ENOENT on smokePath).
Lockfile was out of sync with root package.json overrides after interrupts-langgraph
dep additions. Regenerated with --no-frozen-lockfile --ignore-scripts; no transitive
version drift beyond the override collapse already committed in aa4be8d.
…o pick up hitl-in-chat content

demo-content.json / registry.json / constraints.json refreshed after the
hitl → hitl-in-chat catalog rename (f35065d), QA 9-for-all parity
(7dde333), and the multi-shell generator changes (e2a6cc2). The
bundle generators now emit to shell/, shell-dojo/, and shell-docs/;
shipping the regenerated artifacts so CI doesn't see a dirty tree and
so the shell-dojo app picks up the hitl-in-chat column content.
@pkg-pr-new

pkg-pr-new Bot commented Apr 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/a2ui-renderer@4064

@copilotkitnext/angular

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/angular@4064

copilotkit

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/copilotkit@4064

@copilotkit/core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/core@4064

@copilotkit/react-core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-core@4064

@copilotkit/react-textarea

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-textarea@4064

@copilotkit/react-ui

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-ui@4064

@copilotkit/runtime

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/runtime@4064

@copilotkit/runtime-client-gql

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/runtime-client-gql@4064

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sdk-js@4064

@copilotkit/shared

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/shared@4064

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sqlite-runner@4064

@copilotkit/voice

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/voice@4064

copilotkit-vscode-extension

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/copilotkit-vscode-extension@4064

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/web-inspector@4064

commit: 0dceb28

This branch was successfully deployed

5 active deployments
Preview – travel — 0dceb282 Deployed Apr 22, 2026 by vercel[bot]
Preview – research-canvas — 0dceb282 Deployed Apr 22, 2026 by vercel[bot]
Preview – docs — 0dceb282 Deployed Apr 22, 2026 by vercel[bot]
Preview – form-filling — 0dceb282 Deployed Apr 22, 2026 by vercel[bot]
Preview – chat-with-your-data — 0dceb282 Deployed Apr 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant