kiro-memory 1.4.0 → 1.4.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 +13 -7
- package/package.json +1 -1
- package/plugin/dist/hooks/postToolUse.js +7 -7
- package/plugin/dist/viewer.html +4 -1
- package/plugin/dist/viewer.js +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/banner.svg" alt="Kiro Memory" width="480" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Persistent cross-session memory for <a href="https://kiro.dev/">Kiro CLI</a>.</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/kiro-memory"><img src="https://img.shields.io/npm/v/kiro-memory" alt="npm" /></a>
|
|
11
|
+
<img src="https://img.shields.io/badge/license-AGPL--3.0-blue" alt="License" />
|
|
12
|
+
<img src="https://img.shields.io/badge/node-%3E%3D18-green" alt="Node" />
|
|
13
|
+
</p>
|
|
8
14
|
|
|
9
15
|
---
|
|
10
16
|
|
package/package.json
CHANGED
|
@@ -1200,11 +1200,11 @@ runHook("postToolUse", async (input) => {
|
|
|
1200
1200
|
try {
|
|
1201
1201
|
const files = extractFiles(input.tool_input, input.tool_response);
|
|
1202
1202
|
const query = input.tool_input?.pattern || input.tool_input?.regex || input.tool_input?.query || "";
|
|
1203
|
-
const title = input.tool_name === "grep" || input.tool_name === "glob" ? `
|
|
1203
|
+
const title = input.tool_name === "grep" || input.tool_name === "glob" ? `Searched: ${query}`.substring(0, 100) : `Read: ${files[0] || input.tool_input?.path || input.tool_input?.file_path || "file"}`;
|
|
1204
1204
|
await sdk2.storeObservation({
|
|
1205
1205
|
type: "file-read",
|
|
1206
1206
|
title,
|
|
1207
|
-
content: files.length > 0 ? `
|
|
1207
|
+
content: files.length > 0 ? `Files: ${files.join(", ")}` : `Tool ${input.tool_name} executed`,
|
|
1208
1208
|
files
|
|
1209
1209
|
});
|
|
1210
1210
|
await notifyWorker("observation-created", { project: project2, title, type: "file-read" });
|
|
@@ -1236,17 +1236,17 @@ function buildTitle(toolName, toolInput) {
|
|
|
1236
1236
|
switch (toolName) {
|
|
1237
1237
|
case "fs_write":
|
|
1238
1238
|
case "write":
|
|
1239
|
-
return `
|
|
1239
|
+
return `Written: ${toolInput.path || toolInput.file_path || "file"}`;
|
|
1240
1240
|
case "execute_bash":
|
|
1241
1241
|
case "shell":
|
|
1242
|
-
return `
|
|
1242
|
+
return `Executed: ${(toolInput.command || "").substring(0, 80)}`;
|
|
1243
1243
|
case "web_search":
|
|
1244
|
-
return `
|
|
1244
|
+
return `Searched: ${toolInput.query || ""}`;
|
|
1245
1245
|
case "web_fetch":
|
|
1246
1246
|
return `Fetch: ${toolInput.url || ""}`;
|
|
1247
1247
|
case "delegate":
|
|
1248
1248
|
case "use_subagent":
|
|
1249
|
-
return `
|
|
1249
|
+
return `Delegated: ${toolInput.task || toolInput.prompt || ""}`.substring(0, 100);
|
|
1250
1250
|
default:
|
|
1251
1251
|
return `${toolName}: ${JSON.stringify(toolInput).substring(0, 80)}`;
|
|
1252
1252
|
}
|
|
@@ -1262,7 +1262,7 @@ function buildContent(toolName, toolInput, toolResponse) {
|
|
|
1262
1262
|
const respStr = typeof toolResponse === "string" ? toolResponse : JSON.stringify(toolResponse);
|
|
1263
1263
|
content += `Output: ${respStr.substring(0, 500)}`;
|
|
1264
1264
|
}
|
|
1265
|
-
return content || `Tool ${toolName}
|
|
1265
|
+
return content || `Tool ${toolName} executed`;
|
|
1266
1266
|
}
|
|
1267
1267
|
function categorizeToolUse(toolName) {
|
|
1268
1268
|
const categories = {
|
package/plugin/dist/viewer.html
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>
|
|
6
|
+
<title>Kiro Memory — Dashboard</title>
|
|
7
|
+
|
|
8
|
+
<!-- Favicon SVG inline -->
|
|
9
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%237C5AFF'/%3E%3Cstop offset='100%25' stop-color='%233B82F6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='32' height='32' rx='8' fill='%230a0b10'/%3E%3Ccircle cx='16' cy='16' r='12' fill='none' stroke='url(%23g)' stroke-width='1.5' opacity='.5'/%3E%3Ccircle cx='16' cy='16' r='6' fill='none' stroke='url(%23g)' stroke-width='1.5' opacity='.9'/%3E%3Ccircle cx='16' cy='16' r='2.5' fill='url(%23g)'/%3E%3Ccircle cx='16' cy='4' r='1.5' fill='%237C5AFF'/%3E%3Ccircle cx='26' cy='11' r='1.2' fill='%236366F1' opacity='.7'/%3E%3Ccircle cx='26' cy='21' r='1' fill='%233B82F6' opacity='.5'/%3E%3C/svg%3E">
|
|
7
10
|
|
|
8
11
|
<!-- Fonts: Inter (ui) + JetBrains Mono (code) -->
|
|
9
12
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
package/plugin/dist/viewer.js
CHANGED
|
@@ -23713,7 +23713,7 @@ function SearchBar() {
|
|
|
23713
23713
|
|
|
23714
23714
|
// src/ui/viewer/components/Header.tsx
|
|
23715
23715
|
function Header({ isConnected, resolvedTheme, onThemeToggle }) {
|
|
23716
|
-
return /* @__PURE__ */ import_react2.default.createElement("header", { className: "flex items-center gap-4 px-6 h-14 bg-surface-1 border-b border-border z-50" }, /* @__PURE__ */ import_react2.default.createElement("div", { className: "flex items-center gap-3 flex-shrink-0" }, /* @__PURE__ */ import_react2.default.createElement("div", { className: "w-8 h-8 rounded-lg bg-accent-violet flex items-center justify-center" }, /* @__PURE__ */ import_react2.default.createElement("svg", { className: "w-[18px] h-[18px] text-white", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react2.default.createElement("path", { d: "M12 2a4 4 0 0 1 4 4c0 1.95-1.4 3.58-3.25 3.93a1 1 0 0 0-.75.97V13" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M12 2a4 4 0 0 0-4 4c0 1.95 1.4 3.58 3.25 3.93a1 1 0 0 1 .75.97V13" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M9 18h6" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M10 22h4" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M12 13v5" }))), /* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement("h1", { className: "text-[15px] font-bold text-zinc-100 leading-none" }, "
|
|
23716
|
+
return /* @__PURE__ */ import_react2.default.createElement("header", { className: "flex items-center gap-4 px-6 h-14 bg-surface-1 border-b border-border z-50" }, /* @__PURE__ */ import_react2.default.createElement("div", { className: "flex items-center gap-3 flex-shrink-0" }, /* @__PURE__ */ import_react2.default.createElement("div", { className: "w-8 h-8 rounded-lg bg-accent-violet flex items-center justify-center" }, /* @__PURE__ */ import_react2.default.createElement("svg", { className: "w-[18px] h-[18px] text-white", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react2.default.createElement("path", { d: "M12 2a4 4 0 0 1 4 4c0 1.95-1.4 3.58-3.25 3.93a1 1 0 0 0-.75.97V13" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M12 2a4 4 0 0 0-4 4c0 1.95 1.4 3.58 3.25 3.93a1 1 0 0 1 .75.97V13" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M9 18h6" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M10 22h4" }), /* @__PURE__ */ import_react2.default.createElement("path", { d: "M12 13v5" }))), /* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement("h1", { className: "text-[15px] font-bold text-zinc-100 leading-none" }, "Kiro Memory"), /* @__PURE__ */ import_react2.default.createElement("span", { className: "text-[11px] text-zinc-500 mt-0.5 block" }, "Memory Dashboard"))), /* @__PURE__ */ import_react2.default.createElement("div", { className: "hidden md:block w-px h-6 bg-border" }), /* @__PURE__ */ import_react2.default.createElement(SearchBar, null), /* @__PURE__ */ import_react2.default.createElement("div", { className: "flex-1" }), /* @__PURE__ */ import_react2.default.createElement("div", { className: "flex items-center gap-2 px-3 py-1.5 rounded-lg bg-surface-2 border border-border" }, /* @__PURE__ */ import_react2.default.createElement("div", { className: `w-2 h-2 rounded-full ${isConnected ? "bg-accent-green animate-pulse-dot" : "bg-zinc-500"}` }), /* @__PURE__ */ import_react2.default.createElement("span", { className: `text-xs font-medium ${isConnected ? "text-accent-green" : "text-zinc-500"}` }, isConnected ? "Live" : "Offline")), /* @__PURE__ */ import_react2.default.createElement(
|
|
23717
23717
|
"button",
|
|
23718
23718
|
{
|
|
23719
23719
|
onClick: onThemeToggle,
|
|
@@ -23847,7 +23847,7 @@ function Sidebar({
|
|
|
23847
23847
|
{ label: "Summaries", value: stats.summaries, color: "text-accent-cyan" },
|
|
23848
23848
|
{ label: "Prompts", value: stats.prompts, color: "text-accent-amber" },
|
|
23849
23849
|
{ label: "Projects", value: projects.length, color: "text-accent-green" }
|
|
23850
|
-
].map((item) => /* @__PURE__ */ import_react3.default.createElement("div", { key: item.label, className: "rounded-lg bg-surface-2 border border-border px-3 py-3 text-center" }, /* @__PURE__ */ import_react3.default.createElement("div", { className: `text-xl font-bold tabular-nums ${item.color}` }, item.value), /* @__PURE__ */ import_react3.default.createElement("div", { className: "text-[10px] uppercase tracking-wider text-zinc-600 mt-1" }, item.label))))), /* @__PURE__ */ import_react3.default.createElement("div", { className: "mt-auto px-4 py-4" }, /* @__PURE__ */ import_react3.default.createElement("div", { className: "text-[10px] text-zinc-700 font-mono text-center" }, "
|
|
23850
|
+
].map((item) => /* @__PURE__ */ import_react3.default.createElement("div", { key: item.label, className: "rounded-lg bg-surface-2 border border-border px-3 py-3 text-center" }, /* @__PURE__ */ import_react3.default.createElement("div", { className: `text-xl font-bold tabular-nums ${item.color}` }, item.value), /* @__PURE__ */ import_react3.default.createElement("div", { className: "text-[10px] uppercase tracking-wider text-zinc-600 mt-1" }, item.label))))), /* @__PURE__ */ import_react3.default.createElement("div", { className: "mt-auto px-4 py-4" }, /* @__PURE__ */ import_react3.default.createElement("div", { className: "text-[10px] text-zinc-700 font-mono text-center" }, "Kiro Memory v1.4.2")));
|
|
23851
23851
|
}
|
|
23852
23852
|
|
|
23853
23853
|
// src/ui/viewer/components/Feed.tsx
|