@frontmcp/storage-sqlite 0.12.1 → 1.0.0-beta.1
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/esm/index.mjs +7 -1
- package/esm/package.json +2 -2
- package/index.js +7 -1
- package/package.json +2 -2
- package/sqlite-event.store.d.ts +8 -3
- package/sqlite-event.store.d.ts.map +1 -1
package/esm/index.mjs
CHANGED
|
@@ -501,6 +501,12 @@ var SqliteEventStore = class {
|
|
|
501
501
|
}
|
|
502
502
|
this.db.close();
|
|
503
503
|
}
|
|
504
|
+
/**
|
|
505
|
+
* Get the underlying database instance.
|
|
506
|
+
*/
|
|
507
|
+
getDatabase() {
|
|
508
|
+
return this.db;
|
|
509
|
+
}
|
|
504
510
|
/**
|
|
505
511
|
* Get the current number of stored events.
|
|
506
512
|
*/
|
|
@@ -518,7 +524,7 @@ var sqliteStorageOptionsSchema = z.object({
|
|
|
518
524
|
encryption: z.object({
|
|
519
525
|
secret: z.string().min(1)
|
|
520
526
|
}).optional(),
|
|
521
|
-
ttlCleanupIntervalMs: z.number().int().
|
|
527
|
+
ttlCleanupIntervalMs: z.number().int().nonnegative().optional().default(6e4),
|
|
522
528
|
walMode: z.boolean().optional().default(true)
|
|
523
529
|
});
|
|
524
530
|
export {
|
package/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/storage-sqlite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
4
|
"description": "SQLite storage backend for FrontMCP - local session, elicitation, and event persistence without Redis",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://docs.agentfront.dev",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"node": ">=22.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@frontmcp/utils": "0.
|
|
47
|
+
"@frontmcp/utils": "1.0.0-beta.1",
|
|
48
48
|
"better-sqlite3": "^12.6.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
package/index.js
CHANGED
|
@@ -520,6 +520,12 @@ var SqliteEventStore = class {
|
|
|
520
520
|
}
|
|
521
521
|
this.db.close();
|
|
522
522
|
}
|
|
523
|
+
/**
|
|
524
|
+
* Get the underlying database instance.
|
|
525
|
+
*/
|
|
526
|
+
getDatabase() {
|
|
527
|
+
return this.db;
|
|
528
|
+
}
|
|
523
529
|
/**
|
|
524
530
|
* Get the current number of stored events.
|
|
525
531
|
*/
|
|
@@ -537,7 +543,7 @@ var sqliteStorageOptionsSchema = import_zod.z.object({
|
|
|
537
543
|
encryption: import_zod.z.object({
|
|
538
544
|
secret: import_zod.z.string().min(1)
|
|
539
545
|
}).optional(),
|
|
540
|
-
ttlCleanupIntervalMs: import_zod.z.number().int().
|
|
546
|
+
ttlCleanupIntervalMs: import_zod.z.number().int().nonnegative().optional().default(6e4),
|
|
541
547
|
walMode: import_zod.z.boolean().optional().default(true)
|
|
542
548
|
});
|
|
543
549
|
// Annotate the CommonJS export names for ESM import in node:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/storage-sqlite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
4
|
"description": "SQLite storage backend for FrontMCP - local session, elicitation, and event persistence without Redis",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"homepage": "https://docs.agentfront.dev",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"node": ">=22.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@frontmcp/utils": "0.
|
|
47
|
+
"@frontmcp/utils": "1.0.0-beta.1",
|
|
48
48
|
"better-sqlite3": "^12.6.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
package/sqlite-event.store.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SQLite Event Store
|
|
3
3
|
*
|
|
4
|
-
* Implements the EventStore interface from @
|
|
4
|
+
* Implements the EventStore interface from @frontmcp/protocol for SSE resumability.
|
|
5
5
|
* Stores events in SQLite with TTL-based expiration and max event limits.
|
|
6
6
|
*/
|
|
7
|
+
import type Database from 'better-sqlite3';
|
|
7
8
|
import type { SqliteStorageOptions } from './sqlite.options';
|
|
8
9
|
/**
|
|
9
|
-
* Event store interface matching @
|
|
10
|
-
* Redeclared here to avoid hard dependency on @
|
|
10
|
+
* Event store interface matching @frontmcp/protocol EventStore.
|
|
11
|
+
* Redeclared here to avoid hard dependency on @frontmcp/protocol.
|
|
11
12
|
*/
|
|
12
13
|
export interface EventStoreInterface {
|
|
13
14
|
storeEvent(streamId: string, message: unknown): Promise<string>;
|
|
@@ -61,6 +62,10 @@ export declare class SqliteEventStore implements EventStoreInterface {
|
|
|
61
62
|
* Close the database connection and stop cleanup timer.
|
|
62
63
|
*/
|
|
63
64
|
close(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Get the underlying database instance.
|
|
67
|
+
*/
|
|
68
|
+
getDatabase(): Database.Database;
|
|
64
69
|
/**
|
|
65
70
|
* Get the current number of stored events.
|
|
66
71
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-event.store.d.ts","sourceRoot":"","sources":["../src/sqlite-event.store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"sqlite-event.store.d.ts","sourceRoot":"","sources":["../src/sqlite-event.store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,QAAQ,EAAE,MAAM,E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