@copilotkit/runtime 1.50.0 → 1.50.1-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.
- package/CHANGELOG.md +14 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/service-adapters/google/google-genai-adapter.ts +19 -4
- package/dist/chunk-27JKTS6P.mjs +0 -1704
- package/dist/chunk-27JKTS6P.mjs.map +0 -1
- package/dist/chunk-2GPTVDTO.mjs +0 -25
- package/dist/chunk-2GPTVDTO.mjs.map +0 -1
- package/dist/chunk-2OZAGFV3.mjs +0 -43
- package/dist/chunk-2OZAGFV3.mjs.map +0 -1
- package/dist/chunk-3AJVKDZX.mjs +0 -3097
- package/dist/chunk-3AJVKDZX.mjs.map +0 -1
- package/dist/chunk-45RCC3ZS.mjs +0 -25
- package/dist/chunk-45RCC3ZS.mjs.map +0 -1
- package/dist/chunk-4EHJ4XFJ.mjs +0 -25
- package/dist/chunk-4EHJ4XFJ.mjs.map +0 -1
- package/dist/chunk-4IANB4TC.mjs +0 -25
- package/dist/chunk-4IANB4TC.mjs.map +0 -1
- package/dist/chunk-4KES76K3.mjs +0 -74
- package/dist/chunk-4KES76K3.mjs.map +0 -1
- package/dist/chunk-4OGE3SLW.mjs +0 -3100
- package/dist/chunk-4OGE3SLW.mjs.map +0 -1
- package/dist/chunk-54YJBMCP.mjs +0 -3097
- package/dist/chunk-54YJBMCP.mjs.map +0 -1
- package/dist/chunk-62NE5S6M.mjs +0 -226
- package/dist/chunk-62NE5S6M.mjs.map +0 -1
- package/dist/chunk-6ER4SZYH.mjs +0 -74
- package/dist/chunk-6ER4SZYH.mjs.map +0 -1
- package/dist/chunk-6TNSLHVR.mjs +0 -74
- package/dist/chunk-6TNSLHVR.mjs.map +0 -1
- package/dist/chunk-6XRUR5UK.mjs +0 -1
- package/dist/chunk-6XRUR5UK.mjs.map +0 -1
- package/dist/chunk-7V4BK7TZ.mjs +0 -25
- package/dist/chunk-7V4BK7TZ.mjs.map +0 -1
- package/dist/chunk-7YZIEXD2.mjs +0 -74
- package/dist/chunk-7YZIEXD2.mjs.map +0 -1
- package/dist/chunk-A4XHOAFU.mjs +0 -25
- package/dist/chunk-A4XHOAFU.mjs.map +0 -1
- package/dist/chunk-A555KEAD.mjs +0 -6020
- package/dist/chunk-A555KEAD.mjs.map +0 -1
- package/dist/chunk-AF73TFTX.mjs +0 -74
- package/dist/chunk-AF73TFTX.mjs.map +0 -1
- package/dist/chunk-AMUJQ6IR.mjs +0 -50
- package/dist/chunk-AMUJQ6IR.mjs.map +0 -1
- package/dist/chunk-AQG2SVCA.mjs +0 -25
- package/dist/chunk-AQG2SVCA.mjs.map +0 -1
- package/dist/chunk-BJZHMXND.mjs +0 -74
- package/dist/chunk-BJZHMXND.mjs.map +0 -1
- package/dist/chunk-CB2OJXF6.mjs +0 -25
- package/dist/chunk-CB2OJXF6.mjs.map +0 -1
- package/dist/chunk-CEOMFPJU.mjs +0 -6020
- package/dist/chunk-CEOMFPJU.mjs.map +0 -1
- package/dist/chunk-CZVLR7CC.mjs +0 -175
- package/dist/chunk-CZVLR7CC.mjs.map +0 -1
- package/dist/chunk-DCEEHMLJ.mjs +0 -1127
- package/dist/chunk-DCEEHMLJ.mjs.map +0 -1
- package/dist/chunk-DE3CLKUG.mjs +0 -25
- package/dist/chunk-DE3CLKUG.mjs.map +0 -1
- package/dist/chunk-DTPRUTNV.mjs +0 -25
- package/dist/chunk-DTPRUTNV.mjs.map +0 -1
- package/dist/chunk-ERUOA47O.mjs +0 -626
- package/dist/chunk-ERUOA47O.mjs.map +0 -1
- package/dist/chunk-ESSRC64W.mjs +0 -74
- package/dist/chunk-ESSRC64W.mjs.map +0 -1
- package/dist/chunk-FHD4JECV.mjs +0 -33
- package/dist/chunk-FHD4JECV.mjs.map +0 -1
- package/dist/chunk-GRAN6K6N.mjs +0 -25
- package/dist/chunk-GRAN6K6N.mjs.map +0 -1
- package/dist/chunk-I27F2UPA.mjs +0 -175
- package/dist/chunk-I27F2UPA.mjs.map +0 -1
- package/dist/chunk-IAZKTOQW.mjs +0 -25
- package/dist/chunk-IAZKTOQW.mjs.map +0 -1
- package/dist/chunk-J6XZ5MFB.mjs +0 -25
- package/dist/chunk-J6XZ5MFB.mjs.map +0 -1
- package/dist/chunk-JJ32MA4C.mjs +0 -73
- package/dist/chunk-JJ32MA4C.mjs.map +0 -1
- package/dist/chunk-JJY4ZTHQ.mjs +0 -25
- package/dist/chunk-JJY4ZTHQ.mjs.map +0 -1
- package/dist/chunk-KEYLBFU2.mjs +0 -3117
- package/dist/chunk-KEYLBFU2.mjs.map +0 -1
- package/dist/chunk-KQ53L4WZ.mjs +0 -3094
- package/dist/chunk-KQ53L4WZ.mjs.map +0 -1
- package/dist/chunk-KTELVQ67.mjs +0 -3098
- package/dist/chunk-KTELVQ67.mjs.map +0 -1
- package/dist/chunk-LPEPX6NH.mjs +0 -25
- package/dist/chunk-LPEPX6NH.mjs.map +0 -1
- package/dist/chunk-MDXE55DK.mjs +0 -3117
- package/dist/chunk-MDXE55DK.mjs.map +0 -1
- package/dist/chunk-MMFUVOXH.mjs +0 -73
- package/dist/chunk-MMFUVOXH.mjs.map +0 -1
- package/dist/chunk-N3Y4U66N.mjs +0 -253
- package/dist/chunk-N3Y4U66N.mjs.map +0 -1
- package/dist/chunk-O7UYB4MH.mjs +0 -25
- package/dist/chunk-O7UYB4MH.mjs.map +0 -1
- package/dist/chunk-OFNVQHNM.mjs +0 -3089
- package/dist/chunk-OFNVQHNM.mjs.map +0 -1
- package/dist/chunk-OFSV5GET.mjs +0 -3074
- package/dist/chunk-OFSV5GET.mjs.map +0 -1
- package/dist/chunk-OMRST67R.mjs +0 -25
- package/dist/chunk-OMRST67R.mjs.map +0 -1
- package/dist/chunk-OWIGJONH.mjs +0 -275
- package/dist/chunk-OWIGJONH.mjs.map +0 -1
- package/dist/chunk-PRZHE74A.mjs +0 -25
- package/dist/chunk-PRZHE74A.mjs.map +0 -1
- package/dist/chunk-PTYRVXXP.mjs +0 -80
- package/dist/chunk-PTYRVXXP.mjs.map +0 -1
- package/dist/chunk-R22B5CCO.mjs +0 -25
- package/dist/chunk-R22B5CCO.mjs.map +0 -1
- package/dist/chunk-SHBDMA63.mjs +0 -141
- package/dist/chunk-SHBDMA63.mjs.map +0 -1
- package/dist/chunk-SPVXBPRA.mjs +0 -74
- package/dist/chunk-SPVXBPRA.mjs.map +0 -1
- package/dist/chunk-T72G46ME.mjs +0 -25
- package/dist/chunk-T72G46ME.mjs.map +0 -1
- package/dist/chunk-TGELROPU.mjs +0 -25
- package/dist/chunk-TGELROPU.mjs.map +0 -1
- package/dist/chunk-UNX4IAAD.mjs +0 -25
- package/dist/chunk-UNX4IAAD.mjs.map +0 -1
- package/dist/chunk-V4DHVC7M.mjs +0 -3085
- package/dist/chunk-V4DHVC7M.mjs.map +0 -1
- package/dist/chunk-VVRFOB66.mjs +0 -25
- package/dist/chunk-VVRFOB66.mjs.map +0 -1
- package/dist/chunk-W6NVBYM6.mjs +0 -80
- package/dist/chunk-W6NVBYM6.mjs.map +0 -1
- package/dist/chunk-W7MBACGC.mjs +0 -74
- package/dist/chunk-W7MBACGC.mjs.map +0 -1
- package/dist/chunk-WMD4XZZS.mjs +0 -25
- package/dist/chunk-WMD4XZZS.mjs.map +0 -1
- package/dist/chunk-WX2ZNCRT.mjs +0 -74
- package/dist/chunk-WX2ZNCRT.mjs.map +0 -1
- package/dist/chunk-XWBDEXDA.mjs +0 -153
- package/dist/chunk-XWBDEXDA.mjs.map +0 -1
- package/dist/chunk-Y2Z62E2T.mjs +0 -74
- package/dist/chunk-Y2Z62E2T.mjs.map +0 -1
- package/dist/chunk-YO4I6RVI.mjs +0 -25
- package/dist/chunk-YO4I6RVI.mjs.map +0 -1
- package/dist/chunk-Z6Q5IW6I.mjs +0 -3098
- package/dist/chunk-Z6Q5IW6I.mjs.map +0 -1
- package/dist/chunk-Z726O3G2.mjs +0 -25
- package/dist/chunk-Z726O3G2.mjs.map +0 -1
- package/dist/chunk-ZE4SMZZR.mjs +0 -3097
- package/dist/chunk-ZE4SMZZR.mjs.map +0 -1
- package/dist/chunk-ZULZB33C.mjs +0 -73
- package/dist/chunk-ZULZB33C.mjs.map +0 -1
- package/dist/chunk-ZVRGXMY7.mjs +0 -25
- package/dist/chunk-ZVRGXMY7.mjs.map +0 -1
- package/dist/chunk-ZZ35WBYQ.mjs +0 -25
- package/dist/chunk-ZZ35WBYQ.mjs.map +0 -1
- package/dist/graphql/message-conversion/index.d.ts +0 -18
- package/dist/graphql/message-conversion/index.js +0 -725
- package/dist/graphql/message-conversion/index.js.map +0 -1
- package/dist/graphql/message-conversion/index.mjs +0 -245
- package/dist/graphql/message-conversion/index.mjs.map +0 -1
- package/dist/graphql/types/base/index.d.ts +0 -6
- package/dist/graphql/types/base/index.js +0 -63
- package/dist/graphql/types/base/index.js.map +0 -1
- package/dist/graphql/types/base/index.mjs +0 -8
- package/dist/graphql/types/base/index.mjs.map +0 -1
- package/dist/graphql/types/converted/index.d.ts +0 -2
- package/dist/graphql/types/converted/index.js +0 -200
- package/dist/graphql/types/converted/index.js.map +0 -1
- package/dist/graphql/types/converted/index.mjs +0 -19
- package/dist/graphql/types/converted/index.mjs.map +0 -1
- package/dist/groq-adapter-540da9c3.d.ts +0 -331
- package/dist/groq-adapter-a6f5e9d2.d.ts +0 -331
- package/dist/groq-adapter-c8aec5c5.d.ts +0 -321
- package/dist/index-96b330da.d.ts +0 -119
- package/dist/index-adbd78f1.d.ts +0 -154
- package/dist/langserve-0c6100e3.d.ts +0 -257
- package/dist/langserve-978d5790.d.ts +0 -243
- package/dist/langserve-9fc76ce5.d.ts +0 -243
- package/dist/lib/cloud/index.d.ts +0 -6
- package/dist/lib/cloud/index.js +0 -18
- package/dist/lib/cloud/index.js.map +0 -1
- package/dist/lib/cloud/index.mjs +0 -1
- package/dist/lib/cloud/index.mjs.map +0 -1
- package/dist/lib/index.d.ts +0 -212
- package/dist/lib/index.js +0 -7843
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/index.mjs +0 -76
- package/dist/lib/index.mjs.map +0 -1
- package/dist/lib/integrations/index.d.ts +0 -34
- package/dist/lib/integrations/index.js +0 -3052
- package/dist/lib/integrations/index.js.map +0 -1
- package/dist/lib/integrations/index.mjs +0 -37
- package/dist/lib/integrations/index.mjs.map +0 -1
- package/dist/lib/integrations/nest/index.d.ts +0 -15
- package/dist/lib/integrations/nest/index.js +0 -2959
- package/dist/lib/integrations/nest/index.js.map +0 -1
- package/dist/lib/integrations/nest/index.mjs +0 -14
- package/dist/lib/integrations/nest/index.mjs.map +0 -1
- package/dist/lib/integrations/node-express/index.d.ts +0 -15
- package/dist/lib/integrations/node-express/index.js +0 -2959
- package/dist/lib/integrations/node-express/index.js.map +0 -1
- package/dist/lib/integrations/node-express/index.mjs +0 -14
- package/dist/lib/integrations/node-express/index.mjs.map +0 -1
- package/dist/lib/integrations/node-http/index.d.ts +0 -15
- package/dist/lib/integrations/node-http/index.js +0 -2945
- package/dist/lib/integrations/node-http/index.js.map +0 -1
- package/dist/lib/integrations/node-http/index.mjs +0 -13
- package/dist/lib/integrations/node-http/index.mjs.map +0 -1
- package/dist/service-adapters/index.d.ts +0 -162
- package/dist/service-adapters/index.js +0 -1787
- package/dist/service-adapters/index.js.map +0 -1
- package/dist/service-adapters/index.mjs +0 -34
- package/dist/service-adapters/index.mjs.map +0 -1
- package/dist/service-adapters/shared/index.d.ts +0 -9
- package/dist/service-adapters/shared/index.js +0 -72
- package/dist/service-adapters/shared/index.js.map +0 -1
- package/dist/service-adapters/shared/index.mjs +0 -8
- package/dist/service-adapters/shared/index.mjs.map +0 -1
- package/dist/shared-0a7346ce.d.ts +0 -466
- package/dist/shared-35c6eb04.d.ts +0 -448
- package/dist/shared-9ed1dc31.d.ts +0 -414
- package/dist/shared-da5708fe.d.ts +0 -449
- package/dist/utils/index.d.ts +0 -65
- package/dist/utils/index.js +0 -175
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs +0 -12
- package/dist/utils/index.mjs.map +0 -1
package/dist/index-96b330da.d.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { BaseMessageInput } from './graphql/types/base/index.js';
|
|
2
|
-
|
|
3
|
-
declare enum MessageRole {
|
|
4
|
-
user = "user",
|
|
5
|
-
assistant = "assistant",
|
|
6
|
-
system = "system",
|
|
7
|
-
tool = "tool",
|
|
8
|
-
developer = "developer"
|
|
9
|
-
}
|
|
10
|
-
declare enum ActionInputAvailability {
|
|
11
|
-
disabled = "disabled",
|
|
12
|
-
enabled = "enabled",
|
|
13
|
-
remote = "remote"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare class MessageInput extends BaseMessageInput {
|
|
17
|
-
textMessage?: TextMessageInput;
|
|
18
|
-
actionExecutionMessage?: ActionExecutionMessageInput;
|
|
19
|
-
resultMessage?: ResultMessageInput;
|
|
20
|
-
agentStateMessage?: AgentStateMessageInput;
|
|
21
|
-
imageMessage?: ImageMessageInput;
|
|
22
|
-
}
|
|
23
|
-
declare class TextMessageInput {
|
|
24
|
-
content: string;
|
|
25
|
-
parentMessageId?: string;
|
|
26
|
-
role: MessageRole;
|
|
27
|
-
}
|
|
28
|
-
declare class ActionExecutionMessageInput {
|
|
29
|
-
name: string;
|
|
30
|
-
arguments: string;
|
|
31
|
-
parentMessageId?: string;
|
|
32
|
-
scope?: String;
|
|
33
|
-
}
|
|
34
|
-
declare class ResultMessageInput {
|
|
35
|
-
actionExecutionId: string;
|
|
36
|
-
actionName: string;
|
|
37
|
-
parentMessageId?: string;
|
|
38
|
-
result: string;
|
|
39
|
-
}
|
|
40
|
-
declare class AgentStateMessageInput {
|
|
41
|
-
threadId: string;
|
|
42
|
-
agentName: string;
|
|
43
|
-
role: MessageRole;
|
|
44
|
-
state: string;
|
|
45
|
-
running: boolean;
|
|
46
|
-
nodeName: string;
|
|
47
|
-
runId: string;
|
|
48
|
-
active: boolean;
|
|
49
|
-
}
|
|
50
|
-
declare class ImageMessageInput {
|
|
51
|
-
format: string;
|
|
52
|
-
bytes: string;
|
|
53
|
-
parentMessageId?: string;
|
|
54
|
-
role: MessageRole;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
type MessageType = "TextMessage" | "ActionExecutionMessage" | "ResultMessage" | "AgentStateMessage" | "ImageMessage";
|
|
58
|
-
declare class Message extends BaseMessageInput {
|
|
59
|
-
type: MessageType;
|
|
60
|
-
isTextMessage(): this is TextMessage;
|
|
61
|
-
isActionExecutionMessage(): this is ActionExecutionMessage;
|
|
62
|
-
isResultMessage(): this is ResultMessage;
|
|
63
|
-
isAgentStateMessage(): this is AgentStateMessage;
|
|
64
|
-
isImageMessage(): this is ImageMessage;
|
|
65
|
-
}
|
|
66
|
-
declare class TextMessage extends Message implements TextMessageInput {
|
|
67
|
-
type: MessageType;
|
|
68
|
-
content: string;
|
|
69
|
-
role: MessageRole;
|
|
70
|
-
parentMessageId?: string;
|
|
71
|
-
}
|
|
72
|
-
declare class ActionExecutionMessage extends Message implements Omit<ActionExecutionMessageInput, "arguments" | "scope"> {
|
|
73
|
-
type: MessageType;
|
|
74
|
-
name: string;
|
|
75
|
-
arguments: Record<string, any>;
|
|
76
|
-
parentMessageId?: string;
|
|
77
|
-
}
|
|
78
|
-
declare class ResultMessage extends Message implements ResultMessageInput {
|
|
79
|
-
type: MessageType;
|
|
80
|
-
actionExecutionId: string;
|
|
81
|
-
actionName: string;
|
|
82
|
-
result: string;
|
|
83
|
-
static encodeResult(result: any, error?: {
|
|
84
|
-
code: string;
|
|
85
|
-
message: string;
|
|
86
|
-
} | string | Error): string;
|
|
87
|
-
static decodeResult(result: string): {
|
|
88
|
-
error?: {
|
|
89
|
-
code: string;
|
|
90
|
-
message: string;
|
|
91
|
-
};
|
|
92
|
-
result: string;
|
|
93
|
-
};
|
|
94
|
-
hasError(): boolean;
|
|
95
|
-
getError(): {
|
|
96
|
-
code: string;
|
|
97
|
-
message: string;
|
|
98
|
-
} | undefined;
|
|
99
|
-
}
|
|
100
|
-
declare class AgentStateMessage extends Message implements Omit<AgentStateMessageInput, "state"> {
|
|
101
|
-
type: MessageType;
|
|
102
|
-
threadId: string;
|
|
103
|
-
agentName: string;
|
|
104
|
-
nodeName: string;
|
|
105
|
-
runId: string;
|
|
106
|
-
active: boolean;
|
|
107
|
-
role: MessageRole;
|
|
108
|
-
state: any;
|
|
109
|
-
running: boolean;
|
|
110
|
-
}
|
|
111
|
-
declare class ImageMessage extends Message implements ImageMessageInput {
|
|
112
|
-
type: MessageType;
|
|
113
|
-
format: string;
|
|
114
|
-
bytes: string;
|
|
115
|
-
role: MessageRole;
|
|
116
|
-
parentMessageId?: string;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export { ActionInputAvailability as A, ImageMessage as I, Message as M, ResultMessage as R, TextMessage as T, ActionExecutionMessage as a, MessageInput as b, MessageType as c, AgentStateMessage as d };
|
package/dist/index-adbd78f1.d.ts
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { BaseMessageInput } from './graphql/types/base/index.js';
|
|
2
|
-
|
|
3
|
-
declare enum MessageRole {
|
|
4
|
-
assistant = "assistant",
|
|
5
|
-
developer = "developer",
|
|
6
|
-
system = "system",
|
|
7
|
-
tool = "tool",
|
|
8
|
-
user = "user"
|
|
9
|
-
}
|
|
10
|
-
declare enum ActionInputAvailability {
|
|
11
|
-
disabled = "disabled",
|
|
12
|
-
enabled = "enabled",
|
|
13
|
-
remote = "remote"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare class MessageInput extends BaseMessageInput {
|
|
17
|
-
textMessage?: TextMessageInput;
|
|
18
|
-
actionExecutionMessage?: ActionExecutionMessageInput;
|
|
19
|
-
resultMessage?: ResultMessageInput;
|
|
20
|
-
agentStateMessage?: AgentStateMessageInput;
|
|
21
|
-
imageMessage?: ImageMessageInput;
|
|
22
|
-
}
|
|
23
|
-
declare class TextMessageInput {
|
|
24
|
-
content: string;
|
|
25
|
-
parentMessageId?: string;
|
|
26
|
-
role: MessageRole;
|
|
27
|
-
}
|
|
28
|
-
declare class ActionExecutionMessageInput {
|
|
29
|
-
name: string;
|
|
30
|
-
arguments: string;
|
|
31
|
-
parentMessageId?: string;
|
|
32
|
-
scope?: String;
|
|
33
|
-
}
|
|
34
|
-
declare class ResultMessageInput {
|
|
35
|
-
actionExecutionId: string;
|
|
36
|
-
actionName: string;
|
|
37
|
-
parentMessageId?: string;
|
|
38
|
-
result: string;
|
|
39
|
-
}
|
|
40
|
-
declare class AgentStateMessageInput {
|
|
41
|
-
threadId: string;
|
|
42
|
-
agentName: string;
|
|
43
|
-
role: MessageRole;
|
|
44
|
-
state: string;
|
|
45
|
-
running: boolean;
|
|
46
|
-
nodeName: string;
|
|
47
|
-
runId: string;
|
|
48
|
-
active: boolean;
|
|
49
|
-
}
|
|
50
|
-
declare class ImageMessageInput {
|
|
51
|
-
format: string;
|
|
52
|
-
bytes: string;
|
|
53
|
-
parentMessageId?: string;
|
|
54
|
-
role: MessageRole;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
declare enum MessageStatusCode {
|
|
58
|
-
Pending = "pending",
|
|
59
|
-
Success = "success",
|
|
60
|
-
Failed = "failed"
|
|
61
|
-
}
|
|
62
|
-
declare class BaseMessageStatus {
|
|
63
|
-
code: MessageStatusCode;
|
|
64
|
-
}
|
|
65
|
-
declare class PendingMessageStatus extends BaseMessageStatus {
|
|
66
|
-
code: MessageStatusCode;
|
|
67
|
-
}
|
|
68
|
-
declare class SuccessMessageStatus extends BaseMessageStatus {
|
|
69
|
-
code: MessageStatusCode;
|
|
70
|
-
}
|
|
71
|
-
declare class FailedMessageStatus extends BaseMessageStatus {
|
|
72
|
-
code: MessageStatusCode;
|
|
73
|
-
reason: string;
|
|
74
|
-
}
|
|
75
|
-
declare const MessageStatusUnion: PendingMessageStatus | SuccessMessageStatus | FailedMessageStatus;
|
|
76
|
-
type MessageStatus = typeof MessageStatusUnion;
|
|
77
|
-
|
|
78
|
-
declare abstract class BaseMessageOutput {
|
|
79
|
-
id: string;
|
|
80
|
-
createdAt: Date;
|
|
81
|
-
status: typeof MessageStatusUnion;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
type MessageType = "TextMessage" | "ActionExecutionMessage" | "ResultMessage" | "AgentStateMessage" | "ImageMessage";
|
|
85
|
-
declare class Message {
|
|
86
|
-
type: MessageType;
|
|
87
|
-
id: BaseMessageOutput["id"];
|
|
88
|
-
createdAt: BaseMessageOutput["createdAt"];
|
|
89
|
-
status: MessageStatus;
|
|
90
|
-
constructor(props: any);
|
|
91
|
-
isTextMessage(): this is TextMessage;
|
|
92
|
-
isActionExecutionMessage(): this is ActionExecutionMessage;
|
|
93
|
-
isResultMessage(): this is ResultMessage;
|
|
94
|
-
isAgentStateMessage(): this is AgentStateMessage;
|
|
95
|
-
isImageMessage(): this is ImageMessage;
|
|
96
|
-
}
|
|
97
|
-
declare const Role: typeof MessageRole;
|
|
98
|
-
type MessageConstructorOptions = Partial<Message>;
|
|
99
|
-
type TextMessageConstructorOptions = MessageConstructorOptions & TextMessageInput;
|
|
100
|
-
declare class TextMessage extends Message implements TextMessageConstructorOptions {
|
|
101
|
-
content: TextMessageInput["content"];
|
|
102
|
-
parentMessageId: TextMessageInput["parentMessageId"];
|
|
103
|
-
role: TextMessageInput["role"];
|
|
104
|
-
type: "TextMessage";
|
|
105
|
-
constructor(props: TextMessageConstructorOptions);
|
|
106
|
-
}
|
|
107
|
-
declare class ActionExecutionMessage extends Message implements Omit<ActionExecutionMessageInput, "arguments" | "scope"> {
|
|
108
|
-
type: MessageType;
|
|
109
|
-
name: string;
|
|
110
|
-
arguments: Record<string, any>;
|
|
111
|
-
parentMessageId?: string;
|
|
112
|
-
}
|
|
113
|
-
declare class ResultMessage extends Message implements ResultMessageInput {
|
|
114
|
-
type: MessageType;
|
|
115
|
-
actionExecutionId: string;
|
|
116
|
-
actionName: string;
|
|
117
|
-
result: string;
|
|
118
|
-
static encodeResult(result: any, error?: {
|
|
119
|
-
code: string;
|
|
120
|
-
message: string;
|
|
121
|
-
} | string | Error): string;
|
|
122
|
-
static decodeResult(result: string): {
|
|
123
|
-
error?: {
|
|
124
|
-
code: string;
|
|
125
|
-
message: string;
|
|
126
|
-
};
|
|
127
|
-
result: string;
|
|
128
|
-
};
|
|
129
|
-
hasError(): boolean;
|
|
130
|
-
getError(): {
|
|
131
|
-
code: string;
|
|
132
|
-
message: string;
|
|
133
|
-
} | undefined;
|
|
134
|
-
}
|
|
135
|
-
declare class AgentStateMessage extends Message implements Omit<AgentStateMessageInput, "state"> {
|
|
136
|
-
type: MessageType;
|
|
137
|
-
threadId: string;
|
|
138
|
-
agentName: string;
|
|
139
|
-
nodeName: string;
|
|
140
|
-
runId: string;
|
|
141
|
-
active: boolean;
|
|
142
|
-
role: MessageRole;
|
|
143
|
-
state: any;
|
|
144
|
-
running: boolean;
|
|
145
|
-
}
|
|
146
|
-
declare class ImageMessage extends Message implements ImageMessageInput {
|
|
147
|
-
type: MessageType;
|
|
148
|
-
format: string;
|
|
149
|
-
bytes: string;
|
|
150
|
-
role: MessageRole;
|
|
151
|
-
parentMessageId?: string;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export { ActionExecutionMessage as A, ImageMessage as I, Message as M, ResultMessage as R, TextMessage as T, MessageInput as a, ActionInputAvailability as b, MessageType as c, Role as d, AgentStateMessage as e };
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import { A as ActionInputAvailability, T as TextMessage, a as ActionExecutionMessage, R as ResultMessage, M as Message } from './index-96b330da.js';
|
|
2
|
-
import * as rxjs from 'rxjs';
|
|
3
|
-
import { Subject, ReplaySubject } from 'rxjs';
|
|
4
|
-
import { Action, Parameter } from '@copilotkit/shared';
|
|
5
|
-
|
|
6
|
-
declare class ActionInput {
|
|
7
|
-
name: string;
|
|
8
|
-
description: string;
|
|
9
|
-
jsonSchema: string;
|
|
10
|
-
available?: ActionInputAvailability;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare enum GuardrailsResultStatus {
|
|
14
|
-
ALLOWED = "allowed",
|
|
15
|
-
DENIED = "denied"
|
|
16
|
-
}
|
|
17
|
-
declare class GuardrailsResult {
|
|
18
|
-
status: GuardrailsResultStatus;
|
|
19
|
-
reason?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare enum RuntimeEventTypes {
|
|
23
|
-
TextMessageStart = "TextMessageStart",
|
|
24
|
-
TextMessageContent = "TextMessageContent",
|
|
25
|
-
TextMessageEnd = "TextMessageEnd",
|
|
26
|
-
ActionExecutionStart = "ActionExecutionStart",
|
|
27
|
-
ActionExecutionArgs = "ActionExecutionArgs",
|
|
28
|
-
ActionExecutionEnd = "ActionExecutionEnd",
|
|
29
|
-
ActionExecutionResult = "ActionExecutionResult",
|
|
30
|
-
AgentStateMessage = "AgentStateMessage",
|
|
31
|
-
MetaEvent = "MetaEvent",
|
|
32
|
-
RunError = "RunError"
|
|
33
|
-
}
|
|
34
|
-
declare enum RuntimeMetaEventName {
|
|
35
|
-
LangGraphInterruptEvent = "LangGraphInterruptEvent",
|
|
36
|
-
LangGraphInterruptResumeEvent = "LangGraphInterruptResumeEvent",
|
|
37
|
-
CopilotKitLangGraphInterruptEvent = "CopilotKitLangGraphInterruptEvent"
|
|
38
|
-
}
|
|
39
|
-
type RunTimeMetaEvent = {
|
|
40
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
41
|
-
name: RuntimeMetaEventName.LangGraphInterruptEvent;
|
|
42
|
-
value: string;
|
|
43
|
-
} | {
|
|
44
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
45
|
-
name: RuntimeMetaEventName.CopilotKitLangGraphInterruptEvent;
|
|
46
|
-
data: {
|
|
47
|
-
value: string;
|
|
48
|
-
messages: (TextMessage | ActionExecutionMessage | ResultMessage)[];
|
|
49
|
-
};
|
|
50
|
-
} | {
|
|
51
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
52
|
-
name: RuntimeMetaEventName.LangGraphInterruptResumeEvent;
|
|
53
|
-
data: string;
|
|
54
|
-
};
|
|
55
|
-
type RuntimeErrorEvent = {
|
|
56
|
-
type: RuntimeEventTypes.RunError;
|
|
57
|
-
message: string;
|
|
58
|
-
code?: string;
|
|
59
|
-
};
|
|
60
|
-
type RuntimeEvent = {
|
|
61
|
-
type: RuntimeEventTypes.TextMessageStart;
|
|
62
|
-
messageId: string;
|
|
63
|
-
parentMessageId?: string;
|
|
64
|
-
} | {
|
|
65
|
-
type: RuntimeEventTypes.TextMessageContent;
|
|
66
|
-
messageId: string;
|
|
67
|
-
content: string;
|
|
68
|
-
} | {
|
|
69
|
-
type: RuntimeEventTypes.TextMessageEnd;
|
|
70
|
-
messageId: string;
|
|
71
|
-
} | {
|
|
72
|
-
type: RuntimeEventTypes.ActionExecutionStart;
|
|
73
|
-
actionExecutionId: string;
|
|
74
|
-
actionName: string;
|
|
75
|
-
parentMessageId?: string;
|
|
76
|
-
} | {
|
|
77
|
-
type: RuntimeEventTypes.ActionExecutionArgs;
|
|
78
|
-
actionExecutionId: string;
|
|
79
|
-
args: string;
|
|
80
|
-
} | {
|
|
81
|
-
type: RuntimeEventTypes.ActionExecutionEnd;
|
|
82
|
-
actionExecutionId: string;
|
|
83
|
-
} | {
|
|
84
|
-
type: RuntimeEventTypes.ActionExecutionResult;
|
|
85
|
-
actionName: string;
|
|
86
|
-
actionExecutionId: string;
|
|
87
|
-
result: string;
|
|
88
|
-
} | {
|
|
89
|
-
type: RuntimeEventTypes.AgentStateMessage;
|
|
90
|
-
threadId: string;
|
|
91
|
-
agentName: string;
|
|
92
|
-
nodeName: string;
|
|
93
|
-
runId: string;
|
|
94
|
-
active: boolean;
|
|
95
|
-
role: string;
|
|
96
|
-
state: string;
|
|
97
|
-
running: boolean;
|
|
98
|
-
} | RunTimeMetaEvent | RuntimeErrorEvent;
|
|
99
|
-
type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
|
|
100
|
-
declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
|
|
101
|
-
constructor();
|
|
102
|
-
sendTextMessageStart({ messageId, parentMessageId, }: {
|
|
103
|
-
messageId: string;
|
|
104
|
-
parentMessageId?: string;
|
|
105
|
-
}): void;
|
|
106
|
-
sendTextMessageContent({ messageId, content }: {
|
|
107
|
-
messageId: string;
|
|
108
|
-
content: string;
|
|
109
|
-
}): void;
|
|
110
|
-
sendTextMessageEnd({ messageId }: {
|
|
111
|
-
messageId: string;
|
|
112
|
-
}): void;
|
|
113
|
-
sendTextMessage(messageId: string, content: string): void;
|
|
114
|
-
sendActionExecutionStart({ actionExecutionId, actionName, parentMessageId, }: {
|
|
115
|
-
actionExecutionId: string;
|
|
116
|
-
actionName: string;
|
|
117
|
-
parentMessageId?: string;
|
|
118
|
-
}): void;
|
|
119
|
-
sendActionExecutionArgs({ actionExecutionId, args, }: {
|
|
120
|
-
actionExecutionId: string;
|
|
121
|
-
args: string;
|
|
122
|
-
}): void;
|
|
123
|
-
sendActionExecutionEnd({ actionExecutionId }: {
|
|
124
|
-
actionExecutionId: string;
|
|
125
|
-
}): void;
|
|
126
|
-
sendActionExecution({ actionExecutionId, actionName, args, parentMessageId, }: {
|
|
127
|
-
actionExecutionId: string;
|
|
128
|
-
actionName: string;
|
|
129
|
-
args: string;
|
|
130
|
-
parentMessageId?: string;
|
|
131
|
-
}): void;
|
|
132
|
-
sendActionExecutionResult({ actionExecutionId, actionName, result, error, }: {
|
|
133
|
-
actionExecutionId: string;
|
|
134
|
-
actionName: string;
|
|
135
|
-
result?: string;
|
|
136
|
-
error?: {
|
|
137
|
-
code: string;
|
|
138
|
-
message: string;
|
|
139
|
-
};
|
|
140
|
-
}): void;
|
|
141
|
-
sendAgentStateMessage({ threadId, agentName, nodeName, runId, active, role, state, running, }: {
|
|
142
|
-
threadId: string;
|
|
143
|
-
agentName: string;
|
|
144
|
-
nodeName: string;
|
|
145
|
-
runId: string;
|
|
146
|
-
active: boolean;
|
|
147
|
-
role: string;
|
|
148
|
-
state: string;
|
|
149
|
-
running: boolean;
|
|
150
|
-
}): void;
|
|
151
|
-
}
|
|
152
|
-
declare class RuntimeEventSource {
|
|
153
|
-
private eventStream$;
|
|
154
|
-
private callback;
|
|
155
|
-
private errorHandler?;
|
|
156
|
-
private errorContext?;
|
|
157
|
-
constructor(params?: {
|
|
158
|
-
errorHandler?: (error: any, context: any) => Promise<void>;
|
|
159
|
-
errorContext?: any;
|
|
160
|
-
});
|
|
161
|
-
stream(callback: EventSourceCallback): Promise<void>;
|
|
162
|
-
sendErrorMessageToChat(message?: string): void;
|
|
163
|
-
processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents, threadId, }: {
|
|
164
|
-
serverSideActions: Action<any>[];
|
|
165
|
-
guardrailsResult$?: Subject<GuardrailsResult>;
|
|
166
|
-
actionInputsWithoutAgents: ActionInput[];
|
|
167
|
-
threadId: string;
|
|
168
|
-
}): rxjs.Observable<RuntimeEvent>;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
declare class ForwardedParametersInput {
|
|
172
|
-
model?: string;
|
|
173
|
-
maxTokens?: number;
|
|
174
|
-
stop?: string[];
|
|
175
|
-
toolChoice?: String;
|
|
176
|
-
toolChoiceFunctionName?: string;
|
|
177
|
-
temperature?: number;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* The extensions input is used to pass additional information to the copilot runtime, specific to a
|
|
182
|
-
* service adapter or agent framework.
|
|
183
|
-
*/
|
|
184
|
-
declare class ExtensionsInput {
|
|
185
|
-
openaiAssistantAPI?: OpenAIApiAssistantAPIInput;
|
|
186
|
-
}
|
|
187
|
-
declare class OpenAIApiAssistantAPIInput {
|
|
188
|
-
runId?: string;
|
|
189
|
-
threadId?: string;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* The extensions response is used to receive additional information from the copilot runtime, specific to a
|
|
194
|
-
* service adapter or agent framework.
|
|
195
|
-
*
|
|
196
|
-
* Next time a request to the runtime is made, the extensions response will be included in the request as input.
|
|
197
|
-
*/
|
|
198
|
-
declare class ExtensionsResponse {
|
|
199
|
-
openaiAssistantAPI?: OpenAIApiAssistantAPIResponse;
|
|
200
|
-
}
|
|
201
|
-
declare class OpenAIApiAssistantAPIResponse {
|
|
202
|
-
runId?: string;
|
|
203
|
-
threadId?: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
declare class AgentSessionInput {
|
|
207
|
-
agentName: string;
|
|
208
|
-
threadId?: string;
|
|
209
|
-
nodeName?: string;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
declare class AgentStateInput {
|
|
213
|
-
agentName: string;
|
|
214
|
-
state: string;
|
|
215
|
-
config?: string;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
interface CopilotRuntimeChatCompletionRequest {
|
|
219
|
-
eventSource: RuntimeEventSource;
|
|
220
|
-
messages: Message[];
|
|
221
|
-
actions: ActionInput[];
|
|
222
|
-
model?: string;
|
|
223
|
-
threadId?: string;
|
|
224
|
-
runId?: string;
|
|
225
|
-
forwardedParameters?: ForwardedParametersInput;
|
|
226
|
-
extensions?: ExtensionsInput;
|
|
227
|
-
agentSession?: AgentSessionInput;
|
|
228
|
-
agentStates?: AgentStateInput[];
|
|
229
|
-
}
|
|
230
|
-
interface CopilotRuntimeChatCompletionResponse {
|
|
231
|
-
threadId: string;
|
|
232
|
-
runId?: string;
|
|
233
|
-
extensions?: ExtensionsResponse;
|
|
234
|
-
}
|
|
235
|
-
interface CopilotServiceAdapter {
|
|
236
|
-
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
interface RemoteChainParameters {
|
|
240
|
-
name: string;
|
|
241
|
-
description: string;
|
|
242
|
-
chainUrl: string;
|
|
243
|
-
parameters?: Parameter[];
|
|
244
|
-
parameterType?: "single" | "multi";
|
|
245
|
-
}
|
|
246
|
-
declare class RemoteChain {
|
|
247
|
-
name: string;
|
|
248
|
-
description: string;
|
|
249
|
-
chainUrl: string;
|
|
250
|
-
parameters?: Parameter[];
|
|
251
|
-
parameterType: "single" | "multi";
|
|
252
|
-
constructor(options: RemoteChainParameters);
|
|
253
|
-
toAction(): Promise<Action<any>>;
|
|
254
|
-
inferLangServeParameters(): Promise<void>;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export { ActionInput as A, CopilotRuntimeChatCompletionRequest as C, ExtensionsInput as E, ForwardedParametersInput as F, RemoteChainParameters as R, CopilotRuntimeChatCompletionResponse as a, CopilotServiceAdapter as b, RemoteChain as c, AgentSessionInput as d, AgentStateInput as e, RuntimeEventSource as f, ExtensionsResponse as g };
|