@copilotkit/runtime-client-gql 1.50.2-next.0 → 1.51.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 (49) hide show
  1. package/CHANGELOG.md +6 -15
  2. package/LICENSE +21 -0
  3. package/dist/{chunk-WUF3XSW5.mjs → chunk-3ETRQN2E.mjs} +2 -2
  4. package/dist/{chunk-YLBJJZHO.mjs → chunk-FVKO3JII.mjs} +4 -4
  5. package/dist/{chunk-YLBJJZHO.mjs.map → chunk-FVKO3JII.mjs.map} +1 -1
  6. package/dist/{chunk-EWRHYLZE.mjs → chunk-KTA7QTTU.mjs} +2 -2
  7. package/dist/{chunk-SVJN2STA.mjs → chunk-L6PM6AT3.mjs} +826 -869
  8. package/dist/chunk-L6PM6AT3.mjs.map +1 -0
  9. package/dist/{chunk-AQ2Y6PF5.mjs → chunk-M5LBGBWO.mjs} +1 -1
  10. package/dist/chunk-M5LBGBWO.mjs.map +1 -0
  11. package/dist/client/CopilotRuntimeClient.js +1 -1
  12. package/dist/client/CopilotRuntimeClient.js.map +1 -1
  13. package/dist/client/CopilotRuntimeClient.mjs +4 -4
  14. package/dist/client/index.js +1 -1
  15. package/dist/client/index.js.map +1 -1
  16. package/dist/client/index.mjs +4 -4
  17. package/dist/graphql/@generated/gql.d.ts +7 -12
  18. package/dist/graphql/@generated/gql.js.map +1 -1
  19. package/dist/graphql/@generated/gql.mjs +1 -1
  20. package/dist/graphql/@generated/index.js.map +1 -1
  21. package/dist/graphql/@generated/index.mjs +1 -1
  22. package/dist/graphql/definitions/mutations.js.map +1 -1
  23. package/dist/graphql/definitions/mutations.mjs +2 -2
  24. package/dist/graphql/definitions/queries.js.map +1 -1
  25. package/dist/graphql/definitions/queries.mjs +2 -2
  26. package/dist/index.js +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +4 -4
  29. package/dist/{magic-string.es-O42ACB6H.mjs → magic-string.es-26DP735G.mjs} +22 -6
  30. package/dist/magic-string.es-26DP735G.mjs.map +1 -0
  31. package/dist/message-conversion/agui-to-gql.mjs +4 -4
  32. package/dist/message-conversion/agui-to-gql.test.js +861 -888
  33. package/dist/message-conversion/agui-to-gql.test.js.map +1 -1
  34. package/dist/message-conversion/agui-to-gql.test.mjs +5 -5
  35. package/dist/message-conversion/gql-to-agui.mjs +4 -4
  36. package/dist/message-conversion/gql-to-agui.test.js +861 -888
  37. package/dist/message-conversion/gql-to-agui.test.js.map +1 -1
  38. package/dist/message-conversion/gql-to-agui.test.mjs +5 -5
  39. package/dist/message-conversion/index.mjs +4 -4
  40. package/dist/message-conversion/roundtrip-conversion.test.js +864 -891
  41. package/dist/message-conversion/roundtrip-conversion.test.js.map +1 -1
  42. package/dist/message-conversion/roundtrip-conversion.test.mjs +5 -5
  43. package/package.json +6 -5
  44. package/src/graphql/@generated/gql.ts +7 -1
  45. package/dist/chunk-AQ2Y6PF5.mjs.map +0 -1
  46. package/dist/chunk-SVJN2STA.mjs.map +0 -1
  47. package/dist/magic-string.es-O42ACB6H.mjs.map +0 -1
  48. /package/dist/{chunk-WUF3XSW5.mjs.map → chunk-3ETRQN2E.mjs.map} +0 -0
  49. /package/dist/{chunk-EWRHYLZE.mjs.map → chunk-KTA7QTTU.mjs.map} +0 -0
@@ -9,12 +9,12 @@ import {
9
9
  globalExpect,
10
10
  test,
11
11
  vi
12
- } from "../chunk-SVJN2STA.mjs";
12
+ } from "../chunk-L6PM6AT3.mjs";
13
13
  import "../chunk-7ECCT6PK.mjs";
14
- import "../chunk-YLBJJZHO.mjs";
15
- import "../chunk-WUF3XSW5.mjs";
16
- import "../chunk-EWRHYLZE.mjs";
17
- import "../chunk-AQ2Y6PF5.mjs";
14
+ import "../chunk-FVKO3JII.mjs";
15
+ import "../chunk-3ETRQN2E.mjs";
16
+ import "../chunk-KTA7QTTU.mjs";
17
+ import "../chunk-M5LBGBWO.mjs";
18
18
  import "../chunk-AMFKR5ST.mjs";
