@copilotkit/runtime 0.0.0-0.0.0-max-changeset-10101010101010-20260109191632
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/.eslintrc.js +7 -0
- package/CHANGELOG.md +2905 -0
- package/LICENSE +21 -0
- package/README.md +76 -0
- package/__snapshots__/schema/schema.graphql +371 -0
- package/dist/index.d.ts +1495 -0
- package/dist/index.js +5644 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5601 -0
- package/dist/index.mjs.map +1 -0
- 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/v2/index.d.ts +2 -0
- package/dist/v2/index.js +22 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/index.mjs +5 -0
- package/dist/v2/index.mjs.map +1 -0
- package/jest.config.js +10 -0
- package/package.json +143 -0
- package/scripts/generate-gql-schema.ts +13 -0
- package/src/agents/langgraph/event-source.ts +329 -0
- package/src/agents/langgraph/events.ts +377 -0
- package/src/graphql/inputs/action.input.ts +16 -0
- package/src/graphql/inputs/agent-session.input.ts +13 -0
- package/src/graphql/inputs/agent-state.input.ts +13 -0
- package/src/graphql/inputs/cloud-guardrails.input.ts +16 -0
- package/src/graphql/inputs/cloud.input.ts +8 -0
- package/src/graphql/inputs/context-property.input.ts +10 -0
- package/src/graphql/inputs/copilot-context.input.ts +10 -0
- package/src/graphql/inputs/custom-property.input.ts +15 -0
- package/src/graphql/inputs/extensions.input.ts +21 -0
- package/src/graphql/inputs/forwarded-parameters.input.ts +22 -0
- package/src/graphql/inputs/frontend.input.ts +14 -0
- package/src/graphql/inputs/generate-copilot-response.input.ts +59 -0
- package/src/graphql/inputs/load-agent-state.input.ts +10 -0
- package/src/graphql/inputs/message.input.ts +110 -0
- package/src/graphql/inputs/meta-event.input.ts +18 -0
- package/src/graphql/message-conversion/agui-to-gql.test.ts +1263 -0
- package/src/graphql/message-conversion/agui-to-gql.ts +333 -0
- package/src/graphql/message-conversion/gql-to-agui.test.ts +1580 -0
- package/src/graphql/message-conversion/gql-to-agui.ts +278 -0
- package/src/graphql/message-conversion/index.ts +2 -0
- package/src/graphql/message-conversion/roundtrip-conversion.test.ts +526 -0
- package/src/graphql/resolvers/copilot.resolver.ts +708 -0
- package/src/graphql/resolvers/state.resolver.ts +27 -0
- package/src/graphql/types/agents-response.type.ts +19 -0
- package/src/graphql/types/base/index.ts +10 -0
- package/src/graphql/types/converted/index.ts +176 -0
- package/src/graphql/types/copilot-response.type.ts +138 -0
- package/src/graphql/types/enums.ts +38 -0
- package/src/graphql/types/extensions-response.type.ts +23 -0
- package/src/graphql/types/guardrails-result.type.ts +20 -0
- package/src/graphql/types/load-agent-state-response.type.ts +17 -0
- package/src/graphql/types/message-status.type.ts +42 -0
- package/src/graphql/types/meta-events.type.ts +71 -0
- package/src/graphql/types/response-status.type.ts +66 -0
- package/src/index.ts +4 -0
- package/src/langgraph.ts +1 -0
- package/src/lib/cloud/index.ts +4 -0
- package/src/lib/error-messages.ts +200 -0
- package/src/lib/index.ts +52 -0
- package/src/lib/integrations/index.ts +6 -0
- package/src/lib/integrations/nest/index.ts +14 -0
- package/src/lib/integrations/nextjs/app-router.ts +38 -0
- package/src/lib/integrations/nextjs/pages-router.ts +39 -0
- package/src/lib/integrations/node-express/index.ts +14 -0
- package/src/lib/integrations/node-http/index.ts +143 -0
- package/src/lib/integrations/node-http/request-handler.ts +111 -0
- package/src/lib/integrations/shared.ts +161 -0
- package/src/lib/logger.ts +28 -0
- package/src/lib/observability.ts +160 -0
- package/src/lib/runtime/__tests__/copilot-runtime-error.test.ts +169 -0
- package/src/lib/runtime/__tests__/mcp-tools-utils.test.ts +464 -0
- package/src/lib/runtime/agent-integrations/langgraph/agent.ts +209 -0
- 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 +710 -0
- package/src/lib/runtime/mcp-tools-utils.ts +254 -0
- package/src/lib/runtime/retry-utils.ts +96 -0
- package/src/lib/runtime/telemetry-agent-runner.ts +139 -0
- package/src/lib/runtime/types.ts +49 -0
- package/src/lib/runtime/utils.ts +87 -0
- package/src/lib/streaming.ts +202 -0
- package/src/lib/telemetry-client.ts +64 -0
- package/src/service-adapters/anthropic/anthropic-adapter.ts +452 -0
- package/src/service-adapters/anthropic/utils.ts +152 -0
- package/src/service-adapters/bedrock/bedrock-adapter.ts +73 -0
- package/src/service-adapters/conversion.ts +67 -0
- package/src/service-adapters/empty/empty-adapter.ts +38 -0
- package/src/service-adapters/events.ts +294 -0
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +84 -0
- package/src/service-adapters/google/google-genai-adapter.test.ts +104 -0
- package/src/service-adapters/google/google-genai-adapter.ts +88 -0
- package/src/service-adapters/groq/groq-adapter.ts +203 -0
- package/src/service-adapters/index.ts +18 -0
- package/src/service-adapters/langchain/langchain-adapter.ts +111 -0
- package/src/service-adapters/langchain/langserve.ts +88 -0
- package/src/service-adapters/langchain/types.ts +14 -0
- package/src/service-adapters/langchain/utils.ts +313 -0
- package/src/service-adapters/openai/openai-adapter.ts +283 -0
- package/src/service-adapters/openai/openai-assistant-adapter.ts +344 -0
- package/src/service-adapters/openai/utils.ts +199 -0
- package/src/service-adapters/service-adapter.ts +41 -0
- package/src/service-adapters/shared/error-utils.ts +61 -0
- package/src/service-adapters/shared/index.ts +1 -0
- package/src/service-adapters/unify/unify-adapter.ts +151 -0
- package/src/utils/failed-response-status-reasons.ts +70 -0
- package/src/utils/index.ts +1 -0
- package/src/v2/index.ts +3 -0
- package/tests/global.d.ts +13 -0
- package/tests/service-adapters/anthropic/allowlist-approach.test.ts +226 -0
- package/tests/service-adapters/anthropic/anthropic-adapter.test.ts +389 -0
- package/tests/service-adapters/openai/allowlist-approach.test.ts +238 -0
- package/tests/service-adapters/openai/openai-adapter.test.ts +301 -0
- package/tests/setup.jest.ts +21 -0
- package/tests/tsconfig.json +10 -0
- package/tsconfig.json +13 -0
- package/tsup.config.ts +20 -0
- package/typedoc.json +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Atai Barkai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# CopilotKit - Runtime
|
|
2
|
+
|
|
3
|
+
<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />
|
|
4
|
+
|
|
5
|
+
<br>
|
|
6
|
+
<div align="center" style="display:flex;justify-content:center;gap:16px;height:20px;margin: 0;">
|
|
7
|
+
<a href="https://www.npmjs.com/package/@copilotkit/react-core" target="_blank">
|
|
8
|
+
<img src="https://img.shields.io/npm/v/%40copilotkit%2Fruntime?logo=npm&logoColor=%23FFFFFF&label=Version&color=%236963ff" alt="NPM">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://github.com/copilotkit/copilotkit/blob/main/LICENSE" target="_blank">
|
|
11
|
+
<img src="https://img.shields.io/github/license/copilotkit/copilotkit?color=%236963ff&label=License" alt="MIT">
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://discord.gg/6dffbvGU3D" target="_blank">
|
|
14
|
+
<img src="https://img.shields.io/discord/1122926057641742418?logo=discord&logoColor=%23FFFFFF&label=Discord&color=%236963ff" alt="Discord">
|
|
15
|
+
</a>
|
|
16
|
+
</div>
|
|
17
|
+
<br/>
|
|
18
|
+
<div align="center">
|
|
19
|
+
<a href="https://www.producthunt.com/posts/copilotkit" target="_blank">
|
|
20
|
+
<img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=428778&theme=light&period=daily">
|
|
21
|
+
</a>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
## ✨ Why CopilotKit?
|
|
25
|
+
|
|
26
|
+
- Minutes to integrate - Get started quickly with our CLI
|
|
27
|
+
- Framework agnostic - Works with React, Next.js, AGUI and more
|
|
28
|
+
- Production-ready UI - Use customizable components or build with headless UI
|
|
29
|
+
- Built-in security - Prompt injection protection
|
|
30
|
+
- Open source - Full transparency and community-driven
|
|
31
|
+
|
|
32
|
+
<img src="https://github.com/user-attachments/assets/6cb425f8-ffcb-49d2-9bbb-87cab5995b78" alt="class-support-ecosystem" style="border-radius: 12px; border: 2px solid #d6d4fa;">
|
|
33
|
+
|
|
34
|
+
## 🧑💻 Real life use cases
|
|
35
|
+
|
|
36
|
+
<span>Deploy deeply-integrated AI assistants & agents that work alongside your users inside your applications.</span>
|
|
37
|
+
|
|
38
|
+
<img src="https://github.com/user-attachments/assets/3b810240-e9f8-43ae-acec-31a58095e223" alt="headless-ui" style="border-radius: 12px; border: 2px solid #d6d4fa;">
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## 🏆 Featured Examples
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<a href="https://www.copilotkit.ai/examples/form-filling-copilot">
|
|
45
|
+
<img src="https://github.com/user-attachments/assets/874da84a-67ff-47fa-a6b4-cbc3c65eb704" width="300" style="border-radius: 16px;" />
|
|
46
|
+
</a>
|
|
47
|
+
<a href="https://www.copilotkit.ai/examples/state-machine-copilot">
|
|
48
|
+
<img src="https://github.com/user-attachments/assets/0b5e45b3-2704-4678-82dc-2f3e1c58e2dd" width="300" style="border-radius: 16px;" />
|
|
49
|
+
</a>
|
|
50
|
+
<a href="https://www.copilotkit.ai/examples/chat-with-your-data">
|
|
51
|
+
<img src="https://github.com/user-attachments/assets/0fed66be-a4c2-4093-8eab-75c0b27a62f6" width="300" style="border-radius: 16px;" />
|
|
52
|
+
</a>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
## Documentation
|
|
56
|
+
|
|
57
|
+
To get started with CopilotKit, please check out the [documentation](https://docs.copilotkit.ai).
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## Analytics & Privacy
|
|
61
|
+
|
|
62
|
+
CopilotKit uses [Scarf](https://scarf.sh) for anonymous usage analytics to help improve the product. Scarf handles all privacy compliance and does not store raw IP addresses. This helps us understand how CopilotKit is being used and prioritize improvements.
|
|
63
|
+
|
|
64
|
+
### Opting Out
|
|
65
|
+
|
|
66
|
+
To disable analytics, set the environment variable:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
export COPILOTKIT_TELEMETRY_DISABLED=true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or use the `DO_NOT_TRACK` standard:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
export DO_NOT_TRACK=1
|
|
76
|
+
```
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
# -----------------------------------------------
|
|
2
|
+
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
|
|
3
|
+
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
|
|
4
|
+
# -----------------------------------------------
|
|
5
|
+
|
|
6
|
+
input ActionExecutionMessageInput {
|
|
7
|
+
arguments: String!
|
|
8
|
+
name: String!
|
|
9
|
+
parentMessageId: String
|
|
10
|
+
scope: String @deprecated(reason: "This field will be removed in a future version")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type ActionExecutionMessageOutput implements BaseMessageOutput {
|
|
14
|
+
arguments: [String!]!
|
|
15
|
+
createdAt: DateTimeISO!
|
|
16
|
+
id: String!
|
|
17
|
+
name: String!
|
|
18
|
+
parentMessageId: String
|
|
19
|
+
scope: String @deprecated(reason: "This field will be removed in a future version")
|
|
20
|
+
status: MessageStatus!
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
input ActionInput {
|
|
24
|
+
available: ActionInputAvailability
|
|
25
|
+
description: String!
|
|
26
|
+
jsonSchema: String!
|
|
27
|
+
name: String!
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
"""The availability of the frontend action"""
|
|
31
|
+
enum ActionInputAvailability {
|
|
32
|
+
disabled
|
|
33
|
+
enabled
|
|
34
|
+
remote
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type Agent {
|
|
38
|
+
description: String!
|
|
39
|
+
id: String!
|
|
40
|
+
name: String!
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
input AgentSessionInput {
|
|
44
|
+
agentName: String!
|
|
45
|
+
nodeName: String
|
|
46
|
+
threadId: String
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
input AgentStateInput {
|
|
50
|
+
agentName: String!
|
|
51
|
+
config: String
|
|
52
|
+
state: String!
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
input AgentStateMessageInput {
|
|
56
|
+
active: Boolean!
|
|
57
|
+
agentName: String!
|
|
58
|
+
nodeName: String!
|
|
59
|
+
role: MessageRole!
|
|
60
|
+
runId: String!
|
|
61
|
+
running: Boolean!
|
|
62
|
+
state: String!
|
|
63
|
+
threadId: String!
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type AgentStateMessageOutput implements BaseMessageOutput {
|
|
67
|
+
active: Boolean!
|
|
68
|
+
agentName: String!
|
|
69
|
+
createdAt: DateTimeISO!
|
|
70
|
+
id: String!
|
|
71
|
+
nodeName: String!
|
|
72
|
+
role: MessageRole!
|
|
73
|
+
runId: String!
|
|
74
|
+
running: Boolean!
|
|
75
|
+
state: String!
|
|
76
|
+
status: MessageStatus!
|
|
77
|
+
threadId: String!
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type AgentsResponse {
|
|
81
|
+
agents: [Agent!]!
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface BaseMessageOutput {
|
|
85
|
+
createdAt: DateTimeISO!
|
|
86
|
+
id: String!
|
|
87
|
+
status: MessageStatus!
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface BaseMetaEvent {
|
|
91
|
+
name: MetaEventName!
|
|
92
|
+
type: String!
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface BaseResponseStatus {
|
|
96
|
+
code: ResponseStatusCode!
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
input CloudInput {
|
|
100
|
+
guardrails: GuardrailsInput
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
input CopilotContextInput {
|
|
104
|
+
description: String!
|
|
105
|
+
value: String!
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
type CopilotKitLangGraphInterruptEvent implements BaseMetaEvent {
|
|
109
|
+
data: CopilotKitLangGraphInterruptEventData!
|
|
110
|
+
name: MetaEventName!
|
|
111
|
+
response: String
|
|
112
|
+
type: String!
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type CopilotKitLangGraphInterruptEventData {
|
|
116
|
+
messages: [BaseMessageOutput!]!
|
|
117
|
+
value: String!
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
"""The type of Copilot request"""
|
|
121
|
+
enum CopilotRequestType {
|
|
122
|
+
Chat
|
|
123
|
+
Suggestion
|
|
124
|
+
Task
|
|
125
|
+
TextareaCompletion
|
|
126
|
+
TextareaPopover
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
type CopilotResponse {
|
|
130
|
+
extensions: ExtensionsResponse
|
|
131
|
+
messages: [BaseMessageOutput!]!
|
|
132
|
+
metaEvents: [BaseMetaEvent!]
|
|
133
|
+
runId: String
|
|
134
|
+
status: ResponseStatus!
|
|
135
|
+
threadId: String!
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
"""
|
|
139
|
+
A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.This scalar is serialized to a string in ISO 8601 format and parsed from a string in ISO 8601 format.
|
|
140
|
+
"""
|
|
141
|
+
scalar DateTimeISO
|
|
142
|
+
|
|
143
|
+
input ExtensionsInput {
|
|
144
|
+
openaiAssistantAPI: OpenAIApiAssistantAPIInput
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
type ExtensionsResponse {
|
|
148
|
+
openaiAssistantAPI: OpenAIApiAssistantAPIResponse
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
type FailedMessageStatus {
|
|
152
|
+
code: MessageStatusCode!
|
|
153
|
+
reason: String!
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type FailedResponseStatus implements BaseResponseStatus {
|
|
157
|
+
code: ResponseStatusCode!
|
|
158
|
+
details: JSON
|
|
159
|
+
reason: FailedResponseStatusReason!
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
enum FailedResponseStatusReason {
|
|
163
|
+
GUARDRAILS_VALIDATION_FAILED
|
|
164
|
+
MESSAGE_STREAM_INTERRUPTED
|
|
165
|
+
UNKNOWN_ERROR
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
input ForwardedParametersInput {
|
|
169
|
+
maxTokens: Float
|
|
170
|
+
model: String
|
|
171
|
+
stop: [String!]
|
|
172
|
+
temperature: Float
|
|
173
|
+
toolChoice: String
|
|
174
|
+
toolChoiceFunctionName: String
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
input FrontendInput {
|
|
178
|
+
actions: [ActionInput!]!
|
|
179
|
+
toDeprecate_fullContext: String
|
|
180
|
+
url: String
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
input GenerateCopilotResponseInput {
|
|
184
|
+
agentSession: AgentSessionInput
|
|
185
|
+
agentState: AgentStateInput
|
|
186
|
+
agentStates: [AgentStateInput!]
|
|
187
|
+
cloud: CloudInput
|
|
188
|
+
context: [CopilotContextInput!]
|
|
189
|
+
extensions: ExtensionsInput
|
|
190
|
+
forwardedParameters: ForwardedParametersInput
|
|
191
|
+
frontend: FrontendInput!
|
|
192
|
+
messages: [MessageInput!]!
|
|
193
|
+
metaEvents: [MetaEventInput!]
|
|
194
|
+
metadata: GenerateCopilotResponseMetadataInput!
|
|
195
|
+
runId: String
|
|
196
|
+
threadId: String
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
input GenerateCopilotResponseMetadataInput {
|
|
200
|
+
requestType: CopilotRequestType
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
input GuardrailsInput {
|
|
204
|
+
inputValidationRules: GuardrailsRuleInput!
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
input GuardrailsRuleInput {
|
|
208
|
+
allowList: [String!] = []
|
|
209
|
+
denyList: [String!] = []
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
input ImageMessageInput {
|
|
213
|
+
bytes: String!
|
|
214
|
+
format: String!
|
|
215
|
+
parentMessageId: String
|
|
216
|
+
role: MessageRole!
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
type ImageMessageOutput implements BaseMessageOutput {
|
|
220
|
+
bytes: String!
|
|
221
|
+
createdAt: DateTimeISO!
|
|
222
|
+
format: String!
|
|
223
|
+
id: String!
|
|
224
|
+
parentMessageId: String
|
|
225
|
+
role: MessageRole!
|
|
226
|
+
status: MessageStatus!
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
"""
|
|
230
|
+
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
|
231
|
+
"""
|
|
232
|
+
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
|
|
233
|
+
|
|
234
|
+
"""
|
|
235
|
+
The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
|
236
|
+
"""
|
|
237
|
+
scalar JSONObject @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
|
|
238
|
+
|
|
239
|
+
type LangGraphInterruptEvent implements BaseMetaEvent {
|
|
240
|
+
name: MetaEventName!
|
|
241
|
+
response: String
|
|
242
|
+
type: String!
|
|
243
|
+
value: String!
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
input LoadAgentStateInput {
|
|
247
|
+
agentName: String!
|
|
248
|
+
threadId: String!
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
type LoadAgentStateResponse {
|
|
252
|
+
messages: String!
|
|
253
|
+
state: String!
|
|
254
|
+
threadExists: Boolean!
|
|
255
|
+
threadId: String!
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
input MessageInput {
|
|
259
|
+
actionExecutionMessage: ActionExecutionMessageInput
|
|
260
|
+
agentStateMessage: AgentStateMessageInput
|
|
261
|
+
createdAt: DateTimeISO!
|
|
262
|
+
id: String!
|
|
263
|
+
imageMessage: ImageMessageInput
|
|
264
|
+
resultMessage: ResultMessageInput
|
|
265
|
+
textMessage: TextMessageInput
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
"""The role of the message"""
|
|
269
|
+
enum MessageRole {
|
|
270
|
+
assistant
|
|
271
|
+
developer
|
|
272
|
+
system
|
|
273
|
+
tool
|
|
274
|
+
user
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
union MessageStatus = FailedMessageStatus | PendingMessageStatus | SuccessMessageStatus
|
|
278
|
+
|
|
279
|
+
enum MessageStatusCode {
|
|
280
|
+
Failed
|
|
281
|
+
Pending
|
|
282
|
+
Success
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
input MetaEventInput {
|
|
286
|
+
messages: [MessageInput!]
|
|
287
|
+
name: MetaEventName!
|
|
288
|
+
response: String
|
|
289
|
+
value: String!
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
"""Meta event types"""
|
|
293
|
+
enum MetaEventName {
|
|
294
|
+
CopilotKitLangGraphInterruptEvent
|
|
295
|
+
LangGraphInterruptEvent
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
type Mutation {
|
|
299
|
+
generateCopilotResponse(data: GenerateCopilotResponseInput!, properties: JSONObject): CopilotResponse!
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
input OpenAIApiAssistantAPIInput {
|
|
303
|
+
runId: String
|
|
304
|
+
threadId: String
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
type OpenAIApiAssistantAPIResponse {
|
|
308
|
+
runId: String
|
|
309
|
+
threadId: String
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
type PendingMessageStatus {
|
|
313
|
+
code: MessageStatusCode!
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
type PendingResponseStatus implements BaseResponseStatus {
|
|
317
|
+
code: ResponseStatusCode!
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
type Query {
|
|
321
|
+
availableAgents: AgentsResponse!
|
|
322
|
+
hello: String!
|
|
323
|
+
loadAgentState(data: LoadAgentStateInput!): LoadAgentStateResponse!
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
union ResponseStatus = FailedResponseStatus | PendingResponseStatus | SuccessResponseStatus
|
|
327
|
+
|
|
328
|
+
enum ResponseStatusCode {
|
|
329
|
+
Failed
|
|
330
|
+
Pending
|
|
331
|
+
Success
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
input ResultMessageInput {
|
|
335
|
+
actionExecutionId: String!
|
|
336
|
+
actionName: String!
|
|
337
|
+
parentMessageId: String
|
|
338
|
+
result: String!
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
type ResultMessageOutput implements BaseMessageOutput {
|
|
342
|
+
actionExecutionId: String!
|
|
343
|
+
actionName: String!
|
|
344
|
+
createdAt: DateTimeISO!
|
|
345
|
+
id: String!
|
|
346
|
+
result: String!
|
|
347
|
+
status: MessageStatus!
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
type SuccessMessageStatus {
|
|
351
|
+
code: MessageStatusCode!
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
type SuccessResponseStatus implements BaseResponseStatus {
|
|
355
|
+
code: ResponseStatusCode!
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
input TextMessageInput {
|
|
359
|
+
content: String!
|
|
360
|
+
parentMessageId: String
|
|
361
|
+
role: MessageRole!
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
type TextMessageOutput implements BaseMessageOutput {
|
|
365
|
+
content: [String!]!
|
|
366
|
+
createdAt: DateTimeISO!
|
|
367
|
+
id: String!
|
|
368
|
+
parentMessageId: String
|
|
369
|
+
role: MessageRole!
|
|
370
|
+
status: MessageStatus!
|
|
371
|
+
}
|