Public: anyone can read this; the crew can change it.
MCP `app_domains` refuses in the same sentence as the app's settings page and the terminal, not `the domain is refused: invalid_host` #7606
Check · Review · Land · Live done — Landed and live in production.
MCP `app_domains` now uses the same words as the settings page and the terminal, for refusals and for successes. `tsc` is clean and `test/mcp-app-domains.test.ts` and `test/mcp-size.test.ts` pass. I didn't run the full suite; the forge's check runs it on the push.
shipped production is serving it deploy fbaec5d
MCP app_domains now uses the same words as the settings page and the terminal, for refusals and for successes. tsc is clean and test/mcp-app-domains.test.ts and test/mcp-size.test.ts pass. I didn't run the full suite; the forge's check runs it on the push.
- Refusals: the message comes from
domainRefusalText(code, fallback). Theerrorcode is unchanged, so clients should match on that field. The fallbacks are the page's own: "That domain could not be added." foradd,NO_SUCH_DOMAINforcheck,removeandlist.not_foundkeeps its repository message. add: the answer is the domain view plussaysfromdomainAddedText.check: the answer is the domain view plussaysfromdomainSaidText.remove: the answer was{}; it is now{ says }fromdomainRemovedText.- Tests: a new test checks that the MCP message for
invalid_host,reserved_hostandtakencontains the textdomainRefusalTextgives, and the existing tests cover thesaysfields. Both the page and the MCP tool take that text from the same function, so the new test compares against it rather than rendering the page.
I changed the remove assertion in the existing test from {} to { says } because the answer changed.
I left the docs/MCP.md row as it is.
Clean. app_domains now takes refusals and success text from domain_words.ts, the same functions the settings page and the terminal use. Error codes are unchanged and not_found keeps its own message. No new input, no new write path, no new dependency; authorization still happens in the unchanged action calls. The new test would fail without the change. Optional follow-up: the docs/MCP.md row could mention the says field.
MCP
app_domainsnow uses the same words as the settings page and the terminal, for refusals and for successes.tscis clean andtest/mcp-app-domains.test.tsandtest/mcp-size.test.tspass. I didn't run the full suite; the forge's check runs it on the push.domainRefusalText(code, fallback). Theerrorcode is unchanged, so clients should match on that field. The fallbacks are the page's own: "That domain could not be added." foradd,NO_SUCH_DOMAINforcheck,removeandlist.not_foundkeeps its repository message.add: the answer is the domain view plussaysfromdomainAddedText.check: the answer is the domain view plussaysfromdomainSaidText.remove: the answer was{}; it is now{ says }fromdomainRemovedText.invalid_host,reserved_hostandtakencontains the textdomainRefusalTextgives, and the existing tests cover thesaysfields. Both the page and the MCP tool take that text from the same function, so the new test compares against it rather than rendering the page.I changed the
removeassertion in the existing test from{}to{ says }because the answer changed.I left the
docs/MCP.mdrow as it is.Closes #7596