@copilotkit/runtime 1.3.12-feat-langgraph-cloud-release-alpha.0 → 1.3.12-fix-tool-call-dynamic-parameters.0

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 (56) hide show
  1. package/CHANGELOG.md +4 -3
  2. package/dist/{chunk-7MQDBRXJ.mjs → chunk-24WEOOFX.mjs} +2 -2
  3. package/dist/{chunk-RKGJG3QX.mjs → chunk-AOYYOKTP.mjs} +133 -556
  4. package/dist/chunk-AOYYOKTP.mjs.map +1 -0
  5. package/dist/{chunk-6A7HQSQE.mjs → chunk-HKLL7TTP.mjs} +2 -2
  6. package/dist/{chunk-Z5LICW7Z.mjs → chunk-OSJXQNII.mjs} +9 -36
  7. package/dist/chunk-OSJXQNII.mjs.map +1 -0
  8. package/dist/{chunk-BPLF4QB2.mjs → chunk-SIMJ6TZU.mjs} +2 -2
  9. package/dist/{chunk-IPCABAGS.mjs → chunk-UYORVPCQ.mjs} +2 -2
  10. package/dist/{chunk-V7SK6QZN.mjs → chunk-ZEHCLFJ2.mjs} +9 -6
  11. package/dist/chunk-ZEHCLFJ2.mjs.map +1 -0
  12. package/dist/{copilot-runtime-aba7d4b4.d.ts → copilot-runtime-df3527ad.d.ts} +5 -27
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +186 -633
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +9 -13
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/lib/index.d.ts +1 -1
  19. package/dist/lib/index.js +186 -633
  20. package/dist/lib/index.js.map +1 -1
  21. package/dist/lib/index.mjs +9 -13
  22. package/dist/lib/integrations/index.d.ts +2 -2
  23. package/dist/lib/integrations/index.js +4 -5
  24. package/dist/lib/integrations/index.js.map +1 -1
  25. package/dist/lib/integrations/index.mjs +5 -5
  26. package/dist/lib/integrations/nest/index.d.ts +1 -1
  27. package/dist/lib/integrations/nest/index.js +4 -5
  28. package/dist/lib/integrations/nest/index.js.map +1 -1
  29. package/dist/lib/integrations/nest/index.mjs +3 -3
  30. package/dist/lib/integrations/node-express/index.d.ts +1 -1
  31. package/dist/lib/integrations/node-express/index.js +4 -5
  32. package/dist/lib/integrations/node-express/index.js.map +1 -1
  33. package/dist/lib/integrations/node-express/index.mjs +3 -3
  34. package/dist/lib/integrations/node-http/index.d.ts +1 -1
  35. package/dist/lib/integrations/node-http/index.js +4 -5
  36. package/dist/lib/integrations/node-http/index.js.map +1 -1
  37. package/dist/lib/integrations/node-http/index.mjs +2 -2
  38. package/dist/service-adapters/index.js +8 -5
  39. package/dist/service-adapters/index.js.map +1 -1
  40. package/dist/service-adapters/index.mjs +2 -2
  41. package/package.json +6 -7
  42. package/src/agents/langgraph/event-source.ts +67 -22
  43. package/src/lib/runtime/copilot-runtime.ts +11 -58
  44. package/src/lib/runtime/remote-actions.ts +159 -65
  45. package/src/service-adapters/events.ts +5 -1
  46. package/src/service-adapters/langchain/utils.test.ts +169 -0
  47. package/src/service-adapters/langchain/utils.ts +10 -5
  48. package/dist/chunk-RKGJG3QX.mjs.map +0 -1
  49. package/dist/chunk-V7SK6QZN.mjs.map +0 -1
  50. package/dist/chunk-Z5LICW7Z.mjs.map +0 -1
  51. package/src/lib/runtime/remote-action-constructors.ts +0 -281
  52. package/src/lib/runtime/remote-lg-cloud-action.ts +0 -438
  53. /package/dist/{chunk-7MQDBRXJ.mjs.map → chunk-24WEOOFX.mjs.map} +0 -0
  54. /package/dist/{chunk-6A7HQSQE.mjs.map → chunk-HKLL7TTP.mjs.map} +0 -0
  55. /package/dist/{chunk-BPLF4QB2.mjs.map → chunk-SIMJ6TZU.mjs.map} +0 -0
  56. /package/dist/{chunk-IPCABAGS.mjs.map → chunk-UYORVPCQ.mjs.map} +0 -0
