refactor: consolidate agent wait methods and use in-memory MCP transport

This commit is contained in:
Mohamed Boudra
2026-01-30 14:50:01 +07:00
parent 0618dc6b0d
commit 25c7d5afa9
24 changed files with 191 additions and 469 deletions
+3 -3
View File
@@ -182,8 +182,8 @@ export async function runSendCommand(
}
}
// Wait for agent to become idle
await client.waitForAgentIdle(agentId, 600000) // 10 minute timeout
// Wait for agent to finish
const state = await client.waitForFinish(agentId, 600000) // 10 minute timeout
await client.close()
@@ -192,7 +192,7 @@ export async function runSendCommand(
data: {
agentId,
status: 'completed',
message: 'Agent completed processing the message',
message: state.status === 'error' ? 'Agent finished with error' : 'Agent completed processing the message',
},
schema: agentSendSchema,
}