@copilotkitnext/sqlite-runner 0.0.21 → 0.0.22-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.
@@ -1,23 +1,23 @@
1
1
 
2
2
  
3
- > @copilotkitnext/sqlite-runner@0.0.21 build /Users/mme/Projects/CopilotKit2/main/packages/sqlite-runner
3
+ > @copilotkitnext/sqlite-runner@0.0.22-alpha.0 build /Users/mme/Projects/CopilotKit2/threads-final-review/packages/sqlite-runner
4
4
  > tsup
5
5
 
6
6
  CLI Building entry: src/index.ts
7
7
  CLI Using tsconfig: tsconfig.json
8
8
  CLI tsup v8.5.0
9
- CLI Using tsup config: /Users/mme/Projects/CopilotKit2/main/packages/sqlite-runner/tsup.config.ts
9
+ CLI Using tsup config: /Users/mme/Projects/CopilotKit2/threads-final-review/packages/sqlite-runner/tsup.config.ts
10
10
  CLI Target: es2022
11
11
  CLI Cleaning output folder
12
12
  CJS Build start
13
13
  ESM Build start
14
- CJS dist/index.js 13.32 KB
15
- CJS dist/index.js.map 22.31 KB
16
- CJS ⚡️ Build success in 17ms
17
- ESM dist/index.mjs 11.55 KB
18
- ESM dist/index.mjs.map 22.22 KB
19
- ESM ⚡️ Build success in 17ms
14
+ CJS dist/index.js 8.08 KB
15
+ CJS dist/index.js.map 11.82 KB
16
+ CJS ⚡️ Build success in 16ms
17
+ ESM dist/index.mjs 6.37 KB
18
+ ESM dist/index.mjs.map 11.70 KB
19
+ ESM ⚡️ Build success in 16ms
20
20
  DTS Build start
21
- DTS ⚡️ Build success in 1276ms
22
- DTS dist/index.d.ts 1009.00 B
23
- DTS dist/index.d.mts 1009.00 B
21
+ DTS ⚡️ Build success in 1333ms
22
+ DTS dist/index.d.ts 1.69 KB
23
+ DTS dist/index.d.mts 1.69 KB
@@ -1,40 +1,32 @@
1
1
 
2
2
  
3
- > @copilotkitnext/sqlite-runner@0.0.20 test /Users/mme/Projects/CopilotKit2/main/packages/sqlite-runner
3
+ > @copilotkitnext/sqlite-runner@0.0.21 test /Users/mme/Projects/CopilotKit2/threads-final-review/packages/sqlite-runner
4
4
  > vitest run
5
5
 
