dsh-agent-prompt

DSH PLUGIN会话与消息

仓库 icrefin/dsh-agent-prompt

会话与消息 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件

在 DSH 左侧边栏面板中直接编辑 Agent 真正加载的 AGENTS.md 指令文件,用户全局与各工作区路径一树览尽,保存即生效。

一句话选型结论

按资料字段整理

dsh-agent-prompt 是会话与消息类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 5 项功能,没有现成安装命令,需要按仓库 README 接入。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类会话与消息 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-10-10 创建于 2026-10-10
README 17.9 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-agent-prompt:在 DeepSeek Harness 侧边栏集中编辑 AGENTS.md 指令

  • 侧边栏面板集中管理指令文件
  • 全局与工作区路径树形浏览
  • 内置编辑器支持撤销重做换行
  • 保存即写入下次会话读取内容
  • 未创建文件自动新建并落盘

上游标签

agent-instructionsagents-mdai-agentscode-editorcordis-plugindeepseek-harnessdeveloper-toolsdshdsh-pluginguiprompt-engineeringreactself-hostedtypescript

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 没有现成安装命令,要按仓库 README 手动接入。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在会话与消息场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-agent-prompt当前 未做沙盒验证 未标注 0 未标注 无
dsh-desktop L3 · 安装规范通过 低风险 3.0 万 未标注 无
openpets L4 · 沙盒安装通过 低风险 1,274 未标注 有
deeptide L4 · 沙盒安装通过 低风险 1,104 0.1.1-rc.2 有
jingyun-dsh L3 · 安装规范通过 低风险 1,004 未标注 有
study-mate 未做沙盒验证 未标注 856 未标注 无

仓库档案

会话与消息
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方icrefin仓库 dsh-agent-prompt · 默认分支 main
分类会话与消息client
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言TypeScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-10-10 · 2026-10-10最后推送 2026-10-10
本站收录2026-10-10首次进入本站目录的时间

README 全文

17.9 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-agent-prompt

Edit the AGENTS.md instruction files DeepSeek Harness actually loads —
user-global and per-workspace — from a panel in the GUI's left sidebar.
English | 简体中文








Agent Prompt — edit the AGENTS.md instruction files DeepSeek Harness
actually loads, from a panel in the GUI's left sidebar.

DSH seeds every session with workspace guidance taken from AGENTS.md-compatible
files: one user-global file plus a project chain. Those files normally get edited
in an external editor, in a terminal, one path at a time. This plugin puts them
in one page: a tree of every global and per-workspace instruction file on the
left, a plain text editor on the right, and a Save button that writes the exact
bytes the agent will read next session.

┌── Agent Prompt ────────────────────────────────────────────────────────────┐
│  Filter workspaces…    │  ~/workspace/dsh-plugins/AGENTS.md                │
│                        │    ┌───────────────────────────────────────────┐  │
│  GLOBAL                │    │ Save  Reload │ Undo Redo │ Wrap           │  │
│   ● User-global        │    ├───────────────────────────────────────────┤  │
│     ~/.dsh/AGENTS.md   │    │ # dsh-plugins                             │  │
│  WORKSPACES            │    │                                           │  │
│   ● dsh-plugins        │    │ Instructions for agents working in this   │  │
│   ○ harness  (new)     │    │ repository.                               │  │
│                        │    └───────────────────────────────────────────┘  │
│                        │      20 lines  531 chars                  Saved   │
└────────────────────────────────────────────────────────────────────────────┘

What it contributes

Surface What it does
Sidebar row Agent Prompt a global panel row in the icon rail, directly under Schedules
The Agent Prompt page left tree (global + one node per registered workspace, with a filter) and a right editor
GET /api/agent-prompt/tree the resolved file list with per-file existence, size and mtime
GET /api/agent-prompt/file?key=… read one instruction file
POST /api/agent-prompt/file write one instruction file, creating it and its directory when missing

Those are host paths and stay absolute; the panel asks for them relative to
the document (AGENT_PROMPT_CLIENT_API, derived from AGENT_PROMPT_API by
clientPath() in src/protocol.ts). The distinction matters wherever the client
is not at the origin root: dsh-remote-control serves it at /s//,
and an absolute /api/… request would leave that prefix and be answered by its
host — a 200 text/html page that this panel would read as a body-less success
because request() tolerates a non-JSON body. test/protocol.spec.ts resolves
both forms against a mounted base to pin it.

