dsh-tiddlywiki 0.30.64 → 0.30.65

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/docs/CHANGELOG.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  > 最近几个主要版本的一句话记录(完整变更见 [Releases](https://github.com/bbqisbbq/dsh-tiddlywiki/releases) / git log)。
6
6
 
7
- - **v0.30.64**(2026-10-09):**新增 `tiddlywiki_replace` 工具(笔记正文局部替换)**。Agent 想只改笔记里的几处文字(比如把 Markdown 圆括号内链批量改成双括号 `[[x]]`)此前没有对应工具:要么整篇 `tiddlywiki_put` 重写(易出错、费 token),要么绕过插件手写 HTTP PUT(会踩「`modified` 是 UTC、别写本地时间」这类坑)。新工具 `replace(title, old, new, all?, expectedModified?, expectedRevision?, force?)`:读全文 → 精确替换子串 → 整篇回写;默认只换第一处、`all:true` 换全部;`old` 未命中回执 `replaced:0` 且不报错(别把「没命中」当「改好了」);与 put/append 同一套乐观并发保护与写策略(保留 type/tags/字段、二进制附件拒绝)。工具数 15 → 16:`full` 提示词目录、`verify-prompt`/`verify-tool-views` 的工具数断言、AGENTS.md §2、package.json 描述、docs/development.md 同步;客户端新增「局部替换」工具卡与徽标(`tool-views` / `i18n-card`)。
7
+ - **v0.30.65**(2026-10-09):**新增 `tiddlywiki_replace` 工具(笔记正文局部替换)**。Agent 想只改笔记里的几处文字(比如把 Markdown 圆括号内链批量改成双括号 `[[x]]`)此前没有对应工具:要么整篇 `tiddlywiki_put` 重写(易出错、费 token),要么绕过插件手写 HTTP PUT(会踩「`modified` 是 UTC、别写本地时间」这类坑)。新工具 `replace(title, old, new, all?, expectedModified?, expectedRevision?, force?)`:读全文 → 精确替换子串 → 整篇回写;默认只换第一处、`all:true` 换全部;`old` 未命中回执 `replaced:0` 且不报错(别把「没命中」当「改好了」);与 put/append 同一套乐观并发保护与写策略(保留 type/tags/字段、二进制附件拒绝)。工具数 15 → 16:`full` 提示词目录、`verify-prompt`/`verify-tool-views` 的工具数断言、AGENTS.md §2、package.json 描述、docs/development.md 同步;客户端新增「局部替换」工具卡与徽标(`tool-views` / `i18n-card`)。
8
8
 
9
9
  - **v0.30.63**(2026-10-09):**默认提示词整理(「聊天引用」与「笔记内引用」分家)+「整段替换」配置说明勘误**。① **笔记约定的链接规则拆成两条**:旧版只有一条 `[标题](/dsh-tiddlywiki/tw/#标题)`——那是**聊天回复**专用写法,模型会照抄进笔记正文,于是 URL 一旦带未转义空格就被 markdown-it 整条拒绝渲染成纯文本,即便渲染成功也是外链、点开另起标签页(正是「笔记里的链接偶尔是 Markdown 格式、不是 `[[…]]`」的根因)。现在拆成「**笔记内引用**」写 `[[标题]]`(文字不同写 `[[标题|文字]]`,两种内容类型下都能正确渲染成站内链接、无需 URL 编码)与「**聊天里引用笔记**」写带作用域 base 的链接形式(多库时自动带库 id)。slim 正文 866 → 937 字符(仍 < 预算 1000,`verify-prompt.mjs` 预算/链接/多库断言全绿)。② **`config.prompt.override` 设置页说明勘误**(zh+en):原「非空时取代上面的内置文本」有歧义,改为「非空时替换内置提示词,附加说明仍会追加在末尾」。纯文案,无行为变化。
10
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-tiddlywiki",
3
3
  "description": "把 TiddlyWiki 5 变成你和 Agent 共用的本地文档中心(纯文本 + git):你在 DSH 界面里阅读、写作、记日记,Agent 用 16 个 tiddlywiki_* 工具读写同一批笔记;每条笔记都是你能读、能改、能审计、能随时带走的文件——不是自动记忆插件,不做后台抓取。可选一键发布到微信公众号草稿箱。 Turn TiddlyWiki 5 into a document center you and your agent share, in plain text under git — a knowledge base you can read, edit, audit and take with you, not an auto-memory plugin. Mounts via the official dsh plugin system; no DSH source changes.",
4
- "version": "0.30.64",
4
+ "version": "0.30.65",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "dsh",