rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:fire-disposal/dsh-mojibake-interceptor
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness 装的乱码拦截插件:AI 把乱码写进文件之前先拦一次,让它复查;当前版本 0.3.0,对齐 DSH 0.2.2-alpha.2 插件协议。
状态:可用;要求:Node >=24.9.0、DSH >=0.2.2-alpha.2 <0.3.0;仓库:fire-disposal/dsh-mojibake-interceptor
在写入前拦截乱码、靠字符统计与编码回环判断的 DeepSeek Harness 插件。
基于 Cordis 的 DeepSeek Harness 插件,纯 JS ESM,运行依赖 iconv-lite,测试 Node runner。
tools/pre-execute:扫 write / edit / str_replace_editor / apply_patch 的待写入文本,以及 pwsh / bash / terminal_send 的命令文本,命中就 deny 并附上特征与还原结果;补丁只扫新增行,不拦修复乱码时保留的旧行tools/post-execute:扫 pwsh / bash / terminal_open / terminal_send / terminal_read / job_output / read 的捕获结果,输出乱码时注入通知-Encoding Default/ANSI/OEM/Unicode、GetEncoding(936)、chcp 非 65001)严重拦截;含非 ASCII 却没声明 -Encoding utf8 的按中等拦截warn / block / ask,SHA-256 指纹键是「工具 + 路径 + 待写入文本」,LRU 表封顶 4096 条,不长期保留原始写入内容maxRunChars 2048 / maxRuns 64 / maxFindings 8 止损# 从 GitHub 安装;bundle 安装后重启 dsh web
dsh plugin --profile web add "github:fire-disposal/dsh-mojibake-interceptor#main"
# 本地开发(替换为实际绝对路径)
dsh plugin --profile web add link:/absolute/path/to/dsh-mojibake-interceptor
# 检查 bundle 已进入组合树
dsh --profile web --dump-config
dsh plugin --profile web remove dsh-mojibake-interceptor
npm install
npm test
package.json 用 engines.dsh 声明运行时装载兼容范围,dsh.bundle.patch 指向 cordis.patch.yml。用户可在 profile 的 cordis.patch.yml 覆盖 mojibake-interceptor 行;注意 config 是整行替换,不是深合并。
配置项:mode、tools、resultWatchTools、pwshEncodingGuard、minSeverity、excludePaths、maxFindings、maxRunChars、maxRuns、maxPreviewChars。
run_code、ctx.fs 这类入口拿不到待写入的纯文本,tools 列表也扩不过去。iconv-lite 时运行时会自动降级(CP1252 与统计特征照常,GBK/Big5 方向失效),但测试不降级:不装依赖跑,regression-normal 里 5 项会失败。gbk-as-cp1252 为压误报刻意收紧)。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。