跳过主要内容
P

dsh-rtk-minimal

paranoidphantom/dsh-rtk-minimal

在 `tools/execute` 钩子上把 bash 工具调用经 `rtk rewrite` 改写,因此对任意 provider 路由生效。零依赖、无需构建:单个 ESM 模块,退出码 0 与 3 时采纳改写结果,其余情况(无等价命令、命中拒绝规则、rtk 缺失、启动失败)原样执行,执行后还原原始参数;`RTK_PREFIX_ONLY` 直接改为 `rtk <cmd>`,`DSH_RTK_BIN` 用于指定二进制。

安装

dsh plugin --profile web add github:paranoidphantom/dsh-rtk-minimal

README

dsh-rtk-minimal

npm

Minimal DSH plugin: every bash tool call goes through rtk before it runs.

Install

dsh plugin --profile web add dsh-rtk-minimal
# restart `dsh web`, then run any bash tool call

Uninstall: remove the dsh-rtk-minimal entry from the profile's cordis.patch.yml / bundles and dsh plugin --profile web remove dsh-rtk-minimal. The bundle patch is applied automatically on install, so it is active as soon as the host restarts — there is no on/off switch.

Test

node --test test.js   # 6 cases against a fake rtk binary

相关插件