@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
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { T as TextMessage, A as ActionExecutionMessage, R as ResultMessage, b as ActionInputAvailability, M as Message } from './index-adbd78f1.js';
|
|
2
|
-
import { ReplaySubject } from 'rxjs';
|
|
3
|
-
import { Parameter, Action } from '@copilotkit/shared';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The extensions response is used to receive additional information from the copilot runtime, specific to a
|
|
7
|
-
* service adapter or agent framework.
|
|
8
|
-
*
|
|
9
|
-
* Next time a request to the runtime is made, the extensions response will be included in the request as input.
|
|
10
|
-
*/
|
|
11
|
-
declare class ExtensionsResponse {
|
|
12
|
-
openaiAssistantAPI?: OpenAIApiAssistantAPIResponse;
|
|
13
|
-
}
|
|
14
|
-
declare class OpenAIApiAssistantAPIResponse {
|
|
15
|
-
runId?: string;
|
|
16
|
-
threadId?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare enum RuntimeEventTypes {
|
|
20
|
-
TextMessageStart = "TextMessageStart",
|
|
21
|
-
TextMessageContent = "TextMessageContent",
|
|
22
|
-
TextMessageEnd = "TextMessageEnd",
|
|
23
|
-
ActionExecutionStart = "ActionExecutionStart",
|
|
24
|
-
ActionExecutionArgs = "ActionExecutionArgs",
|
|
25
|
-
ActionExecutionEnd = "ActionExecutionEnd",
|
|
26
|
-
ActionExecutionResult = "ActionExecutionResult",
|
|
27
|
-
AgentStateMessage = "AgentStateMessage",
|
|
28
|
-
MetaEvent = "MetaEvent",
|
|
29
|
-
RunError = "RunError"
|
|
30
|
-
}
|
|
31
|
-
declare enum RuntimeMetaEventName {
|
|
32
|
-
LangGraphInterruptEvent = "LangGraphInterruptEvent",
|
|
33
|
-
LangGraphInterruptResumeEvent = "LangGraphInterruptResumeEvent",
|
|
34
|
-
CopilotKitLangGraphInterruptEvent = "CopilotKitLangGraphInterruptEvent"
|
|
35
|
-
}
|
|
36
|
-
type RunTimeMetaEvent = {
|
|
37
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
38
|
-
name: RuntimeMetaEventName.LangGraphInterruptEvent;
|
|
39
|
-
value: string;
|
|
40
|
-
} | {
|
|
41
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
42
|
-
name: RuntimeMetaEventName.CopilotKitLangGraphInterruptEvent;
|
|
43
|
-
data: {
|
|
44
|
-
value: string;
|
|
45
|
-
messages: (TextMessage | ActionExecutionMessage | ResultMessage)[];
|
|
46
|
-
};
|
|
47
|
-
} | {
|
|
48
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
49
|
-
name: RuntimeMetaEventName.LangGraphInterruptResumeEvent;
|
|
50
|
-
data: string;
|
|
51
|
-
};
|
|
52
|
-
type RuntimeErrorEvent = {
|
|
53
|
-
type: RuntimeEventTypes.RunError;
|
|
54
|
-
message: string;
|
|
55
|
-
code?: string;
|
|
56
|
-
};
|
|
57
|
-
type RuntimeEvent = {
|
|
58
|
-
type: RuntimeEventTypes.TextMessageStart;
|
|
59
|
-
messageId: string;
|
|
60
|
-
parentMessageId?: string;
|
|
61
|
-
} | {
|
|
62
|
-
type: RuntimeEventTypes.TextMessageContent;
|
|
63
|
-
messageId: string;
|
|
64
|
-
content: string;
|
|
65
|
-
} | {
|
|
66
|
-
type: RuntimeEventTypes.TextMessageEnd;
|
|
67
|
-
messageId: string;
|
|
68
|
-
} | {
|
|
69
|
-
type: RuntimeEventTypes.ActionExecutionStart;
|
|
70
|
-
actionExecutionId: string;
|
|
71
|
-
actionName: string;
|
|
72
|
-
parentMessageId?: string;
|
|
73
|
-
} | {
|
|
74
|
-
type: RuntimeEventTypes.ActionExecutionArgs;
|
|
75
|
-
actionExecutionId: string;
|
|
76
|
-
args: string;
|
|
77
|
-
} | {
|
|
78
|
-
type: RuntimeEventTypes.ActionExecutionEnd;
|
|
79
|
-
actionExecutionId: string;
|
|
80
|
-
} | {
|
|
81
|
-
type: RuntimeEventTypes.ActionExecutionResult;
|
|
82
|
-
actionName: string;
|
|
83
|
-
actionExecutionId: string;
|
|
84
|
-
result: string;
|
|
85
|
-
} | {
|
|
86
|
-
type: RuntimeEventTypes.AgentStateMessage;
|
|
87
|
-
threadId: string;
|
|
88
|
-
agentName: string;
|
|
89
|
-
nodeName: string;
|
|
90
|
-
runId: string;
|
|
91
|
-
active: boolean;
|
|
92
|
-
role: string;
|
|
93
|
-
state: string;
|
|
94
|
-
running: boolean;
|
|
95
|
-
} | RunTimeMetaEvent | RuntimeErrorEvent;
|
|
96
|
-
type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
|
|
97
|
-
declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
|
|
98
|
-
constructor();
|
|
99
|
-
sendTextMessageStart({ messageId, parentMessageId, }: {
|
|
100
|
-
messageId: string;
|
|
101
|
-
parentMessageId?: string;
|
|
102
|
-
}): void;
|
|
103
|
-
sendTextMessageContent({ messageId, content }: {
|
|
104
|
-
messageId: string;
|
|
105
|
-
content: string;
|
|
106
|
-
}): void;
|
|
107
|
-
sendTextMessageEnd({ messageId }: {
|
|
108
|
-
messageId: string;
|
|
109
|
-
}): void;
|
|
110
|
-
sendTextMessage(messageId: string, content: string): void;
|
|
111
|
-
sendActionExecutionStart({ actionExecutionId, actionName, parentMessageId, }: {
|
|
112
|
-
actionExecutionId: string;
|
|
113
|
-
actionName: string;
|
|
114
|
-
parentMessageId?: string;
|
|
115
|
-
}): void;
|
|
116
|
-
sendActionExecutionArgs({ actionExecutionId, args, }: {
|
|
117
|
-
actionExecutionId: string;
|
|
118
|
-
args: string;
|
|
119
|
-
}): void;
|
|
120
|
-
sendActionExecutionEnd({ actionExecutionId }: {
|
|
121
|
-
actionExecutionId: string;
|
|
122
|
-
}): void;
|
|
123
|
-
sendActionExecution({ actionExecutionId, actionName, args, parentMessageId, }: {
|
|
124
|
-
actionExecutionId: string;
|
|
125
|
-
actionName: string;
|
|
126
|
-
args: string;
|
|
127
|
-
parentMessageId?: string;
|
|
128
|
-
}): void;
|
|
129
|
-
sendActionExecutionResult({ actionExecutionId, actionName, result, error, }: {
|
|
130
|
-
actionExecutionId: string;
|
|
131
|
-
actionName: string;
|
|
132
|
-
result?: string;
|
|
133
|
-
error?: {
|
|
134
|
-
code: string;
|
|
135
|
-
message: string;
|
|
136
|
-
};
|
|
137
|
-
}): void;
|
|
138
|
-
sendAgentStateMessage({ threadId, agentName, nodeName, runId, active, role, state, running, }: {
|
|
139
|
-
threadId: string;
|
|
140
|
-
agentName: string;
|
|
141
|
-
nodeName: string;
|
|
142
|
-
runId: string;
|
|
143
|
-
active: boolean;
|
|
144
|
-
role: string;
|
|
145
|
-
state: string;
|
|
146
|
-
running: boolean;
|
|
147
|
-
}): void;
|
|
148
|
-
}
|
|
149
|
-
declare class RuntimeEventSource {
|
|
150
|
-
private eventStream$;
|
|
151
|
-
private callback;
|
|
152
|
-
private errorHandler?;
|
|
153
|
-
private errorContext?;
|
|
154
|
-
constructor(params?: {
|
|
155
|
-
errorHandler?: (error: any, context: any) => Promise<void>;
|
|
156
|
-
errorContext?: any;
|
|
157
|
-
});
|
|
158
|
-
stream(callback: EventSourceCallback): Promise<void>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
declare class ActionInput {
|
|
162
|
-
name: string;
|
|
163
|
-
description: string;
|
|
164
|
-
jsonSchema: string;
|
|
165
|
-
available?: ActionInputAvailability;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
declare class ForwardedParametersInput {
|
|
169
|
-
model?: string;
|
|
170
|
-
maxTokens?: number;
|
|
171
|
-
stop?: string[];
|
|
172
|
-
toolChoice?: String;
|
|
173
|
-
toolChoiceFunctionName?: string;
|
|
174
|
-
temperature?: number;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* The extensions input is used to pass additional information to the copilot runtime, specific to a
|
|
179
|
-
* service adapter or agent framework.
|
|
180
|
-
*/
|
|
181
|
-
declare class ExtensionsInput {
|
|
182
|
-
openaiAssistantAPI?: OpenAIApiAssistantAPIInput;
|
|
183
|
-
}
|
|
184
|
-
declare class OpenAIApiAssistantAPIInput {
|
|
185
|
-
runId?: string;
|
|
186
|
-
threadId?: string;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
declare class AgentSessionInput {
|
|
190
|
-
agentName: string;
|
|
191
|
-
threadId?: string;
|
|
192
|
-
nodeName?: string;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
declare class AgentStateInput {
|
|
196
|
-
agentName: string;
|
|
197
|
-
state: string;
|
|
198
|
-
config?: string;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
interface CopilotRuntimeChatCompletionRequest {
|
|
202
|
-
eventSource: RuntimeEventSource;
|
|
203
|
-
messages: Message[];
|
|
204
|
-
actions: ActionInput[];
|
|
205
|
-
model?: string;
|
|
206
|
-
threadId?: string;
|
|
207
|
-
runId?: string;
|
|
208
|
-
forwardedParameters?: ForwardedParametersInput;
|
|
209
|
-
extensions?: ExtensionsInput;
|
|
210
|
-
agentSession?: AgentSessionInput;
|
|
211
|
-
agentStates?: AgentStateInput[];
|
|
212
|
-
}
|
|
213
|
-
interface CopilotRuntimeChatCompletionResponse {
|
|
214
|
-
threadId: string;
|
|
215
|
-
runId?: string;
|
|
216
|
-
extensions?: ExtensionsResponse;
|
|
217
|
-
}
|
|
218
|
-
interface CopilotServiceAdapter {
|
|
219
|
-
provider?: string;
|
|
220
|
-
model?: string;
|
|
221
|
-
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
222
|
-
name?: string;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
interface RemoteChainParameters {
|
|
226
|
-
name: string;
|
|
227
|
-
description: string;
|
|
228
|
-
chainUrl: string;
|
|
229
|
-
parameters?: Parameter[];
|
|
230
|
-
parameterType?: "single" | "multi";
|
|
231
|
-
}
|
|
232
|
-
declare class RemoteChain {
|
|
233
|
-
name: string;
|
|
234
|
-
description: string;
|
|
235
|
-
chainUrl: string;
|
|
236
|
-
parameters?: Parameter[];
|
|
237
|
-
parameterType: "single" | "multi";
|
|
238
|
-
constructor(options: RemoteChainParameters);
|
|
239
|
-
toAction(): Promise<Action<any>>;
|
|
240
|
-
inferLangServeParameters(): Promise<void>;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export { CopilotRuntimeChatCompletionRequest as C, RemoteChainParameters as R, CopilotRuntimeChatCompletionResponse as a, CopilotServiceAdapter as b, RemoteChain as c };
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { T as TextMessage, A as ActionExecutionMessage, R as ResultMessage, b as ActionInputAvailability, M as Message } from './index-adbd78f1.js';
|
|
2
|
-
import { ReplaySubject } from 'rxjs';
|
|
3
|
-
import { Parameter, Action } from '@copilotkit/shared';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The extensions response is used to receive additional information from the copilot runtime, specific to a
|
|
7
|
-
* service adapter or agent framework.
|
|
8
|
-
*
|
|
9
|
-
* Next time a request to the runtime is made, the extensions response will be included in the request as input.
|
|
10
|
-
*/
|
|
11
|
-
declare class ExtensionsResponse {
|
|
12
|
-
openaiAssistantAPI?: OpenAIApiAssistantAPIResponse;
|
|
13
|
-
}
|
|
14
|
-
declare class OpenAIApiAssistantAPIResponse {
|
|
15
|
-
runId?: string;
|
|
16
|
-
threadId?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare enum RuntimeEventTypes {
|
|
20
|
-
TextMessageStart = "TextMessageStart",
|
|
21
|
-
TextMessageContent = "TextMessageContent",
|
|
22
|
-
TextMessageEnd = "TextMessageEnd",
|
|
23
|
-
ActionExecutionStart = "ActionExecutionStart",
|
|
24
|
-
ActionExecutionArgs = "ActionExecutionArgs",
|
|
25
|
-
ActionExecutionEnd = "ActionExecutionEnd",
|
|
26
|
-
ActionExecutionResult = "ActionExecutionResult",
|
|
27
|
-
AgentStateMessage = "AgentStateMessage",
|
|
28
|
-
MetaEvent = "MetaEvent",
|
|
29
|
-
RunError = "RunError"
|
|
30
|
-
}
|
|
31
|
-
declare enum RuntimeMetaEventName {
|
|
32
|
-
LangGraphInterruptEvent = "LangGraphInterruptEvent",
|
|
33
|
-
LangGraphInterruptResumeEvent = "LangGraphInterruptResumeEvent",
|
|
34
|
-
CopilotKitLangGraphInterruptEvent = "CopilotKitLangGraphInterruptEvent"
|
|
35
|
-
}
|
|
36
|
-
type RunTimeMetaEvent = {
|
|
37
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
38
|
-
name: RuntimeMetaEventName.LangGraphInterruptEvent;
|
|
39
|
-
value: string;
|
|
40
|
-
} | {
|
|
41
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
42
|
-
name: RuntimeMetaEventName.CopilotKitLangGraphInterruptEvent;
|
|
43
|
-
data: {
|
|
44
|
-
value: string;
|
|
45
|
-
messages: (TextMessage | ActionExecutionMessage | ResultMessage)[];
|
|
46
|
-
};
|
|
47
|
-
} | {
|
|
48
|
-
type: RuntimeEventTypes.MetaEvent;
|
|
49
|
-
name: RuntimeMetaEventName.LangGraphInterruptResumeEvent;
|
|
50
|
-
data: string;
|
|
51
|
-
};
|
|
52
|
-
type RuntimeErrorEvent = {
|
|
53
|
-
type: RuntimeEventTypes.RunError;
|
|
54
|
-
message: string;
|
|
55
|
-
code?: string;
|
|
56
|
-
};
|
|
57
|
-
type RuntimeEvent = {
|
|
58
|
-
type: RuntimeEventTypes.TextMessageStart;
|
|
59
|
-
messageId: string;
|
|
60
|
-
parentMessageId?: string;
|
|
61
|
-
} | {
|
|
62
|
-
type: RuntimeEventTypes.TextMessageContent;
|
|
63
|
-
messageId: string;
|
|
64
|
-
content: string;
|
|
65
|
-
} | {
|
|
66
|
-
type: RuntimeEventTypes.TextMessageEnd;
|
|
67
|
-
messageId: string;
|
|
68
|
-
} | {
|
|
69
|
-
type: RuntimeEventTypes.ActionExecutionStart;
|
|
70
|
-
actionExecutionId: string;
|
|
71
|
-
actionName: string;
|
|
72
|
-
parentMessageId?: string;
|
|
73
|
-
} | {
|
|
74
|
-
type: RuntimeEventTypes.ActionExecutionArgs;
|
|
75
|
-
actionExecutionId: string;
|
|
76
|
-
args: string;
|
|
77
|
-
} | {
|
|
78
|
-
type: RuntimeEventTypes.ActionExecutionEnd;
|
|
79
|
-
actionExecutionId: string;
|
|
80
|
-
} | {
|
|
81
|
-
type: RuntimeEventTypes.ActionExecutionResult;
|
|
82
|
-
actionName: string;
|
|
83
|
-
actionExecutionId: string;
|
|
84
|
-
result: string;
|
|
85
|
-
} | {
|
|
86
|
-
type: RuntimeEventTypes.AgentStateMessage;
|
|
87
|
-
threadId: string;
|
|
88
|
-
agentName: string;
|
|
89
|
-
nodeName: string;
|
|
90
|
-
runId: string;
|
|
91
|
-
active: boolean;
|
|
92
|
-
role: string;
|
|
93
|
-
state: string;
|
|
94
|
-
running: boolean;
|
|
95
|
-
} | RunTimeMetaEvent | RuntimeErrorEvent;
|
|
96
|
-
type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
|
|
97
|
-
declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
|
|
98
|
-
constructor();
|
|
99
|
-
sendTextMessageStart({ messageId, parentMessageId, }: {
|
|
100
|
-
messageId: string;
|
|
101
|
-
parentMessageId?: string;
|
|
102
|
-
}): void;
|
|
103
|
-
sendTextMessageContent({ messageId, content }: {
|
|
104
|
-
messageId: string;
|
|
105
|
-
content: string;
|
|
106
|
-
}): void;
|
|
107
|
-
sendTextMessageEnd({ messageId }: {
|
|
108
|
-
messageId: string;
|
|
109
|
-
}): void;
|
|
110
|
-
sendTextMessage(messageId: string, content: string): void;
|
|
111
|
-
sendActionExecutionStart({ actionExecutionId, actionName, parentMessageId, }: {
|
|
112
|
-
actionExecutionId: string;
|
|
113
|
-
actionName: string;
|
|
114
|
-
parentMessageId?: string;
|
|
115
|
-
}): void;
|
|
116
|
-
sendActionExecutionArgs({ actionExecutionId, args, }: {
|
|
117
|
-
actionExecutionId: string;
|
|
118
|
-
args: string;
|
|
119
|
-
}): void;
|
|
120
|
-
sendActionExecutionEnd({ actionExecutionId }: {
|
|
121
|
-
actionExecutionId: string;
|
|
122
|
-
}): void;
|
|
123
|
-
sendActionExecution({ actionExecutionId, actionName, args, parentMessageId, }: {
|
|
124
|
-
actionExecutionId: string;
|
|
125
|
-
actionName: string;
|
|
126
|
-
args: string;
|
|
127
|
-
parentMessageId?: string;
|
|
128
|
-
}): void;
|
|
129
|
-
sendActionExecutionResult({ actionExecutionId, actionName, result, error, }: {
|
|
130
|
-
actionExecutionId: string;
|
|
131
|
-
actionName: string;
|
|
132
|
-
result?: string;
|
|
133
|
-
error?: {
|
|
134
|
-
code: string;
|
|
135
|
-
message: string;
|
|
136
|
-
};
|
|
137
|
-
}): void;
|
|
138
|
-
sendAgentStateMessage({ threadId, agentName, nodeName, runId, active, role, state, running, }: {
|
|
139
|
-
threadId: string;
|
|
140
|
-
agentName: string;
|
|
141
|
-
nodeName: string;
|
|
142
|
-
runId: string;
|
|
143
|
-
active: boolean;
|
|
144
|
-
role: string;
|
|
145
|
-
state: string;
|
|
146
|
-
running: boolean;
|
|
147
|
-
}): void;
|
|
148
|
-
}
|
|
149
|
-
declare class RuntimeEventSource {
|
|
150
|
-
private eventStream$;
|
|
151
|
-
private callback;
|
|
152
|
-
private errorHandler?;
|
|
153
|
-
private errorContext?;
|
|
154
|
-
constructor(params?: {
|
|
155
|
-
errorHandler?: (error: any, context: any) => Promise<void>;
|
|
156
|
-
errorContext?: any;
|
|
157
|
-
});
|
|
158
|
-
stream(callback: EventSourceCallback): Promise<void>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
declare class ActionInput {
|
|
162
|
-
name: string;
|
|
163
|
-
description: string;
|
|
164
|
-
jsonSchema: string;
|
|
165
|
-
available?: ActionInputAvailability;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
declare class ForwardedParametersInput {
|
|
169
|
-
model?: string;
|
|
170
|
-
maxTokens?: number;
|
|
171
|
-
stop?: string[];
|
|
172
|
-
toolChoice?: String;
|
|
173
|
-
toolChoiceFunctionName?: string;
|
|
174
|
-
temperature?: number;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* The extensions input is used to pass additional information to the copilot runtime, specific to a
|
|
179
|
-
* service adapter or agent framework.
|
|
180
|
-
*/
|
|
181
|
-
declare class ExtensionsInput {
|
|
182
|
-
openaiAssistantAPI?: OpenAIApiAssistantAPIInput;
|
|
183
|
-
}
|
|
184
|
-
declare class OpenAIApiAssistantAPIInput {
|
|
185
|
-
runId?: string;
|
|
186
|
-
threadId?: string;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
declare class AgentSessionInput {
|
|
190
|
-
agentName: string;
|
|
191
|
-
threadId?: string;
|
|
192
|
-
nodeName?: string;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
declare class AgentStateInput {
|
|
196
|
-
agentName: string;
|
|
197
|
-
state: string;
|
|
198
|
-
config?: string;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
interface CopilotRuntimeChatCompletionRequest {
|
|
202
|
-
eventSource: RuntimeEventSource;
|
|
203
|
-
messages: Message[];
|
|
204
|
-
actions: ActionInput[];
|
|
205
|
-
model?: string;
|
|
206
|
-
threadId?: string;
|
|
207
|
-
runId?: string;
|
|
208
|
-
forwardedParameters?: ForwardedParametersInput;
|
|
209
|
-
extensions?: ExtensionsInput;
|
|
210
|
-
agentSession?: AgentSessionInput;
|
|
211
|
-
agentStates?: AgentStateInput[];
|
|
212
|
-
}
|
|
213
|
-
interface CopilotRuntimeChatCompletionResponse {
|
|
214
|
-
threadId: string;
|
|
215
|
-
runId?: string;
|
|
216
|
-
extensions?: ExtensionsResponse;
|
|
217
|
-
}
|
|
218
|
-
interface CopilotServiceAdapter {
|
|
219
|
-
provider?: string;
|
|
220
|
-
model?: string;
|
|
221
|
-
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
222
|
-
name?: string;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
interface RemoteChainParameters {
|
|
226
|
-
name: string;
|
|
227
|
-
description: string;
|
|
228
|
-
chainUrl: string;
|
|
229
|
-
parameters?: Parameter[];
|
|
230
|
-
parameterType?: "single" | "multi";
|
|
231
|
-
}
|
|
232
|
-
declare class RemoteChain {
|
|
233
|
-
name: string;
|
|
234
|
-
description: string;
|
|
235
|
-
chainUrl: string;
|
|
236
|
-
parameters?: Parameter[];
|
|
237
|
-
parameterType: "single" | "multi";
|
|
238
|
-
constructor(options: RemoteChainParameters);
|
|
239
|
-
toAction(): Promise<Action<any>>;
|
|
240
|
-
inferLangServeParameters(): Promise<void>;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
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 };
|
package/dist/lib/cloud/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
|
|
15
|
-
// src/lib/cloud/index.ts
|
|
16
|
-
var cloud_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(cloud_exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/cloud/index.ts"],"sourcesContent":["export interface CopilotCloudOptions {\n baseUrl?: string;\n publicApiKey?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;","names":[]}
|
package/dist/lib/cloud/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|