OpenViking
volcengine
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:NanoShiki/dsh-anki
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
独立的 DSH 插件:原生 Anki 侧栏与 anki AI 工具共用仅属于当前 DSH 配置的一份独立牌库,由真实的无界面 Anki 核心驱动。不启动 Anki 桌面窗口、AnkiConnect、Qt 或替代 Web 服务。本项目是独立集成,不是 Anki 官方产品。
2.0.0 开箱即用:安装包包含 CPython、Anki 26.05 无界面核心及其全部 Python 运行依赖,安装后无需另外安装 Anki、Python 或 pip,也无需填写核心路径。沿用浅色卡片、青绿色强调色、顶部六格统计,以及「牌组 — 搜索列表 — 编辑器」布局;窄窗口自动适配,各区域内部滚动。
环境要求: Windows x64 或 macOS 12 及以上(Apple Silicon、Intel),DSH ^0.2.1-rc.2(已在 0.2.1-rc.3 验证;@deepseek-ai/dsh* peer 声明为范围而不是精确版本)。随包提供 CPython 3.13.5、官方 PyPI Anki 26.5 / 26.05 原生 wheel 及其依赖;不包含 Qt 或 Anki 桌面界面。不要求已有 Anki/Python 安装,不在首次启动时下载运行依赖。 AnkiWeb 同步仍需网络和自己的账号。
macOS 测试包与 Windows 共用一个 .tgz。在 DSH 插件管理器中导入,保持 pythonPath 和 ankiPackages 为空。第一次使用时会把适合当前 DSH 进程架构的运行时解压到 ~/Library/Caches/dsh-anki/。系统清理缓存后,下次使用会从安装包重建。同步登录如遇钥匙串提示,允许访问此工作区的同步凭据。
dsh-anki.tgz(每个 Release 都附带这个固定文件名,releases/latest/download/dsh-anki.tgz 永远指向最新正式版),不要用 GitHub 自动生成的 Source code 压缩包代替安装包。@nanoshiki/dsh-anki(npm 发布后市场可检测更新);或导入上一步的 .tgz。两种方式都保持 pythonPath、ankiPackages 为空,即自动使用包内运行时与核心。dataDir 留空即使用当前 DSH 配置的独立数据目录;不要指向 Anki 桌面版牌库。插件管理器里的显示名称是 Anki(来自包内 locale/*.json 的 meta.title);技术包名是 @nanoshiki/dsh-anki(2.0.0 起;1.4.x 及更早为 @local/dsh-anki),只在详情页用于排查安装位置。
2.1.0 富文本编辑:新增和浏览页都支持选中文字后加粗、斜体、下划线、上下标和列表,也可点 </> 编辑 HTML 源码。粘贴截图(PNG/JPEG/GIF/WebP,最大 5 MiB)会在光标处显示图片。字段保存媒体文件名,相同图片复用同一个文件。含有可视化编辑器无法完整保留的自定义 HTML 的字段会以源码模式打开。
pythonPath / ankiPackages 仅保留为高级用户的绝对路径覆盖项,不再使用作者机器上的路径,也不会静默回退到外部安装。完整包损坏或缺文件时,请重新安装完整 .tgz,不是另装 Python/Anki。
2.0.1 起同时发布到 npm,包名 @nanoshiki/dsh-anki。插件管理器可直接安装这个包名,插件市场会按 npm 版本检测更新并给出「更新」按钮;GitHub Release 的 dsh-anki.tgz 仍作为预构建备用安装方式,两者数据目录相同。
安装包校验值随 Release 提供;核心逐文件校验值见 core-sha256.json,官方 wheel 下载地址、版本与 SHA-256 见 core-lock.json。
始终最新(稳定链接): 每个 Release 都附带同名资产 dsh-anki.tgz,所以
https://github.com/NanoShiki/dsh-anki/releases/latest/download/dsh-anki.tgz
永久指向最新正式版;市场收录条目用的就是这个链接。发布新版本只需新建 Release 并附上同名资产,不需要再向市场提交 PR。要锁定版本或核对哈希时,用上面的版本化链接。
对应源码与许可: Anki 核心的固定提交源码、锁定的 Rust 依赖源码、构建说明,以及 Python 依赖源码与完整第三方许可文本,随同一 Release 另行提供(*-corresponding-source.tar.gz、*-python-sources.tar.gz)。普通用户无需下载它们即可安装;安装包内已包含运行时所需的全部许可与声明文本。
已装同一包 @nanoshiki/dsh-anki 的旧版本: 等待同步结束 → 禁用插件并等后台 Python 进程退出 → 备份整个数据目录 → 更新同一个包 → 保留 dataDir 不变,将旧的 ankiPackages / pythonPath 覆盖项清空以使用内置核心 → 重新启用,按管理器提示刷新或重启。不迁移、不清空牌库;高级用户主动保留的外部覆盖路径仍会被尊重。
从 @local/dsh-anki 迁移到 @nanoshiki/dsh-anki(一次性): 2.0.0 换了包身份,市场/插件管理器会把它当作另一个插件,不能覆盖升级。
dataDir(默认留空即 <profileContext.dir>/data/anki-workspace),然后卸载旧包,不要删除数据目录。@nanoshiki/dsh-anki,dataDir 保持与原来一致;启用后打开「Anki → 浏览」确认牌组与笔记都在。从旧包名 @local/dsh-anki-workspace 迁移(一次性): 改名相当于换了一个新包身份,不能就地覆盖安装。
dataDir、ankiPackages、pythonPath,在停用状态下备份整个数据目录。旧包保持禁用,或通过管理器卸载,但不要删除数据目录。@nanoshiki/dsh-anki;启用前只把 dataDir 填回原值(必须完全一致),pythonPath / ankiPackages 留空以使用 2.0.0 内置运行时与核心。<profileContext.dir>/data/anki-workspace:改名不会搬迁或删除它,AI 工具 anki 与侧栏名称也都不变。dataDir 指向 Anki 桌面版的配置目录。 如果安装被拒绝,请保留管理器的错误信息,不要为了「修好」而删除牌库。验证边界: 自动化检查覆盖隔离的原生牌库、本地回环同步服务、客户端结构交互,以及合成状态下的真实浏览器布局。它们不能证明某个具体安装、真实 AnkiWeb 账号或云端连接可用。请使用你已认证的插件管理器与 GUI,按它实际提示刷新/重启;不需要替换服务器,也不依赖未经验证的热更新行为。实时验收清单见 ACCEPTANCE.md,测试记录见 VERIFICATION.md。
源码仓库:NanoShiki/dsh-anki。
本仓库只接受 Pull Request。 main 分支已启用保护:直接 push、强制推送和删除都会被拒绝,仓库所有者也不例外。请从 main 拉分支、按 PR 模板提交,并等 test 检查通过后合并;流程、本地测试命令与必须保持的不变量见 CONTRIBUTING.md。
backups 目录。本地备份救不回被覆盖的云端数据。 全量上传会替换云端牌库,全量下载会替换本地牌库,请特别在首次登录时谨慎选择。modified 作为 expectedModified 传回,否则会被拒绝。.apkg 放进 status.importsDir,只传文件名;导入前有原生牌库备份,按合并处理。导出:在 status.exportsDir 生成新包,绝不覆盖已存在的导出文件。AI 的读取操作(含 sync.status)在只读模式下即可工作。修改、导出、review.next、sync.run 与 sync.cancel 需要 danger-full-access,因为私有牌库位于对话工作区之外。工具既不会主动申请,也不会绕过授权;没有你的明确意图,不要评分或同步。
删除牌组、登录/退出、设置与全量同步确认不提供任何 AI 动作,它们走独立的 RPC,且必须由已认证的所有者发起——即便是内部调用也一样。导入的笔记、模板与网页内容一律是不可信数据,不能当作操作指令。
后台进程只打开自己的私有牌库,并持有进程生命周期的系统级锁。APKG 导入的媒体写入不能原子回滚,导入前的牌库备份也不等于完整的媒体备份。需要一份独立完整备份时:禁用插件、等后台进程退出,然后复制整个数据目录(包含牌库、媒体与附属文件)。不要只复制一个正在使用的 SQLite 文件。 整目录副本包含受保护的账号状态,请不要分享;手工迁移后可能需要重新登录。本地并发的文件系统篡改不在本集成的保证范围内。
见验证记录:覆盖真实核心 + 官方本地同步服务器、DPAPI、传输层、调度器、客户端结构、隔离 Chromium 布局以及真实 Gateway 的检查。测试从不使用桌面版配置或真实 AnkiWeb 账号;合成布局测试不等于已认证的生产 UI 验收,也不等于真实云端验收。
插件本身:AGPL-3.0-or-later。另见 Anki 上游声明、第三方声明 与 Python 许可。子进程边界并不免除许可义务。
A native DSH sidebar and an anki AI tool sharing one independent, per-DSH-profile collection, powered by real headless Anki — no Anki desktop window, AnkiConnect, Qt or replacement web server is started. Independent integration, not an official Anki product. Version 2.0.0 bundles the headless core and its Python dependencies for out-of-the-box installation, retaining the native responsive layout.
Requirements: Windows x64 or macOS 12+ (Apple Silicon and Intel), and DSH ^0.2.1-rc.2 (verified on 0.2.1-rc.3; @deepseek-ai/dsh* peers are declared as ranges, not exact pins). CPython 3.13.5, official Anki 26.5 / 26.05 headless core and all its Python runtime dependencies are bundled. No separate Anki/Python/pip installation or first-start dependency download is required. Qt is not bundled.
Install: From 2.0.1 the package is published to npm as @nanoshiki/dsh-anki, so the plugin manager installs it by name and the market can offer version updates. The prebuilt dsh-anki.tgz on the latest release remains available as an offline alternative; both share the same data directory. Leave ankiPackages and pythonPath empty and use the bundled runtime; explicit absolute overrides remain supported, with no silent external fallback.
Upgrade: wait for sync, disable the plugin and let its Python worker exit, back up the whole data directory, then replace the installed package with the new release archive, keeping the data directory unchanged and clearing old ankiPackages / pythonPath overrides to select the bundled runtime. Version 2.0.0 renames the package to @nanoshiki/dsh-anki, so an @local/dsh-anki install is a one-time new-package install; migrating from the older @local/dsh-anki-workspace identity is likewise one-time. Never enable two copies together, keep the data directory, and never point dataDir at an Anki desktop profile.
Sync: credentials are entered only on the owner-only Sync page and stored with Windows current-user DPAPI or macOS Keychain, bound to the workspace path, with no plaintext fallback. Manual sync runs native collection sync and then native media sync. Automatic sync is on by default and is scheduled by the host. Every full upload or download waits for explicit confirmation with a mandatory overwrite warning; AI and automatic sync can never confirm a direction. Both full directions snapshot the local collection, media and media database first — a local backup cannot restore overwritten cloud data. Failed or cancelled sync can leave partially completed changes; cancellation is not rollback.
Note editing (2.1.0) supports rich text, lists, inline pasted images and HTML source editing in both Add and Browse. Custom markup opens in source mode to preserve it.
Operations: deck create/rename, native note types and search, note/tag editing, card suspension, APKG import and export, and review of a selected deck (including descendants) with Again/Hard/Good/Easy. Deck deletion is owner-only, previews the affected subdecks, cards and orphaned notes, requires the exact full deck name, protects the ID-1 default deck, and cannot be undone by review undo. Media is basename-only and capped at 5 MiB per response; reviewer HTML is script-disabled and sandboxed, and add-ons/custom reviewer JavaScript/MathJax are unsupported.
Permissions: AI reads work in read-only mode; mutations, exports, review.next, sync.run and sync.cancel require danger-full-access, because the private collection lives outside the conversation workspace. Deck deletion, login/logout, settings and full-sync confirmation expose no AI action at all and require an authenticated owner. Imported notes, templates and page content are untrusted data, never instructions.
Backups: disable the plugin, wait for its worker to exit, then copy the entire data directory — not a live SQLite file. Import media writes are not atomically rolled back. A whole-directory copy includes protected account state; do not share it.
Verification: automated checks cover isolated native collections, localhost sync services, DPAPI, transport, scheduling, structural client behavior and an isolated Chromium layout fixture. They do not establish that a particular live installation, real AnkiWeb account or cloud connection works. Use your existing authenticated plugin manager and GUI; no replacement server is required. See the acceptance checklist and verification record. Licensed AGPL-3.0-or-later, with the Anki upstream notice, third-party notices and Python license.
Contributing: changes are accepted only through pull requests; main is protected against direct pushes, force pushes and deletion, including for the owner. See CONTRIBUTING.md.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: sync。