Repository navigation
v0.2.0
[0.2.0] — 2026-10-15
The delegation release: command coverage is no longer a list this plugin
maintains, it is whatever the installed rtk says it is.
Added
rtk rewritedelegation (src/rtk.ts).resolve()now spawns
rtk rewrite <command>and adopts whatever the binary prints on stdout,
instead of consulting a static executable→subcommand table. New rtk rules and
new rtk command families therefore take effect by upgrading rtk alone, with no
plugin release (ls,tree,read,diff,wc,oc,bun,ast-grep,
lint,prettier,format,ctest, … all route). Rewrites are also
non-prefix where rtk says so —head -20 foo.txtbecomes
rtk read foo.txt --head-lines 20.- Rewrite cache (
REWRITE_CACHE_MAX_ENTRIES = 1024, FIFO eviction) so
repeated commands skip the ~11 ms subprocess. - Cost filter
isRoutableCandidate()(src/wrap.ts): shell keywords and
everyday builtins (cd,echo,pwd,export, …) are skipped before
spawning. It is an optimization, not a policy — anything not provably
unroutable is handed to rtk. - New config field
rtkRewrite(boolean, defaulttrue): keep the executor
registered but skip the rewrite entirely. - Tunables:
RTK_BINoverrides the binary path,RTK_TIMEOUT_MSthe
per-rewrite timeout (default 2000 ms; a timeout means "no rewrite"). - Test suites:
tests/rtk.spec.ts(unit, driven by a stand-in binary via
RTK_BIN),tests/integration.rtk.spec.ts(feature parity against a real
rtk binary viaRTK_INTEGRATION_BIN), andscripts/resolve-rtk.mjsso
pnpm run test:integrationaccepts a plainrtkon PATH. - CI
real-rtkjob: downloads the pinned rtk release binary and runs the
integration suite against it, so the delegation claim is verified on every
push rather than asserted in prose. release.yml: taggingv*builds, packs and attaches
dsh-rtk-latest.tgzto the GitHub release, which is what the README's
tarball install URL points at.
Changed
- Package renamed
@deeptrial/dsh-bash-rtk→@viogus/dsh-rtk
(repoDeepTrial/dsh-bash-rtk→viogus/dsh-rtk). - Executors no longer share a base class.
RtkBashExecutor extends LocalBashExecutorandRtkSandboxBashExecutor extends SandboxBashExecutor,
each carrying its own rewrite state. An intermediate refactor had both extend
one common class; that silently droppedSandboxBashExecutor's
sandboxPolicystamping, so the command ran unconfined and
ctx.sandbox.confinewas never called. The small duplication is deliberate:
the base class decides confinement. - rtk is probed with
rtk --versionand the module must be imported as
@deepseek-ai/cordis, never barecordis— the host packages augment the
scoped name. - Peer ranges widened to
>=0.0.1-rc.1 <0.3.0-0for
@deepseek-ai/dsh-bash-local,@deepseek-ai/dsh-bash-sandboxand
@deepseek-ai/dsh-shell, plus@deepseek-ai/cordis ~4.0.4; all optional.
dsh.plugin.jsonengines is now>=0.1.0-rc.6 <0.3.0-0. The old three-way
prerelease OR chain excluded the installed 0.2.0-rc.2 host. - CI bumped to
actions/checkout@v5,pnpm/action-setup@v5,
actions/setup-node@v5. - Exit codes from
rtk rewriteare ignored on purpose: they encode rtk's
Claude Code permission protocol, which has no counterpart indsh. Only
stdout is read, and empty stdout is the single "no rewrite" signal.
Fixed
- Cache eviction ran after insertion, so the map could reach 1029 entries
against a 1024 bound; it now evicts first. - A stale comment claimed exit code 2 never prints to stdout. Upstream source
(src/hooks/rewrite_cmd.rs) andrtk rewrite --helpboth allow a
pipeline-rule message on 2; the implementation already handled it, the
comment did not.
Removed
- The hand-maintained
RTK_COMMAND_MAP(41 entries) and the metacharacter
bail-out that made every compound command pass through unwrapped. The legacy
purewrapWithRtk()is still exported for existing consumers, now declining
sudoand leadingNAME=valueassignments explicitly.