@mastra/deployer-sandbox 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.
Files changed (60) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/LICENSE.md +30 -0
  3. package/dist/alias.d.ts +10 -0
  4. package/dist/alias.d.ts.map +1 -0
  5. package/dist/chunk-CSXC6CZL.cjs +115 -0
  6. package/dist/chunk-CSXC6CZL.cjs.map +1 -0
  7. package/dist/chunk-Z636GNUQ.js +101 -0
  8. package/dist/chunk-Z636GNUQ.js.map +1 -0
  9. package/dist/client/index.cjs +159 -0
  10. package/dist/client/index.cjs.map +1 -0
  11. package/dist/client/index.d.ts +98 -0
  12. package/dist/client/index.d.ts.map +1 -0
  13. package/dist/client/index.js +155 -0
  14. package/dist/client/index.js.map +1 -0
  15. package/dist/deployer.d.ts +57 -0
  16. package/dist/deployer.d.ts.map +1 -0
  17. package/dist/engine.d.ts +19 -0
  18. package/dist/engine.d.ts.map +1 -0
  19. package/dist/index.cjs +381 -0
  20. package/dist/index.cjs.map +1 -0
  21. package/dist/index.d.ts +6 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +372 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/manifest.d.ts +7 -0
  26. package/dist/manifest.d.ts.map +1 -0
  27. package/dist/shared.d.ts +63 -0
  28. package/dist/shared.d.ts.map +1 -0
  29. package/dist/studio/assets/CommitMono-400-Regular-DzkyLZ26.woff2 +0 -0
  30. package/dist/studio/assets/CommitMono-700-Regular-DmOSN4kd.woff2 +0 -0
  31. package/dist/studio/assets/MonaSans-VariableFont_wdth-wght-CX-7s9jm.ttf +0 -0
  32. package/dist/studio/assets/babel-lWBcy2sH.js +16 -0
  33. package/dist/studio/assets/bash-atvbtKCR.js +1 -0
  34. package/dist/studio/assets/core-CBT9ED6Q.js +12 -0
  35. package/dist/studio/assets/engine-compile-BkERmzkH.js +137 -0
  36. package/dist/studio/assets/engine-javascript-CSIo_1eZ.js +1 -0
  37. package/dist/studio/assets/estree-Dd9JfUIE.js +44 -0
  38. package/dist/studio/assets/github-dark-DHJKELXO.js +1 -0
  39. package/dist/studio/assets/github-light-DAi9KRSo.js +1 -0
  40. package/dist/studio/assets/index-CORJOrgI.js +2 -0
  41. package/dist/studio/assets/index-yUiD89B4.js +1 -0
  42. package/dist/studio/assets/javascript-ySlJ1b_l.js +1 -0
  43. package/dist/studio/assets/json-BQoSv7ci.js +1 -0
  44. package/dist/studio/assets/jsx-BAng5TT0.js +1 -0
  45. package/dist/studio/assets/livekit-client.esm-CKIgC2IJ.js +39 -0
  46. package/dist/studio/assets/main-BYaOwSFl.js +784 -0
  47. package/dist/studio/assets/markdown-UIAJJxZW.js +1 -0
  48. package/dist/studio/assets/preload-helper-PPVm8Dsz.js +1 -0
  49. package/dist/studio/assets/python-DhUJRlN_.js +1 -0
  50. package/dist/studio/assets/shell-CjFT_Tl9.js +1 -0
  51. package/dist/studio/assets/standalone-Dfz2oS5J.js +29 -0
  52. package/dist/studio/assets/style-DMLmyAwy.css +1 -0
  53. package/dist/studio/assets/tsx-B6W0miNI.js +1 -0
  54. package/dist/studio/assets/typescript-Dj6nwHGl.js +1 -0
  55. package/dist/studio/index.html +100 -0
  56. package/dist/studio/mastra.svg +17 -0
  57. package/dist/studio/routes-manifest.json +27 -0
  58. package/dist/types.d.ts +90 -0
  59. package/dist/types.d.ts.map +1 -0
  60. package/package.json +18 -18
