@sealant/sdk 0.12.1 → 0.13.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/README.md CHANGED
@@ -103,6 +103,26 @@ field wins over the profile's binding for that provider. Only account references
103
103
  surface — secret material never does; the control plane resolves references to encrypted credentials
104
104
  and injects them at launch.
105
105
 
106
+ ## Workspace tools and services
107
+
108
+ Choose a supported operating-system family, request portable package names, and opt into services
109
+ that need runtime support rather than a package install:
110
+
111
+ ```ts
112
+ const workspace = await sealant.workspaces.create({
113
+ repository: "github.com/acme/billing-service",
114
+ harness: codex(),
115
+ os: "arch",
116
+ packages: ["pnpm", "python", "uv", "mise", "github-cli", "lazygit", "bat"],
117
+ services: { docker: true },
118
+ credentials: { codex: true, github: true },
119
+ });
120
+ ```
121
+
122
+ `services.docker` installs the Docker client in the image and starts a disposable, workspace-scoped
123
+ rootless daemon at launch. The workspace receives `DOCKER_HOST`; Sealant never mounts the host
124
+ Docker socket. GitHub credentials provide both `GH_TOKEN` and `GITHUB_TOKEN` to the workspace.
125
+
106
126
  ## Inference on connected accounts
107
127
 
108
128
  Run short, tool-calling inference loops on the caller's own subscription — server-side, through the
@@ -61,6 +61,14 @@ export const buildCreateWorkspaceRequest = (options, config) => {
61
61
  ? []
62
62
  : [linkedWorktreeMount]),
63
63
  ];
64
+ const toolingPackages = options.packages?.map((id) => ({ id })) ?? [];
65
+ const dockerService = options.services?.docker === true;
66
+ const tooling = toolingPackages.length === 0 && !dockerService
67
+ ? undefined
68
+ : {
69
+ ...(toolingPackages.length === 0 ? {} : { packages: toolingPackages }),
70
+ ...(dockerService ? { services: { docker: { enabled: true } } } : {}),
71
+ };
64
72
  const spec = {
65
73
  version: "1",
66
74
  sources: {
@@ -93,9 +101,7 @@ export const buildCreateWorkspaceRequest = (options, config) => {
93
101
  lifecycle: {
94
102
  startup: { foreground: { kind: "command", run: "sleep infinity", shell: "bash" } },
95
103
  },
96
- ...(options.packages === undefined || options.packages.length === 0
97
- ? {}
98
- : { tooling: { packages: options.packages.map((id) => ({ id })) } }),
104
+ ...(tooling === undefined ? {} : { tooling }),
99
105
  ...(credentials === undefined ? {} : { credentials }),
100
106
  };
101
107
  return {
package/dist/types.d.ts CHANGED
@@ -122,6 +122,14 @@ export interface WorkspaceExtraMount {
122
122
  /** Defaults to `true`. Pass `false` deliberately — writes to extra mounts are unrecorded. */
123
123
  readonly readOnly?: boolean;
124
124
  }
125
+ /** Runtime-managed services attached only to this workspace. */
126
+ export interface WorkspaceServicesOptions {
127
+ /**
128
+ * Give the workspace a Docker client connected to its own disposable daemon. The platform never
129
+ * mounts the host Docker socket.
130
+ */
131
+ readonly docker?: boolean;
132
+ }
125
133
  export interface CreateOptions {
126
134
  /**
127
135
  * Source git repository to build the workspace around (e.g. `"github.com/acme/billing-service"`).
@@ -142,6 +150,8 @@ export interface CreateOptions {
142
150
  readonly os?: WorkspaceOs;
143
151
  /** Extra OS packages to install in the workspace. */
144
152
  readonly packages?: readonly string[];
153
+ /** Runtime-managed services that need more than installing an OS package. */
154
+ readonly services?: WorkspaceServicesOptions;
145
155
  /** When true (default), resolve only once the workspace runtime is live. */
146
156
  readonly wait?: boolean;
147
157
  /** Observe provisioning events as they happen. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/sdk",
3
- "version": "0.12.1",
3
+ "version": "0.13.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": {
@@ -26,11 +26,11 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "effect": "^4.0.0-beta.85",
30
- "@sealant/api-contracts": "^0.12.1"
29
+ "effect": "4.0.0-beta.85",
30
+ "@sealant/api-contracts": "^0.13.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@effect/vitest": "^4.0.0-beta.85",
33
+ "@effect/vitest": "4.0.0-beta.85",
34
34
  "@sealant/typescript": "0.0.0"
35
35
  },
36
36
  "engines": {