@copilotkit/runtime 1.50.0-beta.1 → 1.50.0-beta.10

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 (132) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/dist/chunk-2OZAGFV3.mjs +43 -0
  3. package/dist/chunk-2OZAGFV3.mjs.map +1 -0
  4. package/dist/chunk-62NE5S6M.mjs +226 -0
  5. package/dist/chunk-62NE5S6M.mjs.map +1 -0
  6. package/dist/chunk-6XRUR5UK.mjs +1 -0
  7. package/dist/chunk-6XRUR5UK.mjs.map +1 -0
  8. package/dist/chunk-AMUJQ6IR.mjs +50 -0
  9. package/dist/chunk-AMUJQ6IR.mjs.map +1 -0
  10. package/dist/chunk-BJEYMRDD.mjs +25 -0
  11. package/dist/chunk-BJEYMRDD.mjs.map +1 -0
  12. package/dist/chunk-DZV4ZIAR.mjs +3063 -0
  13. package/dist/chunk-DZV4ZIAR.mjs.map +1 -0
  14. package/dist/chunk-FHD4JECV.mjs +33 -0
  15. package/dist/chunk-FHD4JECV.mjs.map +1 -0
  16. package/dist/chunk-FMU55SEU.mjs +25 -0
  17. package/dist/chunk-FMU55SEU.mjs.map +1 -0
  18. package/dist/chunk-OWIGJONH.mjs +275 -0
  19. package/dist/chunk-OWIGJONH.mjs.map +1 -0
  20. package/dist/chunk-SBCOROE4.mjs +1112 -0
  21. package/dist/chunk-SBCOROE4.mjs.map +1 -0
  22. package/dist/chunk-TTUAEJLD.mjs +617 -0
  23. package/dist/chunk-TTUAEJLD.mjs.map +1 -0
  24. package/dist/chunk-XWBDEXDA.mjs +153 -0
  25. package/dist/chunk-XWBDEXDA.mjs.map +1 -0
  26. package/dist/chunk-Z752VE75.mjs +74 -0
  27. package/dist/chunk-Z752VE75.mjs.map +1 -0
  28. package/dist/graphql/message-conversion/index.d.ts +18 -0
  29. package/dist/graphql/message-conversion/index.js +725 -0
  30. package/dist/graphql/message-conversion/index.js.map +1 -0
  31. package/dist/graphql/message-conversion/index.mjs +245 -0
  32. package/dist/graphql/message-conversion/index.mjs.map +1 -0
  33. package/dist/graphql/types/base/index.d.ts +6 -0
  34. package/dist/graphql/types/base/index.js +63 -0
  35. package/dist/graphql/types/base/index.js.map +1 -0
  36. package/dist/graphql/types/base/index.mjs +8 -0
  37. package/dist/graphql/types/base/index.mjs.map +1 -0
  38. package/dist/graphql/types/converted/index.d.ts +2 -0
  39. package/dist/graphql/types/converted/index.js +294 -0
  40. package/dist/graphql/types/converted/index.js.map +1 -0
  41. package/dist/graphql/types/converted/index.mjs +20 -0
  42. package/dist/graphql/types/converted/index.mjs.map +1 -0
  43. package/dist/groq-adapter-50bc6e4a.d.ts +326 -0
  44. package/dist/index-adbd78f1.d.ts +154 -0
  45. package/dist/index.d.ts +136 -287
  46. package/dist/index.js +393 -287
  47. package/dist/index.js.map +1 -1
  48. package/dist/index.mjs +385 -276
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/langgraph.d.ts +284 -0
  51. package/dist/langgraph.js +211 -0
  52. package/dist/langgraph.js.map +1 -0
  53. package/dist/langgraph.mjs +206 -0
  54. package/dist/langgraph.mjs.map +1 -0
  55. package/dist/langserve-74a52292.d.ts +242 -0
  56. package/dist/lib/cloud/index.d.ts +6 -0
  57. package/dist/lib/cloud/index.js +18 -0
  58. package/dist/lib/cloud/index.js.map +1 -0
  59. package/dist/lib/cloud/index.mjs +1 -0
  60. package/dist/lib/cloud/index.mjs.map +1 -0
  61. package/dist/lib/index.d.ts +266 -0
  62. package/dist/lib/index.js +4944 -0
  63. package/dist/lib/index.js.map +1 -0
  64. package/dist/lib/index.mjs +74 -0
  65. package/dist/lib/index.mjs.map +1 -0
  66. package/dist/lib/integrations/index.d.ts +28 -0
  67. package/dist/lib/integrations/index.js +3024 -0
  68. package/dist/lib/integrations/index.js.map +1 -0
  69. package/dist/lib/integrations/index.mjs +36 -0
  70. package/dist/lib/integrations/index.mjs.map +1 -0
  71. package/dist/lib/integrations/nest/index.d.ts +16 -0
  72. package/dist/lib/integrations/nest/index.js +2937 -0
  73. package/dist/lib/integrations/nest/index.js.map +1 -0
  74. package/dist/lib/integrations/nest/index.mjs +13 -0
  75. package/dist/lib/integrations/nest/index.mjs.map +1 -0
  76. package/dist/lib/integrations/node-express/index.d.ts +16 -0
  77. package/dist/lib/integrations/node-express/index.js +2937 -0
  78. package/dist/lib/integrations/node-express/index.js.map +1 -0
  79. package/dist/lib/integrations/node-express/index.mjs +13 -0
  80. package/dist/lib/integrations/node-express/index.mjs.map +1 -0
  81. package/dist/lib/integrations/node-http/index.d.ts +16 -0
  82. package/dist/lib/integrations/node-http/index.js +2923 -0
  83. package/dist/lib/integrations/node-http/index.js.map +1 -0
  84. package/dist/lib/integrations/node-http/index.mjs +12 -0
  85. package/dist/lib/integrations/node-http/index.mjs.map +1 -0
  86. package/dist/service-adapters/index.d.ts +166 -0
  87. package/dist/service-adapters/index.js +1800 -0
  88. package/dist/service-adapters/index.js.map +1 -0
  89. package/dist/service-adapters/index.mjs +36 -0
  90. package/dist/service-adapters/index.mjs.map +1 -0
  91. package/dist/service-adapters/shared/index.d.ts +9 -0
  92. package/dist/service-adapters/shared/index.js +72 -0
  93. package/dist/service-adapters/shared/index.js.map +1 -0
  94. package/dist/service-adapters/shared/index.mjs +8 -0
  95. package/dist/service-adapters/shared/index.mjs.map +1 -0
  96. package/dist/shared-f6d43ef8.d.ts +446 -0
  97. package/dist/utils/index.d.ts +65 -0
  98. package/dist/utils/index.js +175 -0
  99. package/dist/utils/index.js.map +1 -0
  100. package/dist/utils/index.mjs +12 -0
  101. package/dist/utils/index.mjs.map +1 -0
  102. package/dist/v2/index.d.ts +1 -0
  103. package/dist/v2/index.js +7 -0
  104. package/dist/v2/index.js.map +1 -1
  105. package/dist/v2/index.mjs +1 -0
  106. package/dist/v2/index.mjs.map +1 -1
  107. package/package.json +56 -18
  108. package/src/graphql/message-conversion/agui-to-gql.test.ts +2 -2
  109. package/src/graphql/message-conversion/gql-to-agui.test.ts +30 -28
  110. package/src/graphql/message-conversion/roundtrip-conversion.test.ts +8 -8
  111. package/src/langgraph.ts +1 -0
  112. package/src/lib/index.ts +42 -1
  113. package/src/lib/integrations/nextjs/app-router.ts +3 -1
  114. package/src/lib/integrations/node-http/index.ts +132 -11
  115. package/src/lib/integrations/shared.ts +2 -2
  116. package/src/lib/runtime/agent-integrations/{langgraph.agent.ts → langgraph/agent.ts} +5 -30
  117. package/src/lib/runtime/agent-integrations/langgraph/consts.ts +34 -0
  118. package/src/lib/runtime/agent-integrations/langgraph/index.ts +2 -0
  119. package/src/lib/runtime/copilot-runtime.ts +51 -68
  120. package/src/lib/runtime/telemetry-agent-runner.ts +134 -0
  121. package/src/service-adapters/anthropic/anthropic-adapter.ts +16 -3
  122. package/src/service-adapters/bedrock/bedrock-adapter.ts +4 -1
  123. package/src/service-adapters/experimental/ollama/ollama-adapter.ts +2 -1
  124. package/src/service-adapters/google/google-genai-adapter.ts +9 -4
  125. package/src/service-adapters/groq/groq-adapter.ts +16 -3
  126. package/src/service-adapters/langchain/langchain-adapter.ts +5 -3
  127. package/src/service-adapters/langchain/langserve.ts +2 -1
  128. package/src/service-adapters/openai/openai-adapter.ts +17 -3
  129. package/src/service-adapters/openai/openai-assistant-adapter.ts +26 -11
  130. package/src/service-adapters/unify/unify-adapter.ts +3 -1
  131. package/src/v2/index.ts +1 -0
  132. package/tsup.config.ts +5 -2
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/index.ts","../../src/graphql/types/response-status.type.ts","../../src/utils/failed-response-status-reasons.ts"],"sourcesContent":["export * from \"./failed-response-status-reasons\";\n","import { GraphQLJSON } from \"graphql-scalars\";\nimport { Field, InterfaceType, ObjectType, createUnionType, registerEnumType } from \"type-graphql\";\n\nexport enum ResponseStatusCode {\n Pending = \"pending\",\n Success = \"success\",\n Failed = \"failed\",\n}\n\nregisterEnumType(ResponseStatusCode, {\n name: \"ResponseStatusCode\",\n});\n\n@InterfaceType({\n resolveType(value) {\n if (value.code === ResponseStatusCode.Success) {\n return SuccessResponseStatus;\n } else if (value.code === ResponseStatusCode.Failed) {\n return FailedResponseStatus;\n } else if (value.code === ResponseStatusCode.Pending) {\n return PendingResponseStatus;\n }\n return undefined;\n },\n})\n@ObjectType()\nabstract class BaseResponseStatus {\n @Field(() => ResponseStatusCode)\n code: ResponseStatusCode;\n}\n\n@ObjectType({ implements: BaseResponseStatus })\nexport class PendingResponseStatus extends BaseResponseStatus {\n code: ResponseStatusCode = ResponseStatusCode.Pending;\n}\n\n@ObjectType({ implements: BaseResponseStatus })\nexport class SuccessResponseStatus extends BaseResponseStatus {\n code: ResponseStatusCode = ResponseStatusCode.Success;\n}\n\nexport enum FailedResponseStatusReason {\n GUARDRAILS_VALIDATION_FAILED = \"GUARDRAILS_VALIDATION_FAILED\",\n MESSAGE_STREAM_INTERRUPTED = \"MESSAGE_STREAM_INTERRUPTED\",\n UNKNOWN_ERROR = \"UNKNOWN_ERROR\",\n}\n\nregisterEnumType(FailedResponseStatusReason, {\n name: \"FailedResponseStatusReason\",\n});\n\n@ObjectType({ implements: BaseResponseStatus })\nexport class FailedResponseStatus extends BaseResponseStatus {\n code: ResponseStatusCode = ResponseStatusCode.Failed;\n\n @Field(() => FailedResponseStatusReason)\n reason: FailedResponseStatusReason;\n\n @Field(() => GraphQLJSON, { nullable: true })\n details?: Record<string, any> = null;\n}\n\nexport const ResponseStatusUnion = createUnionType({\n name: \"ResponseStatus\",\n types: () => [PendingResponseStatus, SuccessResponseStatus, FailedResponseStatus] as const,\n});\n","import {\n FailedResponseStatus,\n FailedResponseStatusReason,\n} from \"../graphql/types/response-status.type\";\n\nexport class GuardrailsValidationFailureResponse extends FailedResponseStatus {\n reason = FailedResponseStatusReason.GUARDRAILS_VALIDATION_FAILED;\n declare details: {\n guardrailsReason: string;\n };\n\n constructor({ guardrailsReason }) {\n super();\n this.details = {\n guardrailsReason,\n };\n }\n}\n\nexport class MessageStreamInterruptedResponse extends FailedResponseStatus {\n reason = FailedResponseStatusReason.MESSAGE_STREAM_INTERRUPTED;\n declare details: {\n messageId: string;\n description: string;\n };\n\n constructor({ messageId }: { messageId: string }) {\n super();\n this.details = {\n messageId,\n description: \"Check the message for mode details\",\n };\n }\n}\n\nexport class UnknownErrorResponse extends FailedResponseStatus {\n reason = FailedResponseStatusReason.UNKNOWN_ERROR;\n declare details: {\n description?: string;\n originalError?: {\n code?: string;\n statusCode?: number;\n severity?: string;\n visibility?: string;\n originalErrorType?: string;\n extensions?: any;\n };\n };\n\n constructor({\n description,\n originalError,\n }: {\n description?: string;\n originalError?: {\n code?: string;\n statusCode?: number;\n severity?: string;\n visibility?: string;\n originalErrorType?: string;\n extensions?: any;\n };\n }) {\n super();\n this.details = {\n description,\n originalError,\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;ACAA,6BAA4B;AAC5B,0BAAoF;;;;;;;;;;;;;;;;;;UAExEA,qBAAAA;;;;GAAAA,uBAAAA,qBAAAA,CAAAA,EAAAA;IAMZC,sCAAiBD,oBAAoB;EACnCE,MAAM;AACR,CAAA;AAeA,IAAeC,qBAAf,6BAAeA,oBAAAA;EAEbC;AACF,GAHA;;MACGC,2BAAM,MAAML,kBAAAA;;GADAG,mBAAAA,WAAAA,QAAAA,MAAAA;AAAAA,qBAAAA,aAAAA;MAbdG,mCAAc;IACbC,YAAYC,OAAK;AACf,UAAIA,MAAMJ,SAAI,WAAiC;AAC7C,eAAOK;MACT,WAAWD,MAAMJ,SAAI,UAAgC;AACnD,eAAOM;MACT,WAAWF,MAAMJ,SAAI,WAAiC;AACpD,eAAOO;MACT;AACA,aAAOC;IACT;EACF,CAAA;MACCC,gCAAAA;GACcV,kBAAAA;AAMR,IAAMQ,wBAAN,cAAoCR,mBAAAA;EACzCC,OAAAA;AACF;AAFaO;AAAAA,wBAAAA,aAAAA;MADZE,gCAAW;IAAEC,YAAYX;EAAmB,CAAA;GAChCQ,qBAAAA;AAKN,IAAMF,wBAAN,cAAoCN,mBAAAA;EACzCC,OAAAA;AACF;AAFaK;AAAAA,wBAAAA,aAAAA;MADZI,gCAAW;IAAEC,YAAYX;EAAmB,CAAA;GAChCM,qBAAAA;;UAIDM,6BAAAA;;;;GAAAA,+BAAAA,6BAAAA,CAAAA,EAAAA;IAMZd,sCAAiBc,4BAA4B;EAC3Cb,MAAM;AACR,CAAA;AAGO,IAAMQ,uBAAN,cAAmCP,mBAAAA;EACxCC,OAAAA;EAGAY;EAGAC,UAAgC;AAClC;AARaP;;MAGVL,2BAAM,MAAMU,0BAAAA;;GAHFL,qBAAAA,WAAAA,UAAAA,MAAAA;;MAMVL,2BAAM,MAAMa,oCAAa;IAAEC,UAAU;EAAK,CAAA;qCACjC,WAAA,cAAA,SAAA,MAAA;GAPCT,qBAAAA,WAAAA,WAAAA,MAAAA;AAAAA,uBAAAA,aAAAA;MADZG,gCAAW;IAAEC,YAAYX;EAAmB,CAAA;GAChCO,oBAAAA;AAUN,IAAMU,0BAAsBC,qCAAgB;EACjDnB,MAAM;EACNoB,OAAO,MAAM;IAACX;IAAuBF;IAAuBC;;AAC9D,CAAA;;;AC5DO,IAAMa,sCAAN,cAAkDC,qBAAAA;EACvDC,SAASC,2BAA2BC;EAKpCC,YAAY,EAAEC,iBAAgB,GAAI;AAChC,UAAK;AACL,SAAKC,UAAU;MACbD;IACF;EACF;AACF;AAZaN;AAcN,IAAMQ,mCAAN,cAA+CP,qBAAAA;EACpDC,SAASC,2BAA2BM;EAMpCJ,YAAY,EAAEK,UAAS,GAA2B;AAChD,UAAK;AACL,SAAKH,UAAU;MACbG;MACAC,aAAa;IACf;EACF;AACF;AAdaH;AAgBN,IAAMI,uBAAN,cAAmCX,qBAAAA;EACxCC,SAASC,2BAA2BU;EAapCR,YAAY,EACVM,aACAG,cAAa,GAWZ;AACD,UAAK;AACL,SAAKP,UAAU;MACbI;MACAG;IACF;EACF;AACF;AAlCaF;","names":["ResponseStatusCode","registerEnumType","name","BaseResponseStatus","code","Field","InterfaceType","resolveType","value","SuccessResponseStatus","FailedResponseStatus","PendingResponseStatus","undefined","ObjectType","implements","FailedResponseStatusReason","reason","details","GraphQLJSON","nullable","ResponseStatusUnion","createUnionType","types","GuardrailsValidationFailureResponse","FailedResponseStatus","reason","FailedResponseStatusReason","GUARDRAILS_VALIDATION_FAILED","constructor","guardrailsReason","details","MessageStreamInterruptedResponse","MESSAGE_STREAM_INTERRUPTED","messageId","description","UnknownErrorResponse","UNKNOWN_ERROR","originalError"]}
@@ -0,0 +1,12 @@
1
+ import {
2
+ GuardrailsValidationFailureResponse,
3
+ MessageStreamInterruptedResponse,
4
+ UnknownErrorResponse
5
+ } from "../chunk-XWBDEXDA.mjs";
6
+ import "../chunk-FHD4JECV.mjs";
7
+ export {
8
+ GuardrailsValidationFailureResponse,
9
+ MessageStreamInterruptedResponse,
10
+ UnknownErrorResponse
11
+ };
12
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1,2 @@
1
1
  export * from '@copilotkitnext/runtime';
