@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/marctl",
3
- "version": "0.10.6",
3
+ "version": "0.10.8",
4
4
  "description": "MyAgentRoam command-line interface for authorized Node access.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -61,7 +61,7 @@ Usage:
61
61
 
62
62
  {program} send <session-id>
63
63
  [-m <text> | --message-file <file|->] [--image <path> ...]
64
- (--forced | --queue)
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 --forced or --queue, even when idle.
86
- --forced sends if idle; if busy, interrupts then prioritizes after release.
87
- --queue waits its FIFO turn without interrupting; existing pauses remain.
88
- Eligible queued input can start immediately when idle.
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 --forced or --queue, even when idle.',
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.'
@@ -60,7 +60,7 @@ ${configurationHelp}
60
60
 
61
61
  {program} send <session-id>
62
62
  [-m <text> | --message-file <file|->] [--image <path> ...]
63
- (--forced | --queue)
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 必须二选一:--forced 或 --queue,空闲时也需指定。
85
- --forced 空闲发送;忙时打断当前执行,释放后优先处理。
86
- send --queue 不打断,等当前执行释放后按 FIFO 处理,保留暂停状态。
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 必须且只能选择 --forced 或 --queue,即使目标空闲也需指定。',
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', 'forced', 'queue', 'client-message-id'],
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 === '--forced' || flag === '--queue')) {
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.forced === true) === (args.queue === true))
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.forced === true ? 'REPLACE_CURRENT' : 'QUEUE';
180
+ body.deliveryIntent = args.steer === true ? 'REPLACE_CURRENT' : 'QUEUE';
179
181
  try {
180
182
  const result = await client.sessionCommand(body);
181
183
  return {