@myagentroam/node 0.9.144 → 0.9.145
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.
|
@@ -336,19 +336,6 @@ export class MarAgentConversationNormalizer {
|
|
|
336
336
|
if (observation.outcome === 'failed')
|
|
337
337
|
projected = projected.map((item) => item.kind === 'file_change' ? { ...item, status: 'FAILED' } : item);
|
|
338
338
|
}
|
|
339
|
-
else if (toolName === 'todo_read') {
|
|
340
|
-
if (observation.outcome !== 'completed' ||
|
|
341
|
-
record(input) === undefined ||
|
|
342
|
-
!isTodoObservationData(observation.result.data))
|
|
343
|
-
continue;
|
|
344
|
-
const todo = observation.result.data;
|
|
345
|
-
projected = this.normalize({
|
|
346
|
-
...eventMetadata(event, observation.source.callId),
|
|
347
|
-
type: 'todo.updated',
|
|
348
|
-
revision: todo.revision,
|
|
349
|
-
items: todo.items
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
339
|
else if (marAgentSubagentOperation(toolName) !== undefined) {
|
|
353
340
|
if (!isSubagentToolInput(toolName, input) ||
|
|
354
341
|
!isSubagentObservationData(observation.result.data, input))
|
|
@@ -512,10 +499,8 @@ function codeModeObservationResults(value) {
|
|
|
512
499
|
});
|
|
513
500
|
}
|
|
514
501
|
function isPersonalizedToolName(toolName) {
|
|
515
|
-
//
|
|
516
|
-
return
|
|
517
|
-
toolName === 'todo_read' ||
|
|
518
|
-
marAgentSubagentOperation(toolName) !== undefined);
|
|
502
|
+
// Todo cards come only from native todo.updated events, never tool result snapshots.
|
|
503
|
+
return toolName === 'apply_patch' || marAgentSubagentOperation(toolName) !== undefined;
|
|
519
504
|
}
|
|
520
505
|
function isApplyPatchObservationData(value) {
|
|
521
506
|
const data = record(value);
|
|
@@ -548,26 +533,6 @@ function isApplyPatchObservationData(value) {
|
|
|
548
533
|
Number.isSafeInteger(totals.deletedLines) &&
|
|
549
534
|
totals.deletedLines >= 0);
|
|
550
535
|
}
|
|
551
|
-
function isTodoObservationData(value) {
|
|
552
|
-
const data = record(value);
|
|
553
|
-
if (data === undefined ||
|
|
554
|
-
!Number.isSafeInteger(data.revision) ||
|
|
555
|
-
data.revision < 0 ||
|
|
556
|
-
!Array.isArray(data.items))
|
|
557
|
-
return false;
|
|
558
|
-
return data.items.every((entry) => {
|
|
559
|
-
const item = record(entry);
|
|
560
|
-
if (item === undefined ||
|
|
561
|
-
typeof item.id !== 'string' ||
|
|
562
|
-
item.id.trim().length === 0 ||
|
|
563
|
-
typeof item.step !== 'string' ||
|
|
564
|
-
item.step.trim().length === 0 ||
|
|
565
|
-
(item.status !== 'pending' && item.status !== 'in_progress' && item.status !== 'completed') ||
|
|
566
|
-
!Number.isSafeInteger(data.revision))
|
|
567
|
-
return false;
|
|
568
|
-
return true;
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
536
|
function isSubagentToolInput(toolName, value) {
|
|
572
537
|
const input = record(value);
|
|
573
538
|
if (input === undefined)
|
|
@@ -7,25 +7,32 @@ const token = process.env['MAR_SCHEDULE_MCP_TOKEN'];
|
|
|
7
7
|
if (endpoint === undefined || token === undefined)
|
|
8
8
|
throw new Error('SCHEDULE_CAPABILITY_INVALID');
|
|
9
9
|
const server = new McpServer({ name: 'mar_schedule', version: '1.0.0' });
|
|
10
|
+
const scopeNote = 'Scope is limited to the MAR scheduled task managed by Node for this conversation; ' +
|
|
11
|
+
'it does not cover repository, CI, system cron, or other timers.';
|
|
12
|
+
const objectiveDescription = 'Task body for one scheduled run in this conversation. State what that run should do with enough task context. ' +
|
|
13
|
+
'Do not phrase it as a request to create or change a schedule or repeat cron/time-zone settings; MAR handles scheduling and skipped triggers.';
|
|
10
14
|
server.registerTool('mar_get_scheduled_task', {
|
|
11
|
-
description: 'Read the MAR scheduled task
|
|
15
|
+
description: 'Read the MAR scheduled task bound to this MAR-managed Workspace conversation, or null if none exists. ' +
|
|
16
|
+
scopeNote
|
|
12
17
|
}, async () => result(await request('mar_get_scheduled_task', {})));
|
|
13
18
|
if (process.env['MAR_SCHEDULE_MCP_READ_ONLY'] !== '1') {
|
|
14
19
|
server.registerTool('mar_create_scheduled_task', {
|
|
15
|
-
description: 'Create
|
|
20
|
+
description: 'Create the MAR scheduled task for this MAR-managed Workspace conversation. MAR runs it in this conversation for each admitted trigger using the connected Node time zone. ' +
|
|
21
|
+
scopeNote,
|
|
16
22
|
inputSchema: {
|
|
17
|
-
objective: z.string().min(1).max(20_000).describe(
|
|
23
|
+
objective: z.string().min(1).max(20_000).describe(objectiveDescription),
|
|
18
24
|
cron: z
|
|
19
25
|
.string()
|
|
20
26
|
.min(9)
|
|
21
27
|
.max(64)
|
|
22
|
-
.describe('Five-field cron expression interpreted in the connected MAR Node time zone.')
|
|
28
|
+
.describe('Five-field cron expression interpreted in the connected MAR Node time zone. It defines the schedule separately from the per-run task body.')
|
|
23
29
|
}
|
|
24
30
|
}, async (args) => result(await request('mar_create_scheduled_task', args)));
|
|
25
31
|
server.registerTool('mar_update_scheduled_task', {
|
|
26
|
-
description: 'Update the MAR scheduled task for this MAR-managed Workspace conversation.
|
|
32
|
+
description: 'Update the MAR scheduled task for this MAR-managed Workspace conversation. MAR runs the saved objective in this conversation for each admitted trigger using the connected Node time zone. ' +
|
|
33
|
+
scopeNote,
|
|
27
34
|
inputSchema: {
|
|
28
|
-
objective: z.string().min(1).max(20_000).describe(
|
|
35
|
+
objective: z.string().min(1).max(20_000).describe(objectiveDescription).optional(),
|
|
29
36
|
cron: z
|
|
30
37
|
.string()
|
|
31
38
|
.min(9)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.145",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"ws": "^8.21.3",
|
|
36
36
|
"zod": "4.4.3",
|
|
37
37
|
"@myagentroam/marctl": "0.9.120",
|
|
38
|
-
"@myagentroam/agent": "0.9.144",
|
|
39
38
|
"@myagentroam/code-navigation": "0.9.129",
|
|
40
|
-
"@myagentroam/protocol": "0.9.
|
|
39
|
+
"@myagentroam/protocol": "0.9.145",
|
|
40
|
+
"@myagentroam/agent": "0.9.145"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/ws": "^8.18.1"
|