2
+ export * from '@copilotkitnext/agent';
package/dist/v2/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require('reflect-metadata');
4
4
  var runtime = require('@copilotkitnext/runtime');
5
+ var agent = require('@copilotkitnext/agent');
5
6
 
6
7
 
7
8
 
@@ -11,5 +12,11 @@ Object.keys(runtime).forEach(function (k) {
11
12
  get: function () { return runtime[k]; }
12
13
  });
13
14
  });
15
+ Object.keys(agent).forEach(function (k) {
16
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
17
+ enumerable: true,
18
+ get: function () { return agent[k]; }
19
+ });
20
+ });
14
21
  //# sourceMappingURL=out.js.map
15
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/v2/index.ts"],"names":[],"mappings":";AAAA,OAAO;AACP,cAAc","sourcesContent":["import \"reflect-metadata\";\nexport * from \"@copilotkitnext/runtime\";\n"]}
1
+ {"version":3,"sources":["../../src/v2/index.ts"],"names":[],"mappings":";AAAA,OAAO;AACP,cAAc;AACd,cAAc","sourcesContent":["import \"reflect-metadata\";\nexport * from \"@copilotkitnext/runtime\";\nexport * from \"@copilotkitnext/agent\";\n"]}
package/dist/v2/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import 'reflect-metadata';
2
2
  export * from '@copilotkitnext/runtime';
