返回目录
Agent 与会话 插件

dsh-notes

991206772-debug/dsh-notes

Pinned project notes in the Harness sidebar; enabled notes are injected into the agent's system prompt.

Stars
0
Forks
0
Issues
0
更新
15 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:991206772-debug/dsh-notes

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

Project Notes (@local/dsh-notes)

A DSH bundle that adds a left-sidebar page of notes pinned per project. Notes you switch on are rendered into the agent's system prompt on every step, so project conventions and personal preferences stay in context without being repeated.

sidebar

What it does

  • Sidebar row (sidebar.panellist, id dsh-notes, order 21 — right after the host's Context row) and the page it selects (main, key dsh-notes).
  • Per-project notes. Each browser-selected project has its own list; the project list comes from the host's workspace registry, and any directory that already owns notes stays selectable.
  • Injection switch. Every note has its own switch. Only enabled, non-empty notes are injected, and only for agents whose working directory is that project.
  • Durable store. Notes live in <dsh home>/notes/<profile>.json, written atomically (temp file + rename) so a crash cannot truncate them.

Architecture

dsh-notes/
├── package.json          dsh.bundle.patch + dsh.client (platform web, immediately)
├── cordis.patch.yml      one insert row: @local/dsh-notes
├── index.js              Host half
├── client.js             Client half (plain-JS React, no build step)
├── locale/{en,zh}.json   Plugin Manager title/description
└── icon.svg              original artwork (redistribution-safe)

Host half (index.js) injects agents, systemPrompt, webServer, workspaceRegistry and owns:

Concern Extension point
Store JSON file under <dsh home>/notes/, atomic write
Panel data webServer.register({ kind: 'exact' }) on /dsh-notes/api/state (GET) and /dsh-notes/api/notes (POST)
Standing context one systemPrompt.section({ name: 'dsh-notes.project-notes', order: 780 }) registered on each agent's own context, rendering that agent's project only

The section is attached for agents created later (agent/created) and for agents already live when the plugin activates, so the current session starts honouring notes immediately. Attachments are removed on plugin unload.

Client half (client.js) registers the sidebar glyph and the page through ctx.slots.inject(slot, () => ctx.slots.register(...)), so both disappear with the host's declaration. Host calls go through document.baseURI-relative URLs. Styling uses --dsw-alias-* tokens only, so the page follows light/dark.

Behaviour notes

  • A project with no enabled notes adds no text: the system prompt is unchanged.
  • Notes are prompt input, not session history — editing one affects the next request and never rewrites the log.
  • The page saves on a 450 ms debounce and flushes pending keystrokes on unmount and on project switch.

Develop

The install links this directory, so edits apply without reinstalling: reload the page (Ctrl+R) after changing client.js; Host changes (index.js) need a Harness restart.

GitHub 安装与验证

仓库:https://github.com/991206772-debug/dsh-notes

桌面版可在插件管理中使用仓库地址安装;命令行版在自己的 Profile 中安装:

dsh plugin --profile web add github:991206772-debug/dsh-notes

公开源码不包含用户配置、笔记、真实会话、凭据或 node_modules。验证使用隔离目录,不主动重载正在运行的 DSH。

许可证

自有源码采用 MIT,署名 991206772-debug。

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类Agent 与会话
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: agent、prompt。