Commit Graph

95 Commits

Author SHA1 Message Date
Max Korp 9fa9de3bb1 Merge remote-tracking branch 'origin/main' into feat/intelligence-thread-plumbing 2026-03-13 11:19:25 -07:00
Jordan Ritter bee70690bb feat: move CLI package from CopilotCloud into 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).
2026-03-12 13:06:03 -07:00
Benjamin Taylor fd81932515 feat(core): Add explicit named exports for intelligence-platform in runtime barrel 2026-03-12 13:04:26 -07:00
Benjamin Taylor 35e73f7ae0 fix(runtime, react): Remove ag-ui local overrides 2026-03-12 13:02:58 -07:00
Mike Ryan dcb6419acf feat(core,runtime): Implement connecting and restoring behavior 2026-03-12 13:02:17 -07:00
Benjamin Taylor 4c10954c09 feat(runtime, react): Set up real time updates (but not yet reducing) in useThreads 2026-03-12 13:00:13 -07:00
Benjamin Taylor 17a4c02a75 fix(runtime, react): Remove ag-ui local overrides 2026-03-12 12:59:17 -07:00
Mike Ryan f62b82e22c feat(core,runtime): Implement connecting and restoring behavior 2026-03-12 12:58:45 -07:00
Benjamin Taylor c4bfcc9bc0 feat(runtime, react): Set up real time updates (but not yet reducing) in useThreads 2026-03-12 12:58:30 -07:00
Alem Tuzlak f64a815cea feat: migrate public API from Zod to Standard Schema V1
Replace Zod-specific types (z.ZodType, z.infer) with Standard Schema V1
interfaces across the V2 public API surface. This allows users to use any
Standard Schema V1 compatible library (Zod 3.24+, Valibot v1+, ArkType v2+)
for tool parameters, with zero breaking changes for existing Zod users.

- Add schemaToJsonSchema() utility in shared with Standard JSON Schema V1
  support and Zod fallback
- Update FrontendTool, ToolDefinition, useRenderTool, useComponent, and
  Angular tool types to accept StandardSchemaV1
- Move zod from dependencies to devDependencies in core and angular
- Add runtime tests (40) and type-level tests (38) across all packages
  verifying Zod, Valibot, and ArkType compatibility