Which files it edits, and why those

The host half resolves paths with the same rules as
@deepseek-ai/dsh-agent-instructions,
the package that loads these files. Its shipped defaults are
projectRootMarkers: ['.git'], instructionFileCandidates: ['AGENTS.md', 'CLAUDE.md']
and dshHome: $DSH_HOME || ~/.dsh; the agent-instructions row in
@deepseek-ai/dsh-base sets only maxBytes, so no path in this deployment is
overridden.

Node Resolution
User-global $DSH_HOME/AGENTS.md, falling back to ~/.dsh/AGENTS.md. An empty or blank $DSH_HOME counts as unset, matching the loader.
A workspace Walk up from the registered workspace directory to the first ancestor containing .git; the file is /AGENTS.md. With no marker anywhere the walk ends at the workspace directory itself.

The tree shows the resolved absolute path for each node, and marks a file
not created when it does not exist yet — saving creates it. A workspace whose
project root differs from its directory (a monorepo package, say) is shown
against its repository root, not the package.

Only AGENTS.md is offered. The loader also accepts CLAUDE.md,
AGENTS.local.md and CLAUDE.local.md at every level of the project chain, and
edits them too. Those are out of scope here; this panel is deliberately one file
per scope.

The page

Registrations, both keyed agentPrompt:

Slot Registration Effect
sidebar.panellist id: 'agentPrompt', order: 11 the icon row
main key: 'agentPrompt' the page the row opens in the centre column

The page title carries the panel's version and the author credit — Agent Prompt v0.1.2 Author: icrefin [icrefinai@gmail.com] — as a muted tag beside the
20px/500 title, matching dsh-skill-mgr and dsh-mcp-mgr.

Unlike those two, the number is inlined into the browser bundle at build time
rather than fetched from the host. The two halves of a plugin do not update
together: the browser bundle is re-imported the moment its revision changes,
while the host half is a boot-time ESM import that keeps serving the code the
process started with. A host-sourced tag therefore goes blank as soon as the
client gets ahead of the running host — which is exactly how this panel once
rendered a bare v. tsdown.config.ts reads package.json and defines
__DSH_AGENT_PROMPT_VERSION__; src/client/version.ts exports it, and the tag is
skipped when it is empty.

Selecting the row is ctx.layout.selectPanel('agentPrompt'), a lookup in the
live main registry, so the two share the id by construction. dsh.client.inject
orders the bundle after dsh-client-ui-sidebar and dsh-client-ui-layout, the
packages that declare those two slots.

Editor commands

Command Shortcut Notes
Save ⌘S / Ctrl+S anywhere on the page disabled until the draft differs from disk
Reload — discards the draft and re-reads the file; guarded by a confirm when dirty
Undo / Redo ⌘Z / ⇧⌘Z (native) a local history, since the platform stack cannot be driven from a button; a typing burst collapses into one step
Wrap — soft wrap on/off, remembered in localStorage

The clipboard gets no buttons at all: ⌘X, ⌘C, ⌘V and ⌘A already reach
the focused textarea, and a toolbar duplicate of a working platform shortcut is
noise. What is left is exactly the set the textarea cannot reach by itself.

Style contract

The panel follows the workspace's STYLES.md:

  • Colour is --dsw-alias-* only — the stylesheet contains no literal hex and
    no non-alias token. State chips are their state colour on a 10%
    color-mix(… transparent) tint; surfaces are bg-layer-1 (the tree column),
    bg-layer-3 (the editor field) and bg-module-platform (the filter, chips).
  • Buttons are the contract's two families: neutral is a bare 8px/12.5px
    control that fills with interactive-bg-hover → -active, and the primary Save
    uses button-primary-fill/-hover with label-primary-foreground.
    brand-primary appears only as the :focus-visible outline — never as a fill.
  • Type and geometry: 20px/500/28 title, 13px/20 intro, 11px chips; the header
    owns padding-top: 28px plus --dsh-frame-top-clearance under Darwin, and the
    page's horizontal rhythm is clamp(24px, 4vw, 48px).
  • color-scheme: light dark on the page root, with no dark-mode overrides: the
    tokens carry both modes.

The two-pane body is the one deliberate departure: the contract describes a
centred 960px column page, which would starve a tree-plus-editor split. The header
keeps the contract's inset so the title lines up with its sibling panels, and the
body is full-bleed beneath it.

