@copilotkitnext/core 0.0.32 → 0.0.34-alpha.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/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _ag_ui_client from '@ag-ui/client';
|
|
2
|
-
import { ToolCall, AbstractAgent,
|
|
2
|
+
import { ToolCall, AbstractAgent, RunAgentResult, Tool, Context, State, Message, HttpAgentConfig, HttpAgent, RunAgentInput, BaseEvent } from '@ag-ui/client';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
|
|
@@ -159,7 +159,6 @@ declare class AgentRegistry {
|
|
|
159
159
|
|
|
160
160
|
interface CopilotKitCoreRunAgentParams {
|
|
161
161
|
agent: AbstractAgent;
|
|
162
|
-
withMessages?: Message[];
|
|
163
162
|
}
|
|
164
163
|
interface CopilotKitCoreConnectAgentParams {
|
|
165
164
|
agent: AbstractAgent;
|
|
@@ -209,7 +208,7 @@ declare class RunHandler {
|
|
|
209
208
|
/**
|
|
210
209
|
* Run an agent
|
|
211
210
|
*/
|
|
212
|
-
runAgent({ agent
|
|
211
|
+
runAgent({ agent }: CopilotKitCoreRunAgentParams): Promise<RunAgentResult>;
|
|
213
212
|
/**
|
|
214
213
|
* Process agent result and execute tools
|
|
215
214
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _ag_ui_client from '@ag-ui/client';
|
|
2
|
-
import { ToolCall, AbstractAgent,
|
|
2
|
+
import { ToolCall, AbstractAgent, RunAgentResult, Tool, Context, State, Message, HttpAgentConfig, HttpAgent, RunAgentInput, BaseEvent } from '@ag-ui/client';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
|
|
@@ -159,7 +159,6 @@ declare class AgentRegistry {
|
|
|
159
159
|
|
|
160
160
|
interface CopilotKitCoreRunAgentParams {
|
|
161
161
|
agent: AbstractAgent;
|
|
162
|
-
withMessages?: Message[];
|
|
163
162
|
}
|
|
164
163
|
interface CopilotKitCoreConnectAgentParams {
|
|
165
164
|
agent: AbstractAgent;
|
|
@@ -209,7 +208,7 @@ declare class RunHandler {
|
|
|
209
208
|
/**
|
|
210
209
|
* Run an agent
|
|
211
210
|
*/
|
|
212
|
-
runAgent({ agent
|
|
211
|
+
runAgent({ agent }: CopilotKitCoreRunAgentParams): Promise<RunAgentResult>;
|
|
213
212
|
/**
|
|
214
213
|
* Process agent result and execute tools
|
|
215
214
|
*/
|
package/dist/index.js
CHANGED
|
@@ -920,16 +920,13 @@ var RunHandler = class {
|
|
|
920
920
|
/**
|
|
921
921
|
* Run an agent
|
|
922
922
|
*/
|
|
923
|
-
async runAgent({ agent
|
|
923
|
+
async runAgent({ agent }) {
|
|
924
924
|
if (agent.agentId) {
|
|
925
925
|
void this.core.suggestionEngine.clearSuggestions(agent.agentId);
|
|
926
926
|
}
|
|
927
927
|
if (agent instanceof import_client3.HttpAgent) {
|
|
928
928
|
agent.headers = { ...this.core.headers };
|
|
929
929
|
}
|
|
930
|
-
if (withMessages) {
|
|
931
|
-
agent.addMessages(withMessages);
|
|
932
|
-
}
|
|
933
930
|
try {
|
|
934
931
|
const runAgentResult = await agent.runAgent(
|
|
935
932
|
{
|
|
@@ -946,9 +943,6 @@ var RunHandler = class {
|
|
|
946
943
|
if (agent.agentId) {
|
|
947
944
|
context.agentId = agent.agentId;
|
|
948
945
|
}
|
|
949
|
-
if (withMessages) {
|
|
950
|
-
context.messageCount = withMessages.length;
|
|
951
|
-
}
|
|
952
946
|
await this.core.emitError({
|
|
953
947
|
error: runError,
|
|
954
948
|
code: "agent_run_failed" /* AGENT_RUN_FAILED */,
|