@rivet-dev/agentos-sandbox 0.2.8-rc.2 → 0.2.8-rc.4
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/bindings.d.ts +14 -0
- package/dist/{toolkit.js → bindings.js} +14 -14
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/dist/toolkit.d.ts +0 -14
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandbox bindings exposing process management and command execution to an
|
|
3
|
+
* agent running inside an AgentOS VM.
|
|
4
|
+
*/
|
|
5
|
+
import type { Bindings } from "@rivet-dev/agentos-core";
|
|
6
|
+
import type { SandboxAgent } from "sandbox-agent";
|
|
7
|
+
export interface SandboxBindingsOptions {
|
|
8
|
+
/** A connected SandboxAgent client instance. */
|
|
9
|
+
client: SandboxAgent;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create bindings that expose sandbox process management operations.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createSandboxBindings(options: SandboxBindingsOptions): Bindings;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sandbox
|
|
3
|
-
*
|
|
2
|
+
* Sandbox bindings exposing process management and command execution to an
|
|
3
|
+
* agent running inside an AgentOS VM.
|
|
4
4
|
*/
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
/**
|
|
7
|
-
function
|
|
6
|
+
/** Binding helper kept local so this package only needs the public types. */
|
|
7
|
+
function binding(def) {
|
|
8
8
|
return def;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Create
|
|
11
|
+
* Create bindings that expose sandbox process management operations.
|
|
12
12
|
*/
|
|
13
|
-
export function
|
|
13
|
+
export function createSandboxBindings(options) {
|
|
14
14
|
const { client } = options;
|
|
15
15
|
return {
|
|
16
16
|
name: "sandbox",
|
|
17
17
|
description: "Execute commands and manage processes in a remote sandbox environment.",
|
|
18
|
-
|
|
19
|
-
"run-command":
|
|
18
|
+
bindings: {
|
|
19
|
+
"run-command": binding({
|
|
20
20
|
description: "Run a command synchronously in the sandbox and return its stdout, stderr, and exit code.",
|
|
21
21
|
inputSchema: z.object({
|
|
22
22
|
command: z
|
|
@@ -57,7 +57,7 @@ export function createSandboxToolkit(options) {
|
|
|
57
57
|
};
|
|
58
58
|
},
|
|
59
59
|
}),
|
|
60
|
-
"create-process":
|
|
60
|
+
"create-process": binding({
|
|
61
61
|
description: "Start a long-running background process in the sandbox. Returns a process ID for later management.",
|
|
62
62
|
inputSchema: z.object({
|
|
63
63
|
command: z.string().describe("The command to execute."),
|
|
@@ -90,7 +90,7 @@ export function createSandboxToolkit(options) {
|
|
|
90
90
|
};
|
|
91
91
|
},
|
|
92
92
|
}),
|
|
93
|
-
"list-processes":
|
|
93
|
+
"list-processes": binding({
|
|
94
94
|
description: "List all processes running in the sandbox.",
|
|
95
95
|
inputSchema: z.object({}),
|
|
96
96
|
execute: async () => {
|
|
@@ -107,7 +107,7 @@ export function createSandboxToolkit(options) {
|
|
|
107
107
|
};
|
|
108
108
|
},
|
|
109
109
|
}),
|
|
110
|
-
"stop-process":
|
|
110
|
+
"stop-process": binding({
|
|
111
111
|
description: "Gracefully stop a running process in the sandbox.",
|
|
112
112
|
inputSchema: z.object({
|
|
113
113
|
id: z.string().describe("The process ID to stop."),
|
|
@@ -121,7 +121,7 @@ export function createSandboxToolkit(options) {
|
|
|
121
121
|
};
|
|
122
122
|
},
|
|
123
123
|
}),
|
|
124
|
-
"kill-process":
|
|
124
|
+
"kill-process": binding({
|
|
125
125
|
description: "Forcefully kill a running process in the sandbox.",
|
|
126
126
|
inputSchema: z.object({
|
|
127
127
|
id: z.string().describe("The process ID to kill."),
|
|
@@ -135,7 +135,7 @@ export function createSandboxToolkit(options) {
|
|
|
135
135
|
};
|
|
136
136
|
},
|
|
137
137
|
}),
|
|
138
|
-
"get-process-logs":
|
|
138
|
+
"get-process-logs": binding({
|
|
139
139
|
description: "Get stdout/stderr logs from a sandbox process.",
|
|
140
140
|
inputSchema: z.object({
|
|
141
141
|
id: z.string().describe("The process ID."),
|
|
@@ -170,7 +170,7 @@ export function createSandboxToolkit(options) {
|
|
|
170
170
|
};
|
|
171
171
|
},
|
|
172
172
|
}),
|
|
173
|
-
"send-input":
|
|
173
|
+
"send-input": binding({
|
|
174
174
|
description: "Send text input to an interactive sandbox process via stdin.",
|
|
175
175
|
inputSchema: z.object({
|
|
176
176
|
id: z.string().describe("The process ID."),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { SandboxFsOptions, SandboxMountPluginConfig, } from "./mount.js";
|
|
2
2
|
export { createSandboxFs } from "./mount.js";
|
|
3
|
-
export type {
|
|
4
|
-
export {
|
|
3
|
+
export type { SandboxBindingsOptions } from "./bindings.js";
|
|
4
|
+
export { createSandboxBindings } from "./bindings.js";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { createSandboxFs } from "./mount.js";
|
|
2
|
-
export {
|
|
2
|
+
export { createSandboxBindings } from "./bindings.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivet-dev/agentos-sandbox",
|
|
3
|
-
"version": "0.2.8-rc.
|
|
3
|
+
"version": "0.2.8-rc.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@rivet-dev/agentos-core": "0.2.8-rc.
|
|
25
|
-
"@rivet-dev/agentos-runtime-core": "0.2.8-rc.
|
|
24
|
+
"@rivet-dev/agentos-core": "0.2.8-rc.4",
|
|
25
|
+
"@rivet-dev/agentos-runtime-core": "0.2.8-rc.4",
|
|
26
26
|
"sandbox-agent": "^0.4.2",
|
|
27
27
|
"zod": "^4.1.11"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@agentos-software/common": "0.2.8-rc.
|
|
30
|
+
"@agentos-software/common": "0.2.8-rc.4",
|
|
31
31
|
"@types/node": "^22.10.2",
|
|
32
32
|
"typescript": "^5.7.2",
|
|
33
33
|
"vitest": "^2.1.8"
|
package/dist/toolkit.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sandbox toolkit exposing process management and command execution
|
|
3
|
-
* as host tools for agents running inside an agentOS VM.
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolKit } from "@rivet-dev/agentos-core";
|
|
6
|
-
import type { SandboxAgent } from "sandbox-agent";
|
|
7
|
-
export interface SandboxToolkitOptions {
|
|
8
|
-
/** A connected SandboxAgent client instance. */
|
|
9
|
-
client: SandboxAgent;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Create a ToolKit that exposes sandbox process management operations.
|
|
13
|
-
*/
|
|
14
|
-
export declare function createSandboxToolkit(options: SandboxToolkitOptions): ToolKit;
|