dsh-codeact-tools
CodeAct Agent toolkit for DeepSeek Harness, developed with DeepSeek Harness
- Stars
- 0
- Language
- TypeScript
- Created
- Aug 20, 2026
- Updated
- Aug 20, 2026
Introduction
dsh-codeact-tools
Self-contained minimal AI coding tool set for DeepSeek Harness:
| Tool | Package | Role |
|---|---|---|
str_replace_editor | @dsh-codeact-tools/tool-str-replace-editor | view/create/str_replace/insert/undo_edit file editing over the filesystem seam |
execute_bash | @dsh-codeact-tools/tool-execute-bash | Persistent per-agent bash session; per-call timeout (seconds) and reset |
finish | @dsh-codeact-tools/tool-finish | Concludes the turn with the message as the final answer |
The shared persistent-shell machinery (marker-based output capture, scrollback
assembly, session reset, per-owner serialization) is vendored in
@dsh-codeact-tools/persistent-shell, adapted
from @deepseek-ai/dsh-tool-bash-persistent (DeepSeek Harness, MIT). The
editor is forked from @deepseek-ai/dsh-tool-str-replace-editor with
undo_edit added. All tool packages depend only on the already-published
harness core (@deepseek-ai/dsh-tools, dsh-terminal, dsh-agent,
dsh-timeout, dsh-agent-loop, … at 0.1.0-rc.8) — nothing unpublished —
so this repo is installable on its own.
The tool schemas and descriptions are pinned against the reference CodeAct
tool set in tools.json by
tests/schema-parity.spec.ts. The only
documented divergence is the reference execute_bash is_input mode
(sending input to a still-running process), which is deferred; the shipped
description does not advertise it.
Packages
@dsh-codeact-tools/persistent-shell— shared core:registerPersistentShellTool,resolvePersistentBashConfig,persistentShellConfigSchema.@dsh-codeact-tools/tool-str-replace-editor— the file editor withundo_edit(str_replace/insert history is recorded per owner and path).@dsh-codeact-tools/tool-execute-bash— registers theexecute_bashtool.@dsh-codeact-tools/tool-finish— registers thefinishtool; a successful call carries theconcludesTurnterminal marker, so the agent loop commits the result and ends the turn without another model request.
Develop
pnpm install
pnpm build # tsc -b, emits lib/ per package
pnpm test # vitest: tool specs + tools.json schema-parity gate
Install
Two paths, both from this repository:
Local (no registry needed)
pnpm install
pnpm build
pnpm run install-mode # copies the mode preset + installs the tool packages
pnpm run install-mode -- --link # live developing: symlink preset + packages into the repo
Then start a session and pick the CodeAct Mode agent preset (or set
agent-presets.default in settings). The installer backs up an existing
codeact mode before replacing it; with --link, rebuilding in the repo
(pnpm build) pushes changes to the deployment immediately.
Published bundle
The repo ships @dsh-codeact-tools/codeact
(bundle/): a profile bundle whose dependencies pull the
tool packages into a deployment, whose preset/ holds the mode, and whose
dsh-codeact-install bin installs it. After pnpm publish:
{
"dsh": { "profile": { "bundles": ["@dsh-codeact-tools/codeact"] } }
}
pnpm install
pnpm dlx dsh-codeact-install
Composition for reference (the mode itself lives in
bundle/preset/agent.cordis.yml):
- id: execute-bash
name: '@dsh-codeact-tools/tool-execute-bash'
config:
timeoutMs: 300000
- id: finish
name: '@dsh-codeact-tools/tool-finish'
- id: str-replace-editor
name: '@dsh-codeact-tools/tool-str-replace-editor'
execute_bash requires an owning Agent, a real PTY backend
(@deepseek-ai/dsh-terminal-bash), and the host sandbox/subprocess rows; the
harness minimal preset is the reference for the surrounding composition.
Provenance
Derived from DeepSeek Harness (MIT): the persistent-bash core and the
editor and shell tool plugins originate in the harness's
packages/shell/tool-bash-persistent, packages/shell/tool-execute-bash,
packages/fs/tool-str-replace-editor, and packages/guard/tool-finish.
Behavior contracts are documented in the harness Agent Note
2026-08-20-minimal-mode-tool-set. The tool descriptions and schemas follow
the reference CodeAct implementation exported in tools.json.