mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 00:49:41 +02:00
feat(mcp): add Antigravity, fix Gemini http/sse shape, report unsupported CLIs
Formats verified against real agy/gemini/codex mcp add output. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
e6b258fc44
commit
41a10b159e
@@ -1140,7 +1140,10 @@ Object.assign(CodemanApp.prototype, {
|
||||
const conflicts = data.conflicts.length
|
||||
? `<p>Defined differently across CLIs, left unchanged: ${data.conflicts.map(escapeHtml).join(', ')}</p>`
|
||||
: '';
|
||||
show(`<ul>${rows.join('')}</ul>${conflicts}`);
|
||||
const unsupported = data.unsupported?.length
|
||||
? `<p>No MCP config support for: ${data.unsupported.map(escapeHtml).join(', ')}</p>`
|
||||
: '';
|
||||
show(`<ul>${rows.join('')}</ul>${conflicts}${unsupported}`);
|
||||
},
|
||||
|
||||
_setUpdateResult(html) {
|
||||
|
||||
@@ -30,12 +30,19 @@ function gate(req: FastifyRequest): ApiResponse<never> | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Enabled agent CLIs with no known MCP config file (sync cannot touch them). */
|
||||
export function mcpUnsupportedLabels(): string[] {
|
||||
return enabledClis()
|
||||
.filter((e) => e.kind === 'agent' && !e.capabilities.mcpConfig)
|
||||
.map((e) => e.label);
|
||||
}
|
||||
|
||||
export function registerMcpSyncRoutes(app: FastifyInstance): void {
|
||||
const run = async (req: FastifyRequest, apply: boolean): Promise<ApiResponse<McpSyncResult>> => {
|
||||
const denied = gate(req);
|
||||
if (denied) return denied;
|
||||
try {
|
||||
return { success: true, data: await syncMcpServers(mcpSyncTargets(), { apply }) };
|
||||
return { success: true, data: await syncMcpServers(mcpSyncTargets(), { apply }, mcpUnsupportedLabels()) };
|
||||
} catch (err) {
|
||||
return createErrorResponse(ApiErrorCode.OPERATION_FAILED, getErrorMessage(err));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user