@myagentroam/marctl 0.10.6 → 0.10.8
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.
- package/package.json +1 -1
- package/src/i18n/en-US.mjs +8 -6
- package/src/i18n/zh-CN.mjs +8 -6
- package/src/sessions.mjs +6 -4
package/package.json
CHANGED
package/src/i18n/en-US.mjs
CHANGED
|
@@ -61,7 +61,7 @@ Usage:
|
|
|
61
61
|
|
|
62
62
|
{program} send <session-id>
|
|
63
63
|
[-m <text> | --message-file <file|->] [--image <path> ...]
|
|
64
|
-
(--
|
|
64
|
+
(--steer | --queue)
|
|
65
65
|
[--client-message-id <id>] [--json]
|
|
66
66
|
|
|
67
67
|
{program} stop <session-id> [--run <run-id>] [--json]
|
|
@@ -82,10 +82,12 @@ Input:
|
|
|
82
82
|
|
|
83
83
|
Delivery and waiting:
|
|
84
84
|
Start/send return a clientMessageId.
|
|
85
|
-
Send requires exactly one of --
|
|
86
|
-
|
|
87
|
-
--queue
|
|
88
|
-
|
|
85
|
+
Send requires exactly one of --steer or --queue, even when idle.
|
|
86
|
+
When useful, --steer adds gentle context to an in-progress task.
|
|
87
|
+
--queue places input in a subsequent turn.
|
|
88
|
+
Example:
|
|
89
|
+
marctl sessions send <session-id> --steer \\
|
|
90
|
+
-m "Additional context: focus on the resume path." --json
|
|
89
91
|
A queued runId may identify another
|
|
90
92
|
active input: correlate queueItemId/clientMessageId with visible history.
|
|
91
93
|
Wait observes the specified Run through Watch. Timeout does not stop it;
|
|
@@ -275,7 +277,7 @@ or Server connection is required.`
|
|
|
275
277
|
terminalDirectUnsafeFallback:
|
|
276
278
|
'Direct terminal setup could not be safely canceled after OPEN; relay fallback was skipped.',
|
|
277
279
|
invalidArguments: 'Invalid command arguments.',
|
|
278
|
-
sessionDeliveryRequired: 'Send requires exactly one of --
|
|
280
|
+
sessionDeliveryRequired: 'Send requires exactly one of --steer or --queue, even when idle.',
|
|
279
281
|
sshOptionsUnsupported: 'SSH options are not supported; use marssh <host>.',
|
|
280
282
|
scpOptionsUnsupported: 'This SCP option is not supported by the Node Terminal transport.',
|
|
281
283
|
commandFailed: 'The command failed.'
|
package/src/i18n/zh-CN.mjs
CHANGED
|
@@ -60,7 +60,7 @@ ${configurationHelp}
|
|
|
60
60
|
|
|
61
61
|
{program} send <session-id>
|
|
62
62
|
[-m <text> | --message-file <file|->] [--image <path> ...]
|
|
63
|
-
(--
|
|
63
|
+
(--steer | --queue)
|
|
64
64
|
[--client-message-id <id>] [--json]
|
|
65
65
|
|
|
66
66
|
{program} stop <session-id> [--run <run-id>] [--json]
|
|
@@ -81,10 +81,12 @@ ${configurationHelp}
|
|
|
81
81
|
|
|
82
82
|
投递与等待:
|
|
83
83
|
start/send 返回 clientMessageId。
|
|
84
|
-
send 必须二选一:--
|
|
85
|
-
--
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
send 必须二选一:--steer 或 --queue,空闲时也需指定。
|
|
85
|
+
--steer 在必要时为正在进行的任务补充温和的新信息。
|
|
86
|
+
--queue 将输入排入后续轮次。
|
|
87
|
+
示例:
|
|
88
|
+
marctl sessions send <session-id> --steer \\
|
|
89
|
+
-m "Additional context: focus on the resume path." --json
|
|
88
90
|
排队回执的 runId 可能属于其他活动输入,
|
|
89
91
|
需按 queueItemId/clientMessageId 与可见历史核对。
|
|
90
92
|
wait 通过 Watch 等待指定 Run;超时不会停止任务,
|
|
@@ -261,7 +263,7 @@ ${configurationHelp}`,
|
|
|
261
263
|
terminalSessionFailed: '终端会话失败。',
|
|
262
264
|
terminalDirectUnsafeFallback: 'OPEN 后无法安全取消直连终端,已跳过 relay 回退。',
|
|
263
265
|
invalidArguments: '命令参数无效。',
|
|
264
|
-
sessionDeliveryRequired: 'send 必须且只能选择 --
|
|
266
|
+
sessionDeliveryRequired: 'send 必须且只能选择 --steer 或 --queue,即使目标空闲也需指定。',
|
|
265
267
|
sshOptionsUnsupported: '不支持 SSH 选项,请使用 marssh <节点>。',
|
|
266
268
|
scpOptionsUnsupported: 'Node Terminal 传输不支持此 SCP 选项。',
|
|
267
269
|
terminalBinaryUnavailable: '二进制复制需要支持 pipe 终端的 Server 与 Node。',
|
package/src/sessions.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const commands = {
|
|
|
22
22
|
'client-message-id'
|
|
23
23
|
],
|
|
24
24
|
config: ['model', 'effort'],
|
|
25
|
-
send: ['message', 'message-file', 'image', '
|
|
25
|
+
send: ['message', 'message-file', 'image', 'steer', 'queue', 'client-message-id'],
|
|
26
26
|
stop: ['run'],
|
|
27
27
|
'goal.get': [],
|
|
28
28
|
'goal.set': ['message', 'message-file'],
|
|
@@ -66,7 +66,7 @@ export function parseSessionArgs(argv, translate = createTranslator()) {
|
|
|
66
66
|
args.json = true;
|
|
67
67
|
continue;
|
|
68
68
|
}
|
|
69
|
-
if (action === 'send' && (flag === '--
|
|
69
|
+
if (action === 'send' && (flag === '--steer' || flag === '--queue')) {
|
|
70
70
|
const key = flag.slice(2);
|
|
71
71
|
if (Object.hasOwn(args, key)) throw invalid();
|
|
72
72
|
args[key] = true;
|
|
@@ -96,7 +96,7 @@ export function parseSessionArgs(argv, translate = createTranslator()) {
|
|
|
96
96
|
args[key] = ms;
|
|
97
97
|
} else args[key] = value;
|
|
98
98
|
}
|
|
99
|
-
if (action === 'send' && (args.
|
|
99
|
+
if (action === 'send' && (args.steer === true) === (args.queue === true))
|
|
100
100
|
throw invalid('errors.sessionDeliveryRequired');
|
|
101
101
|
if (args.message !== undefined && args.messageFile !== undefined) throw invalid();
|
|
102
102
|
if (
|
|
@@ -161,6 +161,8 @@ export async function runSessionCommand({ args, client, env, stdin, WebSocketCla
|
|
|
161
161
|
if (args.action === 'current' && env.MAR_CTL_SESSION_ID) body.sessionId = env.MAR_CTL_SESSION_ID;
|
|
162
162
|
if (args.action === 'start' && env.MAR_CTL_SESSION_ID)
|
|
163
163
|
body.parentSessionId = env.MAR_CTL_SESSION_ID;
|
|
164
|
+
if (['start', 'send'].includes(args.action) && env.MAR_CTL_SESSION_ID)
|
|
165
|
+
body.sourceSessionId = env.MAR_CTL_SESSION_ID;
|
|
164
166
|
if (args.messageFile !== undefined || args.message !== undefined)
|
|
165
167
|
body.content = await messageContent(
|
|
166
168
|
args,
|
|
@@ -175,7 +177,7 @@ export async function runSessionCommand({ args, client, env, stdin, WebSocketCla
|
|
|
175
177
|
if (args.action === 'start' || args.action === 'send')
|
|
176
178
|
body.clientMessageId = args.clientMessageId ?? randomUUID();
|
|
177
179
|
if (args.action === 'send')
|
|
178
|
-
body.deliveryIntent = args.
|
|
180
|
+
body.deliveryIntent = args.steer === true ? 'REPLACE_CURRENT' : 'QUEUE';
|
|
179
181
|
try {
|
|
180
182
|
const result = await client.sessionCommand(body);
|
|
181
183
|
return {
|