@myagentroam/node 0.10.45 → 0.10.47
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.
|
@@ -26,8 +26,9 @@ const marctlInstructions = [
|
|
|
26
26
|
'For start/send, repeat --image <local-path> to attach PNG, JPEG, GIF or WebP images, with or without text. Images are read on this CLI host, not by remote path. Limits: 5 images, 5 MiB each, 10 MiB total. Actual Runner/model image capabilities apply; goal set accepts text only.',
|
|
27
27
|
'Create workers only as tasks need them, named fixer#<task-id> <description> or reviewer#<task-or-change-id> <description>. These are conventions, not product roles or a fixed pool. Put role, scope, acceptance criteria and delivery requirements in the first message. Follow the repository workflow for development and review. Session Prompt is edited in the Web UI only; marctl has no editing command, and sends to existing Sessions use normal prompt injection.',
|
|
28
28
|
'Reuse recorded Session/Run IDs and receipts. Refresh volatile Run, queue and Goal state with sessions show only when the next action depends on it. Select needed JSON fields instead of dumping full Session lists or tool transcripts. Hidden reasoning, credentials and raw model requests are not collaboration artifacts.',
|
|
29
|
-
'
|
|
30
|
-
'
|
|
29
|
+
'show --json fields: session.activity, session.model, session.effort, session.customTitle or session.runnerTitle, runs[] (id/status), queue.items[], and goal.status (goal may be null). Run status and Goal status are separate.',
|
|
30
|
+
'Read results with sessions history <session-id> --limit 10 --json (default: latest 10 SEGMENTs, not messages; --limit 1..100). In segments[].items[], select kind === "assistant_message" and read payload.text; keep segment runId and user_message.payload.clientMessageId for queued-input correlation. Reuse the returned page; follow --cursor <nextCursor> only for missing evidence.',
|
|
31
|
+
'Use sessions send <session-id> --steer -m "Additional context: focus on the resume path." --json for decision-changing updates rather than routine reports: it may switch the current execution. Node decides delivery from actual state; an idle Session receives ordinary input. Choose exactly one of --steer or --queue, even when idle; missing, conflicting, repeated, or obsolete options are rejected locally before input is read or a request is sent. Use --queue to place input in a subsequent turn; with an active Goal, ordinary queued input waits until the Goal exits. start/send return clientMessageId and the accepted/queued result. A queued result may refer to the currently active Run: associate queueItemId/clientMessageId with history before deciding that input finished. There are no queue-item edit/delete/reorder commands; show includes queue state.',
|
|
31
32
|
'Wait with sessions wait <session-id> --run <run-id> --timeout 5m --json through the existing Watch. Prefer --timeout 5m when blocked on task completion; use 30s for a short deadline. Continue useful independent work before waiting. If exec returns a running process or cell, reuse its process/cell handle rather than starting another wait or polling show/list. Timeout or cancelled waiting does not stop the task. Use sessions stop <session-id> --run <run-id> --json only to stop that active Run; ownership rules still apply.',
|
|
32
33
|
'Goal get/set/clear use the existing Session Goal semantics; see marctl help sessions. A Coordinator can work from ordinary messages or its existing schedule without a Goal. Worker completion never automatically wakes it. Actively wait/read results, or finish and reconcile on the next user message or scheduled input.',
|
|
33
34
|
'## Verify, recover and respect authorization',
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
import { parseComposerTags, serializeComposerTag } from '@myagentroam/protocol';
|
|
1
|
+
import { parseComposerTags, serializeComposerTag, sessionMessageOriginSchema } from '@myagentroam/protocol';
|
|
2
2
|
import { relative, resolve } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { SkillDirectoryService } from './skill-directory-service.js';
|
|
5
|
+
/** Keep the admitted source snapshot beside message and Goal markup. */
|
|
6
|
+
export function withSessionMessageOrigin(input, origin) {
|
|
7
|
+
if (origin === undefined)
|
|
8
|
+
return input;
|
|
9
|
+
const tag = serializeComposerTag('mar_session_origin', sessionMessageOriginSchema.parse(origin));
|
|
10
|
+
const parts = parseComposerTags(input);
|
|
11
|
+
const first = parts[0];
|
|
12
|
+
const goal = first?.kind === 'mar_goal_start' || first?.kind === 'mar_goal_continue' ? first : undefined;
|
|
13
|
+
const content = parts
|
|
14
|
+
.map((part) => part === goal || part.kind === 'mar_session_origin'
|
|
15
|
+
? ''
|
|
16
|
+
: part.kind === 'text'
|
|
17
|
+
? part.text
|
|
18
|
+
: part.raw)
|
|
19
|
+
.join('');
|
|
20
|
+
return [goal?.raw, tag, goal === undefined ? content : content.trimStart()]
|
|
21
|
+
.filter(Boolean)
|
|
22
|
+
.join('\n');
|
|
23
|
+
}
|
|
5
24
|
export function composerResourceInputTags(input) {
|
|
6
25
|
return parseComposerTags(input)
|
|
7
26
|
.filter((part) => part.kind === 'mar_skills' ||
|
|
@@ -248,6 +248,7 @@ export class SessionLifecycleService {
|
|
|
248
248
|
sessionId: messageSessionId,
|
|
249
249
|
clientMessageId: input.clientMessageId,
|
|
250
250
|
content: input.content,
|
|
251
|
+
...(input.__marctlOrigin === undefined ? {} : { __marctlOrigin: input.__marctlOrigin }),
|
|
251
252
|
...(input.__suppressNotifications === true ? { __suppressNotifications: true } : {}),
|
|
252
253
|
...(input.__requestUserId === undefined ? {} : { __requestUserId: input.__requestUserId }),
|
|
253
254
|
...(input.__usageGrant === undefined ? {} : { __usageGrant: input.__usageGrant }),
|
|
@@ -7,7 +7,7 @@ import { safeErrorCode } from '../util/safe-error.js';
|
|
|
7
7
|
import { publicGoalStartText } from './goal-runtime.js';
|
|
8
8
|
import { serializeComposerTag, composerVisibleText, steerComposerMessage } from '@myagentroam/protocol';
|
|
9
9
|
import { relative } from 'node:path';
|
|
10
|
-
import { prepareComposerResourceInput, composerResourceInputTags, validateComposerSkills } from './composer-message-input.js';
|
|
10
|
+
import { prepareComposerResourceInput, composerResourceInputTags, withSessionMessageOrigin, validateComposerSkills } from './composer-message-input.js';
|
|
11
11
|
const INTERNAL_GOAL = Symbol('internalGoal');
|
|
12
12
|
const INTERNAL_SCHEDULE = Symbol('internalSchedule');
|
|
13
13
|
const INTERNAL_RESTORE = Symbol('internalRestore');
|
|
@@ -139,15 +139,19 @@ export class SessionMessageService {
|
|
|
139
139
|
idempotent: true,
|
|
140
140
|
auditReceipt: auditReceipt(session, existing.kind === 'queue' ? 'QUEUE' : 'SEND', existing.kind === 'queue' ? existing.item.id : existing.run.id, existing.kind === 'queue' ? existing.item.id : undefined)
|
|
141
141
|
};
|
|
142
|
+
const sourceContent = withSessionMessageOrigin(content, input.__marctlOrigin);
|
|
142
143
|
const goalMessage = internalGoal || internalSchedule || internalRestore
|
|
143
144
|
? undefined
|
|
144
145
|
: this.options.goalMessage(session, content, requestedIntent);
|
|
145
|
-
const
|
|
146
|
+
const executionContent = goalMessage?.runnerContent ?? internalRunnerContent;
|
|
147
|
+
const runnerContent = executionContent === content
|
|
148
|
+
? sourceContent
|
|
149
|
+
: withSessionMessageOrigin(executionContent, input.__marctlOrigin);
|
|
146
150
|
const publicContent = goalMessage?.activated === true
|
|
147
|
-
? [publicGoalStartText(composerVisibleText(content)), composerResourceInputTags(content)]
|
|
151
|
+
? withSessionMessageOrigin([publicGoalStartText(composerVisibleText(content)), composerResourceInputTags(content)]
|
|
148
152
|
.filter(Boolean)
|
|
149
|
-
.join('\n')
|
|
150
|
-
:
|
|
153
|
+
.join('\n'), input.__marctlOrigin)
|
|
154
|
+
: sourceContent;
|
|
151
155
|
const intent = goalMessage?.activated === true ? 'REPLACE_CURRENT' : requestedIntent;
|
|
152
156
|
const releasePreparation = this.options.attachments.protectSession(session.id);
|
|
153
157
|
const operation = (async () => {
|
|
@@ -242,7 +246,7 @@ export class SessionMessageService {
|
|
|
242
246
|
this.options.runtime.updateQueueItemAttachments(created.queueItem.id, attachments, displayInput);
|
|
243
247
|
this.options.coordinator.prepare(submissionId, {
|
|
244
248
|
restartMessage: {
|
|
245
|
-
content,
|
|
249
|
+
content: sourceContent,
|
|
246
250
|
attachments,
|
|
247
251
|
...(Number.isSafeInteger(input.__requestUserId)
|
|
248
252
|
? { initiatedByUserId: input.__requestUserId }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.47",
|
|
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.47",
|
|
41
41
|
"@myagentroam/code-navigation": "0.10.1",
|
|
42
|
-
"@myagentroam/protocol": "0.10.
|
|
43
|
-
"@myagentroam/marctl": "0.10.
|
|
42
|
+
"@myagentroam/protocol": "0.10.47",
|
|
43
|
+
"@myagentroam/marctl": "0.10.9"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/ws": "^8.18.1"
|