@sealant/sdk-next 0.40.0-next.868 → 0.40.0-next.870

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/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type ScopesNamespace } from "./scopes.js";
2
- import type { AccessTokensNamespace, BoatAccountsNamespace, ConnectedAccountsNamespace, CreateOptions, InferenceNamespace, ListOptions, Run, SealantFeatures, SshKeysNamespace, Workspace, WorkspaceCreateState, WorkspaceImageInspection, WorkspaceSshNamespace, SealantConfig, UsersNamespace } from "./types.js";
2
+ import type { AccessTokensNamespace, BoatAccountsNamespace, ConnectedAccountsNamespace, CreateOptions, InferenceNamespace, ListOptions, Run, SealantFeatures, SshKeysNamespace, Workspace, WorkspaceCreateState, WorkspaceImageInspection, WorkspaceRuntimes, WorkspaceSshNamespace, SealantConfig, UsersNamespace } from "./types.js";
3
3
  export declare class Sealant {
4
4
  #private;
5
5
  /**
@@ -28,6 +28,15 @@ export declare class Sealant {
28
28
  * seen.
29
29
  */
30
30
  imageKey: (options: CreateOptions) => string;
31
+ /**
32
+ * The runtimes this control plane launches workspaces on, and what each supports, read before
33
+ * any create: OS families, a custom base image, host directories, Docker inside, gVisor,
34
+ * Kubernetes references, the source and dotfiles a workspace may start from, a screen, the ports
35
+ * the runtime holds, how resources attach, and whether an idle workspace costs money. A create
36
+ * that asks a runtime for an item it marks unsupported is refused with that item's `message`:
37
+ * both answers come from one table. `default` is the runtime a create that names none runs on.
38
+ */
39
+ runtimes: () => Promise<WorkspaceRuntimes>;
31
40
  /**
32
41
  * What `create(options)` would build, read before the create: the spec is planned exactly as
33
42
  * the build plans it, and the latest image published for that plan answers with its
package/dist/client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { archiveConnectedAccountOp, archiveSshKeyOp, cancelWorkspaceCreateOp, createAccessTokenOp, createBoatAccountOp, createConnectedAccountOp, createSshKeyOp, createWorkspaceOp, ensureUserOp, getRunOp, getSetupStateOp, getUserOp, bindUserPersonOp, getWorkspaceCreateOp, getWorkspaceOp, inferenceRespondOp, inspectWorkspaceImageOp, listBoatAccountsOp, listConnectedAccountsOp, listSshKeysOp, listWorkspacesOp, markConnectedAccountInvalidOp, removeBoatAccountOp, rotateBoatAccountKeyOp, setConnectedAccountDefaultOp, } from "./effect/operations.js";
1
+ import { archiveConnectedAccountOp, archiveSshKeyOp, cancelWorkspaceCreateOp, createAccessTokenOp, createBoatAccountOp, createConnectedAccountOp, createSshKeyOp, createWorkspaceOp, ensureUserOp, getRunOp, getSetupStateOp, getUserOp, bindUserPersonOp, getWorkspaceCreateOp, getWorkspaceOp, inferenceRespondOp, inspectWorkspaceImageOp, listWorkspaceRuntimesOp, listBoatAccountsOp, listConnectedAccountsOp, listSshKeysOp, listWorkspacesOp, markConnectedAccountInvalidOp, removeBoatAccountOp, rotateBoatAccountKeyOp, setConnectedAccountDefaultOp, } from "./effect/operations.js";
2
2
  import { runHarness, startHarness } from "./effect/run-harness.js";
3
3
  import { makeSdkRuntime } from "./effect/runtime.js";
4
4
  import { SealantBudgetExceededError, SealantError } from "./errors.js";
@@ -147,6 +147,27 @@ export class Sealant {
147
147
  * seen.
148
148
  */
149
149
  imageKey: (options) => imageSpecKey(buildCreateWorkspaceRequest(options, this.#ctx.config).payload.spec),
150
+ /**
151
+ * The runtimes this control plane launches workspaces on, and what each supports, read before
152
+ * any create: OS families, a custom base image, host directories, Docker inside, gVisor,
153
+ * Kubernetes references, the source and dotfiles a workspace may start from, a screen, the ports
154
+ * the runtime holds, how resources attach, and whether an idle workspace costs money. A create
155
+ * that asks a runtime for an item it marks unsupported is refused with that item's `message`:
156
+ * both answers come from one table. `default` is the runtime a create that names none runs on.
157
+ */
158
+ runtimes: async () => {
159
+ const answered = await this.#runtime.run(listWorkspaceRuntimesOp());
160
+ return {
161
+ default: answered.default,
162
+ runtimes: answered.runtimes.map((support) => ({
163
+ ...support,
164
+ screen: support.screen.supported
165
+ ? { supported: true, architectures: [...support.screen.architectures] }
166
+ : support.screen,
167
+ reservedPorts: [...support.reservedPorts],
168
+ })),
169
+ };
170
+ },
150
171
  /**
151
172
  * What `create(options)` would build, read before the create: the spec is planned exactly as
152
173
  * the build plans it, and the latest image published for that plan answers with its
@@ -2350,6 +2350,99 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
2350
2350
  readonly data: import("effect/Schema").optional<import("effect/Schema").Unknown>;
2351
2351
  }>>;
2352
2352
  }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
2353
+ readonly listWorkspaceRuntimes: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listWorkspaceRuntimes", "GET", "/v1/workspaces/runtimes", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
2354
+ readonly default: import("effect/Schema").Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
2355
+ readonly runtimes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
2356
+ readonly runtime: import("effect/Schema").Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
2357
+ readonly os: import("effect/Schema").Struct<{
2358
+ readonly ubuntu: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2359
+ readonly supported: import("effect/Schema").Literal<true>;
2360
+ }>, import("effect/Schema").Struct<{
2361
+ readonly supported: import("effect/Schema").Literal<false>;
2362
+ readonly message: import("effect/Schema").String;
2363
+ }>]>;
2364
+ readonly nix: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2365
+ readonly supported: import("effect/Schema").Literal<true>;
2366
+ }>, import("effect/Schema").Struct<{
2367
+ readonly supported: import("effect/Schema").Literal<false>;
2368
+ readonly message: import("effect/Schema").String;
2369
+ }>]>;
2370
+ readonly arch: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2371
+ readonly supported: import("effect/Schema").Literal<true>;
2372
+ }>, import("effect/Schema").Struct<{
2373
+ readonly supported: import("effect/Schema").Literal<false>;
2374
+ readonly message: import("effect/Schema").String;
2375
+ }>]>;
2376
+ readonly fedora: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2377
+ readonly supported: import("effect/Schema").Literal<true>;
2378
+ }>, import("effect/Schema").Struct<{
2379
+ readonly supported: import("effect/Schema").Literal<false>;
2380
+ readonly message: import("effect/Schema").String;
2381
+ }>]>;
2382
+ }>;
2383
+ readonly customImage: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2384
+ readonly supported: import("effect/Schema").Literal<true>;
2385
+ }>, import("effect/Schema").Struct<{
2386
+ readonly supported: import("effect/Schema").Literal<false>;
2387
+ readonly message: import("effect/Schema").String;
2388
+ }>]>;
2389
+ readonly hostDirectories: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2390
+ readonly supported: import("effect/Schema").Literal<true>;
2391
+ }>, import("effect/Schema").Struct<{
2392
+ readonly supported: import("effect/Schema").Literal<false>;
2393
+ readonly message: import("effect/Schema").String;
2394
+ }>]>;
2395
+ readonly docker: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2396
+ readonly supported: import("effect/Schema").Literal<true>;
2397
+ }>, import("effect/Schema").Struct<{
2398
+ readonly supported: import("effect/Schema").Literal<false>;
2399
+ readonly message: import("effect/Schema").String;
2400
+ }>]>;
2401
+ readonly gvisor: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2402
+ readonly supported: import("effect/Schema").Literal<true>;
2403
+ }>, import("effect/Schema").Struct<{
2404
+ readonly supported: import("effect/Schema").Literal<false>;
2405
+ readonly message: import("effect/Schema").String;
2406
+ }>]>;
2407
+ readonly clusterEnv: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2408
+ readonly supported: import("effect/Schema").Literal<true>;
2409
+ }>, import("effect/Schema").Struct<{
2410
+ readonly supported: import("effect/Schema").Literal<false>;
2411
+ readonly message: import("effect/Schema").String;
2412
+ }>]>;
2413
+ readonly gitSource: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2414
+ readonly supported: import("effect/Schema").Literal<true>;
2415
+ }>, import("effect/Schema").Struct<{
2416
+ readonly supported: import("effect/Schema").Literal<false>;
2417
+ readonly message: import("effect/Schema").String;
2418
+ }>]>;
2419
+ readonly dotfilesArchives: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2420
+ readonly supported: import("effect/Schema").Literal<true>;
2421
+ }>, import("effect/Schema").Struct<{
2422
+ readonly supported: import("effect/Schema").Literal<false>;
2423
+ readonly message: import("effect/Schema").String;
2424
+ }>]>;
2425
+ readonly screen: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2426
+ readonly supported: import("effect/Schema").Literal<true>;
2427
+ readonly architectures: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["x86_64", "aarch64"]>>;
2428
+ }>, import("effect/Schema").Struct<{
2429
+ readonly supported: import("effect/Schema").Literal<false>;
2430
+ readonly message: import("effect/Schema").String;
2431
+ }>]>;
2432
+ readonly reservedPorts: import("effect/Schema").$Array<import("effect/Schema").Number>;
2433
+ readonly resources: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
2434
+ readonly supported: import("effect/Schema").Literal<true>;
2435
+ readonly attach: import("effect/Schema").Literals<readonly ["live", "next-start"]>;
2436
+ }>, import("effect/Schema").Struct<{
2437
+ readonly supported: import("effect/Schema").Literal<false>;
2438
+ readonly message: import("effect/Schema").String;
2439
+ }>]>;
2440
+ readonly idleCost: import("effect/Schema").Struct<{
2441
+ readonly charged: import("effect/Schema").Boolean;
2442
+ readonly message: import("effect/Schema").String;
2443
+ }>;
2444
+ }>>;
2445
+ }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
2353
2446
  readonly listWorkspaces: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listWorkspaces", "GET", "/v1/workspaces/", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2354
2447
  readonly ownerUserId: import("effect/Schema").String;
2355
2448
  readonly status: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["queued", "running", "ready", "failed", "cancelled", "stopped", "retained"]>>;
@@ -2636,7 +2729,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
2636
2729
  readonly workspaceId: import("effect/Schema").String;
2637
2730
  readonly runId: import("effect/Schema").String;
2638
2731
  readonly status: import("effect/Schema").Literals<readonly ["queued", "running", "ready", "failed", "cancelled", "stopped", "retained"]>;
2639
- }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").BudgetExceededError | typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceRuntimeRequirementUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceConflictError | typeof import("@sealant/api-contracts").WorkspaceBadGatewayError | typeof import("@sealant/api-contracts").WorkspaceServiceUnavailableError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
2732
+ }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").BudgetExceededError | typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceRuntimeEnvReferencesUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceRuntimeRequirementUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceDockerServiceUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceConflictError | typeof import("@sealant/api-contracts").WorkspaceBadGatewayError | typeof import("@sealant/api-contracts").WorkspaceServiceUnavailableError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
2640
2733
  readonly stopWorkspace: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"stopWorkspace", "POST", "/v1/workspaces/:workspaceId/stop", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2641
2734
  readonly workspaceId: import("effect/Schema").String;
2642
2735
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -5013,6 +5106,99 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
5013
5106
  readonly data: import("effect/Schema").optional<import("effect/Schema").Unknown>;
5014
5107
  }>>;
5015
5108
  }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
5109
+ readonly listWorkspaceRuntimes: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listWorkspaceRuntimes", "GET", "/v1/workspaces/runtimes", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
5110
+ readonly default: import("effect/Schema").Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
5111
+ readonly runtimes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
5112
+ readonly runtime: import("effect/Schema").Literals<readonly ["docker", "k8s", "k3s", "cloudflare", "microvm", "boat"]>;
5113
+ readonly os: import("effect/Schema").Struct<{
5114
+ readonly ubuntu: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5115
+ readonly supported: import("effect/Schema").Literal<true>;
5116
+ }>, import("effect/Schema").Struct<{
5117
+ readonly supported: import("effect/Schema").Literal<false>;
5118
+ readonly message: import("effect/Schema").String;
5119
+ }>]>;
5120
+ readonly nix: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5121
+ readonly supported: import("effect/Schema").Literal<true>;
5122
+ }>, import("effect/Schema").Struct<{
5123
+ readonly supported: import("effect/Schema").Literal<false>;
5124
+ readonly message: import("effect/Schema").String;
5125
+ }>]>;
5126
+ readonly arch: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5127
+ readonly supported: import("effect/Schema").Literal<true>;
5128
+ }>, import("effect/Schema").Struct<{
5129
+ readonly supported: import("effect/Schema").Literal<false>;
5130
+ readonly message: import("effect/Schema").String;
5131
+ }>]>;
5132
+ readonly fedora: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5133
+ readonly supported: import("effect/Schema").Literal<true>;
5134
+ }>, import("effect/Schema").Struct<{
5135
+ readonly supported: import("effect/Schema").Literal<false>;
5136
+ readonly message: import("effect/Schema").String;
5137
+ }>]>;
5138
+ }>;
5139
+ readonly customImage: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5140
+ readonly supported: import("effect/Schema").Literal<true>;
5141
+ }>, import("effect/Schema").Struct<{
5142
+ readonly supported: import("effect/Schema").Literal<false>;
5143
+ readonly message: import("effect/Schema").String;
5144
+ }>]>;
5145
+ readonly hostDirectories: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5146
+ readonly supported: import("effect/Schema").Literal<true>;
5147
+ }>, import("effect/Schema").Struct<{
5148
+ readonly supported: import("effect/Schema").Literal<false>;
5149
+ readonly message: import("effect/Schema").String;
5150
+ }>]>;
5151
+ readonly docker: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5152
+ readonly supported: import("effect/Schema").Literal<true>;
5153
+ }>, import("effect/Schema").Struct<{
5154
+ readonly supported: import("effect/Schema").Literal<false>;
5155
+ readonly message: import("effect/Schema").String;
5156
+ }>]>;
5157
+ readonly gvisor: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5158
+ readonly supported: import("effect/Schema").Literal<true>;
5159
+ }>, import("effect/Schema").Struct<{
5160
+ readonly supported: import("effect/Schema").Literal<false>;
5161
+ readonly message: import("effect/Schema").String;
5162
+ }>]>;
5163
+ readonly clusterEnv: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5164
+ readonly supported: import("effect/Schema").Literal<true>;
5165
+ }>, import("effect/Schema").Struct<{
5166
+ readonly supported: import("effect/Schema").Literal<false>;
5167
+ readonly message: import("effect/Schema").String;
5168
+ }>]>;
5169
+ readonly gitSource: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5170
+ readonly supported: import("effect/Schema").Literal<true>;
5171
+ }>, import("effect/Schema").Struct<{
5172
+ readonly supported: import("effect/Schema").Literal<false>;
5173
+ readonly message: import("effect/Schema").String;
5174
+ }>]>;
5175
+ readonly dotfilesArchives: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5176
+ readonly supported: import("effect/Schema").Literal<true>;
5177
+ }>, import("effect/Schema").Struct<{
5178
+ readonly supported: import("effect/Schema").Literal<false>;
5179
+ readonly message: import("effect/Schema").String;
5180
+ }>]>;
5181
+ readonly screen: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5182
+ readonly supported: import("effect/Schema").Literal<true>;
5183
+ readonly architectures: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["x86_64", "aarch64"]>>;
5184
+ }>, import("effect/Schema").Struct<{
5185
+ readonly supported: import("effect/Schema").Literal<false>;
5186
+ readonly message: import("effect/Schema").String;
5187
+ }>]>;
5188
+ readonly reservedPorts: import("effect/Schema").$Array<import("effect/Schema").Number>;
5189
+ readonly resources: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
5190
+ readonly supported: import("effect/Schema").Literal<true>;
5191
+ readonly attach: import("effect/Schema").Literals<readonly ["live", "next-start"]>;
5192
+ }>, import("effect/Schema").Struct<{
5193
+ readonly supported: import("effect/Schema").Literal<false>;
5194
+ readonly message: import("effect/Schema").String;
5195
+ }>]>;
5196
+ readonly idleCost: import("effect/Schema").Struct<{
5197
+ readonly charged: import("effect/Schema").Boolean;
5198
+ readonly message: import("effect/Schema").String;
5199
+ }>;
5200
+ }>>;
5201
+ }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
5016
5202
  readonly listWorkspaces: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listWorkspaces", "GET", "/v1/workspaces/", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
5017
5203
  readonly ownerUserId: import("effect/Schema").String;
5018
5204
  readonly status: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["queued", "running", "ready", "failed", "cancelled", "stopped", "retained"]>>;
@@ -5299,7 +5485,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
5299
5485
  readonly workspaceId: import("effect/Schema").String;
5300
5486
  readonly runId: import("effect/Schema").String;
5301
5487
  readonly status: import("effect/Schema").Literals<readonly ["queued", "running", "ready", "failed", "cancelled", "stopped", "retained"]>;
5302
- }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").BudgetExceededError | typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceRuntimeRequirementUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceConflictError | typeof import("@sealant/api-contracts").WorkspaceBadGatewayError | typeof import("@sealant/api-contracts").WorkspaceServiceUnavailableError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
5488
+ }>>, import("effect/Schema").toCodecJson<typeof import("@sealant/api-contracts").BudgetExceededError | typeof import("@sealant/api-contracts").WorkspaceBadRequestError | typeof import("@sealant/api-contracts").WorkspaceRuntimeEnvReferencesUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceRuntimeRequirementUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceDockerServiceUnsupportedError | typeof import("@sealant/api-contracts").WorkspaceNotFoundError | typeof import("@sealant/api-contracts").WorkspaceConflictError | typeof import("@sealant/api-contracts").WorkspaceBadGatewayError | typeof import("@sealant/api-contracts").WorkspaceServiceUnavailableError | typeof import("@sealant/api-contracts").WorkspaceInternalServerError>, import("@sealant/api-contracts").RequestBudget | import("@sealant/api-contracts").RequestRefusal, never>, never, never>;
5303
5489
  readonly stopWorkspace: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"stopWorkspace", "POST", "/v1/workspaces/:workspaceId/stop", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
5304
5490
  readonly workspaceId: import("effect/Schema").String;
5305
5491
  }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -510,7 +510,101 @@ export declare const restartWorkspaceOp: (workspaceId: string, payload: RestartW
510
510
  readonly workspaceId: string;
511
511
  readonly runId: string;
512
512
  readonly status: "cancelled" | "failed" | "queued" | "ready" | "retained" | "running" | "stopped";
513
- }, import("@sealant/api-contracts").BudgetExceededError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | Schema.SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceRuntimeRequirementUnsupportedError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
513
+ }, import("@sealant/api-contracts").BudgetExceededError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | Schema.SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceDockerServiceUnsupportedError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceRuntimeEnvReferencesUnsupportedError | import("@sealant/api-contracts").WorkspaceRuntimeRequirementUnsupportedError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
514
+ /** The runtimes this install launches and what each supports (`GET /v1/workspaces/runtimes`). */
515
+ export declare const listWorkspaceRuntimesOp: () => Effect.Effect<{
516
+ readonly default: "boat" | "cloudflare" | "docker" | "k3s" | "k8s" | "microvm";
517
+ readonly runtimes: readonly {
518
+ readonly runtime: "boat" | "cloudflare" | "docker" | "k3s" | "k8s" | "microvm";
519
+ readonly os: {
520
+ readonly ubuntu: {
521
+ readonly supported: true;
522
+ } | {
523
+ readonly supported: false;
524
+ readonly message: string;
525
+ };
526
+ readonly nix: {
527
+ readonly supported: true;
528
+ } | {
529
+ readonly supported: false;
530
+ readonly message: string;
531
+ };
532
+ readonly arch: {
533
+ readonly supported: true;
534
+ } | {
535
+ readonly supported: false;
536
+ readonly message: string;
537
+ };
538
+ readonly fedora: {
539
+ readonly supported: true;
540
+ } | {
541
+ readonly supported: false;
542
+ readonly message: string;
543
+ };
544
+ };
545
+ readonly customImage: {
546
+ readonly supported: true;
547
+ } | {
548
+ readonly supported: false;
549
+ readonly message: string;
550
+ };
551
+ readonly hostDirectories: {
552
+ readonly supported: true;
553
+ } | {
554
+ readonly supported: false;
555
+ readonly message: string;
556
+ };
557
+ readonly docker: {
558
+ readonly supported: true;
559
+ } | {
560
+ readonly supported: false;
561
+ readonly message: string;
562
+ };
563
+ readonly gvisor: {
564
+ readonly supported: true;
565
+ } | {
566
+ readonly supported: false;
567
+ readonly message: string;
568
+ };
569
+ readonly clusterEnv: {
570
+ readonly supported: true;
571
+ } | {
572
+ readonly supported: false;
573
+ readonly message: string;
574
+ };
575
+ readonly gitSource: {
576
+ readonly supported: true;
577
+ } | {
578
+ readonly supported: false;
579
+ readonly message: string;
580
+ };
581
+ readonly dotfilesArchives: {
582
+ readonly supported: true;
583
+ } | {
584
+ readonly supported: false;
585
+ readonly message: string;
586
+ };
587
+ readonly screen: {
588
+ readonly supported: false;
589
+ readonly message: string;
590
+ } | {
591
+ readonly supported: true;
592
+ readonly architectures: readonly ("aarch64" | "x86_64")[];
593
+ };
594
+ readonly reservedPorts: readonly number[];
595
+ readonly resources: {
596
+ readonly supported: false;
597
+ readonly message: string;
598
+ } | {
599
+ readonly supported: true;
600
+ readonly attach: "live" | "next-start";
601
+ };
602
+ readonly idleCost: {
603
+ readonly charged: boolean;
604
+ readonly message: string;
605
+ };
606
+ }[];
607
+ }, import("@sealant/api-contracts").BudgetExceededError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | Schema.SchemaError | import("@sealant/api-contracts").WorkspaceInternalServerError, SealantApiClient>;
514
608
  export declare const inspectWorkspaceImageOp: (payload: InspectWorkspaceImageRequest) => Effect.Effect<{
515
609
  readonly planHash: string;
516
610
  readonly publishedImage?: {
@@ -27,6 +27,8 @@ export const replanWorkspaceCaptureOp = (workspaceId, payload) => Effect.flatMap
27
27
  export const stopWorkspaceOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.stopWorkspace({ params: { workspaceId }, payload })).pipe(Effect.provideService(CurrentRequestPriority, "interactive"));
28
28
  export const recoverWorkspaceOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.recoverWorkspace({ params: { workspaceId }, payload })).pipe(Effect.provideService(CurrentRequestPriority, "interactive"));
29
29
  export const restartWorkspaceOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.restartWorkspace({ params: { workspaceId }, payload })).pipe(Effect.provideService(CurrentRequestPriority, "interactive"));
30
+ /** The runtimes this install launches and what each supports (`GET /v1/workspaces/runtimes`). */
31
+ export const listWorkspaceRuntimesOp = () => Effect.flatMap(SealantApiClient, (client) => client.workspaces.listWorkspaceRuntimes({}));
30
32
  export const inspectWorkspaceImageOp = (payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.inspectWorkspaceImage({ payload }));
31
33
  export const putWorkspaceCredentialsOp = (workspaceId, payload) => Effect.flatMap(SealantApiClient, (client) => client.workspaces.putWorkspaceCredentials({ params: { workspaceId }, payload }));
32
34
  /** Remove unused credential placements in one home. */
package/dist/types.d.ts CHANGED
@@ -1563,6 +1563,74 @@ export interface WorkspaceImageInspection {
1563
1563
  /** The image's per-person capability (`unknown` when none has been built yet). */
1564
1564
  readonly personLayout: WorkspaceImagePersonLayout;
1565
1565
  }
1566
+ /** A runtime family a workspace runs on (`CreateOptions.runtime`). */
1567
+ export type WorkspaceRuntimeKind = WorkspaceRuntimeInfo["kind"];
1568
+ /** Something a runtime does not do, and the sentence to show a person who asks for it. */
1569
+ export interface RuntimeUnsupported {
1570
+ readonly supported: false;
1571
+ readonly message: string;
1572
+ }
1573
+ /**
1574
+ * Whether a runtime does one thing. A create that asks a runtime for an unsupported item is
1575
+ * refused (422) with the same `message`.
1576
+ */
1577
+ export type RuntimeCapability = {
1578
+ readonly supported: true;
1579
+ } | RuntimeUnsupported;
1580
+ /** A CPU architecture workspaces run on. */
1581
+ export type RuntimeArchitecture = "x86_64" | "aarch64";
1582
+ /** What one runtime supports (see `workspaces.runtimes`). */
1583
+ export interface RuntimeSupport {
1584
+ readonly runtime: WorkspaceRuntimeKind;
1585
+ /** The managed OS families that run on this runtime (`CreateOptions` image `os`). */
1586
+ readonly os: {
1587
+ readonly ubuntu: RuntimeCapability;
1588
+ readonly nix: RuntimeCapability;
1589
+ readonly arch: RuntimeCapability;
1590
+ readonly fedora: RuntimeCapability;
1591
+ };
1592
+ /** A workspace built from a base image of its own. */
1593
+ readonly customImage: RuntimeCapability;
1594
+ /** Directories of the deployment's own servers bound into the workspace (`mount` sources). */
1595
+ readonly hostDirectories: RuntimeCapability;
1596
+ /** Docker inside the workspace. */
1597
+ readonly docker: RuntimeCapability;
1598
+ /** The workspace run under gVisor (`runsc`). */
1599
+ readonly gvisor: RuntimeCapability;
1600
+ /** Kubernetes Secrets, ConfigMaps and a service account read into the workspace. */
1601
+ readonly clusterEnv: RuntimeCapability;
1602
+ /** A workspace started by cloning a repository rather than from a capture. */
1603
+ readonly gitSource: RuntimeCapability;
1604
+ /** Dotfiles sent with the create as archives. */
1605
+ readonly dotfilesArchives: RuntimeCapability;
1606
+ /** A screen (an X display) inside the workspace, and the CPU architectures it runs on. */
1607
+ readonly screen: {
1608
+ readonly supported: true;
1609
+ readonly architectures: readonly RuntimeArchitecture[];
1610
+ } | RuntimeUnsupported;
1611
+ /** Ports inside the workspace the runtime holds for itself; nothing else can listen on them. */
1612
+ readonly reservedPorts: readonly number[];
1613
+ /**
1614
+ * A project's resources linked to the workspace: `live` reaches a running workspace when it is
1615
+ * linked, `next-start` only once the workspace starts again.
1616
+ */
1617
+ readonly resources: {
1618
+ readonly supported: true;
1619
+ readonly attach: "live" | "next-start";
1620
+ } | RuntimeUnsupported;
1621
+ /** Whether a workspace that sits idle costs money, and the sentence that says so. */
1622
+ readonly idleCost: {
1623
+ readonly charged: boolean;
1624
+ readonly message: string;
1625
+ };
1626
+ }
1627
+ /** The runtimes this control plane launches workspaces on (see `workspaces.runtimes`). */
1628
+ export interface WorkspaceRuntimes {
1629
+ /** The runtime a create that names none runs on. It is listed first. */
1630
+ readonly default: WorkspaceRuntimeKind;
1631
+ /** One entry per runtime this install launches; a runtime not listed is one it cannot. */
1632
+ readonly runtimes: readonly RuntimeSupport[];
1633
+ }
1566
1634
  /** Where a launch writes its logins (see {@link CreateOptions.credentialsHome}). */
1567
1635
  export interface WorkspaceCredentialsHomeOptions {
1568
1636
  /** Absolute path of the home inside the executor, e.g. `/home/m4lice000`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/sdk-next",
3
- "version": "0.40.0-next.868",
3
+ "version": "0.40.0-next.870",
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,12 +26,12 @@
26
26
  "node": ">=20"
27
27
  },
28
28
  "dependencies": {
29
- "@sealant/api-contracts": "npm:@sealant/api-contracts-next@0.40.0-next.868"
29
+ "@sealant/api-contracts": "npm:@sealant/api-contracts-next@0.40.0-next.870"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "effect": "^4.0.5"
33
33
  },
34
- "gitHead": "aa42ea93afcb24f6e1d8dc752bc950910ad12d3c",
34
+ "gitHead": "1bfed31921585308cf9ba946b72c47192955945c",
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  }