@copilotkit/runtime 1.2.0 → 1.2.2-feat-runtime-remote-actions.0

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 (75) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/__snapshots__/schema/schema.graphql +41 -0
  3. package/dist/{chunk-HCUZC4GO.mjs → chunk-2N45GS3P.mjs} +2 -2
  4. package/dist/{chunk-URMISMK2.mjs → chunk-73NMP3DI.mjs} +2 -2
  5. package/dist/{chunk-736EEICU.mjs → chunk-BJ2LVHWA.mjs} +3 -3
  6. package/dist/{chunk-ZHFBLKC3.mjs → chunk-T6O5FSTK.mjs} +2 -2
  7. package/dist/{chunk-GEIBJJQ4.mjs → chunk-TBZGOJJX.mjs} +14 -2
  8. package/dist/chunk-TBZGOJJX.mjs.map +1 -0
  9. package/dist/{chunk-3MYGPMKL.mjs → chunk-X5QBBMCJ.mjs} +2 -2
  10. package/dist/{chunk-3TQLJ3YL.mjs → chunk-XROLDARH.mjs} +786 -158
  11. package/dist/chunk-XROLDARH.mjs.map +1 -0
  12. package/dist/chunk-ZNZGATLW.mjs +260 -0
  13. package/dist/chunk-ZNZGATLW.mjs.map +1 -0
  14. package/dist/{shared-c5362338.d.ts → copilot-runtime-d427e991.d.ts} +65 -38
  15. package/dist/graphql/types/converted/index.d.ts +1 -1
  16. package/dist/graphql/types/converted/index.js +13 -0
  17. package/dist/graphql/types/converted/index.js.map +1 -1
  18. package/dist/graphql/types/converted/index.mjs +3 -1
  19. package/dist/{index-aa091e3c.d.ts → index-0476e4f7.d.ts} +24 -2
  20. package/dist/{index-13aa818e.d.ts → index-079752b9.d.ts} +1 -1
  21. package/dist/index.d.ts +7 -7
  22. package/dist/index.js +982 -245
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.mjs +8 -8
  25. package/dist/{langserve-a54438c6.d.ts → langserve-d6073a3b.d.ts} +24 -11
  26. package/dist/lib/index.d.ts +7 -7
  27. package/dist/lib/index.js +982 -245
  28. package/dist/lib/index.js.map +1 -1
  29. package/dist/lib/index.mjs +8 -8
  30. package/dist/lib/integrations/index.d.ts +6 -6
  31. package/dist/lib/integrations/index.js +437 -182
  32. package/dist/lib/integrations/index.js.map +1 -1
  33. package/dist/lib/integrations/index.mjs +6 -6
  34. package/dist/lib/integrations/nest/index.d.ts +5 -5
  35. package/dist/lib/integrations/nest/index.js +437 -182
  36. package/dist/lib/integrations/nest/index.js.map +1 -1
  37. package/dist/lib/integrations/nest/index.mjs +4 -4
  38. package/dist/lib/integrations/node-express/index.d.ts +5 -5
  39. package/dist/lib/integrations/node-express/index.js +437 -182
  40. package/dist/lib/integrations/node-express/index.js.map +1 -1
  41. package/dist/lib/integrations/node-express/index.mjs +4 -4
  42. package/dist/lib/integrations/node-http/index.d.ts +5 -5
  43. package/dist/lib/integrations/node-http/index.js +437 -182
  44. package/dist/lib/integrations/node-http/index.js.map +1 -1
  45. package/dist/lib/integrations/node-http/index.mjs +3 -3
  46. package/dist/service-adapters/index.d.ts +3 -3
  47. package/dist/service-adapters/index.js.map +1 -1
  48. package/dist/service-adapters/index.mjs +3 -3
  49. package/package.json +7 -5
  50. package/src/agents/langgraph/event-source.ts +222 -0
  51. package/src/agents/langgraph/events.ts +309 -0
  52. package/src/graphql/inputs/agent-session.input.ts +13 -0
  53. package/src/graphql/inputs/agent-state.input.ts +10 -0
  54. package/src/graphql/inputs/generate-copilot-response.input.ts +11 -0
  55. package/src/graphql/inputs/message.input.ts +30 -0
  56. package/src/graphql/resolvers/copilot.resolver.ts +56 -12
  57. package/src/graphql/types/converted/index.ts +15 -0
  58. package/src/graphql/types/copilot-response.type.ts +29 -0
  59. package/src/graphql/types/enums.ts +1 -0
  60. package/src/lib/index.ts +1 -1
  61. package/src/lib/integrations/shared.ts +1 -1
  62. package/src/lib/runtime/copilot-runtime.ts +360 -0
  63. package/src/lib/runtime/remote-actions.ts +241 -0
  64. package/src/service-adapters/conversion.ts +16 -0
  65. package/src/service-adapters/events.ts +101 -19
  66. package/dist/chunk-3TQLJ3YL.mjs.map +0 -1
  67. package/dist/chunk-GEIBJJQ4.mjs.map +0 -1
  68. package/dist/chunk-MHLJQ2RF.mjs +0 -158
  69. package/dist/chunk-MHLJQ2RF.mjs.map +0 -1
  70. package/src/lib/copilot-runtime.ts +0 -231
  71. /package/dist/{chunk-HCUZC4GO.mjs.map → chunk-2N45GS3P.mjs.map} +0 -0
  72. /package/dist/{chunk-URMISMK2.mjs.map → chunk-73NMP3DI.mjs.map} +0 -0
  73. /package/dist/{chunk-736EEICU.mjs.map → chunk-BJ2LVHWA.mjs.map} +0 -0
  74. /package/dist/{chunk-ZHFBLKC3.mjs.map → chunk-T6O5FSTK.mjs.map} +0 -0
  75. /package/dist/{chunk-3MYGPMKL.mjs.map → chunk-X5QBBMCJ.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.2.2-feat-runtime-remote-actions.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Prerelease
8
+ - 0d54450: Include agent state
9
+ - 8d32e22: Show agent state in the chat window
10
+ - 5b63f55: stream intermediate state
11
+ - b6fd3d8: Better message grouping
12
+ - 89420c6: Rename hooks and bugfixes
13
+ - b6e8824: useCoAgent/useCoAgentAction
14
+ - 91c35b9: useAgentState
15
+ - 00be203: Remote actions preview
16
+ - fb15f72: Reduce request size by skipping intermediate state
17
+ - Updated dependencies
18
+ - Updated dependencies [0d54450]
19
+ - Updated dependencies [8d32e22]
20
+ - Updated dependencies [5b63f55]
21
+ - Updated dependencies [b6fd3d8]
22
+ - Updated dependencies [89420c6]
23
+ - Updated dependencies [b6e8824]
24
+ - Updated dependencies [91c35b9]
25
+ - Updated dependencies [00be203]
26
+ - Updated dependencies [fb15f72]
27
+ - @copilotkit/shared@1.2.2-feat-runtime-remote-actions.0
28
+
29
+ ## 1.2.1
30
+
31
+ ### Patch Changes
32
+
33
+ - inject minified css in bundle
34
+
35
+ - removes the need to import `styles.css` manually
36
+ - empty `styles.css` included in the build for backwards compatibility
37
+ - uses tsup's `injectStyles` with `postcss` to bundle and minify the CSS, then inject it as a style tag
38
+ - currently uses my fork of `tsup` where I added support for async function in `injectStyles` (must-have for postcss), a PR from my fork to the main library will follow shortly
39
+ - remove material-ui, and use `react-icons` for icons (same icons as before)
40
+ - remove unused `IncludedFilesPreview` component
41
+ - updated docs
42
+
43
+ - Updated dependencies
44
+ - @copilotkit/shared@1.2.1
45
+
3
46
  ## 1.2.0
4
47
 
5
48
  ### Minor Changes
@@ -21,6 +21,7 @@ type ActionExecutionMessageOutput implements BaseMessageOutput {
21
21
  """The scope of the action"""
22
22
  enum ActionExecutionScope {
23
23
  client
24
+ passThrough
24
25
  server
25
26
  }
26
27
 
@@ -30,6 +31,42 @@ input ActionInput {
30
31
  name: String!
31
32
  }
32
33
 
34
+ input AgentSessionInput {
35
+ agentName: String!
36
+ nodeName: String
37
+ threadId: String
38
+ }
39
+
40
+ input AgentStateInput {
41
+ agentName: String!
42
+ state: String!
43
+ }
44
+
45
+ input AgentStateMessageInput {
46
+ active: Boolean!
47
+ agentName: String!
48
+ nodeName: String!
49
+ role: MessageRole!
50
+ runId: String!
51
+ running: Boolean!
52
+ state: String!
53
+ threadId: String!
54
+ }
55
+
56
+ type AgentStateMessageOutput implements BaseMessageOutput {
57
+ active: Boolean!
58
+ agentName: String!
59
+ createdAt: DateTimeISO!
60
+ id: String!
61
+ nodeName: String!
62
+ role: MessageRole!
63
+ runId: String!
64
+ running: Boolean!
65
+ state: String!
66
+ status: MessageStatus!
67
+ threadId: String!
68
+ }
69
+
33
70
  interface BaseMessageOutput {
34
71
  createdAt: DateTimeISO!
35
72
  id: String!
@@ -97,6 +134,9 @@ input FrontendInput {
97
134
  }
98
135
 
99
136
  input GenerateCopilotResponseInput {
137
+ agentSession: AgentSessionInput
138
+ agentState: AgentStateInput
139
+ agentStates: [AgentStateInput!]
100
140
  cloud: CloudInput
101
141
  forwardedParameters: ForwardedParametersInput
102
142
  frontend: FrontendInput!
@@ -131,6 +171,7 @@ scalar JSONObject @specifiedBy(url: "http://www.ecma-international.org/publicati
131
171
 
132
172
  input MessageInput {
133
173
  actionExecutionMessage: ActionExecutionMessageInput
174
+ agentStateMessage: AgentStateMessageInput
134
175
  createdAt: DateTimeISO!
135
176
  id: String!
136
177
  resultMessage: ResultMessageInput
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  telemetry_client_default
4
- } from "./chunk-3TQLJ3YL.mjs";
4
+ } from "./chunk-XROLDARH.mjs";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-44O2JGUY.mjs";
@@ -21,4 +21,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
21
21
  export {
22
22
  copilotRuntimeNestEndpoint
23
23
  };
24
- //# sourceMappingURL=chunk-HCUZC4GO.mjs.map
24
+ //# sourceMappingURL=chunk-2N45GS3P.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  ActionExecutionMessage,
3
3
  ResultMessage,
4
4
  TextMessage
5
- } from "./chunk-GEIBJJQ4.mjs";
5
+ } from "./chunk-TBZGOJJX.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-44O2JGUY.mjs";
@@ -204,4 +204,4 @@ export {
204
204
  convertActionInputToLangChainTool,
205
205
  streamLangChainResponse
206
206
  };
207
- //# sourceMappingURL=chunk-URMISMK2.mjs.map
207
+ //# sourceMappingURL=chunk-73NMP3DI.mjs.map
@@ -2,12 +2,12 @@ import {
2
2
  convertActionInputToLangChainTool,
3
3
  convertMessageToLangChainMessage,
4
4
  streamLangChainResponse
5
- } from "./chunk-URMISMK2.mjs";
5
+ } from "./chunk-73NMP3DI.mjs";
6
6
  import {
7
7
  ActionExecutionMessage,
8
8
  ResultMessage,
9
9
  TextMessage
10
- } from "./chunk-GEIBJJQ4.mjs";
10
+ } from "./chunk-TBZGOJJX.mjs";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-44O2JGUY.mjs";
@@ -899,4 +899,4 @@ export {
899
899
  UnifyAdapter,
900
900
  GroqAdapter
901
901
  };
