@hasna/conversations 0.2.22 → 0.2.23

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/bin/hook.js CHANGED
@@ -9461,7 +9461,7 @@ function getDb() {
9461
9461
  return db;
9462
9462
  const dbPath = getDbPath2();
9463
9463
  mkdirSync3(dirname2(dbPath), { recursive: true });
9464
- db = new SqliteAdapter(dbPath, { create: true });
9464
+ db = new SqliteAdapter(dbPath);
9465
9465
  db.exec("PRAGMA journal_mode = WAL");
9466
9466
  db.exec("PRAGMA busy_timeout = 5000");
9467
9467
  db.exec(`
package/bin/index.js CHANGED
@@ -12051,7 +12051,7 @@ function getDb() {
12051
12051
  return db;
12052
12052
  const dbPath = getDbPath2();
12053
12053
  mkdirSync3(dirname2(dbPath), { recursive: true });
12054
- db = new SqliteAdapter(dbPath, { create: true });
12054
+ db = new SqliteAdapter(dbPath);
12055
12055
  db.exec("PRAGMA journal_mode = WAL");
12056
12056
  db.exec("PRAGMA busy_timeout = 5000");
12057
12057
  db.exec(`
@@ -13891,7 +13891,7 @@ function registerAgent(name, sessionId, role, projectId) {
13891
13891
  `).run(id, normalizedName, sessionId, resolvedRole, projectId ?? null);
13892
13892
  const created = db2.prepare("SELECT * FROM agent_presence WHERE agent = ?").get(normalizedName);
13893
13893
  return { agent: parsePresence(created), created: true, took_over: false };
13894
- }).immediate();
13894
+ });
13895
13895
  return result;
13896
13896
  }
13897
13897
  function heartbeat(agent, status, metadata, sessionId) {
@@ -14382,7 +14382,7 @@ function buildGraph() {
14382
14382
  weight = excluded.weight,
14383
14383
  updated_at = excluded.updated_at
14384
14384
  `);
14385
- const insertOrUpdate = db2.transaction(() => {
14385
+ db2.transaction(() => {
14386
14386
  const dmPairs = db2.prepare(`
14387
14387
  SELECT from_agent, to_agent, COUNT(*) as cnt, MAX(created_at) as last_at
14388
14388
  FROM messages WHERE space IS NULL AND from_agent != to_agent
@@ -14428,7 +14428,6 @@ function buildGraph() {
14428
14428
  created++;
14429
14429
  }
14430
14430
  });
14431
- insertOrUpdate();
14432
14431
  return { edges_created: created, edges_updated: updated };
14433
14432
  }
14434
14433
  function getRelated(entityType, entityId) {
@@ -14629,7 +14628,7 @@ var init_poll = __esm(() => {
14629
14628
  var require_package = __commonJS((exports, module) => {
14630
14629
  module.exports = {
14631
14630
  name: "@hasna/conversations",
14632
- version: "0.2.22",
14631
+ version: "0.2.23",
14633
14632
  description: "Real-time CLI messaging for AI agents",
14634
14633
  type: "module",
14635
14634
  bin: {
@@ -43605,7 +43604,7 @@ function acquireLock(resourceType, resourceId, agentId, lockType = "advisory", e
43605
43604
  SELECT * FROM resource_locks WHERE resource_type = ? AND resource_id = ? AND lock_type = ?
43606
43605
  `).get(resourceType, resourceId, lockType);
43607
43606
  return { acquired: true, lock };
43608
- }).immediate();
43607
+ });
43609
43608
  }
43610
43609
  function bulkAcquireLock(resources, agentId) {
43611
43610
  const db2 = getDb();
@@ -43639,7 +43638,7 @@ function bulkAcquireLock(resources, agentId) {
43639
43638
  acquired.push(lock);
43640
43639
  }
43641
43640
  return { acquired: true, locks: acquired };
43642
- }).immediate();
43641
+ });
43643
43642
  }
43644
43643
  function tryBulkAcquireLock(resources, agentId) {
43645
43644
  try {
package/bin/mcp.js CHANGED
@@ -16604,7 +16604,7 @@ function getDb() {
16604
16604
  return db;
16605
16605
  const dbPath = getDbPath2();
16606
16606
  mkdirSync3(dirname2(dbPath), { recursive: true });
16607
- db = new SqliteAdapter(dbPath, { create: true });
16607
+ db = new SqliteAdapter(dbPath);
16608
16608
  db.exec("PRAGMA journal_mode = WAL");
16609
16609
  db.exec("PRAGMA busy_timeout = 5000");
16610
16610
  db.exec(`
@@ -40243,7 +40243,7 @@ function registerAgent(name, sessionId, role, projectId) {
40243
40243
  `).run(id, normalizedName, sessionId, resolvedRole, projectId ?? null);
40244
40244
  const created = db2.prepare("SELECT * FROM agent_presence WHERE agent = ?").get(normalizedName);
40245
40245
  return { agent: parsePresence(created), created: true, took_over: false };
40246
- }).immediate();
40246
+ });
40247
40247
  return result;
40248
40248
  }
