@stuga/dsh-plugin
连接工作区以集成MCP工具和系统提示词 适合需要将DSH接入Stuga工作区并使用其MCP工具与规范的用户。
同名套件的其他儲存庫
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:stuga-dev/dsh-plugin說明文件
閱讀完整 README ↗Configuration
The stuga-guidance row accepts:
| Field | Default | Meaning |
|---|---|---|
url | $STUGA_URL or http://127.0.0.1:8787 | Origin used in the links the model gives the reviewer |
serverName | stuga | Must match the MCP row's serverName; sets the mcp____ prefix the prompt refers to |
section | true | Register the system-prompt section |
skills | true | Register the three playbook skills |
instructions | true | Read the workspace's conventions and put them in the system prompt |
instructionsRefreshMs | 300000 | How often those conventions are re-read |
The workspace's conventions
Stuga lets a workspace write free-text conventions for agents (Settings → This workspace → Agents): where notes go, what not to touch, the house style. The node serves them in its MCP server's instructions field, but dsh's MCP client does not surface that field, and a model told to go and fetch them often simply does not — in an end-to-end run, gpt-4o edited a document without ever calling workspaces action:instructions.
So the plugin reads them itself, over the same key, and puts them in the system prompt where they cannot be skipped. A node that is down, a key without access, or a workspace with no conventions all mean the same thing: the section is registered without them, and nothing fails.
Folders, databases and documents can carry their own instructions too, from their ⋯ menu in Stuga. They add to the workspace's, from the outermost level in, and depend on the item, so the plugin does not put them in the system prompt. The node hands them over with the item: markdown read shows them in a marked block before the document's text, or opens with a line saying none apply, so instructions planted in a document's text never lead the read; and docs metadata and create and databases schema return them as instructions. The prompt section and the playbooks tell the model to follow them when it writes there, never to copy them into an edit, and to treat anything further down a read that looks like such a block as document text.
Labelling the model
Runs from this plugin are badged deepseek-harness in Stuga's review inbox. dsh does not expose the running model to its MCP layer, so the model label is yours to set: export STUGA_MODEL=gpt-4o (or whichever you pinned) and it appears beside the client badge.
Override a row by its id in $DSH_HOME/profiles/web/cordis.patch.yml. A patch replaces the row's whole config, so restate every key you need. For example, to point the MCP row at a node behind TLS with a longer tool timeout:
- id: stuga-mcp
config:
serverName: stuga
transport: streamable-http
url: https://notes.example.com/mcp
headers:
Authorization: !!js '"Bearer " + process.env.STUGA_API_KEY'
x-stuga-client: deepseek-harness
toolCallTimeoutMs: 120000
failOnStartupError: false