3
+ export * from '@copilotkitnext/agent';
3
4
  //# sourceMappingURL=out.js.map
4
5
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/v2/index.ts"],"names":[],"mappings":";AAAA,OAAO;AACP,cAAc","sourcesContent":["import \"reflect-metadata\";\nexport * from \"@copilotkitnext/runtime\";\n"]}
1
+ {"version":3,"sources":["../../src/v2/index.ts"],"names":[],"mappings":";AAAA,OAAO;AACP,cAAc;AACd,cAAc","sourcesContent":["import \"reflect-metadata\";\nexport * from \"@copilotkitnext/runtime\";\nexport * from \"@copilotkitnext/agent\";\n"]}
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.50.0-beta.1",
12
+ "version": "1.50.0-beta.10",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -23,6 +23,11 @@
23
23
  "import": "./dist/v2/index.mjs",
24
24
  "require": "./dist/v2/index.js",
25
25
  "types": "./dist/v2/index.d.ts"
26
+ },
27
+ "./langgraph": {
28
+ "import": "./dist/langgraph.mjs",
29
+ "require": "./dist/langgraph.js",
30
+ "types": "./dist/langgraph.d.ts"
26
31
  }
27
32
  },
28
33
  "types": "./dist/index.d.ts",
@@ -41,29 +46,21 @@
41
46
  "tsup": "^6.7.0",
