kiro-memory 1.1.0 → 1.1.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/README.md +19 -7
- package/package.json +1 -1
- package/plugin/dist/cli/contextkit.js +1 -0
- package/plugin/dist/hooks/agentSpawn.js +1 -0
- package/plugin/dist/hooks/kiro-hooks.js +1 -0
- package/plugin/dist/hooks/postToolUse.js +18 -0
- package/plugin/dist/hooks/stop.js +18 -0
- package/plugin/dist/hooks/userPromptSubmit.js +18 -0
- package/plugin/dist/index.js +3 -797
- package/plugin/dist/sdk/index.js +1 -0
- package/plugin/dist/servers/mcp-server.js +1 -0
- package/plugin/dist/services/search/ChromaManager.js +2 -0
- package/plugin/dist/services/search/HybridSearch.js +1 -0
- package/plugin/dist/services/search/index.js +1 -0
- package/plugin/dist/services/sqlite/Database.js +2 -0
- package/plugin/dist/services/sqlite/Observations.js +2 -0
- package/plugin/dist/services/sqlite/Prompts.js +2 -0
- package/plugin/dist/services/sqlite/Search.js +2 -0
- package/plugin/dist/services/sqlite/Sessions.js +2 -0
- package/plugin/dist/services/sqlite/Summaries.js +2 -0
- package/plugin/dist/services/sqlite/index.js +2 -0
- package/plugin/dist/shared/paths.js +2 -0
- package/plugin/dist/types/worker-types.js +1 -0
- package/plugin/dist/utils/logger.js +2 -0
- package/plugin/dist/worker-service.js +12 -793
package/README.md
CHANGED
|
@@ -38,6 +38,8 @@ When a new session starts, Kiro Memory automatically injects previous session co
|
|
|
38
38
|
- **Prompt Tracking** -- Every user prompt recorded for continuity (`userPromptSubmit` hook)
|
|
39
39
|
- **Tool & File Monitoring** -- File writes, command executions, and tool usage captured in real time (`postToolUse` hook)
|
|
40
40
|
- **Session Summaries** -- Structured summaries generated when sessions end (`stop` hook)
|
|
41
|
+
- **Web Dashboard** -- Real-time viewer at `http://localhost:3001` with dark/light theme, search, project filters, and live updates via SSE
|
|
42
|
+
- **Auto-Start Worker** -- The background worker starts automatically when a Kiro session begins (no manual setup required)
|
|
41
43
|
- **MCP Server** -- 4 tools (`search`, `timeline`, `get_observations`, `get_context`) exposed via Model Context Protocol
|
|
42
44
|
- **Full-Text Search** -- SQLite FTS5 for fast, typo-tolerant search across all stored context
|
|
43
45
|
- **TypeScript SDK** -- Programmatic access to the entire memory system
|
|
@@ -62,11 +64,7 @@ npm install && npm run build
|
|
|
62
64
|
npm run install:kiro
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npm run worker:start
|
|
69
|
-
```
|
|
67
|
+
Use Kiro as usual -- Kiro Memory runs entirely in the background. The worker auto-starts when a session begins, and the web dashboard is available at `http://localhost:3001`.
|
|
70
68
|
|
|
71
69
|
## Kiro Integration
|
|
72
70
|
|
|
@@ -108,12 +106,17 @@ The hooks are fully automatic. No changes to your workflow required.
|
|
|
108
106
|
Worker HTTP MCP Server
|
|
109
107
|
(port 3001) (stdio)
|
|
110
108
|
| |
|
|
111
|
-
|
|
109
|
+
Web Dashboard |
|
|
110
|
+
(localhost:3001) |
|
|
111
|
+
| |
|
|
112
|
+
+------+-----+
|
|
112
113
|
|
|
|
113
114
|
SQLite + FTS5
|
|
114
115
|
(~/.kiro-memory/kiro-memory.db)
|
|
115
116
|
```
|
|
116
117
|
|
|
118
|
+
> The worker auto-starts when `agentSpawn` fires. No manual setup required.
|
|
119
|
+
|
|
117
120
|
### Hooks
|
|
118
121
|
|
|
119
122
|
| Hook | Trigger | Purpose |
|
|
@@ -242,7 +245,16 @@ kiro-memory add-observation "Architecture Decision" "Chose PostgreSQL over Mongo
|
|
|
242
245
|
| `KIRO_MEMORY_LOG_LEVEL` | `INFO` | Log verbosity: `DEBUG`, `INFO`, `WARN`, `ERROR` |
|
|
243
246
|
| `KIRO_CONFIG_DIR` | `~/.kiro` | Kiro CLI configuration directory |
|
|
244
247
|
|
|
245
|
-
### Worker
|
|
248
|
+
### Worker & Web Dashboard
|
|
249
|
+
|
|
250
|
+
The worker starts automatically when a Kiro session begins (via the `agentSpawn` hook). Once running, open `http://localhost:3001` in your browser to access the web dashboard with:
|
|
251
|
+
|
|
252
|
+
- **Live feed** of observations, summaries, and prompts (via SSE)
|
|
253
|
+
- **Project sidebar** with type filters and stats
|
|
254
|
+
- **Spotlight search** (Ctrl+K / Cmd+K) with instant results
|
|
255
|
+
- **Dark/light theme** toggle
|
|
256
|
+
|
|
257
|
+
For development, you can also manage the worker manually:
|
|
246
258
|
|
|
247
259
|
```bash
|
|
248
260
|
npm run worker:start # Start the background worker
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
4
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -428,6 +429,22 @@ function detectProject(cwd) {
|
|
|
428
429
|
return cwd.split("/").pop() || "default";
|
|
429
430
|
}
|
|
430
431
|
}
|
|
432
|
+
async function notifyWorker(event, data) {
|
|
433
|
+
const host = process.env.KIRO_MEMORY_WORKER_HOST || "127.0.0.1";
|
|
434
|
+
const port = process.env.KIRO_MEMORY_WORKER_PORT || "3001";
|
|
435
|
+
try {
|
|
436
|
+
const controller = new AbortController();
|
|
437
|
+
const timeout = setTimeout(() => controller.abort(), 1500);
|
|
438
|
+
await fetch(`http://${host}:${port}/api/notify`, {
|
|
439
|
+
method: "POST",
|
|
440
|
+
headers: { "Content-Type": "application/json" },
|
|
441
|
+
body: JSON.stringify({ event, data: data || {} }),
|
|
442
|
+
signal: controller.signal
|
|
443
|
+
});
|
|
444
|
+
clearTimeout(timeout);
|
|
445
|
+
} catch {
|
|
446
|
+
}
|
|
447
|
+
}
|
|
431
448
|
async function runHook(name, handler) {
|
|
432
449
|
try {
|
|
433
450
|
const input = await readStdin();
|
|
@@ -1155,6 +1172,7 @@ runHook("postToolUse", async (input) => {
|
|
|
1155
1172
|
content,
|
|
1156
1173
|
files
|
|
1157
1174
|
});
|
|
1175
|
+
await notifyWorker("observation-created", { project, title, type });
|
|
1158
1176
|
} finally {
|
|
1159
1177
|
sdk.close();
|
|
1160
1178
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -428,6 +429,22 @@ function detectProject(cwd) {
|
|
|
428
429
|
return cwd.split("/").pop() || "default";
|
|
429
430
|
}
|
|
430
431
|
}
|
|
432
|
+
async function notifyWorker(event, data) {
|
|
433
|
+
const host = process.env.KIRO_MEMORY_WORKER_HOST || "127.0.0.1";
|
|
434
|
+
const port = process.env.KIRO_MEMORY_WORKER_PORT || "3001";
|
|
435
|
+
try {
|
|
436
|
+
const controller = new AbortController();
|
|
437
|
+
const timeout = setTimeout(() => controller.abort(), 1500);
|
|
438
|
+
await fetch(`http://${host}:${port}/api/notify`, {
|
|
439
|
+
method: "POST",
|
|
440
|
+
headers: { "Content-Type": "application/json" },
|
|
441
|
+
body: JSON.stringify({ event, data: data || {} }),
|
|
442
|
+
signal: controller.signal
|
|
443
|
+
});
|
|
444
|
+
clearTimeout(timeout);
|
|
445
|
+
} catch {
|
|
446
|
+
}
|
|
447
|
+
}
|
|
431
448
|
async function runHook(name, handler) {
|
|
432
449
|
try {
|
|
433
450
|
const input = await readStdin();
|
|
@@ -1157,6 +1174,7 @@ runHook("stop", async (input) => {
|
|
|
1157
1174
|
learned: learned || void 0,
|
|
1158
1175
|
nextSteps: filesModified.length > 0 ? `File modificati: ${filesModified.join(", ")}` : void 0
|
|
1159
1176
|
});
|
|
1177
|
+
await notifyWorker("summary-created", { project });
|
|
1160
1178
|
} finally {
|
|
1161
1179
|
sdk.close();
|
|
1162
1180
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -428,6 +429,22 @@ function detectProject(cwd) {
|
|
|
428
429
|
return cwd.split("/").pop() || "default";
|
|
429
430
|
}
|
|
430
431
|
}
|
|
432
|
+
async function notifyWorker(event, data) {
|
|
433
|
+
const host = process.env.KIRO_MEMORY_WORKER_HOST || "127.0.0.1";
|
|
434
|
+
const port = process.env.KIRO_MEMORY_WORKER_PORT || "3001";
|
|
435
|
+
try {
|
|
436
|
+
const controller = new AbortController();
|
|
437
|
+
const timeout = setTimeout(() => controller.abort(), 1500);
|
|
438
|
+
await fetch(`http://${host}:${port}/api/notify`, {
|
|
439
|
+
method: "POST",
|
|
440
|
+
headers: { "Content-Type": "application/json" },
|
|
441
|
+
body: JSON.stringify({ event, data: data || {} }),
|
|
442
|
+
signal: controller.signal
|
|
443
|
+
});
|
|
444
|
+
clearTimeout(timeout);
|
|
445
|
+
} catch {
|
|
446
|
+
}
|
|
447
|
+
}
|
|
431
448
|
async function runHook(name, handler) {
|
|
432
449
|
try {
|
|
433
450
|
const input = await readStdin();
|
|
@@ -1146,6 +1163,7 @@ runHook("userPromptSubmit", async (input) => {
|
|
|
1146
1163
|
if (!promptText || promptText === '""') return;
|
|
1147
1164
|
const sessionId = `kiro-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}-${project}`;
|
|
1148
1165
|
await sdk.storePrompt(sessionId, Date.now(), promptText);
|
|
1166
|
+
await notifyWorker("prompt-created", { project });
|
|
1149
1167
|
} finally {
|
|
1150
1168
|
sdk.close();
|
|
1151
1169
|
}
|