@mastra/railway 0.0.0 → 0.1.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/CHANGELOG.md +62 -0
- package/LICENSE.md +30 -0
- package/dist/index.cjs +393 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +389 -0
- package/dist/index.js.map +1 -0
- package/dist/provider.d.ts +28 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/sandbox/index.d.ts +177 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/process-manager.d.ts +42 -0
- package/dist/sandbox/process-manager.d.ts.map +1 -0
- package/dist/utils/shell-quote.d.ts +8 -0
- package/dist/utils/shell-quote.d.ts.map +1 -0
- package/package.json +20 -20
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Railway Sandbox Provider
|
|
3
|
+
*
|
|
4
|
+
* A Railway sandbox implementation for Mastra workspaces. Provisions an
|
|
5
|
+
* ephemeral, isolated Linux VM on Railway, runs commands in it via the
|
|
6
|
+
* Railway TypeScript SDK, and destroys it on teardown.
|
|
7
|
+
*
|
|
8
|
+
* @see https://docs.railway.com/sandboxes
|
|
9
|
+
*/
|
|
10
|
+
import type { CommandResult, ExecuteCommandOptions, InstructionsOption, MastraSandboxOptions, ProviderStatus, SandboxInfo } from '@mastra/core/workspace';
|
|
11
|
+
import { MastraSandbox } from '@mastra/core/workspace';
|
|
12
|
+
import { Sandbox } from 'railway';
|
|
13
|
+
import type { SandboxNetworkIsolation, SandboxTemplate } from 'railway';
|
|
14
|
+
import { RailwayProcessManager } from './process-manager.js';
|
|
15
|
+
/**
|
|
16
|
+
* Railway sandbox provider configuration.
|
|
17
|
+
*/
|
|
18
|
+
export interface RailwaySandboxOptions extends Omit<MastraSandboxOptions, 'processes'> {
|
|
19
|
+
/** Unique identifier for this sandbox instance. */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Railway API token. Falls back to the RAILWAY_API_TOKEN env var. */
|
|
22
|
+
token?: string;
|
|
23
|
+
/** Railway environment ID. Falls back to the RAILWAY_ENVIRONMENT_ID env var. */
|
|
24
|
+
environmentId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Reattach to an existing Railway sandbox by its Railway ID instead of
|
|
27
|
+
* creating a new one. When set, `start()` calls `Sandbox.connect()`.
|
|
28
|
+
*/
|
|
29
|
+
sandboxId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* How long the sandbox can sit idle (no `exec` interaction) before Railway
|
|
32
|
+
* destroys it automatically. Range depends on plan (1–120 minutes on
|
|
33
|
+
* Hobby/Pro, 1–5 on Trial/Free). Defaults to the plan default when omitted.
|
|
34
|
+
*/
|
|
35
|
+
idleTimeoutMinutes?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Network isolation mode.
|
|
38
|
+
* - `ISOLATED` (default): outbound internet only, no private network access.
|
|
39
|
+
* - `PRIVATE`: joins the environment's private network.
|
|
40
|
+
*/
|
|
41
|
+
networkIsolation?: SandboxNetworkIsolation;
|
|
42
|
+
/** Environment variables baked into the sandbox, available to every command. */
|
|
43
|
+
env?: Record<string, string>;
|
|
44
|
+
/**
|
|
45
|
+
* Provision the sandbox from a custom base image built with the Railway
|
|
46
|
+
* template builder. Use this to pre-install packages or run setup steps so
|
|
47
|
+
* every sandbox created from it starts ready.
|
|
48
|
+
*
|
|
49
|
+
* - Builder callback — receives the base `Sandbox.template()` and returns the
|
|
50
|
+
* configured template. The template is built (`.build()`) on first
|
|
51
|
+
* `start()` if not already built.
|
|
52
|
+
* ```ts
|
|
53
|
+
* template: t => t.withPackages('git', 'curl').run('npm i -g pnpm')
|
|
54
|
+
* ```
|
|
55
|
+
* - Pre-built `SandboxTemplate` — pass a template you built yourself to reuse
|
|
56
|
+
* it across sandboxes without rebuilding.
|
|
57
|
+
*
|
|
58
|
+
* Ignored when `sandboxId` is set (reattach) or when forking.
|
|
59
|
+
*/
|
|
60
|
+
template?: SandboxTemplate | ((base: SandboxTemplate) => SandboxTemplate);
|
|
61
|
+
/**
|
|
62
|
+
* Default execution timeout in milliseconds applied to commands that don't
|
|
63
|
+
* specify their own timeout. When omitted, commands run until they exit.
|
|
64
|
+
*/
|
|
65
|
+
timeout?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Custom instructions that override the default instructions returned by
|
|
68
|
+
* `getInstructions()`.
|
|
69
|
+
*
|
|
70
|
+
* - `string` — Fully replaces the default instructions. Pass an empty string
|
|
71
|
+
* to suppress instructions entirely.
|
|
72
|
+
* - `(opts) => string` — Receives the default instructions and optional
|
|
73
|
+
* request context so you can extend or customise per-request.
|
|
74
|
+
*/
|
|
75
|
+
instructions?: InstructionsOption;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Railway sandbox provider for Mastra workspaces.
|
|
79
|
+
*
|
|
80
|
+
* Features:
|
|
81
|
+
* - Ephemeral, isolated Linux VM via the Railway TypeScript SDK
|
|
82
|
+
* - Command execution with streaming output and timeouts
|
|
83
|
+
* - Configurable idle timeout and network isolation
|
|
84
|
+
* - Reattach to an existing sandbox by Railway ID
|
|
85
|
+
*
|
|
86
|
+
* @example Basic usage
|
|
87
|
+
* ```typescript
|
|
88
|
+
* import { Workspace } from '@mastra/core/workspace';
|
|
89
|
+
* import { RailwaySandbox } from '@mastra/railway';
|
|
90
|
+
*
|
|
91
|
+
* const sandbox = new RailwaySandbox({
|
|
92
|
+
* // token + environmentId read from RAILWAY_API_TOKEN / RAILWAY_ENVIRONMENT_ID
|
|
93
|
+
* idleTimeoutMinutes: 30,
|
|
94
|
+
* });
|
|
95
|
+
*
|
|
96
|
+
* const workspace = new Workspace({ sandbox });
|
|
97
|
+
* const result = await workspace.executeCode('console.log("Hello!")');
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @example Private networking
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const sandbox = new RailwaySandbox({
|
|
103
|
+
* networkIsolation: 'PRIVATE',
|
|
104
|
+
* env: { NODE_ENV: 'production' },
|
|
105
|
+
* });
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export declare class RailwaySandbox extends MastraSandbox {
|
|
109
|
+
readonly id: string;
|
|
110
|
+
readonly name = "RailwaySandbox";
|
|
111
|
+
readonly provider = "railway";
|
|
112
|
+
status: ProviderStatus;
|
|
113
|
+
readonly processes: RailwayProcessManager;
|
|
114
|
+
private _sandbox;
|
|
115
|
+
private _createdAt;
|
|
116
|
+
private readonly _token?;
|
|
117
|
+
private readonly _environmentId?;
|
|
118
|
+
private readonly _sandboxId?;
|
|
119
|
+
private readonly _idleTimeoutMinutes?;
|
|
120
|
+
private readonly _networkIsolation?;
|
|
121
|
+
private readonly _env;
|
|
122
|
+
private readonly _timeout?;
|
|
123
|
+
private readonly _instructionsOverride?;
|
|
124
|
+
private readonly _templateOption?;
|
|
125
|
+
constructor(options?: RailwaySandboxOptions);
|
|
126
|
+
private generateId;
|
|
127
|
+
/**
|
|
128
|
+
* Get the underlying Railway Sandbox instance for direct SDK access.
|
|
129
|
+
*
|
|
130
|
+
* @throws {SandboxNotReadyError} If the sandbox has not been started.
|
|
131
|
+
*/
|
|
132
|
+
get railway(): Sandbox;
|
|
133
|
+
/**
|
|
134
|
+
* Start the Railway sandbox.
|
|
135
|
+
*
|
|
136
|
+
* Reattaches to an existing sandbox when `sandboxId` is configured,
|
|
137
|
+
* otherwise provisions a new one. Resolves once the sandbox is RUNNING.
|
|
138
|
+
*/
|
|
139
|
+
start(): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Stop the Railway sandbox.
|
|
142
|
+
*
|
|
143
|
+
* Railway sandboxes have no separate "stopped" state — they're either
|
|
144
|
+
* running or destroyed — so stopping destroys the sandbox.
|
|
145
|
+
*/
|
|
146
|
+
stop(): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Destroy the Railway sandbox and release its resources.
|
|
149
|
+
*/
|
|
150
|
+
destroy(): Promise<void>;
|
|
151
|
+
private _teardown;
|
|
152
|
+
/**
|
|
153
|
+
* Build the configured template into a ready-to-use base. Accepts either a
|
|
154
|
+
* pre-built `SandboxTemplate` or a builder callback over `Sandbox.template()`.
|
|
155
|
+
* Calls `.build()` so the recipe is materialised before `Sandbox.create()`.
|
|
156
|
+
*/
|
|
157
|
+
private _resolveTemplate;
|
|
158
|
+
/**
|
|
159
|
+
* Fork this running sandbox into a new, independent `RailwaySandbox`.
|
|
160
|
+
*
|
|
161
|
+
* Clones the filesystem (a fresh boot, not live processes) into the same
|
|
162
|
+
* environment. The returned sandbox is already started and reattached to the
|
|
163
|
+
* forked Railway sandbox; it inherits this sandbox's credentials and defaults
|
|
164
|
+
* unless overridden via `options`.
|
|
165
|
+
*
|
|
166
|
+
* @throws {SandboxNotReadyError} If this sandbox has not been started.
|
|
167
|
+
*/
|
|
168
|
+
fork(options?: Pick<RailwaySandboxOptions, 'id' | 'idleTimeoutMinutes' | 'networkIsolation' | 'env'>): Promise<RailwaySandbox>;
|
|
169
|
+
getInfo(): Promise<SandboxInfo>;
|
|
170
|
+
getInstructions(): string;
|
|
171
|
+
private _buildDefaultInstructions;
|
|
172
|
+
/**
|
|
173
|
+
* Execute a command in the sandbox and return the result.
|
|
174
|
+
*/
|
|
175
|
+
executeCommand(command: string, args?: string[], options?: ExecuteCommandOptions): Promise<CommandResult>;
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAwB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,OAAO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ements SandboxProcessManager for Railway sandboxes.
|
|
5
|
+
* Wraps the Railway SDK's `Sandbox.exec()` API.
|
|
6
|
+
*
|
|
7
|
+
* Railway's `exec(command)` returns an `ExecHandle` that runs the command
|
|
8
|
+
* server-side, independently of the client. Each spawn() starts one exec.
|
|
9
|
+
* The handle streams output via `onStdout`/`onStderr` callbacks wired to
|
|
10
|
+
* `emitStdout`/`emitStderr`, exposes a durable `sessionName`, and can be
|
|
11
|
+
* terminated with `kill(signal)`.
|
|
12
|
+
*/
|
|
13
|
+
import { ProcessHandle, SandboxProcessManager } from '@mastra/core/workspace';
|
|
14
|
+
import type { ProcessInfo, SpawnProcessOptions } from '@mastra/core/workspace';
|
|
15
|
+
import type { RailwaySandbox } from './index.js';
|
|
16
|
+
export declare const LOG_PREFIX = "[RailwaySandbox]";
|
|
17
|
+
/**
|
|
18
|
+
* Build a shell command that applies a working directory and environment
|
|
19
|
+
* variables, since Railway's `exec` takes neither per-call. Env vars are
|
|
20
|
+
* exported via `env` so they apply to the command's process group.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildSpawnCommand(command: string, cwd?: string, env?: Record<string, string>): string;
|
|
23
|
+
export interface RailwayProcessManagerOptions {
|
|
24
|
+
env?: Record<string, string | undefined>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Railway implementation of SandboxProcessManager.
|
|
28
|
+
* Uses the Railway SDK's `Sandbox.exec()` with one exec per spawned process.
|
|
29
|
+
*/
|
|
30
|
+
export declare class RailwayProcessManager extends SandboxProcessManager<RailwaySandbox> {
|
|
31
|
+
private _spawnCounter;
|
|
32
|
+
constructor(opts?: RailwayProcessManagerOptions);
|
|
33
|
+
spawn(command: string, options?: SpawnProcessOptions): Promise<ProcessHandle>;
|
|
34
|
+
/**
|
|
35
|
+
* List tracked processes.
|
|
36
|
+
*
|
|
37
|
+
* Railway has no API to enumerate running exec sessions by sandbox, so this
|
|
38
|
+
* reports the processes this manager spawned.
|
|
39
|
+
*/
|
|
40
|
+
list(): Promise<ProcessInfo[]>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=process-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-manager.d.ts","sourceRoot":"","sources":["../../src/sandbox/process-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAiB,WAAW,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CASzG;AA2GD,MAAM,WAAW,4BAA4B;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,qBAAqB,CAAC,cAAc,CAAC;IAC9E,OAAO,CAAC,aAAa,CAAK;gBAEd,IAAI,GAAE,4BAAiC;IAI7C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,aAAa,CAAC;IA2BvF;;;;;OAKG;IACG,IAAI,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;CAQrC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell-quote a single argument for safe use in a command string.
|
|
3
|
+
*
|
|
4
|
+
* Arguments containing only safe characters are returned as-is.
|
|
5
|
+
* All others are wrapped in single quotes with embedded single quotes escaped.
|
|
6
|
+
*/
|
|
7
|
+
export declare function shellQuote(arg: string): string;
|
|
8
|
+
//# sourceMappingURL=shell-quote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-quote.d.ts","sourceRoot":"","sources":["../../src/utils/shell-quote.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/railway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Railway cloud sandbox provider for Mastra workspaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,33 +18,23 @@
|
|
|
18
18
|
},
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
20
|
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsup --silent --config tsup.config.ts",
|
|
23
|
-
"build:lib": "pnpm build",
|
|
24
|
-
"build:watch": "pnpm build --watch",
|
|
25
|
-
"test:unit": "vitest run --exclude '**/*.integration.test.ts'",
|
|
26
|
-
"test:watch": "vitest watch",
|
|
27
|
-
"test": "vitest run ./src/**/*.integration.test.ts",
|
|
28
|
-
"test:cloud": "pnpm test",
|
|
29
|
-
"lint": "eslint ."
|
|
30
|
-
},
|
|
31
21
|
"license": "Apache-2.0",
|
|
32
22
|
"dependencies": {
|
|
33
23
|
"railway": "^3.1.1"
|
|
34
24
|
},
|
|
35
25
|
"devDependencies": {
|
|
36
|
-
"@internal/lint": "workspace:*",
|
|
37
|
-
"@internal/types-builder": "workspace:*",
|
|
38
|
-
"@internal/workspace-test-utils": "workspace:*",
|
|
39
|
-
"@mastra/core": "workspace:*",
|
|
40
26
|
"@types/node": "22.19.15",
|
|
41
|
-
"@vitest/coverage-v8": "
|
|
42
|
-
"@vitest/ui": "
|
|
27
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
28
|
+
"@vitest/ui": "4.1.5",
|
|
43
29
|
"dotenv": "^17.3.1",
|
|
44
30
|
"eslint": "^10.4.1",
|
|
45
31
|
"tsup": "^8.5.1",
|
|
46
|
-
"typescript": "
|
|
47
|
-
"vitest": "
|
|
32
|
+
"typescript": "^6.0.3",
|
|
33
|
+
"vitest": "4.1.5",
|
|
34
|
+
"@internal/lint": "0.0.104",
|
|
35
|
+
"@internal/types-builder": "0.0.79",
|
|
36
|
+
"@internal/workspace-test-utils": "0.0.48",
|
|
37
|
+
"@mastra/core": "1.42.0"
|
|
48
38
|
},
|
|
49
39
|
"peerDependencies": {
|
|
50
40
|
"@mastra/core": ">=1.12.0-0 <2.0.0-0"
|
|
@@ -64,5 +54,15 @@
|
|
|
64
54
|
},
|
|
65
55
|
"engines": {
|
|
66
56
|
"node": ">=22.13.0"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsup --silent --config tsup.config.ts",
|
|
60
|
+
"build:lib": "pnpm build",
|
|
61
|
+
"build:watch": "pnpm build --watch",
|
|
62
|
+
"test:unit": "vitest run --exclude '**/*.integration.test.ts'",
|
|
63
|
+
"test:watch": "vitest watch",
|
|
64
|
+
"test": "vitest run ./src/**/*.integration.test.ts",
|
|
65
|
+
"test:cloud": "pnpm test",
|
|
66
|
+
"lint": "eslint ."
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|