Preface¶
When running agents in DeepSeek Harness (dsh), models can typically only modify local files or invoke MCPs configured separately. However, if a collaborative platform requires that “every write is a reviewable proposal, logged on a run ledger, and accepted/rejected by a human,” while also adhering to workspace conventions, a thin adapter layer is needed between the harness profile and the node.
Stuga is a self-hosted collaborative workspace featuring real-time documents, a SQL-queryable structured database, hybrid search, and first-class access for AI agents. Agents do not silently write to disk; edits enter a reviewable ledger as proposals. @stuga/dsh-plugin (maintained by stuga-dev, categorized under Workflow in community directories) connects a specific dsh profile to a Stuga node. It mounts Stuga’s MCP tools, embeds the workspace associated with the API key and its conventions into the system prompt, and registers three on-demand playbook skills, ensuring the model within the harness behaves according to Stuga’s review and permission model.
What is this¶
In short: @stuga/dsh-plugin is a thin connection layer between Stuga and DeepSeek Harness. The npm package name is @stuga/dsh-plugin; the version in the current documentation is 0.2.0, and it is MIT licensed. The run ledger enforced on the Stuga side, access control within retrieval, per-invocation auditing, read-only keys, etc., are all handled by the Stuga node. The plugin only holds the agent key and shapes the model’s behavior on this API surface.
Core Components and Capabilities¶
The plugin is intentionally lightweight, consisting mainly of three parts (see the table in the repository README):
| Part | Function |
|---|---|
cordis.patch.yml |
Hooks the harness’s built-in MCP client to the node’s /mcp, with tool names prefixed as mcp__stuga__* on the model side |
index.js |
Registers a system-prompt section (explaining how calls are routed and reviewed), appending the workspace associated with the key and its conventions; also registers three playbook skills |
skills/ |
stuga-research, stuga-propose-edits, stuga-databases, loaded on-demand via the harness’s skill tool |
Read-type MCP tools (listed in the materials): workspaces, docs, search, markdown, comments, folders, events, collections, retrieve, databases, query.
Write-type tools: docs_create, markdown_append, markdown_edit, comments_add, media_upload, collections_edit, databases_add, databases_change. Under Stuga’s semantics, write operations generate proposals that are handled by humans in a review interface, rather than the model side treating a “successful write” as the end of the task.
Workspace conventions: The node provides instructions for each workspace in the MCP instructions, but the harness’s MCP client does not expose this field, and models often do not call the instructions action on workspaces. Therefore, the plugin uses the same key to read the workspace_id, name, and conventions of the “workspace associated with the key” and pins them to the end of the prompt section. Before writing to other reachable workspaces, the prompt and playbooks require calling workspaces action instructions first. Folder, database, and document-level instructions are not summarized in the system prompt but are delivered to the model through tool results like markdown read and docs metadata; the prompt requires reading the document before editing.
Review-side visibility: Tool results for proposals will show Proposed — … This is SUCCESS: do NOT retry; the prompt requires the assistant to provide <STUGA_URL>/doc/<doc_id> and <STUGA_URL>/review links at the end of its reply. Runs in the inbox carry a deepseek-harness badge (the plugin sends an x-stuga-client header), and the name comes from the name you gave when minting the key in Stuga. If the document is configured to apply agent changes immediately, the result will show Applied. You can set a model label via the environment variable STUGA_MODEL (displayed alongside the client badge).
Installation and Activation¶
Prerequisites: A running Stuga node and a DeepSeek Harness installation (Node ^22.19 || >=24, with pnpm in the PATH).
-
In Stuga, open Settings → Your own AI, select DeepSeek Harness, and mint an agent key. The name will appear in the review inbox; you can narrow it down by folder, set it to read-only, or set an expiration. The key has access to all workspaces you belong to; if narrowed by folder, it is limited to the workspace where it was minted. This page will print the installation command with the key filled in and environment variable lines.
-
Install the plugin into the profile you actually use (the common profile name for the Web UI is
web):
dsh plugin --profile web add @stuga/dsh-plugin
If installing from a local checkout instead of npm: dsh plugin --profile web add /path/to/dsh-plugin.
- Tell the harness the node address and key. You can export these in the shell where you start the harness or write them to
$DSH_HOME/.env:
STUGA_URL=http://127.0.0.1:8787
STUGA_API_KEY=vk_…
- Restart
dsh weband use the following command to check if the combination is working:
dsh --profile web --dump-config
You should see two lines: stuga-mcp and stuga-guidance. In a new session, mcp__stuga__* tools should be available, and the skill tool should list the three playbooks mentioned above.
Uninstall: dsh plugin --profile web remove @stuga/dsh-plugin.
Configuration (stuga-guidance)¶
The stuga-guidance line supports the following fields (default values from the source material):
| Field | Default | Meaning |
|---|---|---|
url |
$STUGA_URL or http://127.0.0.1:8787 |
The origin used by the model when providing links to reviewers |
serverName |
stuga |
Must match the serverName in the MCP line; determines the mcp__<serverName>__ prefix in the prompt |
section |
true |
Whether to register the system-prompt section |
skills |
true |
Whether to register the three playbook skills |
instructions |
true |
Whether to read the key’s workspace conventions and write them into the system prompt |
instructionsRefreshMs |
300000 |
Interval for re-fetching conventions (milliseconds) |
If you need to change MCP transport, TLS, timeouts, etc., you can override the entire config line in $DSH_HOME/profiles/web/cordis.patch.yml by id (the patch replaces all configs for that line, so you must write out all necessary keys). The README provides YAML examples for pointing stuga-mcp to https://notes.example.com/mcp, using Bearer authentication, setting toolCallTimeoutMs: 120000, etc.
Typical Usage and Review Flow¶
-
After completing installation and setting environment variables, ask the model in a harness Web session to use Stuga tools to search or read documents (optionally loading
stuga-researchvia theskilltool). -
When modifications to documents or database tables are needed, the model should use write-type MCP tools; results are returned as proposals. The assistant should include the doc and review links in its reply, rather than retrying calls because the “write did not happen directly.”
-
You open the review link in Stuga and accept or reject per hunk; in the inbox, you can identify the source by the
deepseek-harnessbadge and the key name.
In the DeepSeek Harness Web UI, tool calls are displayed as generic cards; the signals friendly to humans are mainly the text returned by the tool and the links in the assistant’s reply.
Use Cases and Limitations¶
Suitable for: Teams already using or planning to use Stuga for team documents and structured data, who want to use DeepSeek Harness as the frontend agent, and accept the workflow where “all writes are proposals” and “the key holder is the reviewing party.”
Runtime and Trust: The plugin runs with the permissions of the current dsh process. Before installation, you should read the GitHub source code and the MIT license, and understand the permission scope of the agent key.
Limitations explicitly listed in the materials:
- Keys are static; the harness MCP client has no OAuth and no browser login; apply “one person, one key” and do not share team keys.
- Only conventions for the workspace associated with the key are pinned in the system prompt; for other workspaces, the model must actively fetch
workspacesinstructions. - Document/folder/database-level instructions only appear in results like read/metadata; editing without reading may lead to missed constraints.
- One key shares the re-fetching of conventions within the same refresh cycle (The README starts truncating here with “One key shares one re…”, please refer to the repository README for the full sentence).
The DeepSeek Harness ecosystem emphasizes “everything is a plugin”; the SkillHub directory page is a community site and has no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
@stuga/dsh-plugin does not re-implement Stuga’s review and permissions. Instead, it connects MCP tools, workspace conventions, and three playbooks to a designated dsh profile, enabling harness agents to collaborate via the proposal flow on Stuga. The installation command is subject to the README: dsh plugin --profile web add @stuga/dsh-plugin.
- Directory Page: https://www.skillhub.cn/plugins/stuga-dev/dsh-plugin
- GitHub: https://github.com/stuga-dev/dsh-plugin