@copilotkit/runtime 1.9.2-next.8 → 1.9.2-next.9

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 (78) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{chunk-IIXJVVTV.mjs → chunk-4JBKY7XT.mjs} +109 -75
  3. package/dist/chunk-4JBKY7XT.mjs.map +1 -0
  4. package/dist/{chunk-JWPSIGSA.mjs → chunk-5YGKE5SN.mjs} +2 -2
  5. package/dist/{chunk-5SG4WWXH.mjs → chunk-ALZ5H3VD.mjs} +2 -2
  6. package/dist/chunk-AMUJQ6IR.mjs +50 -0
  7. package/dist/chunk-AMUJQ6IR.mjs.map +1 -0
  8. package/dist/{chunk-KYCDL2KX.mjs → chunk-SMDVD4VG.mjs} +2 -2
  9. package/dist/{chunk-4TLMVLU4.mjs → chunk-UUXRYAB4.mjs} +2 -2
  10. package/dist/{chunk-5BIEM2UU.mjs → chunk-XWBDEXDA.mjs} +4 -3
  11. package/dist/{chunk-5BIEM2UU.mjs.map → chunk-XWBDEXDA.mjs.map} +1 -1
  12. package/dist/{chunk-WIXS6EG7.mjs → chunk-Z5GYTKMD.mjs} +2304 -2034
  13. package/dist/chunk-Z5GYTKMD.mjs.map +1 -0
  14. package/dist/{groq-adapter-25a2bd35.d.ts → groq-adapter-172a2ca4.d.ts} +1 -1
  15. package/dist/index.d.ts +4 -3
  16. package/dist/index.js +3280 -2932
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +12 -8
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/lib/index.d.ts +3 -3
  21. package/dist/lib/index.js +2828 -2480
  22. package/dist/lib/index.js.map +1 -1
  23. package/dist/lib/index.mjs +9 -8
  24. package/dist/lib/integrations/index.d.ts +3 -3
  25. package/dist/lib/integrations/index.js +141 -86
  26. package/dist/lib/integrations/index.js.map +1 -1
  27. package/dist/lib/integrations/index.mjs +7 -6
  28. package/dist/lib/integrations/nest/index.d.ts +2 -2
  29. package/dist/lib/integrations/nest/index.js +141 -86
  30. package/dist/lib/integrations/nest/index.js.map +1 -1
  31. package/dist/lib/integrations/nest/index.mjs +5 -4
  32. package/dist/lib/integrations/node-express/index.d.ts +2 -2
  33. package/dist/lib/integrations/node-express/index.js +141 -86
  34. package/dist/lib/integrations/node-express/index.js.map +1 -1
  35. package/dist/lib/integrations/node-express/index.mjs +5 -4
  36. package/dist/lib/integrations/node-http/index.d.ts +2 -2
  37. package/dist/lib/integrations/node-http/index.js +141 -86
  38. package/dist/lib/integrations/node-http/index.js.map +1 -1
  39. package/dist/lib/integrations/node-http/index.mjs +4 -3
  40. package/dist/service-adapters/index.d.ts +5 -4
  41. package/dist/service-adapters/index.js +179 -104
  42. package/dist/service-adapters/index.js.map +1 -1
  43. package/dist/service-adapters/index.mjs +6 -2
  44. package/dist/service-adapters/shared/index.d.ts +9 -0
  45. package/dist/service-adapters/shared/index.js +72 -0
  46. package/dist/service-adapters/shared/index.js.map +1 -0
  47. package/dist/service-adapters/shared/index.mjs +8 -0
  48. package/dist/service-adapters/shared/index.mjs.map +1 -0
  49. package/dist/{shared-941d59dc.d.ts → shared-bd953ebf.d.ts} +8 -4
  50. package/dist/utils/index.d.ts +17 -1
  51. package/dist/utils/index.js +3 -2
  52. package/dist/utils/index.js.map +1 -1
  53. package/dist/utils/index.mjs +1 -1
  54. package/package.json +2 -2
  55. package/src/agents/langgraph/event-source.ts +36 -38
  56. package/src/agents/langgraph/events.ts +19 -1
  57. package/src/graphql/resolvers/copilot.resolver.ts +84 -40
  58. package/src/lib/error-messages.ts +200 -0
  59. package/src/lib/integrations/shared.ts +43 -0
  60. package/src/lib/runtime/copilot-runtime.ts +56 -48
  61. package/src/lib/runtime/remote-action-constructors.ts +28 -3
  62. package/src/lib/runtime/remote-lg-action.ts +85 -3
  63. package/src/lib/streaming.ts +125 -36
  64. package/src/service-adapters/anthropic/anthropic-adapter.ts +3 -4
  65. package/src/service-adapters/events.ts +37 -81
  66. package/src/service-adapters/groq/groq-adapter.ts +66 -56
  67. package/src/service-adapters/index.ts +1 -0
  68. package/src/service-adapters/openai/openai-adapter.ts +18 -3
  69. package/src/service-adapters/shared/error-utils.ts +61 -0
  70. package/src/service-adapters/shared/index.ts +1 -0
  71. package/src/utils/failed-response-status-reasons.ts +23 -1
  72. package/dist/chunk-IIXJVVTV.mjs.map +0 -1
  73. package/dist/chunk-WIXS6EG7.mjs.map +0 -1
  74. package/dist/{chunk-JWPSIGSA.mjs.map → chunk-5YGKE5SN.mjs.map} +0 -0
  75. package/dist/{chunk-5SG4WWXH.mjs.map → chunk-ALZ5H3VD.mjs.map} +0 -0
  76. package/dist/{chunk-KYCDL2KX.mjs.map → chunk-SMDVD4VG.mjs.map} +0 -0
  77. package/dist/{chunk-4TLMVLU4.mjs.map → chunk-UUXRYAB4.mjs.map} +0 -0
  78. package/dist/{langserve-4a5c9217.d.ts → langserve-fc5cac89.d.ts} +7 -7
