swarm-mail 1.5.1 → 1.5.2

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.js CHANGED
@@ -82031,8 +82031,51 @@ async function createLibSQLStreamsSchema(db) {
82031
82031
  CREATE INDEX IF NOT EXISTS idx_cursors_updated
82032
82032
  ON cursors(updated_at)
82033
82033
  `);
82034
+ await db.exec(`
82035
+ CREATE TABLE IF NOT EXISTS eval_records (
82036
+ id TEXT PRIMARY KEY,
82037
+ project_key TEXT NOT NULL,
82038
+ task TEXT NOT NULL,
82039
+ context TEXT,
82040
+ strategy TEXT NOT NULL,
82041
+ epic_title TEXT NOT NULL,
82042
+ subtasks TEXT NOT NULL,
82043
+ outcomes TEXT,
82044
+ overall_success INTEGER,
82045
+ total_duration_ms INTEGER,
82046
+ total_errors INTEGER,
82047
+ human_accepted INTEGER,
82048
+ human_modified INTEGER,
82049
+ human_notes TEXT,
82050
+ file_overlap_count INTEGER,
82051
+ scope_accuracy REAL,
82052
+ time_balance_ratio REAL,
82053
+ created_at INTEGER NOT NULL,
82054
+ updated_at INTEGER NOT NULL
82055
+ )
82056
+ `);
82057
+ await db.exec(`
82058
+ CREATE TABLE IF NOT EXISTS swarm_contexts (
82059
+ id TEXT PRIMARY KEY,
82060
+ project_key TEXT NOT NULL,
82061
+ epic_id TEXT NOT NULL,
82062
+ bead_id TEXT NOT NULL,
82063
+ strategy TEXT NOT NULL,
82064
+ files TEXT NOT NULL,
82065
+ dependencies TEXT NOT NULL,
82066
+ directives TEXT NOT NULL,
82067
+ recovery TEXT NOT NULL,
82068
+ created_at INTEGER NOT NULL,
82069
+ checkpointed_at INTEGER NOT NULL,
82070
+ recovered_at INTEGER,
82071
+ recovered_from_checkpoint INTEGER,
82072
+ updated_at INTEGER NOT NULL
82073
+ )
82074
+ `);
82034
82075
  }
82035
82076
  async function dropLibSQLStreamsSchema(db) {
82077
+ await db.exec("DROP TABLE IF EXISTS swarm_contexts");
82078
+ await db.exec("DROP TABLE IF EXISTS eval_records");
82036
82079
  await db.exec("DROP TABLE IF EXISTS cursors");
82037
82080
  await db.exec("DROP TABLE IF EXISTS locks");
82038
82081
  await db.exec("DROP TABLE IF EXISTS message_recipients");
@@ -82045,9 +82088,9 @@ async function validateLibSQLStreamsSchema(db) {
82045
82088
  try {
82046
82089
  const tables = await db.query(`
82047
82090
  SELECT name FROM sqlite_master
82048
- WHERE type='table' AND name IN ('events', 'agents', 'messages', 'message_recipients', 'reservations', 'locks', 'cursors')
82091
+ WHERE type='table' AND name IN ('events', 'agents', 'messages', 'message_recipients', 'reservations', 'locks', 'cursors', 'eval_records', 'swarm_contexts')
82049
82092
  `);
82050
- if (tables.rows.length !== 7)
82093
+ if (tables.rows.length !== 9)
82051
82094
  return false;
82052
82095
  const eventsCols = await db.query(`
82053
82096
  PRAGMA table_xinfo('events')
@@ -37,6 +37,8 @@ import type { DatabaseAdapter } from "../types/database.js";
37
37
  * - reservations (file locks)
38
38
  * - locks (distributed mutex)
39
39
  * - cursors (stream positions)
40
+ * - eval_records (decomposition eval tracking)
41
+ * - swarm_contexts (swarm checkpoint tracking)
40
42
  *
41
43
  * Idempotent - safe to call multiple times.
42
44
  *
@@ -1 +1 @@
1
- {"version":3,"file":"libsql-schema.d.ts","sourceRoot":"","sources":["../../src/streams/libsql-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,yBAAyB,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoOlF;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAShF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAkCvF"}
1
+ {"version":3,"file":"libsql-schema.d.ts","sourceRoot":"","sources":["../../src/streams/libsql-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,yBAAyB,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAuRlF;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAAC,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAkCvF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swarm-mail",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Event sourcing primitives for multi-agent coordination. Local-first, no external servers.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -40,7 +40,6 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@libsql/client": "^0.15.15",
43
- "@libsql/darwin-arm64": "^0.5.22",
44
43
  "debug": "^4.4.3",
45
44
  "drizzle-orm": "^0.41.0",
46
45
  "effect": "^3.19.12",
@@ -57,5 +56,9 @@
57
56
  "drizzle-kit": "^0.31.0",
58
57
  "typescript": "^5.7.2",
59
58
  "vitest": "^2.1.8"
59
+ },
60
+ "optionalDependencies": {
61
+ "@libsql/darwin-arm64": "^0.5.22",
62
+ "@libsql/darwin-x64": "^0.5.22"
60
63
  }
61
64
  }