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.

D1 — DSH Plugin for DeepSeek Harness
← Plugins

dsh-d1

D1

Cloudflare D1 tools for the DeepSeek Harness: d1_list/query/exec/schema/stats/health over the D1 HTTP API — read-only first, lexical read-only guard, write-approval gate, row clamping, CSV/JSON output.

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-d1@0.1.0
READMECompatibilityVersions

Compatibility and provenance

D1 is published as dsh-d1 and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
npm
Registry updated
9/3/2026

Versions

0.1.0stable
9/2/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Declares sideEffects: false
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
npm
GitHub
★ 0
Weekly downloads
0
Last push
9/4/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
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

README

dsh-d1

Cloudflare D1 (serverless SQLite over HTTP) tools for the DeepSeek Harness — read-only first.

D1 is Cloudflare's serverless SQLite. Unlike a normal database it has no TCP socket — it is reached only over the Cloudflare REST API. So the excellent dsh-sql plugin (which pools TCP connections to SQLite/MySQL/Postgres) can't talk to it. dsh-d1 fills that gap: it speaks the D1 HTTP API directly, giving a dsh agent six tools to introspect and query any D1 database you configure.

It is read-only by default. Writes require flipping readOnly:false and passing an interactive approval gate.

Tools

ToolModeWhat it does
d1_listreadList configured databases and probe each (SELECT 1).
d1_queryreadRun one read-only statement (SELECT / VALUES / WITH … SELECT / introspection PRAGMA / EXPLAIN), with optional bound params. Row-capped.
d1_execwriteRun a write/DDL statement. Denied under readOnly; needs interactive approval otherwise.
d1_schemareadList user tables, or describe one table's columns (via PRAGMA table_info).
d1_statsreadTable count, per-table row counts (batched), database size.
d1_healthreadProbe every database and print the safety config (and any config error).

Every tool forwards the harness's cancellation signal to the D1 request, so a cancelled or timed-out call aborts the HTTP call instead of running to completion in the background. For d1_exec that only abandons the request: a statement D1 has already received may still be applied, so check with d1_query before retrying a cancelled write. The five read tools are marked concurrency-safe, so the harness may run them in parallel.

Install

The profile directory is a pnpm workspace root, so pnpm needs -w:

dsh plugin --profile web add -w dsh-d1

Or during development, from a local checkout:

cd dsh-d1 && npm install && npm run build
dsh plugin --profile web add -w /absolute/path/to/dsh-d1

Installing straight from git (github:cndn/dsh-d1) builds lib/ through the prepare script. pnpm 10 blocks that build until you allow it once: copy the onlyBuiltDependencies entry it prints (pinned to the git commit) into the profile's pnpm-workspace.yaml, then re-run the install.

Configure

The package already inserts a d1 row into your profile. Override its config from your profile's cordis.patch.yml with an id-targeted entry (not another insert, which would load the plugin twice). The API token is never part of this config — see below.

- id: d1
  name: 'dsh-d1'
  config:
    accountId: 'your-32-hex-cloudflare-account-id'   # or set CLOUDFLARE_ACCOUNT_ID in the env
    databases:
      - name: prod                                   # the friendly name the agent uses
        databaseId: 00000000-0000-0000-0000-000000000000
      - name: analytics
        databaseId: 11111111-1111-1111-1111-111111111111
        accountId: 'another-32-hex-account-id'       # optional per-db override
    maxRows: 1000            # d1_query row cap (1–10000; larger values are clamped)
    readOnly: true           # default true — d1_exec denied; set false to allow writes
    writeApproval: true      # writes must be confirmed interactively (default true)
    queryTimeoutMs: 60000    # 5 s – 10 min (clamped)
    execTimeoutMs: 120000    # 5 s – 10 min (clamped)

With no databases the plugin still loads (all tools register, d1_health reports "no databases configured") so it is usable for diagnostics. If the config is invalid the plugin falls back to read-only with no databases and d1_health prints the config error.

The API token (env-only)

The Cloudflare API token is read from the environment at call time and is never stored in config, written to the patch, logged, rendered, or included in any error message.

# Global token used for every database:
export CLOUDFLARE_API_TOKEN='...'
# Optional per-database override: DSH_D1_TOKEN_<NAME>, where NAME is the database
# name uppercased with non-alphanumerics replaced by "_" (my-db → DSH_D1_TOKEN_MY_DB):
export DSH_D1_TOKEN_PROD='...'

Create a token in the Cloudflare dashboard with D1 → Read for a read-only agent (or D1 → Edit if you intend to enable writes). The account id (32 hex characters) can come from accountId in config or the CLOUDFLARE_ACCOUNT_ID env var.

Read-only, at two layers

  1. d1_query is lexically guarded. After stripping comments, string literals and quoted identifiers (with SQLite's own quoting rules — backslash is not an escape), exactly one statement is allowed and it must be SELECT / VALUES / WITH … SELECT / PRAGMA (introspection forms only — no PRAGMA x = y, no PRAGMA x(value) setters, no PRAGMA optimize) / EXPLAIN of one of those. In SQLite none of these can modify data, so there is no interior keyword blacklist and column names such as release or set are fine. SELECTs are wrapped in SELECT * FROM (…) LIMIT maxRows+1 so a runaway query never transfers more than the cap.
  2. d1_exec is denied while readOnly:true — the pre-execute gate refuses it before any prompt. With readOnly:false, writeApproval:true (the default) routes every write through dsh's approval service: in the web UI you get a confirmation card showing the target database, statement count and the SQL. Where nobody can answer — a headless profile without an interactive answerer, a profile with no approval service at all, or DSH_PERMISSION_MODE=danger-full-access (dsh sets the approval policy to never) — the ask is auto-rejected and the write is denied, so in those modes d1_exec cannot run at all with writeApproval:true. writeApproval:false removes the gate entirely — the plugin logs a warning at boot when both flags are off.

This is deliberately stricter than a general SQL plugin: the safe default is that an agent can read your production data but cannot change it until you opt in.

Security notes

  • The token is env-only and must be printable ASCII; the bundled cordis.patch.yml carries no secrets and no real database ids.
  • Errors are redacted: a failed request surfaces the reason (timeout, cancellation, HTTP status, D1 error message) but never the token or request headers, and request paths echoed by Cloudflare have the account and database ids removed.
  • Table names are double-quote-escaped before use in PRAGMA table_info / COUNT(*) (d1_schema, d1_stats) so a name can't break out into arbitrary SQL.
  • CSV output neutralises spreadsheet formula prefixes (=, +, -, @) in string cells.

License

MIT

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseSubagent Codex@deepseek-ai/dsh-subagent-codexOne-shot Codex subagent provider over the official app-server protocol