feat: MCP-Server für remote_execute + Inline-Choice-UI

- Python MCP-Server (stdio, JSON-RPC 2.0) für remote_execute via Claude CLI
- Interner API-Endpoint /api/internal/remote-execute mit Token-Auth
- MCP-Config wird automatisch generiert wenn Remote-Verbindung vorhanden
- Auth-Middleware: /api/internal/ von Auth ausgenommen
- Frontend: :::ASK_USER_CHOICE::: Blöcke als interaktive Buttons rendern
- Streaming: Unvollständige Choice-Blöcke werden während des Streams versteckt
- tool-ui.js: MCP-Tool-Namen generisch normalisieren (mcp__server__tool → tool)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MelekiandClaude Opus 4.6 committed 2026-03-18 09:00:50 +01:00
1 parent ee0b817f25
commit 3b068a7866
14 files changed
+576 -6

No files matched your search

+9 -2
View File
@@ -10,12 +10,19 @@ const CLI_TOOL_NAME_MAP = {
'WebSearch': 'web_search',
'WebFetch': 'web_fetch',
'NotebookEdit': 'notebook_edit',
'ToolSearch': 'tool_search'
'ToolSearch': 'tool_search',
'mcp__gott-remote__remote_execute': 'remote_execute'
};
/** Normalize CLI tool name to gott convention (Edit → edit_file, etc.) */
function normalizeToolName(name) {
return CLI_TOOL_NAME_MAP[name] || name;
if (CLI_TOOL_NAME_MAP[name]) return CLI_TOOL_NAME_MAP[name];
// Generisch: mcp__server__tool → tool
if (name && name.startsWith('mcp__')) {
var parts = name.split('__');
return parts[parts.length - 1] || name;
}
return name;
}
/** Normalize CLI tool input fields (file_path → path, old_string → old_text, etc.) */