@myagentroam/agent 0.13.28 → 0.13.29

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.
@@ -47,7 +47,7 @@ export function publicHostedToolEvents(event) {
47
47
  const text = typeof output === 'string' ? output : output === undefined ? '' : JSON.stringify(output);
48
48
  const preview = toolEventSummary(text);
49
49
  const summary = preview.summary;
50
- const truncated = event.truncated === true || legacyOutput.sourcesTruncated === true || preview.truncated;
50
+ const truncated = event.truncated === true || legacyOutput.sourcesTruncated === true;
51
51
  const started = {
52
52
  type: 'tool.started',
53
53
  toolName,
@@ -70,7 +70,8 @@ export function publicHostedToolEvents(event) {
70
70
  callId: event.itemId,
71
71
  code: 'HOSTED_TOOL_FAILED',
72
72
  message: summary || 'Hosted tool failed.',
73
- truncated
73
+ truncated,
74
+ ...(preview.truncated ? { summaryTruncated: true } : {})
74
75
  }
75
76
  ];
76
77
  return [
@@ -81,7 +82,7 @@ export function publicHostedToolEvents(event) {
81
82
  callId: event.itemId,
82
83
  summary,
83
84
  truncated,
84
- ...(preview.truncated || event.truncated === true ? { summaryTruncated: true } : {}),
85
+ ...(preview.truncated ? { summaryTruncated: true } : {}),
85
86
  data: started.data
86
87
  }
87
88
  ];
@@ -125,6 +125,7 @@ export type AgentEvent = AgentEventBase & ({
125
125
  message?: string;
126
126
  permissionStop?: import('../tools/permission-contract.js').PermissionStop;
127
127
  truncated?: boolean;
128
+ summaryTruncated?: boolean;
128
129
  outputTruncation?: 'HEAD' | 'SOURCE';
129
130
  } | {
130
131
  type: 'sleep.started';
@@ -1,6 +1,8 @@
1
1
  import type { ClientToolDefinition } from '../contracts.js';
2
2
  import type { ToolRuntimeContext } from '../runtime-context.js';
3
+ /** @deprecated Unregistered legacy Todo tool; retained until Todo compatibility is removed. */
3
4
  export declare const todoReadToolDefinition: ClientToolDefinition;
5
+ /** @deprecated Internal legacy handler; not registered as a callable tool. */
4
6
  export declare function executeTodoRead(context: ToolRuntimeContext): Promise<{
5
7
  content: string;
6
8
  data: {
@@ -1,3 +1,4 @@
1
+ /** @deprecated Unregistered legacy Todo tool; retained until Todo compatibility is removed. */
1
2
  export const todoReadToolDefinition = {
2
3
  name: 'todo_read',
3
4
  allowedCallers: ['direct', 'programmatic'],
@@ -5,6 +6,7 @@ export const todoReadToolDefinition = {
5
6
  description: 'Read this session’s current Todo revision and items when you need the existing list. A prior read is not required to write Todo. Do not read an empty or new Todo merely to decide whether straightforward bounded work needs one.',
6
7
  inputSchema: { type: 'object', properties: {}, additionalProperties: false }
7
8
  };
9
+ /** @deprecated Internal legacy handler; not registered as a callable tool. */
8
10
  export function executeTodoRead(context) {
9
11
  const plan = context.todo.read();
10
12
  return Promise.resolve({ content: JSON.stringify(plan), data: plan });
@@ -1,6 +1,8 @@
1
1
  import type { ClientToolDefinition } from '../contracts.js';
2
2
  import type { ToolRuntimeContext } from '../runtime-context.js';
3
+ /** @deprecated Unregistered legacy Todo tool; retained until Todo compatibility is removed. */
3
4
  export declare const todoWriteToolDefinition: ClientToolDefinition;
5
+ /** @deprecated Internal legacy handler; not registered as a callable tool. */
4
6
  export declare function executeTodoWrite(arguments_: unknown, context: ToolRuntimeContext): Promise<{
5
7
  content: string;
6
8
  data: {
@@ -1,5 +1,6 @@
1
1
  import { AgentError } from '../../error.js';
2
2
  import { TOOL_EXECUTION_LIMITS } from '../execution-limits.js';
3
+ /** @deprecated Unregistered legacy Todo tool; retained until Todo compatibility is removed. */
3
4
  export const todoWriteToolDefinition = {
4
5
  name: 'todo_write',
5
6
  allowedCallers: ['direct', 'programmatic'],
@@ -27,6 +28,7 @@ export const todoWriteToolDefinition = {
27
28
  additionalProperties: false
28
29
  }
29
30
  };
31
+ /** @deprecated Internal legacy handler; not registered as a callable tool. */
30
32
  export async function executeTodoWrite(arguments_, context) {
31
33
  const value = parseTodoWriteInput(arguments_);
32
34
  const todo = context.todo.write(value);
@@ -1,5 +1,6 @@
1
1
  import { type TodoItem, type TodoSnapshot } from '../../session/todo.js';
2
2
  export type { TodoItem, TodoSnapshot } from '../../session/todo.js';
3
+ /** @deprecated Retained for legacy Session Todo restoration, not new model workflows. */
3
4
  export declare class TodoStore {
4
5
  #private;
5
6
  static restore(snapshot: TodoSnapshot): TodoStore;
@@ -1,5 +1,6 @@
1
1
  import { AgentError } from '../../error.js';
2
2
  import { normalizeTodoItems, todoItemsFromSnapshot } from '../../session/todo.js';
3
+ /** @deprecated Retained for legacy Session Todo restoration, not new model workflows. */
3
4
  export class TodoStore {
4
5
  #revision = 0;
5
6
  #items = [];
@@ -63,7 +63,7 @@ export function createCodeToolDispatch(input) {
63
63
  ...(preview.truncated ? { summaryTruncated: true } : {}),
64
64
  ...(outputTruncation ? { outputTruncation } : {}),
65
65
  ...(data === undefined ? {} : { data: publicEventOutputData(data) }),
66
- truncated: result.truncated === true || bounded.truncated || preview.truncated,
66
+ truncated: result.truncated === true || bounded.truncated,
67
67
  ...(result.artifacts ? { artifacts: result.artifacts } : {})
68
68
  });
69
69
  const { eventData: _eventData, eventSummary: _eventSummary, ...guestResult } = result;
@@ -11,6 +11,7 @@ export declare const TOOL_EXECUTION_LIMITS: Readonly<{
11
11
  execMaxTimeoutMs: 3600000;
12
12
  execDefaultYieldMs: 10000;
13
13
  execMaxYieldMs: 30000;
14
+ execDefaultPollYieldMs: 60000;
14
15
  execMaxPollYieldMs: 300000;
15
16
  execTerminationGraceMs: 1000;
16
17
  execDefaultMaxOutputBytes: 1000000;
@@ -13,6 +13,7 @@ export const TOOL_EXECUTION_LIMITS = Object.freeze({
13
13
  execMaxTimeoutMs: 3_600_000,
14
14
  execDefaultYieldMs: 10_000,
15
15
  execMaxYieldMs: 30_000,
16
+ execDefaultPollYieldMs: 60_000,
16
17
  execMaxPollYieldMs: 300_000,
17
18
  execTerminationGraceMs: 1_000,
18
19
  execDefaultMaxOutputBytes: 1_000_000,
@@ -147,7 +147,7 @@ export async function executeRoundTools(calls, scope) {
147
147
  callId: call.callId,
148
148
  ...(parentCallId === undefined ? {} : { parentCallId }),
149
149
  summary: eventSummary.summary,
150
- truncated: output.truncated === true || modelOutput.truncated || eventSummary.truncated,
150
+ truncated: output.truncated === true || modelOutput.truncated,
151
151
  ...(eventSummary.truncated ? { summaryTruncated: true } : {}),
152
152
  ...(outputTruncation ? { outputTruncation } : {}),
153
153
  ...(artifacts === undefined ? {} : { artifacts }),
@@ -124,8 +124,8 @@ export const execWaitToolDefinition = {
124
124
  type: 'integer',
125
125
  minimum: 0,
126
126
  maximum: TOOL_EXECUTION_LIMITS.execMaxPollYieldMs,
127
- default: TOOL_EXECUTION_LIMITS.execDefaultYieldMs,
128
- description: `Poll wait window in milliseconds; default ${TOOL_EXECUTION_LIMITS.execDefaultYieldMs}, maximum ${TOOL_EXECUTION_LIMITS.execMaxPollYieldMs}. Zero returns immediately. Not a process timeout.`
127
+ default: TOOL_EXECUTION_LIMITS.execDefaultPollYieldMs,
128
+ description: `Poll wait window in milliseconds; default ${TOOL_EXECUTION_LIMITS.execDefaultPollYieldMs}, maximum ${TOOL_EXECUTION_LIMITS.execMaxPollYieldMs}. Zero returns immediately. Not a process timeout.`
129
129
  },
130
130
  data: { type: 'string', description: 'Required stdin data for write.' }
131
131
  },
@@ -183,7 +183,7 @@ export function parseExecInput(value) {
183
183
  return {
184
184
  action,
185
185
  processId: input.processId,
186
- yieldMs: yieldMs ?? TOOL_EXECUTION_LIMITS.execDefaultYieldMs
186
+ yieldMs: yieldMs ?? TOOL_EXECUTION_LIMITS.execDefaultPollYieldMs
187
187
  };
188
188
  if (action === 'write') {
189
189
  if (typeof input.data !== 'string')
@@ -4,8 +4,9 @@ import { execToolDefinition, execWaitToolDefinition } from './local/exec.js';
4
4
  import { executeQuestion, questionToolDefinition } from './agent/question.js';
5
5
  import { readToolDefinition } from './local/read.js';
6
6
  import { executeSkill, skillToolDefinition } from './agent/skill.js';
7
- import { executeTodoRead, todoReadToolDefinition } from './agent/todo-read.js';
8
- import { executeTodoWrite, todoWriteToolDefinition } from './agent/todo-write.js';
7
+ // Deprecated Todo tools are not registered. Keep their implementation for legacy history.
8
+ // import { executeTodoRead, todoReadToolDefinition } from './agent/todo-read.js';
9
+ // import { executeTodoWrite, todoWriteToolDefinition } from './agent/todo-write.js';
9
10
  import { executeToolSearch, toolSearchToolDefinition } from './mcp/tool-search.js';
10
11
  import { viewImageToolDefinition } from './local/view-image.js';
11
12
  import { smartCompactToolDefinition, executeSmartCompact } from './agent/smart-compact.js';
@@ -21,8 +22,8 @@ export const BUILTIN_TOOL_DEFINITIONS = [
21
22
  codeExecWaitToolDefinition,
22
23
  applyPatchToolDefinition,
23
24
  questionToolDefinition,
24
- todoReadToolDefinition,
25
- todoWriteToolDefinition,
25
+ // todoReadToolDefinition,
26
+ // todoWriteToolDefinition,
26
27
  smartCompactToolDefinition,
27
28
  sleepToolDefinition
28
29
  ];
@@ -31,7 +32,7 @@ export const AGENT_TOOL_HANDLERS = new Map([
31
32
  ['sleep', executeSleep],
32
33
  ['smart_compact', executeSmartCompact],
33
34
  ['tool_search', executeToolSearch],
34
- ['question', executeQuestion],
35
- ['todo_read', (_arguments, context) => executeTodoRead(context)],
36
- ['todo_write', executeTodoWrite]
35
+ // ['todo_read', (_arguments, context) => executeTodoRead(context)],
36
+ // ['todo_write', executeTodoWrite],
37
+ ['question', executeQuestion]
37
38
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.13.28",
3
+ "version": "0.13.29",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/myagentroam/mar.git",