kiro-memory 1.2.0 → 1.2.2
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/package.json +1 -1
- package/plugin/dist/cli/contextkit.js +167 -59
package/package.json
CHANGED
|
@@ -1082,16 +1082,63 @@ function createContextKit(config) {
|
|
|
1082
1082
|
|
|
1083
1083
|
// src/cli/contextkit.ts
|
|
1084
1084
|
import { execSync } from "child_process";
|
|
1085
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync2, writeFileSync,
|
|
1085
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync2, writeFileSync, appendFileSync as appendFileSync2 } from "fs";
|
|
1086
1086
|
import { join as join3, dirname as dirname2 } from "path";
|
|
1087
1087
|
import { homedir as homedir3, platform, release } from "os";
|
|
1088
1088
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
1089
|
+
import { createInterface } from "readline";
|
|
1089
1090
|
var args = process.argv.slice(2);
|
|
1090
1091
|
var command = args[0];
|
|
1091
1092
|
var __filename = fileURLToPath2(import.meta.url);
|
|
1092
1093
|
var __dirname2 = dirname2(__filename);
|
|
1093
1094
|
var DIST_DIR = dirname2(__dirname2);
|
|
1094
|
-
var
|
|
1095
|
+
var AGENT_TEMPLATE = JSON.stringify({
|
|
1096
|
+
name: "contextkit-memory",
|
|
1097
|
+
description: "Agent with persistent cross-session memory. Uses ContextKit to remember context from previous sessions and automatically save what it learns.",
|
|
1098
|
+
model: "claude-sonnet-4",
|
|
1099
|
+
tools: ["read", "write", "shell", "glob", "grep", "web_search", "web_fetch", "@contextkit"],
|
|
1100
|
+
mcpServers: {
|
|
1101
|
+
contextkit: {
|
|
1102
|
+
command: "node",
|
|
1103
|
+
args: ["__DIST_DIR__/servers/mcp-server.js"]
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
hooks: {
|
|
1107
|
+
agentSpawn: [{ command: "node __DIST_DIR__/hooks/agentSpawn.js", timeout_ms: 1e4 }],
|
|
1108
|
+
userPromptSubmit: [{ command: "node __DIST_DIR__/hooks/userPromptSubmit.js", timeout_ms: 5e3 }],
|
|
1109
|
+
postToolUse: [{ command: "node __DIST_DIR__/hooks/postToolUse.js", matcher: "*", timeout_ms: 5e3 }],
|
|
1110
|
+
stop: [{ command: "node __DIST_DIR__/hooks/stop.js", timeout_ms: 1e4 }]
|
|
1111
|
+
},
|
|
1112
|
+
resources: ["file://.kiro/steering/contextkit.md"]
|
|
1113
|
+
}, null, 2);
|
|
1114
|
+
var STEERING_CONTENT = `# ContextKit - Persistent Memory
|
|
1115
|
+
|
|
1116
|
+
You have access to ContextKit, a persistent cross-session memory system.
|
|
1117
|
+
|
|
1118
|
+
## Available MCP Tools
|
|
1119
|
+
|
|
1120
|
+
### @contextkit/search
|
|
1121
|
+
Search previous session memory. Use when:
|
|
1122
|
+
- The user mentions past work
|
|
1123
|
+
- You need context on previous decisions
|
|
1124
|
+
- You want to check if a problem was already addressed
|
|
1125
|
+
|
|
1126
|
+
### @contextkit/get_context
|
|
1127
|
+
Retrieve recent context for the current project. Use at the start of complex tasks to understand what was done before.
|
|
1128
|
+
|
|
1129
|
+
### @contextkit/timeline
|
|
1130
|
+
Show chronological context around an observation. Use to understand the sequence of events.
|
|
1131
|
+
|
|
1132
|
+
### @contextkit/get_observations
|
|
1133
|
+
Retrieve full details of specific observations. Use after \`search\` to drill down.
|
|
1134
|
+
|
|
1135
|
+
## Behavior
|
|
1136
|
+
|
|
1137
|
+
- Previous session context is automatically injected at startup
|
|
1138
|
+
- Your actions (files written, commands run) are tracked automatically
|
|
1139
|
+
- A summary is generated at the end of each session
|
|
1140
|
+
- No manual saving needed: the system is fully automatic
|
|
1141
|
+
`;
|
|
1095
1142
|
function isWSL() {
|
|
1096
1143
|
try {
|
|
1097
1144
|
const rel = release().toLowerCase();
|
|
@@ -1113,44 +1160,58 @@ function commandExists(cmd) {
|
|
|
1113
1160
|
return false;
|
|
1114
1161
|
}
|
|
1115
1162
|
}
|
|
1163
|
+
function isWindowsPath(p) {
|
|
1164
|
+
return p.startsWith("/mnt/c") || p.startsWith("/mnt/d") || /^[A-Za-z]:[\\\/]/.test(p);
|
|
1165
|
+
}
|
|
1116
1166
|
function runEnvironmentChecks() {
|
|
1117
1167
|
const checks = [];
|
|
1118
1168
|
const wsl = isWSL();
|
|
1119
1169
|
const os = platform();
|
|
1120
1170
|
checks.push({
|
|
1121
|
-
name: "
|
|
1171
|
+
name: "Operating system",
|
|
1122
1172
|
ok: os === "linux" || os === "darwin",
|
|
1123
|
-
message: os === "linux" ? wsl ? "Linux (WSL)" : "Linux" : os === "darwin" ? "macOS" : `${os} (
|
|
1173
|
+
message: os === "linux" ? wsl ? "Linux (WSL)" : "Linux" : os === "darwin" ? "macOS" : `${os} (not officially supported)`
|
|
1124
1174
|
});
|
|
1125
1175
|
if (wsl) {
|
|
1126
1176
|
const nodePath = process.execPath;
|
|
1127
|
-
const nodeOnWindows =
|
|
1177
|
+
const nodeOnWindows = isWindowsPath(nodePath);
|
|
1128
1178
|
checks.push({
|
|
1129
|
-
name: "WSL: Node.js
|
|
1179
|
+
name: "WSL: Native Node.js",
|
|
1130
1180
|
ok: !nodeOnWindows,
|
|
1131
|
-
message: nodeOnWindows ? `Node.js
|
|
1132
|
-
fix: nodeOnWindows ? "
|
|
1181
|
+
message: nodeOnWindows ? `Node.js points to Windows: ${nodePath}` : `Native Linux Node.js: ${nodePath}`,
|
|
1182
|
+
fix: nodeOnWindows ? "Install Node.js inside WSL:\n curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -\n sudo apt-get install -y nodejs\n Or use nvm: https://github.com/nvm-sh/nvm" : void 0
|
|
1133
1183
|
});
|
|
1134
1184
|
try {
|
|
1135
1185
|
const npmPrefix = execSync("npm prefix -g", { encoding: "utf8" }).trim();
|
|
1136
|
-
const prefixOnWindows =
|
|
1186
|
+
const prefixOnWindows = isWindowsPath(npmPrefix);
|
|
1137
1187
|
checks.push({
|
|
1138
1188
|
name: "WSL: npm global prefix",
|
|
1139
1189
|
ok: !prefixOnWindows,
|
|
1140
|
-
message: prefixOnWindows ? `npm global prefix
|
|
1141
|
-
fix: prefixOnWindows ? `
|
|
1190
|
+
message: prefixOnWindows ? `npm global prefix points to Windows: ${npmPrefix}` : `npm global prefix: ${npmPrefix}`,
|
|
1191
|
+
fix: prefixOnWindows ? `Fix npm prefix:
|
|
1142
1192
|
mkdir -p ~/.npm-global
|
|
1143
1193
|
npm config set prefix ~/.npm-global
|
|
1144
1194
|
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
|
|
1145
1195
|
source ~/.bashrc
|
|
1146
|
-
|
|
1196
|
+
Then reinstall: npm install -g kiro-memory` : void 0
|
|
1147
1197
|
});
|
|
1148
1198
|
} catch {
|
|
1149
1199
|
checks.push({
|
|
1150
1200
|
name: "WSL: npm global prefix",
|
|
1151
1201
|
ok: false,
|
|
1152
|
-
message: "
|
|
1202
|
+
message: "Unable to determine npm prefix"
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
try {
|
|
1206
|
+
const npmPath = execSync("which npm", { encoding: "utf8" }).trim();
|
|
1207
|
+
const npmOnWindows = isWindowsPath(npmPath);
|
|
1208
|
+
checks.push({
|
|
1209
|
+
name: "WSL: npm binary",
|
|
1210
|
+
ok: !npmOnWindows,
|
|
1211
|
+
message: npmOnWindows ? `npm is the Windows version: ${npmPath}` : `Native Linux npm: ${npmPath}`,
|
|
1212
|
+
fix: npmOnWindows ? "Your npm binary is the Windows version running inside WSL.\n This causes EPERM/UNC errors when installing packages.\n Install Node.js (includes npm) natively in WSL:\n curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash\n source ~/.bashrc\n nvm install 22\n Or:\n curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -\n sudo apt-get install -y nodejs" : void 0
|
|
1153
1213
|
});
|
|
1214
|
+
} catch {
|
|
1154
1215
|
}
|
|
1155
1216
|
}
|
|
1156
1217
|
const nodeVersion = parseInt(process.versions.node.split(".")[0]);
|
|
@@ -1158,22 +1219,22 @@ function runEnvironmentChecks() {
|
|
|
1158
1219
|
name: "Node.js >= 18",
|
|
1159
1220
|
ok: nodeVersion >= 18,
|
|
1160
1221
|
message: `Node.js v${process.versions.node}`,
|
|
1161
|
-
fix: nodeVersion < 18 ? "
|
|
1222
|
+
fix: nodeVersion < 18 ? "Upgrade Node.js:\n nvm install 22 && nvm use 22\n Or visit: https://nodejs.org/" : void 0
|
|
1162
1223
|
});
|
|
1163
1224
|
let sqliteOk = false;
|
|
1164
1225
|
let sqliteMsg = "";
|
|
1165
1226
|
try {
|
|
1166
1227
|
__require("better-sqlite3");
|
|
1167
1228
|
sqliteOk = true;
|
|
1168
|
-
sqliteMsg = "
|
|
1229
|
+
sqliteMsg = "Native module loaded successfully";
|
|
1169
1230
|
} catch (err) {
|
|
1170
|
-
sqliteMsg = err.code === "ERR_DLOPEN_FAILED" ? "
|
|
1231
|
+
sqliteMsg = err.code === "ERR_DLOPEN_FAILED" ? "Incompatible native binary (invalid ELF header \u2014 likely platform mismatch)" : `Error: ${err.message}`;
|
|
1171
1232
|
}
|
|
1172
1233
|
checks.push({
|
|
1173
1234
|
name: "better-sqlite3",
|
|
1174
1235
|
ok: sqliteOk,
|
|
1175
1236
|
message: sqliteMsg,
|
|
1176
|
-
fix: !sqliteOk ? wsl ? "In WSL,
|
|
1237
|
+
fix: !sqliteOk ? wsl ? "In WSL, rebuild the native module:\n npm rebuild better-sqlite3\n If that fails, reinstall:\n npm install -g kiro-memory --build-from-source" : "Rebuild the native module:\n npm rebuild better-sqlite3" : void 0
|
|
1177
1238
|
});
|
|
1178
1239
|
if (os === "linux") {
|
|
1179
1240
|
const hasMake = commandExists("make");
|
|
@@ -1184,12 +1245,12 @@ function runEnvironmentChecks() {
|
|
|
1184
1245
|
if (!hasMake || !hasGcc) missing.push("build-essential");
|
|
1185
1246
|
if (!hasPython) missing.push("python3");
|
|
1186
1247
|
checks.push({
|
|
1187
|
-
name: "Build tools (
|
|
1248
|
+
name: "Build tools (native modules)",
|
|
1188
1249
|
ok: allPresent,
|
|
1189
|
-
message: allPresent ? "make, g++, python3
|
|
1190
|
-
fix: !allPresent ? `
|
|
1250
|
+
message: allPresent ? "make, g++, python3 available" : `Missing: ${missing.join(", ")}`,
|
|
1251
|
+
fix: !allPresent ? `Install required packages:
|
|
1191
1252
|
sudo apt-get update && sudo apt-get install -y ${missing.join(" ")}
|
|
1192
|
-
|
|
1253
|
+
Then reinstall: npm install -g kiro-memory --build-from-source` : void 0
|
|
1193
1254
|
});
|
|
1194
1255
|
}
|
|
1195
1256
|
return checks;
|
|
@@ -1211,35 +1272,42 @@ function printChecks(checks) {
|
|
|
1211
1272
|
console.log("");
|
|
1212
1273
|
return { hasErrors };
|
|
1213
1274
|
}
|
|
1275
|
+
function askUser(question) {
|
|
1276
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
1277
|
+
return new Promise((resolve) => {
|
|
1278
|
+
rl.question(question, (answer) => {
|
|
1279
|
+
rl.close();
|
|
1280
|
+
resolve(answer.trim().toLowerCase());
|
|
1281
|
+
});
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
function detectShellRc() {
|
|
1285
|
+
const shell = process.env.SHELL || "/bin/bash";
|
|
1286
|
+
if (shell.includes("zsh")) return { name: "zsh", rcFile: join3(homedir3(), ".zshrc") };
|
|
1287
|
+
if (shell.includes("fish")) return { name: "fish", rcFile: join3(homedir3(), ".config/fish/config.fish") };
|
|
1288
|
+
return { name: "bash", rcFile: join3(homedir3(), ".bashrc") };
|
|
1289
|
+
}
|
|
1214
1290
|
async function installKiro() {
|
|
1215
|
-
console.log("\n=== Kiro Memory -
|
|
1216
|
-
console.log("[1/3]
|
|
1291
|
+
console.log("\n=== Kiro Memory - Installation ===\n");
|
|
1292
|
+
console.log("[1/3] Running environment checks...");
|
|
1217
1293
|
const checks = runEnvironmentChecks();
|
|
1218
1294
|
const { hasErrors } = printChecks(checks);
|
|
1219
1295
|
if (hasErrors) {
|
|
1220
|
-
console.log("\x1B[
|
|
1221
|
-
console.log("
|
|
1296
|
+
console.log("\x1B[31mInstallation aborted.\x1B[0m Fix the issues above and retry.");
|
|
1297
|
+
console.log("After fixing, run: kiro-memory install\n");
|
|
1222
1298
|
process.exit(1);
|
|
1223
1299
|
}
|
|
1224
1300
|
const distDir = DIST_DIR;
|
|
1225
|
-
const agentTemplatePath = join3(PROJECT_ROOT, "kiro-agent", "contextkit.json");
|
|
1226
|
-
const steeringSourcePath = join3(PROJECT_ROOT, "kiro-agent", "steering.md");
|
|
1227
|
-
if (!existsSync3(agentTemplatePath)) {
|
|
1228
|
-
console.error(`\x1B[31mErrore:\x1B[0m Template agent non trovato: ${agentTemplatePath}`);
|
|
1229
|
-
console.error("Prova a reinstallare: npm install -g kiro-memory");
|
|
1230
|
-
process.exit(1);
|
|
1231
|
-
}
|
|
1232
1301
|
const kiroDir = process.env.KIRO_CONFIG_DIR || join3(homedir3(), ".kiro");
|
|
1233
1302
|
const agentsDir = join3(kiroDir, "agents");
|
|
1234
1303
|
const settingsDir = join3(kiroDir, "settings");
|
|
1235
1304
|
const steeringDir = join3(kiroDir, "steering");
|
|
1236
1305
|
const dataDir = process.env.CONTEXTKIT_DATA_DIR || join3(homedir3(), ".contextkit");
|
|
1237
|
-
console.log("[2/3]
|
|
1306
|
+
console.log("[2/3] Installing Kiro configuration...\n");
|
|
1238
1307
|
for (const dir of [agentsDir, settingsDir, steeringDir, dataDir]) {
|
|
1239
1308
|
mkdirSync3(dir, { recursive: true });
|
|
1240
1309
|
}
|
|
1241
|
-
const
|
|
1242
|
-
const agentConfig = agentTemplate.replace(/__CONTEXTKIT_DIST__/g, distDir);
|
|
1310
|
+
const agentConfig = AGENT_TEMPLATE.replace(/__DIST_DIR__/g, distDir);
|
|
1243
1311
|
const agentDestPath = join3(agentsDir, "contextkit.json");
|
|
1244
1312
|
writeFileSync(agentDestPath, agentConfig, "utf8");
|
|
1245
1313
|
console.log(` \u2192 Agent config: ${agentDestPath}`);
|
|
@@ -1259,33 +1327,73 @@ async function installKiro() {
|
|
|
1259
1327
|
writeFileSync(mcpFilePath, JSON.stringify(mcpConfig, null, 2), "utf8");
|
|
1260
1328
|
console.log(` \u2192 MCP config: ${mcpFilePath}`);
|
|
1261
1329
|
const steeringDestPath = join3(steeringDir, "contextkit.md");
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
console.log(` \u2192 Steering: ${steeringDestPath}`);
|
|
1265
|
-
}
|
|
1330
|
+
writeFileSync(steeringDestPath, STEERING_CONTENT, "utf8");
|
|
1331
|
+
console.log(` \u2192 Steering: ${steeringDestPath}`);
|
|
1266
1332
|
console.log(` \u2192 Data dir: ${dataDir}`);
|
|
1267
|
-
console.log("\n[3/3]
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1333
|
+
console.log("\n[3/3] Shell alias setup\n");
|
|
1334
|
+
const { name: shellName, rcFile } = detectShellRc();
|
|
1335
|
+
const aliasLine = 'alias kiro="kiro-cli --agent contextkit-memory"';
|
|
1336
|
+
let aliasAlreadySet = false;
|
|
1337
|
+
if (existsSync3(rcFile)) {
|
|
1338
|
+
const rcContent = readFileSync2(rcFile, "utf8");
|
|
1339
|
+
aliasAlreadySet = rcContent.includes("alias kiro=") && rcContent.includes("contextkit-memory");
|
|
1340
|
+
}
|
|
1341
|
+
if (aliasAlreadySet) {
|
|
1342
|
+
console.log(` \x1B[32m\u2713\x1B[0m Alias already configured in ${rcFile}`);
|
|
1343
|
+
} else {
|
|
1344
|
+
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");
|
|
1345
|
+
console.log(" \x1B[36m\u2502\x1B[0m Without an alias, you must type every time: \x1B[36m\u2502\x1B[0m");
|
|
1346
|
+
console.log(" \x1B[36m\u2502\x1B[0m \x1B[2mkiro-cli --agent contextkit-memory\x1B[0m \x1B[36m\u2502\x1B[0m");
|
|
1347
|
+
console.log(" \x1B[36m\u2502\x1B[0m \x1B[36m\u2502\x1B[0m");
|
|
1348
|
+
console.log(" \x1B[36m\u2502\x1B[0m With the alias, just type: \x1B[36m\u2502\x1B[0m");
|
|
1349
|
+
console.log(" \x1B[36m\u2502\x1B[0m \x1B[1m\x1B[32mkiro\x1B[0m \x1B[36m\u2502\x1B[0m");
|
|
1350
|
+
console.log(" \x1B[36m\u2514\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\u2518\x1B[0m");
|
|
1351
|
+
console.log("");
|
|
1352
|
+
const answer = await askUser(` Add alias to ${rcFile}? [Y/n] `);
|
|
1353
|
+
if (answer === "" || answer === "y" || answer === "yes") {
|
|
1354
|
+
try {
|
|
1355
|
+
appendFileSync2(rcFile, `
|
|
1356
|
+
# Kiro Memory \u2014 persistent memory alias
|
|
1357
|
+
${aliasLine}
|
|
1358
|
+
`);
|
|
1359
|
+
console.log(`
|
|
1360
|
+
\x1B[32m\u2713\x1B[0m Alias added to ${rcFile}`);
|
|
1361
|
+
console.log(` \x1B[33m\u2192\x1B[0m Run \x1B[1msource ${rcFile}\x1B[0m or open a new terminal to activate it.`);
|
|
1362
|
+
} catch (err) {
|
|
1363
|
+
console.log(`
|
|
1364
|
+
\x1B[31m\u2717\x1B[0m Could not write to ${rcFile}: ${err.message}`);
|
|
1365
|
+
console.log(` \x1B[33m\u2192\x1B[0m Add manually: ${aliasLine}`);
|
|
1366
|
+
}
|
|
1367
|
+
} else {
|
|
1368
|
+
console.log(`
|
|
1369
|
+
Skipped. You can add it manually later:`);
|
|
1370
|
+
console.log(` echo '${aliasLine}' >> ${rcFile}`);
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
console.log("\n\x1B[32m\u2550\u2550\u2550 Installation complete! \u2550\u2550\u2550\x1B[0m\n");
|
|
1374
|
+
console.log(" Start Kiro with memory:");
|
|
1375
|
+
if (aliasAlreadySet) {
|
|
1376
|
+
console.log(" \x1B[1mkiro\x1B[0m");
|
|
1377
|
+
} else {
|
|
1378
|
+
console.log(" \x1B[1mkiro-cli --agent contextkit-memory\x1B[0m");
|
|
1379
|
+
}
|
|
1380
|
+
console.log("");
|
|
1381
|
+
console.log(" The worker starts automatically when a Kiro session begins.");
|
|
1382
|
+
console.log(` Web dashboard: \x1B[4mhttp://localhost:3001\x1B[0m
|
|
1275
1383
|
`);
|
|
1276
1384
|
}
|
|
1277
1385
|
async function runDoctor() {
|
|
1278
|
-
console.log("\n=== Kiro Memory -
|
|
1386
|
+
console.log("\n=== Kiro Memory - Diagnostics ===");
|
|
1279
1387
|
const checks = runEnvironmentChecks();
|
|
1280
1388
|
const kiroDir = process.env.KIRO_CONFIG_DIR || join3(homedir3(), ".kiro");
|
|
1281
1389
|
const agentPath = join3(kiroDir, "agents", "contextkit.json");
|
|
1282
1390
|
const mcpPath = join3(kiroDir, "settings", "mcp.json");
|
|
1283
1391
|
const dataDir = process.env.CONTEXTKIT_DATA_DIR || join3(homedir3(), ".contextkit");
|
|
1284
1392
|
checks.push({
|
|
1285
|
-
name: "
|
|
1393
|
+
name: "Kiro agent config",
|
|
1286
1394
|
ok: existsSync3(agentPath),
|
|
1287
|
-
message: existsSync3(agentPath) ? agentPath : "
|
|
1288
|
-
fix: !existsSync3(agentPath) ? "
|
|
1395
|
+
message: existsSync3(agentPath) ? agentPath : "Not found",
|
|
1396
|
+
fix: !existsSync3(agentPath) ? "Run: kiro-memory install" : void 0
|
|
1289
1397
|
});
|
|
1290
1398
|
let mcpOk = false;
|
|
1291
1399
|
if (existsSync3(mcpPath)) {
|
|
@@ -1296,15 +1404,15 @@ async function runDoctor() {
|
|
|
1296
1404
|
}
|
|
1297
1405
|
}
|
|
1298
1406
|
checks.push({
|
|
1299
|
-
name: "MCP server
|
|
1407
|
+
name: "MCP server configured",
|
|
1300
1408
|
ok: mcpOk,
|
|
1301
|
-
message: mcpOk ? "contextkit
|
|
1302
|
-
fix: !mcpOk ? "
|
|
1409
|
+
message: mcpOk ? "contextkit registered in mcp.json" : "Not configured",
|
|
1410
|
+
fix: !mcpOk ? "Run: kiro-memory install" : void 0
|
|
1303
1411
|
});
|
|
1304
1412
|
checks.push({
|
|
1305
1413
|
name: "Data directory",
|
|
1306
1414
|
ok: existsSync3(dataDir),
|
|
1307
|
-
message: existsSync3(dataDir) ? dataDir : "
|
|
1415
|
+
message: existsSync3(dataDir) ? dataDir : "Not created (will be created on first use)"
|
|
1308
1416
|
});
|
|
1309
1417
|
let workerOk = false;
|
|
1310
1418
|
try {
|
|
@@ -1319,15 +1427,15 @@ async function runDoctor() {
|
|
|
1319
1427
|
checks.push({
|
|
1320
1428
|
name: "Worker service",
|
|
1321
1429
|
ok: true,
|
|
1322
|
-
// Non
|
|
1323
|
-
message: workerOk ? "
|
|
1430
|
+
// Non-blocking: starts automatically with Kiro
|
|
1431
|
+
message: workerOk ? "Running on port 3001" : "Not running (starts automatically with Kiro)"
|
|
1324
1432
|
});
|
|
1325
1433
|
const { hasErrors } = printChecks(checks);
|
|
1326
1434
|
if (hasErrors) {
|
|
1327
|
-
console.log("
|
|
1435
|
+
console.log("Some checks failed. Fix the issues listed above.\n");
|
|
1328
1436
|
process.exit(1);
|
|
1329
1437
|
} else {
|
|
1330
|
-
console.log("
|
|
1438
|
+
console.log("All good! Kiro Memory is ready.\n");
|
|
1331
1439
|
}
|
|
1332
1440
|
}
|
|
1333
1441
|
async function main() {
|