Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="images/mneme-readme-hero.png" alt="Mneme — cross-session memory for AI agents" width="100%" />
<img src="images/mneme-banner-hero.webp" alt="Mneme — The Memory That Dreams" width="100%" />
</p>

<h1 align="center">dsh-mneme</h1>
Expand Down
3 changes: 3 additions & 0 deletions dsh-mneme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 优先档这条规则,在最需要它的场景里根本没机会触发。
Expand Down
4 changes: 4 additions & 0 deletions dsh-mneme/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<p align="center">
<img src="https://raw.githubusercontent.com/slow-stack/mneme/main/images/mneme-banner-hero.webp" alt="Mneme — The Memory That Dreams" width="100%" />
</p>

<p align="center"><strong>中文 | <a href="docs/SEMANTIC.md">English(语义增强)</a></strong></p>

# dsh-mneme
Expand Down
Binary file added dsh-mneme/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions dsh-mneme/assets/icon.svg

This file was deleted.

2 changes: 1 addition & 1 deletion dsh-mneme/docs/DIRECTORIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
- `<os.tmpdir()>/mneme-choro-t1-*/`——T1 子进程的临时 overlay,跑完即删(`src/wiki/t1.js`)。
- 原子写会产生与目标同目录的 `<目标>.tmp-<pid>-<rand>` 兄弟文件,崩溃时自清(`writeFileAtomic`)。
- 分享包**没有固定目录**:`dsh-mneme share --out <path>` 由人指定落点(`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` 里。

## 删了会怎样

Expand Down
2 changes: 1 addition & 1 deletion dsh-mneme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
17 changes: 9 additions & 8 deletions dsh-mneme/test/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("<svg") && svg.includes("viewBox"), "the icon must be an SVG with a viewBox");
// <img> 不能继承 currentColor:文件必须自带颜色,否则会渲染成黑块/不可见。
assert.ok(/stroke="#[0-9a-fA-F]{6}"/.test(svg), "the standalone file must bake its own colour (<img> 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 先解析
Expand Down
Binary file added images/mneme-banner-hero.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions mcp/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<p align="center">
<img src="https://raw.githubusercontent.com/slow-stack/mneme/main/images/mneme-banner-hero.webp" alt="Mneme — The Memory That Dreams" width="100%" />
</p>

# mneme-memory

Cross-session memory for any MCP client — a stdio MCP server that exposes the
Expand Down
Loading