42
47
  "typescript": "^5.2.3",
43
48
  "vitest": "^3.2.4",
44
- "zod-to-json-schema": "^3.23.5",
45
49
  "eslint-config-custom": "1.4.6",
46
50
  "tsconfig": "1.4.6"
47
51
  },
48
52
  "dependencies": {
49
- "@anthropic-ai/sdk": "^0.57.0",
50
- "@copilotkitnext/agent": "0.0.22",
51
- "@copilotkitnext/runtime": "0.0.22",
53
+ "@copilotkitnext/agent": "0.0.28",
54
+ "@copilotkitnext/runtime": "0.0.28",
52
55
  "@graphql-yoga/plugin-defer-stream": "^3.3.1",
53
- "@langchain/aws": "^0.1.9",
54
- "@langchain/community": "^0.3.29",
56
+ "@hono/node-server": "^1.13.5",
55
57
  "@langchain/core": "^0.3.38",
56
- "@langchain/google-gauth": "^0.1.0",
57
- "@langchain/langgraph-sdk": "^0.0.70",
58
- "@langchain/openai": "^0.4.2",
59
58
  "@scarf/scarf": "^1.3.0",
60
59
  "class-transformer": "^0.5.1",
61
60
  "class-validator": "^0.14.1",
62
61
  "graphql": "^16.8.1",
63
62
  "graphql-scalars": "^1.23.0",
64
63
  "graphql-yoga": "^5.3.1",
65
- "groq-sdk": "^0.5.0",
66
- "@hono/node-server": "^1.13.5",
67
64
  "hono": "^4.10.3",
68
65
  "langchain": "^0.3.3",
69
66
  "openai": "^4.85.1",
@@ -74,14 +71,55 @@
74
71
  "rxjs": "7.8.1",
75
72
  "type-graphql": "2.0.0-rc.1",
76
73
  "zod": "^3.23.3",
77
- "@copilotkit/shared": "1.50.0-beta.1"
74
+ "@copilotkit/shared": "1.50.0-beta.10"
78
75
  },