The editor is a plain monospace ``: no Markdown preview, no syntax
highlighting. Switching files with unsaved changes asks first, and closing the
window with unsaved changes triggers the browser's own unload prompt. Saving or
reloading starts a fresh undo history, so Undo can never walk back to a body the
host never saw.

Install

The desktop profile is owned by the Electron application, so installs go through
Settings → Plugins (or the plugin-manager tool); dsh plugin add refuses that
profile.

pnpm install
pnpm build                              # tsc -> lib/, tsdown -> lib/client.js
npm pack --pack-destination dist        # dist/dsh-agent-prompt-0.1.2.tgz

Then add dist/dsh-agent-prompt-0.1.2.tgz from the Plugins page. The bundle is
recorded in the profile's dsh.profile.bundles and its cordis.patch.yml insert
row mounts the host half; the dsh.client manifest field loads the browser half.

Two operational notes:

  • Reinstalling the same version is a no-op. pnpm sees an unchanged spec and
    leaves the extracted copy in node_modules alone, so a rebuilt tarball at the
    same version does not reach the profile. Remove the bundle first, then install
    it again — or bump the version.
  • A first install needs no restart; an update of a loaded plugin does for
    host-side changes.
    On the first install the host routes mounted and the browser
    half registered as soon as the install finished, with no page refresh. After that
    the two halves diverge: the browser bundle is re-imported on its new revision,
    but the host half is a boot-time ESM import and keeps serving the code the
    process started with. A host-side change — a new route field, say — reaches the
    running app only on the next start; client-side changes never need one. This is
    upstream behaviour, not this plugin's: @deepseek-ai/dsh-hmr states that
    "replacing installed package versions still requires a restart". Restart if an
    entry reports failed to import.

HTTP API

Both routes are registered on ctx.webServer and carry a loopback-only fence:
the write route rewrites a file the agent reads as instructions, so a
LAN-exposed dsh web deployment must not serve it. Requests are additionally
capped at 4 MiB.

GET  /api/agent-prompt/tree
-> { dshHome, homeDisplay, global: Node, workspaces: Node[], skipped: string[] }

GET  /api/agent-prompt/file?key=global|ws:
-> { key, path, displayPath, exists, bytes, mtimeMs, content }

POST /api/agent-prompt/file   { key, content }
-> the same payload, re-read from disk after the write

Target keys are global and ws:. A workspace key must name a
registered workspace id — the panel cannot be pointed at an arbitrary path,
and an unknown id is a 404, not a filesystem probe. content is the whole file
body; a missing file reads as an empty string, and a write creates missing parent
directories.

Configuration

None. The plugin has no Loader config, no settings section and no stored state:
the files on disk are the state.

Architecture

Module Role
src/index.ts host plugin body: one ctx.effect registering the route family
src/routes.ts the /api/agent-prompt routes, the loopback/method/body fences, target resolution
src/files.ts harness-home resolution, .git project-root walk, file stat/read/write
src/protocol.ts the wire contract both halves import (paths + JSON shapes)
src/client/index.tsx browser plugin body: locale dictionaries + the two slot registrations
src/client/AgentPromptPanel.tsx the page: draft, dirty flag, load/save, tree↔editor wiring
src/client/PromptTree.tsx the left tree and its filter
src/client/PromptEditor.tsx the textarea, its toolbar and its undo history
src/client/version.ts the build-time-inlined version the title tag shows
src/client/api.ts, styles.ts, locales.ts, translate.ts fetch wrappers, injected CSS, en/zh copy

The workspace registry is read through ctx.get('workspaceRegistry') rather than
a hard inject: without it the routes still mount and the global file still works,
and only the per-workspace targets answer 503.

Develop

pnpm install
pnpm check     # tsc (host + client) then vitest
pnpm build     # tsc -p tsconfig.build.json && tsdown
pnpm test

lib/ and dist/ are build products and are not committed.

Preview harness

tools/preview.mjs renders the built client bundle outside the GUI and
screenshots it: it loads lib/client.js through a stub window.__ModuleLoader__,
calls the plugin's apply with a minimal fake client context, mounts the main
entry, and replays a captured tree through a stubbed fetch.

node tools/preview.mjs --out /tmp/ap-preview      # writes index.html + panel.png
node tools/preview.mjs --open                     # ...and opens the PNG

