agent-orchestrator-mcp-server 0.7.15 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -222,7 +222,7 @@ export class AgentOrchestratorClient {
|
|
|
222
222
|
return this.request('POST', `/sessions/${id}/restart`);
|
|
223
223
|
}
|
|
224
224
|
async changeMcpServers(id, mcp_servers) {
|
|
225
|
-
const response = await this.request('PATCH', `/sessions/${id}`, {
|
|
225
|
+
const response = await this.request('PATCH', `/sessions/${id}/mcp_servers`, {
|
|
226
226
|
mcp_servers,
|
|
227
227
|
});
|
|
228
228
|
return response.session;
|
|
@@ -328,6 +328,30 @@ export function actionSessionTool(_server, clientFactory) {
|
|
|
328
328
|
}
|
|
329
329
|
case 'change_mcp_servers': {
|
|
330
330
|
const session = await client.changeMcpServers(session_id, mcp_servers);
|
|
331
|
+
const requested = [...mcp_servers].sort();
|
|
332
|
+
const actual = [...(session.mcp_servers ?? [])].sort();
|
|
333
|
+
const diverged = requested.length !== actual.length || requested.some((name, i) => name !== actual[i]);
|
|
334
|
+
if (diverged) {
|
|
335
|
+
const formatList = (list) => (list.length > 0 ? list.join(', ') : '(none)');
|
|
336
|
+
return {
|
|
337
|
+
content: [
|
|
338
|
+
{
|
|
339
|
+
type: 'text',
|
|
340
|
+
text: [
|
|
341
|
+
`## MCP Servers Update FAILED — server list unchanged`,
|
|
342
|
+
'',
|
|
343
|
+
`The API accepted the request but the session's MCP servers do not match what was requested. This usually indicates the request hit a backend endpoint that silently dropped the parameter.`,
|
|
344
|
+
'',
|
|
345
|
+
`- **Session ID:** ${session.id}`,
|
|
346
|
+
`- **Title:** ${session.title}`,
|
|
347
|
+
`- **Requested:** ${formatList(mcp_servers)}`,
|
|
348
|
+
`- **Actual:** ${formatList(session.mcp_servers ?? [])}`,
|
|
349
|
+
].join('\n'),
|
|
350
|
+
},
|
|
351
|
+
],
|
|
352
|
+
isError: true,
|
|
353
|
+
};
|
|
354
|
+
}
|
|
331
355
|
const lines = [
|
|
332
356
|
`## MCP Servers Updated`,
|
|
333
357
|
'',
|