@mastra/platform-workspace 1.4.1 → 1.5.0-alpha.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.
@@ -1 +1 @@
1
- {"version":3,"file":"private-net-exec.d.ts","sourceRoot":"","sources":["../src/private-net-exec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,KAAK,CAAC;AAE3C,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CA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GAMG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAKvC;CACF;AAsBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,oBAAoB,CAAC,CA4J/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG3D,eAAO,MAAM,uBAAuB,EAAE,eAAe,CAAC,sBAAsB,CA2B3E,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,CAAC,yBAAyB,CAoBpF,CAAC"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG3D,eAAO,MAAM,uBAAuB,EAAE,eAAe,CAAC,sBAAsB,CAiC3E,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,CAAC,yBAAyB,CAoBpF,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { type SandboxTemplateBuilder } from './template.js';
2
+ type GitExec = (file: string, args: string[], options: {
3
+ timeout: number;
4
+ maxBuffer: number;
5
+ env: NodeJS.ProcessEnv;
6
+ }) => Promise<{
7
+ stdout: string;
8
+ }>;
9
+ /**
10
+ * Structurally matches the repository access resolver a Factory sandbox
11
+ * context carries, so a host can pass its context straight through.
12
+ */
13
+ export interface PlatformRepositoryAccess {
14
+ /** https clone URL, e.g. `https://github.com/acme/widgets.git`. */
15
+ cloneUrl: string;
16
+ /**
17
+ * Short-lived credential for private repositories. The token is used for
18
+ * head resolution and sent as a transient template build environment value;
19
+ * it is excluded from the serialized definition, content identity, and
20
+ * persistent template record.
21
+ */
22
+ authorization?: {
23
+ scheme: 'bearer';
24
+ token: string;
25
+ };
26
+ }
27
+ export interface PlatformRepoTemplateOptions {
28
+ /**
29
+ * Resolves the repository's clone URL and, for private repositories, a
30
+ * short-lived credential. Absent — the session has no repository — makes
31
+ * `createRepoTemplate` return `undefined`, which asks PlatformSandbox for
32
+ * the provider default without a conditional at the call site.
33
+ */
34
+ getRepositoryAccess: (() => Promise<PlatformRepositoryAccess | undefined>) | undefined;
35
+ /** Setup command run inside the checkout during the provider build. */
36
+ setupCommand?: string;
37
+ /**
38
+ * vCPU count for the template build and the sandboxes created from it.
39
+ * Identity-bearing: a different count builds a different template, and the
40
+ * platform namespaces warm family fallbacks by size so a resized request
41
+ * can never boot on a differently-sized filesystem. Omitted uses the
42
+ * provider default.
43
+ */
44
+ cpuCount?: number;
45
+ /** Memory in MB. Same identity and fallback semantics as `cpuCount`. */
46
+ memoryMB?: number;
47
+ /** Test/integration seam for resolving the default-branch head. */
48
+ resolveHead?: (cloneUrl: string, token?: string) => Promise<string | undefined>;
49
+ }
50
+ export type PlatformRepoTemplateResolver = () => Promise<SandboxTemplateBuilder | undefined>;
51
+ /**
52
+ * Create a lazy repository template definition for PlatformSandbox, mirroring
53
+ * `@mastra/e2b`'s `createRepoTemplate`: pass the sandbox context through and a
54
+ * repo-less session boots the provider default.
55
+ *
56
+ * The resolver performs no work until a fresh sandbox starts. It clones the
57
+ * URL `getRepositoryAccess` resolves — the only source of the clone URL, so
58
+ * what gets cloned and what the template is identified by can't drift — and
59
+ * pins repositories to their current default-branch commit. Private repository
60
+ * credentials are used for head resolution and sent to the provider as
61
+ * transient build envs; they never enter the serialized definition. If the
62
+ * head cannot be resolved, the resolver returns undefined so PlatformSandbox
63
+ * boots from the provider default and the caller's runtime setup materializes
64
+ * the checkout instead.
65
+ */
66
+ export declare function createRepoTemplate(options: PlatformRepoTemplateOptions): PlatformRepoTemplateResolver | undefined;
67
+ export declare function resolveDefaultBranchHead(cloneUrl: string, token?: string, execute?: GitExec): Promise<string | undefined>;
68
+ export {};
69
+ //# sourceMappingURL=repo-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-template.d.ts","sourceRoot":"","sources":["../src/repo-template.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGtE,KAAK,OAAO,GAAG,CACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KACpE,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAejC;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE;QAAE,MAAM,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACrD;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,mBAAmB,EAAE,CAAC,MAAM,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC;IACvF,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACjF;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;AAE7F;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,2BAA2B,GAAG,4BAA4B,GAAG,SAAS,CAmCjH;AA+CD,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,GAAE,OAAkC,GAC1C,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAuB7B"}
package/dist/sandbox.d.ts CHANGED
@@ -5,7 +5,9 @@ import type { PlatformClientOptions } from './client.js';
5
5
  import type { DirectExecWebSocketFactory } from './direct-exec.js';
6
6
  import type { E2BExecRunner } from './e2b-exec.js';
7
7
  import type { PrivateNetFetch } from './private-net-exec.js';
8
+ import type { SandboxTemplateBuilder } from './template.js';
8
9
  export type PlatformSandboxNetworkIsolation = 'ISOLATED' | 'PRIVATE';
10
+ export type PlatformSandboxTemplate = SandboxTemplateBuilder | (() => SandboxTemplateBuilder | undefined | Promise<SandboxTemplateBuilder | undefined>);
9
11
  /**
10
12
  * In-process `sandboxId → instanceUrl` map that lets
11
13
  * {@link PlatformSandbox.executeCommand} dial the in-sandbox sidecar over
@@ -35,6 +37,21 @@ export interface PlatformSandboxOptions extends Omit<MastraSandboxOptions, 'proc
35
37
  sandboxId?: string;
36
38
  /** Boot-only fallback checkpoint for a fresh sandbox whose primary recovery key has no state. */
37
39
  seedCheckpointName?: string;
40
+ /**
41
+ * Template builder or a lazy resolver for one. The resolver runs only when
42
+ * start() must provision a fresh sandbox. Platform content-addresses the
43
+ * serialized definition and starts or reuses its provider build without
44
+ * blocking sandbox creation. With E2B, cpuCount() and memoryMB() default to 2
45
+ * CPUs and 1,024 MB; the latest setters determine the template identity and
46
+ * stale fallback is restricted to builds with the same effective resources.
47
+ * A provider-base fallback may use provider-default resources while the exact
48
+ * build is pending; inspect templatePending to detect that case. Railway
49
+ * ignores the resource setters. `setEnvs(values, { ephemeral: true })`
50
+ * supplies build-only values outside the serialized definition, content
51
+ * identity, and persistent template record. Resolver failures also fall back
52
+ * to the provider default and are retried on the next fresh provision.
53
+ */
54
+ template?: PlatformSandboxTemplate;
38
55
  idleTimeoutMinutes?: number;
39
56
  networkIsolation?: PlatformSandboxNetworkIsolation;
40
57
  env?: Record<string, string>;
@@ -71,6 +88,22 @@ export interface PlatformSandboxOptions extends Omit<MastraSandboxOptions, 'proc
71
88
  */
72
89
  addressRegistry?: SandboxAddressRegistry;
73
90
  }
91
+ /**
92
+ * Observability handle for a template that was requested but is still being
93
+ * built by the platform. Present on {@link CreateSandboxResponse} and echoed
94
+ * as {@link PlatformSandbox.templatePending} when the sandbox booted from
95
+ * a prior member of the same template family or from the provider's base
96
+ * template while the exact template continues to build in the background.
97
+ * Absent when the sandbox booted on the exact template.
98
+ *
99
+ * `PlatformSandbox` does not act on this: freshness is reconciled by the
100
+ * caller's own `onStart` runtime setup (e.g. `git fetch && checkout`), not
101
+ * by replaying template operations inside the running sandbox.
102
+ */
103
+ export interface SandboxTemplatePending {
104
+ templateId: string;
105
+ retryAfterMs: number;
106
+ }
74
107
  /**
75
108
  * Diagnostic error thrown when the direct-exec WebSocket transport fails
76
109
  * twice in a row (opening handshake refused or socket closed mid-stream
@@ -166,10 +199,26 @@ export declare class PlatformSandbox extends MastraSandbox {
166
199
  readonly provider = "platform";
167
200
  status: ProviderStatus;
168
201
  readonly processes: PlatformProcessManager;
202
+ /**
203
+ * Populated from the platform's create/reattach response when the sandbox
204
+ * booted from a prior member of the same template family or the provider
205
+ * base template while the requested exact template continues to build in
206
+ * the background.
207
+ * `undefined` when the sandbox booted on the exact template (or when no
208
+ * template was requested). Observability-only; consumers reconcile freshness
209
+ * in their own runtime setup and reprovision to pick up the ready template
210
+ * on a later start.
211
+ */
212
+ templatePending?: SandboxTemplatePending;
169
213
  private readonly _client;
214
+ private readonly _usesProviderRoutes;
170
215
  private readonly _environmentId;
171
216
  private _sandboxId?;
172
217
  private readonly _seedCheckpointName?;
218
+ private _templateDefinition?;
219
+ private _templateBuildEnvs?;
220
+ private readonly _template?;
221
+ private _templateResolutionInFlight?;
173
222
  private readonly _idleTimeoutMinutes?;
174
223
  private readonly _networkIsolation?;
175
224
  private readonly _env;
@@ -246,6 +295,7 @@ export declare class PlatformSandbox extends MastraSandbox {
246
295
  private _probeTarget;
247
296
  constructor(options?: PlatformSandboxOptions);
248
297
  private generateId;
298
+ private _request;
249
299
  /**
250
300
  * Construct a sibling {@link PlatformSandbox} that inherits this sandbox's
251
301
  * credentials and defaults (access token, project, environment, network
@@ -273,6 +323,8 @@ export declare class PlatformSandbox extends MastraSandbox {
273
323
  * fresh VM and reports `outcome: 'created'`.
274
324
  */
275
325
  start(): Promise<SandboxStartResult>;
326
+ private _prepareLazyTemplate;
327
+ private _resolveTemplate;
276
328
  /**
277
329
  * One timing summary per completed `start()` — the whole
278
330
  * `PlatformSandbox`-visible boot in a single greppable line.
@@ -479,6 +531,14 @@ export declare class PlatformSandbox extends MastraSandbox {
479
531
  * Returns a result with a real `exitCode` OR `timedOut: true`. Never
480
532
  * returns `{ exitCode: null, timedOut: false }` — that case throws.
481
533
  */
534
+ /**
535
+ * Drop undefined values so the result matches the Record<string, string>
536
+ * shape the exec transports expect (`ExecuteCommandOptions.env` is
537
+ * NodeJS.ProcessEnv). The sandbox's own env is already merged in by
538
+ * `executeCommand` before a transport sees these options. Returns undefined
539
+ * when there is nothing to send.
540
+ */
541
+ private _execEnv;
482
542
  private _runDirectExec;
483
543
  /**
484
544
  * Try to run the exec against the in-sandbox sidecar over Railway's private
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,aAAa,EACb,aAAa,EAGb,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,KAAK,EAAE,0BAA0B,EAAa,MAAM,kBAAkB,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAA+C,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG1G,MAAM,MAAM,+BAA+B,GAAG,UAAU,GAAG,SAAS,CAAC;AAErE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,sBAAsB;IACrC,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,EAAE,qBAAqB;IAC5G,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,kBAAkB,CAAC,EAAE,MAAM,CAAC;I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;;;;;;OAYG;YACW,yBAAyB;IAyDvC;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAI1B;;;;;;OAMG;YACW,YAAY;IA6CpB,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAqDpC;IAED,eAAe,CAAC,IAAI,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,cAAc,CAAA;KAAE,GAAG,MAAM,CAOlE;CACF"}
@@ -0,0 +1,95 @@
1
+ import { type PlatformClientOptions } from './client.js';
2
+ export type JsonPrimitive = null | boolean | number | string;
3
+ export type JsonValue = JsonPrimitive | JsonValue[] | {
4
+ [key: string]: JsonValue;
5
+ };
6
+ export type SandboxTemplateMethod = 'cpuCount' | 'memoryMB' | 'runCmd' | 'setWorkdir' | 'setEnvs' | 'aptInstall' | 'pipInstall' | 'npmInstall';
7
+ export interface SandboxTemplateOperation {
8
+ method: SandboxTemplateMethod;
9
+ args: JsonValue[];
10
+ }
11
+ export interface SerializedSandboxTemplate {
12
+ schemaVersion: 1;
13
+ operations: SandboxTemplateOperation[];
14
+ /**
15
+ * Optional caller-supplied family key that groups successive builds of
16
+ * the "same thing" — e.g. the same repository+workdir across commits,
17
+ * the same recipe across parameter tweaks. For E2B, Platform MAY boot
18
+ * from a prior member with matching effective CPU and memory while the
19
+ * exact template builds in the background. Railway doesn't use family
20
+ * fallback. The server strips this key from exact content identity, so
21
+ * definitions differing only by family share one cache slot; different
22
+ * operations still produce distinct exact builds. Family drives stale
23
+ * lookup separately. Set by builders like `createRepoTemplate`; clients
24
+ * rarely set it directly.
25
+ */
26
+ family?: string;
27
+ }
28
+ export interface AptInstallOptions {
29
+ noInstallRecommends?: boolean;
30
+ fixMissing?: boolean;
31
+ }
32
+ export interface PipInstallOptions {
33
+ g?: boolean;
34
+ }
35
+ export interface NpmInstallOptions {
36
+ g?: boolean;
37
+ dev?: boolean;
38
+ }
39
+ export interface SetEnvsOptions {
40
+ /**
41
+ * Keep these values outside the serialized definition, content identity,
42
+ * and persistent template record. They are supplied only to the live
43
+ * provider build request.
44
+ */
45
+ ephemeral?: boolean;
46
+ }
47
+ export interface SandboxTemplateBuildOptions extends PlatformClientOptions {
48
+ environmentId?: string;
49
+ }
50
+ export interface SandboxTemplateBuildResult {
51
+ status: 'ready' | 'pending' | 'failed';
52
+ templateId: string;
53
+ retryAfterMs?: number;
54
+ error?: string;
55
+ }
56
+ export interface SandboxTemplateBuilder {
57
+ /**
58
+ * Set the E2B template's CPU count. Defaults to 2. Railway ignores this
59
+ * setting because its sandbox template API doesn't expose resource limits.
60
+ */
61
+ cpuCount(count: number): SandboxTemplateBuilder;
62
+ /**
63
+ * Set the E2B template's memory in megabytes. Defaults to 1,024. Railway
64
+ * ignores this setting because its sandbox template API doesn't expose
65
+ * resource limits.
66
+ */
67
+ memoryMB(memoryMB: number): SandboxTemplateBuilder;
68
+ /** Start or reuse this template's provider build without provisioning a sandbox. */
69
+ build(options?: SandboxTemplateBuildOptions): Promise<SandboxTemplateBuildResult>;
70
+ runCmd(command: string | string[]): SandboxTemplateBuilder;
71
+ setWorkdir(path: string): SandboxTemplateBuilder;
72
+ /**
73
+ * Set build environment values. Ephemeral values are sent outside the
74
+ * serialized definition, are unavailable at runtime, and override serialized
75
+ * values with the same key.
76
+ */
77
+ setEnvs(envs: Record<string, string>, options?: SetEnvsOptions): SandboxTemplateBuilder;
78
+ aptInstall(packages: string | string[], options?: AptInstallOptions): SandboxTemplateBuilder;
79
+ pipInstall(packages?: string | string[], options?: PipInstallOptions): SandboxTemplateBuilder;
80
+ npmInstall(packages?: string | string[], options?: NpmInstallOptions): SandboxTemplateBuilder;
81
+ /**
82
+ * Attach a family key that groups successive builds of the same
83
+ * underlying thing (e.g. a repository+workdir across commits). For E2B,
84
+ * Platform can boot from a prior build with matching effective CPU and
85
+ * memory while the exact template builds. Railway doesn't use family
86
+ * fallback. Excluded from exact content identity — definitions differing
87
+ * only by family share one cache slot, while different operations remain
88
+ * distinct exact builds. Family drives stale lookup separately.
89
+ */
90
+ withFamily(family: string): SandboxTemplateBuilder;
91
+ }
92
+ export declare function Template(): SandboxTemplateBuilder;
93
+ export declare function serializeSandboxTemplate(template: SandboxTemplateBuilder): SerializedSandboxTemplate;
94
+ export declare function getSandboxTemplateBuildEnvs(template: SandboxTemplateBuilder): Record<string, string> | undefined;
95
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEnF,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,CAAC,CAAC;IACjB,UAAU,EAAE,wBAAwB,EAAE,CAAC;IACvC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,CAAC,EAAE,OAAO,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,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;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB,CAAC;CACpD;AAyID,wBAAgB,QAAQ,IAAI,sBAAsB,CAEjD;AAMD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,yBAAyB,CAGpG;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAGhH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/platform-workspace",
3
- "version": "1.4.1",
3
+ "version": "1.5.0-alpha.0",
4
4
  "description": "Mastra Platform workspace sandbox and filesystem providers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -25,14 +25,14 @@
25
25
  "@vitest/ui": "4.1.10",
26
26
  "eslint": "^10.4.1",
27
27
  "tsdown": "0.22.9",
28
- "typescript": "^6.0.3",
28
+ "typescript": "^7.0.2",
29
29
  "vitest": "4.1.10",
30
- "@internal/lint": "0.0.126",
31
- "@mastra/core": "1.62.0",
32
- "@internal/types-builder": "0.0.101"
30
+ "@internal/lint": "0.0.129",
31
+ "@internal/types-builder": "0.0.104",
32
+ "@mastra/core": "1.63.3-alpha.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@mastra/core": ">=1.4.0-0 <2.0.0-0"
35
+ "@mastra/core": ">=1.62.0-0 <2.0.0-0"
36
36
  },
37
37
  "files": [
38
38
  "dist",
@@ -58,6 +58,7 @@
58
58
  "build:lib": "pnpm build",
59
59
  "build:watch": "pnpm build --watch",
60
60
  "test:unit": "vitest run --exclude '**/*.integration.test.ts'",
61
+ "test:types": "vitest run --typecheck src/template-compatibility.test.ts",
61
62
  "test:cloud": "vitest run --passWithNoTests ./src/**/*.integration.test.ts",
62
63
  "test:watch": "vitest watch",
63
64
  "test": "pnpm test:unit",