@myagentroam/agent 0.9.144 → 0.9.145
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/dist/agent-core/tools/code-mode/cells.js +1 -1
- package/dist/agent-core/tools/code-mode/index.js +1 -1
- package/dist/agent-core/tools/code-mode/quickjs-engine.js +8 -3
- package/dist/agent-core/tools/execution-limits.d.ts +2 -2
- package/dist/agent-core/tools/execution-limits.js +2 -2
- package/dist/agent-core/tools/local/exec.js +1 -1
- package/package.json +1 -1
|
@@ -81,7 +81,7 @@ export class CodeCells {
|
|
|
81
81
|
throw new MarAgentError('MAR_AGENT_CODE_CANCELLED', 'Code Exec resources are being released.');
|
|
82
82
|
if ([...this.#cells.values()].filter((cell) => cell.status === 'running').length >=
|
|
83
83
|
limits.codeMaxConcurrentCells)
|
|
84
|
-
throw new MarAgentError('MAR_AGENT_PROCESS_LIMIT',
|
|
84
|
+
throw new MarAgentError('MAR_AGENT_PROCESS_LIMIT', `The Local Host shared running-cell limit (${limits.codeMaxConcurrentCells}) was reached.`);
|
|
85
85
|
const controller = new AbortController();
|
|
86
86
|
const cell = {
|
|
87
87
|
cellId: randomUUID(),
|
|
@@ -218,7 +218,7 @@ export class CodeModeTool {
|
|
|
218
218
|
throw new MarAgentError('MAR_AGENT_TOOL_NOT_AVAILABLE', 'Code Mode tool dispatch is unavailable.');
|
|
219
219
|
context.signal.throwIfAborted();
|
|
220
220
|
if (this.#active.size >= limits.codeMaxConcurrentCells)
|
|
221
|
-
throw new MarAgentError('MAR_AGENT_PROCESS_LIMIT',
|
|
221
|
+
throw new MarAgentError('MAR_AGENT_PROCESS_LIMIT', `The Local Host shared running-cell limit (${limits.codeMaxConcurrentCells}) was reached.`);
|
|
222
222
|
const controller = new AbortController();
|
|
223
223
|
const signal = AbortSignal.any([context.signal, controller.signal]);
|
|
224
224
|
let release;
|
|
@@ -42,14 +42,19 @@ export async function createCodeModeEngine(options) {
|
|
|
42
42
|
if (Date.now() >= deadline)
|
|
43
43
|
throw diagnostic('MAR_AGENT_CODE_TIMEOUT', 'JavaScript execution exceeded its deadline.');
|
|
44
44
|
let message = String(error?.message ?? error).slice(0, 4096);
|
|
45
|
+
const syntaxError = locateSource && error?.name === 'SyntaxError';
|
|
46
|
+
if (syntaxError)
|
|
47
|
+
message = `JavaScript compilation failed before tool execution: ${message}`.slice(0, 4096);
|
|
45
48
|
const location = locateSource ? compilerSourceLocation(error, input.code) : '';
|
|
46
49
|
if (location)
|
|
47
50
|
message = message.slice(0, 4096 - location.length) + location;
|
|
48
51
|
const code = message.includes('out of memory')
|
|
49
52
|
? 'MAR_AGENT_CODE_MEMORY_LIMIT'
|
|
50
|
-
:
|
|
51
|
-
?
|
|
52
|
-
: '
|
|
53
|
+
: syntaxError
|
|
54
|
+
? 'MAR_AGENT_CODE_SYNTAX_ERROR'
|
|
55
|
+
: typeof error?.code === 'string'
|
|
56
|
+
? error.code
|
|
57
|
+
: 'MAR_AGENT_CODE_FAILED';
|
|
53
58
|
throw diagnostic(code, message);
|
|
54
59
|
};
|
|
55
60
|
const guestError = (code, message) => {
|
|
@@ -13,7 +13,7 @@ export declare const TOOL_EXECUTION_LIMITS: Readonly<{
|
|
|
13
13
|
execMaxPollYieldMs: 300000;
|
|
14
14
|
execTerminationGraceMs: 1000;
|
|
15
15
|
execDefaultMaxOutputBytes: 1000000;
|
|
16
|
-
maxProcesses:
|
|
16
|
+
maxProcesses: 64;
|
|
17
17
|
execMaxCompletedResults: 16;
|
|
18
18
|
execCompletedRetentionMs: 300000;
|
|
19
19
|
codeMaxInputBytes: 1048576;
|
|
@@ -21,7 +21,7 @@ export declare const TOOL_EXECUTION_LIMITS: Readonly<{
|
|
|
21
21
|
codeMaxFrameBytes: 33554432;
|
|
22
22
|
codeMaxTransportBytes: 67108864;
|
|
23
23
|
codeMaxCalls: 128;
|
|
24
|
-
codeMaxConcurrentCells:
|
|
24
|
+
codeMaxConcurrentCells: 64;
|
|
25
25
|
codeDefaultYieldMs: 30000;
|
|
26
26
|
codeDefaultWaitYieldMs: 10000;
|
|
27
27
|
codeMaxYieldMs: 30000;
|
|
@@ -13,7 +13,7 @@ export const TOOL_EXECUTION_LIMITS = Object.freeze({
|
|
|
13
13
|
execMaxPollYieldMs: 300_000,
|
|
14
14
|
execTerminationGraceMs: 1_000,
|
|
15
15
|
execDefaultMaxOutputBytes: 1_000_000,
|
|
16
|
-
maxProcesses:
|
|
16
|
+
maxProcesses: 64,
|
|
17
17
|
execMaxCompletedResults: 16,
|
|
18
18
|
execCompletedRetentionMs: 300_000,
|
|
19
19
|
codeMaxInputBytes: 1_048_576,
|
|
@@ -21,7 +21,7 @@ export const TOOL_EXECUTION_LIMITS = Object.freeze({
|
|
|
21
21
|
codeMaxFrameBytes: 33_554_432,
|
|
22
22
|
codeMaxTransportBytes: 67_108_864,
|
|
23
23
|
codeMaxCalls: 128,
|
|
24
|
-
codeMaxConcurrentCells:
|
|
24
|
+
codeMaxConcurrentCells: 64,
|
|
25
25
|
codeDefaultYieldMs: 30_000,
|
|
26
26
|
codeDefaultWaitYieldMs: 10_000,
|
|
27
27
|
codeMaxYieldMs: 30_000,
|
|
@@ -161,7 +161,7 @@ export class ExecTool {
|
|
|
161
161
|
return result;
|
|
162
162
|
}
|
|
163
163
|
if (this.#processes.size + this.#startingProcesses.size >= this.maxProcesses)
|
|
164
|
-
throw new MarAgentError('MAR_AGENT_PROCESS_LIMIT',
|
|
164
|
+
throw new MarAgentError('MAR_AGENT_PROCESS_LIMIT', `The Local Host shared managed-process limit (${this.maxProcesses}) was reached.`);
|
|
165
165
|
let resolveStarting;
|
|
166
166
|
const starting = {
|
|
167
167
|
...(owner === undefined ? {} : { ownerSessionId: owner.sessionId }),
|