@@ -42,32 +42,14 @@ declare class AgentStateInput {
42
42
  state: string;
43
43
  }
44
44
 
45
- type EndpointDefinition = CopilotKitEndpoint | LangGraphCloudEndpoint;
46
- declare enum EndpointType {
47
- CopilotKit = "copilotKit",
48
- LangGraphCloud = "langgraph-cloud"
49
- }
50
- interface BaseEndpointDefinition<TActionType extends EndpointType> {
51
- type?: TActionType;
52
- }
53
- interface CopilotKitEndpoint extends BaseEndpointDefinition<EndpointType.CopilotKit> {
45
+ type RemoteActionDefinition = {
54
46
  url: string;
55
47
  onBeforeRequest?: ({ ctx }: {
56
48
  ctx: GraphQLContext;
57
49
  }) => {
58
50
  headers?: Record<string, string> | undefined;
59
51
  };
60
- }
61
- interface LangGraphCloudAgent {
62
- name: string;
63
- description: string;
64
- assistantId?: string;
65
- }
66
- interface LangGraphCloudEndpoint extends BaseEndpointDefinition<EndpointType.LangGraphCloud> {
67
- deploymentUrl: string;
68
- langsmithApiKey: string;
69
- agents: LangGraphCloudAgent[];
70
- }
52
+ };
71
53
 
72
54
  declare class AgentSessionInput {
73
55
  agentName: string;
@@ -166,13 +148,12 @@ interface CopilotRuntimeConstructorParams<T extends Parameter[] | [] = []> {
166
148
  */
167
149
  middleware?: Middleware;
168
150
  actions?: ActionsConfiguration<T>;
169
- remoteActions?: EndpointDefinition[];
170
- remoteEndpoints?: EndpointDefinition[];
151
+ remoteActions?: RemoteActionDefinition[];
171
152
  langserve?: RemoteChainParameters[];
172
153
  }
173
154
  declare class CopilotRuntime<const T extends Parameter[] | [] = []> {
174
155
  actions: ActionsConfiguration<T>;
175
- private remoteEndpointDefinitions;
156
+ private remoteActionDefinitions;
176
157
  private langserve;
177
158
  private onBeforeRequest?;
178
159
  private onAfterRequest?;
@@ -180,10 +161,7 @@ declare class CopilotRuntime<const T extends Parameter[] | [] = []> {
180
161
  processRuntimeRequest(request: CopilotRuntimeRequest): Promise<CopilotRuntimeResponse>;
181
162
  private processAgentRequest;
182
163
  private getServerSideActions;
183
- private resolveEndpointType;
184
164
  }
185
165
  declare function flattenToolCallsNoDuplicates(toolsByPriority: ActionInput[]): ActionInput[];
186
- declare function copilotKitEndpoint(config: Omit<CopilotKitEndpoint, "type">): CopilotKitEndpoint;
187
- declare function langGraphCloudEndpoint(config: Omit<LangGraphCloudEndpoint, "type">): LangGraphCloudEndpoint;
188
166
 
189
- export { CopilotRuntimeConstructorParams as C, GraphQLContext as G, CopilotRuntime as a, CopilotRequestContextProperties as b, copilotKitEndpoint as c, CreateCopilotRuntimeServerOptions as d, createContext as e, flattenToolCallsNoDuplicates as f, buildSchema as g, CommonConfig as h, getCommonConfig as i, langGraphCloudEndpoint as l };
167
+ export { CopilotRuntimeConstructorParams as C, GraphQLContext as G, CopilotRuntime as a, CopilotRequestContextProperties as b, CreateCopilotRuntimeServerOptions as c, createContext as d, buildSchema as e, flattenToolCallsNoDuplicates as f, CommonConfig as g, getCommonConfig as h };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphCloudEndpoint } from './copilot-runtime-aba7d4b4.js';
1
+ export { g as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, c as CreateCopilotRuntimeServerOptions, G as GraphQLContext, e as buildSchema, d as createContext, f as flattenToolCallsNoDuplicates, h as getCommonConfig } from './copilot-runtime-df3527ad.js';
2
2
  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-b122e71f.js';
3
3
  export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './lib/integrations/index.js';
4
4
  export { copilotRuntimeNodeHttpEndpoint } from './lib/integrations/node-http/index.js';