40249
40249
  function heartbeat(agent, status, metadata, sessionId) {
@@ -40372,7 +40372,7 @@ function acquireLock(resourceType, resourceId, agentId, lockType = "advisory", e
40372
40372
  SELECT * FROM resource_locks WHERE resource_type = ? AND resource_id = ? AND lock_type = ?
40373
40373
  `).get(resourceType, resourceId, lockType);
40374
40374
  return { acquired: true, lock };
40375
- }).immediate();
40375
+ });
40376
40376
  }
40377
40377
  function bulkAcquireLock(resources, agentId) {
40378
40378
  const db2 = getDb();
@@ -40406,7 +40406,7 @@ function bulkAcquireLock(resources, agentId) {
40406
40406
  acquired.push(lock);
40407
40407
  }
40408
40408
  return { acquired: true, locks: acquired };
40409
- }).immediate();
40409
+ });
40410
40410
  }
40411
40411
  function tryBulkAcquireLock(resources, agentId) {
40412
40412
  try {
@@ -40884,7 +40884,7 @@ function buildGraph() {
40884
40884
  weight = excluded.weight,
40885
40885
  updated_at = excluded.updated_at
40886
40886
  `);
40887
- const insertOrUpdate = db2.transaction(() => {
40887
+ db2.transaction(() => {
40888
40888
  const dmPairs = db2.prepare(`
40889
40889
  SELECT from_agent, to_agent, COUNT(*) as cnt, MAX(created_at) as last_at
40890
40890
  FROM messages WHERE space IS NULL AND from_agent != to_agent
@@ -40930,7 +40930,6 @@ function buildGraph() {
40930
40930
  created++;
40931
40931
  }
40932
40932
  });
40933
- insertOrUpdate();
40934
40933
  return { edges_created: created, edges_updated: updated };
40935
40934
  }
40936
40935
  function getRelated(entityType, entityId) {
@@ -40986,7 +40985,7 @@ function getGraphStats() {
40986
40985
  // package.json
40987
40986
  var package_default = {
40988
40987
  name: "@hasna/conversations",
40989
- version: "0.2.22",
40988
+ version: "0.2.23",
40990
40989
  description: "Real-time CLI messaging for AI agents",
40991
40990
  type: "module",
40992
40991
  bin: {
package/dist/index.js CHANGED
@@ -9485,7 +9485,7 @@ function getDb() {
9485
9485
  return db;
9486
9486
  const dbPath = getDbPath2();
9487
9487
  mkdirSync3(dirname2(dbPath), { recursive: true });
9488
- db = new SqliteAdapter(dbPath, { create: true });
9488
+ db = new SqliteAdapter(dbPath);
9489
9489
  db.exec("PRAGMA journal_mode = WAL");
9490
9490
  db.exec("PRAGMA busy_timeout = 5000");
9491
9491
  db.exec(`
@@ -13114,7 +13114,7 @@ function registerAgent(name, sessionId, role, projectId) {
13114
13114
  `).run(id, normalizedName, sessionId, resolvedRole, projectId ?? null);
13115
13115
  const created = db2.prepare("SELECT * FROM agent_presence WHERE agent = ?").get(normalizedName);
13116
13116
  return { agent: parsePresence(created), created: true, took_over: false };
13117
- }).immediate();
13117
+ });
13118
13118
  return result;
13119
13119
  }
13120
13120
  function heartbeat(agent, status, metadata, sessionId) {
@@ -13202,7 +13202,7 @@ function acquireLock(resourceType, resourceId, agentId, lockType = "advisory", e
13202
13202
  SELECT * FROM resource_locks WHERE resource_type = ? AND resource_id = ? AND lock_type = ?
13203
13203
  `).get(resourceType, resourceId, lockType);
13204
13204
  return { acquired: true, lock };
13205
- }).immediate();
13205
+ });
13206
13206
  }
13207
13207
  function bulkAcquireLock(resources, agentId) {
13208
13208
  const db2 = getDb();
@@ -13236,7 +13236,7 @@ function bulkAcquireLock(resources, agentId) {
13236
13236
  acquired.push(lock);
13237
13237
  }
13238
13238
  return { acquired: true, locks: acquired };
13239
- }).immediate();
13239
+ });
13240
13240
  }
13241
13241
  function tryBulkAcquireLock(resources, agentId) {
13242
13242
  try {
@@ -13710,7 +13710,7 @@ function buildGraph() {
13710
13710
  weight = excluded.weight,
13711
13711
  updated_at = excluded.updated_at
13712
13712
  `);
13713
- const insertOrUpdate = db2.transaction(() => {
13713
+ db2.transaction(() => {
13714
13714
  const dmPairs = db2.prepare(`
13715
13715
  SELECT from_agent, to_agent, COUNT(*) as cnt, MAX(created_at) as last_at
13716
13716
  FROM messages WHERE space IS NULL AND from_agent != to_agent
@@ -13756,7 +13756,6 @@ function buildGraph() {
13756
13756
  created++;
13757
13757
  }
13758
13758
  });
13759
- insertOrUpdate();
13760
13759
  return { edges_created: created, edges_updated: updated };
13761
13760
  }
13762
13761
  function getRelated(entityType, entityId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/conversations",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "description": "Real-time CLI messaging for AI agents",
5
5
  "type": "module",
6
6
  "bin": {