@copilotkit/runtime 1.6.0 → 1.7.0-next.1

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 (50) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +75 -0
  3. package/dist/{chunk-WUMAYJP3.mjs → chunk-D6YNY2XB.mjs} +2 -2
  4. package/dist/chunk-PTC5JN3P.mjs +1 -0
  5. package/dist/{chunk-DUW72ZZB.mjs → chunk-QTRO3GPV.mjs} +206 -70
  6. package/dist/chunk-QTRO3GPV.mjs.map +1 -0
  7. package/dist/{chunk-MPI4JZZR.mjs → chunk-QZ6X33MR.mjs} +2 -2
  8. package/dist/{chunk-2RP2NR4F.mjs → chunk-RQS3BGAT.mjs} +2 -2
  9. package/dist/{copilot-runtime-15bfc4f4.d.ts → copilot-runtime-5103c7e7.d.ts} +66 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +206 -69
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +7 -5
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/lib/index.d.ts +1 -1
  16. package/dist/lib/index.js +206 -69
  17. package/dist/lib/index.js.map +1 -1
  18. package/dist/lib/index.mjs +7 -5
  19. package/dist/lib/integrations/index.d.ts +2 -2
  20. package/dist/lib/integrations/index.js +4 -1
  21. package/dist/lib/integrations/index.js.map +1 -1
  22. package/dist/lib/integrations/index.mjs +4 -4
  23. package/dist/lib/integrations/nest/index.d.ts +1 -1
  24. package/dist/lib/integrations/nest/index.js +4 -1
  25. package/dist/lib/integrations/nest/index.js.map +1 -1
  26. package/dist/lib/integrations/nest/index.mjs +2 -2
  27. package/dist/lib/integrations/node-express/index.d.ts +1 -1
  28. package/dist/lib/integrations/node-express/index.js +4 -1
  29. package/dist/lib/integrations/node-express/index.js.map +1 -1
  30. package/dist/lib/integrations/node-express/index.mjs +2 -2
  31. package/dist/lib/integrations/node-http/index.d.ts +1 -1
  32. package/dist/lib/integrations/node-http/index.js +4 -1
  33. package/dist/lib/integrations/node-http/index.js.map +1 -1
  34. package/dist/lib/integrations/node-http/index.mjs +1 -1
  35. package/package.json +2 -2
  36. package/src/graphql/resolvers/copilot.resolver.ts +4 -0
  37. package/src/lib/index.ts +1 -0
  38. package/src/lib/logger.ts +48 -0
  39. package/src/lib/runtime/__tests__/remote-action-constructors.test.ts +45 -35
  40. package/src/lib/runtime/copilot-runtime.ts +176 -16
  41. package/src/lib/runtime/remote-action-constructors.ts +28 -68
  42. package/src/lib/runtime/remote-actions.ts +5 -5
  43. package/src/lib/streaming.ts +59 -0
  44. package/src/service-adapters/events.ts +3 -3
  45. package/dist/chunk-DFOKBSIS.mjs +0 -1
  46. package/dist/chunk-DUW72ZZB.mjs.map +0 -1
  47. /package/dist/{chunk-WUMAYJP3.mjs.map → chunk-D6YNY2XB.mjs.map} +0 -0
  48. /package/dist/{chunk-DFOKBSIS.mjs.map → chunk-PTC5JN3P.mjs.map} +0 -0
  49. /package/dist/{chunk-MPI4JZZR.mjs.map → chunk-QZ6X33MR.mjs.map} +0 -0
  50. /package/dist/{chunk-2RP2NR4F.mjs.map → chunk-RQS3BGAT.mjs.map} +0 -0
@@ -1,15 +1,15 @@
1
- import "../chunk-DFOKBSIS.mjs";
1
+ import "../chunk-PTC5JN3P.mjs";
2
2
  import {
3
3
  config,
4
4
  copilotRuntimeNextJSAppRouterEndpoint,
5
5
  copilotRuntimeNextJSPagesRouterEndpoint
6
- } from "../chunk-WUMAYJP3.mjs";
6
+ } from "../chunk-D6YNY2XB.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "../chunk-MPI4JZZR.mjs";
9
+ } from "../chunk-QZ6X33MR.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "../chunk-2RP2NR4F.mjs";
12
+ } from "../chunk-RQS3BGAT.mjs";
13
13
  import {
14
14
  CopilotRuntime,
15
15
  addCustomHeaderPlugin,
@@ -17,11 +17,12 @@ import {
17
17
  copilotKitEndpoint,
18
18
  copilotRuntimeNodeHttpEndpoint,
19
19
  createContext,
20
+ createLogger,
20
21
  flattenToolCallsNoDuplicates,
21
22
  getCommonConfig,
22
23
  langGraphPlatformEndpoint,
23
24
  resolveEndpointType
24
- } from "../chunk-DUW72ZZB.mjs";
25
+ } from "../chunk-QTRO3GPV.mjs";
25
26
  import {
26
27
  GoogleGenerativeAIAdapter,
27
28
  GroqAdapter,
@@ -52,6 +53,7 @@ export {
52
53
  copilotRuntimeNodeExpressEndpoint,
53
54
  copilotRuntimeNodeHttpEndpoint,
54
55
  createContext,
56
+ createLogger,
55
57
  flattenToolCallsNoDuplicates,
56
58
  getCommonConfig,
57
59
  langGraphPlatformEndpoint,
@@ -1,5 +1,5 @@
1
- import { e as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-15bfc4f4.js';
2
- export { i as CommonConfig, d as CopilotRequestContextProperties, b as addCustomHeaderPlugin, h as buildSchema, g as createContext, j as getCommonConfig } from '../../copilot-runtime-15bfc4f4.js';
1
+ import { e as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-5103c7e7.js';
2
+ export { i as CommonConfig, d as CopilotRequestContextProperties, b as addCustomHeaderPlugin, h as buildSchema, g as createContext, j as getCommonConfig } from '../../copilot-runtime-5103c7e7.js';
3
3
  import * as graphql_yoga from 'graphql-yoga';
4
4
  import { YogaServerInstance } from 'graphql-yoga';
5
5
  export { copilotRuntimeNodeHttpEndpoint } from './node-http/index.js';
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.6.0",
47
+ version: "1.7.0-next.1",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -2001,6 +2001,9 @@ var CopilotResolver = class {
2001
2001
  resolveOutputMessagesPromise = resolve;
2002
2002
  rejectOutputMessagesPromise = reject;
2003
2003
  });
2004
+ if (copilotCloudPublicApiKey) {
2005
+ ctx.properties["copilotCloudPublicApiKey"] = copilotCloudPublicApiKey;
2006
+ }
2004
2007
  logger2.debug("Processing");
2005
2008
  const { eventSource, threadId = (0, import_shared5.randomId)(), runId, serverSideActions, actionInputsWithoutAgents, extensions } = await copilotRuntime.processRuntimeRequest({
2006
2009
  serviceAdapter,