902
- //# sourceMappingURL=chunk-736EEICU.mjs.map
902
+ //# sourceMappingURL=chunk-BJ2LVHWA.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  telemetry_client_default
4
- } from "./chunk-3TQLJ3YL.mjs";
4
+ } from "./chunk-XROLDARH.mjs";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-44O2JGUY.mjs";
@@ -21,4 +21,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
21
21
  export {
22
22
  copilotRuntimeNodeExpressEndpoint
23
23
  };
24
- //# sourceMappingURL=chunk-ZHFBLKC3.mjs.map
24
+ //# sourceMappingURL=chunk-T6O5FSTK.mjs.map
@@ -23,10 +23,22 @@ var ResultMessage = class extends BaseMessage {
23
23
  result;
24
24
  };
25
25
  __name(ResultMessage, "ResultMessage");
26
+ var AgentStateMessage = class extends BaseMessage {
27
+ threadId;
28
+ agentName;
29
+ nodeName;
30
+ runId;
31
+ active;
32
+ role;
33
+ state;
34
+ running;
35
+ };
36
+ __name(AgentStateMessage, "AgentStateMessage");
26
37
 
27
38
  export {
28
39
  TextMessage,
29
40
  ActionExecutionMessage,
30
- ResultMessage
41
+ ResultMessage,
42
+ AgentStateMessage
31
43
  };
