dshbase

Plugin directory / Data / session-persistence-rdb

session-persistence-rdb

Unverified morlay

✓ Actively maintained Builds on 8 official DSH packages Pure TypeScript

View on GitHub ↗ ← Back to plugin directory

4Stars
0Forks
0Open issues
TypeScriptLanguage
2026-08-14Last push
Cross-platformPlatform

What it does

Session relational database persistence.

Our take
Unverified — not yet verified

Session relational database persistence. Not yet verified — install and test it yourself.

“Unverified” means our automated CI has not yet installed this plugin. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

Plugin author? Get the “Verified” label — submit your own evidence (screenshots, logs, or a short demo) and we'll review and flip the badge.

Submit verification evidence ↗

README

@morlay/session-persistence-rdb

RDB(SQLite / PostgreSQL)持久会话后端(ctx.sessionPersistence):通过 drizzle
实现 PersistenceBackend<number>,复用上游 PersistenceCoordinator 与契约测试套件,
支持配置选择 SQLite 或 PostgreSQL 后端。设计细节(表结构、delta 过滤、并发写、
方言差异、仓库结构)见 docs/design.md

安装

包发布在 GitHub Packages,按包名安装到 dsh profile(示例:web;dsh plugin add 把参数原样转发给 pnpm,版本号按发布版本调整)。registry 必须限定在
@morlay scope(--config.@morlay:registry=…),不要用全局 --registry
否则依赖(@deepseek-ai/* 等)也会被指到 GitHub Packages 而解析失败:

dsh plugin --profile=web add "@morlay/session-persistence-rdb@^0.0.1" --config.@morlay:registry=https://npm.pkg.github.com/

GitHub Packages 的 registry 要求认证(公开包也一样):profile 的 .npmrc
需为 npm.pkg.github.com 配置访问 token(如
//npm.pkg.github.com/:_authToken=<token>),详见
GitHub 文档

配置

配置写在 ${DSH_HOME}/settings.yaml,settings namespace 为插件短名
session-persistence-rdb(与 cordis 插件 name 一致):

session-persistence-rdb:
  type: sqlite
  # path 省略时回落 cordis.patch.yml 的默认($DSH_HOME/sessions/sessions.sqlite,
  # 由 bundle patch 的 !!js 表达式求值);自定义路径请用绝对路径字符串。
  path: /absolute/path/to/sessions.sqlite
  journalMode: wal
  busyTimeout: 5000

settings.yaml 是纯 YAML(settings-local 用 yaml 库解析),不支持 !!js
JS 表达式
——!!js dshHomePath(...) 会被当作字面字符串。!!js 只在
cordis.patch.yml(bundle patch 层,loader 求值)有效。

字段即 Config 判别联合(见下);未写出的字段回落到 bundle patch / cordis.yml 的
config 默认值。PostgreSQL:

session-persistence-rdb:
  type: postgres
  connectionString: postgres://user:pass@localhost:5432/sessions

Config 类型:

type Config =
  | {
      type: "sqlite";
      /** SQLite 数据库文件路径;`:memory:` 用于测试。 */
      path: string;
      /** journal_mode:`wal`(默认)/ `delete` / `truncate` / `persist`。 */
      journalMode?: "wal" | "delete" | "truncate" | "persist";
      /** 写锁竞争等待毫秒数(默认 5000)。 */
      busyTimeout?: number;
    }
  | {
      type: "postgres";
      /** node-postgres 连接串;首次打开自动建表并写入 store 身份。 */
      connectionString: string;
    };

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install session-persistence-rdb for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:morlay/session-persistence-rdb

Headless (CLI) profile:

dsh plugin --profile headless add github:morlay/session-persistence-rdb

Test report

Not yet L3-verified — see failure note below if we already ran it.

Status: pending
Note: 验证: install-fail (0.1.0-rc.6) Browse all pending failures →

When to use it

Let the agent crunch data — parse, transform, or analyze — so it works with real datasets, not just prose.

Who it's for

Users whose tasks involve tables, files, or numbers that need processing or analysis.

For developers — extending it

Data sources and transformation tools are the seams — add formats, aggregations, or visualization outputs.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Data

Browse all 7795 plugins →