opencode-swarm-plugin 0.54.0 → 0.54.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/README.md CHANGED
@@ -498,6 +498,20 @@ When eval scores drop >15% from baseline, failure context is automatically store
498
498
 
499
499
  See **[evals/README.md](./evals/README.md)** for full architecture, scorer details, CI integration, and how to write new evals.
500
500
 
501
+ ### Maintenance
502
+
503
+ **Clean test session files:**
504
+
505
+ ```bash
506
+ # Remove test session files from global sessions directory
507
+ ./scripts/clean-test-sessions.sh
508
+
509
+ # Dry run (see what would be deleted)
510
+ ./scripts/clean-test-sessions.sh --dry-run
511
+ ```
512
+
513
+ Test session files (`test*.jsonl`, `no-context*.jsonl`, `timing-test*.jsonl`) accumulate in `~/.config/swarm-tools/sessions/` during development. Run this script periodically to clean them up.
514
+
501
515
  ---
502
516
 
503
517
  ## CLI Reference
package/dist/bin/swarm.js CHANGED
@@ -11194,8 +11194,10 @@ async function createLibSQLAdapter(config2) {
11194
11194
  };
11195
11195
  const client = createClient(clientConfig);
11196
11196
  await client.execute("SELECT 1");
11197
+ await client.execute("PRAGMA auto_vacuum = INCREMENTAL");
11197
11198
  await client.execute("PRAGMA foreign_keys = ON");
11198
11199
  await client.execute("PRAGMA busy_timeout = 5000");
11200
+ await client.execute("PRAGMA journal_mode = WAL");
11199
11201
  return new LibSQLAdapter(client);
11200
11202
  }
