@copilotkit/runtime 1.50.0-beta.0 → 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.
- package/CHANGELOG.md +74 -0
- package/dist/chunk-2OZAGFV3.mjs +43 -0
- package/dist/chunk-2OZAGFV3.mjs.map +1 -0
- package/dist/chunk-62NE5S6M.mjs +226 -0
- package/dist/chunk-62NE5S6M.mjs.map +1 -0
- package/dist/chunk-6XRUR5UK.mjs +1 -0
- package/dist/chunk-6XRUR5UK.mjs.map +1 -0
- package/dist/chunk-AMUJQ6IR.mjs +50 -0
- package/dist/chunk-AMUJQ6IR.mjs.map +1 -0
- package/dist/chunk-BJEYMRDD.mjs +25 -0
- package/dist/chunk-BJEYMRDD.mjs.map +1 -0
- package/dist/chunk-DZV4ZIAR.mjs +3063 -0
- package/dist/chunk-DZV4ZIAR.mjs.map +1 -0
- package/dist/chunk-FHD4JECV.mjs +33 -0
- package/dist/chunk-FHD4JECV.mjs.map +1 -0
- package/dist/chunk-FMU55SEU.mjs +25 -0
- package/dist/chunk-FMU55SEU.mjs.map +1 -0
- package/dist/chunk-OWIGJONH.mjs +275 -0
- package/dist/chunk-OWIGJONH.mjs.map +1 -0
- package/dist/chunk-SBCOROE4.mjs +1112 -0
- package/dist/chunk-SBCOROE4.mjs.map +1 -0
- package/dist/chunk-TTUAEJLD.mjs +617 -0
- package/dist/chunk-TTUAEJLD.mjs.map +1 -0
- package/dist/chunk-XWBDEXDA.mjs +153 -0
- package/dist/chunk-XWBDEXDA.mjs.map +1 -0
- package/dist/chunk-Z752VE75.mjs +74 -0
- package/dist/chunk-Z752VE75.mjs.map +1 -0
- package/dist/graphql/message-conversion/index.d.ts +18 -0
- package/dist/graphql/message-conversion/index.js +725 -0
- package/dist/graphql/message-conversion/index.js.map +1 -0
- package/dist/graphql/message-conversion/index.mjs +245 -0
- package/dist/graphql/message-conversion/index.mjs.map +1 -0
- package/dist/graphql/types/base/index.d.ts +6 -0
- package/dist/graphql/types/base/index.js +63 -0
- package/dist/graphql/types/base/index.js.map +1 -0
- package/dist/graphql/types/base/index.mjs +8 -0
- package/dist/graphql/types/base/index.mjs.map +1 -0
- package/dist/graphql/types/converted/index.d.ts +2 -0
- package/dist/graphql/types/converted/index.js +294 -0
- package/dist/graphql/types/converted/index.js.map +1 -0
- package/dist/graphql/types/converted/index.mjs +20 -0
- package/dist/graphql/types/converted/index.mjs.map +1 -0
- package/dist/groq-adapter-50bc6e4a.d.ts +326 -0
- package/dist/index-adbd78f1.d.ts +154 -0
- package/dist/index.d.ts +136 -287
- package/dist/index.js +393 -287
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +385 -276
- package/dist/index.mjs.map +1 -1
- package/dist/langgraph.d.ts +284 -0
- package/dist/langgraph.js +211 -0
- package/dist/langgraph.js.map +1 -0
- package/dist/langgraph.mjs +206 -0
- package/dist/langgraph.mjs.map +1 -0
- package/dist/langserve-74a52292.d.ts +242 -0
- package/dist/lib/cloud/index.d.ts +6 -0
- package/dist/lib/cloud/index.js +18 -0
- package/dist/lib/cloud/index.js.map +1 -0
- package/dist/lib/cloud/index.mjs +1 -0
- package/dist/lib/cloud/index.mjs.map +1 -0
- package/dist/lib/index.d.ts +266 -0
- package/dist/lib/index.js +4944 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/index.mjs +74 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/integrations/index.d.ts +28 -0
- package/dist/lib/integrations/index.js +3024 -0
- package/dist/lib/integrations/index.js.map +1 -0
- package/dist/lib/integrations/index.mjs +36 -0
- package/dist/lib/integrations/index.mjs.map +1 -0
- package/dist/lib/integrations/nest/index.d.ts +16 -0
- package/dist/lib/integrations/nest/index.js +2937 -0
- package/dist/lib/integrations/nest/index.js.map +1 -0
- package/dist/lib/integrations/nest/index.mjs +13 -0
- package/dist/lib/integrations/nest/index.mjs.map +1 -0
- package/dist/lib/integrations/node-express/index.d.ts +16 -0
- package/dist/lib/integrations/node-express/index.js +2937 -0
- package/dist/lib/integrations/node-express/index.js.map +1 -0
- package/dist/lib/integrations/node-express/index.mjs +13 -0
- package/dist/lib/integrations/node-express/index.mjs.map +1 -0
- package/dist/lib/integrations/node-http/index.d.ts +16 -0
- package/dist/lib/integrations/node-http/index.js +2923 -0
- package/dist/lib/integrations/node-http/index.js.map +1 -0
- package/dist/lib/integrations/node-http/index.mjs +12 -0
- package/dist/lib/integrations/node-http/index.mjs.map +1 -0
- package/dist/service-adapters/index.d.ts +166 -0
- package/dist/service-adapters/index.js +1800 -0
- package/dist/service-adapters/index.js.map +1 -0
- package/dist/service-adapters/index.mjs +36 -0
- package/dist/service-adapters/index.mjs.map +1 -0
- package/dist/service-adapters/shared/index.d.ts +9 -0
- package/dist/service-adapters/shared/index.js +72 -0
- package/dist/service-adapters/shared/index.js.map +1 -0
- package/dist/service-adapters/shared/index.mjs +8 -0
- package/dist/service-adapters/shared/index.mjs.map +1 -0
- package/dist/shared-f6d43ef8.d.ts +446 -0
- package/dist/utils/index.d.ts +65 -0
- package/dist/utils/index.js +175 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +12 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/v2/index.d.ts +1 -0
- package/dist/v2/index.js +7 -0
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/index.mjs +1 -0
- package/dist/v2/index.mjs.map +1 -1
- package/package.json +71 -33
- package/src/graphql/message-conversion/agui-to-gql.test.ts +2 -2
- package/src/graphql/message-conversion/gql-to-agui.test.ts +30 -28
- package/src/graphql/message-conversion/roundtrip-conversion.test.ts +8 -8
- package/src/langgraph.ts +1 -0
- package/src/lib/index.ts +42 -1
- package/src/lib/integrations/nextjs/app-router.ts +3 -1
- package/src/lib/integrations/node-http/index.ts +132 -11
- package/src/lib/integrations/shared.ts +2 -2
- package/src/lib/runtime/agent-integrations/{langgraph.agent.ts → langgraph/agent.ts} +5 -30
- package/src/lib/runtime/agent-integrations/langgraph/consts.ts +34 -0
- package/src/lib/runtime/agent-integrations/langgraph/index.ts +2 -0
- package/src/lib/runtime/copilot-runtime.ts +51 -68
- package/src/lib/runtime/telemetry-agent-runner.ts +134 -0
- package/src/service-adapters/anthropic/anthropic-adapter.ts +16 -3
- package/src/service-adapters/bedrock/bedrock-adapter.ts +4 -1
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +2 -1
- package/src/service-adapters/google/google-genai-adapter.ts +9 -4
- package/src/service-adapters/groq/groq-adapter.ts +16 -3
- package/src/service-adapters/langchain/langchain-adapter.ts +5 -3
- package/src/service-adapters/langchain/langserve.ts +2 -1
- package/src/service-adapters/openai/openai-adapter.ts +17 -3
- package/src/service-adapters/openai/openai-assistant-adapter.ts +26 -11
- package/src/service-adapters/unify/unify-adapter.ts +3 -1
- package/src/v2/index.ts +1 -0
- 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":[]}
|
package/dist/v2/index.d.ts
CHANGED
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
|
package/dist/v2/index.js.map
CHANGED
|
@@ -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
package/dist/v2/index.mjs.map
CHANGED
|
@@ -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.
|
|
12
|
+
"version": "1.50.0-beta.10",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
15
|
"module": "./dist/index.mjs",
|
|
@@ -23,20 +23,15 @@
|
|
|
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",
|
|
29
34
|
"license": "MIT",
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "tsup --onSuccess \"pnpm run generate-graphql-schema\"",
|
|
32
|
-
"dev": "tsup --watch --onSuccess \"pnpm run generate-graphql-schema\"",
|
|
33
|
-
"test": "jest --passWithNoTests",
|
|
34
|
-
"check-types": "tsc --noEmit",
|
|
35
|
-
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__",
|
|
36
|
-
"generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts",
|
|
37
|
-
"link:global": "pnpm link --global",
|
|
38
|
-
"unlink:global": "pnpm unlink --global"
|
|
39
|
-
},
|
|
40
35
|
"devDependencies": {
|
|
41
36
|
"@jest/globals": "^29.7.0",
|
|
42
37
|
"@swc/core": "1.5.28",
|
|
@@ -44,37 +39,28 @@
|
|
|
44
39
|
"@types/node": "^18.11.17",
|
|
45
40
|
"@whatwg-node/server": "^0.9.34",
|
|
46
41
|
"eslint": "^8.56.0",
|
|
47
|
-
"eslint-config-custom": "workspace:*",
|
|
48
42
|
"jest": "^29.6.4",
|
|
49
43
|
"nodemon": "^3.1.3",
|
|
50
44
|
"ts-jest": "^29.1.1",
|
|
51
45
|
"ts-node": "^10.9.2",
|
|
52
|
-
"tsconfig": "workspace:*",
|
|
53
46
|
"tsup": "^6.7.0",
|
|
54
47
|
"typescript": "^5.2.3",
|
|
55
48
|
"vitest": "^3.2.4",
|
|
56
|
-
"
|
|
49
|
+
"eslint-config-custom": "1.4.6",
|
|
50
|
+
"tsconfig": "1.4.6"
|
|
57
51
|
},
|
|
58
52
|
"dependencies": {
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@copilotkitnext/agent": "0.0.22",
|
|
62
|
-
"@copilotkitnext/runtime": "0.0.22",
|
|
53
|
+
"@copilotkitnext/agent": "0.0.28",
|
|
54
|
+
"@copilotkitnext/runtime": "0.0.28",
|
|
63
55
|
"@graphql-yoga/plugin-defer-stream": "^3.3.1",
|
|
64
|
-
"@
|
|
65
|
-
"@langchain/community": "^0.3.29",
|
|
56
|
+
"@hono/node-server": "^1.13.5",
|
|
66
57
|
"@langchain/core": "^0.3.38",
|
|
67
|
-
"@langchain/google-gauth": "^0.1.0",
|
|
68
|
-
"@langchain/langgraph-sdk": "^0.0.70",
|
|
69
|
-
"@langchain/openai": "^0.4.2",
|
|
70
58
|
"@scarf/scarf": "^1.3.0",
|
|
71
59
|
"class-transformer": "^0.5.1",
|
|
72
60
|
"class-validator": "^0.14.1",
|
|
73
61
|
"graphql": "^16.8.1",
|
|
74
62
|
"graphql-scalars": "^1.23.0",
|
|
75
63
|
"graphql-yoga": "^5.3.1",
|
|
76
|
-
"groq-sdk": "^0.5.0",
|
|
77
|
-
"@hono/node-server": "^1.13.5",
|
|
78
64
|
"hono": "^4.10.3",
|
|
79
65
|
"langchain": "^0.3.3",
|
|
80
66
|
"openai": "^4.85.1",
|
|
@@ -84,14 +70,56 @@
|
|
|
84
70
|
"reflect-metadata": "^0.2.2",
|
|
85
71
|
"rxjs": "7.8.1",
|
|
86
72
|
"type-graphql": "2.0.0-rc.1",
|
|
87
|
-
"zod": "^3.23.3"
|
|
73
|
+
"zod": "^3.23.3",
|
|
74
|
+
"@copilotkit/shared": "1.50.0-beta.10"
|
|
88
75
|
},
|
|
89
76
|
"peerDependencies": {
|
|
90
|
-
"@
|
|
91
|
-
"@ag-ui/
|
|
92
|
-
"@ag-ui/
|
|
93
|
-
"@ag-ui/
|
|
94
|
-
"@ag-ui/
|
|
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
|
+
}
|
|
95
123
|
},
|
|
96
124
|
"keywords": [
|
|
97
125
|
"copilotkit",
|
|
@@ -104,5 +132,15 @@
|
|
|
104
132
|
"javascript",
|
|
105
133
|
"automation",
|
|
106
134
|
"textarea"
|
|
107
|
-
]
|
|
108
|
-
|
|
135
|
+
],
|
|
136
|
+
"scripts": {
|
|
137
|
+
"build": "tsup --onSuccess \"pnpm run generate-graphql-schema\"",
|
|
138
|
+
"dev": "tsup --watch --onSuccess \"pnpm run generate-graphql-schema\"",
|
|
139
|
+
"test": "jest --passWithNoTests",
|
|
140
|
+
"check-types": "tsc --noEmit",
|
|
141
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__",
|
|
142
|
+
"generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts",
|
|
143
|
+
"link:global": "pnpm link --global",
|
|
144
|
+
"unlink:global": "pnpm unlink --global"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { describe, test, expect
|
|
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 =
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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:
|
|
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:
|
|
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 =
|
|
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 =
|
|
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:
|
|
997
|
+
render: jest.fn((props) => "Specific action rendered"),
|
|
996
998
|
},
|
|
997
999
|
"*": {
|
|
998
1000
|
name: "*",
|
|
999
|
-
render:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
1406
|
+
render: jest.fn((props) => "First wildcard"),
|
|
1405
1407
|
},
|
|
1406
1408
|
wildcard2: {
|
|
1407
1409
|
name: "*",
|
|
1408
|
-
render:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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:
|
|
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 =
|
|
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 =
|
|
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 =
|
|
484
|
+
const mockRender = jest.fn(
|
|
485
485
|
(props) => `Wildcard action: ${props.name} with ${JSON.stringify(props.args)}`,
|
|
486
486
|
);
|
|
487
487
|
|
package/src/langgraph.ts
ADDED
|
@@ -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-
|
|
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
|
-
|
|
27
|
+
if (serviceAdapter) {
|
|
28
|
+
options.runtime.handleServiceAdapter(serviceAdapter);
|
|
29
|
+
}
|
|
28
30
|
|
|
29
31
|
const copilotRoute = createCopilotEndpointSingleRoute({
|
|
30
32
|
runtime: options.runtime.instance,
|