@hasna/mementos 0.14.7 → 0.14.9

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/cli/index.js CHANGED
@@ -18187,7 +18187,7 @@ function executeProposal(proposal, d) {
18187
18187
  default:
18188
18188
  throw new Error(`Unknown proposal type: ${proposal.proposal_type}`);
18189
18189
  }
18190
- })();
18190
+ });
18191
18191
  return rollbackData;
18192
18192
  }
18193
18193
  function executeArchive(proposal, d) {
@@ -18383,7 +18383,7 @@ function rollbackProposal(proposal, d) {
18383
18383
  default:
18384
18384
  break;
18385
18385
  }
18386
- })();
18386
+ });
18387
18387
  }
18388
18388
  var init_executor = __esm(() => {
18389
18389
  init_database();
@@ -19387,7 +19387,6 @@ __export(exports_session_registry, {
19387
19387
  closeRegistry: () => closeRegistry,
19388
19388
  cleanStaleSessions: () => cleanStaleSessions
19389
19389
  });
19390
- import { Database as Database2 } from "bun:sqlite";
19391
19390
  import { existsSync as existsSync12, mkdirSync as mkdirSync9 } from "fs";
19392
19391
  import { dirname as dirname4, join as join12 } from "path";
19393
19392
  function getDb() {
@@ -19396,7 +19395,7 @@ function getDb() {
19396
19395
  const dir = dirname4(DB_PATH);
19397
19396
  if (!existsSync12(dir))
19398
19397
  mkdirSync9(dir, { recursive: true });
19399
- _db2 = new Database2(DB_PATH, { create: true });
19398
+ _db2 = new SqliteAdapter(DB_PATH, { create: true });
19400
19399
  _db2.run("PRAGMA journal_mode = WAL");
19401
19400
  _db2.run("PRAGMA busy_timeout = 3000");
19402
19401
  _db2.exec(`
@@ -19568,6 +19567,7 @@ function closeRegistry() {
19568
19567
  }
19569
19568
  var DB_PATH, _db2 = null;
19570
19569
  var init_session_registry = __esm(() => {
19570
+ init_dist();
19571
19571
  DB_PATH = join12(process.env["HOME"] || process.env["USERPROFILE"] || "~", ".open-sessions-registry.db");
19572
19572
  });
19573
19573
 
@@ -23209,8 +23209,8 @@ program2.command("restore [file]").description("Restore the database from a back
23209
23209
  }
23210
23210
  let backupCount = 0;
23211
23211
  try {
23212
- const { Database: Database3 } = __require("bun:sqlite");
23213
- const backupDb = new Database3(source, { readonly: true });
23212
+ const { Database: Database2 } = __require("bun:sqlite");
23213
+ const backupDb = new Database2(source, { readonly: true });
23214
23214
  const row = backupDb.query("SELECT COUNT(*) as count FROM memories").get();
23215
23215
  backupCount = row?.count ?? 0;
23216
23216
  backupDb.close();
package/dist/index.js CHANGED
@@ -10679,14 +10679,13 @@ function getEntitiesForMemory(memoryId, db) {
10679
10679
  function bulkLinkEntities(entityIds, memoryId, role = "context", db) {
10680
10680
  const d = db || getDatabase();
10681
10681
  const timestamp = now();
10682
- const tx = d.transaction(() => {
10682
+ d.transaction(() => {
10683
10683
  const stmt = d.prepare(`INSERT OR IGNORE INTO entity_memories (entity_id, memory_id, role, created_at)
10684
10684
  VALUES (?, ?, ?, ?)`);
10685
10685
  for (const entityId of entityIds) {
10686
10686
  stmt.run(entityId, memoryId, role, timestamp);
10687
10687
  }
10688
10688
  });
10689
- tx();
10690
10689
  }
10691
10690
  function getEntityMemoryLinks(entityId, memoryId, db) {
10692
10691
  const d = db || getDatabase();
package/dist/mcp/index.js CHANGED
@@ -17167,7 +17167,7 @@ var init_retention = __esm(() => {
17167
17167
  var require_package = __commonJS((exports, module) => {
17168
17168
  module.exports = {
17169
17169
  name: "@hasna/mementos",
17170
- version: "0.14.7",
17170
+ version: "0.14.9",
17171
17171
  description: "Universal memory system for AI agents - CLI + MCP server + library API",
17172
17172
  type: "module",
17173
17173
  main: "dist/index.js",
@@ -22978,7 +22978,7 @@ function executeProposal(proposal, d) {
22978
22978
  default:
22979
22979
  throw new Error(`Unknown proposal type: ${proposal.proposal_type}`);
22980
22980
  }
22981
- })();
22981
+ });
22982
22982
  return rollbackData;
22983
22983
  }
22984
22984
  function executeArchive(proposal, d) {
@@ -23174,7 +23174,7 @@ function rollbackProposal(proposal, d) {
23174
23174
  default:
23175
23175
  break;
23176
23176
  }
23177
- })();
23177
+ });
23178
23178
  }
23179
23179
 
23180
23180
  // src/lib/synthesis/metrics.ts
@@ -24203,7 +24203,7 @@ function getRecentlyPushedCount() {
24203
24203
  }
24204
24204
 
24205
24205
  // src/lib/session-registry.ts
24206
- import { Database as Database2 } from "bun:sqlite";
24206
+ init_dist();
24207
24207
  import { existsSync as existsSync12, mkdirSync as mkdirSync6 } from "fs";
24208
24208
  import { dirname as dirname5, join as join12 } from "path";
24209
24209
  var DB_PATH = join12(process.env["HOME"] || process.env["USERPROFILE"] || "~", ".open-sessions-registry.db");
@@ -24214,7 +24214,7 @@ function getDb() {
24214
24214
  const dir = dirname5(DB_PATH);
24215
24215
  if (!existsSync12(dir))
24216
24216
  mkdirSync6(dir, { recursive: true });
24217
- _db2 = new Database2(DB_PATH, { create: true });
24217
+ _db2 = new SqliteAdapter(DB_PATH, { create: true });
24218
24218
  _db2.run("PRAGMA journal_mode = WAL");
24219
24219
  _db2.run("PRAGMA busy_timeout = 3000");
24220
24220
  _db2.exec(`
@@ -14807,7 +14807,7 @@ function executeProposal(proposal, d) {
14807
14807
  default:
14808
14808
  throw new Error(`Unknown proposal type: ${proposal.proposal_type}`);
14809
14809
  }
14810
- })();
14810
+ });
14811
14811
  return rollbackData;
14812
14812
  }
14813
14813
  function executeArchive(proposal, d) {
@@ -15003,7 +15003,7 @@ function rollbackProposal(proposal, d) {
15003
15003
  default:
15004
15004
  break;
15005
15005
  }
15006
- })();
15006
+ });
15007
15007
  }
15008
15008
 
15009
15009
  // src/lib/synthesis/metrics.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/mementos",
3
- "version": "0.14.7",
3
+ "version": "0.14.9",
4
4
  "description": "Universal memory system for AI agents - CLI + MCP server + library API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",