11201
11203
  async function createLibSQLMemorySchema(db) {
@@ -11927,8 +11929,7 @@ async function createLibSQLStreamsSchema(db) {
11927
11929
  project_key TEXT NOT NULL,
11928
11930
  timestamp INTEGER NOT NULL,
11929
11931
  sequence INTEGER GENERATED ALWAYS AS (id) STORED,
11930
- data TEXT NOT NULL,
11931
- created_at TEXT DEFAULT (datetime('now'))
11932
+ data TEXT NOT NULL
11932
11933
  )
11933
11934
  `);
11934
11935
  await db.exec(`
@@ -11947,6 +11948,10 @@ async function createLibSQLStreamsSchema(db) {
11947
11948
  CREATE INDEX IF NOT EXISTS idx_events_project_type
11948
11949
  ON events(project_key, type)
11949
11950
  `);
11951
+ await db.exec(`
11952
+ CREATE INDEX IF NOT EXISTS idx_events_project_timestamp
11953
+ ON events(project_key, timestamp)
11954
+ `);
11950
11955
  await db.exec(`
11951
11956
  CREATE TABLE IF NOT EXISTS agents (
11952
11957
  id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -12138,8 +12143,7 @@ async function createLibSQLStreamsSchema(db) {
12138
12143
  precedent_cited TEXT,
12139
12144
  outcome_event_id INTEGER,
12140
12145
  quality_score REAL,
12141
- timestamp INTEGER NOT NULL,
12142
- created_at TEXT DEFAULT (datetime('now'))
12146
+ timestamp INTEGER NOT NULL
12143
12147
  )
12144
12148
  `);
12145
12149
  await db.exec(`
@@ -12166,8 +12170,7 @@ async function createLibSQLStreamsSchema(db) {
12166
12170
  target_entity_id TEXT NOT NULL,
12167
12171
  link_type TEXT NOT NULL,
12168
12172
  strength REAL DEFAULT 1.0,
12169
- context TEXT,
12170
- created_at TEXT DEFAULT (datetime('now'))
12173
+ context TEXT
12171
12174
  )
12172
12175
  `);
12173
12176
  await db.exec(`
@@ -12208,7 +12211,7 @@ async function validateLibSQLStreamsSchema(db) {
12208
12211
  PRAGMA table_xinfo('events')
12209
12212
  `);
12210
12213
  const eventsColNames = eventsCols.rows.map((r) => r.name);
12211
- const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data", "created_at"];
12214
+ const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data"];
12212
12215
  for (const col of requiredEventsCols) {
12213
12216
  if (!eventsColNames.includes(col))
12214
12217
  return false;
@@ -98119,8 +98122,7 @@ ${stack.split(`
98119
98122
  project_key: text("project_key").notNull(),
98120
98123
  timestamp: integer4("timestamp").notNull(),
98121
98124
  sequence: integer4("sequence").generatedAlwaysAs(sql`id`),
98122
- data: text("data").notNull(),
98123
- created_at: text("created_at").default("datetime('now')")
98125
+ data: text("data").notNull()
98124
98126
  }, (table5) => ({
98125
98127
  projectKeyIdx: index("idx_events_project_key").on(table5.project_key),
98126
98128
  typeIdx: index("idx_events_type").on(table5.type),
@@ -98251,8 +98253,7 @@ ${stack.split(`
98251
98253
  precedent_cited: text("precedent_cited"),
98252
98254
  outcome_event_id: integer4("outcome_event_id"),
98253
98255
  quality_score: real("quality_score"),
98254
- timestamp: integer4("timestamp").notNull(),
98255
- created_at: text("created_at").default("(datetime('now'))")
98256
+ timestamp: integer4("timestamp").notNull()
98256
98257
  }, (table5) => ({
98257
98258
  epicIdx: index("idx_decision_traces_epic").on(table5.epic_id),
98258
98259
  typeIdx: index("idx_decision_traces_type").on(table5.decision_type),
@@ -98266,8 +98267,7 @@ ${stack.split(`
98266
98267
  target_entity_id: text("target_entity_id").notNull(),
98267
98268
  link_type: text("link_type").notNull(),
98268
98269
  strength: real("strength").default(1),
98269
- context: text("context"),
98270
- created_at: text("created_at").default("(datetime('now'))")
98270
+ context: text("context")
98271
98271
  }, (table5) => ({
98272
98272
  sourceIdx: index("idx_entity_links_source").on(table5.source_decision_id),
98273
98273
  targetIdx: index("idx_entity_links_target").on(table5.target_entity_type, table5.target_entity_id),
@@ -115459,7 +115459,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
115459
115459
  init_schema();
115460
115460
  init_worktree();
115461
115461
  TABLE_COLUMNS = {
115462
- events: "type, project_key, timestamp, data, created_at",
115462
+ events: "type, project_key, timestamp, data",
115463
115463
  agents: "project_key, name, program, model, task_description, registered_at, last_active_at",
115464
115464
  messages: "project_key, from_agent, subject, body, thread_id, importance, ack_required, created_at",
115465
115465
  message_recipients: "message_id, agent_name, read_at, acked_at",
@@ -127670,8 +127670,10 @@ async function createLibSQLAdapter2(config22) {
127670
127670
  };
127671
127671
  const client = createClient8(clientConfig);
127672
127672
  await client.execute("SELECT 1");
127673
+ await client.execute("PRAGMA auto_vacuum = INCREMENTAL");
127673
127674
  await client.execute("PRAGMA foreign_keys = ON");
127674
127675
  await client.execute("PRAGMA busy_timeout = 5000");
127676
+ await client.execute("PRAGMA journal_mode = WAL");
127675
127677
  return new LibSQLAdapter2(client);
127676
127678
  }
127677
127679
  async function createLibSQLMemorySchema2(db) {
@@ -128403,8 +128405,7 @@ async function createLibSQLStreamsSchema2(db) {
128403
128405
  project_key TEXT NOT NULL,
128404
128406
  timestamp INTEGER NOT NULL,
128405
128407
  sequence INTEGER GENERATED ALWAYS AS (id) STORED,
128406
- data TEXT NOT NULL,
128407
- created_at TEXT DEFAULT (datetime('now'))
128408
+ data TEXT NOT NULL
128408
128409
  )
128409
128410
  `);
128410
128411
  await db.exec(`
@@ -128423,6 +128424,10 @@ async function createLibSQLStreamsSchema2(db) {
128423
128424
  CREATE INDEX IF NOT EXISTS idx_events_project_type
128424
128425
  ON events(project_key, type)
128425
128426
  `);
128427
+ await db.exec(`
128428
+ CREATE INDEX IF NOT EXISTS idx_events_project_timestamp
128429
+ ON events(project_key, timestamp)
128430
+ `);
128426
128431
  await db.exec(`
128427
128432
  CREATE TABLE IF NOT EXISTS agents (
128428
128433
  id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -128614,8 +128619,7 @@ async function createLibSQLStreamsSchema2(db) {
128614
128619
  precedent_cited TEXT,
128615
128620
  outcome_event_id INTEGER,
128616
128621
  quality_score REAL,
128617
- timestamp INTEGER NOT NULL,
128618
- created_at TEXT DEFAULT (datetime('now'))
128622
+ timestamp INTEGER NOT NULL
128619
128623
  )
128620
128624
  `);
128621
128625
  await db.exec(`
@@ -128642,8 +128646,7 @@ async function createLibSQLStreamsSchema2(db) {
128642
128646
  target_entity_id TEXT NOT NULL,
128643
128647
  link_type TEXT NOT NULL,
128644
128648
  strength REAL DEFAULT 1.0,
128645
- context TEXT,
128646
- created_at TEXT DEFAULT (datetime('now'))
128649
+ context TEXT
128647
128650
  )
128648
128651
  `);
128649
128652
  await db.exec(`
@@ -128684,7 +128687,7 @@ async function validateLibSQLStreamsSchema2(db) {
128684
128687
  PRAGMA table_xinfo('events')
128685
128688
  `);
128686
128689
  const eventsColNames = eventsCols.rows.map((r) => r.name);
128687
- const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data", "created_at"];
128690
+ const requiredEventsCols = ["id", "type", "project_key", "timestamp", "sequence", "data"];
128688
128691
  for (const col of requiredEventsCols) {
128689
128692
  if (!eventsColNames.includes(col))
128690
128693
  return false;
@@ -214595,8 +214598,7 @@ ${stack.split(`
214595
214598
  project_key: text2("project_key").notNull(),
214596
214599
  timestamp: integer42("timestamp").notNull(),
214597
214600
  sequence: integer42("sequence").generatedAlwaysAs(sql2`id`),
214598
- data: text2("data").notNull(),
214599
- created_at: text2("created_at").default("datetime('now')")
214601
+ data: text2("data").notNull()
214600
214602
  }, (table5) => ({
214601
214603
  projectKeyIdx: index2("idx_events_project_key").on(table5.project_key),
214602
214604
  typeIdx: index2("idx_events_type").on(table5.type),
@@ -214727,8 +214729,7 @@ ${stack.split(`
214727
214729
  precedent_cited: text2("precedent_cited"),
214728
214730
  outcome_event_id: integer42("outcome_event_id"),
214729
214731
  quality_score: real2("quality_score"),
214730
- timestamp: integer42("timestamp").notNull(),
214731
- created_at: text2("created_at").default("(datetime('now'))")
214732
+ timestamp: integer42("timestamp").notNull()
214732
214733
  }, (table5) => ({
214733
214734
  epicIdx: index2("idx_decision_traces_epic").on(table5.epic_id),
214734
214735
  typeIdx: index2("idx_decision_traces_type").on(table5.decision_type),
@@ -214742,8 +214743,7 @@ ${stack.split(`
214742
214743
  target_entity_id: text2("target_entity_id").notNull(),
214743
214744
  link_type: text2("link_type").notNull(),
214744
214745
  strength: real2("strength").default(1),
214745
- context: text2("context"),
214746
- created_at: text2("created_at").default("(datetime('now'))")
214746
+ context: text2("context")
214747
214747
  }, (table5) => ({
214748
214748
  sourceIdx: index2("idx_entity_links_source").on(table5.source_decision_id),
214749
214749
  targetIdx: index2("idx_entity_links_target").on(table5.target_entity_type, table5.target_entity_id),
@@ -231935,7 +231935,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
231935
231935
  init_schema2();
231936
231936
  init_worktree2();
231937
231937
  TABLE_COLUMNS2 = {
231938
- events: "type, project_key, timestamp, data, created_at",
231938
+ events: "type, project_key, timestamp, data",
231939
231939
  agents: "project_key, name, program, model, task_description, registered_at, last_active_at",
231940
231940
  messages: "project_key, from_agent, subject, body, thread_id, importance, ack_required, created_at",
231941
231941
  message_recipients: "message_id, agent_name, read_at, acked_at",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm-plugin",
3
- "version": "0.54.0",
3
+ "version": "0.54.2",
4
4
  "description": "Multi-agent swarm coordination for OpenCode with learning capabilities, beads integration, and Agent Mail",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -64,7 +64,7 @@
64
64
  "minimatch": "^10.1.1",
65
65
  "pino": "^9.6.0",
66
66
  "pino-roll": "^1.3.0",
67
- "swarm-mail": "1.9.1",
67
+ "swarm-mail": "1.9.3",
68
68
  "yaml": "^2.8.2",
69
69
  "zod": "4.1.8"
70
70
  },