@sealant/sdk 0.8.1 → 0.10.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.
@@ -55,6 +55,16 @@ export const buildCreateWorkspaceRequest = (options, config) => {
55
55
  ...(options.ref === undefined ? {} : { ref: options.ref }),
56
56
  }
57
57
  : { kind: "mount", hostPath: options.source?.path },
58
+ ...(options.mounts === undefined || options.mounts.length === 0
59
+ ? {}
60
+ : {
61
+ mounts: options.mounts.map((mount) => ({
62
+ hostPath: mount.hostPath,
63
+ mountPath: mount.mountPath,
64
+ // Omitted = the blueprint's default (read-only). Only an explicit choice is sent.
65
+ ...(mount.readOnly === undefined ? {} : { readOnly: mount.readOnly }),
66
+ })),
67
+ }),
58
68
  },
59
69
  harness: { id: options.harness.id },
60
70
  customization: { enableSealantd: true },
package/dist/types.d.ts CHANGED
@@ -94,7 +94,7 @@ export interface WorkspaceCredentialsOptions {
94
94
  * A workspace sourced from a CALLER-OWNED host directory instead of a fresh clone. The platform
95
95
  * bind-mounts `path` as the workspace working directory and treats it as caller-owned: writes
96
96
  * persist across workspace stop/restart/expiry, and the path is never reprovisioned or deleted.
97
- * The install must allowlist the path's root (`SEALANT_WORKSPACE_MOUNT_ALLOWED_ROOTS`); paths
97
+ * The install must allowlist the path's root (`SEALANT_MOUNT_ALLOWED_STORE_ROOTS`); paths
98
98
  * outside the allowlist are rejected at create. Credentials and dotfiles options compose
99
99
  * unchanged. Clone-based workspaces remain the right shape for independent verification.
100
100
  */
@@ -103,6 +103,22 @@ export interface WorkspaceMountSource {
103
103
  /** Absolute, normalized host path (no `..` segments). */
104
104
  readonly path: string;
105
105
  }
106
+ /**
107
+ * An ADDITIONAL caller-owned host directory bind-mounted beside the primary source — sibling
108
+ * repositories, reference clones, scratch material the workspace should see without adopting.
109
+ * Read-only by default: extra mounts widen what the workspace can see, not where its work product
110
+ * lands. Same allowlist as mount sources (`SEALANT_MOUNT_ALLOWED_STORE_ROOTS`); the container path
111
+ * must not overlap the working directory. Like the primary mount, the host path is caller-owned —
112
+ * never reprovisioned, never cleaned.
113
+ */
114
+ export interface WorkspaceExtraMount {
115
+ /** Absolute, normalized host path (no `..` segments). */
116
+ readonly hostPath: string;
117
+ /** Absolute container path to mount at, outside the working directory (e.g. `/workspace/ref/x`). */
118
+ readonly mountPath: string;
119
+ /** Defaults to `true`. Pass `false` deliberately — writes to extra mounts are unrecorded. */
120
+ readonly readOnly?: boolean;
121
+ }
106
122
  export interface CreateOptions {
107
123
  /**
108
124
  * Source git repository to build the workspace around (e.g. `"github.com/acme/billing-service"`).
@@ -111,6 +127,8 @@ export interface CreateOptions {
111
127
  readonly repository?: string;
112
128
  /** Alternative to `repository`: source the workspace from a caller-owned mount. */
113
129
  readonly source?: WorkspaceMountSource;
130
+ /** Additional read-only-by-default mounts beside the primary source (see `WorkspaceExtraMount`). */
131
+ readonly mounts?: readonly WorkspaceExtraMount[];
114
132
  /** The harness to run inside the workspace. */
115
133
  readonly harness: Harness;
116
134
  /** Git ref to check out (defaults to the repository's default branch; `repository` only). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/sdk",
3
- "version": "0.8.1",
3
+ "version": "0.10.0",
4
4
  "description": "The fluent public SDK for Sealant — create a workspace, run a harness, replay the record.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "effect": "^4.0.0-beta.85",
30
- "@sealant/api-contracts": "^0.8.1"
30
+ "@sealant/api-contracts": "^0.10.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@effect/vitest": "^4.0.0-beta.85",