@mastra/platform-workspace 1.6.2-alpha.0 → 1.7.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.
@@ -24,19 +24,70 @@ export interface PlatformRepositoryAccess {
24
24
  token: string;
25
25
  };
26
26
  }
27
+ /** One repository of a multi-repository template (`repos`). */
28
+ export interface PlatformRepoTemplateRepository {
29
+ /**
30
+ * Same contract as the top-level option: clone URL plus, for private
31
+ * repositories, a short-lived credential. Resolved when the build runs, so
32
+ * each repository can mint its own installation token.
33
+ */
34
+ getRepositoryAccess: () => Promise<PlatformRepositoryAccess | undefined>;
35
+ /**
36
+ * Setup command(s) run inside this repository's clone, as separate cached
37
+ * build steps after the commit pin.
38
+ */
39
+ setupCommand?: string | string[];
40
+ }
27
41
  export interface PlatformRepoTemplateOptions {
28
42
  /**
29
43
  * Resolves the repository's clone URL and, for private repositories, a
30
44
  * short-lived credential. Absent — the session has no repository — makes
31
45
  * `createRepoTemplate` return `undefined`, which asks PlatformSandbox for
32
46
  * the provider default without a conditional at the call site.
47
+ *
48
+ * Single-repository form; mutually exclusive with `repos`.
33
49
  */
34
- getRepositoryAccess: (() => Promise<PlatformRepositoryAccess | undefined>) | undefined;
50
+ getRepositoryAccess?: (() => Promise<PlatformRepositoryAccess | undefined>) | undefined;
35
51
  /**
36
52
  * Setup command(s) run inside the checkout. Array entries run as separate
37
53
  * cached build steps.
38
54
  */
39
55
  setupCommand?: string | string[];
56
+ /**
57
+ * Several repositories in one template. Each lands at
58
+ * `<workingDirectory>/<repo>` and runs its own `setupCommand` inside its
59
+ * clone, with the same clone → pin → setup layering as the single form.
60
+ * Public repositories (no `authorization`) are built before private ones in
61
+ * caller order within each group. Each repository writes `.mastra-sandbox/repos/<repo>`
62
+ * (`setupMarkerContent` of its commands) once every step for it ran.
63
+ *
64
+ * Every credential is a build env visible to every build step, so any
65
+ * repository's setup command can read the other repositories' tokens: only
66
+ * list repositories whose setup commands are trusted together.
67
+ *
68
+ * Mutually exclusive with `getRepositoryAccess`. If any entry's access
69
+ * cannot be resolved the whole template degrades to resources-only: a
70
+ * sandbox missing one repository is worse than one missing all of them.
71
+ * Two entries that would clone into the same directory make the resolver
72
+ * reject (PlatformSandbox then logs and boots the provider default). An
73
+ * empty array behaves like no repository.
74
+ */
75
+ repos?: PlatformRepoTemplateRepository[];
76
+ /**
77
+ * Command(s) run once at the working directory after every repository is
78
+ * set up (`repos` only). Failures fail the build. Writes
79
+ * `.mastra-sandbox/workspace-setup` afterwards, even for an empty list.
80
+ */
81
+ workspaceSetupCommand?: string | string[];
82
+ /**
83
+ * `repos` only. When true a failing per-repository setup command records
84
+ * that repository's directory name in `.mastra-sandbox/setup-failed` (one
85
+ * line per repository) and the build continues; clone, pin, workspace and
86
+ * marker steps still fail the build. A per-repository marker then means "every step ran", so
87
+ * consumers check the failure list first. Default false: any failure fails
88
+ * the build, as in the single form.
89
+ */
90
+ continueOnSetupFailure?: boolean;
40
91
  /**
41
92
  * vCPU count for the template build and the sandboxes created from it.
42
93
  * Identity-bearing: a different count builds a different template, and the
@@ -1 +1 @@
1
- {"version":3,"file":"repo-template.d.ts","sourceRoot":"","sources":["../src/repo-template.ts"],"names":[],"mappings":"AAIA,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,E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AAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,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;AA4B7F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,2BAA2B,GAAG,4BAA4B,GAAG,SAAS,CAwLjH;AAoED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAOhE;AAwBD;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,GAAE,OAAkC,EAC3C,SAAS,GAAE,OAAO,KAAa,GAC9B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA4C7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/platform-workspace",
3
- "version": "1.6.2-alpha.0",
3
+ "version": "1.7.0-alpha.0",
4
4
  "description": "Mastra Platform workspace sandbox and filesystem providers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,10 +27,10 @@
27
27
  "tsdown": "0.22.9",
28
28
  "typescript": "^7.0.2",
29
29
  "vitest": "4.1.11",
30
- "@internal/lint": "0.0.137",
31
- "@internal/workspace": "0.0.9",
32
- "@internal/types-builder": "0.0.112",
33
- "@mastra/core": "1.72.0-alpha.4"
30
+ "@internal/lint": "0.0.141",
31
+ "@internal/workspace": "0.0.13",
32
+ "@internal/types-builder": "0.0.116",
33
+ "@mastra/core": "1.76.0-alpha.3"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@mastra/core": ">=1.62.0-0 <2.0.0-0"