DimitriLIAN/dsh-habits0

dsh-habits

DeepSeek Harness 个人习惯编辑器,支持在网页设置中直接编辑全局用户指令文件 AGENTS.md,并自动注入到每个会话中。

AI 分析

核心用途是让用户无需手动改写文件即可配置全局 System Prompt 偏好。适合希望 AI 记住其特定编码习惯、语言偏好或行为约束的 DSH 用户。

套件
dsh-habits
版本
0.1.0
授權
MIT
最近更新
2026年8月14日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DimitriLIAN/dsh-habits

dsh-habits

English | 中文

A DeepSeek Harness (DSH) plugin that adds a My Habits editor to the Web settings → General section. The text you save goes to the user-global instruction document $DSH_HOME/AGENTS.md, which the built-in dsh-agent-instructions loader already injects into every session — so your preferences and habits reach the model automatically.

No DSH core is modified: the host half registers a small REST surface on ctx.webServer (/api2/habits/describe + /api2/habits/update), and the browser half registers a settings.general.item row that calls it. This is the same standalone-bundle pattern as dsh-web-plugin-manager.

Install

dsh plugin add --profile web github:/dsh-habits

Then restart the web profile (dsh --profile web) so the bundle layer loads. Open Settings → General → My habits, write your note, and save. New sessions pick it up immediately; a running session refreshes on its next file touch or resume.

How it works

LayerMechanism
Host halfctx.inject(['webServer'])ctx.webServer.register() for describe/update
ReadreadFileSync($DSH_HOME/AGENTS.md); absence is a blank document, never an error
Writeatomic rename under a 65 536-byte budget, with a SHA-1 expectedRevision conflict refusal
Browser halfsettings.general.item slot (id habits), fetch the REST surface
Injectionthe built-in dsh-agent-instructions loader injects ~/.dsh/AGENTS.md as the workspace-instruction baseline

Build

pnpm install
pnpm run build

build = host tsc + client tsc (declarations) + tsdown (the __ModuleLoader__.load client bundle).

Known limitations

  • Applies to new sessionsdsh-agent-instructions refreshes on the next successful read/write/edit touch, on resume, or when a shadowed baseline re-enters; a mid-conversation save does not rewrite an already-running session immediately.
  • One editor owns the document — concurrent edits are arbitrated by the expectedRevision conflict refusal, not merged.