@myagentroam/node 0.12.13 → 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/marctl/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"0.
|
|
1
|
+
{"type":"module","version":"0.13.1"}
|
|
@@ -196,6 +196,7 @@ export class MarAgentMcpClientPool {
|
|
|
196
196
|
const items = Array.isArray(result.content) ? result.content : [];
|
|
197
197
|
const images = [];
|
|
198
198
|
const remaining = [];
|
|
199
|
+
const diagnostics = [];
|
|
199
200
|
const content = items
|
|
200
201
|
.map((item) => {
|
|
201
202
|
if (item === null || typeof item !== 'object') {
|
|
@@ -204,6 +205,7 @@ export class MarAgentMcpClientPool {
|
|
|
204
205
|
}
|
|
205
206
|
const value = item;
|
|
206
207
|
if (value.type === 'text' && typeof value.text === 'string') {
|
|
208
|
+
diagnostics.push(value.text);
|
|
207
209
|
const { text, ...metadata } = value;
|
|
208
210
|
if (Object.keys(metadata).some((key) => key !== 'type'))
|
|
209
211
|
remaining.push(metadata);
|
|
@@ -224,6 +226,12 @@ export class MarAgentMcpClientPool {
|
|
|
224
226
|
return `[${String(value.type ?? 'unknown')}]`;
|
|
225
227
|
})
|
|
226
228
|
.join('\n');
|
|
229
|
+
if (result.isError === true) {
|
|
230
|
+
const diagnostic = diagnostics.join('\n');
|
|
231
|
+
throw new AgentError('MAR_AGENT_MCP_TOOL_FAILED', diagnostic.length > 0
|
|
232
|
+
? `MCP tool reported an error: ${diagnostic}`
|
|
233
|
+
: 'MCP tool reported an error without text diagnostics.');
|
|
234
|
+
}
|
|
227
235
|
const structured = result.structuredContent;
|
|
228
236
|
const data = structured !== undefined && structured !== null
|
|
229
237
|
? remaining.length
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"turndown-plugin-gfm": "^1.0.2",
|
|
43
43
|
"ws": "^8.21.3",
|
|
44
44
|
"zod": "4.4.3",
|
|
45
|
-
"@myagentroam/agent": "0.
|
|
46
|
-
"@myagentroam/protocol": "0.
|
|
45
|
+
"@myagentroam/agent": "0.13.1",
|
|
46
|
+
"@myagentroam/protocol": "0.13.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/turndown": "^5.0.6",
|
|
50
50
|
"@types/ws": "^8.18.1",
|
|
51
51
|
"@myagentroam/code-navigation": "0.11.1",
|
|
52
|
-
"@myagentroam/marctl": "0.
|
|
52
|
+
"@myagentroam/marctl": "0.13.1"
|
|
53
53
|
},
|
|
54
54
|
"exports": {
|
|
55
55
|
"./config": {
|