79
76
  "peerDependencies": {
80
- "@ag-ui/client": ">=0.0.39",
81
- "@ag-ui/core": ">=0.0.39",
82
- "@ag-ui/encoder": ">=0.0.39",
83
- "@ag-ui/langgraph": ">=0.0.18",
84
- "@ag-ui/proto": ">=0.0.39"
77
+ "@anthropic-ai/sdk": "^0.57.0",
78
+ "@ag-ui/client": "^0.0.42",
79
+ "@ag-ui/core": ">=0.0.42",
80
+ "@ag-ui/encoder": ">=0.0.42",
81
+ "@ag-ui/langgraph": ">=0.0.20",
82
+ "@ag-ui/proto": ">=0.0.42",
83
+ "@langchain/aws": "^0.1.9",
84
+ "@langchain/community": "^0.3.58",
85
+ "@langchain/google-gauth": "^0.1.0",
86
+ "@langchain/langgraph-sdk": "^0.0.70",
87
+ "@langchain/openai": "^0.4.2",
88
+ "groq-sdk": ">=0.3.0 <1.0.0",
89
+ "langchain": "^0.3.3",
90
+ "openai": "^4.85.1"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "@anthropic-ai/sdk": {
94
+ "optional": true
95
+ },
96
+ "@ag-ui/langgraph": {
97
+ "optional": true
98
+ },
99
+ "@langchain/aws": {
100
+ "optional": true
101
+ },
102
+ "@langchain/community": {
103
+ "optional": true
104
+ },
105
+ "@langchain/google-gauth": {
106
+ "optional": true
107
+ },
108
+ "@langchain/langgraph-sdk": {
109
+ "optional": true
110
+ },
111
+ "@langchain/openai": {
112
+ "optional": true
113
+ },
114
+ "groq-sdk": {
115
+ "optional": true
116
+ },
117
+ "langchain": {
118
+ "optional": true
119
+ },
120
+ "openai": {
121
+ "optional": true
122
+ }
85
123
  },
