@dynamicagents/plugins 0.16.1 → 0.18.0
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/README.md +3 -3
- package/dist/browser/index.d.ts +13 -16
- package/dist/browser/index.js +88 -26
- package/dist/claude-code/cards.d.ts +6 -1
- package/dist/claude-code/cards.js +21 -2
- package/dist/claude-code/model.d.ts +4 -0
- package/dist/claude-code/model.js +74 -7
- package/dist/claude-code/verified.d.ts +1 -1
- package/dist/claude-code/verified.js +1 -1
- package/dist/computer/client.d.ts +9 -1
- package/dist/computer/context.js +1 -1
- package/dist/computer/index.d.ts +10 -6
- package/dist/computer/index.js +34 -17
- package/dist/computer/paths.d.ts +26 -2
- package/dist/computer/paths.js +51 -5
- package/dist/computer/proxy.d.ts +10 -3
- package/dist/computer/proxy.js +77 -87
- package/dist/computer/render.d.ts +6 -35
- package/dist/computer/render.js +5 -43
- package/dist/computer/sandbox.d.ts +4 -3
- package/dist/computer/sandbox.js +9 -2
- package/dist/computer/shell.d.ts +8 -7
- package/dist/computer/shell.js +8 -7
- package/dist/computer/tools-exec.d.ts +39 -0
- package/dist/computer/tools-exec.js +357 -228
- package/dist/computer/tools-grep.js +10 -4
- package/dist/repo-github/sandbox-egress.d.ts +5 -1
- package/dist/repo-github/sandbox-egress.js +9 -3
- package/dist/sandbox/header.d.ts +13 -0
- package/dist/sandbox/header.js +19 -4
- package/dist/sandbox/install-plan.d.ts +1 -1
- package/dist/sandbox/install-plan.js +2 -4
- package/dist/sandbox/object.d.ts +1 -0
- package/dist/sandbox/object.js +21 -13
- package/package.json +12 -8
|
@@ -1,3 +1,42 @@
|
|
|
1
1
|
import type { ToolSet } from "ai";
|
|
2
2
|
import type { ComputerContext } from "./context.js";
|
|
3
|
+
/**
|
|
4
|
+
* The container's shell, as Computer's `exec` tool.
|
|
5
|
+
*
|
|
6
|
+
* **The tool is upstream's, and deliberately not wrapped past the advisory
|
|
7
|
+
* gate.** Its schema, its description, its truncation and its result shape are
|
|
8
|
+
* `@cloudflare/computer`'s, so the model sees the same `exec` everywhere that
|
|
9
|
+
* package's tools are installed and this plugin has no second dialect to keep in
|
|
10
|
+
* step. What that costs, each of it accepted rather than overlooked:
|
|
11
|
+
*
|
|
12
|
+
* - **Truncation keeps the tail, not both ends.** Upstream cuts each stream to
|
|
13
|
+
* its last lines, so a failure printed early in a long build is gone from what
|
|
14
|
+
* the model reads. The exit code still reports it, and the model's recourse is
|
|
15
|
+
* a narrower command.
|
|
16
|
+
* - **The description promises a file this workspace does not write.** Upstream
|
|
17
|
+
* tells the model that truncated output is saved where `read` and `grep` can
|
|
18
|
+
* open it. That holds for a Workspace whose runtime saves it; this one reports
|
|
19
|
+
* no saved path, so the reply names none and the sentence is unfulfilled.
|
|
20
|
+
* Nothing can be set to turn it off: the sentence is built into the generated
|
|
21
|
+
* description.
|
|
22
|
+
* - **A command stopped at the time limit or cancelled reads as a plain
|
|
23
|
+
* failure.** Upstream's result has somewhere for an exit code and somewhere
|
|
24
|
+
* for an error, and nowhere for the difference between a command that outran
|
|
25
|
+
* its limit, one whose call was cancelled, and one that simply failed.
|
|
26
|
+
* {@link file://./client.ts CommandResult.status} still carries it for the log
|
|
27
|
+
* line below, which is the only place it is read.
|
|
28
|
+
*
|
|
29
|
+
* What stays this plugin's, because neither belongs to a tool:
|
|
30
|
+
*
|
|
31
|
+
* - **The advisory gate**, below: a command waits out a running install, is
|
|
32
|
+
* refused while something transient makes it pointless, and carries a note
|
|
33
|
+
* about anything permanent. {@link file://./gate.ts ExecGate} is the contract.
|
|
34
|
+
* - **How the container runs a command**, in
|
|
35
|
+
* {@link file://./sandbox.ts sandboxClient}: the launch-and-cancel handshake,
|
|
36
|
+
* the time limit, and the shell transcript. A configured shell merges the two
|
|
37
|
+
* streams onto one of them, so `stderr` arrives empty and the whole transcript
|
|
38
|
+
* is in `stdout` — see {@link file://./shell.ts withShellTranscript} for why a
|
|
39
|
+
* model reading output wants that, and why the plugin's context block rather
|
|
40
|
+
* than the tool description is where the model is told.
|
|
41
|
+
*/
|
|
3
42
|
export declare function execTools(ctx: ComputerContext): ToolSet;
|