## Summary
- Adds `_fix_messages_for_bedrock()` static method to
`CopilotKitMiddleware` that sanitizes messages before model invocation
- Strips unanswered `tool_calls` (no matching `ToolMessage`) — Bedrock
rejects `toolUse` blocks without a corresponding `toolResult`
- Syncs `msg.content` tool_use blocks with `msg.tool_calls` to remove
stale content blocks left behind in checkpoints
- Fixes string-typed `args`/`input` in tool_calls and tool_use content
blocks (Bedrock requires dict)
## Context
When using CopilotKit with Amazon Bedrock's Converse API, `after_agent`
restores frontend tool_calls to the checkpoint. This creates three
problems that cause Bedrock to reject the request:
1. AIMessages contain `toolUse` blocks without matching `toolResult`
messages
2. Content blocks and `tool_calls` can get out of sync after
`after_model` strips calls but leaves content blocks
3. Tool call arguments can be serialized as strings instead of dicts
This fix runs automatically in `awrap_model_call` before every model
invocation.
## Test plan
- [ ] Verify existing CopilotKit tests still pass
- [ ] Test with Bedrock Converse API (Claude models) with frontend tool
injection
- [ ] Test multi-turn conversations where frontend tool_calls are
restored from checkpoints
## Summary
- Removes the \`astral-sh/setup-uv@v6\` step from 8 CI workflows that
install uv but never use it
- Keeps uv in \`e2e_dojo.yml\` which actually needs it (dojo scripts use
\`uv sync\`/\`uv run\` for Python agents)
### Workflows cleaned up
| Workflow | What it does |
|---|---|
| \`test_unit-v1.yml\` | Unit tests (pnpm/node only) |
| \`test_unit-v2.yml\` | Unit tests (pnpm/node only) |
| \`static_quality.yml\` | Prettier, ESLint, publint (3 jobs, all node)
|
| \`static_commitlint.yml\` | Commitlint (node only) |
| \`static_danger.yml\` | Danger (node only) |
| \`e2e_examples.yml\` | Example e2e tests (node only) |
| \`publish_release.yml\` | Changeset publish (node only) |
| \`publish_custom-pre.yml\` | Snapshot publish (node only) |
### Workflow kept unchanged
- \`e2e_dojo.yml\` — \`prep-dojo-everything.js\` and
\`run-dojo-everything.js\` use \`uv sync\`/\`uv run\` for Python agent
suites
## Test plan
- [x] Verified \`e2e_dojo.yml\` is the only workflow where \`uv\` is
actually invoked
- [x] Verified no \`postinstall\` scripts in core packages call \`uv\`
- [x] Confirmed \`setup-uv\` only remains in \`e2e_dojo.yml\`
- [ ] CI should pass on this PR — all affected workflows are node-only
These 8 workflows install uv but never invoke it. Only e2e_dojo.yml
actually needs uv (the dojo scripts use uv sync/run for Python agents).
Removing the unnecessary step saves CI time and reduces confusion.
The repo migrated to lefthook but leftover .husky/_/ files from the
old husky install can confuse agents into thinking husky is the hook
runner. Adding .husky/ to .gitignore prevents these from reappearing.
## Summary
- Adds a Claude Code `PreToolUse` hook that blocks `git commit` calls
containing `--no-verify`, `-n`, `LEFTHOOK=0`, or `--no-gpg-sign` —
preventing agents from silently skipping lefthook pre-commit hooks
- Adds commit grouping convention to the git guidelines docs (commits
should be separated by area of concern)
## Test plan
- [x] Verified hook blocks `git commit --no-verify` (blocked live in
session)
- [x] Verified hook blocks `LEFTHOOK=0 git commit` (blocked live in
session)
- [x] Verified hook allows normal `git commit` (passed through)
- [x] Verified hook ignores blocked keywords inside commit messages
(e.g. mentioning "--no-verify" in message text)
Agents and subagents sometimes skip pre-commit hooks by passing
bypass flags to git commit. This adds a PreToolUse hook that blocks
those attempts, ensuring lefthook always runs.
Add _fix_messages_for_bedrock() to handle three issues caused by
after_agent restoring frontend tool_calls to the checkpoint:
1. Strip unanswered tool_calls without matching ToolMessages (Bedrock
rejects toolUse without a corresponding toolResult)
2. Sync msg.content tool_use blocks with msg.tool_calls
3. Fix tool_use/tool_call blocks with string input/args (must be dict)
Neither built-in-agent nor agent-spec are valid CLI framework options.
Remove "Start from scratch" CLI paths, keep manual setup only.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Agent-spec: remove invalid CLI `-f agent-spec` option, link to manual setup
- A2A: fix env var (GEMINI_API_KEY) and port (10002) to match starter template
- AWS Strands: fix useRenderTool to use Zod schema and correct render props
- LangGraph: add auth guide cross-reference in configurable docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Run prettier on ~1,865 files across examples/ to match the monorepo's
formatting standards. These files were imported as-is from standalone
repos that used different prettier configs.
- gemini/stack_agent.py: initialize tool_calls/tool_msg before try
block, guard usage with null check to prevent NameError on failure
- gemini/posts_generator_agent.py: use async generate_content to avoid
blocking event loop, guard grounding_metadata access, replace bare
except with explicit bounds check, remove dead router_function and
redundant static edges
- gemini/app/api/chat/route.ts: remove dead OpenAI route from Gemini
example (mislabeled as Gemini-powered, no frontend references it)
- gemini/package.json: remove unused @ai-sdk/openai, ai, zod deps
- langgraph-python/agent.py: remove debug print(state), move docstring
to first position so chat_node.__doc__ works
- textarea tutorial: fix StackBlitz URLs pointing to use-tasks.tsx
instead of use-emails.tsx
SVG files are text-based XML averaging ~218 bytes each. LFS tracking
adds per-file HTTP fetch overhead with no storage benefit, suppresses
git diff output, and breaks tutorial clone instructions that use
GIT_LFS_SKIP_SMUDGE=1 (users get LFS pointers instead of icons).
- base-command: wrap checkCLIVersion() fetch in try-catch so CLI
doesn't crash when offline (version check is non-critical)
- init: forward argv to Create instead of dropping all flags, remove
misleading flag definitions (init is just a deprecated redirect)
- detect-endpoint-type: fix Promise.all destructuring (5 promises but
only 4 variables caused isCopilot to receive the LangGraph FastAPI
result), add missing isMCP branch, use isLangGraphFastAPI result
- auth.service: validate OAuth state parameter before tracking analytics
with user data, add reject()+server.close() on state mismatch so the
Promise settles instead of hanging the CLI forever
- create.test: fix quote-style assertion to match prettier output
- Remove copy-paste triplication in scaffoldAgent (LangSmith block
duplicated twice, causing duplicate .env entries and redundant writes)
- Update AgentTemplates URLs to point to monorepo paths instead of
archived standalone repos
- Fix flags.projectName → args.projectName in banner logic (projectName
is an Args field, not Flags)
- Remove stale trpc-cli path mapping and project reference from
tsconfig.json (package doesn't exist in this monorepo)
Migrate the copilotkit CLI (npx copilotkit create/init/dev) from
CopilotCloud into packages/v1/cli. TEMPLATE_REPOS updated to use
monorepo subdirectory sparse checkout for all CopilotKit-owned
templates, with tarball fallback for external repos (ag2).
Add package rules to group examples/** dependency updates into weekly
Monday PRs. CopilotKit package bumps are tracked separately. Legacy
examples/v1/ and v2/ directories are excluded from both rules.
Rewrite all standalone repo URLs to monorepo paths across 18 doc files
and the root README. Tutorial clone instructions now use
GIT_LFS_SKIP_SMUDGE=1 and point to examples/ subdirectories. Fix
pre-existing copy-paste bug in textarea tutorial and stale branch refs.
migrate-demos.sh: automates shallow clone + cleanup + copy for all 73
repos, with --group and --dry-run support.
archive-demo-repos.sh: updates each standalone repo's README with a
deprecation notice pointing to the monorepo location, then archives it.
Exits non-zero on any failures.
Mark all publishable @copilotkitnext/* packages as deprecated in
package.json, pointing users to the @copilotkit/* equivalents.
V2 features will be available under the /v2 subpath.
Affected packages: shared, core, agent, angular, react, runtime,
sqlite-runner, web-inspector.
Adds a new `runTool()` method to `CopilotKitCore` that allows
programmatic execution of registered frontend tools without requiring an
LLM turn. This enables UI-driven tool invocations (e.g., button clicks
triggering tool handlers) while maintaining proper message history and
subscriber notifications.
Key changes:
- Extract `executeToolHandler` helper from duplicated logic in
`executeSpecificTool` to share with `runTool`
- Add `runTool()` on `RunHandler` with tool/agent lookup, message
creation, handler execution, and optional follow-up support
- Add `TOOL_NOT_FOUND` and `AGENT_NOT_FOUND` error codes
- Add `CopilotKitCoreRunToolParams` and `CopilotKitCoreRunToolResult`
types
- Add delegation method on `CopilotKitCore`
- Add 16 comprehensive tests covering all runTool behaviors