@rivet-dev/agentos-sandbox 0.0.0-nathan-binding-workspace.4640d5c → 0.0.0-nathan-binding-workspace.abc7ec9
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/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/toolkit.d.ts +14 -0
- package/dist/{bindings.js → toolkit.js} +13 -13
- package/package.json +2 -2
- package/dist/bindings.d.ts +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { SandboxFsOptions, SandboxMountPluginConfig, } from "@secure-exec/sandbox";
|
|
2
2
|
export { createSandboxFs } from "@secure-exec/sandbox";
|
|
3
|
-
export type { SandboxToolkitOptions } from "./
|
|
4
|
-
export {
|
|
3
|
+
export type { SandboxToolkitOptions } from "./toolkit.js";
|
|
4
|
+
export { createSandboxToolkit } from "./toolkit.js";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { createSandboxFs } from "@secure-exec/sandbox";
|
|
2
|
-
export {
|
|
2
|
+
export { createSandboxToolkit } from "./toolkit.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sandbox toolkit exposing process management and command execution
|
|
3
|
-
* as
|
|
3
|
+
* as host tools for agents running inside an agentOS VM.
|
|
4
4
|
*/
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
/**
|
|
7
|
-
function
|
|
6
|
+
/** Host tool type alias for convenience. */
|
|
7
|
+
function hostTool(def) {
|
|
8
8
|
return def;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Create a
|
|
11
|
+
* Create a ToolKit that exposes sandbox process management operations.
|
|
12
12
|
*/
|
|
13
|
-
export function
|
|
13
|
+
export function createSandboxToolkit(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
|
+
tools: {
|
|
19
|
+
"run-command": hostTool({
|
|
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 createSandboxBindings(options) {
|
|
|
57
57
|
};
|
|
58
58
|
},
|
|
59
59
|
}),
|
|
60
|
-
"create-process":
|
|
60
|
+
"create-process": hostTool({
|
|
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 createSandboxBindings(options) {
|
|
|
90
90
|
};
|
|
91
91
|
},
|
|
92
92
|
}),
|
|
93
|
-
"list-processes":
|
|
93
|
+
"list-processes": hostTool({
|
|
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 createSandboxBindings(options) {
|
|
|
107
107
|
};
|
|
108
108
|
},
|
|
109
109
|
}),
|
|
110
|
-
"stop-process":
|
|
110
|
+
"stop-process": hostTool({
|
|
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 createSandboxBindings(options) {
|
|
|
121
121
|
};
|
|
122
122
|
},
|
|
123
123
|
}),
|
|
124
|
-
"kill-process":
|
|
124
|
+
"kill-process": hostTool({
|
|
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 createSandboxBindings(options) {
|
|
|
135
135
|
};
|
|
136
136
|
},
|
|
137
137
|
}),
|
|
138
|
-
"get-process-logs":
|
|
138
|
+
"get-process-logs": hostTool({
|
|
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 createSandboxBindings(options) {
|
|
|
170
170
|
};
|
|
171
171
|
},
|
|
172
172
|
}),
|
|
173
|
-
"send-input":
|
|
173
|
+
"send-input": hostTool({
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivet-dev/agentos-sandbox",
|
|
3
|
-
"version": "0.0.0-nathan-binding-workspace.
|
|
3
|
+
"version": "0.0.0-nathan-binding-workspace.abc7ec9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@rivet-dev/agentos-core": "0.0.0-nathan-binding-workspace.
|
|
24
|
+
"@rivet-dev/agentos-core": "0.0.0-nathan-binding-workspace.abc7ec9",
|
|
25
25
|
"@secure-exec/sandbox": "0.0.0-nathan-workspace-binding-agentos.83db3e3",
|
|
26
26
|
"sandbox-agent": "^0.4.2",
|
|
27
27
|
"zod": "^4.1.11"
|
package/dist/bindings.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sandbox toolkit exposing process management and command execution
|
|
3
|
-
* as bindings for agents 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 SandboxToolkitOptions {
|
|
8
|
-
/** A connected SandboxAgent client instance. */
|
|
9
|
-
client: SandboxAgent;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Create a Bindings group that exposes sandbox process management operations.
|
|
13
|
-
*/
|
|
14
|
-
export declare function createSandboxBindings(options: SandboxToolkitOptions): Bindings;
|