diff --git a/README.md b/README.md index 1e7cf544..8782ef3b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- Mneme — cross-session memory for AI agents + Mneme — The Memory That Dreams

dsh-mneme

diff --git a/dsh-mneme/CHANGELOG.md b/dsh-mneme/CHANGELOG.md index 7d57f713..a7a5a9ae 100644 --- a/dsh-mneme/CHANGELOG.md +++ b/dsh-mneme/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] +- **品牌视觉换新:README 头图与插件列表图标**。三处 README(根、`dsh-mneme/`、`mcp/`)顶部改用 `images/mneme-banner-hero.webp`(1672×941,282 KiB)——原图 2.1 MiB 的 PNG 会让 `images/` 目录体积翻倍。根目录用相对路径,两个子目录用 raw 绝对地址:npm 详情页不解析相对图片路径,`../images/...` 在 npmjs.com 上必然裂图。 +- **插件列表图标从手绘 SVG 换成位图**:`package.json` 的 `icon` 改为 `assets/icon.png`(256×256 RGBA、圆角透明、120 KiB,仍在宿主 `iconOf()` 的 256 KiB 上限内);`assets/icon.svg` 删除。列表图标不再要求与客户端内联 mark(`MNEME_MARK_D`)同形,`test/client.test.js` 的图标用例改验 PNG 魔数、IHDR 边长、位深与 RGBA 通道——宿主对坏文件是静默回落成通用插画,不报错。 + ## [0.14.0] - 2026-11-12 - **注入的规则池只看得到前 200 条记忆:候选池此前固定 `store.list({ limit: 200 })`,合格行 8400+ 条里 8200 条永远进不了窗(#619)**。这个窗口按 `importance DESC` 取,于是注入位实际上由「谁更重要」决定一个固定的前 200 名,而真正的排序规则(summary 优先档 → preference → importance×quality×heat×scope)只在这 200 条**内部**生效。实测本机库 9067 条活跃记忆里,按注入闸门(`injectType` / 非 narrative / importance ≥ 3)合格的有 8421 条,其中 8210 条永远进不了候选窗;窗口内 200 条的 importance 分布是**全部 5**——也就是说 summary 优先档这条规则,在最需要它的场景里根本没机会触发。 diff --git a/dsh-mneme/README.md b/dsh-mneme/README.md index adb09590..39b24fa1 100644 --- a/dsh-mneme/README.md +++ b/dsh-mneme/README.md @@ -1,3 +1,7 @@ +

+ Mneme — The Memory That Dreams +

+

中文 | English(语义增强)

