@deepagents/context 6.0.0 → 6.1.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
CHANGED
|
@@ -32,6 +32,8 @@ with `createVirtualSandbox()`, `createDockerSandbox()`,
|
|
|
32
32
|
`createDaytonaSandbox(client, options)`, or `createAgentOsSandbox()` depending
|
|
33
33
|
on whether commands should run in memory, Docker, Apple Container lightweight
|
|
34
34
|
VMs, Microsandbox microVMs, managed Daytona sandboxes, or Agent OS.
|
|
35
|
+
Virtual sandboxes can opt into in-process JavaScript execution with
|
|
36
|
+
`createVirtualSandbox({ javascript: true, ... })`.
|
|
35
37
|
|
|
36
38
|
See the docs for the full API surface:
|
|
37
39
|
|
package/dist/index.js
CHANGED
|
@@ -7878,6 +7878,7 @@ var KNOWN_TOOLS = /* @__PURE__ */ new Set([
|
|
|
7878
7878
|
"head",
|
|
7879
7879
|
"html-to-markdown",
|
|
7880
7880
|
"iconv",
|
|
7881
|
+
"js-exec",
|
|
7881
7882
|
"join",
|
|
7882
7883
|
"jq",
|
|
7883
7884
|
"node",
|
|
@@ -8022,6 +8023,7 @@ async function createToolPrompt(sandbox, filenames, customPrompt) {
|
|
|
8022
8023
|
const available = new Set(
|
|
8023
8024
|
result.stdout.split("\n").filter((entry) => KNOWN_TOOLS.has(entry))
|
|
8024
8025
|
);
|
|
8026
|
+
if (available.has("js-exec")) available.delete("node");
|
|
8025
8027
|
if (available.size === 0) return "";
|
|
8026
8028
|
const lines = [
|
|
8027
8029
|
`Available tools: ${[...available].sort().join(", ")}, and more`
|
|
@@ -10237,12 +10239,15 @@ function buildSubcommandRepair(name, subcommands) {
|
|
|
10237
10239
|
}
|
|
10238
10240
|
|
|
10239
10241
|
// packages/context/src/lib/sandbox/virtual-sandbox.ts
|
|
10240
|
-
import {
|
|
10242
|
+
import {
|
|
10243
|
+
Bash
|
|
10244
|
+
} from "just-bash";
|
|
10241
10245
|
async function createVirtualSandbox(options) {
|
|
10242
10246
|
const bash = new Bash({
|
|
10243
10247
|
fs: options.fs,
|
|
10244
10248
|
cwd: options.cwd,
|
|
10245
10249
|
env: options.env,
|
|
10250
|
+
javascript: options.javascript,
|
|
10246
10251
|
customCommands: options.customCommands
|
|
10247
10252
|
});
|
|
10248
10253
|
const sandbox = {
|