Skip to content

v0.17.0

Choose a tag to compare

@github-actions github-actions released this 05 Nov 14:17
· 3 commits to main since this release
f0cebea

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 list and zn read on 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 :qa rewrote the byte on disk.
  • Code stays literal in the preview (#40, #43). [[links]] and ![[embeds]] in code show as written. x toggles 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 through zn 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_asset refuses names that would break links, and names any note it couldn't update in linksNotUpdated.
    • Finishing a recurring task with update_task writes the next one, as toggle_task does.
    • 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 shows alias.
  • On second, press x. It checks second, not the line in the code block.
  • Run zn rename inbox/Note.md --to Renamed --vault "$T/vault". The link in Plan becomes [[Renamed\|alias]], and the table stays whole.
  • Connect an MCP client with zn mcp --vault "$T/vault" --deny-path inbox/Foo/x.md: read_note on archive/Foo/x.md answers "Note not found", and delete_folder on archive/Foo is 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.