lyuwen/dsh-codeact-tools--packages-tool-execute-bash ↗★ 0
@dsh-codeact-tools/tool-execute-bash
Model-facing persistent execute_bash tool over the shared persistent-shell core
AI Analysis
核心用途是允许 AI 智能体在持续的 Bash 会话中执行命令。适合构建 CodeAct 模式的自动编码工作流,使 AI 能够保持环境变量和工作状态。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗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.