@copilotkit/runtime 1.3.12-lgc-alpha-1.0 → 1.3.12
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 +4 -3
- package/dist/{chunk-7MQDBRXJ.mjs → chunk-24WEOOFX.mjs} +2 -2
- package/dist/{chunk-E6ZFCM3B.mjs → chunk-F2KJWMGD.mjs} +133 -561
- package/dist/chunk-F2KJWMGD.mjs.map +1 -0
- package/dist/{chunk-6HXQC7IT.mjs → chunk-IXVCESAR.mjs} +9 -36
- package/dist/chunk-IXVCESAR.mjs.map +1 -0
- package/dist/{chunk-TM7ZRU3M.mjs → chunk-IZP72K7I.mjs} +2 -2
- package/dist/{chunk-6B3NPPSR.mjs → chunk-PRG6VWHR.mjs} +2 -2
- package/dist/{chunk-XMDH5MKI.mjs → chunk-WBLYFYMZ.mjs} +2 -2
- package/dist/{chunk-V7SK6QZN.mjs → chunk-ZEHCLFJ2.mjs} +9 -6
- package/dist/chunk-ZEHCLFJ2.mjs.map +1 -0
- package/dist/{copilot-runtime-aba7d4b4.d.ts → copilot-runtime-df3527ad.d.ts} +5 -27
- package/dist/index.d.ts +1 -1
- package/dist/index.js +186 -638
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -13
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +186 -638
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +9 -13
- package/dist/lib/integrations/index.d.ts +2 -2
- package/dist/lib/integrations/index.js +4 -5
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +5 -5
- package/dist/lib/integrations/nest/index.d.ts +1 -1
- package/dist/lib/integrations/nest/index.js +4 -5
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +3 -3
- package/dist/lib/integrations/node-express/index.d.ts +1 -1
- package/dist/lib/integrations/node-express/index.js +4 -5
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +3 -3
- package/dist/lib/integrations/node-http/index.d.ts +1 -1
- package/dist/lib/integrations/node-http/index.js +4 -5
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +2 -2
- package/dist/service-adapters/index.js +8 -5
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +2 -2
- package/package.json +6 -7
- package/src/agents/langgraph/event-source.ts +67 -22
- package/src/lib/runtime/copilot-runtime.ts +11 -58
- package/src/lib/runtime/remote-actions.ts +159 -65
- package/src/service-adapters/events.ts +5 -1
- package/src/service-adapters/langchain/utils.test.ts +169 -0
- package/src/service-adapters/langchain/utils.ts +10 -5
- package/dist/chunk-6HXQC7IT.mjs.map +0 -1
- package/dist/chunk-E6ZFCM3B.mjs.map +0 -1
- package/dist/chunk-V7SK6QZN.mjs.map +0 -1
- package/src/lib/runtime/remote-action-constructors.ts +0 -283
- package/src/lib/runtime/remote-lg-cloud-action.ts +0 -441
- /package/dist/{chunk-7MQDBRXJ.mjs.map → chunk-24WEOOFX.mjs.map} +0 -0
- /package/dist/{chunk-TM7ZRU3M.mjs.map → chunk-IZP72K7I.mjs.map} +0 -0
- /package/dist/{chunk-6B3NPPSR.mjs.map → chunk-PRG6VWHR.mjs.map} +0 -0
- /package/dist/{chunk-XMDH5MKI.mjs.map → chunk-WBLYFYMZ.mjs.map} +0 -0
|
@@ -42,32 +42,14 @@ declare class AgentStateInput {
|
|
|
42
42
|
state: string;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
type
|
|
46
|
-
declare enum EndpointType {
|
|
47
|
-
CopilotKit = "copilotKit",
|
|
48
|
-
LangGraphCloud = "langgraph-cloud"
|
|
49
|
-
}
|
|
50
|
-
interface BaseEndpointDefinition<TActionType extends EndpointType> {
|
|
51
|
-
type?: TActionType;
|
|
52
|
-
}
|
|
53
|
-
interface CopilotKitEndpoint extends BaseEndpointDefinition<EndpointType.CopilotKit> {
|
|
45
|
+
type RemoteActionDefinition = {
|
|
54
46
|
url: string;
|
|
55
47
|
onBeforeRequest?: ({ ctx }: {
|
|
56
48
|
ctx: GraphQLContext;
|
|
57
49
|
}) => {
|
|
58
50
|
headers?: Record<string, string> | undefined;
|
|
59
51
|
};
|
|
60
|
-
}
|
|
61
|
-
interface LangGraphCloudAgent {
|
|
62
|
-
name: string;
|
|
63
|
-
description: string;
|
|
64
|
-
assistantId?: string;
|
|
65
|
-
}
|
|
66
|
-
interface LangGraphCloudEndpoint extends BaseEndpointDefinition<EndpointType.LangGraphCloud> {
|
|
67
|
-
deploymentUrl: string;
|
|
68
|
-
langsmithApiKey: string;
|
|
69
|
-
agents: LangGraphCloudAgent[];
|
|
70
|
-
}
|
|
52
|
+
};
|
|
71
53
|
|
|
72
54
|
declare class AgentSessionInput {
|
|
73
55
|
agentName: string;
|
|
@@ -166,13 +148,12 @@ interface CopilotRuntimeConstructorParams<T extends Parameter[] | [] = []> {
|
|
|
166
148
|
*/
|
|
167
149
|
middleware?: Middleware;
|
|
168
150
|
actions?: ActionsConfiguration<T>;
|
|
169
|
-
remoteActions?:
|
|
170
|
-
remoteEndpoints?: EndpointDefinition[];
|
|
151
|
+
remoteActions?: RemoteActionDefinition[];
|
|
171
152
|
langserve?: RemoteChainParameters[];
|
|
172
153
|
}
|
|
173
154
|
declare class CopilotRuntime<const T extends Parameter[] | [] = []> {
|
|
174
155
|
actions: ActionsConfiguration<T>;
|
|
175
|
-
private
|
|
156
|
+
private remoteActionDefinitions;
|
|
176
157
|
private langserve;
|
|
177
158
|
private onBeforeRequest?;
|
|
178
159
|
private onAfterRequest?;
|
|
@@ -180,10 +161,7 @@ declare class CopilotRuntime<const T extends Parameter[] | [] = []> {
|
|
|
180
161
|
processRuntimeRequest(request: CopilotRuntimeRequest): Promise<CopilotRuntimeResponse>;
|
|
181
162
|
private processAgentRequest;
|
|
182
163
|
private getServerSideActions;
|
|
183
|
-
private resolveEndpointType;
|
|
184
164
|
}
|
|
185
165
|
declare function flattenToolCallsNoDuplicates(toolsByPriority: ActionInput[]): ActionInput[];
|
|
186
|
-
declare function copilotKitEndpoint(config: Omit<CopilotKitEndpoint, "type">): CopilotKitEndpoint;
|
|
187
|
-
declare function langGraphCloudEndpoint(config: Omit<LangGraphCloudEndpoint, "type">): LangGraphCloudEndpoint;
|
|
188
166
|
|
|
189
|
-
export { CopilotRuntimeConstructorParams as C, GraphQLContext as G, CopilotRuntime as a, CopilotRequestContextProperties as b,
|
|
167
|
+
export { CopilotRuntimeConstructorParams as C, GraphQLContext as G, CopilotRuntime as a, CopilotRequestContextProperties as b, CreateCopilotRuntimeServerOptions as c, createContext as d, buildSchema as e, flattenToolCallsNoDuplicates as f, CommonConfig as g, getCommonConfig as h };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { g as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, c as CreateCopilotRuntimeServerOptions, G as GraphQLContext, e as buildSchema, d as createContext, f as flattenToolCallsNoDuplicates, h as getCommonConfig } from './copilot-runtime-df3527ad.js';
|
|
2
2
|
export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from './groq-adapter-b122e71f.js';
|
|
3
3
|
export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './lib/integrations/index.js';
|
|
4
4
|
export { copilotRuntimeNodeHttpEndpoint } from './lib/integrations/node-http/index.js';
|