@myagentroam/node 0.10.53 → 0.10.55
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.
|
@@ -19,7 +19,8 @@ const messageSchema = z
|
|
|
19
19
|
content: z.string().max(1_000_000),
|
|
20
20
|
attachments: z.array(attachmentSchema).max(5),
|
|
21
21
|
initiatedByUserId: z.number().int().positive(),
|
|
22
|
-
immediate: z.boolean()
|
|
22
|
+
immediate: z.boolean(),
|
|
23
|
+
suppressNotifications: z.boolean().optional()
|
|
23
24
|
})
|
|
24
25
|
.strict();
|
|
25
26
|
const goalSchema = z
|
|
@@ -59,6 +60,7 @@ const sessionSchema = z
|
|
|
59
60
|
paused: z.boolean(),
|
|
60
61
|
plan: z.boolean(),
|
|
61
62
|
awaitingGoal: z.boolean(),
|
|
63
|
+
suppressNotifications: z.boolean().optional(),
|
|
62
64
|
goal: goalSchema.optional(),
|
|
63
65
|
current: messageSchema.optional(),
|
|
64
66
|
queue: z.array(messageSchema)
|
|
@@ -147,17 +149,20 @@ export class PlannedRestartHandoff {
|
|
|
147
149
|
continue;
|
|
148
150
|
const queue = runtime.sessionQueue(session.id);
|
|
149
151
|
const active = runtime.activeSessionRun(session.id);
|
|
152
|
+
const goalItemId = queue.itemIds.find((id) => coordinator.pending(id)?.goal !== undefined);
|
|
153
|
+
const notificationSource = active ?? (goalItemId === undefined ? undefined : runtime.getQueueItem(goalItemId));
|
|
150
154
|
const goal = goals.restartState(session.id);
|
|
151
155
|
const awaitingGoal = goal === undefined && this.options.commandActive(session.id, 'goal');
|
|
152
156
|
const currentId = active && (runtime.currentExecutionId(active.id) ?? active.id);
|
|
153
157
|
const pending = currentId === undefined ? undefined : coordinator.pending(currentId);
|
|
154
|
-
const toMessage = (id, clientMessageId, content, attachments, owner) => ({
|
|
158
|
+
const toMessage = (id, clientMessageId, content, attachments, owner, suppressNotifications) => ({
|
|
155
159
|
id,
|
|
156
160
|
clientMessageId,
|
|
157
161
|
content: withoutAttachmentTags(content),
|
|
158
162
|
attachments,
|
|
159
163
|
initiatedByUserId: owner,
|
|
160
|
-
immediate: coordinator.isImmediate(id)
|
|
164
|
+
immediate: coordinator.isImmediate(id),
|
|
165
|
+
...(suppressNotifications === true ? { suppressNotifications: true } : {})
|
|
161
166
|
});
|
|
162
167
|
const items = queue.itemIds.flatMap((id) => {
|
|
163
168
|
if (coordinator.pending(id)?.goal !== undefined)
|
|
@@ -165,12 +170,12 @@ export class PlannedRestartHandoff {
|
|
|
165
170
|
const item = runtime.getQueueItem(id);
|
|
166
171
|
const original = coordinator.pending(id)?.restartMessage;
|
|
167
172
|
return [
|
|
168
|
-
toMessage(id, item.clientMessageId, original?.content ?? item.content, [...(original?.attachments ?? item.attachments)], item.initiatedByUserId)
|
|
173
|
+
toMessage(id, item.clientMessageId, original?.content ?? item.content, [...(original?.attachments ?? item.attachments)], item.initiatedByUserId, item.suppressNotifications)
|
|
169
174
|
];
|
|
170
175
|
});
|
|
171
176
|
const current = pending?.restartMessage === undefined || pending.goal !== undefined
|
|
172
177
|
? undefined
|
|
173
|
-
: toMessage(currentId, pending.clientMessageId ?? active.clientMessageId, pending.restartMessage.content, [...pending.restartMessage.attachments], pending.restartMessage.initiatedByUserId ?? active?.initiatedByUserId);
|
|
178
|
+
: toMessage(currentId, pending.clientMessageId ?? active.clientMessageId, pending.restartMessage.content, [...pending.restartMessage.attachments], pending.restartMessage.initiatedByUserId ?? active?.initiatedByUserId, active?.suppressNotifications);
|
|
174
179
|
if (current === undefined && items.length === 0 && goal === undefined && !awaitingGoal)
|
|
175
180
|
continue;
|
|
176
181
|
if (session.externalSessionId === null)
|
|
@@ -193,6 +198,9 @@ export class PlannedRestartHandoff {
|
|
|
193
198
|
paused: queue.paused,
|
|
194
199
|
plan: this.options.commandActive(session.id, 'plan'),
|
|
195
200
|
awaitingGoal,
|
|
201
|
+
...(notificationSource?.suppressNotifications === true
|
|
202
|
+
? { suppressNotifications: true }
|
|
203
|
+
: {}),
|
|
196
204
|
...(goal === undefined ? {} : { goal: goalSchema.parse(goal) }),
|
|
197
205
|
...(current === undefined ? {} : { current }),
|
|
198
206
|
queue: items
|
|
@@ -76,6 +76,7 @@ export class RestartSessionRestorer {
|
|
|
76
76
|
attachments: input.attachments,
|
|
77
77
|
__queueItemId: input.id,
|
|
78
78
|
__requestUserId: input.initiatedByUserId,
|
|
79
|
+
__suppressNotifications: input.suppressNotifications === true,
|
|
79
80
|
secretEnvironment: context.secretEnvironment,
|
|
80
81
|
personalInstructions: context.personalInstructions,
|
|
81
82
|
marAgentModel: context.marAgentModel,
|
|
@@ -116,6 +117,7 @@ export class RestartSessionRestorer {
|
|
|
116
117
|
${RESTART_NOTICE}`,
|
|
117
118
|
goal: { id: entry.goal.goal.id, revision: entry.goal.goal.revision, epoch: 0 },
|
|
118
119
|
initiatedByUserId: entry.ownerUserId,
|
|
120
|
+
suppressNotifications: entry.suppressNotifications === true,
|
|
119
121
|
secretEnvironment: context.secretEnvironment,
|
|
120
122
|
restoreQueued: true,
|
|
121
123
|
...(context.usageGrant === undefined ? {} : { usageGrant: context.usageGrant }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.55",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"playwright": "1.62.1",
|
|
38
38
|
"ws": "^8.21.3",
|
|
39
39
|
"zod": "4.4.3",
|
|
40
|
-
"@myagentroam/agent": "0.10.
|
|
40
|
+
"@myagentroam/agent": "0.10.55",
|
|
41
41
|
"@myagentroam/code-navigation": "0.10.1",
|
|
42
42
|
"@myagentroam/marctl": "0.10.11",
|
|
43
|
-
"@myagentroam/protocol": "0.10.
|
|
43
|
+
"@myagentroam/protocol": "0.10.55"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/ws": "^8.18.1"
|