86
124
  "keywords": [
87
125
  "copilotkit",
@@ -1,4 +1,4 @@
1
- import { describe, test, expect, vi } from "vitest";
1
+ import { describe, test, expect } from "@jest/globals";
2
2
  import * as gql from "../types/converted/index";
3
3
  import agui from "@copilotkit/shared";
4
4
  import {
@@ -587,7 +587,7 @@ describe("agui-to-gql", () => {
587
587
  });
588
588
 
589
589
  test("should verify render function receives correct props including name", () => {
590
- const mockRender = vi.fn(
590
+ const mockRender = jest.fn(
591
591
  (props) => `Rendered: ${props.name} with args: ${JSON.stringify(props.args)}`,
592
592
  );
593
593
  const aguiMessage: agui.Message = {
@@ -1,4 +1,4 @@
1
- import { describe, test, expect, vi } from "vitest";
1
+ import { describe, test, expect } from "@jest/globals";
2
2
  import * as gql from "../types/converted/index";
3
3
  import { MessageStatusCode } from "../types/message-status.type";
4
4
  import {
@@ -370,7 +370,7 @@ describe("message-conversion", () => {
370
370
  status: { code: MessageStatusCode.Pending },
371
371
  });
372
372
 
373
- const mockRender = vi.fn();
373
+ const mockRender = jest.fn();
374
374
  const mockRenderAndWaitForResponse = (props: any) => "Test Render With Response";
375
375
 
376
376
  const actions = {
@@ -414,7 +414,7 @@ describe("message-conversion", () => {
414
414
  status: { code: MessageStatusCode.Pending },
415
415
  });
416
416
 
417
- const mockRender = vi.fn();
417
+ const mockRender = jest.fn();
418
418
  const actions = {
419
419
  testAction: {
420
420
  name: "testAction",
@@ -445,7 +445,7 @@ describe("message-conversion", () => {
445
445
  status: { code: MessageStatusCode.Success },
446
446
  });
447
447
 
448
- const mockRender = vi.fn();
448
+ const mockRender = jest.fn();
449
449
  const actions = {
450
450
  testAction: {
451
451
  name: "testAction",
@@ -483,7 +483,7 @@ describe("message-conversion", () => {
483
483
  actionName: "testAction",
484
484
  });
485
485
 
486
- const mockRender = vi.fn();
486
+ const mockRender = jest.fn();
487
487
  const actions = {
488
488
  testAction: {
489
489
  name: "testAction",
@@ -517,7 +517,7 @@ describe("message-conversion", () => {
517
517
  status: { code: MessageStatusCode.Pending },
518
518
  });
519
519
 
520
- const mockRender = vi.fn();
520
+ const mockRender = jest.fn();
521
521
  const actions = {
522
522
  testAction: {
523
523
  name: "testAction",
@@ -627,7 +627,7 @@ describe("message-conversion", () => {
627
627
  role: gql.Role.assistant,
628
628
  });
629
629
 
630
- const mockRender = vi.fn();
630
+ const mockRender = jest.fn();
631
631
  const coAgentStateRenders = {
632
632
  testAgent: {
633
633
  name: "testAgent",
@@ -740,7 +740,7 @@ describe("message-conversion", () => {
740
740
  role: gql.Role.assistant,
741
741
  });
742
742
 
743
- const mockRender = vi.fn();
743
+ const mockRender = jest.fn();
744
744
  const coAgentStateRenders = {
745
745
  testAgent: {
746
746
  name: "testAgent",
@@ -853,7 +853,7 @@ describe("message-conversion", () => {
853
853
  const actions = {
854
854
  testAction: {
855
855
  name: "testAction",
856
- render: vi.fn((props) => `Rendered: ${props.args.test}`),
856
+ render: jest.fn((props) => `Rendered: ${props.args.test}`),
857
857
  },
858
858
  };
859
859
 
@@ -889,7 +889,7 @@ describe("message-conversion", () => {
889
889
  const actions = {
890
890
  "*": {
891
891
  name: "*",
892
- render: vi.fn((props) => `Wildcard rendered: ${props.args.test}`),
892
+ render: jest.fn((props) => `Wildcard rendered: ${props.args.test}`),
893
893
  },
894
894
  };
895
895
 
@@ -922,7 +922,7 @@ describe("message-conversion", () => {
922
922
  });
923
923
 
924
924
  test("should pass tool name to wildcard action render function", () => {
925
- const mockRender = vi.fn(
925
+ const mockRender = jest.fn(
926
926
  (props) => `Wildcard rendered: ${props.name} with args: ${JSON.stringify(props.args)}`,
927
927
  );
928
928
  const actions = {
@@ -954,7 +954,9 @@ describe("message-conversion", () => {
954
954
  });
955
955
 
956
956
  test("should pass tool name to regular action render function", () => {
957
- const mockRender = vi.fn((props) => `Regular action rendered: ${JSON.stringify(props.args)}`);
957
+ const mockRender = jest.fn(
958
+ (props) => `Regular action rendered: ${JSON.stringify(props.args)}`,
959
+ );
958
960
  const actions = {
959
961
  testAction: {
960
962
  name: "testAction",
@@ -992,11 +994,11 @@ describe("message-conversion", () => {
992
994
  const actions = {
993
995
  specificAction: {
994
996
  name: "specificAction",
995
- render: vi.fn((props) => "Specific action rendered"),
997
+ render: jest.fn((props) => "Specific action rendered"),
996
998
  },
997
999
  "*": {
998
1000
  name: "*",
999
- render: vi.fn((props) => "Wildcard action rendered"),
1001
+ render: jest.fn((props) => "Wildcard action rendered"),
1000
1002
  },
1001
1003
  };
1002
1004
 
@@ -1032,7 +1034,7 @@ describe("message-conversion", () => {
1032
1034
  const actions = {
1033
1035
  otherAction: {
1034
1036
  name: "otherAction",
1035
- render: vi.fn(),
1037
+ render: jest.fn(),
1036
1038
  },
1037
1039
  };
1038
1040
 
@@ -1095,7 +1097,7 @@ describe("message-conversion", () => {
1095
1097
  const actions = {
1096
1098
  "*": {
1097
1099
  name: "*",
1098
- render: vi.fn((props) => `Result: ${props.result}`),
1100
+ render: jest.fn((props) => `Result: ${props.result}`),
1099
1101
  },
1100
1102
  };
1101
1103
 
@@ -1133,7 +1135,7 @@ describe("message-conversion", () => {
1133
1135
  const actions = {
1134
1136
  "*": {
1135
1137
  name: "*",
1136
- render: vi.fn((props) => `Status: ${props.status}`),
1138
+ render: jest.fn((props) => `Status: ${props.status}`),
1137
1139
  },
1138
1140
  };
1139
1141
 
@@ -1170,7 +1172,7 @@ describe("message-conversion", () => {
1170
1172
  const actions = {
1171
1173
  "*": {
1172
1174
  name: "*",
1173
- render: vi.fn((props) => `Status: ${props.status}`),
1175
+ render: jest.fn((props) => `Status: ${props.status}`),
1174
1176
  },
1175
1177
  };
1176
1178
 
@@ -1207,7 +1209,7 @@ describe("message-conversion", () => {
1207
1209
  const actions = {
1208
1210
  "*": {
1209
1211
  name: "*",
1210
- render: vi.fn((props) => `Status: ${props.status}`),
1212
+ render: jest.fn((props) => `Status: ${props.status}`),
1211
1213
  },
1212
1214
  };
1213
1215
 
@@ -1244,7 +1246,7 @@ describe("message-conversion", () => {
1244
1246
  const actions = {
1245
1247
  "*": {
1246
1248
  name: "*",
1247
- render: vi.fn((props) => `Status: ${props.status}`),
1249
+ render: jest.fn((props) => `Status: ${props.status}`),
1248
1250
  },
1249
1251
  };
1250
1252
 
@@ -1281,7 +1283,7 @@ describe("message-conversion", () => {
1281
1283
  const actions = {
1282
1284
  "*": {
1283
1285
  name: "*",
1284
- render: vi.fn((props) => `Args: ${JSON.stringify(props.args)}`),
1286
+ render: jest.fn((props) => `Args: ${JSON.stringify(props.args)}`),
1285
1287
  },
1286
1288
  };
1287
1289
 
@@ -1317,7 +1319,7 @@ describe("message-conversion", () => {
1317
1319
  const actions = {
1318
1320
  "*": {
1319
1321
  name: "*",
1320
- render: vi.fn((props) => `Args: ${JSON.stringify(props.args)}`),
1322
+ render: jest.fn((props) => `Args: ${JSON.stringify(props.args)}`),
1321
1323
  },
1322
1324
  };
1323
1325
 
@@ -1353,7 +1355,7 @@ describe("message-conversion", () => {
1353
1355
  const actions = {
1354
1356
  "*": {
1355
1357
  name: "*",
1356
- render: vi.fn((props) => `Complex: ${JSON.stringify(props.args)}`),
1358
+ render: jest.fn((props) => `Complex: ${JSON.stringify(props.args)}`),
1357
1359
  },
1358
1360
  };
1359
1361
 
@@ -1401,11 +1403,11 @@ describe("message-conversion", () => {
1401
1403
  const actions = {
1402
1404
  wildcard1: {
1403
1405
  name: "*",
1404
- render: vi.fn((props) => "First wildcard"),
1406
+ render: jest.fn((props) => "First wildcard"),
1405
1407
  },
1406
1408
  wildcard2: {
1407
1409
  name: "*",
1408
- render: vi.fn((props) => "Second wildcard"),
1410
+ render: jest.fn((props) => "Second wildcard"),
1409
1411
  },
1410
1412
  };
1411
1413
 
@@ -1441,7 +1443,7 @@ describe("message-conversion", () => {
1441
1443
  const actions = {
1442
1444
  "*": {
1443
1445
  name: "*",
1444
- render: vi.fn((props) => `Result: ${JSON.stringify(props.result)}`),
1446
+ render: jest.fn((props) => `Result: ${JSON.stringify(props.result)}`),
1445
1447
  },
1446
1448
  };
1447
1449
 
@@ -1478,7 +1480,7 @@ describe("message-conversion", () => {
1478
1480
  const actions = {
1479
1481
  "*": {
1480
1482
  name: "*",
1481
- render: vi.fn((props) => `Result: ${JSON.stringify(props.result)}`),
1483
+ render: jest.fn((props) => `Result: ${JSON.stringify(props.result)}`),
1482
1484
  },
1483
1485
  };
1484
1486
 
@@ -1515,7 +1517,7 @@ describe("message-conversion", () => {
1515
1517
  const actions = {
1516
1518
  "*": {
1517
1519
  name: "*",
1518
- render: vi.fn((props) => `Result: ${JSON.stringify(props.result)}`),
1520
+ render: jest.fn((props) => `Result: ${JSON.stringify(props.result)}`),
1519
1521
  },
1520
1522
  };
1521
1523
 
@@ -1,4 +1,4 @@
1
- import { describe, test, expect, vi } from "vitest";
1
+ import { describe, test, expect } from "@jest/globals";
2
2
  import * as gql from "../types/converted/index";
3
3
  import agui from "@copilotkit/shared";
4
4
  import { aguiToGQL } from "./agui-to-gql";
@@ -131,7 +131,7 @@ describe("roundtrip message conversion", () => {
131
131
  });
132
132
 
133
133
  test("action execution with render function roundtrip", () => {
134
- const mockRender = vi.fn();
134
+ const mockRender = jest.fn();
135
135
  const aguiMsg: agui.Message = {
136
136
  id: "assistant-1",
137
137
  role: "assistant",
@@ -211,7 +211,7 @@ describe("roundtrip message conversion", () => {
211
211
  });
212
212
 
213
213
  test("wild card action roundtrip conversion", () => {
214
- const mockRender = vi.fn((props) => `Wildcard rendered: ${props.args.test}`);
214
+ const mockRender = jest.fn((props) => `Wildcard rendered: ${props.args.test}`);
215
215
  const aguiMsg: agui.Message = {
216
216
  id: "assistant-wildcard-1",
217
217
  role: "assistant",
@@ -256,7 +256,7 @@ describe("roundtrip message conversion", () => {
256
256
  });
257
257
 
258
258
  test("wild card action with specific action priority roundtrip", () => {
259
- const mockRender = vi.fn((props) => `Specific action rendered: ${props.args.test}`);
259
+ const mockRender = jest.fn((props) => `Specific action rendered: ${props.args.test}`);
260
260
  const aguiMsg: agui.Message = {
261
261
  id: "assistant-priority-1",
262
262
  role: "assistant",
@@ -313,7 +313,7 @@ describe("roundtrip message conversion", () => {
313
313
  const actions: Record<string, any> = {
314
314
  "*": {
315
315
  name: "*",
316
- render: vi.fn((props) => `GQL wildcard rendered: ${props.args.test}`),
316
+ render: jest.fn((props) => `GQL wildcard rendered: ${props.args.test}`),
317
317
  },
318
318
  };
319
319
 
@@ -379,7 +379,7 @@ describe("roundtrip message conversion", () => {
379
379
  });
380
380
 
381
381
  test("roundtrip conversion with action execution and result parsing", () => {
382
- const mockRender = vi.fn((props) => `Rendered: ${JSON.stringify(props.result)}`);
382
+ const mockRender = jest.fn((props) => `Rendered: ${JSON.stringify(props.result)}`);
383
383
 
384
384
  // Create action execution message
385
385
  const actionExecMsg = new gql.ActionExecutionMessage({
@@ -439,7 +439,7 @@ describe("roundtrip message conversion", () => {
439
439
  });
440
440
 
441
441
  test("roundtrip conversion verifies correct property distribution for regular actions", () => {
442
- const mockRender = vi.fn((props) => `Regular action: ${JSON.stringify(props.args)}`);
442
+ const mockRender = jest.fn((props) => `Regular action: ${JSON.stringify(props.args)}`);
443
443
 
444
444
  const actionExecMsg = new gql.ActionExecutionMessage({
445
445
  id: "regular-action-test",
@@ -481,7 +481,7 @@ describe("roundtrip message conversion", () => {
481
481
  });
482
482
 
483
483
  test("roundtrip conversion verifies correct property distribution for wildcard actions", () => {
484
- const mockRender = vi.fn(
484
+ const mockRender = jest.fn(
485
485
  (props) => `Wildcard action: ${props.name} with ${JSON.stringify(props.args)}`,
486
486
  );
487
487
 
@@ -0,0 +1 @@
1
+ export * from "./lib/runtime/agent-integrations/langgraph";
package/src/lib/index.ts CHANGED
@@ -8,4 +8,45 @@ export * from "./integrations";
8
8
  export * from "./logger";
9
9
  export * from "./runtime/copilot-runtime";
10
10
  export * from "./runtime/mcp-tools-utils";
11
- export * from "./runtime/agent-integrations/langgraph.agent";
11
+ export * from "./runtime/telemetry-agent-runner";
12
+
13
+ // The below re-exports "dummy" classes and types, to get a deprecation warning redirecting the users to import these from the correct, new route
14
+
15
+ /**
16
+ * @deprecated LangGraphAgent import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
17
+ */
18
+ export class LangGraphAgent {
19
+ constructor() {
20
+ throw new Error(
21
+ "LangGraphAgent import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead",
22
+ );
23
+ }
24
+ }
25
+
26
+ /**
27
+ * @deprecated LangGraphHttpAgent import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
28
+ */
29
+ export class LangGraphHttpAgent {
30
+ constructor() {
31
+ throw new Error(
32
+ "LangGraphHttpAgent import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead",
33
+ );
34
+ }
35
+ }
36
+
37
+ /**
38
+ * @deprecated TextMessageEvents import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
39
+ */
40
+ export type TextMessageEvents = any;
41
+ /**
42
+ * @deprecated ToolCallEvents import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
43
+ */
44
+ export type ToolCallEvents = any;
45
+ /**
46
+ * @deprecated CustomEventNames import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
47
+ */
48
+ export type CustomEventNames = any;
49
+ /**
50
+ * @deprecated PredictStateTool import from @copilotkit/runtime is deprecated. Please import it from @copilotkit/runtime/langgraph instead
51
+ */
52
+ export type PredictStateTool = any;
@@ -24,7 +24,9 @@ export function copilotRuntimeNextJSAppRouterEndpoint(options: CreateCopilotRunt
24
24
  logger.debug("Creating NextJS App Router endpoint");
25
25
 
26
26
  const serviceAdapter = options.serviceAdapter;
27
- options.runtime.handleServiceAdapter(serviceAdapter);
27
+ if (serviceAdapter) {
28
+ options.runtime.handleServiceAdapter(serviceAdapter);
29
+ }
28
30
 
29
31
  const copilotRoute = createCopilotEndpointSingleRoute({
30
32
  runtime: options.runtime.instance,