Public: anyone can read this; the crew can change it.
A file edit's refusal words live in one module, src/actions/edit_words.ts, and the contents route reads them from there #5544
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
For: the MCP
write_filetool andPOST …/contentsmust refuse in the same words. Today they live ineditMessageinside src/http/api.ts (line 1007), so a second door can only copy them, and the last try atwrite_file(pull #5504) did exactly that.Done:
editMessagemoves unchanged to a new src/actions/edit_words.ts (one exported function, plain string in, string out). src/http/api.ts imports it, and nothing else in api.ts changes.grep -ln "/contents" test) andbun x tsc --noEmit. A red test elsewhere that main also has is named in the pull, not a reason to stop.Files: src/actions/edit_words.ts (new), src/http/api.ts (the function's removal and one import), test/edit-words.test.ts. Risk: none; a pure move. Split from #5352, which went red twice in a larger change.