@myagentroam/node 0.9.83 → 0.9.84
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.
|
@@ -170,6 +170,9 @@ export class MarAgentConversationNormalizer {
|
|
|
170
170
|
: undefined;
|
|
171
171
|
const subagentTitle = agentId === undefined ? undefined : this.#subagentTitles.get(agentId);
|
|
172
172
|
const subagentDetails = agentId === undefined ? undefined : this.#subagentDetails.get(agentId);
|
|
173
|
+
const toolSubagentDetails = event.toolName === 'agent_message'
|
|
174
|
+
? withoutSubagentLatestMessage(subagentDetails)
|
|
175
|
+
: subagentDetails;
|
|
173
176
|
this.#tools.set(event.callId, {
|
|
174
177
|
toolName: event.toolName,
|
|
175
178
|
input: event.input,
|
|
@@ -181,7 +184,7 @@ export class MarAgentConversationNormalizer {
|
|
|
181
184
|
if (event.toolName === 'apply_patch' && 'input' in event)
|
|
182
185
|
return [fileChangeItem(ownItemId, 'IN_PROGRESS', [])];
|
|
183
186
|
return [
|
|
184
|
-
genericToolItem(ownItemId, event.toolName, 'IN_PROGRESS', event.input, null, null, false, undefined, subagentTitle,
|
|
187
|
+
genericToolItem(ownItemId, event.toolName, 'IN_PROGRESS', event.input, null, null, false, undefined, subagentTitle, toolSubagentDetails)
|
|
185
188
|
];
|
|
186
189
|
}
|
|
187
190
|
#toolCompleted(event) {
|
|
@@ -214,8 +217,13 @@ export class MarAgentConversationNormalizer {
|
|
|
214
217
|
const agentId = controlTool
|
|
215
218
|
? (marAgentAgentId(state?.input) ?? marAgentAgentId(controlOutput))
|
|
216
219
|
: undefined;
|
|
220
|
+
const cachedDetails = agentId === undefined
|
|
221
|
+
? undefined
|
|
222
|
+
: mergeSubagentDetails(this.#subagentDetails.get(agentId), state?.subagentDetails ?? {});
|
|
217
223
|
const details = controlTool
|
|
218
|
-
? mergeSubagentDetails(
|
|
224
|
+
? mergeSubagentDetails(event.toolName === 'agent_message'
|
|
225
|
+
? withoutSubagentLatestMessage(cachedDetails)
|
|
226
|
+
: cachedDetails, subagentDetails(controlOutput))
|
|
219
227
|
: {};
|
|
220
228
|
if (agentId !== undefined) {
|
|
221
229
|
const output = structuredRecord(controlOutput);
|
|
@@ -294,9 +302,7 @@ export class MarAgentConversationNormalizer {
|
|
|
294
302
|
const start = this.#subagentStarts.get(event.agentId);
|
|
295
303
|
if (start === undefined)
|
|
296
304
|
return [];
|
|
297
|
-
return [
|
|
298
|
-
subagentStartItem(start, event.agentId, title, details, lifecycle)
|
|
299
|
-
];
|
|
305
|
+
return [subagentStartItem(start, event.agentId, title, details, lifecycle)];
|
|
300
306
|
}
|
|
301
307
|
}
|
|
302
308
|
function itemId(kind, value) {
|
|
@@ -540,6 +546,12 @@ function mergeSubagentDetails(current, update) {
|
|
|
540
546
|
...update
|
|
541
547
|
};
|
|
542
548
|
}
|
|
549
|
+
function withoutSubagentLatestMessage(details) {
|
|
550
|
+
if (details?.latestMessage === undefined)
|
|
551
|
+
return details;
|
|
552
|
+
const { latestMessage: _latestMessage, ...withoutLatestMessage } = details;
|
|
553
|
+
return withoutLatestMessage;
|
|
554
|
+
}
|
|
543
555
|
function subagentPayload(details) {
|
|
544
556
|
return {
|
|
545
557
|
...(details.modelId === undefined ? {} : { subagentModelId: details.modelId }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.84",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"node-pty": "1.1.0",
|
|
29
29
|
"ws": "^8.21.3",
|
|
30
30
|
"zod": "4.4.3",
|
|
31
|
-
"@myagentroam/agent": "0.9.
|
|
32
|
-
"@myagentroam/protocol": "0.9.
|
|
31
|
+
"@myagentroam/agent": "0.9.84",
|
|
32
|
+
"@myagentroam/protocol": "0.9.84"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/ws": "^8.18.1"
|