It needs Google Chrome (or Chromium/Edge) on the host, plus the react and
react-dom dev dependencies (the UMD builds the harness page loads). This is how
the panel's layout and stylesheet are checked without a browser session in the
running app.

Verification

Run on this host against dsh 0.2.1-rc.3 (desktop profile desktop).

Check Result
pnpm typecheck — host half clean
pnpm typecheck — client half clean; both slots.register calls are checked against the real SlotMap, so the main and sidebar.panellist ids, and the agentPrompt locale namespace, are compile-time facts
vitest run 25/25 pass
live host: GET /api/agent-prompt/tree 200, with the harness home resolved to ~/.dsh and one node per registered workspace carrying its real projectRoot
live client: Cordis Inspect Slots → sidebar.panellist occupant agentPrompt, order: 11, active: true
live client: Cordis Inspect Slots → main occupant agentPrompt, active: true
preview render the title + version tag, the tree, the toolbar, the editor and the status bar paint as designed. The harness also fails the render when lib/client.js does not carry the manifest version, which is the only check on the inlining

test/files.spec.ts (13 tests) exercises path resolution against a real temporary
filesystem — the $DSH_HOME precedence including the blank-string case, the .git
walk including the worktree .git-file form, and the missing-file/directory-in-file-
position cases. test/routes.spec.ts (10 tests) serves the real route handlers from
a real loopback HTTP server and drives them with fetch: tree shape, nested
workspace → repository root, read of a missing file, unknown target key, unknown
workspace, create-and-round-trip for both the global and workspace files, and the
method fence. Nothing about the handler bodies is stubbed. test/version.spec.ts
(2 tests) covers the one trap in the version module: it must stay importable where
the build-time define is absent. test/protocol.spec.ts (5 tests) resolves the
panel's request paths against a root base and against a mounted one, which is the
only check that would catch a request escaping a path prefix.

Not covered by an automated test: an end-to-end write against the live host (the
route tests write into a temporary directory instead, so no real AGENTS.md is
touched), and the platform clipboard shortcuts, which belong to the browser
rather than to this plugin.

Caveats

  • AGENTS.md only — CLAUDE.md and the .local overlays are not offered.
  • No live reload of external edits. The page reads a file when you select it
    or press Reload. If something else changes the file while the page is open,
    saving overwrites it; there is no mtime check or merge.
  • The routes are reachable by any local process, like every other
    loopback-fenced plugin API in this composition. They are not covered by the web
    app's ?token= launch token, because named routes are matched before the
    authenticated SPA fallback.
  • A pinned dshHome in the agent-instructions config would diverge from the
    panel's $DSH_HOME || ~/.dsh resolution. The shipped composition pins only
    maxBytes, so the two agree today.

Contributing

Issues and pull requests are welcome — see CONTRIBUTING.md
for the development setup and the sign-off expectation. Please report security
issues privately as described in SECURITY.md.

License

MIT — see LICENSE.

> If this panel saves you a trip to an external editor, a ⭐ star helps other DSH users find it.

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
dsh-agent-prompt 怎么安装?

本站没有抓到该条目的安装命令,请到仓库主页确认安装方式;这类条目多数是生态应用或尚未发布安装包的项目。

dsh-agent-prompt 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-agent-prompt 安全吗?

未标注。

dsh-agent-prompt 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-agent-prompt 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-agent-prompt 有哪些功能?

侧边栏面板集中管理指令文件、全局与工作区路径树形浏览、内置编辑器支持撤销重做换行、保存即写入下次会话读取内容、未创建文件自动新建并落盘。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

会话与消息
按星标排序,可作替代方案

dsh-desktop

dsh-desktop

为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。

L3 · 安装规范通过 3.0 万 星

openpets

openpets

L4 · 沙盒安装通过 1,274 星

deeptide

deeptide

L4 · 沙盒安装通过 1,104 星

jingyun-dsh

jingyun-dsh

井云 DSH 客户端插件,为 DeepSeek Harness 注入会员登录、订阅支付、算力管控与应用市场,让智能体和技能快速变成可交易商品

L3 · 安装规范通过 1,004 星

study-mate

study-mate

StudyMate 是 DSH 的「学习模式」预设与技能包,为数学、计算机科目定制学习路线、讲解课件与练习评估,跨科目共享记忆。

未标注验证等级 856 星

icrefin 的其它插件

6 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。