@myagentroam/node 0.9.156 → 0.9.157
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.
|
@@ -77,39 +77,6 @@ export class MarAgentConversationNormalizer {
|
|
|
77
77
|
return [...this.#toolCompleted(event), ...this.#codeModeToolResults(event)];
|
|
78
78
|
return [...this.#toolFailed(event), ...this.#codeModeToolResults(event)];
|
|
79
79
|
}
|
|
80
|
-
if (event.type === 'hosted_tool.updated') {
|
|
81
|
-
const sourceSummary = event.summary.sources
|
|
82
|
-
?.slice(0, 20)
|
|
83
|
-
.map((source) => (source.title ? `${source.title} — ${source.url}` : source.url))
|
|
84
|
-
.join('\n');
|
|
85
|
-
const output = sourceSummary || event.summary.title || '';
|
|
86
|
-
return [
|
|
87
|
-
{
|
|
88
|
-
itemId: itemId('hosted', event.itemId),
|
|
89
|
-
kind: 'tool_call',
|
|
90
|
-
status: event.status === 'RUNNING'
|
|
91
|
-
? 'IN_PROGRESS'
|
|
92
|
-
: event.status === 'COMPLETED'
|
|
93
|
-
? 'COMPLETED'
|
|
94
|
-
: 'FAILED',
|
|
95
|
-
payload: {
|
|
96
|
-
namespace: 'hosted-web',
|
|
97
|
-
toolName: event.kind === 'WEB_SEARCH' ? 'web_search' : 'web_fetch',
|
|
98
|
-
title: event.kind === 'WEB_SEARCH' ? 'Web search' : 'Web fetch',
|
|
99
|
-
inputSummary: event.summary.query === undefined && event.summary.url === undefined
|
|
100
|
-
? null
|
|
101
|
-
: compactRunnerText(event.summary.query ?? event.summary.url ?? '', 10_000),
|
|
102
|
-
outputSummary: output ? compactRunnerText(output, 10_000) : null,
|
|
103
|
-
progressLabel: event.status === 'RUNNING' ? 'Running' : null,
|
|
104
|
-
errorCode: event.status === 'FAILED' ? 'HOSTED_TOOL_FAILED' : null,
|
|
105
|
-
truncated: event.summary.sourcesTruncated === true ||
|
|
106
|
-
(event.summary.sources?.length ?? 0) > 20 ||
|
|
107
|
-
output.length > 10_000
|
|
108
|
-
},
|
|
109
|
-
merge: true
|
|
110
|
-
}
|
|
111
|
-
];
|
|
112
|
-
}
|
|
113
80
|
if (event.type === 'todo.updated')
|
|
114
81
|
return [
|
|
115
82
|
{
|
|
@@ -230,7 +197,7 @@ export class MarAgentConversationNormalizer {
|
|
|
230
197
|
if (event.toolName === 'apply_patch' && 'input' in event)
|
|
231
198
|
return [fileChangeItem(ownItemId, 'IN_PROGRESS', [])];
|
|
232
199
|
return [
|
|
233
|
-
genericToolItem(ownItemId, event.toolName, 'IN_PROGRESS', event.input, null, null,
|
|
200
|
+
genericToolItem(ownItemId, event.toolName, 'IN_PROGRESS', event.input, null, null, event.truncated === true, undefined, subagentTitle, toolSubagentDetails)
|
|
234
201
|
];
|
|
235
202
|
}
|
|
236
203
|
#toolCompleted(event) {
|
|
@@ -318,7 +285,7 @@ export class MarAgentConversationNormalizer {
|
|
|
318
285
|
if (event.toolName === 'apply_patch' && state?.structured === true)
|
|
319
286
|
return [fileChangeItem(state?.itemId ?? itemId('tool', event.callId), 'FAILED', [])];
|
|
320
287
|
return [
|
|
321
|
-
genericToolItem(state?.itemId ?? itemId('tool', event.callId), event.toolName, 'FAILED', state?.input, event.message ?? event.code, event.code,
|
|
288
|
+
genericToolItem(state?.itemId ?? itemId('tool', event.callId), event.toolName, 'FAILED', state?.input, event.message ?? event.code, event.code, event.truncated === true, undefined, state?.subagentTitle, state?.subagentDetails)
|
|
322
289
|
];
|
|
323
290
|
}
|
|
324
291
|
#codeModeToolResults(event) {
|
|
@@ -595,6 +562,7 @@ function genericToolItem(id, toolName, status, input, outputSummary = null, erro
|
|
|
595
562
|
}
|
|
596
563
|
const subagent = marAgentSubagentProjection(toolName, input, output, subagentTitle, knownSubagentDetails);
|
|
597
564
|
const toolCategory = isImageGenerationTool(toolName) ? 'IMAGE_GENERATION' : undefined;
|
|
565
|
+
const inputSummary = compactRunnerValue(input, 10_000);
|
|
598
566
|
return {
|
|
599
567
|
itemId: id,
|
|
600
568
|
kind: 'tool_call',
|
|
@@ -603,11 +571,11 @@ function genericToolItem(id, toolName, status, input, outputSummary = null, erro
|
|
|
603
571
|
namespace: 'mar-agent',
|
|
604
572
|
toolName: compactRunnerText(toolName, 128) || 'unknown',
|
|
605
573
|
title: compactRunnerText(toolName, 500) || 'unknown',
|
|
606
|
-
inputSummary:
|
|
574
|
+
inputSummary: inputSummary.text || null,
|
|
607
575
|
outputSummary: outputSummary === null ? null : compactRunnerText(outputSummary, 10_000),
|
|
608
576
|
progressLabel: status === 'IN_PROGRESS' ? 'Running' : null,
|
|
609
577
|
errorCode: errorCode === null ? null : compactRunnerText(errorCode, 80),
|
|
610
|
-
truncated,
|
|
578
|
+
truncated: truncated || inputSummary.truncated || (outputSummary?.length ?? 0) > 10_000,
|
|
611
579
|
...(toolCategory === undefined ? {} : { toolCategory }),
|
|
612
580
|
...subagent
|
|
613
581
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.157",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"playwright": "1.62.1",
|
|
37
37
|
"ws": "^8.21.3",
|
|
38
38
|
"zod": "4.4.3",
|
|
39
|
-
"@myagentroam/agent": "0.9.
|
|
40
|
-
"@myagentroam/marctl": "0.9.120",
|
|
39
|
+
"@myagentroam/agent": "0.9.157",
|
|
41
40
|
"@myagentroam/code-navigation": "0.9.129",
|
|
42
|
-
"@myagentroam/
|
|
41
|
+
"@myagentroam/marctl": "0.9.120",
|
|
42
|
+
"@myagentroam/protocol": "0.9.157"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/ws": "^8.18.1"
|