@copilotkit/runtime 1.5.15-next.1 → 1.5.15-next.3

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 (39) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{chunk-3QMRQQKK.mjs → chunk-EV3MMEAZ.mjs} +29 -11
  3. package/dist/chunk-EV3MMEAZ.mjs.map +1 -0
  4. package/dist/{chunk-DATHT2T2.mjs → chunk-I2OII4XX.mjs} +2 -2
  5. package/dist/{chunk-5KOKNRAO.mjs → chunk-KPOZF6JI.mjs} +2 -2
  6. package/dist/{chunk-2CH7MDMH.mjs → chunk-WPJHMQDF.mjs} +2 -2
  7. package/dist/{copilot-runtime-628cc60c.d.ts → copilot-runtime-e6c34790.d.ts} +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +23 -5
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +4 -4
  12. package/dist/lib/index.d.ts +1 -1
  13. package/dist/lib/index.js +23 -5
  14. package/dist/lib/index.js.map +1 -1
  15. package/dist/lib/index.mjs +4 -4
  16. package/dist/lib/integrations/index.d.ts +2 -2
  17. package/dist/lib/integrations/index.js +1 -1
  18. package/dist/lib/integrations/index.js.map +1 -1
  19. package/dist/lib/integrations/index.mjs +4 -4
  20. package/dist/lib/integrations/nest/index.d.ts +1 -1
  21. package/dist/lib/integrations/nest/index.js +1 -1
  22. package/dist/lib/integrations/nest/index.js.map +1 -1
  23. package/dist/lib/integrations/nest/index.mjs +2 -2
  24. package/dist/lib/integrations/node-express/index.d.ts +1 -1
  25. package/dist/lib/integrations/node-express/index.js +1 -1
  26. package/dist/lib/integrations/node-express/index.js.map +1 -1
  27. package/dist/lib/integrations/node-express/index.mjs +2 -2
  28. package/dist/lib/integrations/node-http/index.d.ts +1 -1
  29. package/dist/lib/integrations/node-http/index.js +1 -1
  30. package/dist/lib/integrations/node-http/index.js.map +1 -1
  31. package/dist/lib/integrations/node-http/index.mjs +1 -1
  32. package/package.json +2 -2
  33. package/src/lib/runtime/copilot-runtime.ts +10 -0
  34. package/src/lib/runtime/remote-actions.ts +1 -1
  35. package/src/lib/runtime/remote-lg-action.ts +11 -2
  36. package/dist/chunk-3QMRQQKK.mjs.map +0 -1
  37. /package/dist/{chunk-DATHT2T2.mjs.map → chunk-I2OII4XX.mjs.map} +0 -0
  38. /package/dist/{chunk-5KOKNRAO.mjs.map → chunk-KPOZF6JI.mjs.map} +0 -0
  39. /package/dist/{chunk-2CH7MDMH.mjs.map → chunk-WPJHMQDF.mjs.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-3QMRQQKK.mjs";
5
+ } from "./chunk-EV3MMEAZ.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-44O2JGUY.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
22
22
  export {
23
23
  copilotRuntimeNestEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-2CH7MDMH.mjs.map
25
+ //# sourceMappingURL=chunk-WPJHMQDF.mjs.map
@@ -60,7 +60,7 @@ interface LangGraphPlatformAgent {
60
60
  }
61
61
  interface LangGraphPlatformEndpoint extends BaseEndpointDefinition<EndpointType.LangGraphPlatform> {
62
62
  deploymentUrl: string;
63
- langsmithApiKey: string;
63
+ langsmithApiKey?: string;
64
64
  agents: LangGraphPlatformAgent[];
65
65
  }
66
66
 
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 langGraphPlatformEndpoint, r as resolveEndpointType } from './copilot-runtime-628cc60c.js';
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 langGraphPlatformEndpoint, r as resolveEndpointType } from './copilot-runtime-e6c34790.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-acb6ed0b.js';
3
3
  export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './lib/integrations/index.js';
4
4
  export { copilotRuntimeNodeHttpEndpoint } from './lib/integrations/node-http/index.js';
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.5.15-next.1",
47
+ version: "1.5.15-next.3",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -1869,13 +1869,19 @@ async function execute(args) {
1869
1869
  __name(execute, "execute");
1870
1870
  async function streamEvents(controller, args) {
1871
1871
  var _a, _b, _c, _d, _e, _f;
1872
- const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2 } = args;
1872
+ const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2, properties } = args;
1873
1873
  let nodeName = initialNodeName;
1874
1874
  let state = initialState;
1875
1875
  const { name, assistantId: initialAssistantId } = agent;
1876
+ const propertyHeaders = properties.authorization ? {
1877
+ authorization: `Bearer ${properties.authorization}`
1878
+ } : null;
1876
1879
  const client = new import_langgraph_sdk.Client({
1877
1880
  apiUrl: deploymentUrl,
1878
- apiKey: langsmithApiKey
1881
+ apiKey: langsmithApiKey,
1882
+ defaultHeaders: {
1883
+ ...propertyHeaders
1884
+ }
1879
1885
  });
1880
1886
  let threadId = argsInitialThreadId ?? (0, import_shared10.randomUUID)();
1881
1887
  if (argsInitialThreadId && argsInitialThreadId.startsWith("ck-")) {
@@ -3311,9 +3317,15 @@ please use an LLM adapter instead.`
3311
3317
  const agents = this.remoteEndpointDefinitions.reduce(async (acc, endpoint) => {
3312
3318
  const agents2 = await acc;
3313
3319
  if (endpoint.type === EndpointType.LangGraphPlatform) {
3320
+ const propertyHeaders = graphqlContext.properties.authorization ? {
3321
+ authorization: `Bearer ${graphqlContext.properties.authorization}`
3322
+ } : null;
3314
3323
  const client = new import_langgraph_sdk2.Client({
3315
3324
  apiUrl: endpoint.deploymentUrl,
3316
- apiKey: endpoint.langsmithApiKey
3325
+ apiKey: endpoint.langsmithApiKey,
3326
+ defaultHeaders: {
3327
+ ...propertyHeaders
3328
+ }
3317
3329
  });
3318
3330
  const data = await client.assistants.search();
3319
3331
  const endpointAgents = (data ?? []).map((entry) => ({
@@ -3376,9 +3388,15 @@ please use an LLM adapter instead.`
3376
3388
  }
3377
3389
  const headers = createHeaders(null, graphqlContext);
3378
3390
  if (agentWithEndpoint.endpoint.type === EndpointType.LangGraphPlatform) {
3391
+ const propertyHeaders = graphqlContext.properties.authorization ? {
3392
+ authorization: `Bearer ${graphqlContext.properties.authorization}`
3393
+ } : null;
3379
3394
  const client = new import_langgraph_sdk2.Client({
3380
3395
  apiUrl: agentWithEndpoint.endpoint.deploymentUrl,
3381
- apiKey: agentWithEndpoint.endpoint.langsmithApiKey
3396
+ apiKey: agentWithEndpoint.endpoint.langsmithApiKey,
3397
+ defaultHeaders: {
3398
+ ...propertyHeaders
3399
+ }
3382
3400
  });
3383
3401
  let state = {};
3384
3402
  try {