@myagentroam/agent 0.11.48 → 0.11.50

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.
@@ -9,10 +9,13 @@ import { childResources } from './resources.js';
9
9
  import { sharedSessionHistory } from './history.js';
10
10
  const delegationPrompt = [
11
11
  '# Delegation and coordination',
12
- 'Delegate bounded, self-contained tasks when independent progress or context savings materially helps. Keep simple or tightly coupled work local.',
13
- 'Give each child an objective, necessary context, expected output, and a read-only boundary or non-overlapping write scope.',
14
- 'Follow up through the direct delegate by default; inspect deeper Sessions only when a concrete issue needs independent verification.',
15
- 'While children run, continue meaningful non-overlapping work. Do not redo delegated work. Wait only when the next step needs the result.',
12
+ 'Prefer handling focused or tightly coupled work locally.',
13
+ 'Consider delegating a clearly separable subtask when parallel progress or context savings materially outweigh coordination overhead.',
14
+ 'Avoid splitting work merely because agents are available.',
15
+ 'A useful handoff includes an objective, necessary context, expected output, and a read-only boundary or non-overlapping write scope.',
16
+ 'Prefer following up through the direct delegate; deeper Session inspection is usually useful only when a concrete issue needs independent verification.',
17
+ 'While children run, prefer advancing meaningful, non-overlapping task work rather than duplicating delegated work. Waiting is generally useful once no meaningful local task work remains and a required result is needed to unblock or finish the task.',
18
+ 'An accepted message normally needs no separate acknowledgment. Requests for receipt-only replies and immediate agent_view calls solely to confirm receipt are usually unnecessary.',
16
19
  'Verify consequential findings and changes. Join or stop task-required child work before final delivery, and retain responsibility for the final result.'
17
20
  ].join('\n\n');
18
21
  export { SUBAGENT_NATIVE_SERVICE } from './native.js';
@@ -3,7 +3,7 @@ import { AgentError } from '@myagentroam/agent';
3
3
  export function registerQueryTools(context, agent) {
4
4
  context.tools.register({
5
5
  name: 'agent_list',
6
- description: 'List direct child Sessions or eligible local models.',
6
+ description: 'List direct child Sessions or eligible model configurations.',
7
7
  allowedCallers: ['direct', 'programmatic'],
8
8
  inputSchema: {
9
9
  type: 'object',
@@ -137,7 +137,7 @@ async function captureTarget(agent, session, observations, signal, history) {
137
137
  export function registerWait(context, agent, observations, history = agent) {
138
138
  context.tools.register({
139
139
  name: 'agent_wait',
140
- description: 'Wait for direct child completion or a message; defaults to completion for 30 seconds.',
140
+ description: 'Wait for direct child completion or a message.',
141
141
  allowedCallers: ['direct', 'programmatic'],
142
142
  inputSchema: {
143
143
  type: 'object',
@@ -129,17 +129,18 @@ function options(value, wait) {
129
129
  if (!value || typeof value !== 'object' || Array.isArray(value))
130
130
  throw new AgentError('MAR_AGENT_TOOL_INPUT_INVALID', 'Code Exec options must be an object.');
131
131
  const input = value;
132
+ const action = wait && input.action === null ? undefined : input.action;
132
133
  const yieldMs = input.yieldMs ?? (wait ? limits.codeDefaultWaitYieldMs : limits.codeDefaultYieldMs);
133
134
  if (!Number.isSafeInteger(yieldMs) ||
134
135
  Number(yieldMs) < 0 ||
135
136
  Number(yieldMs) > (wait ? limits.codeMaxWaitYieldMs : limits.codeMaxYieldMs) ||
136
137
  (wait && (typeof input.cellId !== 'string' || !input.cellId)) ||
137
- (input.action !== undefined && input.action !== 'poll' && input.action !== 'cancel'))
138
+ (action !== undefined && action !== 'poll' && action !== 'cancel'))
138
139
  throw new AgentError('MAR_AGENT_TOOL_INPUT_INVALID', 'Code Exec options are out of range.');
139
140
  return {
140
141
  cellId: input.cellId,
141
142
  yieldMs: Number(yieldMs),
142
- action: input.action ?? 'poll'
143
+ action: action ?? 'poll'
143
144
  };
144
145
  }
145
146
  /** Session-owned execution, separate from the cancellable model-tool wait. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.11.48",
3
+ "version": "0.11.50",
4
4
  "description": "Embeddable MAR coding agent SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",