kiro-memory 1.4.2 → 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.
@@ -488,7 +488,7 @@ var Logger = class {
488
488
  mkdirSync(logsDir, { recursive: true });
489
489
  }
490
490
  const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
491
- this.logFilePath = join(logsDir, `contextkit-${date}.log`);
491
+ this.logFilePath = join(logsDir, `kiro-memory-${date}.log`);
492
492
  } catch (error) {
493
493
  console.error("[LOGGER] Failed to initialize log file:", error);
494
494
  this.logFilePath = null;
@@ -504,7 +504,7 @@ var Logger = class {
504
504
  if (existsSync(settingsPath)) {
505
505
  const settingsData = readFileSync(settingsPath, "utf-8");
506
506
  const settings = JSON.parse(settingsData);
507
- const envLevel = (settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
507
+ const envLevel = (settings.KIRO_MEMORY_LOG_LEVEL || settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
508
508
  this.level = LogLevel[envLevel] ?? 1 /* INFO */;
509
509
  } else {
510
510
  this.level = 1 /* INFO */;
@@ -682,9 +682,9 @@ function getDirname() {
682
682
  return dirname(fileURLToPath(import.meta.url));
683
683
  }
684
684
  var _dirname = getDirname();
685
- var DATA_DIR = process.env.CONTEXTKIT_DATA_DIR || join2(homedir2(), ".contextkit");
685
+ var DATA_DIR = process.env.KIRO_MEMORY_DATA_DIR || process.env.CONTEXTKIT_DATA_DIR || join2(homedir2(), ".contextkit");
686
686
  var KIRO_CONFIG_DIR = process.env.KIRO_CONFIG_DIR || join2(homedir2(), ".kiro");
687
- var PLUGIN_ROOT = join2(KIRO_CONFIG_DIR, "plugins", "contextkit");
687
+ var PLUGIN_ROOT = join2(KIRO_CONFIG_DIR, "plugins", "kiro-memory");
688
688
  var ARCHIVES_DIR = join2(DATA_DIR, "archives");
689
689
  var LOGS_DIR = join2(DATA_DIR, "logs");
690
690
  var TRASH_DIR = join2(DATA_DIR, "trash");
@@ -704,7 +704,7 @@ function ensureDir(dirPath) {
704
704
  var SQLITE_MMAP_SIZE_BYTES = 256 * 1024 * 1024;
705
705
  var SQLITE_CACHE_SIZE_PAGES = 1e4;
706
706
  var dbInstance = null;
707
- var ContextKitDatabase = class {
707
+ var KiroMemoryDatabase = class {
708
708
  db;
709
709
  constructor(dbPath = DB_PATH) {
710
710
  if (dbPath !== ":memory:") {
@@ -1024,11 +1024,11 @@ init_Prompts();
1024
1024
  init_Search();
1025
1025
 
1026
1026
  // src/sdk/index.ts
1027
- var ContextKitSDK = class {
1027
+ var KiroMemorySDK = class {
1028
1028
  db;
1029
1029
  project;
1030
1030
  constructor(config = {}) {
1031
- this.db = new ContextKitDatabase(config.dataDir);
1031
+ this.db = new KiroMemoryDatabase(config.dataDir);
1032
1032
  this.project = config.project || this.detectProject();
1033
1033
  }
1034
1034
  detectProject() {
@@ -1128,7 +1128,7 @@ var ContextKitSDK = class {
1128
1128
  return getSummariesByProject2(this.db.db, this.project, limit);
1129
1129
  }
1130
1130
  /**
1131
- * Ricerca avanzata con FTS5 e filtri
1131
+ * Advanced search with FTS5 and filters
1132
1132
  */
1133
1133
  async searchAdvanced(query, filters = {}) {
1134
1134
  const { searchObservationsFTS: searchObservationsFTS2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
@@ -1140,21 +1140,21 @@ var ContextKitSDK = class {
1140
1140
  };
1141
1141
  }
1142
1142
  /**
1143
- * Recupera osservazioni per ID (batch)
1143
+ * Retrieve observations by ID (batch)
1144
1144
  */
1145
1145
  async getObservationsByIds(ids) {
1146
1146
  const { getObservationsByIds: getObservationsByIds2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1147
1147
  return getObservationsByIds2(this.db.db, ids);
1148
1148
  }
1149
1149
  /**
1150
- * Timeline: contesto cronologico attorno a un'osservazione
1150
+ * Timeline: chronological context around an observation
1151
1151
  */
1152
1152
  async getTimeline(anchorId, depthBefore = 5, depthAfter = 5) {
1153
1153
  const { getTimeline: getTimeline2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1154
1154
  return getTimeline2(this.db.db, anchorId, depthBefore, depthAfter);
1155
1155
  }
1156
1156
  /**
1157
- * Crea o recupera una sessione per il progetto corrente
1157
+ * Create or retrieve a session for the current project
1158
1158
  */
1159
1159
  async getOrCreateSession(contentSessionId) {
1160
1160
  const { getSessionByContentId: getSessionByContentId2, createSession: createSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
@@ -1177,27 +1177,27 @@ var ContextKitSDK = class {
1177
1177
  return session;
1178
1178
  }
1179
1179
  /**
1180
- * Salva un prompt utente
1180
+ * Store a user prompt
1181
1181
  */
1182
1182
  async storePrompt(contentSessionId, promptNumber, text) {
1183
1183
  const { createPrompt: createPrompt2 } = await Promise.resolve().then(() => (init_Prompts(), Prompts_exports));
1184
1184
  return createPrompt2(this.db.db, contentSessionId, this.project, promptNumber, text);
1185
1185
  }
1186
1186
  /**
1187
- * Completa una sessione
1187
+ * Complete a session
1188
1188
  */
1189
1189
  async completeSession(sessionId) {
1190
1190
  const { completeSession: completeSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
1191
1191
  completeSession2(this.db.db, sessionId);
1192
1192
  }
1193
1193
  /**
1194
- * Getter per il nome progetto corrente
1194
+ * Getter for current project name
1195
1195
  */
1196
1196
  getProject() {
1197
1197
  return this.project;
1198
1198
  }
1199
1199
  /**
1200
- * Getter per accesso diretto al database (per route API)
1200
+ * Getter for direct database access (for API routes)
1201
1201
  */
1202
1202
  getDb() {
1203
1203
  return this.db.db;
@@ -1209,9 +1209,11 @@ var ContextKitSDK = class {
1209
1209
  this.db.close();
1210
1210
  }
1211
1211
  };
1212
- function createContextKit(config) {
1213
- return new ContextKitSDK(config);
1212
+ function createKiroMemory(config) {
1213
+ return new KiroMemorySDK(config);
1214
1214
  }
1215
+ var ContextKitSDK = KiroMemorySDK;
1216
+ var createContextKit = createKiroMemory;
1215
1217
 
1216
1218
  // src/index.ts
1217
1219
  init_Search();
@@ -1321,12 +1323,15 @@ async function runHook(name, handler) {
1321
1323
  // src/index.ts
1322
1324
  var VERSION = "1.0.0";
1323
1325
  export {
1324
- ContextKitDatabase,
1326
+ KiroMemoryDatabase as ContextKitDatabase,
1325
1327
  ContextKitSDK,
1326
1328
  DatabaseManager,
1329
+ KiroMemoryDatabase,
1330
+ KiroMemorySDK,
1327
1331
  LogLevel,
1328
1332
  VERSION,
1329
1333
  createContextKit,
1334
+ createKiroMemory,
1330
1335
  detectProject,
1331
1336
  formatContext,
1332
1337
  getDatabase,
@@ -488,7 +488,7 @@ var Logger = class {
488
488
  mkdirSync(logsDir, { recursive: true });
489
489
  }
490
490
  const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
491
- this.logFilePath = join(logsDir, `contextkit-${date}.log`);
491
+ this.logFilePath = join(logsDir, `kiro-memory-${date}.log`);
492
492
  } catch (error) {
493
493
  console.error("[LOGGER] Failed to initialize log file:", error);
494
494
  this.logFilePath = null;
@@ -504,7 +504,7 @@ var Logger = class {
504
504
  if (existsSync(settingsPath)) {
505
505
  const settingsData = readFileSync(settingsPath, "utf-8");
506
506
  const settings = JSON.parse(settingsData);
507
- const envLevel = (settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
507
+ const envLevel = (settings.KIRO_MEMORY_LOG_LEVEL || settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
508
508
  this.level = LogLevel[envLevel] ?? 1 /* INFO */;
509
509
  } else {
510
510
  this.level = 1 /* INFO */;
@@ -682,9 +682,9 @@ function getDirname() {
682
682
  return dirname(fileURLToPath(import.meta.url));
683
683
  }
684
684
  var _dirname = getDirname();
685
- var DATA_DIR = process.env.CONTEXTKIT_DATA_DIR || join2(homedir2(), ".contextkit");
685
+ var DATA_DIR = process.env.KIRO_MEMORY_DATA_DIR || process.env.CONTEXTKIT_DATA_DIR || join2(homedir2(), ".contextkit");
686
686
  var KIRO_CONFIG_DIR = process.env.KIRO_CONFIG_DIR || join2(homedir2(), ".kiro");
687
- var PLUGIN_ROOT = join2(KIRO_CONFIG_DIR, "plugins", "contextkit");
687
+ var PLUGIN_ROOT = join2(KIRO_CONFIG_DIR, "plugins", "kiro-memory");
688
688
  var ARCHIVES_DIR = join2(DATA_DIR, "archives");
689
689
  var LOGS_DIR = join2(DATA_DIR, "logs");
690
690
  var TRASH_DIR = join2(DATA_DIR, "trash");
@@ -703,7 +703,7 @@ function ensureDir(dirPath) {
703
703
  // src/services/sqlite/Database.ts
704
704
  var SQLITE_MMAP_SIZE_BYTES = 256 * 1024 * 1024;
705
705
  var SQLITE_CACHE_SIZE_PAGES = 1e4;
706
- var ContextKitDatabase = class {
706
+ var KiroMemoryDatabase = class {
707
707
  db;
708
708
  constructor(dbPath = DB_PATH) {
709
709
  if (dbPath !== ":memory:") {
@@ -905,11 +905,11 @@ init_Prompts();
905
905
  init_Search();
906
906
 
907
907
  // src/sdk/index.ts
908
- var ContextKitSDK = class {
908
+ var KiroMemorySDK = class {
909
909
  db;
910
910
  project;
911
911
  constructor(config = {}) {
912
- this.db = new ContextKitDatabase(config.dataDir);
912
+ this.db = new KiroMemoryDatabase(config.dataDir);
913
913
  this.project = config.project || this.detectProject();
914
914
  }
915
915
  detectProject() {
@@ -1009,7 +1009,7 @@ var ContextKitSDK = class {
1009
1009
  return getSummariesByProject2(this.db.db, this.project, limit);
1010
1010
  }
1011
1011
  /**
1012
- * Ricerca avanzata con FTS5 e filtri
1012
+ * Advanced search with FTS5 and filters
1013
1013
  */
1014
1014
  async searchAdvanced(query, filters = {}) {
1015
1015
  const { searchObservationsFTS: searchObservationsFTS2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
@@ -1021,21 +1021,21 @@ var ContextKitSDK = class {
1021
1021
  };
1022
1022
  }
1023
1023
  /**
1024
- * Recupera osservazioni per ID (batch)
1024
+ * Retrieve observations by ID (batch)
1025
1025
  */
1026
1026
  async getObservationsByIds(ids) {
1027
1027
  const { getObservationsByIds: getObservationsByIds2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1028
1028
  return getObservationsByIds2(this.db.db, ids);
1029
1029
  }
1030
1030
  /**
1031
- * Timeline: contesto cronologico attorno a un'osservazione
1031
+ * Timeline: chronological context around an observation
1032
1032
  */
1033
1033
  async getTimeline(anchorId, depthBefore = 5, depthAfter = 5) {
1034
1034
  const { getTimeline: getTimeline2 } = await Promise.resolve().then(() => (init_Search(), Search_exports));
1035
1035
  return getTimeline2(this.db.db, anchorId, depthBefore, depthAfter);
1036
1036
  }
1037
1037
  /**
1038
- * Crea o recupera una sessione per il progetto corrente
1038
+ * Create or retrieve a session for the current project
1039
1039
  */
1040
1040
  async getOrCreateSession(contentSessionId) {
1041
1041
  const { getSessionByContentId: getSessionByContentId2, createSession: createSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
@@ -1058,27 +1058,27 @@ var ContextKitSDK = class {
1058
1058
  return session;
1059
1059
  }
1060
1060
  /**
1061
- * Salva un prompt utente
1061
+ * Store a user prompt
1062
1062
  */
1063
1063
  async storePrompt(contentSessionId, promptNumber, text) {
1064
1064
  const { createPrompt: createPrompt2 } = await Promise.resolve().then(() => (init_Prompts(), Prompts_exports));
1065
1065
  return createPrompt2(this.db.db, contentSessionId, this.project, promptNumber, text);
1066
1066
  }
1067
1067
  /**
1068
- * Completa una sessione
1068
+ * Complete a session
1069
1069
  */
1070
1070
  async completeSession(sessionId) {
1071
1071
  const { completeSession: completeSession2 } = await Promise.resolve().then(() => (init_Sessions(), Sessions_exports));
1072
1072
  completeSession2(this.db.db, sessionId);
1073
1073
  }
1074
1074
  /**
1075
- * Getter per il nome progetto corrente
1075
+ * Getter for current project name
1076
1076
  */
1077
1077
  getProject() {
1078
1078
  return this.project;
1079
1079
  }
1080
1080
  /**
1081
- * Getter per accesso diretto al database (per route API)
1081
+ * Getter for direct database access (for API routes)
1082
1082
  */
1083
1083
  getDb() {
1084
1084
  return this.db.db;
@@ -1090,10 +1090,14 @@ var ContextKitSDK = class {
1090
1090
  this.db.close();
1091
1091
  }
1092
1092
  };
1093
- function createContextKit(config) {
1094
- return new ContextKitSDK(config);
1093
+ function createKiroMemory(config) {
1094
+ return new KiroMemorySDK(config);
1095
1095
  }
1096
+ var ContextKitSDK = KiroMemorySDK;
1097
+ var createContextKit = createKiroMemory;
1096
1098
  export {
1097
1099
  ContextKitSDK,
1098
- createContextKit
1100
+ KiroMemorySDK,
1101
+ createContextKit,
1102
+ createKiroMemory
1099
1103
  };
@@ -8,9 +8,9 @@ import {
8
8
  CallToolRequestSchema,
9
9
  ListToolsRequestSchema
10
10
  } from "@modelcontextprotocol/sdk/types.js";
11
- console.log = (...args) => console.error("[contextkit-mcp]", ...args);
12
- var WORKER_HOST = process.env.CONTEXTKIT_WORKER_HOST || "127.0.0.1";
13
- var WORKER_PORT = process.env.CONTEXTKIT_WORKER_PORT || "3001";
11
+ console.log = (...args) => console.error("[kiro-memory-mcp]", ...args);
12
+ var WORKER_HOST = process.env.KIRO_MEMORY_WORKER_HOST || "127.0.0.1";
13
+ var WORKER_PORT = process.env.KIRO_MEMORY_WORKER_PORT || "3001";
14
14
  var WORKER_BASE = `http://${WORKER_HOST}:${WORKER_PORT}`;
15
15
  async function callWorkerGET(endpoint, params = {}) {
16
16
  const url = new URL(endpoint, WORKER_BASE);
@@ -35,41 +35,41 @@ async function callWorkerPOST(endpoint, body) {
35
35
  var TOOLS = [
36
36
  {
37
37
  name: "search",
38
- description: "Cerca nella memoria di ContextKit. Restituisce osservazioni e sommari che corrispondono alla query. Usa questo tool per trovare contesto da sessioni precedenti.",
38
+ description: "Search Kiro Memory. Returns observations and summaries matching the query. Use this tool to find context from previous sessions.",
39
39
  inputSchema: {
40
40
  type: "object",
41
41
  properties: {
42
- query: { type: "string", description: "Testo da cercare nelle osservazioni e sommari" },
43
- project: { type: "string", description: "Filtra per nome progetto (opzionale)" },
44
- type: { type: "string", description: "Filtra per tipo osservazione: file-write, command, research, tool-use (opzionale)" },
45
- limit: { type: "number", description: "Numero massimo risultati (default: 20)" }
42
+ query: { type: "string", description: "Text to search in observations and summaries" },
43
+ project: { type: "string", description: "Filter by project name (optional)" },
44
+ type: { type: "string", description: "Filter by observation type: file-write, command, research, tool-use (optional)" },
45
+ limit: { type: "number", description: "Max number of results (default: 20)" }
46
46
  },
47
47
  required: ["query"]
48
48
  }
49
49
  },
50
50
  {
51
51
  name: "timeline",
52
- description: "Mostra il contesto cronologico attorno a un'osservazione specifica. Utile per capire cosa \xE8 successo prima e dopo un evento.",
52
+ description: "Show chronological context around a specific observation. Useful to understand what happened before and after an event.",
53
53
  inputSchema: {
54
54
  type: "object",
55
55
  properties: {
56
- anchor: { type: "number", description: "ID dell'osservazione come punto di riferimento" },
57
- depth_before: { type: "number", description: "Numero di osservazioni prima (default: 5)" },
58
- depth_after: { type: "number", description: "Numero di osservazioni dopo (default: 5)" }
56
+ anchor: { type: "number", description: "Observation ID as reference point" },
57
+ depth_before: { type: "number", description: "Number of observations before (default: 5)" },
58
+ depth_after: { type: "number", description: "Number of observations after (default: 5)" }
59
59
  },
60
60
  required: ["anchor"]
61
61
  }
62
62
  },
63
63
  {
64
64
  name: "get_observations",
65
- description: 'Recupera i dettagli completi di osservazioni specifiche per ID. Usa dopo "search" per ottenere il contenuto completo.',
65
+ description: 'Retrieve full details of specific observations by ID. Use after "search" to get the complete content.',
66
66
  inputSchema: {
67
67
  type: "object",
68
68
  properties: {
69
69
  ids: {
70
70
  type: "array",
71
71
  items: { type: "number" },
72
- description: "Array di ID osservazioni da recuperare"
72
+ description: "Array of observation IDs to retrieve"
73
73
  }
74
74
  },
75
75
  required: ["ids"]
@@ -77,11 +77,11 @@ var TOOLS = [
77
77
  },
78
78
  {
79
79
  name: "get_context",
80
- description: "Recupera il contesto recente per un progetto: osservazioni, sommari e prompt recenti.",
80
+ description: "Retrieve recent context for a project: observations, summaries, and recent prompts.",
81
81
  inputSchema: {
82
82
  type: "object",
83
83
  properties: {
84
- project: { type: "string", description: "Nome del progetto" }
84
+ project: { type: "string", description: "Project name" }
85
85
  },
86
86
  required: ["project"]
87
87
  }
@@ -98,16 +98,16 @@ var handlers = {
98
98
  const obs = result.observations || [];
99
99
  const sums = result.summaries || [];
100
100
  if (obs.length === 0 && sums.length === 0) {
101
- return "Nessun risultato trovato per la query.";
101
+ return "No results found for the query.";
102
102
  }
103
- let output = `## Risultati ricerca: "${args.query}"
103
+ let output = `## Search Results: "${args.query}"
104
104
 
105
105
  `;
106
106
  if (obs.length > 0) {
107
- output += `### Osservazioni (${obs.length})
107
+ output += `### Observations (${obs.length})
108
108
 
109
109
  `;
110
- output += "| ID | Tipo | Titolo | Data |\n|---|---|---|---|\n";
110
+ output += "| ID | Type | Title | Date |\n|---|---|---|---|\n";
111
111
  obs.forEach((o) => {
112
112
  output += `| ${o.id} | ${o.type} | ${o.title} | ${o.created_at?.split("T")[0] || ""} |
113
113
  `;
@@ -115,13 +115,13 @@ var handlers = {
115
115
  output += "\n";
116
116
  }
117
117
  if (sums.length > 0) {
118
- output += `### Sommari (${sums.length})
118
+ output += `### Summaries (${sums.length})
119
119
 
120
120
  `;
121
121
  sums.forEach((s) => {
122
- if (s.learned) output += `- **Appreso**: ${s.learned}
122
+ if (s.learned) output += `- **Learned**: ${s.learned}
123
123
  `;
124
- if (s.completed) output += `- **Completato**: ${s.completed}
124
+ if (s.completed) output += `- **Completed**: ${s.completed}
125
125
  `;
126
126
  });
127
127
  }
@@ -135,9 +135,9 @@ var handlers = {
135
135
  });
136
136
  const entries = result.timeline || result || [];
137
137
  if (!Array.isArray(entries) || entries.length === 0) {
138
- return `Nessun contesto trovato attorno all'osservazione ${args.anchor}.`;
138
+ return `No context found around observation ${args.anchor}.`;
139
139
  }
140
- let output = `## Timeline attorno all'osservazione #${args.anchor}
140
+ let output = `## Timeline around observation #${args.anchor}
141
141
 
142
142
  `;
143
143
  entries.forEach((e) => {
@@ -154,29 +154,29 @@ var handlers = {
154
154
  const result = await callWorkerPOST("/api/observations/batch", { ids: args.ids });
155
155
  const obs = result.observations || result || [];
156
156
  if (!Array.isArray(obs) || obs.length === 0) {
157
- return "Nessuna osservazione trovata per gli ID specificati.";
157
+ return "No observations found for the specified IDs.";
158
158
  }
159
- let output = `## Dettagli Osservazioni
159
+ let output = `## Observation Details
160
160
 
161
161
  `;
162
162
  obs.forEach((o) => {
163
163
  output += `### #${o.id}: ${o.title}
164
164
  `;
165
- output += `- **Tipo**: ${o.type}
165
+ output += `- **Type**: ${o.type}
166
166
  `;
167
- output += `- **Progetto**: ${o.project}
167
+ output += `- **Project**: ${o.project}
168
168
  `;
169
- output += `- **Data**: ${o.created_at}
169
+ output += `- **Date**: ${o.created_at}
170
170
  `;
171
- if (o.text) output += `- **Contenuto**: ${o.text}
171
+ if (o.text) output += `- **Content**: ${o.text}
172
172
  `;
173
- if (o.narrative) output += `- **Narrativa**: ${o.narrative}
173
+ if (o.narrative) output += `- **Narrative**: ${o.narrative}
174
174
  `;
175
- if (o.concepts) output += `- **Concetti**: ${o.concepts}
175
+ if (o.concepts) output += `- **Concepts**: ${o.concepts}
176
176
  `;
177
- if (o.files_read) output += `- **File letti**: ${o.files_read}
177
+ if (o.files_read) output += `- **Files read**: ${o.files_read}
178
178
  `;
179
- if (o.files_modified) output += `- **File modificati**: ${o.files_modified}
179
+ if (o.files_modified) output += `- **Files modified**: ${o.files_modified}
180
180
  `;
181
181
  output += "\n";
182
182
  });
@@ -186,27 +186,27 @@ var handlers = {
186
186
  const result = await callWorkerGET(`/api/context/${encodeURIComponent(args.project)}`);
187
187
  const obs = result.observations || [];
188
188
  const sums = result.summaries || [];
189
- let output = `## Contesto: ${args.project}
189
+ let output = `## Context: ${args.project}
190
190
 
191
191
  `;
192
192
  if (sums.length > 0) {
193
- output += `### Sommari Recenti
193
+ output += `### Recent Summaries
194
194
 
195
195
  `;
196
196
  sums.forEach((s) => {
197
- if (s.request) output += `**Richiesta**: ${s.request}
197
+ if (s.request) output += `**Request**: ${s.request}
198
198
  `;
199
- if (s.learned) output += `- Appreso: ${s.learned}
199
+ if (s.learned) output += `- Learned: ${s.learned}
200
200
  `;
201
- if (s.completed) output += `- Completato: ${s.completed}
201
+ if (s.completed) output += `- Completed: ${s.completed}
202
202
  `;
203
- if (s.next_steps) output += `- Prossimi passi: ${s.next_steps}
203
+ if (s.next_steps) output += `- Next steps: ${s.next_steps}
204
204
 
205
205
  `;
206
206
  });
207
207
  }
208
208
  if (obs.length > 0) {
209
- output += `### Osservazioni Recenti (${obs.length})
209
+ output += `### Recent Observations (${obs.length})
210
210
 
211
211
  `;
212
212
  obs.slice(0, 10).forEach((o) => {
@@ -219,7 +219,7 @@ var handlers = {
219
219
  };
220
220
  async function main() {
221
221
  const server = new Server(
222
- { name: "contextkit", version: "1.0.0" },
222
+ { name: "kiro-memory", version: "1.0.0" },
223
223
  { capabilities: { tools: {} } }
224
224
  );
225
225
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
@@ -230,7 +230,7 @@ async function main() {
230
230
  const handler = handlers[name];
231
231
  if (!handler) {
232
232
  return {
233
- content: [{ type: "text", text: `Tool sconosciuto: ${name}` }],
233
+ content: [{ type: "text", text: `Unknown tool: ${name}` }],
234
234
  isError: true
235
235
  };
236
236
  }
@@ -245,23 +245,23 @@ async function main() {
245
245
  return {
246
246
  content: [{
247
247
  type: "text",
248
- text: `Worker ContextKit non raggiungibile su ${WORKER_BASE}.
249
- Avvia il worker con: cd <contextkit-dir> && npm run worker:start`
248
+ text: `Kiro Memory worker unreachable at ${WORKER_BASE}.
249
+ Start the worker with: cd <kiro-memory-dir> && npm run worker:start`
250
250
  }],
251
251
  isError: true
252
252
  };
253
253
  }
254
254
  return {
255
- content: [{ type: "text", text: `Errore: ${msg}` }],
255
+ content: [{ type: "text", text: `Error: ${msg}` }],
256
256
  isError: true
257
257
  };
258
258
  }
259
259
  });
260
260
  const transport = new StdioServerTransport();
261
261
  await server.connect(transport);
262
- console.log("ContextKit MCP server avviato su stdio");
262
+ console.log("Kiro Memory MCP server started on stdio");
263
263
  }
264
264
  main().catch((err) => {
265
- console.error("Errore avvio MCP server:", err);
265
+ console.error("MCP server startup error:", err);
266
266
  process.exit(1);
267
267
  });
@@ -39,7 +39,7 @@ var Logger = class {
39
39
  mkdirSync(logsDir, { recursive: true });
40
40
  }
41
41
  const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
42
- this.logFilePath = join(logsDir, `contextkit-${date}.log`);
42
+ this.logFilePath = join(logsDir, `kiro-memory-${date}.log`);
43
43
  } catch (error) {
44
44
  console.error("[LOGGER] Failed to initialize log file:", error);
45
45
  this.logFilePath = null;
@@ -55,7 +55,7 @@ var Logger = class {
55
55
  if (existsSync(settingsPath)) {
56
56
  const settingsData = readFileSync(settingsPath, "utf-8");
57
57
  const settings = JSON.parse(settingsData);
58
- const envLevel = (settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
58
+ const envLevel = (settings.KIRO_MEMORY_LOG_LEVEL || settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
59
59
  this.level = LogLevel[envLevel] ?? 1 /* INFO */;
60
60
  } else {
61
61
  this.level = 1 /* INFO */;
@@ -246,8 +246,8 @@ var ChromaManager = class {
246
246
  try {
247
247
  await this.client.heartbeat();
248
248
  this.collection = await this.client.getOrCreateCollection({
249
- name: "contextkit-observations",
250
- metadata: { description: "ContextKit observation embeddings" }
249
+ name: "kiro-memory-observations",
250
+ metadata: { description: "Kiro Memory observation embeddings" }
251
251
  });
252
252
  this.isAvailable = true;
253
253
  logger.info("CHROMA", "ChromaDB initialized successfully");
@@ -101,7 +101,7 @@ var Logger = class {
101
101
  mkdirSync(logsDir, { recursive: true });
102
102
  }
103
103
  const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
104
- this.logFilePath = join(logsDir, `contextkit-${date}.log`);
104
+ this.logFilePath = join(logsDir, `kiro-memory-${date}.log`);
105
105
  } catch (error) {
106
106
  console.error("[LOGGER] Failed to initialize log file:", error);
107
107
  this.logFilePath = null;
@@ -117,7 +117,7 @@ var Logger = class {
117
117
  if (existsSync(settingsPath)) {
118
118
  const settingsData = readFileSync(settingsPath, "utf-8");
119
119
  const settings = JSON.parse(settingsData);
120
- const envLevel = (settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
120
+ const envLevel = (settings.KIRO_MEMORY_LOG_LEVEL || settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
121
121
  this.level = LogLevel[envLevel] ?? 1 /* INFO */;
122
122
  } else {
123
123
  this.level = 1 /* INFO */;
@@ -308,8 +308,8 @@ var ChromaManager = class {
308
308
  try {
309
309
  await this.client.heartbeat();
310
310
  this.collection = await this.client.getOrCreateCollection({
311
- name: "contextkit-observations",
312
- metadata: { description: "ContextKit observation embeddings" }
311
+ name: "kiro-memory-observations",
312
+ metadata: { description: "Kiro Memory observation embeddings" }
313
313
  });
314
314
  this.isAvailable = true;
315
315
  logger.info("CHROMA", "ChromaDB initialized successfully");
@@ -101,7 +101,7 @@ var Logger = class {
101
101
  mkdirSync(logsDir, { recursive: true });
102
102
  }
103
103
  const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
104
- this.logFilePath = join(logsDir, `contextkit-${date}.log`);
104
+ this.logFilePath = join(logsDir, `kiro-memory-${date}.log`);
105
105
  } catch (error) {
106
106
  console.error("[LOGGER] Failed to initialize log file:", error);
107
107
  this.logFilePath = null;
@@ -117,7 +117,7 @@ var Logger = class {
117
117
  if (existsSync(settingsPath)) {
118
118
  const settingsData = readFileSync(settingsPath, "utf-8");
119
119
  const settings = JSON.parse(settingsData);
120
- const envLevel = (settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
120
+ const envLevel = (settings.KIRO_MEMORY_LOG_LEVEL || settings.CONTEXTKIT_LOG_LEVEL || "INFO").toUpperCase();
121
121
  this.level = LogLevel[envLevel] ?? 1 /* INFO */;
122
122
  } else {
123
123
  this.level = 1 /* INFO */;
@@ -308,8 +308,8 @@ var ChromaManager = class {
308
308
  try {
309
309
  await this.client.heartbeat();
310
310
  this.collection = await this.client.getOrCreateCollection({
311
- name: "contextkit-observations",
312
- metadata: { description: "ContextKit observation embeddings" }
311
+ name: "kiro-memory-observations",
312
+ metadata: { description: "Kiro Memory observation embeddings" }
313
313
  });
314
314
  this.isAvailable = true;
315
315
  logger.info("CHROMA", "ChromaDB initialized successfully");