@myagentroam/agent 0.13.0 → 0.13.1
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/dist/extensions/mcp.js +8 -1
- package/package.json +1 -1
package/dist/extensions/mcp.js
CHANGED
|
@@ -332,7 +332,14 @@ export class ExtensionMcp {
|
|
|
332
332
|
const failure = results.find((result) => result.status === 'rejected');
|
|
333
333
|
if (failure?.status === 'rejected') {
|
|
334
334
|
materializeErrorStack(failure.reason);
|
|
335
|
-
|
|
335
|
+
let isAgentError = false;
|
|
336
|
+
try {
|
|
337
|
+
isAgentError = failure.reason instanceof AgentError;
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
// Opaque backend failures may reject prototype inspection.
|
|
341
|
+
}
|
|
342
|
+
if (isAgentError)
|
|
336
343
|
throw failure.reason;
|
|
337
344
|
throw new AgentError('MAR_AGENT_MCP_CLEANUP_FAILED', 'MCP Client lease did not close.', {
|
|
338
345
|
cause: failure.reason
|