32
- //# sourceMappingURL=chunk-GEIBJJQ4.mjs.map
44
+ //# sourceMappingURL=chunk-TBZGOJJX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graphql/types/converted/index.ts"],"sourcesContent":["import {\n ActionExecutionMessageInput,\n ResultMessageInput,\n TextMessageInput,\n AgentStateMessageInput,\n} from \"../../inputs/message.input\";\nimport { BaseMessage } from \"../base\";\nimport { ActionExecutionScope, MessageRole } from \"../enums\";\n\nexport class TextMessage extends BaseMessage implements TextMessageInput {\n content: string;\n role: MessageRole;\n}\n\nexport type Message = BaseMessage;\n\nexport class ActionExecutionMessage\n extends BaseMessage\n implements Omit<ActionExecutionMessageInput, \"arguments\">\n{\n name: string;\n arguments: Record<string, any>;\n scope: ActionExecutionScope;\n}\n\nexport class ResultMessage extends BaseMessage implements ResultMessageInput {\n actionExecutionId: string;\n actionName: string;\n result: string;\n}\n\nexport class AgentStateMessage\n extends BaseMessage\n implements Omit<AgentStateMessageInput, \"state\">\n{\n threadId: string;\n agentName: string;\n nodeName: string;\n runId: string;\n active: boolean;\n role: MessageRole;\n state: any;\n running: boolean;\n}\n"],"mappings":";;;;;;;;AASO,IAAMA,cAAN,cAA0BC,YAAAA;EAC/BC;EACAC;AACF;AAHaH;AAON,IAAMI,yBAAN,cACGH,YAAAA;EAGRI;EACAC;EACAC;AACF;AAPaH;AASN,IAAMI,gBAAN,cAA4BP,YAAAA;EACjCQ;EACAC;EACAC;AACF;AAJaH;AAMN,IAAMI,oBAAN,cACGX,YAAAA;EAGRY;EACAC;EACAC;EACAC;EACAC;EACAd;EACAe;EACAC;AACF;AAZaP;","names":["TextMessage","BaseMessage","content","role","ActionExecutionMessage","name","arguments","scope","ResultMessage","actionExecutionId","actionName","result","AgentStateMessage","threadId","agentName","nodeName","runId","active","state","running"]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getCommonConfig,
3
3
  telemetry_client_default
4
- } from "./chunk-3TQLJ3YL.mjs";
4
+ } from "./chunk-XROLDARH.mjs";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-44O2JGUY.mjs";
@@ -76,4 +76,4 @@ export {
76
76
  config,
77
77
  copilotRuntimeNextJSPagesRouterEndpoint
78
78
  };
79
- //# sourceMappingURL=chunk-3MYGPMKL.mjs.map
79
+ //# sourceMappingURL=chunk-X5QBBMCJ.mjs.map