package/dist/index.cjs ADDED
@@ -0,0 +1,381 @@
1
+ 'use strict';
2
+
3
+ var chunkCSXC6CZL_cjs = require('./chunk-CSXC6CZL.cjs');
4
+ var promises = require('fs/promises');
5
+ var path = require('path');
6
+ var url = require('url');
7
+ var deployer = require('@mastra/deployer');
8
+ var esm = require('fs-extra/esm');
9
+ var child_process = require('child_process');
10
+ var crypto = require('crypto');
11
+ var fs = require('fs');
12
+ var os = require('os');
13
+ var util = require('util');
14
+ var workspace = require('@mastra/core/workspace');
15
+
16
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
17
+ // src/alias.ts
18
+ async function updateEdgeConfigAlias(options) {
19
+ const { token, teamId } = options;
20
+ if (!token) {
21
+ throw new Error("Updating the Edge Config alias requires a Vercel API token. Pass `alias.token`.");
22
+ }
23
+ const endpoint = new URL(`https://api.vercel.com/v1/edge-config/${options.edgeConfigId}/items`);
24
+ if (teamId) {
25
+ endpoint.searchParams.set("teamId", teamId);
26
+ }
27
+ const res = await fetch(endpoint, {
28
+ method: "PATCH",
29
+ headers: {
30
+ Authorization: `Bearer ${token}`,
31
+ "Content-Type": "application/json"
32
+ },
33
+ body: JSON.stringify({
34
+ items: [{ operation: "upsert", key: options.key, value: options.url }]
35
+ }),
36
+ // Bounded so a hung Vercel API request can't keep `mastra build` open
37
+ // after the sandbox itself is already deployed.
38
+ signal: AbortSignal.timeout(3e4)
39
+ });
40
+ if (!res.ok) {
41
+ const body = await res.text().catch(() => "");
42
+ throw new Error(`Failed to update Edge Config alias "${options.key}" (${res.status}): ${body}`);
43
+ }
44
+ }
45
+ var execFileAsync = util.promisify(child_process.execFile);
46
+ var noopLogger = {
47
+ debug: () => {
48
+ },
49
+ info: () => {
50
+ },
51
+ warn: () => {
52
+ },
53
+ error: () => {
54
+ }
55
+ };
56
+ var UPLOAD_CHUNK_SIZE = 96e3;
57
+ async function deployToSandbox(options) {
58
+ const {
59
+ sandbox,
60
+ dir,
61
+ port = chunkCSXC6CZL_cjs.DEFAULT_PORT,
62
+ env = {},
63
+ studio = false,
64
+ healthCheckPath = "/api",
65
+ healthCheckTimeoutMs = 6e4,
66
+ healthCheckIntervalMs = 1e3,
67
+ installCommand = "npm install --omit=dev",
68
+ logger = noopLogger
69
+ } = options;
70
+ if (!fs.existsSync(path.join(dir, "index.mjs"))) {
71
+ throw new Error(`No index.mjs found in "${dir}" \u2014 did the build succeed?`);
72
+ }
73
+ logger.info(`Starting ${sandbox.provider} sandbox...`);
74
+ await sandbox.start?.();
75
+ if (!workspace.supportsNetworking(sandbox)) {
76
+ throw new Error(
77
+ `Sandbox provider "${sandbox.provider}" does not support networking (public port URLs), which is required for sandbox deploys.`
78
+ );
79
+ }
80
+ if (!sandbox.executeCommand) {
81
+ throw new Error(
82
+ `Sandbox provider "${sandbox.provider}" does not support executeCommand, which is required for sandbox deploys.`
83
+ );
84
+ }
85
+ const url = await sandbox.networking.getPortUrl(port);
86
+ if (!url) {
87
+ throw new Error(
88
+ `Sandbox provider "${sandbox.provider}" did not expose a public URL for port ${port}. Make sure the port is declared when constructing the sandbox (e.g. \`ports: [${port}]\`).`
89
+ );
90
+ }
91
+ const remoteDir = await chunkCSXC6CZL_cjs.resolveRemoteDir(sandbox, options.remoteDir);
92
+ const mergedEnv = { ...env };
93
+ if (studio && mergedEnv.MASTRA_STUDIO_PATH === void 0) {
94
+ mergedEnv.MASTRA_STUDIO_PATH = `${remoteDir}/studio`;
95
+ }
96
+ logger.info(`Uploading build output from ${dir}...`);
97
+ const tarball = await createTarball(dir);
98
+ logger.debug(`Tarball size: ${(tarball.length / 1024 / 1024).toFixed(2)} MB`);
99
+ const remoteTarball = `${remoteDir}/.deploy.tgz`;
100
+ await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `mkdir -p ${chunkCSXC6CZL_cjs.shellQuote(remoteDir)}`);
101
+ await uploadFile(sandbox, remoteTarball, tarball);
102
+ await chunkCSXC6CZL_cjs.killPreviousServer(sandbox, remoteDir);
103
+ await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `cd ${chunkCSXC6CZL_cjs.shellQuote(remoteDir)} && tar -xzf .deploy.tgz && rm -f .deploy.tgz`, {
104
+ timeout: 12e4
105
+ });
106
+ const installHash = await hashInstallInputs(dir, installCommand);
107
+ const marker = `${remoteDir}/${chunkCSXC6CZL_cjs.INSTALL_MARKER}`;
108
+ const markerCheck = await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `cat ${chunkCSXC6CZL_cjs.shellQuote(marker)} 2>/dev/null || true`, {
109
+ allowFailure: true
110
+ });
111
+ if (installHash && markerCheck.stdout.trim() === installHash) {
112
+ logger.info("Dependencies unchanged \u2014 skipping install.");
113
+ } else {
114
+ logger.info(`Installing dependencies (${installCommand})...`);
115
+ await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `cd ${chunkCSXC6CZL_cjs.shellQuote(remoteDir)} && ${installCommand}`, {
116
+ timeout: 6e5,
117
+ label: `install dependencies (${installCommand})`
118
+ });
119
+ if (installHash) {
120
+ await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `printf '%s' ${chunkCSXC6CZL_cjs.shellQuote(installHash)} > ${chunkCSXC6CZL_cjs.shellQuote(marker)}`);
121
+ }
122
+ }
123
+ const launchScript = buildLaunchScript({ remoteDir, port, env: mergedEnv });
124
+ await uploadFile(sandbox, `${remoteDir}/${chunkCSXC6CZL_cjs.SERVER_SCRIPT}`, Buffer.from(launchScript));
125
+ await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `chmod 700 ${chunkCSXC6CZL_cjs.shellQuote(`${remoteDir}/${chunkCSXC6CZL_cjs.SERVER_SCRIPT}`)}`);
126
+ logger.info("Starting Mastra server...");
127
+ await chunkCSXC6CZL_cjs.launchServer(sandbox, remoteDir);
128
+ const healthy = await chunkCSXC6CZL_cjs.waitForHealthy(url, {
129
+ path: healthCheckPath,
130
+ timeoutMs: healthCheckTimeoutMs,
131
+ intervalMs: healthCheckIntervalMs
132
+ });
133
+ if (!healthy) {
134
+ const log = await chunkCSXC6CZL_cjs.tailServerLog(sandbox, remoteDir).catch(() => "");
135
+ throw new Error(
136
+ `Mastra server did not become healthy at ${url}${healthCheckPath} within ${healthCheckTimeoutMs}ms.` + (log ? `
137
+
138
+ Server log:
139
+ ${log}` : "\n\n(no server log output captured)")
140
+ );
141
+ }
142
+ const info = await chunkCSXC6CZL_cjs.getInfoSafe(sandbox);
143
+ return {
144
+ url,
145
+ sandboxId: info?.id ?? sandbox.id,
146
+ expiresAt: info?.timeoutAt,
147
+ stop: async () => {
148
+ await sandbox.stop?.();
149
+ },
150
+ destroy: async () => {
151
+ await sandbox.destroy?.();
152
+ },
153
+ logs: (lines) => chunkCSXC6CZL_cjs.tailServerLog(sandbox, remoteDir, lines)
154
+ };
155
+ }
156
+ function buildLaunchScript(opts) {
157
+ const lines = ["#!/bin/sh", `cd ${chunkCSXC6CZL_cjs.shellQuote(opts.remoteDir)}`];
158
+ const env = {
159
+ MASTRA_AUTO_DETECT_URL: "true",
160
+ ...opts.env,
161
+ PORT: String(opts.port),
162
+ MASTRA_HOST: "0.0.0.0"
163
+ };
164
+ for (const [key, value] of Object.entries(env)) {
165
+ if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) {
166
+ throw new Error(`Invalid environment variable name: "${key}"`);
167
+ }
168
+ lines.push(`export ${key}=${chunkCSXC6CZL_cjs.shellQuote(value)}`);
169
+ }
170
+ lines.push(`echo $$ > ${chunkCSXC6CZL_cjs.shellQuote(chunkCSXC6CZL_cjs.SERVER_PIDFILE)}`);
171
+ lines.push(`exec node index.mjs >> ${chunkCSXC6CZL_cjs.shellQuote(chunkCSXC6CZL_cjs.SERVER_LOGFILE)} 2>&1`);
172
+ return lines.join("\n") + "\n";
173
+ }
174
+ async function createTarball(dir) {
175
+ const tmp = await promises.mkdtemp(path.join(os.tmpdir(), "mastra-sandbox-"));
176
+ const tarPath = path.join(tmp, "deploy.tgz");
177
+ try {
178
+ await execFileAsync("tar", ["-czf", tarPath, "--exclude=node_modules", "-C", dir, "."]);
179
+ return await promises.readFile(tarPath);
180
+ } finally {
181
+ await promises.rm(tmp, { recursive: true, force: true });
182
+ }
183
+ }
184
+ async function uploadFile(sandbox, remotePath, content) {
185
+ if (sandbox.writeFiles) {
186
+ await sandbox.writeFiles([{ path: remotePath, content }]);
187
+ return;
188
+ }
189
+ const b64 = content.toString("base64");
190
+ const tmpPath = `${remotePath}.b64`;
191
+ await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `rm -f ${chunkCSXC6CZL_cjs.shellQuote(tmpPath)}`);
192
+ for (let i = 0; i < b64.length; i += UPLOAD_CHUNK_SIZE) {
193
+ const chunk = b64.slice(i, i + UPLOAD_CHUNK_SIZE);
194
+ await chunkCSXC6CZL_cjs.runInSandbox(sandbox, `printf '%s' ${chunkCSXC6CZL_cjs.shellQuote(chunk)} >> ${chunkCSXC6CZL_cjs.shellQuote(tmpPath)}`, {
195
+ label: `upload chunk to ${remotePath}`
196
+ });
197
+ }
198
+ await chunkCSXC6CZL_cjs.runInSandbox(
199
+ sandbox,
200
+ `base64 -d ${chunkCSXC6CZL_cjs.shellQuote(tmpPath)} > ${chunkCSXC6CZL_cjs.shellQuote(remotePath)} && rm -f ${chunkCSXC6CZL_cjs.shellQuote(tmpPath)}`,
201
+ { label: `decode upload at ${remotePath}` }
202
+ );
203
+ }
204
+ var LOCKFILES = ["package-lock.json", "npm-shrinkwrap.json", "pnpm-lock.yaml", "yarn.lock", "bun.lock"];
205
+ async function hashInstallInputs(dir, installCommand) {
206
+ const hash = crypto.createHash("sha256");
207
+ try {
208
+ hash.update(await promises.readFile(path.join(dir, "package.json")));
209
+ } catch {
210
+ return null;
211
+ }
212
+ for (const lockfile of LOCKFILES) {
213
+ let content;
214
+ try {
215
+ content = await promises.readFile(path.join(dir, lockfile));
216
+ } catch {
217
+ continue;
218
+ }
219
+ hash.update(lockfile).update(content);
220
+ }
221
+ hash.update(installCommand);
222
+ return hash.digest("hex");
223
+ }
224
+ var MANIFEST_FILENAME = "sandbox-deployment.json";
225
+ async function writeDeploymentManifest(outputDir, manifest) {
226
+ await promises.writeFile(path.join(outputDir, MANIFEST_FILENAME), JSON.stringify(manifest, null, 2));
227
+ }
228
+ async function readDeploymentManifest(outputDir) {
229
+ let raw;
230
+ try {
231
+ raw = await promises.readFile(path.join(outputDir, MANIFEST_FILENAME), "utf-8");
232
+ } catch (error) {
233
+ if (error.code === "ENOENT") {
234
+ return null;
235
+ }
236
+ throw error;
237
+ }
238
+ return JSON.parse(raw);
239
+ }
240
+
241
+ // src/deployer.ts
242
+ var SandboxDeployer = class extends deployer.Deployer {
243
+ /** Sandbox deploys are push-style: `mastra build` runs `deploy()` after bundling. */
244
+ deployOnBuild = true;
245
+ sandbox;
246
+ port;
247
+ studio;
248
+ /** Explicit remote dir, when configured. The engine defaults to `$HOME/mastra-app` inside the sandbox. */
249
+ remoteDir;
250
+ env;
251
+ alias;
252
+ healthCheckTimeoutMs;
253
+ constructor(options) {
254
+ super({ name: "SANDBOX" });
255
+ this.sandbox = options.sandbox;
256
+ this.port = options.port ?? chunkCSXC6CZL_cjs.DEFAULT_PORT;
257
+ this.studio = options.studio ?? true;
258
+ this.remoteDir = options.remoteDir;
259
+ this.env = options.env ?? {};
260
+ this.alias = options.alias;
261
+ this.healthCheckTimeoutMs = options.healthCheckTimeoutMs;
262
+ }
263
+ /**
264
+ * Merge all existing env files instead of only the first one (base behavior).
265
+ * Later files win in `loadEnvVars()`, so order least → most specific: a
266
+ * `.env.local` written by `vercel env pull` shouldn't shadow the `.env` that
267
+ * holds the app's own keys.
268
+ */
269
+ async getEnvFiles() {
270
+ const candidates = [".env", ".env.production", ".env.local"];
271
+ const existing = [];
272
+ for (const file of candidates) {
273
+ try {
274
+ await promises.access(file);
275
+ existing.push(file);
276
+ } catch {
277
+ }
278
+ }
279
+ return existing;
280
+ }
281
+ async getUserBundlerOptions(mastraEntryFile, outputDirectory) {
282
+ const bundlerOptions = await super.getUserBundlerOptions(mastraEntryFile, outputDirectory);
283
+ return {
284
+ ...bundlerOptions,
285
+ externals: true
286
+ };
287
+ }
288
+ getEntry() {
289
+ return `
290
+ // @ts-expect-error
291
+ import { scoreTracesWorkflow } from '@mastra/core/evals/scoreTraces';
292
+ import { mastra } from '#mastra';
293
+ import { createNodeServer, getToolExports } from '#server';
294
+ import { tools } from '#tools';
295
+
296
+ // @ts-expect-error
297
+ await createNodeServer(mastra, { tools: getToolExports(tools), studio: ${this.studio} });
298
+
299
+ const storage = mastra.getStorage();
300
+ if (storage) {
301
+ if (!storage.disableInit) {
302
+ storage.init();
303
+ }
304
+ mastra.__registerInternalWorkflow(scoreTracesWorkflow);
305
+ }
306
+ `;
307
+ }
308
+ async prepare(outputDirectory) {
309
+ await super.prepare(outputDirectory);
310
+ if (this.studio) {
311
+ const __filename = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
312
+ const __dirname = path.dirname(__filename);
313
+ const studioSource = path.join(path.dirname(__dirname), "dist", "studio");
314
+ const studioServePath = path.join(outputDirectory, this.outputDir, "studio");
315
+ try {
316
+ await esm.copy(studioSource, studioServePath, { overwrite: true });
317
+ } catch (err) {
318
+ throw new Error(
319
+ `Failed to copy studio assets from "${studioSource}" to "${studioServePath}": ${err instanceof Error ? err.message : err}`
320
+ );
321
+ }
322
+ }
323
+ }
324
+ async bundle(entryFile, outputDirectory, { toolsPaths, projectRoot }) {
325
+ return this._bundle(this.getEntry(), entryFile, { outputDirectory, projectRoot }, toolsPaths);
326
+ }
327
+ /**
328
+ * Deploy the built output into the sandbox and wait for the server to come
329
+ * up on its public URL. Writes `sandbox-deployment.json` into the output
330
+ * directory and updates the Edge Config alias when configured.
331
+ */
332
+ async deploy(outputDirectory) {
333
+ const dir = path.join(outputDirectory, this.outputDir);
334
+ const envVars = await this.loadEnvVars();
335
+ const env = { ...Object.fromEntries(envVars), ...this.env };
336
+ if (envVars.size > 0) {
337
+ this.logger.warn(
338
+ "Environment variables from your .env file are injected into the remote sandbox. Anyone with access to the sandbox can read them."
339
+ );
340
+ }
341
+ const deployment = await deployToSandbox({
342
+ sandbox: this.sandbox,
343
+ dir,
344
+ port: this.port,
345
+ env,
346
+ studio: this.studio,
347
+ remoteDir: this.remoteDir,
348
+ healthCheckTimeoutMs: this.healthCheckTimeoutMs,
349
+ logger: this.logger
350
+ });
351
+ await writeDeploymentManifest(dir, {
352
+ provider: this.sandbox.provider,
353
+ sandboxId: deployment.sandboxId,
354
+ url: deployment.url,
355
+ port: this.port,
356
+ deployedAt: (/* @__PURE__ */ new Date()).toISOString(),
357
+ expiresAt: deployment.expiresAt?.toISOString()
358
+ });
359
+ if (this.alias) {
360
+ await updateEdgeConfigAlias({ ...this.alias, url: deployment.url });
361
+ this.logger.info(`Edge Config alias "${this.alias.key}" now points at ${deployment.url}`);
362
+ }
363
+ this.logger.info(`Mastra server deployed: ${deployment.url}/api`);
364
+ if (this.studio) {
365
+ this.logger.info(`Studio: ${deployment.url}`);
366
+ }
367
+ if (deployment.expiresAt) {
368
+ this.logger.warn(`Sandbox expires at ${deployment.expiresAt.toISOString()} (provider runtime cap).`);
369
+ }
370
+ }
371
+ };
372
+
373
+ exports.MANIFEST_FILENAME = MANIFEST_FILENAME;
374
+ exports.SandboxDeployer = SandboxDeployer;
375
+ exports.buildLaunchScript = buildLaunchScript;
376
+ exports.deployToSandbox = deployToSandbox;
377
+ exports.readDeploymentManifest = readDeploymentManifest;
378
+ exports.updateEdgeConfigAlias = updateEdgeConfigAlias;
379
+ exports.writeDeploymentManifest = writeDeploymentManifest;
380
+ //# sourceMappingURL=index.cjs.map
381
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/alias.ts","../src/engine.ts","../src/manifest.ts","../src/deployer.ts"],"names":["promisify","execFile","DEFAULT_PORT","existsSync","join","supportsNetworking","resolveRemoteDir","runInSandbox","shellQuote","killPreviousServer","INSTALL_MARKER","SERVER_SCRIPT","launchServer","waitForHealthy","tailServerLog","getInfoSafe","SERVER_PIDFILE","SERVER_LOGFILE","mkdtemp","tmpdir","readFile","rm","createHash","writeFile","Deployer","access","fileURLToPath","dirname","copy"],"mappings":";;;;;;;;;;;;;;;;;AAOA,eAAsB,sBAAsB,OAAA,EAA+D;AACzG,EAAA,MAAM,EAAE,KAAA,EAAO,MAAA,EAAO,GAAI,OAAA;AAC1B,EAAA,IAAI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AA;AAAA,MACX,UAAA,EAAA,iBAAY,IAAI,IAAA,EAAK,EAAE,WAAA,EAAY;AAAA,MACnC,SAAA,EAAW,UAAA,CAAW,SAAA,EAAW,WAAA;AAAY,KAC9C,CAAA;AAED,IAAA,IAAI,KAAK,KAAA,EAAO;AACd,MAAA,MAAM,qBAAA,CAAsB,EAAE,GAAG,IAAA,CAAK,OAAO,GAAA,EAAK,UAAA,CAAW,KAAK,CAAA;AAClE,MAAA,IAAA,CAAK,MAAA,CAAO,KAAK,CAAA,mBAAA,EAAsB,IAAA,CAAK,MAAM,GAAG,CAAA,gBAAA,EAAmB,UAAA,CAAW,GAAG,CAAA,CAAE,CAAA;AAAA,IAC1F;AAEA,IAAA,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,CAAA,wBAAA,EAA2B,UAAA,CAAW,GAAG,CAAA,IAAA,CAAM,CAAA;AAChE,IAAA,IAAI,KAAK,MAAA,EAAQ;AACf,MAAA,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,CAAA,QAAA,EAAW,UAAA,CAAW,GAAG,CAAA,CAAE,CAAA;AAAA,IAC9C;AACA,IAAA,IAAI,WAAW,SAAA,EAAW;AACxB,MAAA,IAAA,CAAK,OAAO,IAAA,CAAK,CAAA,mBAAA,EAAsB,WAAW,SAAA,CAAU,WAAA,EAAa,CAAA,wBAAA,CAA0B,CAAA;AAAA,IACrG;AAAA,EACF;AACF","file":"index.cjs","sourcesContent":["import type { SandboxAliasOptions } from './types';\n\n/**\n * Upsert a Vercel Edge Config item so a stable key always points at the\n * current sandbox URL. Used for Tier 3 routing: apps read the key from Edge\n * Config (e.g. in middleware) instead of hardcoding the rotating sandbox URL.\n */\nexport async function updateEdgeConfigAlias(options: SandboxAliasOptions & { url: string }): Promise<void> {\n const { token, teamId } = options;\n if (!token) {\n throw new Error('Updating the Edge Config alias requires a Vercel API token. Pass `alias.token`.');\n }\n\n const endpoint = new URL(`https://api.vercel.com/v1/edge-config/${options.edgeConfigId}/items`);\n if (teamId) {\n endpoint.searchParams.set('teamId', teamId);\n }\n\n const res = await fetch(endpoint, {\n method: 'PATCH',\n headers: {\n Authorization: `Bearer ${token}`,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n items: [{ operation: 'upsert', key: options.key, value: options.url }],\n }),\n // Bounded so a hung Vercel API request can't keep `mastra build` open\n // after the sandbox itself is already deployed.\n signal: AbortSignal.timeout(30_000),\n });\n\n if (!res.ok) {\n const body = await res.text().catch(() => '');\n throw new Error(`Failed to update Edge Config alias \"${options.key}\" (${res.status}): ${body}`);\n }\n}\n","import { execFile } from 'node:child_process';\nimport { createHash } from 'node:crypto';\nimport { existsSync } from 'node:fs';\nimport { mkdtemp, readFile, rm } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { promisify } from 'node:util';\nimport { supportsNetworking } from '@mastra/core/workspace';\nimport type { WorkspaceSandbox } from '@mastra/core/workspace';\nimport {\n DEFAULT_PORT,\n INSTALL_MARKER,\n SERVER_LOGFILE,\n SERVER_PIDFILE,\n SERVER_SCRIPT,\n getInfoSafe,\n killPreviousServer,\n launchServer,\n resolveRemoteDir,\n runInSandbox,\n shellQuote,\n tailServerLog,\n waitForHealthy,\n} from './shared';\nimport type { DeployToSandboxOptions, SandboxDeployLogger, SandboxDeployment } from './types';\n\nconst execFileAsync = promisify(execFile);\n\nconst noopLogger: SandboxDeployLogger = {\n debug: () => {},\n info: () => {},\n warn: () => {},\n error: () => {},\n};\n\n/** Max shell-command payload per chunk for the base64 upload fallback. */\nconst UPLOAD_CHUNK_SIZE = 96_000;\n\n/**\n * Deploy a prebuilt Mastra server directory into any workspace sandbox that\n * supports networking. Provider-agnostic: only uses the core WorkspaceSandbox\n * contract (`executeCommand` + `networking`, with `writeFiles` / `processes`\n * as fast paths).\n */\nexport async function deployToSandbox(options: DeployToSandboxOptions): Promise<SandboxDeployment> {\n const {\n sandbox,\n dir,\n port = DEFAULT_PORT,\n env = {},\n studio = false,\n healthCheckPath = '/api',\n healthCheckTimeoutMs = 60_000,\n healthCheckIntervalMs = 1_000,\n installCommand = 'npm install --omit=dev',\n logger = noopLogger,\n } = options;\n\n if (!existsSync(join(dir, 'index.mjs'))) {\n throw new Error(`No index.mjs found in \"${dir}\" — did the build succeed?`);\n }\n\n // 1. Start (providers handle create-or-resume by identity, e.g. sandbox name).\n logger.info(`Starting ${sandbox.provider} sandbox...`);\n await sandbox.start?.();\n\n if (!supportsNetworking(sandbox)) {\n throw new Error(\n `Sandbox provider \"${sandbox.provider}\" does not support networking (public port URLs), ` +\n `which is required for sandbox deploys.`,\n );\n }\n if (!sandbox.executeCommand) {\n throw new Error(\n `Sandbox provider \"${sandbox.provider}\" does not support executeCommand, which is required for sandbox deploys.`,\n );\n }\n\n const url = await sandbox.networking.getPortUrl(port);\n if (!url) {\n throw new Error(\n `Sandbox provider \"${sandbox.provider}\" did not expose a public URL for port ${port}. ` +\n `Make sure the port is declared when constructing the sandbox (e.g. \\`ports: [${port}]\\`).`,\n );\n }\n\n // Default the remote dir to $HOME/mastra-app — home directories persist\n // across snapshot stop/resume (unlike /tmp), so wakes find the app intact.\n const remoteDir = await resolveRemoteDir(sandbox, options.remoteDir);\n\n const mergedEnv = { ...env };\n if (studio && mergedEnv.MASTRA_STUDIO_PATH === undefined) {\n mergedEnv.MASTRA_STUDIO_PATH = `${remoteDir}/studio`;\n }\n\n // 2. Upload the build output as a tarball and extract it in the sandbox.\n logger.info(`Uploading build output from ${dir}...`);\n const tarball = await createTarball(dir);\n logger.debug(`Tarball size: ${(tarball.length / 1024 / 1024).toFixed(2)} MB`);\n\n const remoteTarball = `${remoteDir}/.deploy.tgz`;\n await runInSandbox(sandbox, `mkdir -p ${shellQuote(remoteDir)}`);\n await uploadFile(sandbox, remoteTarball, tarball);\n\n // Stop the previous server BEFORE extracting over the live directory so it\n // can never serve a mix of old and new files while the release lands.\n await killPreviousServer(sandbox, remoteDir);\n\n await runInSandbox(sandbox, `cd ${shellQuote(remoteDir)} && tar -xzf .deploy.tgz && rm -f .deploy.tgz`, {\n timeout: 120_000,\n });\n\n // 3. Install dependencies, skipped when the install inputs (package.json,\n // bundled lockfiles, and the install command itself) are unchanged since\n // the last completed install.\n const installHash = await hashInstallInputs(dir, installCommand);\n const marker = `${remoteDir}/${INSTALL_MARKER}`;\n const markerCheck = await runInSandbox(sandbox, `cat ${shellQuote(marker)} 2>/dev/null || true`, {\n allowFailure: true,\n });\n\n if (installHash && markerCheck.stdout.trim() === installHash) {\n logger.info('Dependencies unchanged — skipping install.');\n } else {\n logger.info(`Installing dependencies (${installCommand})...`);\n await runInSandbox(sandbox, `cd ${shellQuote(remoteDir)} && ${installCommand}`, {\n timeout: 600_000,\n label: `install dependencies (${installCommand})`,\n });\n if (installHash) {\n await runInSandbox(sandbox, `printf '%s' ${shellQuote(installHash)} > ${shellQuote(marker)}`);\n }\n }\n\n // 4. Write the launch script and start the new server (the previous one was\n // stopped before extraction).\n const launchScript = buildLaunchScript({ remoteDir, port, env: mergedEnv });\n await uploadFile(sandbox, `${remoteDir}/${SERVER_SCRIPT}`, Buffer.from(launchScript));\n await runInSandbox(sandbox, `chmod 700 ${shellQuote(`${remoteDir}/${SERVER_SCRIPT}`)}`);\n\n logger.info('Starting Mastra server...');\n await launchServer(sandbox, remoteDir);\n\n // 5. Wait for the server to answer on its public URL.\n const healthy = await waitForHealthy(url, {\n path: healthCheckPath,\n timeoutMs: healthCheckTimeoutMs,\n intervalMs: healthCheckIntervalMs,\n });\n if (!healthy) {\n const log = await tailServerLog(sandbox, remoteDir).catch(() => '');\n throw new Error(\n `Mastra server did not become healthy at ${url}${healthCheckPath} within ${healthCheckTimeoutMs}ms.` +\n (log ? `\\n\\nServer log:\\n${log}` : '\\n\\n(no server log output captured)'),\n );\n }\n\n const info = await getInfoSafe(sandbox);\n\n return {\n url,\n sandboxId: info?.id ?? sandbox.id,\n expiresAt: info?.timeoutAt,\n stop: async () => {\n await sandbox.stop?.();\n },\n destroy: async () => {\n await sandbox.destroy?.();\n },\n logs: (lines?: number) => tailServerLog(sandbox, remoteDir, lines),\n };\n}\n\n/**\n * Build the POSIX launch script. Re-running the script restarts the server —\n * the wake path uses this after a snapshot resume (which restores the\n * filesystem but not processes).\n */\nexport function buildLaunchScript(opts: { remoteDir: string; port: number; env: Record<string, string> }): string {\n const lines = ['#!/bin/sh', `cd ${shellQuote(opts.remoteDir)}`];\n\n // MASTRA_AUTO_DETECT_URL so Studio connects to the sandbox's public URL\n // (same origin) instead of localhost:4111 — overridable. PORT and\n // MASTRA_HOST are applied AFTER custom env: networking (`getPortUrl`) and\n // health checks target the configured port, and the server must bind\n // 0.0.0.0 to be reachable through the public port proxy. Change the port\n // via the deploy `port` option, not env.\n const env: Record<string, string> = {\n MASTRA_AUTO_DETECT_URL: 'true',\n ...opts.env,\n PORT: String(opts.port),\n MASTRA_HOST: '0.0.0.0',\n };\n for (const [key, value] of Object.entries(env)) {\n if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) {\n throw new Error(`Invalid environment variable name: \"${key}\"`);\n }\n lines.push(`export ${key}=${shellQuote(value)}`);\n }\n\n lines.push(`echo $$ > ${shellQuote(SERVER_PIDFILE)}`);\n lines.push(`exec node index.mjs >> ${shellQuote(SERVER_LOGFILE)} 2>&1`);\n return lines.join('\\n') + '\\n';\n}\n\n/** Create a gzipped tarball of the directory contents (excluding node_modules). */\nasync function createTarball(dir: string): Promise<Buffer> {\n const tmp = await mkdtemp(join(tmpdir(), 'mastra-sandbox-'));\n const tarPath = join(tmp, 'deploy.tgz');\n try {\n await execFileAsync('tar', ['-czf', tarPath, '--exclude=node_modules', '-C', dir, '.']);\n return await readFile(tarPath);\n } finally {\n await rm(tmp, { recursive: true, force: true });\n }\n}\n\n/**\n * Upload a file into the sandbox. Uses the provider's native `writeFiles` fast\n * path when available, otherwise falls back to base64 chunks over\n * `executeCommand` — so `executeCommand` + `networking` is the minimum contract.\n */\nasync function uploadFile(sandbox: WorkspaceSandbox, remotePath: string, content: Buffer): Promise<void> {\n if (sandbox.writeFiles) {\n await sandbox.writeFiles([{ path: remotePath, content }]);\n return;\n }\n\n const b64 = content.toString('base64');\n const tmpPath = `${remotePath}.b64`;\n await runInSandbox(sandbox, `rm -f ${shellQuote(tmpPath)}`);\n for (let i = 0; i < b64.length; i += UPLOAD_CHUNK_SIZE) {\n const chunk = b64.slice(i, i + UPLOAD_CHUNK_SIZE);\n await runInSandbox(sandbox, `printf '%s' ${shellQuote(chunk)} >> ${shellQuote(tmpPath)}`, {\n label: `upload chunk to ${remotePath}`,\n });\n }\n await runInSandbox(\n sandbox,\n `base64 -d ${shellQuote(tmpPath)} > ${shellQuote(remotePath)} && rm -f ${shellQuote(tmpPath)}`,\n { label: `decode upload at ${remotePath}` },\n );\n}\n\n/** Lockfiles that, when present in the build output, participate in the install-skip hash. */\nconst LOCKFILES = ['package-lock.json', 'npm-shrinkwrap.json', 'pnpm-lock.yaml', 'yarn.lock', 'bun.lock'];\n\n/**\n * Hash everything that determines the outcome of a dependency install:\n * package.json, any bundled lockfile, and the install command itself. A\n * matching hash means the previous `node_modules` can be reused.\n */\nasync function hashInstallInputs(dir: string, installCommand: string): Promise<string | null> {\n const hash = createHash('sha256');\n try {\n hash.update(await readFile(join(dir, 'package.json')));\n } catch {\n return null;\n }\n for (const lockfile of LOCKFILES) {\n let content: Buffer;\n try {\n content = await readFile(join(dir, lockfile));\n } catch {\n // Lockfile not part of the build output.\n continue;\n }\n hash.update(lockfile).update(content);\n }\n hash.update(installCommand);\n return hash.digest('hex');\n}\n","import { readFile, writeFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport type { SandboxDeploymentManifest } from './types';\n\nexport const MANIFEST_FILENAME = 'sandbox-deployment.json';\n\n/** Write `sandbox-deployment.json` into the build output directory. */\nexport async function writeDeploymentManifest(outputDir: string, manifest: SandboxDeploymentManifest): Promise<void> {\n await writeFile(join(outputDir, MANIFEST_FILENAME), JSON.stringify(manifest, null, 2));\n}\n\n/** Read `sandbox-deployment.json` from the build output directory, or null when absent. */\nexport async function readDeploymentManifest(outputDir: string): Promise<SandboxDeploymentManifest | null> {\n let raw: string;\n try {\n raw = await readFile(join(outputDir, MANIFEST_FILENAME), 'utf-8');\n } catch (error) {\n // Only \"no manifest\" maps to null — anything else (permissions, a\n // corrupted file, malformed JSON below) should surface, not be hidden.\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n return null;\n }\n throw error;\n }\n return JSON.parse(raw) as SandboxDeploymentManifest;\n}\n","import { access } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport type { Config } from '@mastra/core/mastra';\nimport type { WorkspaceSandbox } from '@mastra/core/workspace';\nimport { Deployer } from '@mastra/deployer';\nimport { copy } from 'fs-extra/esm';\nimport { updateEdgeConfigAlias } from './alias';\nimport { deployToSandbox } from './engine';\nimport { writeDeploymentManifest } from './manifest';\nimport { DEFAULT_PORT } from './shared';\nimport type { SandboxDeployerOptions } from './types';\n\n/**\n * Deploy a full Mastra server into any workspace sandbox that supports\n * networking (Vercel Sandbox, E2B, ...) and get a live public URL.\n *\n * Positioning: ephemeral environments — instant previews, PR/CI smoke deploys,\n * agent-built-app verification. Not production hosting.\n *\n * @example\n * ```typescript\n * import { SandboxDeployer } from '@mastra/deployer-sandbox';\n * import { VercelSandbox } from '@mastra/vercel';\n *\n * export const mastra = new Mastra({\n * deployer: new SandboxDeployer({\n * sandbox: new VercelSandbox({ sandboxName: 'my-preview', timeout: 3_600_000, ports: [4111] }),\n * }),\n * });\n * ```\n */\nexport class SandboxDeployer extends Deployer {\n /** Sandbox deploys are push-style: `mastra build` runs `deploy()` after bundling. */\n readonly deployOnBuild = true;\n readonly sandbox: WorkspaceSandbox;\n readonly port: number;\n readonly studio: boolean;\n /** Explicit remote dir, when configured. The engine defaults to `$HOME/mastra-app` inside the sandbox. */\n readonly remoteDir?: string;\n private readonly env: Record<string, string>;\n private readonly alias?: SandboxDeployerOptions['alias'];\n private readonly healthCheckTimeoutMs?: number;\n\n constructor(options: SandboxDeployerOptions) {\n super({ name: 'SANDBOX' });\n\n this.sandbox = options.sandbox;\n this.port = options.port ?? DEFAULT_PORT;\n this.studio = options.studio ?? true;\n this.remoteDir = options.remoteDir;\n this.env = options.env ?? {};\n this.alias = options.alias;\n this.healthCheckTimeoutMs = options.healthCheckTimeoutMs;\n }\n\n /**\n * Merge all existing env files instead of only the first one (base behavior).\n * Later files win in `loadEnvVars()`, so order least → most specific: a\n * `.env.local` written by `vercel env pull` shouldn't shadow the `.env` that\n * holds the app's own keys.\n */\n override async getEnvFiles(): Promise<string[]> {\n const candidates = ['.env', '.env.production', '.env.local'];\n const existing: string[] = [];\n for (const file of candidates) {\n try {\n await access(file);\n existing.push(file);\n } catch {\n // skip missing files\n }\n }\n return existing;\n }\n\n protected async getUserBundlerOptions(\n mastraEntryFile: string,\n outputDirectory: string,\n ): Promise<NonNullable<Config['bundler']>> {\n const bundlerOptions = await super.getUserBundlerOptions(mastraEntryFile, outputDirectory);\n\n // Dependencies are installed inside the sandbox, so keep them external.\n return {\n ...bundlerOptions,\n externals: true,\n };\n }\n\n protected getEntry(): string {\n return `\n // @ts-expect-error\n import { scoreTracesWorkflow } from '@mastra/core/evals/scoreTraces';\n import { mastra } from '#mastra';\n import { createNodeServer, getToolExports } from '#server';\n import { tools } from '#tools';\n\n // @ts-expect-error\n await createNodeServer(mastra, { tools: getToolExports(tools), studio: ${this.studio} });\n\n const storage = mastra.getStorage();\n if (storage) {\n if (!storage.disableInit) {\n storage.init();\n }\n mastra.__registerInternalWorkflow(scoreTracesWorkflow);\n }\n `;\n }\n\n async prepare(outputDirectory: string): Promise<void> {\n await super.prepare(outputDirectory);\n\n if (this.studio) {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = dirname(__filename);\n\n const studioSource = join(dirname(__dirname), 'dist', 'studio');\n const studioServePath = join(outputDirectory, this.outputDir, 'studio');\n\n try {\n await copy(studioSource, studioServePath, { overwrite: true });\n } catch (err) {\n throw new Error(\n `Failed to copy studio assets from \"${studioSource}\" to \"${studioServePath}\": ${err instanceof Error ? err.message : err}`,\n );\n }\n }\n }\n\n async bundle(\n entryFile: string,\n outputDirectory: string,\n { toolsPaths, projectRoot }: { toolsPaths: (string | string[])[]; projectRoot: string },\n ): Promise<void> {\n return this._bundle(this.getEntry(), entryFile, { outputDirectory, projectRoot }, toolsPaths);\n }\n\n /**\n * Deploy the built output into the sandbox and wait for the server to come\n * up on its public URL. Writes `sandbox-deployment.json` into the output\n * directory and updates the Edge Config alias when configured.\n */\n async deploy(outputDirectory: string): Promise<void> {\n const dir = join(outputDirectory, this.outputDir);\n\n // Merge .env file vars under explicitly configured env.\n const envVars = await this.loadEnvVars();\n const env: Record<string, string> = { ...Object.fromEntries(envVars), ...this.env };\n if (envVars.size > 0) {\n this.logger.warn(\n 'Environment variables from your .env file are injected into the remote sandbox. ' +\n 'Anyone with access to the sandbox can read them.',\n );\n }\n\n const deployment = await deployToSandbox({\n sandbox: this.sandbox,\n dir,\n port: this.port,\n env,\n studio: this.studio,\n remoteDir: this.remoteDir,\n healthCheckTimeoutMs: this.healthCheckTimeoutMs,\n logger: this.logger,\n });\n\n await writeDeploymentManifest(dir, {\n provider: this.sandbox.provider,\n sandboxId: deployment.sandboxId,\n url: deployment.url,\n port: this.port,\n deployedAt: new Date().toISOString(),\n expiresAt: deployment.expiresAt?.toISOString(),\n });\n\n if (this.alias) {\n await updateEdgeConfigAlias({ ...this.alias, url: deployment.url });\n this.logger.info(`Edge Config alias \"${this.alias.key}\" now points at ${deployment.url}`);\n }\n\n this.logger.info(`Mastra server deployed: ${deployment.url}/api`);\n if (this.studio) {\n this.logger.info(`Studio: ${deployment.url}`);\n }\n if (deployment.expiresAt) {\n this.logger.warn(`Sandbox expires at ${deployment.expiresAt.toISOString()} (provider runtime cap).`);\n }\n }\n}\n"]}
@@ -0,0 +1,6 @@
1
+ export { SandboxDeployer } from './deployer.js';
2
+ export { deployToSandbox, buildLaunchScript } from './engine.js';
3
+ export { updateEdgeConfigAlias } from './alias.js';
4
+ export { readDeploymentManifest, writeDeploymentManifest, MANIFEST_FILENAME } from './manifest.js';
5
+ export type { SandboxAliasOptions, SandboxDeployerOptions, SandboxDeployLogger, SandboxDeployment, SandboxDeploymentManifest, DeployToSandboxOptions, } from './types.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAChG,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}