Chat | Agent switch for DeepSeek Harness, derived from dsh-autonomy 0.1.5 (MIT) with one change: Chat mode keeps the reading half of the tool surface (read, read_image, glob, grep, web_search, web_fetch, skill, read-only memory tools) while write, edit, pwsh and every other mutating tool are denied; Agent mode restores the full set. Three fences enforce it: the model-facing tool list is filtered, an execution-time guard denies non-allowlisted calls, and a system-prompt section states what the mode permits. The mode is stored per session, so it survives refresh, restart and resume.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:2251702615q-png/dsh-autonomy-ro
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A Chat | Agent switch for DeepSeek Harness, where Chat is a read-only conversation mode instead of a tool-free one.
Upstream dsh-autonomy hides every tool in Chat mode. This variant keeps the reading half of the tool surface: the model can still open files, search the workspace, search the web and inspect session state — but it cannot change anything.
What Chat mode allows
Reading and looking, never changing:
| Group | Tools |
|---|---|
| Files (read only) | read, read_image, glob, grep |
| Web (read only) | web_search, web_fetch |
| Reference | skill, pua_reference, load_workspace_dependencies |
| Inspection | cordis_inspect_list, cordis_inspect_query, job_list, job_output, list_agents, get_goal, schedule_list, team_task_list, team_task_get |
| Memory (read only) | hindsight_search_knowledge_pages, hindsight_list_knowledge_pages, hindsight_read_knowledge_page, hindsight_reflect, hindsight_sync_status, hindsight_diagnose |
| Documents (read only) | univer_status, univer_inspect, univer_api, univer_lint |
| Conversation | ask_user_question |
Everything else is denied: write, edit, pwsh, job_kill, workflow,
spawn_teammate, send_message, todo_write, create_goal, update_goal,
schedule_create, schedule_update, schedule_delete, team_task_create,
team_task_update, present, and every other mutating tool.
The list is an allowlist, not a denylist: a tool added to the profile later is denied in Chat until it is listed here. Unknown names never throw.
How the block is enforced
Three independent fences, because one is never enough:
system-prompt/assemblefilters the model-facing tool list down to the allowlist, so a mutating tool is never offered to the model.tools.guarddenies any non-allowlisted call at execution time, so a hallucinated, replayed, or hand-written call still cannot run.- A system-prompt section states what the mode permits.
Install
Requires DeepSeek Harness 0.2.1-rc.2 or newer. Zero dependencies, zero build.
dsh plugin --profile web add github:2251702615q-png/dsh-autonomy-ro
Use your own profile name in place of web — it is the folder name under
~/.dsh/profiles/ (desktop for the desktop app).
Then restart DSH. The plugin has a host half (it composes the system prompt and guards the tool surface), so a restart is the reliable way to pick it up.
Desktop build, if you prefer the GUI: 侧栏 → 插件 → 添加插件, then paste the
absolute path of a downloaded .tgz / folder.
Usage
- Switch with the Chat | Agent control above the composer, or with
/autonomy chatand/autonomy agent. - New sessions default to chat (configured in the profile patch).
- The per-session mode is recorded in the session log, so it survives refresh, restart and resume; a fork inherits it.
- Switching to Chat does not cancel an action that is already running — use Stop to end it.
Configuration
- id: dsh-autonomy-ro
config:
defaultMode: chat # chat | agent
# chatGuidance: custom prompt text
# denyMessage: custom denial text
# readOnlyTools: [read, glob, grep] # override the allowlist entirely
readOnlyTools replaces the built-in list, so a short list is a quick way to
make Chat stricter. Keep read/glob/grep in it if you still want the model
to be able to look at files.
Trade-off
Chat cannot write, so any request that needs a change has to be re-asked in Agent mode. That is the point: nothing is modified while you are only talking.
Provenance and credit
Derived from dsh-autonomy 0.1.5 by
JinkaiLiu (MIT). The switch, the durable
/autonomy <chat|agent> record, the session projection and the per-agent
instrumentation are the upstream design; the only behavioural change is that
Chat keeps the reading half of the tool surface.
Both projects register the /autonomy command and the autonomy session
projection, so do not install dsh-autonomy and dsh-autonomy-ro at the same
time — pick one.
Development
node test-logic.mjs # pure logic: mode folding, allowlist
node test-fences.mjs # the three fences
node test-smoke.mjs # apply() against a fake Cordis context
License
MIT — see LICENSE. Upstream copyright is retained.
Links
More in this category
kenryu42/cc-safety-net★ 2103
Pre-execution guard that blocks destructive Git and filesystem commands and access to secrets such as SSH keys and .env files before a tool call runs.
ADWMC/helm-d#helmd★ 1516
Security-analysis plugin for DeepSeek Harness: 33 tools spanning six security domains, evidence/reporting and toolbox, plus the case lifecycle, routing and tool ledger; a session-bound case workflow with an evidence chain, E-id validation and reproducible findings; 362 on-demand references; three hot-swappable persona profiles; and a four-tab workbench (armor / case / intercept / about) with case-state recovery after context compaction.
toby-bridges/api-relay-audit★ 933
Runs local security audits of AI API relays and LLM proxies from DeepSeek Harness, producing Markdown reports for prompt injection, model substitution signals, tool-call rewriting, error leakage, stream integrity, and profile-gated Web3 risks.
SeaOf0/dsh-redteam-model★ 922
Authorized-security DSH collection: nine work modes (redteam coordinator, pentest, code audit, binary analysis, attack-defense, AV evasion, incident response, cloud security, CTF solving) and fifteen runtime plugins, managed from a settings page with one-click deploy, install, update and uninstall.
howmp/dsh-pentest★ 624
Authorized pentest mode for DeepSeek Harness — exploration chain, assets and findings with a Web view.
PerryLink/dsh-auto-review★ 255
Second-model auto-review on the approval answerer chain: a read-only reviewer subagent returns structured allow/deny verdicts with reasons, fail-closed by default.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.