@copilotkitnext/runtime 0.0.14 → 0.0.16

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
@@ -3,8 +3,6 @@ import { AbstractAgent, RunAgentInput, BaseEvent } from '@ag-ui/client';
3
3
  import { Observable } from 'rxjs';
4
4
  import * as hono_hono_base from 'hono/hono-base';
5
5
  import * as hono_utils_http_status from 'hono/utils/http-status';
6
- import { Kysely, Generated } from 'kysely';
7
- import { Redis } from 'ioredis';
8
6
 
9
7
  /**
10
8
  * Middleware support for CopilotKit Runtime.
@@ -158,88 +156,10 @@ declare function createCopilotEndpoint({ runtime, basePath, }: CopilotEndpointPa
158
156
  }, string>;
159
157
 
160
158
  declare class InMemoryAgentRunner extends AgentRunner {
161
- private convertMessageToEvents;
162
159
  run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
163
160
  connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
164
161
  isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
165
162
  stop(_request: AgentRunnerStopRequest): Promise<boolean | undefined>;
166
163
  }
167
164
 
168
- interface SqliteAgentRunnerOptions {
169
- dbPath?: string;
170
- }
171
- declare class SqliteAgentRunner extends AgentRunner {
172
- private db;
173
- constructor(options?: SqliteAgentRunnerOptions);
174
- private convertMessageToEvents;
175
- private initializeSchema;
176
- private storeRun;
177
- private getHistoricRuns;
178
- private getLatestRunId;
179
- private setRunState;
180
- private getRunState;
181
- run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
182
- connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
183
- isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
184
- stop(_request: AgentRunnerStopRequest): Promise<boolean | undefined>;
185
- /**
186
- * Close the database connection (for cleanup)
187
- */
188
- close(): void;
189
- }
190
-
191
- interface AgentDatabase {
192
- agent_runs: {
193
- id: Generated<number>;
194
- thread_id: string;
195
- run_id: string;
196
- parent_run_id: string | null;
197
- events: string;
198
- input: string;
199
- created_at: number;
200
- version: number;
201
- };
202
- run_state: {
203
- thread_id: string;
204
- is_running: number;
205
- current_run_id: string | null;
206
- server_id: string | null;
207
- updated_at: number;
208
- };
209
- schema_version: {
210
- version: number;
211
- applied_at: number;
212
- };
213
- }
214
- interface EnterpriseAgentRunnerOptions {
215
- kysely: Kysely<AgentDatabase>;
216
- redis: Redis;
217
- redisSub?: Redis;
218
- streamRetentionMs?: number;
219
- streamActiveTTLMs?: number;
220
- lockTTLMs?: number;
221
- serverId?: string;
222
- }
223
- declare class EnterpriseAgentRunner extends AgentRunner {
224
- private db;
225
- redis: Redis;
226
- redisSub: Redis;
227
- private serverId;
228
- private streamRetentionMs;
229
- private streamActiveTTLMs;
230
- private lockTTLMs;
231
- constructor(options: EnterpriseAgentRunnerOptions);
232
- run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
233
- connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
234
- isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
235
- stop(request: AgentRunnerStopRequest): Promise<boolean>;
236
- private convertMessageToEvents;
237
- private initializeSchema;
238
- private storeRun;
239
- private getHistoricRuns;
240
- private setRunState;
241
- close(): Promise<void>;
242
- private generateServerId;
243
- }
244
-
245
- export { CopilotRuntime, type CopilotRuntimeOptions, EnterpriseAgentRunner, type EnterpriseAgentRunnerOptions, InMemoryAgentRunner, SqliteAgentRunner, VERSION, createCopilotEndpoint };
165
+ export { AgentRunner, type AgentRunnerConnectRequest, type AgentRunnerIsRunningRequest, type AgentRunnerRunRequest, type AgentRunnerStopRequest, CopilotRuntime, type CopilotRuntimeOptions, InMemoryAgentRunner, VERSION, createCopilotEndpoint };
package/dist/index.d.ts CHANGED
@@ -3,8 +3,6 @@ import { AbstractAgent, RunAgentInput, BaseEvent } from '@ag-ui/client';
3
3
  import { Observable } from 'rxjs';