2026-03-10 15:36:26 -07:00
Jordan Ritter 12cfcf6944 fix: update pnpm-lock.yaml for @copilotkitnext/shared dependency
The lockfile was out of sync with packages/v2/agent/package.json after
the @copilotkitnext/shared workspace dependency was added, causing all
CI workflows to fail at the install step.
2026-03-10 14:27:26 -07:00
Ran Shem Tov 8667fc7606 feat: move a2ui message renderer to v2s react package 2026-03-06 16:33:36 +01:00
Jordan Ritter 005d77f87e fix: remove server-side runtime dependency from runtime-client-gql (#3310)
## Summary

- `@copilotkit/runtime-client-gql` declared `@copilotkit/runtime` as a
dependency, but never imports from it at runtime
- This caused barrel re-exports to pull server-side code into client
bundles (600KB → 4.3MB)
- Removed the package.json dependency and added an Nx
`implicitDependencies` entry to preserve build ordering (graphql-codegen
needs the schema file that runtime generates)

Fixes #3225

## Test plan

- [x] Verified no source imports from `@copilotkit/runtime` in
runtime-client-gql
- [x] Nx build ordering preserved via `implicitDependencies`
- [x] Full build passes (including graphql-codegen)
- [x] All tests pass

🤖 Generated with [Claude Code](https://claude.ai/code)
2026-03-05 13:31:21 -04:00
Ran Shem Tov 7dabe81de6 chore: align with main 2026-03-05 16:45:41 +01:00
Ran Shem Tov 947978e777 feat: enable mcp and a2ui middleware directly from copilotkit runtime 2026-03-05 16:41:29 +01:00
Maxim 3ea54b2e65 Merge branch 'main' into feat/upgrade-ai-sdk 2026-03-05 01:27:05 +04:00
Maxim 9241c2b611 feat(runtime): upgrade AI SDK to v6 to match v2 agent 2026-03-04 15:02:37 -05:00
Maxim bdedf25f6d feat(agent): upgrade AI SDK to v6 for LanguageModelV3 compatibility 2026-03-04 15:02:16 -05:00
Benjamin Taylor 856fc2e490 feat(runtime, react): Add beginnings of web socket-enabled Intelligence agent hook and agent runner 2026-03-03 16:01:01 -06:00
Benjamin Taylor 18b71200b6 feat(runtime, react): Add scaffold and some initial work on intelligence agent runner and hook 2026-03-03 15:43:44 -06:00
Benjamin Taylor 764ec32427 feat(runtime, react): Add beginnings of web socket-enabled Intelligence agent hook and agent runner 2026-03-03 15:40:40 -06:00
Jordan Ritter 6471a912f1 fix: remove spurious @copilotkit/runtime dependency from runtime-client-gql (#3225)
The @copilotkit/runtime-client-gql package listed @copilotkit/runtime as
a dependency, but none of its source files actually import from it. This
caused the entire server-side runtime (graphql-yoga, hono, openai, shiki,
reflect-metadata, etc.) to be pulled into client bundles, exploding
bundle size from ~600kb to 4.3mb+.

Remove the unused dependency from package.json, the UMD externals list,
and the UMD globals map in tsdown.config.ts.
2026-03-02 19:45:06 -08:00
Alem Tuzlak 45652201a9 Merge branch 'main' into worktree-validated-greeting-quokka 2026-03-02 15:23:37 +01:00
Markus Ecker 979511a900 chore: upgrade AG-UI to 0.0.46 2026-02-27 14:47:50 +01:00
Jordan Ritter 3f1259d060 fix: propagate custom provider config from service adapters to BuiltInAgent (#3283)
Fixes #2903

## The Bug

Azure OpenAI users get `AI_LoadAPIKeyError: OpenAI API key is missing`
despite passing a properly configured `OpenAI` instance to
`OpenAIAdapter`, exactly as shown in the docs.

**Root cause**: `CopilotRuntime.handleServiceAdapter()` discards the
adapter's configured OpenAI instance and constructs a plain string
`"openai/gpt-4o"` to pass to `BuiltInAgent`. The agent's
`resolveModel()` then creates a *brand new* OpenAI provider using only
`OPENAI_API_KEY`, losing all Azure configuration (baseURL, api-key
header, api-version query param).

The V1 adapter's `process()` method — which correctly uses the custom
OpenAI instance — is dead code. It's never called. Only `.provider` and
`.model` strings are extracted.

```
User configures Azure OpenAI instance →
  OpenAIAdapter stores it →
    CopilotRuntime extracts only "openai"/"gpt-4o" strings →
      BuiltInAgent.resolveModel("openai/gpt-4o") →
        createOpenAI({ apiKey: OPENAI_API_KEY }) →
          💥 API key missing / wrong endpoint
```

## Workaround

Until this is merged, users can bypass the broken adapter entirely by
using `BuiltInAgent` directly with the Vercel AI SDK Azure provider:

```typescript
import { createAzure } from "@ai-sdk/azure";
import { CopilotRuntime, copilotRuntimeNodeHttpEndpoint } from "@copilotkit/runtime";
import { BuiltInAgent } from "@copilotkitnext/agent";

const azure = createAzure({
  resourceName: process.env.AZURE_RESOURCE_NAME,
  apiKey: process.env.AZURE_API_KEY,
});

const runtime = new CopilotRuntime({
  agents: {
    default: new BuiltInAgent({
      model: azure("your-deployment-name"),
    }),
  },
});

// Then use copilotRuntimeNodeHttpEndpoint as usual — no serviceAdapter needed
```

This works because `BuiltInAgent` already accepts `LanguageModel`
instances and `resolveModel()` passes them straight through.

## The Fix

Add an optional `getLanguageModel()` method to `CopilotServiceAdapter`.
Adapters that accept custom SDK instances (OpenAI, Anthropic, Groq) now
implement this to produce a pre-configured Vercel AI SDK `LanguageModel`
that carries the full provider configuration. `CopilotRuntime` prefers
this over the string format when creating `BuiltInAgent`.

**Backward compatible**: `getLanguageModel()` is optional on the
interface, so existing custom adapters continue to work unchanged.

| File | Change |
|------|--------|
| `service-adapter.ts` | Add optional `getLanguageModel()` to
`CopilotServiceAdapter` interface |
| `openai-adapter.ts` | Implement `getLanguageModel()` using
`createOpenAI` with the configured instance's `baseURL`/`apiKey` |
| `anthropic-adapter.ts` | Implement `getLanguageModel()` using
`createAnthropic` |
| `groq-adapter.ts` | Implement `getLanguageModel()` using
`createOpenAI` (Groq is OpenAI-compatible) |
| `copilot-runtime.ts` | Prefer `serviceAdapter.getLanguageModel()` over
string model when creating `BuiltInAgent` |
| `package.json` | Add `ai`, `@ai-sdk/openai`, `@ai-sdk/anthropic`
dependencies |

## Test plan

- [x] V2 agent tests pass (101/101)
- [x] V1 runtime build succeeds with no type errors
- [x] V1 runtime tests: same pass/fail as `main` (pre-existing failures
unrelated to this change)
- [ ] Manual: configure Azure OpenAI via `OpenAIAdapter` without
`OPENAI_API_KEY` — should work without `AI_LoadAPIKeyError`
- [ ] Manual: standard OpenAI via `OpenAIAdapter` with `OPENAI_API_KEY`
— should continue working

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-02-26 18:36:11 -04:00
Tyler Slaton 04089ecee8 chore: fix example dep not properly setup
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-02-26 11:33:49 -08:00
Jordan Ritter 3f8b5e2360 fix: propagate custom provider config from service adapters to BuiltInAgent
Service adapters (OpenAIAdapter, AnthropicAdapter, GroqAdapter) accept
custom SDK instances with provider-specific configuration (e.g. Azure
OpenAI with custom baseURL/apiKey/headers), but CopilotRuntime discards
those instances and reconstructs a plain "provider/model" string for
BuiltInAgent. The agent's resolveModel() then creates a fresh provider
using only environment variables, losing all custom configuration.

Add getLanguageModel() to CopilotServiceAdapter so adapters can produce
a pre-configured Vercel AI SDK LanguageModel. CopilotRuntime now prefers
this over the string format when creating BuiltInAgent.

Fixes CopilotKit/CopilotKit#2903
2026-02-26 11:13:08 -08:00
Brian Love 6833f0f7e3 chore(angular): version 19 2026-02-24 14:23:27 -08:00
Ran Shemtov d77f3475a6 feat: create use-interrupt hook (#3184)
Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:50:21 +01:00
Alem Tuzlak f25f182ff1 chore: migrate from husky to lefthook and fix angular tests
- Replace husky with lefthook for git hooks management
- Pre-commit runs lint --fix, format, test, and check:packages in parallel
  with auto-staging of fixes via stage_fixed
- Commit-msg runs commitlint
- Add dependsOn ^build to test target in nx.json so dependencies are
  built before tests run
- Upgrade @analogjs/vite-plugin-angular and @analogjs/vitest-angular
  from ^1.20.2 to ^2.2.3 for vite 7 compatibility
- Add pnpm packageExtensions to declare missing vite peer dependency
  on @analogjs/vite-plugin-angular
- Fix lint issues: let -> const in agent and react packages
- Disable nx TUI in pre-commit hooks via NX_TUI env var
2026-02-24 15:17:21 +01:00
Maxim 5f941db968 fix(react): add cpk prefix to ensure tailwind styles don't pollute host app 2026-02-20 18:38:44 -08:00
Alem Tuzlak 7e32e69b3b chore: fix up style generation (#3247)
Co-authored-by: Tyler Slaton <54378333+tylerslaton@users.noreply.github.com>
2026-02-20 18:21:35 -05:00
Alem Tuzlak 221584460a chore: fix css not being bundled with v1 (#3243) 2026-02-19 16:30:19 -05:00
Tyler Slaton 80418e371a fix: use workspace:* for a2ui-renderer peer dep and sync lockfile on release (#3241)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:47:09 -05:00
Maxim 412965a71a feat(react): add 'available' property to frontend tools (#3234) 2026-02-18 18:07:31 -05:00
Max Korp 980d3f5b55 docs: add v2 interface reference docs (#3197)
Also fixing some linting/build issues.

Co-authored-by: Tyler Slaton <tyler@copilotkit.ai>
2026-02-17 17:14:41 -05:00
Alem Tuzlak 98ed92c4ef Feat/speed up build system (#3213) 2026-02-17 18:34:26 +01:00
Alem Tuzlak 1d7ff130bf docs: add architecture diagram for devs (#3233) 2026-02-17 17:17:54 +01:00
Alem Tuzlak ef0f539867 feat: Added reasoning for improved information display (#3165)
Co-authored-by: Tyler Slaton <54378333+tylerslaton@users.noreply.github.com>
2026-02-17 11:11:47 +01:00
Tyler Slaton 86d0f7acfb docs: add Copilot Runtime guide across all integrations (#3219)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 22:27:10 -05:00
Alem Tuzlak 7cd968d6a6 refactor: migrate from Turborepo to Nx for task management (#3207) 2026-02-13 16:53:35 +01:00
Alem Tuzlak 7b838547a9 feat: re-architeture the monorepo setup (#3187) 2026-02-13 11:01:44 +01:00
Brian Love 9ef2ca9d7c fix(angular): frontend tools integration with core (#3192) 2026-02-12 17:57:00 -08:00
Tyler Slaton 6b7d8ef6bf feat(react): apply resource CSP domains to MCP Apps sandbox iframe (#3209)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 19:57:01 -05:00
lukasmoschitz ac641639eb feat(a2ui-renderer): replace Lit wrapper with React renderer (#3189) 2026-02-12 15:41:31 +01:00
Ran Shemtov 4886f183b3 fix: use langgraph clone fix on latest agui (#3131) 2026-01-30 16:01:31 +01:00
Max Korp d36fc1e51a feat: Add UMD builds 2026-01-29 11:49:54 -08:00
Ran Shem Tov 0af9cd58fb chore: remove langchain dependencies from examples 2026-01-29 11:27:08 -07:00
Mike Ryan 98f2a7a93e revert: migrate reactmarkdown to streamdown 2026-01-28 10:23:14 -08:00
Ran Shemtov b49277b605 fix: update all agui langgraph dependencies (#3115) 2026-01-28 16:22:04 +01:00