@copilotkit/runtime 1.4.8-coagents-v0-3.1 → 1.4.8-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 +5 -4
- package/__snapshots__/schema/schema.graphql +10 -7
- package/dist/{chunk-FVYNRYIB.mjs → chunk-5KJYPVQJ.mjs} +307 -423
- package/dist/chunk-5KJYPVQJ.mjs.map +1 -0
- package/dist/{chunk-RFF5IIZJ.mjs → chunk-B74M7FXG.mjs} +2 -3
- package/dist/chunk-B74M7FXG.mjs.map +1 -0
- package/dist/{chunk-BACNNHHI.mjs → chunk-CGGI46KC.mjs} +2 -2
- package/dist/{chunk-YFG3Q3YH.mjs → chunk-EU52BTKR.mjs} +2 -2
- package/dist/{chunk-MQJNZYAH.mjs → chunk-KO4QCMY4.mjs} +2 -2
- package/dist/{chunk-2PK2SFRB.mjs → chunk-W7GP2EOT.mjs} +106 -221
- package/dist/chunk-W7GP2EOT.mjs.map +1 -0
- package/dist/{copilot-runtime-b15b683d.d.ts → copilot-runtime-1c5bf72b.d.ts} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/graphql/types/converted/index.js +1 -2
- package/dist/graphql/types/converted/index.js.map +1 -1
- package/dist/graphql/types/converted/index.mjs +1 -1
- package/dist/{groq-adapter-50aa9621.d.ts → groq-adapter-b6a40422.d.ts} +1 -1
- package/dist/{index-ff3fbc33.d.ts → index-10b1c870.d.ts} +8 -7
- package/dist/index.d.ts +5 -5
- package/dist/index.js +515 -745
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/dist/{langserve-8ec29cba.d.ts → langserve-6245df39.d.ts} +14 -52
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +442 -706
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +37 -71
- 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 +37 -71
- 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 +37 -71
- 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 +37 -71
- 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 +106 -219
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +5 -1
- package/package.json +2 -2
- package/src/agents/langgraph/event-source.ts +148 -140
- package/src/agents/langgraph/events.ts +1 -1
- package/src/graphql/inputs/forwarded-parameters.input.ts +3 -0
- package/src/graphql/inputs/message.input.ts +3 -15
- package/src/graphql/resolvers/copilot.resolver.ts +6 -32
- package/src/graphql/types/converted/index.ts +3 -4
- package/src/graphql/types/copilot-response.type.ts +3 -12
- package/src/graphql/types/enums.ts +11 -0
- package/src/lib/runtime/remote-action-constructors.ts +62 -60
- package/src/lib/runtime/remote-actions.ts +0 -1
- package/src/lib/runtime/remote-lg-action.ts +140 -161
- package/src/service-adapters/anthropic/anthropic-adapter.ts +6 -16
- package/src/service-adapters/conversion.ts +1 -2
- package/src/service-adapters/events.ts +52 -111
- package/src/service-adapters/experimental/empty/empty-adapter.ts +33 -0
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +3 -7
- package/src/service-adapters/groq/groq-adapter.ts +8 -23
- package/src/service-adapters/index.ts +7 -1
- package/src/service-adapters/langchain/utils.ts +31 -49
- package/src/service-adapters/openai/openai-adapter.ts +9 -22
- package/src/service-adapters/openai/openai-assistant-adapter.ts +8 -22
- package/src/service-adapters/unify/unify-adapter.ts +11 -28
- package/dist/chunk-2PK2SFRB.mjs.map +0 -1
- package/dist/chunk-FVYNRYIB.mjs.map +0 -1
- package/dist/chunk-RFF5IIZJ.mjs.map +0 -1
- /package/dist/{chunk-BACNNHHI.mjs.map → chunk-CGGI46KC.mjs.map} +0 -0
- /package/dist/{chunk-YFG3Q3YH.mjs.map → chunk-EU52BTKR.mjs.map} +0 -0
- /package/dist/{chunk-MQJNZYAH.mjs.map → chunk-KO4QCMY4.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-EU52BTKR.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KO4QCMY4.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CGGI46KC.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -20,9 +20,11 @@ import {
|
|
|
20
20
|
getCommonConfig,
|
|
21
21
|
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5KJYPVQJ.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AnthropicAdapter,
|
|
26
|
+
ExperimentalEmptyAdapter,
|
|
27
|
+
ExperimentalOllamaAdapter,
|
|
26
28
|
GoogleGenerativeAIAdapter,
|
|
27
29
|
GroqAdapter,
|
|
28
30
|
LangChainAdapter,
|
|
@@ -30,13 +32,13 @@ import {
|
|
|
30
32
|
OpenAIAssistantAdapter,
|
|
31
33
|
RemoteChain,
|
|
32
34
|
UnifyAdapter
|
|
33
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-W7GP2EOT.mjs";
|
|
34
36
|
import {
|
|
35
37
|
GuardrailsValidationFailureResponse,
|
|
36
38
|
MessageStreamInterruptedResponse,
|
|
37
39
|
UnknownErrorResponse
|
|
38
40
|
} from "./chunk-U3V2BCGI.mjs";
|
|
39
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-B74M7FXG.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-10b1c870.js';
|
|
2
2
|
import * as rxjs from 'rxjs';
|
|
3
3
|
import { Subject, ReplaySubject } from 'rxjs';
|
|
4
4
|
import { Action, Parameter } from '@copilotkit/shared';
|
|
@@ -29,29 +29,25 @@ declare enum RuntimeEventTypes {
|
|
|
29
29
|
ActionExecutionResult = "ActionExecutionResult",
|
|
30
30
|
AgentStateMessage = "AgentStateMessage"
|
|
31
31
|
}
|
|
32
|
+
type FunctionCallScope = "client" | "server" | "passThrough";
|
|
32
33
|
type RuntimeEvent = {
|
|
33
34
|
type: RuntimeEventTypes.TextMessageStart;
|
|
34
35
|
messageId: string;
|
|
35
|
-
parentMessageId?: string;
|
|
36
36
|
} | {
|
|
37
37
|
type: RuntimeEventTypes.TextMessageContent;
|
|
38
|
-
messageId: string;
|
|
39
38
|
content: string;
|
|
40
39
|
} | {
|
|
41
40
|
type: RuntimeEventTypes.TextMessageEnd;
|
|
42
|
-
messageId: string;
|
|
43
41
|
} | {
|
|
44
42
|
type: RuntimeEventTypes.ActionExecutionStart;
|
|
45
43
|
actionExecutionId: string;
|
|
46
44
|
actionName: string;
|
|
47
|
-
|
|
45
|
+
scope?: FunctionCallScope;
|
|
48
46
|
} | {
|
|
49
47
|
type: RuntimeEventTypes.ActionExecutionArgs;
|
|
50
|
-
actionExecutionId: string;
|
|
51
48
|
args: string;
|
|
52
49
|
} | {
|
|
53
50
|
type: RuntimeEventTypes.ActionExecutionEnd;
|
|
54
|
-
actionExecutionId: string;
|
|
55
51
|
} | {
|
|
56
52
|
type: RuntimeEventTypes.ActionExecutionResult;
|
|
57
53
|
actionName: string;
|
|
@@ -71,51 +67,16 @@ type RuntimeEvent = {
|
|
|
71
67
|
type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
|
|
72
68
|
declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
|
|
73
69
|
constructor();
|
|
74
|
-
sendTextMessageStart(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}): void;
|
|
78
|
-
sendTextMessageContent({ messageId, content }: {
|
|
79
|
-
messageId: string;
|
|
80
|
-
content: string;
|
|
81
|
-
}): void;
|
|
82
|
-
sendTextMessageEnd({ messageId }: {
|
|
83
|
-
messageId: string;
|
|
84
|
-
}): void;
|
|
70
|
+
sendTextMessageStart(messageId: string): void;
|
|
71
|
+
sendTextMessageContent(content: string): void;
|
|
72
|
+
sendTextMessageEnd(): void;
|
|
85
73
|
sendTextMessage(messageId: string, content: string): void;
|
|
86
|
-
sendActionExecutionStart(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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;
|
|
74
|
+
sendActionExecutionStart(actionExecutionId: string, actionName: string): void;
|
|
75
|
+
sendActionExecutionArgs(args: string): void;
|
|
76
|
+
sendActionExecutionEnd(): void;
|
|
77
|
+
sendActionExecution(actionExecutionId: string, toolName: string, args: string): void;
|
|
78
|
+
sendActionExecutionResult(actionExecutionId: string, actionName: string, result: string): void;
|
|
79
|
+
sendAgentStateMessage(threadId: string, agentName: string, nodeName: string, runId: string, active: boolean, role: string, state: string, running: boolean): void;
|
|
119
80
|
}
|
|
120
81
|
declare class RuntimeEventSource {
|
|
121
82
|
private eventStream$;
|
|
@@ -135,6 +96,7 @@ declare class ForwardedParametersInput {
|
|
|
135
96
|
stop?: string[];
|
|
136
97
|
toolChoice?: String;
|
|
137
98
|
toolChoiceFunctionName?: string;
|
|
99
|
+
temperature?: number;
|
|
138
100
|
}
|
|
139
101
|
|
|
140
102
|
interface CopilotRuntimeChatCompletionRequest {
|
|
@@ -172,4 +134,4 @@ declare class RemoteChain {
|
|
|
172
134
|
inferLangServeParameters(): Promise<void>;
|
|
173
135
|
}
|
|
174
136
|
|
|
175
|
-
export { ActionInput as A,
|
|
137
|
+
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-1c5bf72b.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-b6a40422.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-6245df39.js';
|
|
9
|
+
import '../index-10b1c870.js';
|
|
10
10
|
import '../graphql/types/base/index.js';
|
|
11
11
|
import 'rxjs';
|
|
12
12
|
import 'graphql';
|