Repository navigation
Fix three self-hosted code mode bugs (i18n hint, Test button, codeMode write path) - #1445
Merged
Merged
Conversation
- i18n: reword the code-uses hint so ICU stops falling back to its key
(literal { } braces and <id> tags broke next-intl formatting)
- Test button: route saved code tools to the out-of-process runner with
the same governance, instead of the REST engine that HTTP-called the
connector base URL and failed
- codeMode write path: add it to the MCP server update DTO + service and a
select on the server settings page, so admins no longer need raw SQL
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #1444. Three bugs found while enabling code mode on a self-hosted instance. No schema change; off by default everywhere (unchanged until an operator runs the code-runner and a workspace sets
codeMode).Changes
toolEditor.codeUsesHintinmessages/{en,de,it}.jsonheld a literal JSON example with{ }braces and<id>; next-intl/ICU parsed{as a placeholder and<id>as a tag, threw, and fell back to the raw key (Next dev overlay showed "1 Issue"). Reworded the hint in words — no braces, no angle brackets.POST /api/connectors/:id/tools/:toolId/testcalledexecuteConnectorCall(REST/engine path, nomethod:'code'branch), so a code tool HTTP-called the connector base URL and failed. Now routes code tools toDynamicMcpTools.runSavedCodeTool, the real out-of-process runner path, with the same governance (uses allow-list, read/write, invoker/definer). NomcpServerIdis passed (owner testing their own tool, like an operator call).codeModewas missing from the MCP server DTO and the UI, so it could only be set in the DB. AddedcodeModetoUpdateMcpServerDto(@IsIn(['off','tools','inline'])) + the service, a select on the server settings page, and a sharedCODE_MODE_MODESconstant.Cloud vs self-hosted
Same on both; no behaviour change until the runner is configured and a server's
codeModeis turned on. These are usability fixes for the admin flow, most relevant to self-hosted.Testing (worktree, after
npm ci+prisma generate)packages/backend:npx tsc --noEmitclean;eslintclean on changed files;jeston the touched areas — tools.controller / secret-guard / dynamic-mcp-tools(.code) / kg-skill (211 pass) and mcp-servers + license (265 pass).packages/frontend:npx tsc --noEmitclean;eslintclean on changed files.intl-messageformatin en/de/it.node scripts/generate-llms-txt.mjs --checkclean after a docs note.Reviewed every line.