본문으로 건너뛰기
2

dsh-autonomy-ro

2251702615q-png/dsh-autonomy-ro

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.

설치

dsh plugin --profile web add github:2251702615q-png/dsh-autonomy-ro

README

dsh-autonomy-ro

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:

GroupTools
Files (read only)read, read_image, glob, grep
Web (read only)web_search, web_fetch
Referenceskill, pua_reference, load_workspace_dependencies
Inspectioncordis_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
Conversationask_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:

  1. system-prompt/assemble filters the model-facing tool list down to the allowlist, so a mutating tool is never offered to the model.
  2. tools.guard denies any non-allowlisted call at execution time, so a hallucinated, replayed, or hand-written call still cannot run.
  3. 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 chat and /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.

관련 플러그인