6
6
  [?25l
7
-  RUN  v3.2.4 /Users/mme/Projects/CopilotKit2/main/packages/sqlite-runner
7
+  RUN  v3.2.4 /Users/mme/Projects/CopilotKit2/threads-final-review/packages/sqlite-runner
8
8
 
9
9
  [?2026h
10
-  ❯ src/__tests__/sqlite-runner.e2e.test.ts [queued]
10
+  ❯ src/__tests__/sqlite-runner.test.ts [queued]
11
11
 
12
12
   Test Files 0 passed (2)
13
13
   Tests 0 passed (0)
14
-  Start at 17:01:40
15
-  Duration 207ms
14
+  Start at 17:14:55
15
+  Duration 311ms
16
16
  [?2026l[?2026h
17
-  ❯ src/__tests__/sqlite-runner.e2e.test.ts 0/8
18
-  ❯ src/__tests__/sqlite-runner.test.ts [queued]
19
-
20
-  Test Files 0 passed (2)
21
-  Tests 0 passed (8)
22
-  Start at 17:01:40
23
-  Duration 742ms
24
- [?2026l[?2026h
25
-  ❯ src/__tests__/sqlite-runner.e2e.test.ts 1/8
17
+  ❯ src/__tests__/sqlite-runner.e2e.test.ts [queued]
26
18
   ❯ src/__tests__/sqlite-runner.test.ts 0/7
27
19
 
28
20
   Test Files 0 passed (2)
29
-  Tests 1 passed (15)
30
-  Start at 17:01:40
31
-  Duration 947ms
32
- [?2026l ✓ src/__tests__/sqlite-runner.e2e.test.ts (8 tests) 197ms
33
- ✓ src/__tests__/sqlite-runner.test.ts (7 tests) 251ms
21
+  Tests 0 passed (7)
22
+  Start at 17:14:55
23
+  Duration 513ms
24
+ [?2026l ✓ src/__tests__/sqlite-runner.e2e.test.ts (8 tests) 22ms
25
+ ✓ src/__tests__/sqlite-runner.test.ts (7 tests) 88ms
34
26
 
35
27
   Test Files  2 passed (2)
36
28
   Tests  15 passed (15)
37
-  Start at  17:01:40
38
-  Duration  1.06s (transform 163ms, setup 0ms, collect 959ms, tests 448ms, environment 0ms, prepare 230ms)
29
+  Start at  17:14:55
30
+  Duration  677ms (transform 134ms, setup 0ms, collect 433ms, tests 110ms, environment 0ms, prepare 150ms)
39
31
 
40
32
  [?25h
package/dist/index.d.mts CHANGED
@@ -1,26 +1,46 @@
1
- import { AgentRunner, AgentRunnerRunRequest, AgentRunnerConnectRequest, AgentRunnerIsRunningRequest, AgentRunnerStopRequest } from '@copilotkitnext/runtime';
1
+ import * as _ag_ui_client from '@ag-ui/client';
2
+ import { BaseEvent, RunAgentInput } from '@ag-ui/client';
3
+ import { AgentRunnerBase } from '@copilotkitnext/runtime';
2
4
  import { Observable } from 'rxjs';
3
- import { BaseEvent } from '@ag-ui/client';
4
5
 
5
6
  interface SqliteAgentRunnerOptions {
6
7
  dbPath?: string;
7
8
  }
8
- declare class SqliteAgentRunner extends AgentRunner {
9
+ declare class SqliteAgentRunner extends AgentRunnerBase {
9
10
  private db;
11
+ private channels;
10
12
  constructor(options?: SqliteAgentRunnerOptions);
11
- private initializeSchema;
12
- private storeRun;
13
- private getHistoricRuns;
14
- private getLatestRunId;
15
- private setRunState;
16
- private getRunState;
17
- run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
18
- connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
19
- isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
20
- stop(request: AgentRunnerStopRequest): Promise<boolean | undefined>;
21
- /**
22
- * Close the database connection (for cleanup)
23
- */
13
+ private static initializeSchema;
14
+ protected acquireRun(threadId: string, runId: string): Promise<boolean>;
15
+ protected releaseRun(threadId: string): Promise<void>;
16
+ protected isRunningState(threadId: string): Promise<boolean>;
17
+ protected listRuns(threadId: string): Promise<Array<{
18
+ runId: string;
19
+ events: BaseEvent[];
20
+ createdAt: number;
21
+ }>>;
22
+ protected saveRun(threadId: string, runId: string, events: BaseEvent[], input: RunAgentInput, parentRunId: string | null): Promise<void>;
23
+ protected pageThreads(params: {
24
+ scope?: any;
25
+ limit?: number;
26
+ offset?: number;
27
+ }): Promise<{
28
+ threadIds: string[];
29
+ total: number;
30
+ }>;
31
+ protected deleteThreadStorage(threadId: string): Promise<void>;
32
+ private ensureChannel;
33
+ protected publishLive(threadId: string, event: BaseEvent): void;
34
+ protected completeLive(threadId: string): void;
35
+ protected subscribeLive(threadId: string): Observable<BaseEvent>;
36
+ protected closeLive(threadId: string): Promise<void>;
37
+ connect(request: {
38
+ threadId: string;
39
+ }): Observable<{
40
+ type: _ag_ui_client.EventType;
41
+ timestamp?: number | undefined;
42
+ rawEvent?: any;
43
+ }>;
24
44
  close(): void;
25
45
  }
26
46
 
package/dist/index.d.ts CHANGED
@@ -1,26 +1,46 @@
1
- import { AgentRunner, AgentRunnerRunRequest, AgentRunnerConnectRequest, AgentRunnerIsRunningRequest, AgentRunnerStopRequest } from '@copilotkitnext/runtime';
1
+ import * as _ag_ui_client from '@ag-ui/client';
2
+ import { BaseEvent, RunAgentInput } from '@ag-ui/client';
3
+ import { AgentRunnerBase } from '@copilotkitnext/runtime';
2
4
  import { Observable } from 'rxjs';
3
- import { BaseEvent } from '@ag-ui/client';
4
5
 
5
6
  interface SqliteAgentRunnerOptions {
6
7
  dbPath?: string;
7
8
  }
8
- declare class SqliteAgentRunner extends AgentRunner {
9
+ declare class SqliteAgentRunner extends AgentRunnerBase {
9
10
  private db;
11
+ private channels;
10
12
  constructor(options?: SqliteAgentRunnerOptions);
11
- private initializeSchema;
12
- private storeRun;
13
- private getHistoricRuns;
14
- private getLatestRunId;
15
- private setRunState;
16
- private getRunState;
17
- run(request: AgentRunnerRunRequest): Observable<BaseEvent>;
18
- connect(request: AgentRunnerConnectRequest): Observable<BaseEvent>;
19
- isRunning(request: AgentRunnerIsRunningRequest): Promise<boolean>;
20
- stop(request: AgentRunnerStopRequest): Promise<boolean | undefined>;
21
- /**
22
- * Close the database connection (for cleanup)
23
- */
13
+ private static initializeSchema;
14
+ protected acquireRun(threadId: string, runId: string): Promise<boolean>;
15
+ protected releaseRun(threadId: string): Promise<void>;
16
+ protected isRunningState(threadId: string): Promise<boolean>;
17
+ protected listRuns(threadId: string): Promise<Array<{
18
+ runId: string;
19
+ events: BaseEvent[];
20
+ createdAt: number;
21
+ }>>;
22
+ protected saveRun(threadId: string, runId: string, events: BaseEvent[], input: RunAgentInput, parentRunId: string | null): Promise<void>;
23
+ protected pageThreads(params: {
24
+ scope?: any;
25
+ limit?: number;
26
+ offset?: number;
27
+ }): Promise<{
28
+ threadIds: string[];
29
+ total: number;
30
+ }>;
31
+ protected deleteThreadStorage(threadId: string): Promise<void>;
32
+ private ensureChannel;
33
+ protected publishLive(threadId: string, event: BaseEvent): void;
34
+ protected completeLive(threadId: string): void;
35
+ protected subscribeLive(threadId: string): Observable<BaseEvent>;
36
+ protected closeLive(threadId: string): Promise<void>;
37
+ connect(request: {
38
+ threadId: string;
39
+ }): Observable<{
40
+ type: _ag_ui_client.EventType;
41
+ timestamp?: number | undefined;
42
+ rawEvent?: any;
43
+ }>;
24
44
  close(): void;
25
45
  }
26
46