kiro-memory 1.4.1 → 1.5.0

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
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="assets/logo.svg" alt="Kiro Memory" width="400" />
2
+ <img src="assets/banner.svg" alt="Kiro Memory" width="480" />
3
3
  </p>
4
4
 
5
5
  <p align="center">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiro-memory",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Persistent cross-session memory for Kiro CLI. Automatically tracks context, observations, and summaries across coding sessions.",
5
5
  "keywords": [
6
6
  "kiro",
@@ -489,7 +489,7 @@ var Logger = class {
489
489
  mkdirSync(logsDir, { recursive: true });
490
490
  }
491
491
  const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
492
- this.logFilePath = join(logsDir, `contextkit-${date}.log`);
492
+ this.logFilePath = join(logsDir, `kiro-memory-${date}.log`);
493
493
  } catch (error) {
494
494
  console.error("[LOGGER] Failed to initialize log file:", error);
495
495
  this.logFilePath = null;
@@ -505,7 +505,7 @@ var Logger = class {
505
505
  if (existsSync(settingsPath)) {
506
506
  const settingsData = readFileSync(settingsPath, "utf-8");
507
507
  const settings = JSON.parse(settingsData);
508
- const envLevel = (settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
508
+ const envLevel = (settings.KIRO_MEMORY_LOG_LEVEL || settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
509
509
  this.level = LogLevel[envLevel] ?? 1 /* INFO */;
510
510
  } else {
511
511
  this.level = 1 /* INFO */;
@@ -683,9 +683,9 @@ function getDirname() {
683
683
  return dirname(fileURLToPath(import.meta.url));
684
684
  }
685
685
  var _dirname = getDirname();
686
- var DATA_DIR = process.env.CONTEXTKIT_DATA_DIR || join2(homedir2(), ".contextkit");
686
+ var DATA_DIR = process.env.KIRO_MEMORY_DATA_DIR || process.env.CONTEXTKIT_DATA_DIR || join2(homedir2(), ".contextkit");
687
687
  var KIRO_CONFIG_DIR = process.env.KIRO_CONFIG_DIR || join2(homedir2(), ".kiro");
688
- var PLUGIN_ROOT = join2(KIRO_CONFIG_DIR, "plugins", "contextkit");
688
+ var PLUGIN_ROOT = join2(KIRO_CONFIG_DIR, "plugins", "kiro-memory");
689
689
  var ARCHIVES_DIR = join2(DATA_DIR, "archives");
690
690
  var LOGS_DIR = join2(DATA_DIR, "logs");
691
691
  var TRASH_DIR = join2(DATA_DIR, "trash");
@@ -704,7 +704,7 @@ function ensureDir(dirPath) {
704
704
  // src/services/sqlite/Database.ts
705
705
  var SQLITE_MMAP_SIZE_BYTES = 256 * 1024 * 1024;
706
706
  var SQLITE_CACHE_SIZE_PAGES = 1e4;
707
- var ContextKitDatabase = class {
707
+ var KiroMemoryDatabase = class {
708
708
  db;
709
709
  constructor(dbPath = DB_PATH) {
710
710
  if (dbPath !== ":memory:") {
@@ -906,11 +906,11 @@ init_Prompts();
906
906
  init_Search();
907
907
 
908
908
  // src/sdk/index.ts
909
- var ContextKitSDK = class {
909
+ var KiroMemorySDK = class {
910
910
  db;
911
911
  project;
912
912
  constructor(config = {}) {
913
- this.db = new ContextKitDatabase(config.dataDir);
913
+ this.db = new KiroMemoryDatabase(config.dataDir);
914
914
  this.project = config.project || this.detectProject();
915
915
  }
916
916
  detectProject() {
@@ -1010,7 +1010,7 @@ var ContextKitSDK = class {
1010
1010
  return getSummariesByProject2(this.db.db, this.project, limit);
1011
1011
  }
1012
1012
  /**
1013
- * Ricerca avanzata con FTS5 e filtri
1013
+ * Advanced search with FTS5 and filters
1014
1014
  */
1015
1015
  async searchAdvanced(query, filters = {}) {
1016
1016
  const { searchObservationsFTS: searchObservationsFTS2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
@@ -1022,21 +1022,21 @@ var ContextKitSDK = class {
1022
1022
  };
1023
1023
  }
1024
1024
  /**
1025
- * Recupera osservazioni per ID (batch)
1025
+ * Retrieve observations by ID (batch)
1026
1026
  */
1027
1027
  async getObservationsByIds(ids) {
1028
1028
  const { getObservationsByIds: getObservationsByIds2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1029
1029
  return getObservationsByIds2(this.db.db, ids);
1030
1030
  }
1031
1031
  /**
1032
- * Timeline: contesto cronologico attorno a un'osservazione
1032
+ * Timeline: chronological context around an observation
1033
1033
  */
1034
1034
  async getTimeline(anchorId, depthBefore = 5, depthAfter = 5) {
1035
1035
  const { getTimeline: getTimeline2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1036
1036
  return getTimeline2(this.db.db, anchorId, depthBefore, depthAfter);
1037
1037
  }
1038
1038
  /**
1039
- * Crea o recupera una sessione per il progetto corrente
1039
+ * Create or retrieve a session for the current project
1040
1040
  */
1041
1041
  async getOrCreateSession(contentSessionId) {
1042
1042
  const { getSessionByContentId: getSessionByContentId2, createSession: createSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
@@ -1059,27 +1059,27 @@ var ContextKitSDK = class {
1059
1059
  return session;
1060
1060
  }
1061
1061
  /**
1062
- * Salva un prompt utente
1062
+ * Store a user prompt
1063
1063
  */
1064
1064
  async storePrompt(contentSessionId, promptNumber, text) {
1065
1065
  const { createPrompt: createPrompt2 } = await Promise.resolve().then(() => (init_Prompts(), Prompts_exports));
1066
1066
  return createPrompt2(this.db.db, contentSessionId, this.project, promptNumber, text);
1067
1067
  }
1068
1068
  /**
1069
- * Completa una sessione
1069
+ * Complete a session
1070
1070
  */
1071
1071
  async completeSession(sessionId) {
1072
1072
  const { completeSession: completeSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
1073
1073
  completeSession2(this.db.db, sessionId);
1074
1074
  }
1075
1075
  /**
1076
- * Getter per il nome progetto corrente
1076
+ * Getter for current project name
1077
1077
  */
1078
1078
  getProject() {
1079
1079
  return this.project;
1080
1080
  }
1081
1081
  /**
1082
- * Getter per accesso diretto al database (per route API)
1082
+ * Getter for direct database access (for API routes)
1083
1083
  */
1084
1084
  getDb() {
1085
1085
  return this.db.db;
@@ -1091,8 +1091,8 @@ var ContextKitSDK = class {
1091
1091
  this.db.close();
1092
1092
  }
1093
1093
  };
1094
- function createContextKit(config) {
1095
- return new ContextKitSDK(config);
1094
+ function createKiroMemory(config) {
1095
+ return new KiroMemorySDK(config);
1096
1096
  }
1097
1097
 
1098
1098
  // src/cli/contextkit.ts
@@ -1108,12 +1108,12 @@ var __filename = fileURLToPath2(import.meta.url);
1108
1108
  var __dirname2 = dirname2(__filename);
1109
1109
  var DIST_DIR = dirname2(__dirname2);
1110
1110
  var AGENT_TEMPLATE = JSON.stringify({
1111
- name: "contextkit-memory",
1112
- description: "Agent with persistent cross-session memory. Uses ContextKit to remember context from previous sessions and automatically save what it learns.",
1111
+ name: "kiro-memory",
1112
+ description: "Agent with persistent cross-session memory. Uses Kiro Memory to remember context from previous sessions and automatically save what it learns.",
1113
1113
  model: "claude-sonnet-4",
1114
- tools: ["read", "write", "shell", "glob", "grep", "web_search", "web_fetch", "@contextkit"],
1114
+ tools: ["read", "write", "shell", "glob", "grep", "web_search", "web_fetch", "@kiro-memory"],
1115
1115
  mcpServers: {
1116
- contextkit: {
1116
+ "kiro-memory": {
1117
1117
  command: "node",
1118
1118
  args: ["__DIST_DIR__/servers/mcp-server.js"]
1119
1119
  }
@@ -1124,27 +1124,27 @@ var AGENT_TEMPLATE = JSON.stringify({
1124
1124
  postToolUse: [{ command: "node __DIST_DIR__/hooks/postToolUse.js", matcher: "*", timeout_ms: 5e3 }],
1125
1125
  stop: [{ command: "node __DIST_DIR__/hooks/stop.js", timeout_ms: 1e4 }]
1126
1126
  },
1127
- resources: ["file://.kiro/steering/contextkit.md"]
1127
+ resources: ["file://.kiro/steering/kiro-memory.md"]
1128
1128
  }, null, 2);
1129
- var STEERING_CONTENT = `# ContextKit - Persistent Memory
1129
+ var STEERING_CONTENT = `# Kiro Memory - Persistent Memory
1130
1130
 
1131
- You have access to ContextKit, a persistent cross-session memory system.
1131
+ You have access to Kiro Memory, a persistent cross-session memory system.
1132
1132
 
1133
1133
  ## Available MCP Tools
1134
1134
 
1135
- ### @contextkit/search
1135
+ ### @kiro-memory/search
1136
1136
  Search previous session memory. Use when:
1137
1137
  - The user mentions past work
1138
1138
  - You need context on previous decisions
1139
1139
  - You want to check if a problem was already addressed
1140
1140
 
1141
- ### @contextkit/get_context
1141
+ ### @kiro-memory/get_context
1142
1142
  Retrieve recent context for the current project. Use at the start of complex tasks to understand what was done before.
1143
1143
 
1144
- ### @contextkit/timeline
1144
+ ### @kiro-memory/timeline
1145
1145
  Show chronological context around an observation. Use to understand the sequence of events.
1146
1146
 
1147
- ### @contextkit/get_observations
1147
+ ### @kiro-memory/get_observations
1148
1148
  Retrieve full details of specific observations. Use after \`search\` to drill down.
1149
1149
 
1150
1150
  ## Behavior
@@ -1456,13 +1456,13 @@ async function installKiro() {
1456
1456
  const agentsDir = join3(kiroDir, "agents");
1457
1457
  const settingsDir = join3(kiroDir, "settings");
1458
1458
  const steeringDir = join3(kiroDir, "steering");
1459
- const dataDir = process.env.CONTEXTKIT_DATA_DIR || join3(homedir3(), ".contextkit");
1459
+ const dataDir = process.env.KIRO_MEMORY_DATA_DIR || process.env.CONTEXTKIT_DATA_DIR || join3(homedir3(), ".contextkit");
1460
1460
  console.log("[2/4] Installing Kiro configuration...\n");
1461
1461
  for (const dir of [agentsDir, settingsDir, steeringDir, dataDir]) {
1462
1462
  mkdirSync3(dir, { recursive: true });
1463
1463
  }
1464
1464
  const agentConfig = AGENT_TEMPLATE.replace(/__DIST_DIR__/g, distDir);
1465
- const agentDestPath = join3(agentsDir, "contextkit.json");
1465
+ const agentDestPath = join3(agentsDir, "kiro-memory.json");
1466
1466
  writeFileSync(agentDestPath, agentConfig, "utf8");
1467
1467
  console.log(` \u2192 Agent config: ${agentDestPath}`);
1468
1468
  const mcpFilePath = join3(settingsDir, "mcp.json");
@@ -1474,30 +1474,30 @@ async function installKiro() {
1474
1474
  } catch {
1475
1475
  }
1476
1476
  }
1477
- mcpConfig.mcpServers.contextkit = {
1477
+ mcpConfig.mcpServers["kiro-memory"] = {
1478
1478
  command: "node",
1479
1479
  args: [join3(distDir, "servers", "mcp-server.js")]
1480
1480
  };
1481
1481
  writeFileSync(mcpFilePath, JSON.stringify(mcpConfig, null, 2), "utf8");
1482
1482
  console.log(` \u2192 MCP config: ${mcpFilePath}`);
1483
- const steeringDestPath = join3(steeringDir, "contextkit.md");
1483
+ const steeringDestPath = join3(steeringDir, "kiro-memory.md");
1484
1484
  writeFileSync(steeringDestPath, STEERING_CONTENT, "utf8");
1485
1485
  console.log(` \u2192 Steering: ${steeringDestPath}`);
1486
1486
  console.log(` \u2192 Data dir: ${dataDir}`);
1487
1487
  console.log("\n[3/4] Shell alias setup\n");
1488
1488
  const { rcFile } = detectShellRc();
1489
- const aliasLine = 'alias kiro="kiro-cli --agent contextkit-memory"';
1489
+ const aliasLine = 'alias kiro="kiro-cli --agent kiro-memory"';
1490
1490
  let aliasAlreadySet = false;
1491
1491
  if (existsSync3(rcFile)) {
1492
1492
  const rcContent = readFileSync2(rcFile, "utf8");
1493
- aliasAlreadySet = rcContent.includes("alias kiro=") && rcContent.includes("contextkit-memory");
1493
+ aliasAlreadySet = rcContent.includes("alias kiro=") && rcContent.includes("kiro-memory");
1494
1494
  }
1495
1495
  if (aliasAlreadySet) {
1496
1496
  console.log(` \x1B[32m\u2713\x1B[0m Alias already configured in ${rcFile}`);
1497
1497
  } else {
1498
1498
  console.log(" \x1B[36m\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\x1B[0m");
1499
1499
  console.log(" \x1B[36m\u2502\x1B[0m Without an alias, you must type every time: \x1B[36m\u2502\x1B[0m");
1500
- console.log(" \x1B[36m\u2502\x1B[0m \x1B[2mkiro-cli --agent contextkit-memory\x1B[0m \x1B[36m\u2502\x1B[0m");
1500
+ console.log(" \x1B[36m\u2502\x1B[0m \x1B[2mkiro-cli --agent kiro-memory\x1B[0m \x1B[36m\u2502\x1B[0m");
1501
1501
  console.log(" \x1B[36m\u2502\x1B[0m \x1B[36m\u2502\x1B[0m");
1502
1502
  console.log(" \x1B[36m\u2502\x1B[0m With the alias, just type: \x1B[36m\u2502\x1B[0m");
1503
1503
  console.log(" \x1B[36m\u2502\x1B[0m \x1B[1m\x1B[32mkiro\x1B[0m \x1B[36m\u2502\x1B[0m");
@@ -1530,7 +1530,7 @@ ${aliasLine}
1530
1530
  if (aliasAlreadySet) {
1531
1531
  console.log(" \x1B[1mkiro\x1B[0m");
1532
1532
  } else {
1533
- console.log(" \x1B[1mkiro-cli --agent contextkit-memory\x1B[0m");
1533
+ console.log(" \x1B[1mkiro-cli --agent kiro-memory\x1B[0m");
1534
1534
  }
1535
1535
  console.log("");
1536
1536
  console.log(" The worker starts automatically when a Kiro session begins.");
@@ -1541,9 +1541,9 @@ async function runDoctor() {
1541
1541
  console.log("\n=== Kiro Memory - Diagnostics ===");
1542
1542
  const checks = runEnvironmentChecks();
1543
1543
  const kiroDir = process.env.KIRO_CONFIG_DIR || join3(homedir3(), ".kiro");
1544
- const agentPath = join3(kiroDir, "agents", "contextkit.json");
1544
+ const agentPath = join3(kiroDir, "agents", "kiro-memory.json");
1545
1545
  const mcpPath = join3(kiroDir, "settings", "mcp.json");
1546
- const dataDir = process.env.CONTEXTKIT_DATA_DIR || join3(homedir3(), ".contextkit");
1546
+ const dataDir = process.env.KIRO_MEMORY_DATA_DIR || process.env.CONTEXTKIT_DATA_DIR || join3(homedir3(), ".contextkit");
1547
1547
  checks.push({
1548
1548
  name: "Kiro agent config",
1549
1549
  ok: existsSync3(agentPath),
@@ -1554,14 +1554,14 @@ async function runDoctor() {
1554
1554
  if (existsSync3(mcpPath)) {
1555
1555
  try {
1556
1556
  const mcp = JSON.parse(readFileSync2(mcpPath, "utf8"));
1557
- mcpOk = !!mcp.mcpServers?.contextkit;
1557
+ mcpOk = !!mcp.mcpServers?.["kiro-memory"] || !!mcp.mcpServers?.contextkit;
1558
1558
  } catch {
1559
1559
  }
1560
1560
  }
1561
1561
  checks.push({
1562
1562
  name: "MCP server configured",
1563
1563
  ok: mcpOk,
1564
- message: mcpOk ? "contextkit registered in mcp.json" : "Not configured",
1564
+ message: mcpOk ? "kiro-memory registered in mcp.json" : "Not configured",
1565
1565
  fix: !mcpOk ? "Run: kiro-memory install" : void 0
1566
1566
  });
1567
1567
  checks.push({
@@ -1602,31 +1602,31 @@ async function main() {
1602
1602
  await runDoctor();
1603
1603
  return;
1604
1604
  }
1605
- const contextkit = createContextKit();
1605
+ const sdk = createKiroMemory();
1606
1606
  try {
1607
1607
  switch (command) {
1608
1608
  case "context":
1609
1609
  case "ctx":
1610
- await showContext(contextkit);
1610
+ await showContext(sdk);
1611
1611
  break;
1612
1612
  case "search":
1613
- await searchContext(contextkit, args[1]);
1613
+ await searchContext(sdk, args[1]);
1614
1614
  break;
1615
1615
  case "observations":
1616
1616
  case "obs":
1617
- await showObservations(contextkit, parseInt(args[1]) || 10);
1617
+ await showObservations(sdk, parseInt(args[1]) || 10);
1618
1618
  break;
1619
1619
  case "summaries":
1620
1620
  case "sum":
1621
- await showSummaries(contextkit, parseInt(args[1]) || 5);
1621
+ await showSummaries(sdk, parseInt(args[1]) || 5);
1622
1622
  break;
1623
1623
  case "add-observation":
1624
1624
  case "add-obs":
1625
- await addObservation(contextkit, args[1], args.slice(2).join(" "));
1625
+ await addObservation(sdk, args[1], args.slice(2).join(" "));
1626
1626
  break;
1627
1627
  case "add-summary":
1628
1628
  case "add-sum":
1629
- await addSummary(contextkit, args.slice(1).join(" "));
1629
+ await addSummary(sdk, args.slice(1).join(" "));
1630
1630
  break;
1631
1631
  case "help":
1632
1632
  case "--help":
@@ -1634,16 +1634,16 @@ async function main() {
1634
1634
  showHelp();
1635
1635
  break;
1636
1636
  default:
1637
- console.log("ContextKit CLI\n");
1637
+ console.log("Kiro Memory CLI\n");
1638
1638
  showHelp();
1639
1639
  process.exit(1);
1640
1640
  }
1641
1641
  } finally {
1642
- contextkit.close();
1642
+ sdk.close();
1643
1643
  }
1644
1644
  }
1645
- async function showContext(contextkit) {
1646
- const context = await contextkit.getContext();
1645
+ async function showContext(sdk) {
1646
+ const context = await sdk.getContext();
1647
1647
  console.log(`
1648
1648
  \u{1F4C1} Project: ${context.project}
1649
1649
  `);
@@ -1663,12 +1663,12 @@ async function showContext(contextkit) {
1663
1663
  });
1664
1664
  console.log("");
1665
1665
  }
1666
- async function searchContext(contextkit, query) {
1666
+ async function searchContext(sdk, query) {
1667
1667
  if (!query) {
1668
1668
  console.error("Error: Please provide a search query");
1669
1669
  process.exit(1);
1670
1670
  }
1671
- const results = await contextkit.search(query);
1671
+ const results = await sdk.search(query);
1672
1672
  console.log(`
1673
1673
  \u{1F50D} Search results for: "${query}"
1674
1674
  `);
@@ -1697,8 +1697,8 @@ async function searchContext(contextkit, query) {
1697
1697
  console.log("");
1698
1698
  }
1699
1699
  }
1700
- async function showObservations(contextkit, limit) {
1701
- const observations = await contextkit.getRecentObservations(limit);
1700
+ async function showObservations(sdk, limit) {
1701
+ const observations = await sdk.getRecentObservations(limit);
1702
1702
  console.log(`
1703
1703
  \u{1F4CB} Last ${limit} Observations:
1704
1704
  `);
@@ -1711,8 +1711,8 @@ async function showObservations(contextkit, limit) {
1711
1711
  console.log("");
1712
1712
  });
1713
1713
  }
1714
- async function showSummaries(contextkit, limit) {
1715
- const summaries = await contextkit.getRecentSummaries(limit);
1714
+ async function showSummaries(sdk, limit) {
1715
+ const summaries = await sdk.getRecentSummaries(limit);
1716
1716
  console.log(`
1717
1717
  \u{1F4CA} Last ${limit} Summaries:
1718
1718
  `);
@@ -1731,12 +1731,12 @@ async function showSummaries(contextkit, limit) {
1731
1731
  console.log("");
1732
1732
  });
1733
1733
  }
1734
- async function addObservation(contextkit, title, content) {
1734
+ async function addObservation(sdk, title, content) {
1735
1735
  if (!title || !content) {
1736
1736
  console.error("Error: Please provide both title and content");
1737
1737
  process.exit(1);
1738
1738
  }
1739
- const id = await contextkit.storeObservation({
1739
+ const id = await sdk.storeObservation({
1740
1740
  type: "manual",
1741
1741
  title,
1742
1742
  content
@@ -1744,12 +1744,12 @@ async function addObservation(contextkit, title, content) {
1744
1744
  console.log(`\u2705 Observation stored with ID: ${id}
1745
1745
  `);
1746
1746
  }
1747
- async function addSummary(contextkit, content) {
1747
+ async function addSummary(sdk, content) {
1748
1748
  if (!content) {
1749
1749
  console.error("Error: Please provide summary content");
1750
1750
  process.exit(1);
1751
1751
  }
1752
- const id = await contextkit.storeSummary({
1752
+ const id = await sdk.storeSummary({
1753
1753
  learned: content
1754
1754
  });
1755
1755
  console.log(`\u2705 Summary stored with ID: ${id}
@@ -591,7 +591,7 @@ var Logger = class {
591
591
  mkdirSync2(logsDir, { recursive: true });
592
592
  }
593
593
  const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
594
- this.logFilePath = join2(logsDir, `contextkit-${date}.log`);
594
+ this.logFilePath = join2(logsDir, `kiro-memory-${date}.log`);
595
595
  } catch (error) {
596
596
  console.error("[LOGGER] Failed to initialize log file:", error);
597
597
  this.logFilePath = null;
@@ -607,7 +607,7 @@ var Logger = class {
607
607
  if (existsSync2(settingsPath)) {
608
608
  const settingsData = readFileSync(settingsPath, "utf-8");
609
609
  const settings = JSON.parse(settingsData);
610
- const envLevel = (settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
610
+ const envLevel = (settings.KIRO_MEMORY_LOG_LEVEL || settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
611
611
  this.level = LogLevel[envLevel] ?? 1 /* INFO */;
612
612
  } else {
613
613
  this.level = 1 /* INFO */;
@@ -785,9 +785,9 @@ function getDirname() {
785
785
  return dirname(fileURLToPath(import.meta.url));
786
786
  }
787
787
  var _dirname = getDirname();
788
- var DATA_DIR = process.env.CONTEXTKIT_DATA_DIR || join3(homedir2(), ".contextkit");
788
+ var DATA_DIR = process.env.KIRO_MEMORY_DATA_DIR || process.env.CONTEXTKIT_DATA_DIR || join3(homedir2(), ".contextkit");
789
789
  var KIRO_CONFIG_DIR = process.env.KIRO_CONFIG_DIR || join3(homedir2(), ".kiro");
790
- var PLUGIN_ROOT = join3(KIRO_CONFIG_DIR, "plugins", "contextkit");
790
+ var PLUGIN_ROOT = join3(KIRO_CONFIG_DIR, "plugins", "kiro-memory");
791
791
  var ARCHIVES_DIR = join3(DATA_DIR, "archives");
792
792
  var LOGS_DIR = join3(DATA_DIR, "logs");
793
793
  var TRASH_DIR = join3(DATA_DIR, "trash");
@@ -806,7 +806,7 @@ function ensureDir(dirPath) {
806
806
  // src/services/sqlite/Database.ts
807
807
  var SQLITE_MMAP_SIZE_BYTES = 256 * 1024 * 1024;
808
808
  var SQLITE_CACHE_SIZE_PAGES = 1e4;
809
- var ContextKitDatabase = class {
809
+ var KiroMemoryDatabase = class {
810
810
  db;
811
811
  constructor(dbPath = DB_PATH) {
812
812
  if (dbPath !== ":memory:") {
@@ -1008,11 +1008,11 @@ init_Prompts();
1008
1008
  init_Search();
1009
1009
 
1010
1010
  // src/sdk/index.ts
1011
- var ContextKitSDK = class {
1011
+ var KiroMemorySDK = class {
1012
1012
  db;
1013
1013
  project;
1014
1014
  constructor(config = {}) {
1015
- this.db = new ContextKitDatabase(config.dataDir);
1015
+ this.db = new KiroMemoryDatabase(config.dataDir);
1016
1016
  this.project = config.project || this.detectProject();
1017
1017
  }
1018
1018
  detectProject() {
@@ -1112,7 +1112,7 @@ var ContextKitSDK = class {
1112
1112
  return getSummariesByProject2(this.db.db, this.project, limit);
1113
1113
  }
1114
1114
  /**
1115
- * Ricerca avanzata con FTS5 e filtri
1115
+ * Advanced search with FTS5 and filters
1116
1116
  */
1117
1117
  async searchAdvanced(query, filters = {}) {
1118
1118
  const { searchObservationsFTS: searchObservationsFTS2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
@@ -1124,21 +1124,21 @@ var ContextKitSDK = class {
1124
1124
  };
1125
1125
  }
1126
1126
  /**
1127
- * Recupera osservazioni per ID (batch)
1127
+ * Retrieve observations by ID (batch)
1128
1128
  */
1129
1129
  async getObservationsByIds(ids) {
1130
1130
  const { getObservationsByIds: getObservationsByIds2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1131
1131
  return getObservationsByIds2(this.db.db, ids);
1132
1132
  }
1133
1133
  /**
1134
- * Timeline: contesto cronologico attorno a un'osservazione
1134
+ * Timeline: chronological context around an observation
1135
1135
  */
1136
1136
  async getTimeline(anchorId, depthBefore = 5, depthAfter = 5) {
1137
1137
  const { getTimeline: getTimeline2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1138
1138
  return getTimeline2(this.db.db, anchorId, depthBefore, depthAfter);
1139
1139
  }
1140
1140
  /**
1141
- * Crea o recupera una sessione per il progetto corrente
1141
+ * Create or retrieve a session for the current project
1142
1142
  */
1143
1143
  async getOrCreateSession(contentSessionId) {
1144
1144
  const { getSessionByContentId: getSessionByContentId2, createSession: createSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
@@ -1161,27 +1161,27 @@ var ContextKitSDK = class {
1161
1161
  return session;
1162
1162
  }
1163
1163
  /**
1164
- * Salva un prompt utente
1164
+ * Store a user prompt
1165
1165
  */
1166
1166
  async storePrompt(contentSessionId, promptNumber, text) {
1167
1167
  const { createPrompt: createPrompt2 } = await Promise.resolve().then(() => (init_Prompts(), Prompts_exports));
1168
1168
  return createPrompt2(this.db.db, contentSessionId, this.project, promptNumber, text);
1169
1169
  }
1170
1170
  /**
1171
- * Completa una sessione
1171
+ * Complete a session
1172
1172
  */
1173
1173
  async completeSession(sessionId) {
1174
1174
  const { completeSession: completeSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
1175
1175
  completeSession2(this.db.db, sessionId);
1176
1176
  }
1177
1177
  /**
1178
- * Getter per il nome progetto corrente
1178
+ * Getter for current project name
1179
1179
  */
1180
1180
  getProject() {
1181
1181
  return this.project;
1182
1182
  }
1183
1183
  /**
1184
- * Getter per accesso diretto al database (per route API)
1184
+ * Getter for direct database access (for API routes)
1185
1185
  */
1186
1186
  getDb() {
1187
1187
  return this.db.db;
@@ -1193,8 +1193,8 @@ var ContextKitSDK = class {
1193
1193
  this.db.close();
1194
1194
  }
1195
1195
  };
1196
- function createContextKit(config) {
1197
- return new ContextKitSDK(config);
1196
+ function createKiroMemory(config) {
1197
+ return new KiroMemorySDK(config);
1198
1198
  }
1199
1199
 
1200
1200
  // src/hooks/agentSpawn.ts
@@ -1238,7 +1238,7 @@ runHook("agentSpawn", async (input) => {
1238
1238
  await ensureWorkerRunning().catch(() => {
1239
1239
  });
1240
1240
  const project = detectProject(input.cwd);
1241
- const sdk = createContextKit({ project });
1241
+ const sdk = createKiroMemory({ project });
1242
1242
  try {
1243
1243
  const ctx = await sdk.getContext();
1244
1244
  if (ctx.relevantObservations.length === 0 && ctx.relevantSummaries.length === 0) {