@myagentroam/agent 0.15.30 → 0.15.31
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.
|
@@ -25,7 +25,6 @@ export const codeModeToolDefinition = {
|
|
|
25
25
|
name: 'code_exec',
|
|
26
26
|
description: `Run JavaScript with programmatic tools.
|
|
27
27
|
- Evaluates source in a fresh restricted ECMAScript runtime with top-level await. It is not Node.js or a browser. JavaScript globals do not survive between cells; bounded JSON state is available through state.
|
|
28
|
-
- When exposed as a freeform tool, send the source directly; when exposed with a JSON input schema, put the source in its code field. JSON input example: \`{"code":"observe.text(1);"}\`. The source itself is raw JavaScript, not a JSON wrapper, quoted string, or markdown code fence.
|
|
29
28
|
- Provides standard ECMAScript built-ins and frozen tools, observe, state and cell bindings. Module imports, filesystem and network APIs are unavailable in the guest.
|
|
30
29
|
|
|
31
30
|
Tool calls:
|
|
@@ -36,11 +35,13 @@ Tool calls:
|
|
|
36
35
|
- Direct-only tools cannot be called here. When available, tools.tool_search discovers deferred tools for the next model request; the current cell's tools do not change.
|
|
37
36
|
|
|
38
37
|
Built-in namespaces:
|
|
39
|
-
- observe.result(result): void registers
|
|
40
|
-
- observe.text(value): void registers text/JSON values. observe.
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
38
|
+
- observe.result(result): void registers the unmodified result of await tools.NAME(input), or a caught tool error, as a tool_result observation. Copies and modified values are rejected. The model sees the tool's normal output, which may omit fields from data. Example: \`observe.result(r);\` for an unchanged tool result.
|
|
39
|
+
- observe.text(value): void registers text/JSON values. Example: \`observe.text(excerpt);\` for a source excerpt labeled with its path and line numbers.
|
|
40
|
+
- observe.image(value): void registers one image object. Example: \`observe.image(image);\` where image is one object from r.images. Image observations require a model that supports image input.
|
|
41
|
+
- Observations are returned in registration order; registering one does not trigger a new model request. JavaScript return values are not emitted as observations. No out or callable observe(value) alias exists.
|
|
42
|
+
- state.get(key), state.has(key), state.set(key, value), state.delete(key) access bounded session state with nonempty string keys and JSON values. get returns a JSON copy or undefined if the key is missing. Writes are visible in the current cell and commit atomically only on success; failed or cancelled cells discard them.
|
|
43
|
+
- await cell.sleep(ms) performs a cancellable delay; ms is an integer from 0 to ${limits.codeSleepMaxMs}.
|
|
44
|
+
- cell.yield_control(): void lets the outer wait return with accumulated output while the cell continues running.
|
|
44
45
|
- Optionally start source with // @options: {"yieldMs": ${limits.codeDefaultYieldMs}}. yieldMs defaults to ${limits.codeDefaultYieldMs} ms and controls this call's wait window (0..${limits.codeMaxYieldMs}), not nested tool timeouts or wait windows. A running result includes cellId (c_ plus 12 lowercase hex characters); use direct code_exec_wait for new output, completion or termination.
|
|
45
46
|
- waitOutcome separates snapshot, completion, timeout, and yield from the cell status. A foreground steer returns interrupted with reason=steer without stopping the cell or its internal tool waits.
|
|
46
47
|
- Registered cells are Session warm resources: ending or cancelling the model Execution cancels its wait, not the cell. Host cleanup or explicit termination stops the cell.`,
|