Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions packages/sdk/examples/createos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { createSandbox } from "../src";
import { createos } from "../src/providers/createos";

await using sandbox = await createSandbox({
provider: createos({ shape: "s-1vcpu-256mb", rootfs: "devbox:1" }),
});

console.log((await sandbox.run("node --version")).stdout);

// Access createos-specific features via raw handle
// await sandbox.raw.pause();
// await sandbox.raw.resume();
// await sandbox.raw.fork();
12 changes: 11 additions & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
"types": "./dist/providers/railway/index.d.mts",
"import": "./dist/providers/railway/index.mjs"
},
"./createos": {
"types": "./dist/providers/createos/index.d.mts",
"import": "./dist/providers/createos/index.mjs"
},
"./metadata": {
"types": "./dist/metadata.d.mts",
"import": "./dist/metadata.mjs"
Expand Down Expand Up @@ -100,7 +104,8 @@
"test:live:vercel": "bun test tests/live/vercel.test.ts",
"test:live:upstash": "bun test tests/live/upstash.test.ts",
"test:live:box": "bun test tests/live/box.test.ts",
"test:live:railway": "bun test tests/live/railway.test.ts"
"test:live:railway": "bun test tests/live/railway.test.ts",
"test:live:createos": "bun test tests/live/createos.test.ts"
},
"dependencies": {
"@rivet-dev/agentos-core": "^0.2.7"
Expand All @@ -110,6 +115,7 @@
"@asciidev/box-sdk": "0.0.24",
"@daytona/sdk": "^0.196.0",
"@mastra/core": "1.51.0",
"@nodeops-createos/sandbox": "^0.7.1",
"@types/bun": "^1.3.14",
"@types/node": "^22.13.14",
"@upstash/box": "0.5.3",
Expand All @@ -129,6 +135,7 @@
"@upstash/box": "^0.5.3",
"@vercel/sandbox": "^2.5.0",
"ai": "^7.0.0",
"@nodeops-createos/sandbox": "^0.7.1",
"e2b": "^2.32.0",
"eve": "^0.22.0",
"railway": "^3.5.7"
Expand Down Expand Up @@ -161,6 +168,9 @@
"@mastra/core": {
"optional": true
},
"@nodeops-createos/sandbox": {
"optional": true
},
"eve": {
"optional": true
}
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const providerNames = [
"upstash",
"box",
"railway",
"createos",
] as const;
export type ProviderName = (typeof providerNames)[number];

Expand Down
20 changes: 20 additions & 0 deletions packages/sdk/src/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
boxCapabilities,
createosCapabilities,
daytonaCapabilities,
e2bCapabilities,
localCapabilities,
Expand Down Expand Up @@ -174,6 +175,25 @@ export const providers: readonly ProviderMetadata[] = [
runtimeLimitations:
"Railway Sandboxes are in Priority Boarding and the provider SDK may introduce breaking changes between releases.",
},
{
id: "createos",
displayName: "CreateOS Sandbox",
officialUrl: "https://github.com/NodeOps-app/createos-sandbox-sdk",
packageName: "@nodeops-createos/sandbox",
packageVersion: "0.7.1",
capabilities: createosCapabilities,
environmentVariables: ["CREATEOS_SANDBOX_API_KEY", "CREATEOS_SANDBOX_BASE_URL"],
technicalStatus: "supported",
providerReviewed: false,
sponsor: false,
liveTest: null,
portBehavior:
"Returns an ingress URL with a port placeholder. Ingress is enabled on first expose() call if not already set.",
snapshotBehavior:
"Snapshots are not supported. Use sandbox.raw for pause/resume/fork lifecycle operations.",
runtimeLimitations:
"VM-based sandbox with configurable shapes. stdin is not available on exec. Files list/mkdir/remove/exists use shell commands.",
},
];

export function getProviderMetadata(id: ProviderName): ProviderMetadata {
Expand Down
16 changes: 16 additions & 0 deletions packages/sdk/src/providers/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,19 @@ export const railwayCapabilities = defineCapabilities({
"image.custom": "template",
"network.policy": "native",
});

export const createosCapabilities = defineCapabilities({
"files.read": "full",
"files.write": "full",
"files.list": "full",
"files.remove": "full",
"process.run": "separate-streams",
"process.stream": "separate-streams",
"process.background": "full",
"process.cancel": "full",
"ports.expose": "authenticated",
"sandbox.resume": "persistent",
"filesystem.persistent": "ephemeral",
"image.custom": "template",
"network.policy": "native",
});
Loading