@copilotkit/runtime 1.4.8 → 1.5.0-coagents-v0-3.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 +13 -0
- package/__snapshots__/schema/schema.graphql +7 -9
- package/dist/{chunk-W7GP2EOT.mjs → chunk-4AYRDPWK.mjs} +239 -65
- package/dist/chunk-4AYRDPWK.mjs.map +1 -0
- package/dist/{chunk-LSLFIYKP.mjs → chunk-7BOO3OFP.mjs} +2 -2
- package/dist/{chunk-GGNRDS7N.mjs → chunk-GSTWFOZF.mjs} +2 -2
- package/dist/{chunk-TA5I5LYF.mjs → chunk-OMAAKIJQ.mjs} +2 -2
- package/dist/{chunk-R6AUAQK6.mjs → chunk-PXS4SBRF.mjs} +423 -299
- package/dist/chunk-PXS4SBRF.mjs.map +1 -0
- package/dist/{chunk-B74M7FXG.mjs → chunk-RFF5IIZJ.mjs} +3 -2
- package/dist/chunk-RFF5IIZJ.mjs.map +1 -0
- package/dist/{copilot-runtime-48d7c2fc.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-ac43305a.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 +4 -4
- package/dist/index.js +747 -448
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/{langserve-b74e8606.d.ts → langserve-f318db89.d.ts} +51 -12
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +714 -439
- 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 +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 +4 -4
- package/dist/service-adapters/index.js +238 -64
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +2 -2
- 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/remote-action-constructors.ts +4 -2
- package/src/lib/runtime/remote-actions.ts +1 -0
- package/src/lib/runtime/remote-lg-action.ts +159 -140
- package/src/service-adapters/anthropic/anthropic-adapter.ts +16 -6
- package/src/service-adapters/conversion.ts +2 -1
- package/src/service-adapters/events.ts +116 -52
- 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/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-R6AUAQK6.mjs.map +0 -1
- package/dist/chunk-W7GP2EOT.mjs.map +0 -1
- /package/dist/{chunk-LSLFIYKP.mjs.map → chunk-7BOO3OFP.mjs.map} +0 -0
- /package/dist/{chunk-GGNRDS7N.mjs.map → chunk-GSTWFOZF.mjs.map} +0 -0
- /package/dist/{chunk-TA5I5LYF.mjs.map → chunk-OMAAKIJQ.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-GSTWFOZF.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OMAAKIJQ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7BOO3OFP.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-PXS4SBRF.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AnthropicAdapter,
|
|
26
26
|
ExperimentalEmptyAdapter,
|
|
@@ -32,13 +32,13 @@ import {
|
|
|
32
32
|
OpenAIAssistantAdapter,
|
|
33
33
|
RemoteChain,
|
|
34
34
|
UnifyAdapter
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-4AYRDPWK.mjs";
|
|
36
36
|
import {
|
|
37
37
|
GuardrailsValidationFailureResponse,
|
|
38
38
|
MessageStreamInterruptedResponse,
|
|
39
39
|
UnknownErrorResponse
|
|
40
40
|
} from "./chunk-U3V2BCGI.mjs";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-RFF5IIZJ.mjs";
|
|
42
42
|
import "./chunk-D2WLFQS6.mjs";
|
|
43
43
|
import "./chunk-44O2JGUY.mjs";
|
|
44
44
|
|
|
@@ -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,16 +71,51 @@ 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$;
|
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';
|