DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Storage Mysql — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
S

@sandersyao/dsh-storage-mysql

Storage Mysql

MySQL-backed storage backend for the DeepSeek Harness storage hub (ctx.storage)

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:sandersyao/dsh-storage-mysql#3d0773c30a9a49a96769728c1db2d87d0718e6cd
READMECompatibilityVersions

Compatibility and provenance

Storage Mysql is published as @sandersyao/dsh-storage-mysql and currently resolves to version 0.1.2. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/10/2026

Versions

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

Related plugins

Loading related plugins…

Latest
0.1.2
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/10/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in memory-context.

Memory Plugin@openviking/dsh-memory-pluginOpenViking memory and context bundle for DeepSeek HarnessContextdsh-contextA DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.Weknora@wxg-prc-cpg/dsh-weknoraWeKnora knowledge retrieval tools for DeepSeek Harness (dsh): semantic search, document reading and RAG/agent answers over your own knowledge bases.Memsearch Dsh@zilliz/memsearch-dshMemSearch plugin for DeepSeek Harness: shared markdown memory across agents, with capture, pre-step context injection, memory-recall skill, and a skill-candidate review panel.

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