DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Storage Mysql — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
S

@sandersyao/dsh-storage-mysql

Storage Mysql

适用于 DeepSeek Harness 存储中心(ctx.storage)的 MySQL 后端

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:sandersyao/dsh-storage-mysql#3d0773c30a9a49a96769728c1db2d87d0718e6cd
README兼容性版本

兼容性与来源证明

Storage Mysql 以 @sandersyao/dsh-storage-mysql 发布,当前版本为 0.1.2。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/10

版本

0.1.2stable
2026/9/10
0.1.1stable
2026/9/4

相关插件

正在加载相关插件…

最新版
0.1.2
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/10
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。Reme@agentscope-ai/reme面向 TypeScript 代理的 ReMe 客户端和记忆集成Stratagate Dshstratagate-dsh最近的对话依然鲜活。较早的对话会逐渐淡化为摘要,而不是被遗忘。StrataGate 为 DeepSeek Harness 提供六层、随时间衰减的记忆,同时将持久的事件和关系沉淀为知识图谱。将你在其他 AI 中的记忆带来Meow Memorymeow-memoryDeepSeek Harness 的跨会话项目记忆:七层 SQLite 记忆、首轮快照注入、每条消息的关键词命中、memory_remember/search/project 工具、带 reflection-fold UI 的自动反思,以及由空闲触发的梦境整合

README

@sandersyao/dsh-storage-mysql

A cartoon dolphin in front of a bookshelf, busy at a keyboard

English | 中文

The MySQL storage backend for the DeepSeek Harness storage hub (ctx.storage) — a drop-in, contract-equivalent alternative to the built-in @deepseek-ai/dsh-storage-json backend. Load it as a plugin; it registers the mysql backend on ctx.storage.backend, exposes the kv facet, and persists KV units into MySQL (InnoDB ACID, crash-safe, cross-process visible).

Companion plugins (distributed dsh deployment)

This backend is one of a four-plugin set for a distributed dsh deployment on a shared MySQL. dsh-storage-mysql (this repo), dsh-credentials-mysql, and dsh-session-persistence-mysql switch the default storage / credentials / session-persistence backends to shared MySQL, while dsh-workspace-bootstrap declaratively seeds a default workspace so the first session can start on an empty database.

PluginGitHub repositorynpm package page
@sandersyao/dsh-workspace-bootstraphttps://github.com/sandersyao/dsh-workspace-bootstraphttps://www.npmjs.com/package/@sandersyao/dsh-workspace-bootstrap
@sandersyao/dsh-credentials-mysqlhttps://github.com/sandersyao/dsh-credentials-mysqlhttps://www.npmjs.com/package/@sandersyao/dsh-credentials-mysql
@sandersyao/dsh-session-persistence-mysqlhttps://github.com/sandersyao/dsh-session-persistence-mysqlhttps://www.npmjs.com/package/@sandersyao/dsh-session-persistence-mysql

Install & usage

import { apply, Config, inject, name } from '@sandersyao/dsh-storage-mysql'
// Route the storage-domain facility to this backend:
//   ctx.plugin({ apply, Config, inject, name }, { connection: { tablePrefix: 'dsh_storage_' } })
// With storage-domain config { backend: 'mysql' }, ctx.storage.domain is MySQL-backed.

Easiest path is the bundle patch (see below): add the package and its cordis.patch.yml keeps the default storage-json backend and simply points storage-domain.backend at mysql — the json backend stays available for per-domain routes.

Guides

  • Try it in a dsh profile without touching existing json storage — docs/DSH_PROFILE_TRIAL.md.
  • Production / npm install & cordis.patch.yml integration (replace the default backend) — docs/DEPLOYMENT.md.

Configuration

Connection details come from environment variables / a .env file (see .env.example). Independent STORAGE_* win; they fall back to the shared MYSQL_* — reuse the same connection when co-existing with dsh-session-persistence-mysql / dsh-credentials-mysql, or configure independently. The plugin Config is optional (only non-secret overrides); credentials never live in code or config.

EnvFallbackDefaultPurpose
STORAGE_HOSTMYSQL_HOST127.0.0.1Host.
STORAGE_PORTMYSQL_PORT3306Port.
STORAGE_USERMYSQL_USER— (required)Least-privilege DB user.
STORAGE_PASSWORDMYSQL_PASSWORD— (required)Password.
STORAGE_DATABASEMYSQL_DATABASE— (required)Target database.
STORAGE_TABLE_PREFIXMYSQL_TABLE_PREFIX— (required)Table prefix, validated ^[A-Za-z0-9_]+$; base names distinct from session/credentials.
STORAGE_SSL_REQUIREDMYSQL_SSL_REQUIREDfalseTLS (deferred).
STORAGE_POOL_SIZEMYSQL_POOL_SIZE10Pool sizing.
STORAGE_SCHEMA_AUTO_MIGRATEMYSQL_SCHEMA_AUTO_MIGRATEtrueAuto-migrate schema on startup.

Test isolation. Automated tests run against a separate database (STORAGE_TEST_DATABASE, default test); MYSQL_ROOT_PASSWORD is used only by the test harness to create/grant it.

Storage layout

Three tables under the prefix:

  • Pstorage_units — unit → format version + global_json (NULL = never-written).
  • Pstorage_records — (unit_name, table_name, record_key) → JSON value.
  • Pstorage_meta — applied schema version.

Base names differ from session-persistence and credentials, so even sharing a database and prefix causes no collision. unit_name/table_name/record_key are always parameter-bound (never used as SQL identifiers); only the validated prefix is interpolated into backticked table names.

Backend contract (equivalent to dsh-storage-json)

  • Registers backend mysql; ctx.provide(storageBackendServiceKey('mysql'), backend).
  • kv.open validates names against UNIT_NAME_RE, materializes/version-checks a unit, and enforces one live handle per unit.
  • KvUnit: loadAll (transactional snapshot; global null sentinel), putRecord (upsert), deleteRecord (idempotent), setGlobal, close.
  • Errors: version-mismatch, malformed-medium, closed (via StorageError).
  • Each write is a single atomic SQL statement — durable once resolved; committed writes survive crash/reopen and are visible cross-process.

Schema & migration

Startup runs idempotent CREATE TABLE IF NOT EXISTS, then reads Pstorage_meta; an applied version higher than expected fails closed (downgrade unsupported). With STORAGE_SCHEMA_AUTO_MIGRATE=false, a mismatch fails instead of migrating.

Development

pnpm install
pnpm typecheck && pnpm lint && pnpm build
docker compose up -d     # or reuse a running MySQL
pnpm test                # 35 tests
pnpm test:coverage       # coverage gate (lines ≥ 90)
pnpm smoke               # manual smoke (build first)

License

MIT