Skip to content

1.12.0

Choose a tag to compare

@github-actions github-actions released this 28 Jan 16:30

总结

  • 注释编辑操作(追加、前置、替换、frontmatter 补丁)
  • 反向链接和外链 API 具有 isEmbed 标志支持
  • 用于监控的健康检查端点
  • 路径清理以确保安全
  • 可配置注释路径的默认 API 文件夹

其中许多对于 MCP(模型上下文协议)非常有用。

新功能

1.注释编辑操作

无需替换整个内容即可编辑手术笔记的新端点:

端点 方法 描述
/api/note/append 发布 将内容附加到注释末尾​​
/api/note/prepend 发布 将内容添加到注释开头
/api/note/replace 发布 查找和替换文本(支持正则表达式)
/api/note/frontmatter 补丁 更新 YAML frontmatter 字段

2. 反向链接和外链 API

查询笔记关系:

端点 方法 描述
/api/note/backlinks 获取 获取链接到给定笔记的笔记
/api/note/outlinks 获取 获取给定注释链接到的注释

特点:

  • 保存笔记时自动索引[[wikilinks]]![[embeds]]
  • 返回“isEmbed:true/false”以区分链接和嵌入
  • 支持灵活的反向链接解析的路径变化

3.健康检查端点

获取/api/健康

返回服务状态、版本、正常运行时间和数据库连接状态。

4. 安全性:路径清理

现在,所有音符路径都经过验证,可以拒绝路径遍历攻击(“..”)。对于无效路径,返回错误代码 463。


Summary

  • Note edit operations (append, prepend, replace, frontmatter patch)
  • Backlinks and outlinks API with isEmbed flag support
  • Health check endpoint for monitoring
  • Path sanitization for security
  • Configurable default API folder for note paths

Many of these will be VERY useful for an MCP (Model Context Protocol).

New Features

1. Note Edit Operations

New endpoints for surgical note editing without replacing entire content:

Endpoint Method Description
/api/note/append POST Append content to end of note
/api/note/prepend POST Prepend content to beginning of note
/api/note/replace POST Find and replace text (supports regex)
/api/note/frontmatter PATCH Update YAML frontmatter fields

2. Backlinks & Outlinks API

Query note relationships:

Endpoint Method Description
/api/note/backlinks GET Get notes that link TO a given note
/api/note/outlinks GET Get notes that a given note links TO

Features:

  • Automatically indexes [[wikilinks]] and ![[embeds]] when notes are saved
  • Returns isEmbed: true/false to distinguish links from embeds
  • Supports path variations for flexible backlink resolution

3. Health Check Endpoint

GET /api/health

Returns service status, version, uptime, and database connection state.

4. Security: Path Sanitization

All note paths are now validated to reject path traversal attacks (..). Returns error code 463 for invalid paths.


What's Changed

  • API Extensions - Edit Operations, Backlinks, and Health Check by @that0n3guy in #78

New Contributors

Full Changelog: 1.11.3...1.12.0