@hasna/sandboxes 0.1.8 → 0.1.10
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/cli/index.js +101 -11
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/projects.d.ts +1 -1
- package/dist/db/projects.d.ts.map +1 -1
- package/dist/db/sandboxes.d.ts +1 -1
- package/dist/db/sandboxes.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +99 -9
- package/dist/lib/agent-runner.d.ts.map +1 -1
- package/dist/lib/images.d.ts +13 -0
- package/dist/lib/images.d.ts.map +1 -0
- package/dist/lib/runtime-state.d.ts +5 -0
- package/dist/lib/runtime-state.d.ts.map +1 -0
- package/dist/lib/version.d.ts +2 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/mcp/index.js +243 -35
- package/dist/providers/e2b.d.ts +9 -2
- package/dist/providers/e2b.d.ts.map +1 -1
- package/dist/providers/types.d.ts +11 -2
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/server/index.js +94 -14
- package/dist/server/serve.d.ts +1 -0
- package/dist/server/serve.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -2
package/dist/server/index.js
CHANGED
|
@@ -147,10 +147,11 @@ class E2BProvider {
|
|
|
147
147
|
onStderr: opts?.onStderr ? (data) => opts.onStderr(data) : undefined,
|
|
148
148
|
envs: opts?.env,
|
|
149
149
|
cwd: opts?.cwd,
|
|
150
|
-
timeoutMs: opts?.timeout ? opts.timeout * 1000 : undefined
|
|
150
|
+
timeoutMs: opts?.timeout ? opts.timeout * 1000 : undefined,
|
|
151
|
+
...opts?.stdin !== undefined ? { stdin: opts.stdin } : {}
|
|
151
152
|
});
|
|
152
153
|
return {
|
|
153
|
-
exit_code: result.exitCode,
|
|
154
|
+
exit_code: result.exitCode ?? 0,
|
|
154
155
|
stdout: result.stdout,
|
|
155
156
|
stderr: result.stderr
|
|
156
157
|
};
|
|
@@ -158,10 +159,28 @@ class E2BProvider {
|
|
|
158
159
|
throw new ProviderError("e2b", `Failed to exec command: ${err.message}`);
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
async readFile(sandboxId, path) {
|
|
162
|
+
async readFile(sandboxId, path, opts) {
|
|
162
163
|
const sandbox = await this.getInstance(sandboxId);
|
|
163
164
|
try {
|
|
164
|
-
|
|
165
|
+
if (opts?.encoding === "base64") {
|
|
166
|
+
const bytes = await sandbox.files.read(path, { format: "bytes" });
|
|
167
|
+
const sliced = opts.offset !== undefined || opts.limit !== undefined ? bytes.slice(opts.offset ?? 0, opts.limit !== undefined ? (opts.offset ?? 0) + opts.limit : undefined) : bytes;
|
|
168
|
+
return Buffer.from(sliced).toString("base64");
|
|
169
|
+
} else if (opts?.encoding === "hex") {
|
|
170
|
+
const bytes = await sandbox.files.read(path, { format: "bytes" });
|
|
171
|
+
const sliced = opts.offset !== undefined || opts.limit !== undefined ? bytes.slice(opts.offset ?? 0, opts.limit !== undefined ? (opts.offset ?? 0) + opts.limit : undefined) : bytes;
|
|
172
|
+
return Buffer.from(sliced).toString("hex");
|
|
173
|
+
} else {
|
|
174
|
+
const content = await sandbox.files.read(path, { format: "text" });
|
|
175
|
+
if (opts?.offset !== undefined || opts?.limit !== undefined) {
|
|
176
|
+
const lines = content.split(`
|
|
177
|
+
`);
|
|
178
|
+
const sliced = lines.slice(opts.offset ?? 0, opts.limit !== undefined ? (opts.offset ?? 0) + opts.limit : undefined);
|
|
179
|
+
return sliced.join(`
|
|
180
|
+
`);
|
|
181
|
+
}
|
|
182
|
+
return content;
|
|
183
|
+
}
|
|
165
184
|
} catch (err) {
|
|
166
185
|
throw new ProviderError("e2b", `Failed to read file ${path}: ${err.message}`);
|
|
167
186
|
}
|
|
@@ -174,9 +193,21 @@ class E2BProvider {
|
|
|
174
193
|
throw new ProviderError("e2b", `Failed to write file ${path}: ${err.message}`);
|
|
175
194
|
}
|
|
176
195
|
}
|
|
177
|
-
async listFiles(sandboxId, path) {
|
|
196
|
+
async listFiles(sandboxId, path, opts) {
|
|
178
197
|
const sandbox = await this.getInstance(sandboxId);
|
|
179
198
|
try {
|
|
199
|
+
if (opts?.recursive || opts?.glob) {
|
|
200
|
+
const pattern = opts.glob ? opts.glob : "*";
|
|
201
|
+
const cmd = opts.recursive ? `find ${JSON.stringify(path)} -name ${JSON.stringify(pattern)} 2>/dev/null | head -500` : `ls -la ${JSON.stringify(path)}/${pattern} 2>/dev/null`;
|
|
202
|
+
const result = await sandbox.commands.run(cmd);
|
|
203
|
+
return result.stdout.trim().split(`
|
|
204
|
+
`).filter(Boolean).map((p) => ({
|
|
205
|
+
path: p.trim(),
|
|
206
|
+
name: p.trim().split("/").pop() || p.trim(),
|
|
207
|
+
is_dir: false,
|
|
208
|
+
size: 0
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
180
211
|
const entries = await sandbox.files.list(path);
|
|
181
212
|
return entries.map((e) => ({
|
|
182
213
|
path: e.path,
|
|
@@ -848,6 +879,12 @@ CREATE TABLE IF NOT EXISTS snapshots (
|
|
|
848
879
|
);
|
|
849
880
|
CREATE INDEX IF NOT EXISTS idx_snapshots_sandbox ON snapshots(sandbox_id);
|
|
850
881
|
INSERT OR IGNORE INTO _migrations (id) VALUES (4);
|
|
882
|
+
`,
|
|
883
|
+
`
|
|
884
|
+
ALTER TABLE sandboxes ADD COLUMN budget_limit_usd REAL;
|
|
885
|
+
ALTER TABLE sandboxes ADD COLUMN on_budget_exceeded TEXT NOT NULL DEFAULT 'terminate' CHECK(on_budget_exceeded IN ('terminate', 'pause', 'notify'));
|
|
886
|
+
ALTER TABLE sandboxes ADD COLUMN started_at TEXT;
|
|
887
|
+
INSERT OR IGNORE INTO _migrations (id) VALUES (5);
|
|
851
888
|
`
|
|
852
889
|
];
|
|
853
890
|
var db = null;
|
|
@@ -908,6 +945,9 @@ function rowToSandbox(row) {
|
|
|
908
945
|
project_id: row.project_id,
|
|
909
946
|
on_timeout: row.on_timeout ?? "terminate",
|
|
910
947
|
auto_resume: row.auto_resume === 1,
|
|
948
|
+
budget_limit_usd: row.budget_limit_usd ?? null,
|
|
949
|
+
on_budget_exceeded: row.on_budget_exceeded ?? "terminate",
|
|
950
|
+
started_at: row.started_at ?? null,
|
|
911
951
|
created_at: row.created_at,
|
|
912
952
|
updated_at: row.updated_at
|
|
913
953
|
};
|
|
@@ -925,8 +965,10 @@ function createSandbox(input) {
|
|
|
925
965
|
const project_id = input.project_id ?? null;
|
|
926
966
|
const on_timeout = input.on_timeout ?? "terminate";
|
|
927
967
|
const auto_resume = input.auto_resume ? 1 : 0;
|
|
928
|
-
|
|
929
|
-
|
|
968
|
+
const budget_limit_usd = input.budget_limit_usd ?? null;
|
|
969
|
+
const on_budget_exceeded = input.on_budget_exceeded ?? "terminate";
|
|
970
|
+
db2.query(`INSERT INTO sandboxes (id, provider, name, status, image, timeout, config, env_vars, project_id, on_timeout, auto_resume, budget_limit_usd, on_budget_exceeded, created_at, updated_at)
|
|
971
|
+
VALUES (?, ?, ?, 'creating', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, provider, name, image, timeout, config, env_vars, project_id, on_timeout, auto_resume, budget_limit_usd, on_budget_exceeded, timestamp, timestamp);
|
|
930
972
|
return getSandbox(id);
|
|
931
973
|
}
|
|
932
974
|
function getSandbox(id) {
|
|
@@ -998,6 +1040,10 @@ function updateSandbox(id, updates) {
|
|
|
998
1040
|
setClauses.push("keep_alive_until = ?");
|
|
999
1041
|
params.push(updates.keep_alive_until);
|
|
1000
1042
|
}
|
|
1043
|
+
if (updates.started_at !== undefined) {
|
|
1044
|
+
setClauses.push("started_at = ?");
|
|
1045
|
+
params.push(updates.started_at);
|
|
1046
|
+
}
|
|
1001
1047
|
if (setClauses.length === 0) {
|
|
1002
1048
|
return getSandbox(resolvedId);
|
|
1003
1049
|
}
|
|
@@ -1199,11 +1245,11 @@ function listProjects() {
|
|
|
1199
1245
|
const rows = db2.query("SELECT * FROM projects ORDER BY created_at DESC").all();
|
|
1200
1246
|
return rows.map(rowToProject);
|
|
1201
1247
|
}
|
|
1202
|
-
function ensureProject(name, path) {
|
|
1248
|
+
function ensureProject(name, path, description) {
|
|
1203
1249
|
const existing = getProjectByPath(path);
|
|
1204
1250
|
if (existing)
|
|
1205
1251
|
return existing;
|
|
1206
|
-
return createProject({ name, path });
|
|
1252
|
+
return createProject({ name, path, description });
|
|
1207
1253
|
}
|
|
1208
1254
|
|
|
1209
1255
|
// src/db/webhooks.ts
|
|
@@ -1397,6 +1443,32 @@ function emitLifecycleEvent(sandboxId, message) {
|
|
|
1397
1443
|
notifyListeners(sandboxId, "lifecycle", message);
|
|
1398
1444
|
}
|
|
1399
1445
|
|
|
1446
|
+
// src/lib/runtime-state.ts
|
|
1447
|
+
function getErrorMessage(error) {
|
|
1448
|
+
return error instanceof Error ? error.message : String(error);
|
|
1449
|
+
}
|
|
1450
|
+
function finalizeSessionExit(sessionId, exitCode) {
|
|
1451
|
+
endSession(sessionId, exitCode, exitCode === 0 ? "completed" : "failed");
|
|
1452
|
+
}
|
|
1453
|
+
function finalizeSessionFailure(sessionId, _error, exitCode = 1) {
|
|
1454
|
+
endSession(sessionId, exitCode, "failed");
|
|
1455
|
+
}
|
|
1456
|
+
function finalizeSandboxProvisionFailure(sandboxId, error) {
|
|
1457
|
+
updateSandbox(sandboxId, { status: "error" });
|
|
1458
|
+
return getErrorMessage(error);
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
// src/lib/version.ts
|
|
1462
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
1463
|
+
var cachedVersion;
|
|
1464
|
+
function getPackageVersion() {
|
|
1465
|
+
if (cachedVersion)
|
|
1466
|
+
return cachedVersion;
|
|
1467
|
+
const packageJson = JSON.parse(readFileSync2(new URL("../../package.json", import.meta.url), "utf8"));
|
|
1468
|
+
cachedVersion = packageJson.version ?? "0.0.0";
|
|
1469
|
+
return cachedVersion;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1400
1472
|
// src/server/serve.ts
|
|
1401
1473
|
function json(data, status = 200) {
|
|
1402
1474
|
return new Response(JSON.stringify(data), {
|
|
@@ -1442,7 +1514,7 @@ async function handleRequest(req) {
|
|
|
1442
1514
|
return json({ ok: true });
|
|
1443
1515
|
}
|
|
1444
1516
|
if (pathname === "/api/health" && method === "GET") {
|
|
1445
|
-
return json({ status: "ok", version:
|
|
1517
|
+
return json({ status: "ok", version: getPackageVersion() });
|
|
1446
1518
|
}
|
|
1447
1519
|
if (pathname === "/api/sandboxes" && method === "GET") {
|
|
1448
1520
|
const status = url.searchParams.get("status") || undefined;
|
|
@@ -1454,11 +1526,13 @@ async function handleRequest(req) {
|
|
|
1454
1526
|
return json(result);
|
|
1455
1527
|
}
|
|
1456
1528
|
if (pathname === "/api/sandboxes" && method === "POST") {
|
|
1529
|
+
let sandboxId;
|
|
1457
1530
|
try {
|
|
1458
1531
|
const input = await body(req);
|
|
1459
1532
|
const providerName = input.provider || getDefaultProvider();
|
|
1460
1533
|
const timeout = input.timeout || getDefaultTimeout();
|
|
1461
1534
|
const sandbox = createSandbox({ ...input, provider: providerName, timeout });
|
|
1535
|
+
sandboxId = sandbox.id;
|
|
1462
1536
|
const provider = await getProvider(providerName);
|
|
1463
1537
|
const providerSandbox = await provider.create({
|
|
1464
1538
|
image: input.image,
|
|
@@ -1472,7 +1546,8 @@ async function handleRequest(req) {
|
|
|
1472
1546
|
emitLifecycleEvent(sandbox.id, `Sandbox created with provider ${providerName}`);
|
|
1473
1547
|
return json(updated, 201);
|
|
1474
1548
|
} catch (err) {
|
|
1475
|
-
|
|
1549
|
+
const message = sandboxId ? finalizeSandboxProvisionFailure(sandboxId, err) : getErrorMessage(err);
|
|
1550
|
+
return error(message, 500);
|
|
1476
1551
|
}
|
|
1477
1552
|
}
|
|
1478
1553
|
let params = matchRoute(pathname, method, "/api/sandboxes/:id", "GET");
|
|
@@ -1515,6 +1590,7 @@ async function handleRequest(req) {
|
|
|
1515
1590
|
}
|
|
1516
1591
|
params = matchRoute(pathname, method, "/api/sandboxes/:id/exec", "POST");
|
|
1517
1592
|
if (params) {
|
|
1593
|
+
let sessionId;
|
|
1518
1594
|
try {
|
|
1519
1595
|
const sandbox = getSandbox(params["id"]);
|
|
1520
1596
|
if (!sandbox.provider_sandbox_id) {
|
|
@@ -1522,6 +1598,7 @@ async function handleRequest(req) {
|
|
|
1522
1598
|
}
|
|
1523
1599
|
const { command } = await body(req);
|
|
1524
1600
|
const session = createSession({ sandbox_id: sandbox.id, command });
|
|
1601
|
+
sessionId = session.id;
|
|
1525
1602
|
const collector = createStreamCollector(sandbox.id, session.id);
|
|
1526
1603
|
const provider = await getProvider(sandbox.provider);
|
|
1527
1604
|
const result = await provider.exec(sandbox.provider_sandbox_id, command, {
|
|
@@ -1529,12 +1606,15 @@ async function handleRequest(req) {
|
|
|
1529
1606
|
onStderr: collector.onStderr
|
|
1530
1607
|
});
|
|
1531
1608
|
if ("exit_code" in result) {
|
|
1532
|
-
|
|
1609
|
+
finalizeSessionExit(session.id, result.exit_code);
|
|
1533
1610
|
return json({ session_id: session.id, ...result });
|
|
1534
1611
|
}
|
|
1535
1612
|
return json({ session_id: session.id, status: "running" });
|
|
1536
1613
|
} catch (err) {
|
|
1537
|
-
|
|
1614
|
+
if (sessionId) {
|
|
1615
|
+
finalizeSessionFailure(sessionId, err);
|
|
1616
|
+
}
|
|
1617
|
+
return error(getErrorMessage(err), 500);
|
|
1538
1618
|
}
|
|
1539
1619
|
}
|
|
1540
1620
|
params = matchRoute(pathname, method, "/api/sandboxes/:id/keep-alive", "POST");
|
|
@@ -1599,7 +1679,7 @@ async function handleRequest(req) {
|
|
|
1599
1679
|
if (pathname === "/api/projects" && method === "POST") {
|
|
1600
1680
|
try {
|
|
1601
1681
|
const input = await body(req);
|
|
1602
|
-
return json(ensureProject(input.name, input.path), 201);
|
|
1682
|
+
return json(ensureProject(input.name, input.path, input.description), 201);
|
|
1603
1683
|
} catch (err) {
|
|
1604
1684
|
return error(err.message, 500);
|
|
1605
1685
|
}
|
package/dist/server/serve.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/server/serve.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/server/serve.ts"],"names":[],"mappings":"AAuEA,wBAAsB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CA+RnE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAO9C"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,6 +22,9 @@ export interface Sandbox {
|
|
|
22
22
|
project_id: string | null;
|
|
23
23
|
on_timeout: 'pause' | 'terminate';
|
|
24
24
|
auto_resume: boolean;
|
|
25
|
+
budget_limit_usd: number | null;
|
|
26
|
+
on_budget_exceeded: 'terminate' | 'pause' | 'notify';
|
|
27
|
+
started_at: string | null;
|
|
25
28
|
created_at: string;
|
|
26
29
|
updated_at: string;
|
|
27
30
|
}
|
|
@@ -39,6 +42,9 @@ export interface SandboxRow {
|
|
|
39
42
|
project_id: string | null;
|
|
40
43
|
on_timeout: string;
|
|
41
44
|
auto_resume: number;
|
|
45
|
+
budget_limit_usd: number | null;
|
|
46
|
+
on_budget_exceeded: string;
|
|
47
|
+
started_at: string | null;
|
|
42
48
|
created_at: string;
|
|
43
49
|
updated_at: string;
|
|
44
50
|
}
|
|
@@ -54,6 +60,8 @@ export interface CreateSandboxInput {
|
|
|
54
60
|
auto_resume?: boolean;
|
|
55
61
|
template_id?: string;
|
|
56
62
|
network?: 'full' | 'restricted' | 'none';
|
|
63
|
+
budget_limit_usd?: number;
|
|
64
|
+
on_budget_exceeded?: 'terminate' | 'pause' | 'notify';
|
|
57
65
|
}
|
|
58
66
|
export interface SandboxSession {
|
|
59
67
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AC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/sandboxes",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"author": "Andrei Hasna <andrei@hasna.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@daytonaio/sdk": "^0.18.0",
|
|
12
12
|
"@e2b/code-interpreter": "^1.5.0",
|
|
13
|
-
"@hasna/sandboxes": "^0.1.7",
|
|
14
13
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
15
14
|
"chalk": "^5.4.1",
|
|
16
15
|
"commander": "^13.1.0",
|