github shuaiplus/inkstone v0.3.0
v0.3.0 - Remote MCP, AI Search, and Faster Sync

latest releases: v0.7.0, v0.6.0, v0.5.0...
one month ago

v0.3.0 - Remote MCP, AI Search, and Faster Sync

Inkstone 0.3.0 turns the notebook into a private AI knowledge base, makes common actions feel immediate, and substantially reduces Cloudflare D1 work. Existing 0.2.0 databases are upgraded automatically through idempotent migrations; no manual database command is required, and existing notes are preserved. As with every self-hosted update, keeping a current backup before deployment is recommended.

Added

  1. Private remote MCP with OAuth 2.1. Compatible AI clients can securely search, fetch, and read bounded ranges of private notes, inspect folders, tags, links, and outlines, and—with explicit account permissions—create, edit, organize, trash, or restore notes. Authorization uses OAuth 2.1 with PKCE, scoped consent, revocable grants, and revision-safe, idempotent writes. Commit: cdbf810.

  2. MCP API keys for universal client support. Clients that cannot complete an OAuth browser flow can connect with revocable ink_... bearer keys created from Settings. Keys inherit the account's current MCP permissions, are shown only once, and are stored as hashes. Commit: 9f487f3.

  3. Optional AI semantic and hybrid search. When Workers AI is configured, Inkstone can build a private per-account embedding index and combine meaning-based results with FTS keyword matches. Indexing runs through a background queue, can be rebuilt or cleared from Settings, and automatically falls back to lexical search if AI is unavailable. Commit: 9f487f3.

Improved

  1. Immediate local feedback for everyday actions. Note creation, movement, deletion, restoration, duplication, trash cleanup, version restoration, profile changes, share revocation, and backup-target changes now update the interface optimistically while persistence continues in the background. Failed writes roll back safely, and stale synchronization responses cannot overwrite newer local state. Commit: c1ea2ba.

  2. Reliable nested-folder creation, movement, ordering, and deletion. Folders can be created directly under a parent and moved or reordered relative to a target sibling while preserving a stable hierarchy. The client, Worker, and demo now agree on sibling ordering, duplicate-name checks, maximum depth, and cycle prevention. Deleting a folder promotes its child folders into the deleted folder's exact position and moves its direct notes to the parent instead of losing their organization; an invalid active-folder view is also cleared automatically. All folder changes are optimistic, serialized per folder, and rolled back if persistence fails. Commit: c1ea2ba.

  3. Lower D1 read amplification. Only the elected browser tab performs fallback polling, database readiness is cached after verification, change-log maintenance runs only when due under a lease, and several note, tag, session, and synchronization paths use bounded or batched queries. Commit: 42364b7.

  4. Much lower full-text indexing write amplification. Note writes now enqueue coalesced FTS work instead of rebuilding token-heavy FTS rows inline. Bounded foreground drains keep search fresh, while scheduled drains process larger backlogs with compare-and-swap guards so a concurrent edit cannot be dropped from the index queue. Commit: dd6e5b6.

Fixed

  1. Safe upgrades for existing D1 databases. Versioned, idempotent migrations now add the MCP, AI-search, and FTS-queue schema without recreating user tables. The migration sequence avoids unsupported constrained ALTER TABLE behavior that could otherwise make all production API requests return HTTP 500. Commit: 029ea84.

  2. Stronger authentication and synchronization recovery. Successful sign-in clears the correct throttling keys without weakening account-level brute-force protection; logout flushes pending offline writes and warns before discarding unsynced edits; paginated full snapshots no longer move the client cursor backward; and MCP retries can recover after a mutation commits but response persistence fails. Commit: 017421f.

  3. Smaller sharing and PWA reliability fixes. Share passcodes now require at least four characters with matching client guidance, live synchronization settings update without rebuilding the engine, and an expired PWA update notice can appear again for a later update. Commit: 017421f.


v0.3.0 - 远程 MCP、AI 搜索与更高效的同步

