DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

HelloQingTao /

HelloQingTao/dsh-global-prompt

Verified

Global instructions panel for DeepSeek Harness (dsh) web — fixed, installable fork of couplingartist/dsh-global-prompt

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@703fa8ec

@zfgcta/dsh-global-prompt

English | 中文

Edit the user-global instructions file (~/.dsh/AGENTS.md) from the DeepSeek Harness Web settings UI — no need to open the .dsh folder by hand.

Based on couplingartist/dsh-global-prompt (MIT, © couplingartist); this repository fixes its packaging so the plugin actually installs, and continues the work.

Settings page

What you get

Situation Behavior
Settings → 全局指令 (Global instructions) A new settings section: multiline editor + Save button + file path + character count
First save Creates ~/.dsh/AGENTS.md if it does not exist (UTF-8, no BOM)
Single source of truth The settings page reads/writes the same file external editors do — no second copy
Effect timing Follows the harness's touch-driven reload: new sessions read the latest content immediately; open sessions re-read on their next successful file tool call or turn
Security The HTTP API answers loopback (127.0.0.1) only; request bodies capped at 1 MiB

What this fork fixes

As published, upstream could never be installed from GitHub or npm:

Defect (upstream) Fix (here)
lib/ gitignored, no prepare/prepack → dsh plugin add github:... installs an empty shell (ERR_MODULE_NOT_FOUND) Prebuilt lib/ is committed, and prepack rebuilds before npm publish
The npm name dsh-global-prompt belongs to an unrelated project Published as @zfgcta/dsh-global-prompt
Peers pinned to 0.1.1-rc.2 → dsh 0.2.x rejects the install @deepseek-ai/dsh-client-* ranges >=0.2.0-rc.1 <0.3.0-0 + engines.dsh
dsh.client.inject lists modules that no longer exist in the shell Now lists dsh-client-ui-slots / dsh-client-ui-primitives (verified against the 0.2.0-rc.2 frozen module table)
Client bundle id hardcoded to the old name; source map leaks local paths Registers under the full package id; source maps disabled
No LICENSE / CHANGELOG / engines Added (MIT)

Install

# npm (recommended)
dsh plugin --profile web add @zfgcta/dsh-global-prompt

# or straight from GitHub (works because lib/ is committed)
dsh plugin --profile web add github:HelloQingTao/dsh-global-prompt

Restart the web instance so the new plugin loads:

dsh web

Then open http://127.0.0.1:3080 → Settings → 全局指令. (Adjust --profile web to the profile you actually run.)

Uninstall

dsh plugin --profile web remove @zfgcta/dsh-global-prompt
dsh web

Development

pnpm install
pnpm test         # vitest: store (13) + editor (7)
pnpm typecheck
pnpm build        # lib/index.js (host) + lib/client.js (client bundle)
File Role
src/store.ts Seam 1: read/write semantics of the user-global instructions file (unit-tested)
src/index.ts Host plugin: registers GET/PUT /api/global-prompt
src/client/GlobalPromptEditor.tsx Seam 2: the editor component (unit-tested)
src/client/api.ts HTTP implementation of the editor IO boundary
src/client/index.tsx Client plugin: registers the settings.section entry
tsdown.config.ts Build: ESM host lib + CJS client factory wrapped in __ModuleLoader__.load
cordis.patch.yml Bundle layer: inserts the global-prompt row

License & credits

MIT — see LICENSE. Original work by couplingartist (dsh-global-prompt); packaging, compatibility and maintenance fixes by HelloQingTao.


中文

English | 中文

在 DeepSeek Harness 的 Web 设置界面里直接编辑用户全局指令文件(~/.dsh/AGENTS.md),不必再手动打开 .dsh 目录改文件。

基于 couplingartist/dsh-global-prompt(MIT,© couplingartist);本仓库修复了它的打包问题使其真正可安装,并继续维护。

设置页

你会得到什么

场景 行为
设置 → 全局指令 新增一个设置分区页:多行编辑器 + 保存按钮 + 文件路径显示 + 字符数统计
首次保存 文件不存在时自动创建 ~/.dsh/AGENTS.md(UTF-8 无 BOM)
唯一真源 设置页与外部编辑器读写同一份文件,没有第二份数据
生效时机 遵循系统触摸驱动刷新:新会话立即读到最新内容;已打开会话在下一次成功文件工具调用或新一轮时重新读取
安全 HTTP 接口仅允许本机回环(127.0.0.1)访问;请求体上限 1 MiB

本仓库修复了什么

上游原版按它发布的样子在 GitHub / npm 上根本装不上:

缺陷(上游) 修复(本仓库)
lib/ 被 gitignore 且没有 prepare/prepack → dsh plugin add github:... 装出来是空壳(ERR_MODULE_NOT_FOUND) 预构建的 lib/ 直接入库,并在 npm publish 前用 prepack 重新构建
npm 上的 dsh-global-prompt 包名属于另一个无关项目 改名发布为 @zfgcta/dsh-global-prompt
peer 钉死 0.1.1-rc.2 → 被 dsh 0.2.x 拒装 @deepseek-ai/dsh-client-* 改为范围 >=0.2.0-rc.1 <0.3.0-0,并声明 engines.dsh
dsh.client.inject 引用了外壳里已不存在的模块 改为 0.2.0-rc.2 冻结模块表实际存在的 dsh-client-ui-slots / dsh-client-ui-primitives
客户端 bundle id 硬编码旧名;sourcemap 泄漏本地路径 按完整包名注册;关闭 sourcemap
缺 LICENSE / CHANGELOG / engines 已补齐(MIT)

安装

# npm(推荐)
dsh plugin --profile web add @zfgcta/dsh-global-prompt

# 或者直接从 GitHub 安装(lib/ 已入库,开箱即用)
dsh plugin --profile web add github:HelloQingTao/dsh-global-prompt

重启 web 实例使新插件生效:

dsh web

然后打开 http://127.0.0.1:3080 → 设置 → 全局指令。(--profile web 请换成你实际使用的 profile。)

卸载

dsh plugin --profile web remove @zfgcta/dsh-global-prompt
dsh web

开发

pnpm install
pnpm test         # vitest:store(13)+ editor(7)
pnpm typecheck
pnpm build        # lib/index.js(宿主半)+ lib/client.js(客户端 bundle)
文件 职责
src/store.ts 接缝 1:用户全局指令文件的读写语义(单测覆盖)
src/index.ts Host 插件:注册 GET/PUT /api/global-prompt
src/client/GlobalPromptEditor.tsx 接缝 2:编辑器组件(单测覆盖)
src/client/api.ts 编辑器 IO 边界的 HTTP 实现
src/client/index.tsx Client 插件:注册 settings.section 分区
tsdown.config.ts 构建:ESM 宿主 lib + 包在 __ModuleLoader__.load 里的 CJS 客户端工厂
cordis.patch.yml bundle 层:插入 global-prompt 行

许可与致谢

MIT — 见 LICENSE。原作者 couplingartist(dsh-global-prompt);打包、兼容性与维护修复来自 HelloQingTao。

—/ 5

No ratings yet

Verified DSH bundle

Commit 703fa8ec0741

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout