@deepagents/context 7.5.2 → 7.7.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 +12 -10
- package/dist/index.js +1409 -1807
- package/dist/index.js.map +4 -4
- package/dist/lib/agent.d.ts +21 -21
- package/dist/lib/agent.d.ts.map +1 -1
- package/dist/lib/fragments/plan-shared.d.ts.map +1 -1
- package/dist/lib/sandbox/apple-container-sandbox.d.ts +2 -2
- package/dist/lib/sandbox/apple-container-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/bash-tool.d.ts +2 -4
- package/dist/lib/sandbox/bash-tool.d.ts.map +1 -1
- package/dist/lib/sandbox/container-engine.d.ts +53 -27
- package/dist/lib/sandbox/container-engine.d.ts.map +1 -1
- package/dist/lib/sandbox/container-sandbox.d.ts +6 -3
- package/dist/lib/sandbox/container-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/container-session.d.ts +19 -0
- package/dist/lib/sandbox/container-session.d.ts.map +1 -0
- package/dist/lib/sandbox/daytona-sandbox.d.ts +39 -48
- package/dist/lib/sandbox/daytona-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/docker-sandbox.d.ts +31 -131
- package/dist/lib/sandbox/docker-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/index.d.ts +0 -1
- package/dist/lib/sandbox/index.d.ts.map +1 -1
- package/dist/lib/sandbox/microsandbox-sandbox.d.ts +6 -13
- package/dist/lib/sandbox/microsandbox-sandbox.d.ts.map +1 -1
- package/dist/lib/sandbox/read-file-tool/index.d.ts +2 -2
- package/dist/lib/sandbox/read-file-tool/index.d.ts.map +1 -1
- package/dist/lib/sandbox/read-file-tool/text.d.ts.map +1 -1
- package/dist/lib/sandbox/session.d.ts +40 -0
- package/dist/lib/sandbox/session.d.ts.map +1 -0
- package/dist/lib/sandbox/strace/file-changes.d.ts +20 -14
- package/dist/lib/sandbox/strace/file-changes.d.ts.map +1 -1
- package/dist/lib/sandbox/strace/index.d.ts +1 -1
- package/dist/lib/sandbox/strace/index.d.ts.map +1 -1
- package/dist/lib/sandbox/strace/index.js +7 -6
- package/dist/lib/sandbox/strace/index.js.map +2 -2
- package/dist/lib/sandbox/types.d.ts +38 -78
- package/dist/lib/sandbox/types.d.ts.map +1 -1
- package/dist/lib/sandbox/virtual-sandbox.d.ts +3 -3
- package/dist/lib/sandbox/virtual-sandbox.d.ts.map +1 -1
- package/dist/lib/telemetry/console-telemetry.d.ts +7 -1
- package/dist/lib/telemetry/console-telemetry.d.ts.map +1 -1
- package/dist/lib/telemetry/file/file-telemetry.d.ts +6 -0
- package/dist/lib/telemetry/file/file-telemetry.d.ts.map +1 -1
- package/dist/lib/telemetry/file/index.js +18 -12
- package/dist/lib/telemetry/file/index.js.map +2 -2
- package/dist/lib/telemetry/index.js +10 -6
- package/dist/lib/telemetry/index.js.map +2 -2
- package/dist/lib/telemetry/safe-serialize.d.ts +1 -1
- package/dist/lib/telemetry/safe-serialize.d.ts.map +1 -1
- package/dist/lib/tracing/batch-processor.d.ts +7 -1
- package/dist/lib/tracing/batch-processor.d.ts.map +1 -1
- package/dist/lib/tracing/index.js +24 -16
- package/dist/lib/tracing/index.js.map +2 -2
- package/dist/lib/tracing/openai-traces-integration.d.ts +9 -3
- package/dist/lib/tracing/openai-traces-integration.d.ts.map +1 -1
- package/package.json +23 -19
- package/dist/lib/sandbox/cli-process.d.ts +0 -35
- package/dist/lib/sandbox/cli-process.d.ts.map +0 -1
- package/dist/lib/sandbox/read-file.d.ts +0 -9
- package/dist/lib/sandbox/read-file.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ The server-side package also ships the sandbox primitives used by
|
|
|
29
29
|
`@deepagents/text2sql` and other tool-driven agents. Use `createBashTool()`
|
|
30
30
|
with `createVirtualSandbox()`, `createDockerSandbox()`,
|
|
31
31
|
`createAppleContainerSandbox()`, `createMicrosandboxSandbox()`, or
|
|
32
|
-
`createDaytonaSandbox(
|
|
32
|
+
`createDaytonaSandbox(daytona.v2, options)` depending on whether commands should
|
|
33
33
|
run in memory, Docker, Apple Container lightweight VMs, Microsandbox microVMs,
|
|
34
34
|
or managed Daytona sandboxes.
|
|
35
35
|
Virtual sandboxes can opt into in-process JavaScript execution with
|
|
@@ -46,23 +46,25 @@ For same-host Linux Docker daemons, `gcs({ hostPath, mountPath })` provides a
|
|
|
46
46
|
typed bind-volume helper over a host `gcsfuse` mount. For remote daemons, keep
|
|
47
47
|
cloud wiring in the daemon/plugin layer and attach the resulting named volume.
|
|
48
48
|
|
|
49
|
-
`createDaytonaSandbox(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
`createDaytonaSandbox(daytona.v2, options)` takes a Daytona v2 client plus either
|
|
50
|
+
`sandboxId` (attach) or the SDK's own create options, where a `name` makes the
|
|
51
|
+
create a get-or-create. `dispose()` deletes a sandbox it created and leaves one
|
|
52
|
+
it attached to.
|
|
53
53
|
|
|
54
54
|
### File-change tracking
|
|
55
55
|
|
|
56
56
|
`withStraceFileChanges()` decorates a real sandbox backend so each command,
|
|
57
|
-
spawn, or file
|
|
57
|
+
spawn, file write, or file delete reports the mutations it caused as a `FileChange[]`
|
|
58
58
|
(`{ op: 'write' | 'delete' | 'rename'; path; from?; timestamp }`).
|
|
59
|
-
Consume changes via the `onFileChanges` callback (fires per command, spawn,
|
|
60
|
-
`
|
|
59
|
+
Consume changes via the `onFileChanges` callback (fires per command, spawn, file
|
|
60
|
+
write, or `deleteFile` that removed a file). Bash tool calls also receive
|
|
61
61
|
`tool-result.output.meta.fileChanges` as hidden host-only metadata.
|
|
62
62
|
|
|
63
63
|
Scope which paths are reported with `include` glob patterns (required — a path
|
|
64
64
|
must match at least one); drop noise such as uploaded skills with optional
|
|
65
65
|
`exclude` patterns. Both match absolute paths via Node's `path.matchesGlob`.
|
|
66
|
+
`createBashTool()` creates its working directory and uploads its files through the
|
|
67
|
+
decorator, so a callback that must not see that setup excludes those paths.
|
|
66
68
|
|
|
67
69
|
```ts
|
|
68
70
|
const backend = await createDockerSandbox({ image: 'my-image-with-strace' });
|
|
@@ -74,11 +76,11 @@ const tracked = await withStraceFileChanges(backend, {
|
|
|
74
76
|
});
|
|
75
77
|
const sandbox = await createBashTool({
|
|
76
78
|
sandbox: tracked,
|
|
77
|
-
|
|
79
|
+
workingDirectory: '/workspace',
|
|
78
80
|
});
|
|
79
81
|
```
|
|
80
82
|
|
|
81
|
-
Tracking uses `strace` (per `
|
|
83
|
+
Tracking uses `strace` (per `run` and per `spawn`) when you compose
|
|
82
84
|
the `withStraceFileChanges()` decorator. The decorator itself does **no**
|
|
83
85
|
self-test — it trusts that strace tracing works in the sandbox, because "strace
|
|
84
86
|
works here" is an invariant of the (image + host kernel + seccomp/caps) that is
|