@myagentroam/agent 0.9.166 → 0.9.167

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.
@@ -1,6 +1,6 @@
1
1
  import type { ExecutionMode } from '../runtime/contracts.js';
2
2
  import { type CorePromptPart } from '../extensions/prompt-composition.js';
3
- export declare const MAR_AGENT_PROMPT_VERSION = "1.60";
3
+ export declare const MAR_AGENT_PROMPT_VERSION = "1.61";
4
4
  interface SystemPromptInput {
5
5
  mode: ExecutionMode;
6
6
  platform: string;
@@ -5,7 +5,7 @@ import { modePrompt } from './modes.js';
5
5
  import { outputStylePrompt } from './output.js';
6
6
  import { subagentPrompt } from './subagent.js';
7
7
  import { interactionPrompt, longRunningPrompt, safetyPrompt, toolUsagePrompt, workflowPrompt } from './workflow.js';
8
- export const MAR_AGENT_PROMPT_VERSION = '1.60';
8
+ export const MAR_AGENT_PROMPT_VERSION = '1.61';
9
9
  export function buildSystemPrompt(input) {
10
10
  return renderPromptSections(buildSystemPromptSections(input));
11
11
  }
@@ -5,13 +5,13 @@ export function retainedSessionResourcesSnapshot(input) {
5
5
  const subagents = [...input.subagents];
6
6
  return [
7
7
  '# Retained Session resources',
8
+ 'These resources belong to this Session. Reuse their stable IDs instead of starting duplicate processes or subagents. This list is not the tool catalog. Terminal entries need no cleanup; reuse recorded results unless you need missing output.',
8
9
  ...(input.codeCells?.length
9
10
  ? [
10
- 'Code Exec cells: use direct code_exec_wait with the retained cellId; cancelling a wait does not terminate the cell.',
11
+ 'Code Exec cells: use direct code_exec_wait with the retained cellId for ongoing work or needed output; cancelling a wait does not terminate the cell.',
11
12
  ...input.codeCells.map((cell) => `- cellId: ${cell.cellId}; status: ${cell.status}; executionId: ${cell.executionId}`)
12
13
  ]
13
14
  : []),
14
- 'These resources belong to this Session and survived the previous Execution. Reuse their stable IDs instead of starting duplicate processes or subagents.',
15
15
  processes.length === 0
16
16
  ? ''
17
17
  : 'Use exec_wait with processId to wait, write stdin or cancel; in Code Mode use tools.exec_wait. Cancelling a wait leaves the process running; explicit cancel releases the process resource.',
@@ -25,7 +25,7 @@ export function toolUsagePrompt(tools, directTools = tools) {
25
25
  if (names.has('apply_patch') || names.has('exec'))
26
26
  clauses.push('Write large generated documents in bounded sections rather than one oversized tool call. Mechanical rewrites are exempt.');
27
27
  if (names.has('exec') || names.has('agent_wait'))
28
- clauses.push('Use bounded waits rather than busy polling. Complete or cancel every resource before ending.');
28
+ clauses.push('Use bounded waits rather than busy polling. Resolve pending work needed for this task before ending; terminal caches need no cleanup.');
29
29
  return clauses.join(' ');
30
30
  }
31
31
  export function longRunningPrompt(tools) {
@@ -73,7 +73,7 @@ observe.result(patched);
73
73
  };
74
74
  export const codeExecWaitToolDefinition = {
75
75
  name: 'code_exec_wait',
76
- description: 'Wait for a retained Code Exec cell by cellId. Returns only new output, or a bounded terminal snapshot marked cached on repeat reads. yieldMs is a wait window, not a timeout. action defaults to poll (wait); action cancel stops the cell and waits for cleanup. Cancelling this wait does not cancel the cell. Cells belong to the current Session and cannot survive Host restart. Call directly, never inside code_exec.',
76
+ description: 'Wait for a retained Code Exec cell by cellId. It cannot start new work; use code_exec for that. A missing cellId does not mean code_exec is unavailable. Returns only new output, or a bounded terminal snapshot marked cached on repeat reads. yieldMs is a wait window, not a timeout. action defaults to poll (wait); action cancel stops the cell and waits for cleanup. Cancelling this wait does not cancel the cell. Cells belong to the current Session and cannot survive Host restart. Call directly, never inside code_exec.',
77
77
  inputSchema: {
78
78
  type: 'object',
79
79
  properties: {
@@ -26,7 +26,7 @@ export declare const TOOL_EXECUTION_LIMITS: Readonly<{
26
26
  codeMaxYieldMs: 30000;
27
27
  codeMaxWaitYieldMs: 300000;
28
28
  codeMaxOutputTokens: 10000;
29
- codeCompletedRetentionMs: 300000;
29
+ codeCompletedRetentionMs: 600000;
30
30
  codeMaxCompletedResults: 32;
31
31
  codeStateMaxEntries: 128;
32
32
  codeStateMaxMutations: 128;
@@ -26,7 +26,7 @@ export const TOOL_EXECUTION_LIMITS = Object.freeze({
26
26
  codeMaxYieldMs: 30_000,
27
27
  codeMaxWaitYieldMs: 300_000,
28
28
  codeMaxOutputTokens: 10_000,
29
- codeCompletedRetentionMs: 300_000,
29
+ codeCompletedRetentionMs: 600_000,
30
30
  codeMaxCompletedResults: 32,
31
31
  codeStateMaxEntries: 128,
32
32
  codeStateMaxMutations: 128,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.9.166",
3
+ "version": "0.9.167",
4
4
  "description": "Embeddable MAR coding agent SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",