# dsh-mneme diff --git a/dsh-mneme/assets/icon.png b/dsh-mneme/assets/icon.png new file mode 100644 index 00000000..b7ee048e Binary files /dev/null and b/dsh-mneme/assets/icon.png differ diff --git a/dsh-mneme/assets/icon.svg b/dsh-mneme/assets/icon.svg deleted file mode 100644 index f2ed26ce..00000000 --- a/dsh-mneme/assets/icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/dsh-mneme/docs/DIRECTORIES.md b/dsh-mneme/docs/DIRECTORIES.md index d7e7f2ed..f26675c9 100644 --- a/dsh-mneme/docs/DIRECTORIES.md +++ b/dsh-mneme/docs/DIRECTORIES.md @@ -75,7 +75,7 @@ - `/mneme-choro-t1-*/`——T1 子进程的临时 overlay,跑完即删(`src/wiki/t1.js`)。 - 原子写会产生与目标同目录的 `<目标>.tmp--` 兄弟文件,崩溃时自清(`writeFileAtomic`)。 - 分享包**没有固定目录**:`dsh-mneme share --out ` 由人指定落点(`bin/cli.mjs`)。 -- 包内只读资源:`runtime-manifest.json`(下载清单)、`locale/`(宿主面板注入槽)、`assets/icon.svg`。daemon 无 pid / socket / 日志文件——HTTP 是 TCP,审计都在 `memory.db` 里。 +- 包内只读资源:`runtime-manifest.json`(下载清单)、`locale/`(宿主面板注入槽)、`assets/icon.png`(插件列表图标,256×256 RGBA)。daemon 无 pid / socket / 日志文件——HTTP 是 TCP,审计都在 `memory.db` 里。 ## 删了会怎样 diff --git a/dsh-mneme/package.json b/dsh-mneme/package.json index 8adcf41c..cab07d40 100644 --- a/dsh-mneme/package.json +++ b/dsh-mneme/package.json @@ -27,7 +27,7 @@ }, "type": "module", "main": "lib/index.js", - "icon": "assets/icon.svg", + "icon": "assets/icon.png", "bin": { "dsh-mneme": "bin/cli.mjs", "dsh-mneme-choro": "bin/dsh-mneme-choro.mjs", diff --git a/dsh-mneme/test/client.test.js b/dsh-mneme/test/client.test.js index 1b86d169..1da13c28 100644 --- a/dsh-mneme/test/client.test.js +++ b/dsh-mneme/test/client.test.js @@ -975,20 +975,21 @@ test("mneme mark is self-drawn: no host icon-name probing left (#287 root cause) test("plugin-list icon: declared, in-package, and shipped in files", () => { const icon = pkg.icon; assert.equal(typeof icon, "string", "package.json must declare an icon"); - assert.equal(icon, "assets/icon.svg", "the icon must be the self-drawn mark"); + assert.equal(icon, "assets/icon.png", "the icon must be the shipped brand avatar"); assert.ok(!/^([A-Za-z]:|[A-Za-z][A-Za-z\d+.-]*:)/.test(icon), "the icon must be a relative path (host rejects absolute/URL)"); assert.ok(pkg.files.includes("assets"), "the assets dir must ship, or the published package has no icon"); const file = join(root, icon); assert.ok(existsSync(file), `the declared icon must exist: ${icon}`); const bytes = readFileSync(file); assert.ok(bytes.length > 0 && bytes.length <= 256 * 1024, "the icon must be a non-empty file under the host's 256 KiB cap"); - const svg = bytes.toString("utf8"); - assert.ok(svg.includes(" 不能继承 currentColor:文件必须自带颜色,否则会渲染成黑块/不可见。 - assert.ok(/stroke="#[0-9a-fA-F]{6}"/.test(svg), "the standalone file must bake its own colour ( cannot inherit currentColor)"); - // 文件与客户端内联路径必须是同一颗:两边形状漂移是最容易悄悄发生的事。 - const inline = clientSource.match(/const MNEME_MARK_D = "([^"]+)"/)[1]; - assert.ok(svg.includes(inline), "assets/icon.svg must use the same path as the inline mark (no shape drift)"); + // 位图取代了手绘 SVG mark:宿主只按扩展名收位图,坏文件会静默回落成通用插画, + // 所以直接把 PNG 结构验到底——魔数、IHDR 边长、位深与 RGBA 通道。 + assert.equal(bytes.subarray(0, 8).toString("hex"), "89504e470d0a1a0a", "the icon must be a real PNG"); + assert.equal(bytes.readUInt32BE(16), 256, "the icon must be 256 px wide"); + assert.equal(bytes.readUInt32BE(20), 256, "the icon must be 256 px tall"); + assert.equal(bytes[24], 8, "the icon must be 8-bit"); + // 圆角必须是真的透明而不是涂白,否则浅底/深底主题下都会露出方角。 + assert.equal(bytes[25], 6, "the icon must be RGBA so the rounded corners stay transparent"); }); // 插件列表的标题/描述读包内的 `locale/<语言码>.json`:宿主 readPluginMeta 先解析 diff --git a/images/mneme-banner-hero.webp b/images/mneme-banner-hero.webp new file mode 100644 index 00000000..f66e56e3 Binary files /dev/null and b/images/mneme-banner-hero.webp differ diff --git a/mcp/README.md b/mcp/README.md index 73e4796c..97412324 100644 --- a/mcp/README.md +++ b/mcp/README.md @@ -1,3 +1,7 @@ +

+ Mneme — The Memory That Dreams +

+ # mneme-memory Cross-session memory for any MCP client — a stdio MCP server that exposes the