@copilotkit/runtime 1.51.4-next.7 → 1.51.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +0 -2
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +1 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +1 -2
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/langgraph.js.map +1 -1
  9. package/dist/langgraph.mjs.map +1 -1
  10. package/package.json +9 -10
  11. package/scripts/generate-gql-schema.ts +4 -1
  12. package/src/agents/langgraph/event-source.ts +54 -18
  13. package/src/agents/langgraph/events.ts +21 -4
  14. package/src/graphql/message-conversion/agui-to-gql.test.ts +49 -17
  15. package/src/graphql/message-conversion/agui-to-gql.ts +53 -16
  16. package/src/graphql/message-conversion/gql-to-agui.test.ts +98 -25
  17. package/src/graphql/message-conversion/gql-to-agui.ts +30 -11
  18. package/src/graphql/message-conversion/roundtrip-conversion.test.ts +53 -18
  19. package/src/graphql/resolvers/copilot.resolver.ts +195 -119
  20. package/src/graphql/resolvers/state.resolver.ts +4 -1
  21. package/src/graphql/types/converted/index.ts +10 -3
  22. package/src/graphql/types/copilot-response.type.ts +4 -1
  23. package/src/graphql/types/message-status.type.ts +8 -2
  24. package/src/graphql/types/meta-events.type.ts +9 -2
  25. package/src/graphql/types/response-status.type.ts +13 -2
  26. package/src/lib/error-messages.ts +18 -7
  27. package/src/lib/integrations/nest/index.ts +10 -3
  28. package/src/lib/integrations/nextjs/app-router.ts +10 -3
  29. package/src/lib/integrations/nextjs/pages-router.ts +7 -2
  30. package/src/lib/integrations/node-express/index.ts +10 -3
  31. package/src/lib/integrations/node-http/index.ts +39 -11
  32. package/src/lib/integrations/node-http/request-handler.ts +25 -8
  33. package/src/lib/integrations/shared.ts +15 -4
  34. package/src/lib/logger.ts +4 -1
  35. package/src/lib/observability.ts +9 -2
  36. package/src/lib/runtime/__tests__/copilot-runtime-error.test.ts +19 -5
  37. package/src/lib/runtime/__tests__/mcp-tools-utils.test.ts +10 -4
  38. package/src/lib/runtime/agent-integrations/langgraph/agent.ts +45 -12
  39. package/src/lib/runtime/agent-integrations/langgraph/consts.ts +4 -1
  40. package/src/lib/runtime/copilot-runtime.ts +137 -79
  41. package/src/lib/runtime/mcp-tools-utils.ts +66 -42
  42. package/src/lib/runtime/retry-utils.ts +7 -2
  43. package/src/lib/runtime/telemetry-agent-runner.ts +17 -5
  44. package/src/lib/runtime/types.ts +1 -2
  45. package/src/lib/runtime/utils.ts +9 -3
  46. package/src/lib/streaming.ts +25 -7
  47. package/src/lib/telemetry-client.ts +3 -1
  48. package/src/service-adapters/anthropic/anthropic-adapter.ts +64 -18
  49. package/src/service-adapters/anthropic/utils.ts +11 -3
  50. package/src/service-adapters/conversion.ts +3 -1
  51. package/src/service-adapters/events.ts +54 -11
  52. package/src/service-adapters/experimental/ollama/ollama-adapter.ts +3 -3
  53. package/src/service-adapters/google/google-genai-adapter.test.ts +5 -1
  54. package/src/service-adapters/google/google-genai-adapter.ts +10 -3
  55. package/src/service-adapters/groq/groq-adapter.ts +16 -5
  56. package/src/service-adapters/langchain/langchain-adapter.ts +3 -1
  57. package/src/service-adapters/langchain/types.ts +9 -3
  58. package/src/service-adapters/langchain/utils.ts +25 -8
  59. package/src/service-adapters/openai/openai-adapter.ts +16 -5
  60. package/src/service-adapters/openai/openai-assistant-adapter.ts +67 -24
  61. package/src/service-adapters/openai/utils.ts +9 -3
  62. package/src/service-adapters/shared/error-utils.ts +4 -1
  63. package/src/service-adapters/unify/unify-adapter.ts +20 -6
  64. package/tests/service-adapters/anthropic/allowlist-approach.test.ts +50 -11
  65. package/tests/service-adapters/anthropic/anthropic-adapter.test.ts +14 -3
  66. package/tests/service-adapters/openai/allowlist-approach.test.ts +79 -17
  67. package/tests/service-adapters/openai/openai-adapter.test.ts +6 -1
  68. package/tsconfig.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.51.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 8d67519: fix: propagate agent error messages into RUN_ERROR events
8
+ - 4886f18: fix: use langgraph clone fix on latest agui
9
+ - @copilotkit/shared@1.51.4
10
+ - @copilotkitnext/agent@1.51.4
11
+ - @copilotkitnext/runtime@1.51.4
12
+
13
+ ## 1.51.4-next.8
14
+
15
+ ### Patch Changes
16
+
17
+ - @copilotkit/shared@1.51.4-next.8
18
+ - @copilotkitnext/agent@1.51.4-next.8
19
+ - @copilotkitnext/runtime@1.51.4-next.8
20
+
3
21
  ## 1.51.4-next.7
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -37,7 +37,6 @@
37
37
 
38
38
  <img src="https://github.com/user-attachments/assets/3b810240-e9f8-43ae-acec-31a58095e223" alt="headless-ui" style="border-radius: 12px; border: 2px solid #d6d4fa;">
39
39
 
40
-
41
40
  ## 🏆 Featured Examples
42
41
 
43
42
  <p align="center">
@@ -56,7 +55,6 @@
56
55
 
57
56
  To get started with CopilotKit, please check out the [documentation](https://docs.copilotkit.ai).
58
57
 
59
-
60
58
  ## Analytics & Privacy
61
59
 
62
60
  CopilotKit uses [Scarf](https://scarf.sh) for anonymous usage analytics to help improve the product. Scarf handles all privacy compliance and does not store raw IP addresses. This helps us understand how CopilotKit is being used and prioritize improvements.
package/dist/index.d.ts CHANGED
@@ -287,7 +287,7 @@ declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
287
287
  messageId: string;
288
288
  parentMessageId?: string;
289
289
  }): void;
290
- sendTextMessageContent({ messageId, content }: {
290
+ sendTextMessageContent({ messageId, content, }: {
291
291
  messageId: string;
292
292
  content: string;
293
293
  }): void;
package/dist/index.js CHANGED
@@ -72,7 +72,7 @@ var require_package = __commonJS({
72
72
  publishConfig: {
73
73
  access: "public"
74
74
  },
75
- version: "1.51.4-next.7",
75
+ version: "1.51.4",
76
76
  sideEffects: false,
77
77
  main: "./dist/index.js",
78
78
  module: "./dist/index.mjs",
@@ -100,7 +100,6 @@ var require_package = __commonJS({
100
100
  dev: 'tsup --watch --onSuccess "pnpm run generate-graphql-schema"',
101
101
  test: "jest --passWithNoTests",
102
102
  "check-types": "tsc --noEmit",
103
- clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__",
104
103
  "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts",
105
104
  "link:global": "pnpm link --global",
106
105
  "unlink:global": "pnpm unlink --global"