← 返回列表
D

yuque-notes-plugin

v0.1.0 · 3 天前发布

Save messy notes (text + images) to a Yuque knowledge base, classified by the model.

dsh-pluginyuquenotesknowledge-base

README

yuque-notes-plugin



dsh 工具插件:把零散的笔记(文本 + 图片)保存到语雀知识库,由模型根据笔记内容自动分类。

功能



插件向 agent 暴露三个工具:

| 工具 | 作用 |
| --- | --- |
| yuque_list_toc | 列出笔记知识库的目录树(含文档),模型据此决定新笔记归到哪个分类 |
| yuque_create_dir | 在知识库中创建目录(分类)节点;同名同父已存在时直接返回既有节点,不重复创建 |
| yuque_create_doc | 把一条笔记保存为语雀文档:Markdown 正文,图片引用自动读取、上传并替换,返回文档 URL |

保存链路:



yuque_list_toc(看现有分类)
├─ 已有合适目录 → yuque_create_doc(title + Markdown + dirUuid)
└─ 没有合适目录 → yuque_create_dir(新建分类)→ yuque_create_doc


每次保存只需 2–3 次工具调用;图片上传在 yuque_create_doc 内部完成,模型只需在正文里写图片引用。

其他行为:

  • 知识库不存在时自动创建(使用配置的 bookName

  • 错误归一化并 fail-loud:401/403 为鉴权错误、404 为资源缺失;429/5xx 自动退避重试(最多 3 次)

  • 请求可取消:所有网络请求都随 agent 的 signal 中止


  • 安装



    三种方式:

    1. 安装到 profile(推荐,持久生效)

    sh
    
    dsh plugin --profile <name> add .
    查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    yuque-notes-plugin
    Repo
    git+https://github.com/cchenbin042/yuque-notes-plugin.git
    Engines
    {}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"}}