@copilotkit/runtime 1.5.12-next.5 → 1.5.12-next.7
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 +17 -0
- package/__snapshots__/schema/schema.graphql +33 -0
- package/dist/{chunk-MFDRA3BJ.mjs → chunk-34276UUU.mjs} +652 -285
- package/dist/chunk-34276UUU.mjs.map +1 -0
- package/dist/{chunk-XRW7ZSWJ.mjs → chunk-DLESGNLO.mjs} +2 -2
- package/dist/{chunk-TPTCSIAR.mjs → chunk-S3KKBII4.mjs} +42 -30
- package/dist/chunk-S3KKBII4.mjs.map +1 -0
- package/dist/{chunk-QDMAQO2C.mjs → chunk-UBYSQI43.mjs} +2 -2
- package/dist/{chunk-NORCONUM.mjs → chunk-WTUPF3W3.mjs} +2 -2
- package/dist/{copilot-runtime-1a224a0f.d.ts → copilot-runtime-8c442d65.d.ts} +16 -3
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/{groq-adapter-c35c5374.d.ts → groq-adapter-7a82cd22.d.ts} +21 -1
- package/dist/{index-24315d90.d.ts → index-a7f37670.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +727 -348
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{langserve-a16ef8f4.d.ts → langserve-e308c437.d.ts} +32 -3
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +725 -346
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +504 -244
- 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 +3 -3
- package/dist/lib/integrations/nest/index.js +504 -244
- 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 +3 -3
- package/dist/lib/integrations/node-express/index.js +504 -244
- 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 +3 -3
- package/dist/lib/integrations/node-http/index.js +504 -244
- 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.d.ts +4 -4
- package/dist/service-adapters/index.js +23 -11
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +2 -2
- package/src/graphql/inputs/extensions.input.ts +21 -0
- package/src/graphql/inputs/generate-copilot-response.input.ts +4 -0
- package/src/graphql/inputs/load-agent-state.input.ts +10 -0
- package/src/graphql/resolvers/copilot.resolver.ts +8 -3
- package/src/graphql/resolvers/state.resolver.ts +23 -0
- package/src/graphql/types/agents-response.type.ts +1 -4
- package/src/graphql/types/copilot-response.type.ts +5 -1
- package/src/graphql/types/extensions-response.type.ts +23 -0
- package/src/graphql/types/load-agent-state-response.type.ts +17 -0
- package/src/lib/integrations/shared.ts +2 -1
- package/src/lib/runtime/copilot-runtime.ts +155 -31
- package/src/lib/runtime/remote-action-constructors.ts +42 -33
- package/src/lib/runtime/remote-actions.ts +12 -7
- package/src/lib/runtime/remote-lg-action.ts +24 -12
- package/src/service-adapters/anthropic/anthropic-adapter.ts +2 -3
- package/src/service-adapters/empty/empty-adapter.ts +2 -2
- package/src/service-adapters/events.ts +5 -0
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +2 -2
- package/src/service-adapters/groq/groq-adapter.ts +2 -2
- package/src/service-adapters/langchain/langchain-adapter.ts +10 -3
- package/src/service-adapters/openai/openai-adapter.ts +4 -3
- package/src/service-adapters/openai/openai-assistant-adapter.ts +15 -4
- package/src/service-adapters/service-adapter.ts +4 -0
- package/src/service-adapters/unify/unify-adapter.ts +2 -3
- package/dist/chunk-MFDRA3BJ.mjs.map +0 -1
- package/dist/chunk-TPTCSIAR.mjs.map +0 -1
- /package/dist/{chunk-XRW7ZSWJ.mjs.map → chunk-DLESGNLO.mjs.map} +0 -0
- /package/dist/{chunk-QDMAQO2C.mjs.map → chunk-UBYSQI43.mjs.map} +0 -0
- /package/dist/{chunk-NORCONUM.mjs.map → chunk-WTUPF3W3.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UBYSQI43.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DLESGNLO.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WTUPF3W3.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getCommonConfig,
|
|
21
21
|
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-34276UUU.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AnthropicAdapter,
|
|
26
26
|
EmptyAdapter,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
OpenAIAssistantAdapter,
|
|
34
34
|
RemoteChain,
|
|
35
35
|
UnifyAdapter
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-S3KKBII4.mjs";
|
|
37
37
|
import {
|
|
38
38
|
GuardrailsValidationFailureResponse,
|
|
39
39
|
MessageStreamInterruptedResponse,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActionInputAvailability,
|
|
1
|
+
import { A as ActionInputAvailability, a as Message } from './index-a7f37670.js';
|
|
2
2
|
import * as rxjs from 'rxjs';
|
|
3
3
|
import { Subject, ReplaySubject } from 'rxjs';
|
|
4
4
|
import { Action, Parameter } from '@copilotkit/shared';
|
|
@@ -126,10 +126,11 @@ declare class RuntimeEventSource {
|
|
|
126
126
|
private callback;
|
|
127
127
|
stream(callback: EventSourceCallback): Promise<void>;
|
|
128
128
|
sendErrorMessageToChat(message?: string): void;
|
|
129
|
-
processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents, }: {
|
|
129
|
+
processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents, threadId, }: {
|
|
130
130
|
serverSideActions: Action<any>[];
|
|
131
131
|
guardrailsResult$?: Subject<GuardrailsResult>;
|
|
132
132
|
actionInputsWithoutAgents: ActionInput[];
|
|
133
|
+
threadId: string;
|
|
133
134
|
}): rxjs.Observable<RuntimeEvent>;
|
|
134
135
|
}
|
|
135
136
|
|
|
@@ -142,6 +143,32 @@ declare class ForwardedParametersInput {
|
|
|
142
143
|
temperature?: number;
|
|
143
144
|
}
|
|
144
145
|
|
|
146
|
+
/**
|
|
147
|
+
* The extensions input is used to pass additional information to the copilot runtime, specific to a
|
|
148
|
+
* service adapter or agent framework.
|
|
149
|
+
*/
|
|
150
|
+
declare class ExtensionsInput {
|
|
151
|
+
openaiAssistantAPI?: OpenAIApiAssistantAPIInput;
|
|
152
|
+
}
|
|
153
|
+
declare class OpenAIApiAssistantAPIInput {
|
|
154
|
+
runId?: string;
|
|
155
|
+
threadId?: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The extensions response is used to receive additional information from the copilot runtime, specific to a
|
|
160
|
+
* service adapter or agent framework.
|
|
161
|
+
*
|
|
162
|
+
* Next time a request to the runtime is made, the extensions response will be included in the request as input.
|
|
163
|
+
*/
|
|
164
|
+
declare class ExtensionsResponse {
|
|
165
|
+
openaiAssistantAPI?: OpenAIApiAssistantAPIResponse;
|
|
166
|
+
}
|
|
167
|
+
declare class OpenAIApiAssistantAPIResponse {
|
|
168
|
+
runId?: string;
|
|
169
|
+
threadId?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
145
172
|
interface CopilotRuntimeChatCompletionRequest {
|
|
146
173
|
eventSource: RuntimeEventSource;
|
|
147
174
|
messages: Message[];
|
|
@@ -150,10 +177,12 @@ interface CopilotRuntimeChatCompletionRequest {
|
|
|
150
177
|
threadId?: string;
|
|
151
178
|
runId?: string;
|
|
152
179
|
forwardedParameters?: ForwardedParametersInput;
|
|
180
|
+
extensions?: ExtensionsInput;
|
|
153
181
|
}
|
|
154
182
|
interface CopilotRuntimeChatCompletionResponse {
|
|
155
183
|
threadId: string;
|
|
156
184
|
runId?: string;
|
|
185
|
+
extensions?: ExtensionsResponse;
|
|
157
186
|
}
|
|
158
187
|
interface CopilotServiceAdapter {
|
|
159
188
|
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
@@ -177,4 +206,4 @@ declare class RemoteChain {
|
|
|
177
206
|
inferLangServeParameters(): Promise<void>;
|
|
178
207
|
}
|
|
179
208
|
|
|
180
|
-
export { ActionInput as A, CopilotRuntimeChatCompletionRequest as C, ForwardedParametersInput as F, RemoteChainParameters as R, CopilotRuntimeChatCompletionResponse as a, CopilotServiceAdapter as b, RemoteChain as c, RuntimeEventSource as d };
|
|
209
|
+
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, RuntimeEventSource as d, ExtensionsResponse as e };
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from '../copilot-runtime-
|
|
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-
|
|
1
|
+
export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from '../copilot-runtime-8c442d65.js';
|
|
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-7a82cd22.js';
|
|
3
3
|
export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './integrations/index.js';
|
|
4
4
|
export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/index.js';
|
|
5
5
|
export { copilotRuntimeNodeExpressEndpoint } from './integrations/node-express/index.js';
|
|
6
6
|
export { copilotRuntimeNestEndpoint } from './integrations/nest/index.js';
|
|
7
7
|
import '@copilotkit/shared';
|
|
8
|
-
import '../langserve-
|
|
9
|
-
import '../index-
|
|
8
|
+
import '../langserve-e308c437.js';
|
|
9
|
+
import '../index-a7f37670.js';
|
|
10
10
|
import '../graphql/types/base/index.js';
|
|
11
11
|
import 'rxjs';
|
|
12
12
|
import 'graphql';
|