Inkstone 0.3.0 将笔记库扩展为私有 AI 知识库,让常用操作即时反馈,并显著减少 Cloudflare D1 的读写消耗。现有 0.2.0 数据库会通过幂等迁移自动升级,无需手动执行数据库命令,已有笔记会完整保留。与所有自托管更新一样,部署前仍建议保留一份最新备份。

新增

  1. 基于 OAuth 2.1 的私有远程 MCP。 兼容的 AI 客户端可以安全地搜索笔记、获取正文、分段读取长笔记,并查看文件夹、标签、链接和大纲;在账号明确授权后,还可以创建、编辑、整理、移入回收站或恢复笔记。授权流程支持 OAuth 2.1、PKCE、分级权限确认、授权撤销,以及带版本校验和幂等保护的安全写入。提交:cdbf810

  2. 适配通用 MCP 客户端的 API Key。 无法完成浏览器 OAuth 流程的客户端,可以使用在设置中创建、可随时撤销的 ink_... Bearer Key 连接。Key 会继承账号当前的 MCP 权限,只在创建时显示一次,并仅以哈希形式保存。提交:9f487f3

  3. 可选的 AI 语义搜索与混合搜索。 配置 Workers AI 后,Inkstone 可以为每个账号建立私有向量索引,将语义结果与 FTS 关键词结果合并。索引通过后台队列更新,可在设置中重建或清空;当 AI 未配置或暂时不可用时,会自动回退到关键词搜索。提交:9f487f3

改进

  1. 日常操作立即在本地生效。 新建、移动、删除、恢复、复制和彻底删除笔记,以及清空回收站、恢复历史版本、修改资料、撤销分享和调整备份目标等操作,现在都会先即时更新界面,再在后台持久化。写入失败时会安全回滚,过期的同步响应也不会覆盖较新的本地状态。提交:c1ea2ba

  2. 可靠的多级文件夹新建、移动、排序与删除逻辑。 现在可以直接在指定父级下新建文件夹,并相对目标同级文件夹移动或排序,同时保持稳定的层级结构。客户端、Worker 和演示模式统一了同级排序、重名校验、最大深度和循环层级防护。删除文件夹时,子文件夹会按原位置提升到上一级,直属笔记也会移到父文件夹,不会打乱或丢失原有整理关系;如果当前正在查看被删除的文件夹,界面会自动退出失效视图。所有文件夹操作都会立即在本地生效、按文件夹串行持久化,并在失败时安全回滚。提交:c1ea2ba

  3. 降低 D1 读取放大。 只有被选为主实例的浏览器标签页执行兜底轮询;数据库结构验证结果会被缓存;变更日志维护只会在到期后持锁运行;多条笔记、标签、会话和同步查询也改为有界或批量执行。提交:42364b7

  4. 大幅降低全文索引写放大。 保存笔记时不再同步重建按 Token 展开的 FTS 行,而是合并写入索引队列。前台使用小批量任务保持搜索结果及时,定时任务负责消化较大的积压;比较并交换保护确保并发编辑不会被错误地从队列中删除。提交:dd6e5b6

修复

  1. 现有 D1 数据库可以安全升级。 新增的版本化幂等迁移会在不重建用户数据表的情况下加入 MCP、AI 搜索和 FTS 队列结构。迁移过程避开了 D1 对带约束 ALTER TABLE 支持不稳定的问题,防止部署后所有生产 API 请求返回 HTTP 500。提交:029ea84

  2. 增强登录与同步恢复可靠性。 登录成功后会清理正确的限流记录,同时保留账号级暴力破解防护;退出登录前会先提交离线写入,并在可能丢弃未同步编辑时明确确认;分页全量同步不会让客户端游标倒退;MCP 写入已提交但响应保存失败时,重试可以正确恢复。提交:017421f

  3. 分享与 PWA 的细节可靠性修复。 分享密码现在至少需要四个字符,并在客户端提供一致提示;实时同步设置可以热更新而无需重建同步引擎;PWA 更新提醒过期后,后续更新仍可以再次提醒。提交:017421f

Don't miss a new inkstone release

NewReleases is sending notifications on new releases.