Repository navigation
v0.17.0
Security
Please update. This release hardens path limits (--allow-path, --deny-path) and stops a note's control sequences from reaching your terminal. Details follow in an advisory. Path limits on a server need server 2.82.1 or newer.
What's new
mcpserver: zn mcp can be hosted over HTTP (znserver#56). The new package is what server 2.83.0's built-in /mcp endpoint runs on, so a hosted client gets the same tools and the same limits as zn mcp.
Mermaid diagrams draw at any pane width (#39, #41). Flowcharts show every node and edge, and sequence, class and ER diagrams lose nothing. When a diagram can't be drawn faithfully, you see its source with a note instead of a wrong picture.
Fixes
- A note's control sequences stay out of your terminal (#44), in the TUI and in commands like
zn search,zn listandzn readon a terminal. Piped output is unchanged. A note can no longer hide text with color codes in Tasks, Kanban, comments, the outline or Home. - Opening a note with an invalid byte no longer changes it (#44). Before: the tab was marked changed on opening, and
:qarewrote the byte on disk. - Code stays literal in the preview (#40, #43).
[[links]]and![[embeds]]in code show as written.xtoggles the right task when a list holds a code block, and indented list content keeps its links, embeds and math. - A table's escaped link is a link (#42, #45).
[[Note\|alias]]opens the note, counts in backlinks, and keeps its escape throughzn rename, so the table row stays whole. zn mcp's attachment and task tools are stricter and safer (#46):- Parallel writes take turns, so they can't overwrite a file or lose an edit.
rename_assetrefuses names that would break links, and names any note it couldn't update inlinksNotUpdated.- Finishing a recurring task with
update_taskwrites the next one, astoggle_taskdoes. - Task ids can be checked with
expectedText.
How to test locally
T=$(mktemp -d); mkdir -p "$T/vault/inbox/Foo" "$T/vault/archive/Foo" "$T/vault/assets"
printf '# Note\n' > "$T/vault/inbox/Note.md"
printf '# Plan\n\n| Link | x |\n|---|---|\n| [[Note\\|alias]] | y |\n\n```mermaid\ngraph LR\n A[One long label] --> B[Another long label] --> C[End]\n```\n\n- [ ] first\n\n ```\n [x] not a task\n ```\n- [ ] second\n' > "$T/vault/inbox/Plan.md"
printf '# Kept\n' > "$T/vault/inbox/Foo/x.md"
printf '# Also kept\n' > "$T/vault/archive/Foo/x.md"
zn tui --vault "$T/vault"- Open
Plan, then the preview at any pane width. The diagram shows every box and arrow, and the table's link showsalias. - On
second, pressx. It checkssecond, not the line in the code block. - Run
zn rename inbox/Note.md --to Renamed --vault "$T/vault". The link inPlanbecomes[[Renamed\|alias]], and the table stays whole. - Connect an MCP client with
zn mcp --vault "$T/vault" --deny-path inbox/Foo/x.md:read_noteonarchive/Foo/x.mdanswers "Note not found", anddelete_folderonarchive/Foois refused.
Known limits
- With a path limit, a new or moved file can take a number when a hidden file has its name.
- Some status lines echo a name's colors on a terminal.
- A table directly after a list item loses its blank row in the default preview style.