henryZhouLikeStudy/dsh-lattice-adapter-command ↗★ 0
dsh-lattice-adapter-command
DSH Lattice V1 command adapter: safe shell:false execution with persistent or one-shot JSON-lines / JSON-RPC sessions, cancellation, timeouts and output limits.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗@dsh-lattice/adapter-command
DSH Lattice V1 command adapter: safe shell: false execution with
persistent or one-shot JSON-lines / JSON-RPC sessions, cancellation,
timeouts and output limits.
This package is an independent community adapter, part of the DSH Lattice facade project. It is not affiliated with, endorsed by, or sponsored by DeepSeek AI.
Why it exists
The command adapter turns any executable into a Lattice provider with strict, auditable boundaries. It is the transport seam used by the aggregator's local provider and by the transports' demo engine, and it is safe to point at untrusted tools because:
- No shell, ever. Execution is
spawn(executable, args)with an explicit argument vector.shell: trueor a command string is rejected at config validation; shell metacharacters in arguments are inert data. - Deterministic limits. Every run has a timeout (default 120s), per-stream output caps (default 1 MiB) with an explicit truncation marker, and a per-frame cap for persistent protocols.
- Cancellation. Abort signals and per-call timeouts terminate the
process tree (process group on POSIX,
taskkill /T /Fon Windows). Results are never claimed to be exactly-once. - Environment policy.
inherit(default),allowlist, ornone.
Modules
| Module | Responsibility |
|---|---|
config | Strict config validation: executable policy, shell: false enforcement, arg/env validation, defaults |
framing | Line framing (one compact JSON frame per \n line) shared by both session protocols — the same framing the DeepSeek Harness SDK protocol uses |
runner | One-shot execution: timeout → SIGTERM → SIGKILL, output caps, abort cancellation, process-tree termination |
session |