remem-mcp 0.6.4 → 0.6.6

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
@@ -7406,6 +7406,7 @@ Hooks removed from ${removed} agent(s).`);
7406
7406
 
7407
7407
  // src/import.ts
7408
7408
  init_esm_shims();
7409
+ init_ulid();
7409
7410
  import { existsSync as existsSync9, readFileSync as readFileSync7 } from "fs";
7410
7411
  import { dirname as dirname6, join as join10 } from "path";
7411
7412
  import { fileURLToPath as fileURLToPath3 } from "url";
@@ -7467,15 +7468,15 @@ function importData(dbPath, inputPath) {
7467
7468
  const transaction = db.transaction(() => {
7468
7469
  for (const row of data.captures) {
7469
7470
  const result = insertStmt.run(
7470
- row.id,
7471
- row.session_key,
7472
- row.agent_id,
7471
+ row.id ?? generateId(),
7472
+ row.session_key ?? "import",
7473
+ row.agent_id ?? "import",
7473
7474
  row.type,
7474
7475
  row.content,
7475
7476
  row.content_hash ?? null,
7476
- row.tags,
7477
- row.created_at,
7478
- row.metadata,
7477
+ Array.isArray(row.tags) ? JSON.stringify(row.tags) : row.tags ?? null,
7478
+ row.created_at ?? (/* @__PURE__ */ new Date()).toISOString(),
7479
+ row.metadata ?? null,
7479
7480
  row.team_id ?? null,
7480
7481
  row.user_id ?? null,
7481
7482
  row.task_id ?? null
@@ -14387,7 +14388,10 @@ ${sorted.length} unique tag(s).`);
14387
14388
  return;
14388
14389
  }
14389
14390
  const db = openDbWithSchema(defaultDbPath3());
14390
- const syms = searchSymbols(db, query, { teamId, limit, repoPath });
14391
+ let syms = searchSymbols(db, query, { teamId, limit, repoPath });
14392
+ if (syms.length === 0) {
14393
+ syms = searchSymbols(db, query, { teamId, limit });
14394
+ }
14391
14395
  if (syms.length === 0) {
14392
14396
  console.log("No symbols found.");
14393
14397
  db.close();
@@ -14474,7 +14478,10 @@ ${sorted.length} unique tag(s).`);
14474
14478
  return;
14475
14479
  }
14476
14480
  const db = openDbWithSchema(defaultDbPath3());
14477
- const syms = listSymbols(db, filePath, { repoPath });
14481
+ let syms = listSymbols(db, filePath, { repoPath });
14482
+ if (syms.length === 0) {
14483
+ syms = listSymbols(db, filePath, {});
14484
+ }
14478
14485
  if (syms.length === 0) {
14479
14486
  console.log("No symbols found.");
14480
14487
  db.close();