@myagentroam/agent 0.11.36 → 0.11.38
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.
|
@@ -15,7 +15,7 @@ export function retainedSessionResourcesSnapshot(input) {
|
|
|
15
15
|
: []),
|
|
16
16
|
processes.length === 0
|
|
17
17
|
? ''
|
|
18
|
-
: 'Use exec_wait with processId to wait, write stdin or cancel
|
|
18
|
+
: 'Use exec_wait with processId to wait, write stdin or cancel. Cancelling a wait leaves the process running; explicit cancel releases the process resource.',
|
|
19
19
|
subagents.length === 0
|
|
20
20
|
? ''
|
|
21
21
|
: 'agent_cancel stops only the current child turn and retains its Session for later messages or explicit deletion.',
|
package/dist/prompts/subagent.js
CHANGED
|
@@ -4,7 +4,7 @@ export const subagentPrompt = [
|
|
|
4
4
|
'Call agent_start, agent_wait, agent_message and agent_cancel directly, never inside code_exec; they are absent from the cell tools namespace.',
|
|
5
5
|
'Delegate bounded, self-contained tasks when independent progress or context savings materially helps. Keep simple or tightly coupled work local; do not split work merely to use agents.',
|
|
6
6
|
'All agents share the filesystem. Give each child an objective, necessary context, expected output, and an exclusive write scope or a read-only boundary; avoid conflicting writes.',
|
|
7
|
-
'While children run, continue meaningful non-overlapping work. Do not redo delegated work. Wait only when the next step needs the result; do not poll for reassurance.',
|
|
7
|
+
'While children run, continue meaningful non-overlapping work without intervening status checks. Do not redo delegated work. Wait only when the next step needs the result; do not poll for reassurance.',
|
|
8
8
|
'Use concise handoffs and independently verify consequential changes and claims. Track child IDs, join or cancel required child work before final delivery, and retain responsibility for the final result.'
|
|
9
9
|
].join('\n');
|
|
10
10
|
export const childSubagentInstruction = 'You are a non-recursive subagent. Complete only the delegated objective within its read/write scope. Other agents share your workspace: preserve their changes and report an exact conflict or blocker to the parent instead of expanding scope. Return a concise factual handoff with findings, useful evidence paths, files changed, tests actually run and their outcomes, and remaining blockers or uncertainty.';
|
package/dist/prompts/workflow.js
CHANGED
|
@@ -17,7 +17,7 @@ export function toolUsagePrompt(tools, directTools = tools) {
|
|
|
17
17
|
if (names.has('exec'))
|
|
18
18
|
clauses.push('Use exec for platform-native commands, scripts, verification, and mechanical edits. Prefer rg or rg --files for search. Batch independent lookups and already-decided commands, preserving failure ordering. Use scripts for mechanical substitutions instead of reproducing long unchanged text in a patch; inspect actual effects afterward.');
|
|
19
19
|
if (names.has('exec_wait'))
|
|
20
|
-
clauses.push('Use exec_wait with processId for subsequent process waits, stdin writes or cancellation
|
|
20
|
+
clauses.push('Use exec_wait with processId for subsequent process waits, stdin writes or cancellation. exec only starts commands.');
|
|
21
21
|
if (names.has('read'))
|
|
22
22
|
clauses.push('Use read to batch known files and ranges. Batch only already-located, bounded ranges that are likely to fit together; for large files or documents, locate relevant sections before reading them. Read only what can affect the next decision, continue only relevant incomplete results using returned metadata, and avoid rereading unchanged content. Do not edit from an incomplete oversized-line preview. Obtain exact source with exec; if it still cannot fit, use a preconditioned deterministic replacement and verify the result.');
|
|
23
23
|
if (names.has('apply_patch'))
|
|
@@ -30,7 +30,7 @@ export const codeModeToolDefinition = {
|
|
|
30
30
|
- Evaluates source in a fresh restricted ECMAScript runtime with top-level await and Promise.all. It is not Node.js or a browser. JavaScript globals do not survive between cells; bounded JSON state is available through state.
|
|
31
31
|
- Accepts JavaScript source text. When exposed as a freeform tool, send the source directly; when exposed with a JSON input schema, put the source in its code field. Do not add another JSON wrapper, quoted string, or markdown code fence inside the source.
|
|
32
32
|
- Keep embedded commands, patches and source in JSON-escaped double-quoted strings when they contain backticks or literal \${...}; escape newlines as \\n, never put literal line breaks inside single- or double-quoted JS strings. JavaScript template literals would interpolate their contents before the tool runs. Do not paste Python literals such as None into JavaScript expressions.
|
|
33
|
-
- Use only standard ECMAScript built-ins and the explicitly documented tools, observe, state, catalog and cell namespaces. Do not use Node.js, browser or Web APIs. Module imports, filesystem and network APIs are unavailable. Obtain external capabilities only through available tools. Use tools.exec to start managed processes when permitted;
|
|
33
|
+
- Use only standard ECMAScript built-ins and the explicitly documented tools, observe, state, catalog and cell namespaces. Do not use Node.js, browser or Web APIs. Module imports, filesystem and network APIs are unavailable. Obtain external capabilities only through available tools. Use tools.exec to start managed processes when permitted; follow exec_wait's calling guidance for process control.
|
|
34
34
|
|
|
35
35
|
Tool calls:
|
|
36
36
|
- tools.NAME(input) returns a Promise. Pass a JavaScript value matching the current catalog inputSchema. For parameterless tools prefer tools.NAME({}); tools.NAME() is accepted only for explicitly closed empty-object schemas.
|
package/dist/tools/local/exec.js
CHANGED
|
@@ -98,8 +98,9 @@ export const execToolDefinition = {
|
|
|
98
98
|
export const execWaitToolDefinition = {
|
|
99
99
|
name: 'exec_wait',
|
|
100
100
|
allowedCallers: ['direct', 'programmatic'],
|
|
101
|
+
codeModeExposure: 'both',
|
|
101
102
|
parallelSafety: 'safe',
|
|
102
|
-
description: 'Wait for or control a managed process by processId. action defaults to poll: collect output until termination or the wait window ends, then return incremental stdout/stderr. New output does not end the wait. write sends data to stdin; cancel terminates the process or removes its cached result. Terminal polls return a bounded snapshot marked cached for up to five minutes. Cancelling a wait does not terminate the process. Uses the same Session-owned processes as exec; cannot start a process or extend its timeout. Inspect stderr/exitCode; completed does not imply success.
|
|
103
|
+
description: 'Wait for or control a managed process by processId. action defaults to poll: collect output until termination or the wait window ends, then return incremental stdout/stderr. New output does not end the wait. write sends data to stdin; cancel terminates the process or removes its cached result. Terminal polls return a bounded snapshot marked cached for up to five minutes. Cancelling a wait does not terminate the process. Uses the same Session-owned processes as exec; cannot start a process or extend its timeout. Inspect stderr/exitCode; completed does not imply success. Prefer direct calls for a single wait; use tools.exec_wait for composition. Do not duplicate an active wait for the same process. Poll results include waitOutcome; interrupted with reason=steer ends only a foreground wait, never the process.',
|
|
103
104
|
outputSchema: execToolDefinition.outputSchema,
|
|
104
105
|
inputSchema: {
|
|
105
106
|
type: 'object',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/agent",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.38",
|
|
4
4
|
"description": "Embeddable MAR coding agent SDK and CLI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "node ../scripts/clean-build-output.mjs dist && tsc -p tsconfig.json",
|
|
62
62
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
63
|
-
"test:unit": "vitest run --config vitest.config.ts test/unit",
|
|
63
|
+
"test:unit": "pnpm build && vitest run --config vitest.config.ts test/unit",
|
|
64
64
|
"analyze:session": "node test/tools/session-analyzer.mjs",
|
|
65
65
|
"benchmark:compaction": "node test/e2e/compaction-benchmark.mjs",
|
|
66
66
|
"test:performance": "vitest run --config vitest.performance.config.ts",
|