@@ -1,5 +1,5 @@
1
1
  import OpenAI from 'openai';
2
- import { b as CopilotServiceAdapter, C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse } from './langserve-4a5c9217.js';
2
+ import { b as CopilotServiceAdapter, C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse } from './langserve-fc5cac89.js';
3
3
  import { BaseMessageChunk, AIMessage, AIMessageChunk, BaseMessage } from '@langchain/core/messages';
4
4
  import { DynamicStructuredTool } from '@langchain/core/tools';
5
5
  import { IterableReadableStream, IterableReadableStreamInterface } from '@langchain/core/utils/stream';
package/dist/index.d.ts CHANGED
@@ -1,12 +1,13 @@
1
- export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from './groq-adapter-25a2bd35.js';
2
- export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, o as MCPClient, p as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, s as convertMCPToolsToActions, m as copilotKitEndpoint, c as createContext, h as createLogger, q as extractParametersFromSchema, l as flattenToolCallsNoDuplicates, t as generateMcpToolInstructions, g as getCommonConfig, n as langGraphPlatformEndpoint, r as resolveEndpointType } from './shared-941d59dc.js';
1
+ export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from './groq-adapter-172a2ca4.js';
2
+ export { e as CommonConfig, C as CopilotRequestContextProperties, k as CopilotRuntime, j as CopilotRuntimeConstructorParams, f as CopilotRuntimeLogger, i as CopilotRuntimeRequest, b as CreateCopilotRuntimeServerOptions, G as GraphQLContext, L as LogLevel, o as MCPClient, p as MCPEndpointConfig, M as MCPTool, a as addCustomHeaderPlugin, d as buildSchema, s as convertMCPToolsToActions, m as copilotKitEndpoint, c as createContext, h as createLogger, q as extractParametersFromSchema, l as flattenToolCallsNoDuplicates, t as generateMcpToolInstructions, g as getCommonConfig, n as langGraphPlatformEndpoint, r as resolveEndpointType } from './shared-bd953ebf.js';
3
3
  export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './lib/integrations/index.js';
4
4
  export { copilotRuntimeNodeHttpEndpoint } from './lib/integrations/node-http/index.js';
5
5
  export { copilotRuntimeNodeExpressEndpoint } from './lib/integrations/node-express/index.js';
6
6
  export { copilotRuntimeNestEndpoint } from './lib/integrations/nest/index.js';
7
7
  export { CustomEventNames, LangGraphAgent, PredictStateTool, State, TextMessageEvents, ToolCallEvents } from './lib/index.js';
8
8
  export { GuardrailsValidationFailureResponse, MessageStreamInterruptedResponse, UnknownErrorResponse } from './utils/index.js';
9
- export { C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse, b as CopilotServiceAdapter, c as RemoteChain, R as RemoteChainParameters } from './langserve-4a5c9217.js';
9
+ export { C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse, b as CopilotServiceAdapter, c as RemoteChain, R as RemoteChainParameters } from './langserve-fc5cac89.js';
10
+ export { convertServiceAdapterError } from './service-adapters/shared/index.js';
10
11
  export { AnthropicAdapter, AnthropicAdapterParams, BedrockAdapter, BedrockAdapterParams, EmptyAdapter, ExperimentalEmptyAdapter, ExperimentalOllamaAdapter } from './service-adapters/index.js';
11
12
  import 'openai';
12
13
  import '@langchain/core/messages';