dsh-plugins
开发工具 活跃维护

dsh-plugins

sumomok/dsh-plugins

是适配主流交互工具的轻量插件集合,安装后即可直接使用,支持引用历史会话消息、编辑并重新运行提示词、查询账户余额与消费记录,操作直观,无需跳转额外页面即可完成相关操作。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
1.1 MB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:sumomok/dsh-plugins
git clone https://github.com/sumomok/dsh-plugins.git
git clone git@github.com:sumomok/dsh-plugins.git
README.md main

dsh-plugins

English | 中文

Two plugins for the DeepSeek Harness web GUI, developed outside that repository and published to npm under the @sumomok scope.

The harness treats everything as a plugin, and its out-of-tree extension path is a first-class one: a profile under $DSH_HOME/profiles/<name> lists bundle layers in its package.json, and any npm package declaring dsh.bundle.patch can be one of them. Nothing here needs a fork of the upstream checkout or a patch to it.

Packages

Package npm What it does
packages/quote-message @sumomok/dsh-quote-message Quote earlier content of the current session into the composer as a native reference chip, rendered back as a quote card above the sent message.
packages/balance @sumomok/dsh-balance Show the DeepSeek account balance and what this installation has spent.

@sumomok/dsh-quote-message lets you cite earlier content of the current session while you compose: select a passage in any chat message and a native reference chip carries that text into your prompt, expanding at submit time into one markdown blockquote. Once sent, the quote is shown as its own card above your message rather than as a run of > lines inside it — the plugin shadows the host's user-bubble renderer and hands the bubble itself back to it. It is client-only — the host half is a no-op that exists so the loader sees a real cordis plugin. Full documentation: English · 中文.

@sumomok/dsh-balance puts a chip beside Settings at the sidebar foot showing what is left in the provider account, with a popover breaking down the balance and what this installation has spent today, this month, and in total, plus a line under the composer showing what the open conversation has cost. The balance is the provider's own number; the spend is the harness's own logged token usage priced against a table this deployment owns and can change from cordis.yml. Full documentation: English · 中文.

The sidebar balance chip, its breakdown popover, and the session spend line

The account balance is masked in that recording; the spend figures are the real ones.

Install

Each package is an ordinary npm package that declares dsh.bundle.patch, so the harness's own plugin command installs it into a profile:

dsh plugin --profile <name> add @sumomok/dsh-quote-message
dsh plugin --profile <name> add @sumomok/dsh-balance

The install appends the package to the profile's dsh.profile.bundles and its patch layer mounts the plugin; nothing needs to be added to the profile's own cordis.patch.yml. Both contribute browser-side UI, so the profile needs a bundle that composes the Web surface (@deepseek-ai/dsh-web-app) — there is nothing to see in a headless profile.

Every published tarball carries a prebuilt lib/, so an install never runs a build at the install site.

Compatibility

Built against @deepseek-ai/* 0.1.1-rc.2 — a host of that generation, desktop app or source checkout. Node ^22.19 || >=24.

The peer ranges are spelled >=0.1.0-rc.1 <0.2.0-0 rather than ^0.1.0-rc.7, because a caret range over a prerelease does not match a later prerelease under semver rules: ^0.1.0-rc.7 does not satisfy 0.1.1-rc.2. Every @deepseek-ai/* peer is optional, so a host that composes only some of them still installs.

Security summary

Each package's own README carries the full statement; this is the short form.

  • quote-message — no network, no filesystem, no storage, no custom session events, no host routes or services. The quoted text reaches the model only inside the prompt you send, which the host logs as the ordinary user/message it is.
  • balance — network egress to the configured provider's origin and nowhere else; a base URL whose derivation would leave that origin is refused rather than fetched. The API key is resolved through the host credential seam once per read, sent as an Authorization header, and never logged, cached, written to disk, or returned to the browser. The two RPC methods it exposes are read-only. Its only disk write is its own spend ledger under $DSH_HOME/dsh-balance.

Neither writes custom session-event types, so uninstalling one can never leave a session the host refuses to load.

Development

pnpm install
pnpm run build       # each package's own build: tsc, then its bundler
pnpm run test        # vitest over every package
pnpm run typecheck
pnpm run lint

pnpm run test works on a fresh clone: the build smoke for quote-message runs its own bundler first. balance's build smoke skips when its lib/ is absent, so run pnpm run build before pnpm run test to exercise every assertion.

Each package owns its whole build, because each emits a browser bundle in the closure-factory form the web shell's module loader consumes, which no shared node-platform config can produce. pnpm --filter @sumomok/dsh-<name> run build builds one on its own.

package.json          workspace root: shared toolchain, no runtime dependencies
pnpm-workspace.yaml   packages/*
tsconfig.base.json    the compiler face every package extends
tsconfig.json         solution file; one reference per package
eslint.config.js
packages/<name>/
  package.json        @sumomok/dsh-<name>
  tsconfig.json       extends ../../tsconfig.base.json
  cordis.patch.yml    the bundle layer this package contributes
  src/                sources; local imports carry the .ts extension
  tests/              vitest specs
  lib/                build output (git-ignored; shipped in the npm tarball)

lib/ is git-ignored here and listed in each manifest's files, so the repository carries sources only while every published tarball carries the prebuilt artifacts.

License

MIT.