为dsh storage hub提供SQLite后端,支持kv facet,用于持久化workspace records等非会话域数据
ⓘ 此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。
- 语言
- TypeScript
- License
- MIT
- 分支
- master
安装
$ dsh plugin --profile web add npm:@deepseek-ai/dsh-storage-sqlite在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
对话式安装
帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/storage/storage-sqlite:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。
把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。
English | 中文
SQLite backend for the storage hub: registers as backend sqlite, serving the kv facet over one node:sqlite database file (or :memory:). Design and trade-offs: domain KV storage Agent Note.
Storage model
Document-per-row: each unit table becomes a physical "u_<unit>_<table>" (key TEXT PRIMARY KEY, value TEXT) STRICT table whose value is the record's JSON text, so one key updates one row (the reason to route a high-churn domain here instead of the JSON backend). Unit identity lives in two metadata tables — units stamps each unit's format version at first open and rejects a differing descriptor with version-mismatch; unit_globals holds each unit's global singleton row. The physical layout version lives in PRAGMA user_version; any other stamped value rejects (unreleased format, no migrations). Unit and table names are validated against the hub's UNIT_NAME_RE before they reach DDL, so no external input is ever interpolated into SQL identifiers.
Every write primitive is a single prepared statement — SQLite's per-statement atomicity satisfies the KV contract without explicit transactions, and write ordering stays the caller's responsibility (the domain layer's write chain). Missing directories and database files are created owner-only (0o700/0o600), matching the session-persistence SQLite backend.
Configuration (schemastery)
interface Config {
path: string // SQLite database file path, or ':memory:' for an in-process DB
journalMode?: 'wal' | 'delete' | 'truncate' | 'persist' // journal_mode pragma; default 'wal'
}
Model Experience
Stored domain records
What the model sees
Nothing. This backend contributes no prompt, tool, or schema; it persists non-session domain data (workspace records, future session sidecar metadata) behind ctx.storage for host-side consumers only.
Token effect
Zero live-request tokens.
KV Cache effect
None — the backend never touches live request prefixes.
Known Limitations and Deferred Work
DatabaseSyncis synchronous — each write blocks the event loop for its (single-statement) duration; acceptable at domain-data scale.- No busy-wait or retry policy — another connection holding a write transaction rejects the operation immediately; there is no multi-process write protection.
- Only the current
STORAGE_SQLITE_SCHEMA_VERSIONopens — any other stamped version is rejected rather than migrated (pre-release stance). openDatabaseduplicates the session-persistence SQLite open sequence — extraction into a shared media layer is deferred to the planned session-backend migration (see the Agent Note's reuse audit).
收录徽章
[](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/storage/storage-sqlite)把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。