19
19
  import {
20
20
  ActionExecutionMessage,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.50.2-next.0",
12
+ "version": "1.51.0-next.1",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -23,7 +23,8 @@
23
23
  "types": "./dist/index.d.ts",
24
24
  "license": "MIT",
25
25
  "peerDependencies": {
26
- "react": "^18 || ^19 || ^19.0.0-rc"
26
+ "react": "^18 || ^19 || ^19.0.0-rc",
27
+ "@copilotkit/shared": "1.51.0-next.1"
27
28
  },
28
29
  "devDependencies": {
29
30
  "@graphql-codegen/cli": "^5.0.2",
@@ -45,13 +46,13 @@
45
46
  "tsup": "^6.7.0",
46
47
  "typescript": "^5.4.5",
47
48
  "vitest": "^3.1.3",
48
- "@copilotkit/runtime": "1.50.2-next.0"
49
+ "@copilotkit/runtime": "1.51.0-next.1",
50
+ "@copilotkit/shared": "1.51.0-next.1"
49
51
  },
50
52
  "dependencies": {
51
53
  "@urql/core": "^5.0.3",
52
54
  "untruncate-json": "^0.0.1",
53
- "urql": "^4.1.0",
54
- "@copilotkit/shared": "1.50.2-next.0"
55
+ "urql": "^4.1.0"
55
56
  },
56
57
  "keywords": [
57
58
  "copilotkit",
@@ -11,8 +11,14 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-
11
11
  * 3. It does not support dead code elimination, so it will add unused operations.
12
12
  *
13
13
  * Therefore it is highly recommended to use the babel or swc plugin for production.
14
+ * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
14
15
  */
15
- const documents = {
16
+ type Documents = {
17
+ "\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n extensions {\n openaiAssistantAPI {\n runId\n threadId\n }\n }\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n ... on FailedResponseStatus {\n reason\n details\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n parentMessageId\n }\n ... on ImageMessageOutput {\n format\n bytes\n role\n parentMessageId\n }\n ... on ActionExecutionMessageOutput {\n name\n arguments @stream\n parentMessageId\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n ... on AgentStateMessageOutput {\n threadId\n state\n running\n agentName\n nodeName\n runId\n active\n role\n }\n }\n metaEvents @stream {\n ... on LangGraphInterruptEvent {\n type\n name\n value\n }\n\n ... on CopilotKitLangGraphInterruptEvent {\n type\n name\n data {\n messages {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content\n role\n parentMessageId\n }\n ... on ActionExecutionMessageOutput {\n name\n arguments\n parentMessageId\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n value\n }\n }\n }\n }\n }\n": typeof types.GenerateCopilotResponseDocument,
18
+ "\n query availableAgents {\n availableAgents {\n agents {\n name\n id\n description\n }\n }\n }\n": typeof types.AvailableAgentsDocument,
19
+ "\n query loadAgentState($data: LoadAgentStateInput!) {\n loadAgentState(data: $data) {\n threadId\n threadExists\n state\n messages\n }\n }\n": typeof types.LoadAgentStateDocument,
20
+ };
21
+ const documents: Documents = {
16
22
  "\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n extensions {\n openaiAssistantAPI {\n runId\n threadId\n }\n }\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n ... on FailedResponseStatus {\n reason\n details\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n parentMessageId\n }\n ... on ImageMessageOutput {\n format\n bytes\n role\n parentMessageId\n }\n ... on ActionExecutionMessageOutput {\n name\n arguments @stream\n parentMessageId\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n ... on AgentStateMessageOutput {\n threadId\n state\n running\n agentName\n nodeName\n runId\n active\n role\n }\n }\n metaEvents @stream {\n ... on LangGraphInterruptEvent {\n type\n name\n value\n }\n\n ... on CopilotKitLangGraphInterruptEvent {\n type\n name\n data {\n messages {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content\n role\n parentMessageId\n }\n ... on ActionExecutionMessageOutput {\n name\n arguments\n parentMessageId\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n value\n }\n }\n }\n }\n }\n": types.GenerateCopilotResponseDocument,
17
23
  "\n query availableAgents {\n availableAgents {\n agents {\n name\n id\n description\n }\n }\n }\n": types.AvailableAgentsDocument,
18
24
  "\n query loadAgentState($data: LoadAgentStateInput!) {\n loadAgentState(data: $data) {\n threadId\n threadExists\n state\n messages\n }\n }\n": types.LoadAgentStateDocument,
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/graphql/@generated/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n \"\\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\\n generateCopilotResponse(data: $data, properties: $properties) {\\n threadId\\n runId\\n extensions {\\n openaiAssistantAPI {\\n runId\\n threadId\\n }\\n }\\n ... on CopilotResponse @defer {\\n status {\\n ... on BaseResponseStatus {\\n code\\n }\\n ... on FailedResponseStatus {\\n reason\\n details\\n }\\n }\\n }\\n messages @stream {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content @stream\\n role\\n parentMessageId\\n }\\n ... on ImageMessageOutput {\\n format\\n bytes\\n role\\n parentMessageId\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n arguments @stream\\n parentMessageId\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n ... on AgentStateMessageOutput {\\n threadId\\n state\\n running\\n agentName\\n nodeName\\n runId\\n active\\n role\\n }\\n }\\n metaEvents @stream {\\n ... on LangGraphInterruptEvent {\\n type\\n name\\n value\\n }\\n\\n ... on CopilotKitLangGraphInterruptEvent {\\n type\\n name\\n data {\\n messages {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content\\n role\\n parentMessageId\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n arguments\\n parentMessageId\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n }\\n value\\n }\\n }\\n }\\n }\\n }\\n\": types.GenerateCopilotResponseDocument,\n \"\\n query availableAgents {\\n availableAgents {\\n agents {\\n name\\n id\\n description\\n }\\n }\\n }\\n\": types.AvailableAgentsDocument,\n \"\\n query loadAgentState($data: LoadAgentStateInput!) {\\n loadAgentState(data: $data) {\\n threadId\\n threadExists\\n state\\n messages\\n }\\n }\\n\": types.LoadAgentStateDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\\n generateCopilotResponse(data: $data, properties: $properties) {\\n threadId\\n runId\\n extensions {\\n openaiAssistantAPI {\\n runId\\n threadId\\n }\\n }\\n ... on CopilotResponse @defer {\\n status {\\n ... on BaseResponseStatus {\\n code\\n }\\n ... on FailedResponseStatus {\\n reason\\n details\\n }\\n }\\n }\\n messages @stream {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content @stream\\n role\\n parentMessageId\\n }\\n ... on ImageMessageOutput {\\n format\\n bytes\\n role\\n parentMessageId\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n arguments @stream\\n parentMessageId\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n ... on AgentStateMessageOutput {\\n threadId\\n state\\n running\\n agentName\\n nodeName\\n runId\\n active\\n role\\n }\\n }\\n metaEvents @stream {\\n ... on LangGraphInterruptEvent {\\n type\\n name\\n value\\n }\\n\\n ... on CopilotKitLangGraphInterruptEvent {\\n type\\n name\\n data {\\n messages {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content\\n role\\n parentMessageId\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n arguments\\n parentMessageId\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n }\\n value\\n }\\n }\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\\n generateCopilotResponse(data: $data, properties: $properties) {\\n threadId\\n runId\\n extensions {\\n openaiAssistantAPI {\\n runId\\n threadId\\n }\\n }\\n ... on CopilotResponse @defer {\\n status {\\n ... on BaseResponseStatus {\\n code\\n }\\n ... on FailedResponseStatus {\\n reason\\n details\\n }\\n }\\n }\\n messages @stream {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content @stream\\n role\\n parentMessageId\\n }\\n ... on ImageMessageOutput {\\n format\\n bytes\\n role\\n parentMessageId\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n arguments @stream\\n parentMessageId\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n ... on AgentStateMessageOutput {\\n threadId\\n state\\n running\\n agentName\\n nodeName\\n runId\\n active\\n role\\n }\\n }\\n metaEvents @stream {\\n ... on LangGraphInterruptEvent {\\n type\\n name\\n value\\n }\\n\\n ... on CopilotKitLangGraphInterruptEvent {\\n type\\n name\\n data {\\n messages {\\n __typename\\n ... on BaseMessageOutput {\\n id\\n createdAt\\n }\\n ... on BaseMessageOutput @defer {\\n status {\\n ... on SuccessMessageStatus {\\n code\\n }\\n ... on FailedMessageStatus {\\n code\\n reason\\n }\\n ... on PendingMessageStatus {\\n code\\n }\\n }\\n }\\n ... on TextMessageOutput {\\n content\\n role\\n parentMessageId\\n }\\n ... on ActionExecutionMessageOutput {\\n name\\n arguments\\n parentMessageId\\n }\\n ... on ResultMessageOutput {\\n result\\n actionExecutionId\\n actionName\\n }\\n }\\n value\\n }\\n }\\n }\\n }\\n }\\n\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query availableAgents {\\n availableAgents {\\n agents {\\n name\\n id\\n description\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query availableAgents {\\n availableAgents {\\n agents {\\n name\\n id\\n description\\n }\\n }\\n }\\n\"];\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query loadAgentState($data: LoadAgentStateInput!) {\\n loadAgentState(data: $data) {\\n threadId\\n threadExists\\n state\\n messages\\n }\\n }\\n\"): (typeof documents)[\"\\n query loadAgentState($data: LoadAgentStateInput!) {\\n loadAgentState(data: $data) {\\n threadId\\n threadExists\\n state\\n messages\\n }\\n }\\n\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;"],"mappings":";;;;;;;AAcA,IAAM,YAAY;AAAA,EACd,m/FAAy/F;AAAA,EACz/F,4IAAkJ;AAAA,EAClJ,6KAAmL;AACvL;AA6BO,SAAS,QAAQ,QAAgB;AACtC,SAAQ,UAAkB,MAAM,KAAK,CAAC;AACxC;","names":[]}