@copilotkitnext/core 0.0.33 → 0.0.34-pr.fix-express-endpoint

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _ag_ui_client from '@ag-ui/client';
2
- import { ToolCall, AbstractAgent, Message, RunAgentResult, Tool, Context, State, HttpAgentConfig, HttpAgent, RunAgentInput, BaseEvent } from '@ag-ui/client';
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, withMessages }: CopilotKitCoreRunAgentParams): Promise<RunAgentResult>;
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, Message, RunAgentResult, Tool, Context, State, HttpAgentConfig, HttpAgent, RunAgentInput, BaseEvent } from '@ag-ui/client';
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, withMessages }: CopilotKitCoreRunAgentParams): Promise<RunAgentResult>;
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, withMessages }) {
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 */,