Repository navigation
fix(minimax-bot): 审批那句话不再替宿主许诺 - #125
Merged
MyPrototypeWhat merged 1 commit intoNov 11, 2026
Merged
MyPrototypeWhat merged 1 commit into
MyPrototypeWhat merged 1 commit into
Conversation
MyPrototypeWhat
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(minimax-bot): 审批那句话不再替宿主许诺
README 的 Agent turns 段里有一句 "Nothing is approved automatically."。它是无条件承诺,而插件管不了这件事。是否要审批由宿主的权限模式决定,宿主不问,审批卡一张都不会出现。这句改成条件句,把两半分开。要不要问由宿主的权限模式决定,一旦要问,插件绝不自己批准,只把用户的选择转给宿主。位置在 README.md 的 198 行,改后是 202 行,因为同一个提交在它前面插了一节版本说明。
写这句话的意图是好的,它想说的是插件不会自作主张放行工具调用,这部分是真的,代码里也确实只有一处把页面的 Allow once 映射给宿主,没有任何自动批准。问题在于它把一个插件不控制的结果写成了自己的承诺。宿主在 Full access 下压根不问审批,读者看到这句会以为门一直有人守着,而实际上开不开这扇门由宿主决定。仓库里另一份 REAL-MODEL-TEST.md 早就写对了这个区别,说工具审批不弹窗是因为 config.yaml 里 permissionMode 设成了 bypassPermissions;只有对外发布的 README 没交代。
改动只落在这一句文档上,产品代码、界面文案、文案键名、重试行为全都没变,仍然只有 engine.mjs 里那一处把 allowOnce 映射给宿主。版本号三个落点同步到 0.7.26,README 加一节 0.7.26 说明这件事,其余一概不碰。切片基于上游 0.7.25 重做,也就是 #122 合并之后的主线。
三个测试里,第一条钉住句子里的条件从句和插件自己那半句,同时反向挡住四种翻转,包括旧句的两种变体、把结论说成插件自己批、以及单独的 automatically 这个词。第二条把 manifest、package.json 和 mcp.mjs 的 serverInfo 三处版本钉成同值。第三条按标题切段,要求 0.7.26 在 0.7.24 之后,且这一段里至少有一条在讲审批,只有标题没有条目不算。新测试放进未改的 0.7.25 单跑是 1 过 2 败、退出码 1,在切片上是 3 过 0 败,整套连跑是 411 条全绿。
这个改动只在单元测试和本地验收脚本里验过,没在真实宿主里跑过一遍。本机 permissionMode 是 bypassPermissions,审批卡一次都没弹过,所以宿主不问审批这一半是从宿主代码包里读出来的,不是看出来的。三种权限模式的名字我没有写进 README,因为本机无法核实它们的确切语义与文案,只写到由宿主权限模式决定这一层。
本地验收脚本用 tail 截了输出,正好两次都赶上并发跑时的轮询超时抖动,其中一次显示 410 过 1 败。同一个切片单独跑整套连跑两次都是 411 过 0 败,未改动的对照切片在并发下也会掉同样的几条,归因是本地 20 路并发下的 until 轮询超时,与这行文档无关。线上 CI 是单跑的。
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.