4
4
  import * as hono_hono_base from 'hono/hono-base';
5
5
  import * as hono_utils_http_status from 'hono/utils/http-status';
6
- import { Kysely, Generated } from 'kysely';
7
- import { Redis } from 'ioredis';
8
6
 
9
7
  /**
10
8
  * Middleware support for CopilotKit Runtime.
@@ -158,88 +156,10 @@ declare function createCopilotEndpoint({ runtime, basePath, }: CopilotEndpointPa
158
156
  }, string>;
159
157
 
160
158
  declare class InMemoryAgentRunner extends AgentRunner {
161
- private convertMessageToEvents;
162
159
  run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
163
160
  connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
164
161
  isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
165
162
  stop(_request: AgentRunnerStopRequest): Promise<boolean | undefined>;
166
163
  }
167
164
 
168
- interface SqliteAgentRunnerOptions {
169
- dbPath?: string;
170
- }
171
- declare class SqliteAgentRunner extends AgentRunner {
172
- private db;
173
- constructor(options?: SqliteAgentRunnerOptions);
174
- private convertMessageToEvents;
175
- private initializeSchema;
176
- private storeRun;
177
- private getHistoricRuns;
178
- private getLatestRunId;
179
- private setRunState;
180
- private getRunState;
181
- run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
182
- connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
183
- isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
184
- stop(_request: AgentRunnerStopRequest): Promise<boolean | undefined>;
185
- /**
186
- * Close the database connection (for cleanup)
187
- */
188
- close(): void;
189
- }
190
-
191
- interface AgentDatabase {
192
- agent_runs: {
193
- id: Generated<number>;
194
- thread_id: string;
195
- run_id: string;
196
- parent_run_id: string | null;
197
- events: string;
198
- input: string;
199
- created_at: number;
200
- version: number;
201
- };
202
- run_state: {
203
- thread_id: string;
204
- is_running: number;
205
- current_run_id: string | null;
206
- server_id: string | null;
207
- updated_at: number;
208
- };
209
- schema_version: {
210
- version: number;
211
- applied_at: number;
212
- };
213
- }
214
- interface EnterpriseAgentRunnerOptions {
215
- kysely: Kysely<AgentDatabase>;
216
- redis: Redis;
217
- redisSub?: Redis;
218
- streamRetentionMs?: number;
219
- streamActiveTTLMs?: number;
220
- lockTTLMs?: number;
221
- serverId?: string;
222
- }
223
- declare class EnterpriseAgentRunner extends AgentRunner {
224
- private db;
225
- redis: Redis;
226
- redisSub: Redis;
227
- private serverId;
228
- private streamRetentionMs;
229
- private streamActiveTTLMs;
230
- private lockTTLMs;
231
- constructor(options: EnterpriseAgentRunnerOptions);
232
- run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
233
- connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
234
- isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
235
- stop(request: AgentRunnerStopRequest): Promise<boolean>;
236
- private convertMessageToEvents;
237
- private initializeSchema;
238
- private storeRun;
239
- private getHistoricRuns;
240
- private setRunState;
241
- close(): Promise<void>;
242
- private generateServerId;
243
- }
244
-
245
- export { CopilotRuntime, type CopilotRuntimeOptions, EnterpriseAgentRunner, type EnterpriseAgentRunnerOptions, InMemoryAgentRunner, SqliteAgentRunner, VERSION, createCopilotEndpoint };
165
+ export { AgentRunner, type AgentRunnerConnectRequest, type AgentRunnerIsRunningRequest, type AgentRunnerRunRequest, type AgentRunnerStopRequest, CopilotRuntime, type CopilotRuntimeOptions, InMemoryAgentRunner, VERSION, createCopilotEndpoint };