@copilotkit/runtime 1.4.0-pre-1-4-0.11 → 1.4.0-pre-1-4-0-alpha.10
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 +33 -100
- package/dist/{chunk-BNQDVBQH.mjs → chunk-56IQ6PGC.mjs} +449 -75
- package/dist/chunk-56IQ6PGC.mjs.map +1 -0
- package/dist/chunk-DFOKBSIS.mjs +1 -0
- package/dist/chunk-DFOKBSIS.mjs.map +1 -0
- package/dist/{chunk-VBGS6IWV.mjs → chunk-RDHJQVWH.mjs} +483 -71
- package/dist/chunk-RDHJQVWH.mjs.map +1 -0
- package/dist/{chunk-V2YEM4Z5.mjs → chunk-SBWLAAB3.mjs} +4 -3
- package/dist/chunk-SBWLAAB3.mjs.map +1 -0
- package/dist/{chunk-677K33J7.mjs → chunk-SVL5LEKB.mjs} +4 -3
- package/dist/chunk-SVL5LEKB.mjs.map +1 -0
- package/dist/{chunk-3DNY5YTL.mjs → chunk-YUJSVJWS.mjs} +5 -4
- package/dist/chunk-YUJSVJWS.mjs.map +1 -0
- package/dist/{copilot-runtime-8d3f40c7.d.ts → copilot-runtime-dbe5fa02.d.ts} +4 -4
- package/dist/{groq-adapter-dbfba3eb.d.ts → groq-adapter-192d2413.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +486 -169
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -22
- package/dist/index.mjs.map +1 -1
- package/dist/{langserve-f00629d2.d.ts → langserve-878c62b9.d.ts} +46 -9
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +465 -163
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +21 -21
- package/dist/lib/integrations/index.d.ts +3 -3
- package/dist/lib/integrations/index.js +161 -85
- 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 +2 -2
- package/dist/lib/integrations/nest/index.js +158 -82
- 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 +2 -2
- package/dist/lib/integrations/node-express/index.js +158 -82
- 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 +2 -2
- package/dist/lib/integrations/node-http/index.js +157 -81
- 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 +3 -3
- package/dist/service-adapters/index.js +243 -73
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -2
- package/package.json +4 -4
- package/src/agents/langgraph/event-source.ts +12 -0
- package/src/agents/langgraph/events.ts +2 -0
- package/src/graphql/resolvers/copilot.resolver.ts +28 -2
- package/src/lib/integrations/nest/index.ts +5 -2
- package/src/lib/integrations/nextjs/app-router.ts +5 -2
- package/src/lib/integrations/nextjs/pages-router.ts +5 -2
- package/src/lib/integrations/node-express/index.ts +5 -2
- package/src/lib/integrations/node-http/index.ts +5 -2
- package/src/lib/runtime/copilot-runtime.ts +48 -42
- package/src/lib/runtime/remote-action-constructors.ts +17 -3
- package/src/lib/runtime/remote-lg-cloud-action.ts +41 -15
- package/src/lib/telemetry-client.ts +43 -0
- package/src/service-adapters/anthropic/anthropic-adapter.ts +15 -6
- package/src/service-adapters/events.ts +86 -36
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +7 -3
- package/src/service-adapters/google/google-genai-adapter.ts +2 -2
- package/src/service-adapters/groq/groq-adapter.ts +22 -8
- package/src/service-adapters/langchain/langchain-adapter.ts +22 -16
- package/src/service-adapters/langchain/utils.ts +47 -31
- package/src/service-adapters/openai/openai-adapter.ts +25 -8
- package/src/service-adapters/openai/openai-assistant-adapter.ts +21 -8
- package/src/service-adapters/unify/unify-adapter.ts +28 -11
- package/dist/chunk-3DNY5YTL.mjs.map +0 -1
- package/dist/chunk-677K33J7.mjs.map +0 -1
- package/dist/chunk-BNQDVBQH.mjs.map +0 -1
- package/dist/chunk-FL67XJAX.mjs +0 -288
- package/dist/chunk-FL67XJAX.mjs.map +0 -1
- package/dist/chunk-MXXPWWBF.mjs +0 -218
- package/dist/chunk-MXXPWWBF.mjs.map +0 -1
- package/dist/chunk-V2YEM4Z5.mjs.map +0 -1
- package/dist/chunk-VBGS6IWV.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
import "./chunk-DFOKBSIS.mjs";
|
|
2
|
+
import {
|
|
3
|
+
config,
|
|
4
|
+
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
|
+
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
+
} from "./chunk-YUJSVJWS.mjs";
|
|
7
|
+
import {
|
|
8
|
+
copilotRuntimeNestEndpoint
|
|
9
|
+
} from "./chunk-SVL5LEKB.mjs";
|
|
10
|
+
import {
|
|
11
|
+
copilotRuntimeNodeExpressEndpoint
|
|
12
|
+
} from "./chunk-SBWLAAB3.mjs";
|
|
1
13
|
import {
|
|
2
14
|
CopilotRuntime,
|
|
15
|
+
buildSchema,
|
|
3
16
|
copilotKitEndpoint,
|
|
17
|
+
copilotRuntimeNodeHttpEndpoint,
|
|
18
|
+
createContext,
|
|
4
19
|
flattenToolCallsNoDuplicates,
|
|
5
|
-
|
|
6
|
-
|
|
20
|
+
getCommonConfig,
|
|
21
|
+
langGraphCloudEndpoint,
|
|
22
|
+
resolveEndpointType
|
|
23
|
+
} from "./chunk-RDHJQVWH.mjs";
|
|
7
24
|
import {
|
|
8
25
|
AnthropicAdapter,
|
|
9
26
|
GoogleGenerativeAIAdapter,
|
|
@@ -13,25 +30,7 @@ import {
|
|
|
13
30
|
OpenAIAssistantAdapter,
|
|
14
31
|
RemoteChain,
|
|
15
32
|
UnifyAdapter
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
config,
|
|
19
|
-
copilotRuntimeNextJSAppRouterEndpoint,
|
|
20
|
-
copilotRuntimeNextJSPagesRouterEndpoint
|
|
21
|
-
} from "./chunk-3DNY5YTL.mjs";
|
|
22
|
-
import {
|
|
23
|
-
copilotRuntimeNestEndpoint
|
|
24
|
-
} from "./chunk-677K33J7.mjs";
|
|
25
|
-
import {
|
|
26
|
-
copilotRuntimeNodeExpressEndpoint
|
|
27
|
-
} from "./chunk-V2YEM4Z5.mjs";
|
|
28
|
-
import {
|
|
29
|
-
buildSchema,
|
|
30
|
-
copilotRuntimeNodeHttpEndpoint,
|
|
31
|
-
createContext,
|
|
32
|
-
getCommonConfig
|
|
33
|
-
} from "./chunk-VBGS6IWV.mjs";
|
|
34
|
-
import "./chunk-MXXPWWBF.mjs";
|
|
33
|
+
} from "./chunk-56IQ6PGC.mjs";
|
|
35
34
|
import {
|
|
36
35
|
GuardrailsValidationFailureResponse,
|
|
37
36
|
MessageStreamInterruptedResponse,
|
|
@@ -67,6 +66,7 @@ export {
|
|
|
67
66
|
createContext,
|
|
68
67
|
flattenToolCallsNoDuplicates,
|
|
69
68
|
getCommonConfig,
|
|
70
|
-
langGraphCloudEndpoint
|
|
69
|
+
langGraphCloudEndpoint,
|
|
70
|
+
resolveEndpointType
|
|
71
71
|
};
|
|
72
72
|
//# sourceMappingURL=index.mjs.map
|
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":[]}
|
|
@@ -34,9 +34,11 @@ type RuntimeEvent = {
|
|
|
34
34
|
messageId: string;
|
|
35
35
|
} | {
|
|
36
36
|
type: RuntimeEventTypes.TextMessageContent;
|
|
37
|
+
messageId: string;
|
|
37
38
|
content: string;
|
|
38
39
|
} | {
|
|
39
40
|
type: RuntimeEventTypes.TextMessageEnd;
|
|
41
|
+
messageId: string;
|
|
40
42
|
} | {
|
|
41
43
|
type: RuntimeEventTypes.ActionExecutionStart;
|
|
42
44
|
actionExecutionId: string;
|
|
@@ -44,9 +46,11 @@ type RuntimeEvent = {
|
|
|
44
46
|
scope?: FunctionCallScope;
|
|
45
47
|
} | {
|
|
46
48
|
type: RuntimeEventTypes.ActionExecutionArgs;
|
|
49
|
+
actionExecutionId: string;
|
|
47
50
|
args: string;
|
|
48
51
|
} | {
|
|
49
52
|
type: RuntimeEventTypes.ActionExecutionEnd;
|
|
53
|
+
actionExecutionId: string;
|
|
50
54
|
} | {
|
|
51
55
|
type: RuntimeEventTypes.ActionExecutionResult;
|
|
52
56
|
actionName: string;
|
|
@@ -66,21 +70,54 @@ type RuntimeEvent = {
|
|
|
66
70
|
type EventSourceCallback = (eventStream$: RuntimeEventSubject) => Promise<void>;
|
|
67
71
|
declare class RuntimeEventSubject extends ReplaySubject<RuntimeEvent> {
|
|
68
72
|
constructor();
|
|
69
|
-
sendTextMessageStart(messageId
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
sendTextMessageStart({ messageId }: {
|
|
74
|
+
messageId: string;
|
|
75
|
+
}): void;
|
|
76
|
+
sendTextMessageContent({ messageId, content }: {
|
|
77
|
+
messageId: string;
|
|
78
|
+
content: string;
|
|
79
|
+
}): void;
|
|
80
|
+
sendTextMessageEnd({ messageId }: {
|
|
81
|
+
messageId: string;
|
|
82
|
+
}): void;
|
|
72
83
|
sendTextMessage(messageId: string, content: string): void;
|
|
73
|
-
sendActionExecutionStart(actionExecutionId
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
sendActionExecutionStart({ actionExecutionId, actionName, }: {
|
|
85
|
+
actionExecutionId: string;
|
|
86
|
+
actionName: string;
|
|
87
|
+
}): void;
|
|
88
|
+
sendActionExecutionArgs({ actionExecutionId, args, }: {
|
|
89
|
+
actionExecutionId: string;
|
|
90
|
+
args: string;
|
|
91
|
+
}): void;
|
|
92
|
+
sendActionExecutionEnd({ actionExecutionId }: {
|
|
93
|
+
actionExecutionId: string;
|
|
94
|
+
}): void;
|
|
95
|
+
sendActionExecution({ actionExecutionId, actionName, args, }: {
|
|
96
|
+
actionExecutionId: string;
|
|
97
|
+
actionName: string;
|
|
98
|
+
args: string;
|
|
99
|
+
}): void;
|
|
100
|
+
sendActionExecutionResult({ actionExecutionId, actionName, result, }: {
|
|
101
|
+
actionExecutionId: string;
|
|
102
|
+
actionName: string;
|
|
103
|
+
result: string;
|
|
104
|
+
}): void;
|
|
105
|
+
sendAgentStateMessage({ threadId, agentName, nodeName, runId, active, role, state, running, }: {
|
|
106
|
+
threadId: string;
|
|
107
|
+
agentName: string;
|
|
108
|
+
nodeName: string;
|
|
109
|
+
runId: string;
|
|
110
|
+
active: boolean;
|
|
111
|
+
role: string;
|
|
112
|
+
state: string;
|
|
113
|
+
running: boolean;
|
|
114
|
+
}): void;
|
|
79
115
|
}
|
|
80
116
|
declare class RuntimeEventSource {
|
|
81
117
|
private eventStream$;
|
|
82
118
|
private callback;
|
|
83
119
|
stream(callback: EventSourceCallback): Promise<void>;
|
|
120
|
+
sendErrorMessageToChat(): void;
|
|
84
121
|
processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents, }: {
|
|
85
122
|
serverSideActions: Action<any>[];
|
|
86
123
|
guardrailsResult$?: Subject<GuardrailsResult>;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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 langGraphCloudEndpoint } 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 langGraphCloudEndpoint, r as resolveEndpointType } from '../copilot-runtime-dbe5fa02.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-192d2413.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-
|
|
8
|
+
import '../langserve-878c62b9.js';
|
|
9
9
|
import '../index-83ee522f.js';
|
|
10
10
|
import '../graphql/types/base/index.js';
|
|
11
11
|
import 'rxjs';
|