Repository navigation
中文
0.2.0 是功能版本:MCP 现在能读计算列,另外修了几处会让编辑丢失或读到旧内容的问题。.layer 数据格式没有变化,仍是版本 1。需要 Obsidian 1.13.0 或更高。
新增
- MCP 的
read_table现在能读派生列:公式、汇总、查找、反向关联、自增编号、笔记属性都返回单元格在界面上显示的值。跨表读到的值会带上computedFrom,说明它来自哪张表的哪一列、是算出来的而不是存下来的。 read_table的每个字段现在标明readable/writable,有上限的值带readLimit/writeLimit;行级notes会说明公式错误,以及指向嵌套 frontmatter 的笔记属性为什么读不了。这样 AI 不会把「读不到」报成「空的」。- 关联、反向关联、汇总、查找指向的表被移动后仍能按文件名解析到;回答里给的是解析后的路径,文件里存的
linkPath不会被改写。
修复
- 另一个进程(MCP、同步客户端)写入文件后,已经打开的表格会自动刷新;本地有未保存的编辑时,会把本地版本另存为冲突副本,而不是覆盖掉。副本写失败会在 30 秒后重试一次。
- MCP 写入改为先比对读到的原文:文件在读取之后被改过,这次写入就拒绝并提示重新读取,不会盖掉别人的修改。
- 编辑期间遇到的保存、外部清空文件、旧读取晚到,都不再丢内容:保存过程中落下的编辑会再保存一次;空文件也算外部改动;过期的读取结果会被丢弃。
- 笔记属性指向嵌套 frontmatter 时,格子会显示「读不了」的本地化提示,而不是看起来像空值。
内部
- 删除 7 个没有调用方的导出和一段死代码。
升级:用新版的 main.js、manifest.json、styles.css 覆盖插件目录里的同名文件。.layer 数据不需要迁移。Release 另外提供 layer-base-0.2.0.zip,里面就是这三个文件、不含外层目录。用 MCP server 的话,把它指向的 mcp-server.cjs 换成新版并重启客户端,客户端里显示的版本会变成 0.2.0。
English
0.2.0 is a feature release: the MCP server can read computed columns, and several ways an edit could be lost or a stale value could reach the screen are fixed. The .layer format is unchanged (still version 1). Requires Obsidian 1.13.0 or later.
Added
read_tablenow reads derived columns: formula, rollup, lookup, backlinks, auto number and note property cells come back as the value the screen shows. A value read from another table carriescomputedFrom, naming the table and column it is computed from.- Every field now reports
readable/writable, withreadLimit/writeLimitwhere a value has a boundary; row-levelnotesexplain a formula error and why a note property over nested frontmatter cannot be read, so an assistant does not report "unreadable" as "empty". - A relation, backlink, rollup or lookup still resolves after its table is moved: the answer names the path that opens, and the stored
linkPathis left alone.
Fixed
- An open table reloads when another process (the MCP server, a sync client) writes the file. Unsaved edits are kept as a conflict copy instead of being overwritten, and a failed copy is retried once after 30 seconds.
- An MCP write now compares the file it read first: if the file changed since, nothing is written and the call asks to read it again.
- An edit that lands during a save, an empty file written by a sync client, and a read that arrives late can no longer drop or replace content: the edit is saved again, the empty file counts as an outside change, and the stale read is discarded.
- A note property over nested frontmatter says it cannot be read, in the interface language, instead of looking empty.
Behind the scenes
- Seven exports with no caller and a dead wrapper are gone; the whole repository's comments were rewritten (5855 → 1585 lines). No behaviour change.
Upgrading: replace main.js, manifest.json and styles.css in the plugin folder. No data migration. The release also carries layer-base-0.2.0.zip, which holds exactly those three files with no wrapping folder. If you use the MCP server, replace the mcp-server.cjs you point it at and restart the client — the version it reports becomes 0.2.0.
Full Changelog: 0.1.2...0.2.0