@copilotkit/runtime 1.5.0-tyler-reset-chat.0 → 1.5.0
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 +141 -3
- package/__snapshots__/schema/schema.graphql +7 -9
- package/dist/{chunk-K67A6XOJ.mjs → chunk-25G6SHWM.mjs} +458 -331
- package/dist/chunk-25G6SHWM.mjs.map +1 -0
- package/dist/{chunk-OKQVDDJ2.mjs → chunk-4AYRDPWK.mjs} +285 -63
- package/dist/chunk-4AYRDPWK.mjs.map +1 -0
- package/dist/{chunk-ZBG4KJW5.mjs → chunk-AFKLCW76.mjs} +2 -2
- package/dist/{chunk-AGSBOD2T.mjs → chunk-D6J2N5ZQ.mjs} +2 -2
- package/dist/{chunk-QNQ6UT3D.mjs → chunk-PIUHAIBR.mjs} +2 -2
- package/dist/{chunk-B74M7FXG.mjs → chunk-RFF5IIZJ.mjs} +3 -2
- package/dist/chunk-RFF5IIZJ.mjs.map +1 -0
- package/dist/{copilot-runtime-12e7ac40.d.ts → copilot-runtime-2e46a7b6.d.ts} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/graphql/types/converted/index.js +2 -1
- package/dist/graphql/types/converted/index.js.map +1 -1
- package/dist/graphql/types/converted/index.mjs +1 -1
- package/dist/{groq-adapter-24abe931.d.ts → groq-adapter-7bf6824b.d.ts} +1 -1
- package/dist/{index-10b1c870.d.ts → index-ff3fbc33.d.ts} +7 -8
- package/dist/index.d.ts +5 -5
- package/dist/index.js +832 -480
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -11
- package/dist/index.mjs.map +1 -1
- package/dist/{langserve-f021ab9c.d.ts → langserve-f318db89.d.ts} +53 -14
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +737 -459
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +7 -7
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +71 -30
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +6 -6
- package/dist/lib/integrations/nest/index.d.ts +3 -3
- package/dist/lib/integrations/nest/index.js +71 -30
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +4 -4
- package/dist/lib/integrations/node-express/index.d.ts +3 -3
- package/dist/lib/integrations/node-express/index.js +71 -30
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +4 -4
- package/dist/lib/integrations/node-http/index.d.ts +3 -3
- package/dist/lib/integrations/node-http/index.js +71 -30
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +3 -3
- package/dist/service-adapters/index.d.ts +36 -5
- package/dist/service-adapters/index.js +285 -61
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +5 -1
- package/package.json +4 -4
- package/src/agents/langgraph/event-source.ts +140 -148
- package/src/agents/langgraph/events.ts +1 -1
- package/src/graphql/inputs/message.input.ts +15 -3
- package/src/graphql/resolvers/copilot.resolver.ts +32 -6
- package/src/graphql/types/converted/index.ts +4 -3
- package/src/graphql/types/copilot-response.type.ts +12 -3
- package/src/graphql/types/enums.ts +0 -11
- package/src/lib/runtime/copilot-runtime.ts +1 -7
- package/src/lib/runtime/remote-action-constructors.ts +64 -58
- package/src/lib/runtime/remote-actions.ts +1 -0
- package/src/lib/runtime/remote-lg-action.ts +184 -154
- package/src/service-adapters/anthropic/anthropic-adapter.ts +16 -6
- package/src/service-adapters/conversion.ts +2 -1
- package/src/service-adapters/events.ts +118 -54
- package/src/service-adapters/experimental/empty/empty-adapter.ts +33 -0
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +7 -3
- package/src/service-adapters/groq/groq-adapter.ts +23 -8
- package/src/service-adapters/index.ts +7 -1
- package/src/service-adapters/langchain/utils.ts +55 -32
- package/src/service-adapters/openai/openai-adapter.ts +22 -9
- package/src/service-adapters/openai/openai-assistant-adapter.ts +22 -8
- package/src/service-adapters/unify/unify-adapter.ts +28 -11
- package/dist/chunk-B74M7FXG.mjs.map +0 -1
- package/dist/chunk-K67A6XOJ.mjs.map +0 -1
- package/dist/chunk-OKQVDDJ2.mjs.map +0 -1
- /package/dist/{chunk-ZBG4KJW5.mjs.map → chunk-AFKLCW76.mjs.map} +0 -0
- /package/dist/{chunk-AGSBOD2T.mjs.map → chunk-D6J2N5ZQ.mjs.map} +0 -0
- /package/dist/{chunk-QNQ6UT3D.mjs.map → chunk-PIUHAIBR.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-AFKLCW76.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PIUHAIBR.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-D6J2N5ZQ.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -20,9 +20,16 @@ import {
|
|
|
20
20
|
getCommonConfig,
|
|
21
21
|
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-25G6SHWM.mjs";
|
|
24
|
+
import {
|
|
25
|
+
GuardrailsValidationFailureResponse,
|
|
26
|
+
MessageStreamInterruptedResponse,
|
|
27
|
+
UnknownErrorResponse
|
|
28
|
+
} from "./chunk-U3V2BCGI.mjs";
|
|
24
29
|
import {
|
|
25
30
|
AnthropicAdapter,
|
|
31
|
+
ExperimentalEmptyAdapter,
|
|
32
|
+
ExperimentalOllamaAdapter,
|
|
26
33
|
GoogleGenerativeAIAdapter,
|
|
27
34
|
GroqAdapter,
|
|
28
35
|
LangChainAdapter,
|
|
@@ -30,13 +37,8 @@ import {
|
|
|
30
37
|
OpenAIAssistantAdapter,
|
|
31
38
|
RemoteChain,
|
|
32
39
|
UnifyAdapter
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import
|
|
35
|
-
GuardrailsValidationFailureResponse,
|
|
36
|
-
MessageStreamInterruptedResponse,
|
|
37
|
-
UnknownErrorResponse
|
|
38
|
-
} from "./chunk-U3V2BCGI.mjs";
|
|
39
|
-
import "./chunk-B74M7FXG.mjs";
|
|
40
|
+
} from "./chunk-4AYRDPWK.mjs";
|
|
41
|
+
import "./chunk-RFF5IIZJ.mjs";
|
|
40
42
|
import "./chunk-D2WLFQS6.mjs";
|
|
41
43
|
import "./chunk-44O2JGUY.mjs";
|
|
42
44
|
|
|
@@ -45,6 +47,8 @@ import "reflect-metadata";
|
|
|
45
47
|
export {
|
|
46
48
|
AnthropicAdapter,
|
|
47
49
|
CopilotRuntime,
|
|
50
|
+
ExperimentalEmptyAdapter,
|
|
51
|
+
ExperimentalOllamaAdapter,
|
|
48
52
|
GoogleGenerativeAIAdapter,
|
|
49
53
|
GroqAdapter,
|
|
50
54
|
GuardrailsValidationFailureResponse,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"reflect-metadata\";\nexport * from \"./lib\";\nexport * from \"./utils\";\nexport * from \"./service-adapters\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"reflect-metadata\";\nexport * from \"./lib\";\nexport * from \"./utils\";\nexport * from \"./service-adapters\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActionInputAvailability, a as Message } from './index-
|
|
1
|
+
import { A as ActionInputAvailability, a as Message } from './index-ff3fbc33.js';
|
|
2
2
|
import * as rxjs from 'rxjs';
|
|
3
3
|
import { Subject, ReplaySubject } from 'rxjs';
|
|
4
4
|
import { Action, Parameter } from '@copilotkit/shared';
|
|
@@ -29,25 +29,29 @@ declare enum RuntimeEventTypes {
|
|
|
29
29
|
ActionExecutionResult = "ActionExecutionResult",
|
|
30
30
|
AgentStateMessage = "AgentStateMessage"
|
|
31
31
|
}
|
|
32
|
-
type FunctionCallScope = "client" | "server" | "passThrough";
|
|
33
32
|
type RuntimeEvent = {
|
|
34
33
|
type: RuntimeEventTypes.TextMessageStart;
|
|
35
34
|
messageId: string;
|
|
35
|
+
parentMessageId?: string;
|
|
36
36
|
} | {
|
|
37
37
|
type: RuntimeEventTypes.TextMessageContent;
|
|
38
|
+
messageId: string;
|
|
38
39
|
content: string;
|
|
39
40
|
} | {
|
|
40
41
|
type: RuntimeEventTypes.TextMessageEnd;
|
|
42
|
+
messageId: string;
|
|
41
43
|
} | {
|
|
42
44
|
type: RuntimeEventTypes.ActionExecutionStart;
|
|
43
45
|
actionExecutionId: string;
|
|
44
46
|
actionName: string;
|
|
45
|
-
|
|
47
|
+
parentMessageId?: string;
|
|
46
48
|
} | {
|
|
47
49
|
type: RuntimeEventTypes.ActionExecutionArgs;
|
|
50
|
+
actionExecutionId: string;
|
|
48
51
|
args: string;
|
|
49
52
|
} | {
|
|
50
53
|
type: RuntimeEventTypes.ActionExecutionEnd;
|
|
54
|
+
actionExecutionId: string;
|
|
51
55
|
} | {
|
|
52
56
|
type: RuntimeEventTypes.ActionExecutionResult;
|
|
53
57
|
actionName: string;
|
|
@@ -67,22 +71,57 @@ type RuntimeEvent = {
|
|
|
67
71
|
type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
|
|
68
72
|
declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
|
|
69
73
|
constructor();
|
|
70
|
-
sendTextMessageStart(messageId
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
sendTextMessageStart({ messageId, parentMessageId, }: {
|
|
75
|
+
messageId: string;
|
|
76
|
+
parentMessageId?: string;
|
|
77
|
+
}): void;
|
|
78
|
+
sendTextMessageContent({ messageId, content }: {
|
|
79
|
+
messageId: string;
|
|
80
|
+
content: string;
|
|
81
|
+
}): void;
|
|
82
|
+
sendTextMessageEnd({ messageId }: {
|
|
83
|
+
messageId: string;
|
|
84
|
+
}): void;
|
|
73
85
|
sendTextMessage(messageId: string, content: string): void;
|
|
74
|
-
sendActionExecutionStart(actionExecutionId
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
sendActionExecutionStart({ actionExecutionId, actionName, parentMessageId, }: {
|
|
87
|
+
actionExecutionId: string;
|
|
88
|
+
actionName: string;
|
|
89
|
+
parentMessageId?: string;
|
|
90
|
+
}): void;
|
|
91
|
+
sendActionExecutionArgs({ actionExecutionId, args, }: {
|
|
92
|
+
actionExecutionId: string;
|
|
93
|
+
args: string;
|
|
94
|
+
}): void;
|
|
95
|
+
sendActionExecutionEnd({ actionExecutionId }: {
|
|
96
|
+
actionExecutionId: string;
|
|
97
|
+
}): void;
|
|
98
|
+
sendActionExecution({ actionExecutionId, actionName, args, parentMessageId, }: {
|
|
99
|
+
actionExecutionId: string;
|
|
100
|
+
actionName: string;
|
|
101
|
+
args: string;
|
|
102
|
+
parentMessageId?: string;
|
|
103
|
+
}): void;
|
|
104
|
+
sendActionExecutionResult({ actionExecutionId, actionName, result, }: {
|
|
105
|
+
actionExecutionId: string;
|
|
106
|
+
actionName: string;
|
|
107
|
+
result: string;
|
|
108
|
+
}): void;
|
|
109
|
+
sendAgentStateMessage({ threadId, agentName, nodeName, runId, active, role, state, running, }: {
|
|
110
|
+
threadId: string;
|
|
111
|
+
agentName: string;
|
|
112
|
+
nodeName: string;
|
|
113
|
+
runId: string;
|
|
114
|
+
active: boolean;
|
|
115
|
+
role: string;
|
|
116
|
+
state: string;
|
|
117
|
+
running: boolean;
|
|
118
|
+
}): void;
|
|
80
119
|
}
|
|
81
120
|
declare class RuntimeEventSource {
|
|
82
121
|
private eventStream$;
|
|
83
122
|
private callback;
|
|
84
123
|
stream(callback: EventSourceCallback): Promise<void>;
|
|
85
|
-
sendErrorMessageToChat(): void;
|
|
124
|
+
sendErrorMessageToChat(message?: string): void;
|
|
86
125
|
processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents, }: {
|
|
87
126
|
serverSideActions: Action<any>[];
|
|
88
127
|
guardrailsResult$?: Subject<GuardrailsResult>;
|
|
@@ -133,4 +172,4 @@ declare class RemoteChain {
|
|
|
133
172
|
inferLangServeParameters(): Promise<void>;
|
|
134
173
|
}
|
|
135
174
|
|
|
136
|
-
export { ActionInput as A,
|
|
175
|
+
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 };
|
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-2e46a7b6.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-7bf6824b.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-f318db89.js';
|
|
9
|
+
import '../index-ff3fbc33.js';
|
|
10
10
|
import '../graphql/types/base/index.js';
|
|
11
11
|
import 'rxjs';
|
|
12
12
|
import 'graphql';
|