@sealant/sdk-next 0.40.0-next.772 → 0.40.0-next.774

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
@@ -54,7 +54,7 @@ export declare class Sealant {
54
54
  * create that already committed answers `found` — stop that workspace instead.
55
55
  */
56
56
  cancelCreate: (idempotencyKey: string) => Promise<WorkspaceCreateState>;
57
- list: (options?: ListOptions | undefined) => Promise<readonly Workspace[]>;
57
+ list: (options?: ListOptions) => Promise<readonly Workspace[]>;
58
58
  };
59
59
  /**
60
60
  * Inference on connected accounts — server-side via the official agent SDKs, never raw model-API
@@ -4130,5 +4130,5 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
4130
4130
  export declare class SealantApiClient extends SealantApiClient_base {
4131
4131
  }
4132
4132
  /** Live layer: derives the client over the global-fetch `HttpClient`, with an optional bearer token. */
4133
- export declare const sealantApiClientLayer: (config: SealantInternalConfig) => Layer.Layer<SealantApiClient, never, never>;
4133
+ export declare const sealantApiClientLayer: (config: SealantInternalConfig) => Layer.Layer<SealantApiClient>;
4134
4134
  export {};
@@ -4,4 +4,4 @@ import type { WorkspaceExecOptions, WorkspaceExecResult } from "../types.js";
4
4
  /** The wait before the next read, given the last wait and the time since the run was registered. */
5
5
  export declare const nextExecPollMs: (lastWaitMs: number | undefined, elapsedMs: number) => number;
6
6
  /** The `workspace.exec()` implementation (Promise boundary over the Effect above). */
7
- export declare const execWorkspace: (ctx: SdkContext, init: WorkspaceInit, argv: readonly string[], options?: WorkspaceExecOptions | undefined) => Promise<WorkspaceExecResult>;
7
+ export declare const execWorkspace: (ctx: SdkContext, init: WorkspaceInit, argv: readonly string[], options?: WorkspaceExecOptions) => Promise<WorkspaceExecResult>;
@@ -1,39 +1,13 @@
1
+ /**
2
+ * Effect operations over the derived control-plane client. Thin: each yields the client and calls one
3
+ * contract endpoint, returning the WIRE type. The facade maps wire -> public types and the runtime
4
+ * maps the typed Effect failure -> a plain `SealantError`. Keeping these here (rather than inline in
5
+ * the facade) keeps the wire surface in one place and unit-testable.
6
+ */
7
+ import type { ApplyWorkspaceDotfilesRequest, BindWorkspaceRequest, CancelWorkspaceCreateRequest, FlushWorkspaceCaptureRequest, GetWorkspaceCaptureStatusQuery, CloseSessionRequest, CreateAccessTokenRequest, ConnectedAccountProvider, CreateConnectedAccountRequest, CreateSshKeyRequest, EnsureUserRequest, PersonBindingWire, CreateRunRequest, CreateSessionAsUserRequest, CreateSessionRequest, CreateWorkspaceRequest, ExecWorkspaceAsUserRequest, ExecWorkspaceRequest, ExpireWorkspaceRequest, ClearWorkspaceSshUserQuery, GetRunScrollbackQuery, GetRunTimelineQuery, GetSessionOutputQuery, InferenceRespondRequest, ListResourceDomainMembersQuery, ResourceDomainBudgetLimits, SetResourceDomainBudgetRequest, ListRunsQuery, ListSessionsQuery, ListWorkspacesQuery, MarkConnectedAccountInvalidRequest, ReplanWorkspaceCaptureRequest, RecoverWorkspaceRequest, RestartWorkspaceRequest, SessionInputRequest, InspectWorkspaceImageRequest, PutWorkspaceCredentialsRequest, ResourceDomainMemberDecisionRequest, PruneWorkspaceCredentialsRequest, ReleaseWorkspaceCredentialsQuery, ListWorkspaceCredentialsQuery, SessionResizeRequest, SessionSignalRequest, SetConnectedAccountDefaultRequest, StopWorkspaceRequest, UpdateRunRequest } from "@sealant/api-contracts";
1
8
  import { Effect } from "effect";
2
9
  import { SealantApiClient } from "./api-client.js";
3
- export declare const createWorkspaceOp: (payload: {
4
- readonly ownerUserId: string;
5
- readonly registryId: string;
6
- readonly repository: string;
7
- readonly tag: string;
8
- readonly name?: string | undefined;
9
- readonly sourceSelection?: {
10
- readonly provider: "github";
11
- readonly installationId: string;
12
- readonly installationRepositoryId: string;
13
- readonly ref?: string | undefined;
14
- } | undefined;
15
- readonly dotfilesSelection?: {
16
- readonly provider: "github";
17
- readonly installationId: string;
18
- readonly installationRepositoryId: string;
19
- readonly ref?: string | undefined;
20
- } | undefined;
21
- readonly credentials?: {
22
- readonly profileId?: string | undefined;
23
- readonly claude?: string | undefined;
24
- readonly codex?: string | undefined;
25
- readonly github?: string | undefined;
26
- } | undefined;
27
- readonly spec: unknown;
28
- readonly secretEnv?: {
29
- readonly [x: string]: string;
30
- } | undefined;
31
- readonly captureToken?: string | undefined;
32
- readonly ttlSeconds?: number | undefined;
33
- readonly idempotencyKey?: string | undefined;
34
- readonly launchId?: string | undefined;
35
- readonly sshAsOwner?: boolean | undefined;
36
- }, idempotencyKey?: string | undefined) => Effect.Effect<{
10
+ export declare const createWorkspaceOp: (payload: CreateWorkspaceRequest, idempotencyKey?: string) => Effect.Effect<{
37
11
  readonly workspaceId: string;
38
12
  readonly name: string;
39
13
  readonly status: "cancelled" | "failed" | "queued" | "ready" | "retained" | "running" | "stopped";
@@ -54,7 +28,7 @@ export declare const createWorkspaceOp: (payload: {
54
28
  readonly replayed?: boolean | undefined;
55
29
  readonly launchId?: string | undefined;
56
30
  }, import("@sealant/api-contracts").BudgetExceededError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/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").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceRuntimeEnvReferencesUnsupportedError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError | import("@sealant/api-contracts").WorkspaceSshOwnerRefusedError, SealantApiClient>;
57
- export declare const getWorkspaceOp: (workspaceId: string, ownerUserId?: string | undefined) => Effect.Effect<{
31
+ export declare const getWorkspaceOp: (workspaceId: string, ownerUserId?: string) => Effect.Effect<{
58
32
  readonly workspaceId: string;
59
33
  readonly name: string;
60
34
  readonly ownerUserId: string;
@@ -155,21 +129,14 @@ export declare const getWorkspaceCreateOp: (idempotencyKey: string, ownerUserId:
155
129
  readonly runId?: string | undefined;
156
130
  readonly launchId?: string | undefined;
157
131
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceInternalServerError, SealantApiClient>;
158
- export declare const cancelWorkspaceCreateOp: (idempotencyKey: string, payload: {
159
- readonly ownerUserId: string;
160
- }) => Effect.Effect<{
132
+ export declare const cancelWorkspaceCreateOp: (idempotencyKey: string, payload: CancelWorkspaceCreateRequest) => Effect.Effect<{
161
133
  readonly idempotencyKey: string;
162
134
  readonly state: "cancelled" | "found" | "none" | "pending";
163
135
  readonly workspaceId?: string | undefined;
164
136
  readonly runId?: string | undefined;
165
137
  readonly launchId?: string | undefined;
166
138
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceInternalServerError, SealantApiClient>;
167
- export declare const listWorkspacesOp: (query: {
168
- readonly ownerUserId: string;
169
- readonly status?: "cancelled" | "failed" | "queued" | "ready" | "retained" | "running" | "stopped" | undefined;
170
- readonly limit?: string | undefined;
171
- readonly idempotencyKey?: string | undefined;
172
- }) => Effect.Effect<{
139
+ export declare const listWorkspacesOp: (query: ListWorkspacesQuery) => Effect.Effect<{
173
140
  readonly items: readonly {
174
141
  readonly workspaceId: string;
175
142
  readonly name: string;
@@ -223,15 +190,7 @@ export declare const listWorkspacesOp: (query: {
223
190
  readonly expiresAt?: string | undefined;
224
191
  }[];
225
192
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceInternalServerError, SealantApiClient>;
226
- export declare const execWorkspaceOp: (workspaceId: string, payload: {
227
- readonly ownerUserId: string;
228
- readonly commands: readonly {
229
- readonly executable: string;
230
- readonly args: readonly string[];
231
- readonly cwd?: string | undefined;
232
- }[];
233
- readonly user?: string | undefined;
234
- }) => Effect.Effect<{
193
+ export declare const execWorkspaceOp: (workspaceId: string, payload: ExecWorkspaceRequest) => Effect.Effect<{
235
194
  readonly runId: string;
236
195
  readonly workspaceId: string;
237
196
  readonly attemptId?: string | undefined;
@@ -260,15 +219,7 @@ export declare const execWorkspaceOp: (workspaceId: string, payload: {
260
219
  readonly updatedAt: string;
261
220
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/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, SealantApiClient>;
262
221
  /** An exec as a Linux user: its own route, which a control plane that cannot run one answers 404. */
263
- export declare const execWorkspaceAsUserOp: (workspaceId: string, payload: {
264
- readonly ownerUserId: string;
265
- readonly commands: readonly {
266
- readonly executable: string;
267
- readonly args: readonly string[];
268
- readonly cwd?: string | undefined;
269
- }[];
270
- readonly user: string;
271
- }) => Effect.Effect<{
222
+ export declare const execWorkspaceAsUserOp: (workspaceId: string, payload: ExecWorkspaceAsUserRequest) => Effect.Effect<{
272
223
  readonly runId: string;
273
224
  readonly workspaceId: string;
274
225
  readonly attemptId?: string | undefined;
@@ -296,26 +247,7 @@ export declare const execWorkspaceAsUserOp: (workspaceId: string, payload: {
296
247
  readonly createdAt: string;
297
248
  readonly updatedAt: string;
298
249
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/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, SealantApiClient>;
299
- export declare const applyWorkspaceDotfilesOp: (workspaceId: string, payload: {
300
- readonly ownerUserId: string;
301
- readonly onBehalfOfUserId: string;
302
- readonly user: string;
303
- readonly home: string;
304
- readonly repository?: {
305
- readonly url: string;
306
- readonly ref?: string | undefined;
307
- readonly manager?: "auto" | "chezmoi" | "copy" | "stow" | undefined;
308
- readonly bootstrap?: boolean | undefined;
309
- readonly bootstrapCommand?: string | undefined;
310
- } | undefined;
311
- readonly archives?: readonly {
312
- readonly data: string;
313
- readonly manager?: "auto" | "chezmoi" | "copy" | "stow" | undefined;
314
- readonly target?: "config" | "home" | undefined;
315
- readonly bootstrap?: boolean | undefined;
316
- readonly bootstrapCommand?: string | undefined;
317
- }[] | undefined;
318
- }) => Effect.Effect<{
250
+ export declare const applyWorkspaceDotfilesOp: (workspaceId: string, payload: ApplyWorkspaceDotfilesRequest) => Effect.Effect<{
319
251
  readonly runId: string;
320
252
  readonly workspaceId: string;
321
253
  readonly attemptId?: string | undefined;
@@ -343,22 +275,13 @@ export declare const applyWorkspaceDotfilesOp: (workspaceId: string, payload: {
343
275
  readonly createdAt: string;
344
276
  readonly updatedAt: string;
345
277
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
346
- export declare const bindWorkspaceOp: (workspaceId: string, payload: {
347
- readonly ownerUserId: string;
348
- readonly mountPath?: string | undefined;
349
- readonly subpath: string;
350
- }) => Effect.Effect<{
278
+ export declare const bindWorkspaceOp: (workspaceId: string, payload: BindWorkspaceRequest) => Effect.Effect<{
351
279
  readonly binds: readonly {
352
280
  readonly mountPath: string;
353
281
  readonly subpath: string;
354
282
  }[];
355
283
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
356
- export declare const flushWorkspaceCaptureOp: (workspaceId: string, payload: {
357
- readonly ownerUserId: string;
358
- readonly kind?: "final" | "suspend" | undefined;
359
- readonly deadlineMs?: number | undefined;
360
- readonly graceMs?: number | undefined;
361
- }) => Effect.Effect<{
284
+ export declare const flushWorkspaceCaptureOp: (workspaceId: string, payload: FlushWorkspaceCaptureRequest) => Effect.Effect<{
362
285
  readonly epoch: number;
363
286
  readonly worktreeId: string;
364
287
  readonly headN?: number | undefined;
@@ -409,9 +332,7 @@ export declare const flushWorkspaceCaptureOp: (workspaceId: string, payload: {
409
332
  } | undefined;
410
333
  readonly ownerMap?: boolean | undefined;
411
334
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
412
- export declare const getWorkspaceCaptureStatusOp: (workspaceId: string, query: {
413
- readonly ownerUserId: string;
414
- }) => Effect.Effect<{
335
+ export declare const getWorkspaceCaptureStatusOp: (workspaceId: string, query: GetWorkspaceCaptureStatusQuery) => Effect.Effect<{
415
336
  readonly epoch: number;
416
337
  readonly worktreeId: string;
417
338
  readonly headN?: number | undefined;
@@ -462,17 +383,7 @@ export declare const getWorkspaceCaptureStatusOp: (workspaceId: string, query: {
462
383
  } | undefined;
463
384
  readonly ownerMap?: boolean | undefined;
464
385
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
465
- export declare const replanWorkspaceCaptureOp: (workspaceId: string, payload: {
466
- readonly ownerUserId: string;
467
- readonly expectedOwnerMap?: {
468
- readonly gid: number;
469
- readonly worktreeUid: number;
470
- readonly people: readonly {
471
- readonly id: string;
472
- readonly uid: number;
473
- }[];
474
- } | null | undefined;
475
- }) => Effect.Effect<{
386
+ export declare const replanWorkspaceCaptureOp: (workspaceId: string, payload: ReplanWorkspaceCaptureRequest) => Effect.Effect<{
476
387
  readonly worktreeId: string;
477
388
  readonly epoch: number;
478
389
  readonly headN?: number | undefined;
@@ -484,25 +395,7 @@ export declare const replanWorkspaceCaptureOp: (workspaceId: string, payload: {
484
395
  readonly removed: number;
485
396
  readonly unchanged: boolean;
486
397
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
487
- export declare const stopWorkspaceOp: (workspaceId: string, payload: {
488
- readonly ownerUserId: string;
489
- readonly discardUnsaved?: boolean | undefined;
490
- readonly completion?: {
491
- readonly captureN: number;
492
- readonly epoch: number;
493
- readonly executorId: string;
494
- readonly launchId?: string | undefined;
495
- readonly sealedAt?: string | undefined;
496
- readonly origin?: {
497
- readonly epoch: number;
498
- readonly launch: string;
499
- readonly bootId: string;
500
- readonly bootGeneration: number;
501
- readonly observation: number;
502
- readonly headN?: number | undefined;
503
- } | undefined;
504
- } | undefined;
505
- }) => Effect.Effect<{
398
+ export declare const stopWorkspaceOp: (workspaceId: string, payload: StopWorkspaceRequest) => Effect.Effect<{
506
399
  readonly workspaceId: string;
507
400
  readonly status: "cancelled" | "failed" | "queued" | "ready" | "retained" | "running" | "stopped";
508
401
  readonly completion?: {
@@ -510,25 +403,17 @@ export declare const stopWorkspaceOp: (workspaceId: string, payload: {
510
403
  readonly detail?: string | undefined;
511
404
  } | undefined;
512
405
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/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, SealantApiClient>;
513
- export declare const recoverWorkspaceOp: (workspaceId: string, payload: {
514
- readonly ownerUserId: string;
515
- }) => Effect.Effect<{
406
+ export declare const recoverWorkspaceOp: (workspaceId: string, payload: RecoverWorkspaceRequest) => Effect.Effect<{
516
407
  readonly workspaceId: string;
517
408
  readonly state: "not-retained" | "requested";
518
409
  readonly recoverable?: boolean | undefined;
519
410
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
520
- export declare const restartWorkspaceOp: (workspaceId: string, payload: {
521
- readonly ownerUserId: string;
522
- }) => Effect.Effect<{
411
+ export declare const restartWorkspaceOp: (workspaceId: string, payload: RestartWorkspaceRequest) => Effect.Effect<{
523
412
  readonly workspaceId: string;
524
413
  readonly runId: string;
525
414
  readonly status: "cancelled" | "failed" | "queued" | "ready" | "retained" | "running" | "stopped";
526
415
  }, import("@sealant/api-contracts").BudgetExceededError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/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, SealantApiClient>;
527
- export declare const inspectWorkspaceImageOp: (payload: {
528
- readonly ownerUserId: string;
529
- readonly registryId: string;
530
- readonly spec: unknown;
531
- }) => Effect.Effect<{
416
+ export declare const inspectWorkspaceImageOp: (payload: InspectWorkspaceImageRequest) => Effect.Effect<{
532
417
  readonly planHash: string;
533
418
  readonly publishedImage?: {
534
419
  readonly reference: string;
@@ -550,20 +435,7 @@ export declare const inspectWorkspaceImageOp: (payload: {
550
435
  readonly acl: "supported" | "unknown" | "unsupported";
551
436
  };
552
437
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
553
- export declare const putWorkspaceCredentialsOp: (workspaceId: string, payload: {
554
- readonly ownerUserId: string;
555
- readonly onBehalfOfUserId: string;
556
- readonly home: string;
557
- readonly uid?: number | undefined;
558
- readonly gid?: number | undefined;
559
- readonly claude?: string | null | undefined;
560
- readonly codex?: string | null | undefined;
561
- readonly github?: string | null | undefined;
562
- readonly pi?: string | null | undefined;
563
- readonly opencode?: string | null | undefined;
564
- readonly partial?: boolean | undefined;
565
- readonly live?: readonly string[] | undefined;
566
- }) => Effect.Effect<{
438
+ export declare const putWorkspaceCredentialsOp: (workspaceId: string, payload: PutWorkspaceCredentialsRequest) => Effect.Effect<{
567
439
  readonly workspaceId: string;
568
440
  readonly runId: string;
569
441
  readonly home: {
@@ -613,11 +485,7 @@ export declare const putWorkspaceCredentialsOp: (workspaceId: string, payload: {
613
485
  }[] | undefined;
614
486
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
615
487
  /** Remove unused credential placements in one home. */
616
- export declare const pruneWorkspaceCredentialsOp: (workspaceId: string, payload: {
617
- readonly ownerUserId: string;
618
- readonly home: string;
619
- readonly live: readonly string[];
620
- }) => Effect.Effect<{
488
+ export declare const pruneWorkspaceCredentialsOp: (workspaceId: string, payload: PruneWorkspaceCredentialsRequest) => Effect.Effect<{
621
489
  readonly workspaceId: string;
622
490
  readonly runId: string;
623
491
  readonly home?: {
@@ -661,18 +529,13 @@ export declare const pruneWorkspaceCredentialsOp: (workspaceId: string, payload:
661
529
  };
662
530
  } | undefined;
663
531
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
664
- export declare const releaseWorkspaceCredentialsOp: (workspaceId: string, query: {
665
- readonly ownerUserId: string;
666
- readonly home: string;
667
- }) => Effect.Effect<{
532
+ export declare const releaseWorkspaceCredentialsOp: (workspaceId: string, query: ReleaseWorkspaceCredentialsQuery) => Effect.Effect<{
668
533
  readonly workspaceId: string;
669
534
  readonly runId: string;
670
535
  readonly home: string;
671
536
  readonly released: boolean;
672
537
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadGatewayError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError | import("@sealant/api-contracts").WorkspaceServiceUnavailableError, SealantApiClient>;
673
- export declare const listWorkspaceCredentialsOp: (workspaceId: string, query: {
674
- readonly ownerUserId: string;
675
- }) => Effect.Effect<{
538
+ export declare const listWorkspaceCredentialsOp: (workspaceId: string, query: ListWorkspaceCredentialsQuery) => Effect.Effect<{
676
539
  readonly workspaceId: string;
677
540
  readonly runId: string;
678
541
  readonly homes: readonly {
@@ -716,35 +579,15 @@ export declare const listWorkspaceCredentialsOp: (workspaceId: string, query: {
716
579
  };
717
580
  }[];
718
581
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceConflictError | import("@sealant/api-contracts").WorkspaceForbiddenError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
719
- export declare const expireWorkspaceOp: (workspaceId: string, payload: {
720
- readonly ownerUserId: string;
721
- readonly ttlSeconds?: number | null | undefined;
722
- }) => Effect.Effect<{
582
+ export declare const expireWorkspaceOp: (workspaceId: string, payload: ExpireWorkspaceRequest) => Effect.Effect<{
723
583
  readonly workspaceId: string;
724
584
  readonly expiresAt: string | null;
725
585
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceBadRequestError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
726
- export declare const clearWorkspaceSshUserOp: (workspaceId: string, query: {
727
- readonly ownerUserId?: string | undefined;
728
- }) => Effect.Effect<{
586
+ export declare const clearWorkspaceSshUserOp: (workspaceId: string, query: ClearWorkspaceSshUserQuery) => Effect.Effect<{
729
587
  readonly workspaceId: string;
730
588
  readonly sshUser: null;
731
589
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").WorkspaceInternalServerError | import("@sealant/api-contracts").WorkspaceNotFoundError, SealantApiClient>;
732
- export declare const createRunOp: (payload: {
733
- readonly workspaceId: string;
734
- readonly harnessId: string;
735
- readonly ownerUserId: string;
736
- readonly mode?: "interactive" | "one-shot" | undefined;
737
- readonly prompt?: string | undefined;
738
- readonly attemptId?: string | undefined;
739
- readonly command?: {
740
- readonly executable: string;
741
- readonly args: readonly string[];
742
- readonly cwd?: string | undefined;
743
- } | undefined;
744
- readonly metadata?: {
745
- readonly [x: string]: unknown;
746
- } | undefined;
747
- }) => Effect.Effect<{
590
+ export declare const createRunOp: (payload: CreateRunRequest) => Effect.Effect<{
748
591
  readonly runId: string;
749
592
  readonly workspaceId: string;
750
593
  readonly attemptId?: string | undefined;
@@ -772,7 +615,7 @@ export declare const createRunOp: (payload: {
772
615
  readonly createdAt: string;
773
616
  readonly updatedAt: string;
774
617
  }, import("@sealant/api-contracts").BudgetExceededError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunBadRequestError | import("@sealant/api-contracts").RunInternalServerError | import("@sealant/api-contracts").RunNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
775
- export declare const getRunOp: (runId: string, ownerUserId?: string | undefined) => Effect.Effect<{
618
+ export declare const getRunOp: (runId: string, ownerUserId?: string) => Effect.Effect<{
776
619
  readonly runId: string;
777
620
  readonly workspaceId: string;
778
621
  readonly attemptId?: string | undefined;
@@ -800,12 +643,7 @@ export declare const getRunOp: (runId: string, ownerUserId?: string | undefined)
800
643
  readonly createdAt: string;
801
644
  readonly updatedAt: string;
802
645
  }, import("@sealant/api-contracts").BudgetExceededError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunInternalServerError | import("@sealant/api-contracts").RunNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
803
- export declare const listRunsOp: (query: {
804
- readonly workspaceId?: string | undefined;
805
- readonly ownerUserId?: string | undefined;
806
- readonly status?: "cancelled" | "completed" | "failed" | "queued" | "running" | undefined;
807
- readonly limit?: string | undefined;
808
- }) => Effect.Effect<{
646
+ export declare const listRunsOp: (query: ListRunsQuery) => Effect.Effect<{
809
647
  readonly items: readonly {
810
648
  readonly runId: string;
811
649
  readonly workspaceId: string;
@@ -835,19 +673,7 @@ export declare const listRunsOp: (query: {
835
673
  readonly updatedAt: string;
836
674
  }[];
837
675
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunBadRequestError | import("@sealant/api-contracts").RunInternalServerError | import("effect/Schema").SchemaError, SealantApiClient>;
838
- export declare const updateRunOp: (runId: string, payload: {
839
- readonly ownerUserId?: string | undefined;
840
- readonly status?: "cancelled" | "completed" | "failed" | "queued" | "running" | undefined;
841
- readonly exitCode?: number | undefined;
842
- readonly errorMessage?: string | undefined;
843
- readonly diff?: string | undefined;
844
- readonly changedFiles?: readonly {
845
- readonly path: string;
846
- readonly change: "added" | "deleted" | "modified" | "renamed";
847
- readonly oldPath?: string | undefined;
848
- }[] | undefined;
849
- readonly changesReadFailed?: boolean | undefined;
850
- }) => Effect.Effect<{
676
+ export declare const updateRunOp: (runId: string, payload: UpdateRunRequest) => Effect.Effect<{
851
677
  readonly runId: string;
852
678
  readonly workspaceId: string;
853
679
  readonly attemptId?: string | undefined;
@@ -875,13 +701,7 @@ export declare const updateRunOp: (runId: string, payload: {
875
701
  readonly createdAt: string;
876
702
  readonly updatedAt: string;
877
703
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunBadRequestError | import("@sealant/api-contracts").RunInternalServerError | import("@sealant/api-contracts").RunNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
878
- export declare const getRunTimelineOp: (runId: string, query: {
879
- readonly ownerUserId?: string | undefined;
880
- readonly fromSequence?: string | undefined;
881
- readonly toSequence?: string | undefined;
882
- readonly limit?: string | undefined;
883
- readonly kinds?: string | undefined;
884
- }) => Effect.Effect<readonly {
704
+ export declare const getRunTimelineOp: (runId: string, query: GetRunTimelineQuery) => Effect.Effect<readonly {
885
705
  readonly eventId: string;
886
706
  readonly sequence: string;
887
707
  readonly kind: string;
@@ -892,20 +712,13 @@ export declare const getRunTimelineOp: (runId: string, query: {
892
712
  readonly captureMethod: number;
893
713
  readonly confidence: number;
894
714
  }[], import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunBadRequestError | import("@sealant/api-contracts").RunInternalServerError | import("@sealant/api-contracts").RunNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
895
- export declare const getRunScrollbackOp: (runId: string, query: {
896
- readonly ownerUserId?: string | undefined;
897
- readonly processId: string;
898
- readonly stream: "pty" | "stderr" | "stdout";
899
- readonly atSequence?: string | undefined;
900
- readonly fromSequence?: string | undefined;
901
- readonly limit?: string | undefined;
902
- }) => Effect.Effect<{
715
+ export declare const getRunScrollbackOp: (runId: string, query: GetRunScrollbackQuery) => Effect.Effect<{
903
716
  readonly processId: string;
904
717
  readonly stream: "pty" | "stderr" | "stdout";
905
718
  readonly byteCount: number;
906
719
  readonly contentBase64: string;
907
720
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunBadRequestError | import("@sealant/api-contracts").RunInternalServerError | import("@sealant/api-contracts").RunNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
908
- export declare const getRunLossOp: (runId: string, ownerUserId?: string | undefined) => Effect.Effect<{
721
+ export declare const getRunLossOp: (runId: string, ownerUserId?: string) => Effect.Effect<{
909
722
  readonly runId: string;
910
723
  readonly droppedEventCount: string;
911
724
  readonly sequenceGapCount: number;
@@ -920,7 +733,7 @@ export declare const getRunLossOp: (runId: string, ownerUserId?: string | undefi
920
733
  readonly reason?: string | undefined;
921
734
  }[];
922
735
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunInternalServerError | import("@sealant/api-contracts").RunNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
923
- export declare const getRunChangesOp: (runId: string, ownerUserId?: string | undefined) => Effect.Effect<{
736
+ export declare const getRunChangesOp: (runId: string, ownerUserId?: string) => Effect.Effect<{
924
737
  readonly files: readonly {
925
738
  readonly path: string;
926
739
  readonly change: "added" | "deleted" | "modified" | "renamed";
@@ -930,23 +743,7 @@ export declare const getRunChangesOp: (runId: string, ownerUserId?: string | und
930
743
  readonly available?: boolean | undefined;
931
744
  readonly unavailableReason?: string | undefined;
932
745
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").RunInternalServerError | import("@sealant/api-contracts").RunNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
933
- export declare const createSessionOp: (payload: {
934
- readonly workspaceId: string;
935
- readonly ownerUserId: string;
936
- readonly argv: readonly string[];
937
- readonly cwd?: string | undefined;
938
- readonly env?: {
939
- readonly [x: string]: string;
940
- } | undefined;
941
- readonly cols?: number | undefined;
942
- readonly rows?: number | undefined;
943
- readonly term?: string | undefined;
944
- readonly mode?: "pipe" | "pty" | undefined;
945
- readonly metadata?: {
946
- readonly [x: string]: unknown;
947
- } | undefined;
948
- readonly user?: string | undefined;
949
- }) => Effect.Effect<{
746
+ export declare const createSessionOp: (payload: CreateSessionRequest) => Effect.Effect<{
950
747
  readonly sessionId: string;
951
748
  readonly workspaceId: string;
952
749
  readonly runId: string;
@@ -970,23 +767,7 @@ export declare const createSessionOp: (payload: {
970
767
  readonly endedAt?: string | undefined;
971
768
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadGatewayError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionConflictError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
972
769
  /** A session as a Linux user: its own route, which a control plane that cannot open one answers 404. */
973
- export declare const createSessionAsUserOp: (payload: {
974
- readonly workspaceId: string;
975
- readonly ownerUserId: string;
976
- readonly argv: readonly string[];
977
- readonly cwd?: string | undefined;
978
- readonly env?: {
979
- readonly [x: string]: string;
980
- } | undefined;
981
- readonly cols?: number | undefined;
982
- readonly rows?: number | undefined;
983
- readonly term?: string | undefined;
984
- readonly mode?: "pipe" | "pty" | undefined;
985
- readonly metadata?: {
986
- readonly [x: string]: unknown;
987
- } | undefined;
988
- readonly user: string;
989
- }) => Effect.Effect<{
770
+ export declare const createSessionAsUserOp: (payload: CreateSessionAsUserRequest) => Effect.Effect<{
990
771
  readonly sessionId: string;
991
772
  readonly workspaceId: string;
992
773
  readonly runId: string;
@@ -1009,7 +790,7 @@ export declare const createSessionAsUserOp: (payload: {
1009
790
  readonly createdAt: string;
1010
791
  readonly endedAt?: string | undefined;
1011
792
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadGatewayError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionConflictError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1012
- export declare const getSessionOp: (sessionId: string, ownerUserId?: string | undefined) => Effect.Effect<{
793
+ export declare const getSessionOp: (sessionId: string, ownerUserId?: string) => Effect.Effect<{
1013
794
  readonly sessionId: string;
1014
795
  readonly workspaceId: string;
1015
796
  readonly runId: string;
@@ -1032,12 +813,7 @@ export declare const getSessionOp: (sessionId: string, ownerUserId?: string | un
1032
813
  readonly createdAt: string;
1033
814
  readonly endedAt?: string | undefined;
1034
815
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1035
- export declare const listSessionsOp: (query: {
1036
- readonly ownerUserId: string;
1037
- readonly workspaceId?: string | undefined;
1038
- readonly status?: "exited" | "failed" | "running" | "starting" | undefined;
1039
- readonly limit?: string | undefined;
1040
- }) => Effect.Effect<{
816
+ export declare const listSessionsOp: (query: ListSessionsQuery) => Effect.Effect<{
1041
817
  readonly items: readonly {
1042
818
  readonly sessionId: string;
1043
819
  readonly workspaceId: string;
@@ -1062,11 +838,7 @@ export declare const listSessionsOp: (query: {
1062
838
  readonly endedAt?: string | undefined;
1063
839
  }[];
1064
840
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1065
- export declare const getSessionOutputOp: (sessionId: string, query: {
1066
- readonly ownerUserId?: string | undefined;
1067
- readonly from?: string | undefined;
1068
- readonly limit?: string | undefined;
1069
- }) => Effect.Effect<{
841
+ export declare const getSessionOutputOp: (sessionId: string, query: GetSessionOutputQuery) => Effect.Effect<{
1070
842
  readonly sessionId: string;
1071
843
  readonly chunks: readonly {
1072
844
  readonly sequence: string;
@@ -1075,28 +847,16 @@ export declare const getSessionOutputOp: (sessionId: string, query: {
1075
847
  readonly nextFrom: string;
1076
848
  readonly status: "exited" | "failed" | "running" | "starting";
1077
849
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1078
- export declare const sendSessionInputOp: (sessionId: string, payload: {
1079
- readonly ownerUserId?: string | undefined;
1080
- readonly dataBase64: string;
1081
- }) => Effect.Effect<{
850
+ export declare const sendSessionInputOp: (sessionId: string, payload: SessionInputRequest) => Effect.Effect<{
1082
851
  readonly ok: boolean;
1083
852
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadGatewayError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionConflictError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1084
- export declare const resizeSessionOp: (sessionId: string, payload: {
1085
- readonly ownerUserId?: string | undefined;
1086
- readonly cols: number;
1087
- readonly rows: number;
1088
- }) => Effect.Effect<{
853
+ export declare const resizeSessionOp: (sessionId: string, payload: SessionResizeRequest) => Effect.Effect<{
1089
854
  readonly ok: boolean;
1090
855
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadGatewayError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionConflictError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1091
- export declare const signalSessionOp: (sessionId: string, payload: {
1092
- readonly ownerUserId?: string | undefined;
1093
- readonly signal: number;
1094
- }) => Effect.Effect<{
856
+ export declare const signalSessionOp: (sessionId: string, payload: SessionSignalRequest) => Effect.Effect<{
1095
857
  readonly ok: boolean;
1096
858
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadGatewayError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionConflictError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1097
- export declare const closeSessionOp: (sessionId: string, payload: {
1098
- readonly ownerUserId?: string | undefined;
1099
- }) => Effect.Effect<{
859
+ export declare const closeSessionOp: (sessionId: string, payload: CloseSessionRequest) => Effect.Effect<{
1100
860
  readonly sessionId: string;
1101
861
  readonly workspaceId: string;
1102
862
  readonly runId: string;
@@ -1119,13 +879,7 @@ export declare const closeSessionOp: (sessionId: string, payload: {
1119
879
  readonly createdAt: string;
1120
880
  readonly endedAt?: string | undefined;
1121
881
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SessionBadGatewayError | import("@sealant/api-contracts").SessionBadRequestError | import("@sealant/api-contracts").SessionForbiddenError | import("@sealant/api-contracts").SessionInternalServerError | import("@sealant/api-contracts").SessionNotFoundError | import("@sealant/api-contracts").SessionUnauthorizedError, SealantApiClient>;
1122
- export declare const createAccessTokenOp: (payload: {
1123
- readonly ownerUserId: string;
1124
- readonly scopes: readonly ("session:input" | "session:read" | "workspace:exec")[];
1125
- readonly name?: string | undefined;
1126
- readonly workspaceId?: string | undefined;
1127
- readonly ttlSeconds?: number | undefined;
1128
- }) => Effect.Effect<{
882
+ export declare const createAccessTokenOp: (payload: CreateAccessTokenRequest) => Effect.Effect<{
1129
883
  readonly tokenId: string;
1130
884
  readonly ownerUserId: string;
1131
885
  readonly name?: string | undefined;
@@ -1136,22 +890,14 @@ export declare const createAccessTokenOp: (payload: {
1136
890
  readonly createdAt: string;
1137
891
  readonly token: string;
1138
892
  }, import("@sealant/api-contracts").AccessTokenBadRequestError | import("@sealant/api-contracts").AccessTokenInternalServerError | import("@sealant/api-contracts").AccessTokenNotFoundError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError, SealantApiClient>;
1139
- export declare const ensureUserOp: (payload: {
1140
- readonly email: string;
1141
- readonly name: string;
1142
- readonly userId?: string | undefined;
1143
- }) => Effect.Effect<{
893
+ export declare const ensureUserOp: (payload: EnsureUserRequest) => Effect.Effect<{
1144
894
  readonly userId: string;
1145
895
  readonly email: string;
1146
896
  readonly name: string;
1147
897
  readonly createdAt: string;
1148
898
  readonly created: boolean;
1149
899
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").UserBadRequestError | import("@sealant/api-contracts").UserInternalServerError, SealantApiClient>;
1150
- export declare const bindUserPersonOp: (userId: string, payload: {
1151
- readonly id: string;
1152
- readonly uid: number;
1153
- readonly home: string;
1154
- }) => Effect.Effect<{
900
+ export declare const bindUserPersonOp: (userId: string, payload: PersonBindingWire) => Effect.Effect<{
1155
901
  readonly userId: string;
1156
902
  readonly person: {
1157
903
  readonly id: string;
@@ -1198,15 +944,7 @@ export declare const listConnectedAccountsOp: (ownerUserId: string) => Effect.Ef
1198
944
  }[];
1199
945
  readonly hasApiKeyHistory?: boolean | undefined;
1200
946
  }, import("@sealant/api-contracts").ConnectedAccountInternalServerError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError, SealantApiClient>;
1201
- export declare const createConnectedAccountOp: (payload: {
1202
- readonly ownerUserId: string;
1203
- readonly provider: "claude" | "codex" | "github";
1204
- readonly name?: string | undefined;
1205
- readonly accountId?: string | undefined;
1206
- readonly makeDefault?: boolean | undefined;
1207
- readonly login?: "api-key" | "subscription" | undefined;
1208
- readonly secret: string;
1209
- }) => Effect.Effect<{
947
+ export declare const createConnectedAccountOp: (payload: CreateConnectedAccountRequest) => Effect.Effect<{
1210
948
  readonly connectedAccountId: string;
1211
949
  readonly ownerUserId: string;
1212
950
  readonly provider: "claude" | "codex" | "github";
@@ -1264,10 +1002,7 @@ export declare const archiveConnectedAccountOp: (connectedAccountId: string, own
1264
1002
  readonly suffix: string;
1265
1003
  } | undefined;
1266
1004
  }, import("@sealant/api-contracts").ConnectedAccountInternalServerError | import("@sealant/api-contracts").ConnectedAccountNotFoundError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError, SealantApiClient>;
1267
- export declare const setConnectedAccountDefaultOp: (provider: "claude" | "codex" | "github", payload: {
1268
- readonly ownerUserId: string;
1269
- readonly connectedAccountId: string;
1270
- }) => Effect.Effect<{
1005
+ export declare const setConnectedAccountDefaultOp: (provider: ConnectedAccountProvider, payload: SetConnectedAccountDefaultRequest) => Effect.Effect<{
1271
1006
  readonly connectedAccountId: string;
1272
1007
  readonly ownerUserId: string;
1273
1008
  readonly provider: "claude" | "codex" | "github";
@@ -1296,10 +1031,7 @@ export declare const setConnectedAccountDefaultOp: (provider: "claude" | "codex"
1296
1031
  readonly suffix: string;
1297
1032
  } | undefined;
1298
1033
  }, import("@sealant/api-contracts").ConnectedAccountConflictError | import("@sealant/api-contracts").ConnectedAccountInternalServerError | import("@sealant/api-contracts").ConnectedAccountNotFoundError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError, SealantApiClient>;
1299
- export declare const markConnectedAccountInvalidOp: (connectedAccountId: string, payload: {
1300
- readonly ownerUserId: string;
1301
- readonly revision?: number | undefined;
1302
- }) => Effect.Effect<{
1034
+ export declare const markConnectedAccountInvalidOp: (connectedAccountId: string, payload: MarkConnectedAccountInvalidRequest) => Effect.Effect<{
1303
1035
  readonly connectedAccountId: string;
1304
1036
  readonly ownerUserId: string;
1305
1037
  readonly provider: "claude" | "codex" | "github";
@@ -1329,33 +1061,7 @@ export declare const markConnectedAccountInvalidOp: (connectedAccountId: string,
1329
1061
  } | undefined;
1330
1062
  readonly outcome?: "marked" | "superseded" | undefined;
1331
1063
  }, import("@sealant/api-contracts").ConnectedAccountInternalServerError | import("@sealant/api-contracts").ConnectedAccountNotFoundError | import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError, SealantApiClient>;
1332
- export declare const inferenceRespondOp: (payload: {
1333
- readonly ownerUserId: string;
1334
- readonly credentials?: {
1335
- readonly profileId?: string | undefined;
1336
- readonly claude?: string | undefined;
1337
- readonly codex?: string | undefined;
1338
- } | undefined;
1339
- readonly prompt?: string | undefined;
1340
- readonly system?: string | undefined;
1341
- readonly model?: string | undefined;
1342
- readonly maxTurns?: number | undefined;
1343
- readonly tools?: readonly {
1344
- readonly name: string;
1345
- readonly description?: string | undefined;
1346
- readonly inputSchema: unknown;
1347
- }[] | undefined;
1348
- readonly responseFormat?: {
1349
- readonly type: "json";
1350
- readonly schema?: unknown;
1351
- } | undefined;
1352
- readonly sessionId?: string | undefined;
1353
- readonly toolResults?: readonly {
1354
- readonly toolCallId: string;
1355
- readonly content: string;
1356
- readonly isError?: boolean | undefined;
1357
- }[] | undefined;
1358
- }) => Effect.Effect<{
1064
+ export declare const inferenceRespondOp: (payload: InferenceRespondRequest) => Effect.Effect<{
1359
1065
  readonly sessionId: string;
1360
1066
  readonly turn: {
1361
1067
  readonly type: "text";
@@ -1404,11 +1110,7 @@ export declare const getSetupStateOp: () => Effect.Effect<{
1404
1110
  readonly usernamePrefix: string;
1405
1111
  } | null;
1406
1112
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SystemInternalServerError, SealantApiClient>;
1407
- export declare const createSshKeyOp: (payload: {
1408
- readonly ownerUserId: string;
1409
- readonly name?: string | undefined;
1410
- readonly publicKey: string;
1411
- }) => Effect.Effect<{
1113
+ export declare const createSshKeyOp: (payload: CreateSshKeyRequest) => Effect.Effect<{
1412
1114
  readonly sshKeyId: string;
1413
1115
  readonly ownerUserId: string;
1414
1116
  readonly name: string;
@@ -1434,11 +1136,7 @@ export declare const archiveSshKeyOp: (sshKeyId: string, ownerUserId: string) =>
1434
1136
  readonly fingerprint: string;
1435
1137
  readonly createdAt: string;
1436
1138
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("effect/Schema").SchemaError | import("@sealant/api-contracts").SshKeyInternalServerError | import("@sealant/api-contracts").SshKeyNotFoundError, SealantApiClient>;
1437
- export declare const ensureResourceDomainOp: (key: string, budget?: {
1438
- readonly cpuMillicores: number;
1439
- readonly memoryBytes: number;
1440
- readonly storageBytes: number;
1441
- } | undefined) => Effect.Effect<{
1139
+ export declare const ensureResourceDomainOp: (key: string, budget?: ResourceDomainBudgetLimits) => Effect.Effect<{
1442
1140
  readonly resourceDomainId: string;
1443
1141
  readonly key: string;
1444
1142
  readonly createdAt: string;
@@ -1449,17 +1147,13 @@ export declare const getResourceDomainOp: (resourceDomainId: string) => Effect.E
1449
1147
  readonly key: string;
1450
1148
  readonly createdAt: string;
1451
1149
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").ResourceDomainForbiddenError | import("@sealant/api-contracts").ResourceDomainInternalServerError | import("@sealant/api-contracts").ResourceDomainNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
1452
- export declare const grantResourceDomainMemberOp: (resourceDomainId: string, userId: string, payload: {
1453
- readonly version: number;
1454
- }) => Effect.Effect<{
1150
+ export declare const grantResourceDomainMemberOp: (resourceDomainId: string, userId: string, payload: ResourceDomainMemberDecisionRequest) => Effect.Effect<{
1455
1151
  readonly userId: string;
1456
1152
  readonly state: "member" | "revoked";
1457
1153
  readonly version: number;
1458
1154
  readonly updatedAt: string;
1459
1155
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").ResourceDomainForbiddenError | import("@sealant/api-contracts").ResourceDomainInternalServerError | import("@sealant/api-contracts").ResourceDomainMemberVersionConflictError | import("@sealant/api-contracts").ResourceDomainNotFoundError | import("@sealant/api-contracts").ResourceDomainPersonNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
1460
- export declare const revokeResourceDomainMemberOp: (resourceDomainId: string, userId: string, payload: {
1461
- readonly version: number;
1462
- }) => Effect.Effect<{
1156
+ export declare const revokeResourceDomainMemberOp: (resourceDomainId: string, userId: string, payload: ResourceDomainMemberDecisionRequest) => Effect.Effect<{
1463
1157
  readonly userId: string;
1464
1158
  readonly state: "member" | "revoked";
1465
1159
  readonly version: number;
@@ -1471,10 +1165,7 @@ export declare const getResourceDomainMemberOp: (resourceDomainId: string, userI
1471
1165
  readonly version: number;
1472
1166
  readonly updatedAt: string;
1473
1167
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").ResourceDomainForbiddenError | import("@sealant/api-contracts").ResourceDomainInternalServerError | import("@sealant/api-contracts").ResourceDomainMemberNotFoundError | import("@sealant/api-contracts").ResourceDomainNotFoundError | import("@sealant/api-contracts").ResourceDomainPersonNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
1474
- export declare const listResourceDomainMembersOp: (resourceDomainId: string, query: {
1475
- readonly limit?: number | undefined;
1476
- readonly cursor?: string | undefined;
1477
- }) => Effect.Effect<{
1168
+ export declare const listResourceDomainMembersOp: (resourceDomainId: string, query: ListResourceDomainMembersQuery) => Effect.Effect<{
1478
1169
  readonly items: readonly {
1479
1170
  readonly userId: string;
1480
1171
  readonly state: "member" | "revoked";
@@ -1506,12 +1197,7 @@ export declare const getResourceDomainBudgetOp: (resourceDomainId: string) => Ef
1506
1197
  readonly warning: "80-percent" | "95-percent" | "full" | "none";
1507
1198
  };
1508
1199
  }, import("effect/http/HttpClientError").HttpClientError | import("@sealant/api-contracts").RequestRefusedError | import("@sealant/api-contracts").ResourceDomainForbiddenError | import("@sealant/api-contracts").ResourceDomainInternalServerError | import("@sealant/api-contracts").ResourceDomainNotFoundError | import("effect/Schema").SchemaError, SealantApiClient>;
1509
- export declare const setResourceDomainBudgetOp: (resourceDomainId: string, payload: {
1510
- readonly revision: number;
1511
- readonly cpuMillicores: number;
1512
- readonly memoryBytes: number;
1513
- readonly storageBytes: number;
1514
- }) => Effect.Effect<{
1200
+ export declare const setResourceDomainBudgetOp: (resourceDomainId: string, payload: SetResourceDomainBudgetRequest) => Effect.Effect<{
1515
1201
  readonly revision: number;
1516
1202
  readonly storageBytes: {
1517
1203
  readonly limit: number;
@@ -1,7 +1,3 @@
1
+ import { type ForwardBinding } from "@sealant/api-contracts";
1
2
  import type { BoundedWorkspaceForward } from "../types.js";
2
- export declare const boundedForward: (ws: WebSocket, binding: {
3
- readonly kind: "port";
4
- } | {
5
- readonly kind: "session";
6
- readonly session: string;
7
- }, onWindowOpen: () => void) => BoundedWorkspaceForward;
3
+ export declare const boundedForward: (ws: WebSocket, binding: ForwardBinding, onWindowOpen: () => void) => BoundedWorkspaceForward;
@@ -4,6 +4,6 @@ export interface ForwardEndpoint {
4
4
  readonly apiKey: string | undefined;
5
5
  readonly ownerUserId: string;
6
6
  }
7
- export declare const openForward: (endpoint: ForwardEndpoint, workspaceId: string, port: number, options?: WorkspaceForwardOptions | undefined) => Promise<WorkspaceForward>;
7
+ export declare const openForward: (endpoint: ForwardEndpoint, workspaceId: string, port: number, options?: WorkspaceForwardOptions) => Promise<WorkspaceForward>;
8
8
  export type ForwardV2Options = BoundedForwardTarget & Pick<BoundedWorkspaceForwardOptions, "signal" | "deadlineMs">;
9
- export declare const openForwardV2: (endpoint: ForwardEndpoint, workspaceId: string, port: number, options?: ForwardV2Options | undefined) => Promise<BoundedWorkspaceForward>;
9
+ export declare const openForwardV2: (endpoint: ForwardEndpoint, workspaceId: string, port: number, options?: ForwardV2Options) => Promise<BoundedWorkspaceForward>;
@@ -1,3 +1,11 @@
1
+ /**
2
+ * The `RunRecord` facade — the execution record as the SDK exposes it. Backed by the run/record
3
+ * contract endpoints (`client.runs.*`), it maps the wire shapes to the public types: decimal-string
4
+ * sequences become `bigint`, base64 scrollback becomes `Uint8Array`. `replay()`/`timeline()`/
5
+ * `scrollback()`/`loss()`/`summary()`/`stream()` are live; the time-travel folds are typed but
6
+ * reject until their read models land (Phase 1).
7
+ */
8
+ import { type TimelineEntry as WireTimelineEntry } from "@sealant/api-contracts";
1
9
  import type { RunCommand, RunRecord, TimelineEntry } from "../types.js";
2
10
  import type { SdkContext } from "./context.js";
3
11
  /**
@@ -5,32 +13,12 @@ import type { SdkContext } from "./context.js";
5
13
  * `(kind, ref)` into typed `data`, degrading to the `unknown` case (raw kind + payload preserved)
6
14
  * for kinds newer than this SDK or payloads that fail their schema. Exported for tests.
7
15
  */
8
- export declare const toTimelineEntry: (wire: {
9
- readonly eventId: string;
10
- readonly sequence: string;
11
- readonly kind: string;
12
- readonly occurredAt: string;
13
- readonly summary: string;
14
- readonly ref?: unknown;
15
- readonly processId?: string | undefined;
16
- readonly captureMethod: number;
17
- readonly confidence: number;
18
- }) => TimelineEntry;
16
+ export declare const toTimelineEntry: (wire: WireTimelineEntry) => TimelineEntry;
19
17
  /**
20
18
  * Folds the timeline into the ordered list of terminal commands. Process boundaries are
21
19
  * `processStarted`/`processExited`; `ioChunk` byte counts accrue to the current command. Daemon noise
22
20
  * (`runtimeStateChanged`, and the boot foreground we never `processStarted`) is skipped naturally.
23
21
  */
24
- export declare const reconstructCommands: (entries: readonly {
25
- readonly eventId: string;
26
- readonly sequence: string;
27
- readonly kind: string;
28
- readonly occurredAt: string;
29
- readonly summary: string;
30
- readonly ref?: unknown;
31
- readonly processId?: string | undefined;
32
- readonly captureMethod: number;
33
- readonly confidence: number;
34
- }[]) => RunCommand[];
22
+ export declare const reconstructCommands: (entries: readonly WireTimelineEntry[]) => RunCommand[];
35
23
  export declare const renderTranscript: (commands: readonly RunCommand[]) => string;
36
24
  export declare const makeRunRecord: (ctx: SdkContext, runId: string) => RunRecord;
@@ -7,7 +7,7 @@
7
7
  * `artifacts` is empty until the artifact store is exposed; `record` reads via the run/record
8
8
  * endpoints.
9
9
  */
10
- import type { Run as WireRun } from "@sealant/api-contracts";
10
+ import type { Run as WireRun, RunChangesResponse } from "@sealant/api-contracts";
11
11
  import type { Run, RunFileChange } from "../types.js";
12
12
  import type { SdkContext } from "./context.js";
13
13
  export interface RunChangesData {
@@ -21,14 +21,5 @@ export interface RunInit {
21
21
  readonly changes?: RunChangesData;
22
22
  }
23
23
  /** Maps the wire changes shape to the facade data (shared with the run-harness execution path). */
24
- export declare const toRunChangesData: (wire: {
25
- readonly files: readonly {
26
- readonly path: string;
27
- readonly change: "added" | "deleted" | "modified" | "renamed";
28
- readonly oldPath?: string | undefined;
29
- }[];
30
- readonly diff: string;
31
- readonly available?: boolean | undefined;
32
- readonly unavailableReason?: string | undefined;
33
- }) => RunChangesData;
24
+ export declare const toRunChangesData: (wire: RunChangesResponse) => RunChangesData;
34
25
  export declare const makeRun: (ctx: SdkContext, init: RunInit) => Run;
@@ -1,25 +1,14 @@
1
+ /**
2
+ * The `InteractiveSession` facade — a durable PTY session as the SDK exposes it.
3
+ *
4
+ * Sessions are platform resources: the PTY lives daemon-side and every verb here is a plain HTTP
5
+ * call, so a handle can be dropped, the process restarted, and the session re-fetched by id from
6
+ * any workspace handle. `output()` is the resumable read: it streams the session's RECORDED output
7
+ * (byte-exact, redacted, sequence-keyed) over the SSE endpoint, falling back to polling the range
8
+ * endpoint if the SSE transport is unavailable. The SSE `id` is the durable telemetry sequence, so
9
+ * `from: lastChunk.sequence + 1n` resumes with no gap after any disconnect.
10
+ */
11
+ import type { SessionWire } from "@sealant/api-contracts";
1
12
  import type { InteractiveSession } from "../types.js";
2
13
  import type { SdkContext } from "./context.js";
3
- export declare const makeInteractiveSession: (ctx: SdkContext, wire: {
4
- readonly sessionId: string;
5
- readonly workspaceId: string;
6
- readonly runId: string;
7
- readonly ownerUserId: string;
8
- readonly status: "exited" | "failed" | "running" | "starting";
9
- readonly argv: readonly string[];
10
- readonly argCount?: number | undefined;
11
- readonly argLengths?: readonly number[] | undefined;
12
- readonly cwd?: string | undefined;
13
- readonly cols: number;
14
- readonly rows: number;
15
- readonly mode?: "pipe" | "pty" | undefined;
16
- readonly exitCode?: number | undefined;
17
- readonly exitSignal?: number | undefined;
18
- readonly errorMessage?: string | undefined;
19
- readonly metadata?: {
20
- readonly [x: string]: unknown;
21
- } | undefined;
22
- readonly outputHighWater: string;
23
- readonly createdAt: string;
24
- readonly endedAt?: string | undefined;
25
- }) => InteractiveSession;
14
+ export declare const makeInteractiveSession: (ctx: SdkContext, wire: SessionWire) => InteractiveSession;
@@ -1,3 +1,10 @@
1
+ /**
2
+ * The `Workspace` facade — a live, disposable environment as the SDK exposes it. `status()`/`ready()`/
3
+ * `events()` poll the control-plane workspace endpoint; `harness.run()`/`harness.start()` are the
4
+ * server-side execution paths (filled in by the run-execution module). `harness.session()` and the
5
+ * lifecycle verbs are typed now and reject until their endpoints land (Phase 3).
6
+ */
7
+ import type { WorkspaceRuntime as WireWorkspaceRuntime, WorkspaceDetails as WireWorkspaceDetails } from "@sealant/api-contracts";
1
8
  import type { Harness, Workspace, WorkspaceLaunch, WorkspaceRuntimeInfo, WorkspaceImage, WorkspacePhase, WorkspaceStatus } from "../types.js";
2
9
  import type { SdkContext } from "./context.js";
3
10
  export interface WorkspaceInit {
@@ -18,16 +25,7 @@ export interface WorkspaceInit {
18
25
  readonly imageBuildTimeoutMs?: number;
19
26
  }
20
27
  /** The wire runtime as the SDK reports it. */
21
- export declare const toRuntimeInfo: (runtime: {
22
- readonly adapter: "cloudflare" | "docker" | "k3s" | "k8s" | "microvm";
23
- readonly resourceId: string;
24
- readonly reference: string;
25
- readonly status: "failed" | "pending" | "ready" | "retained" | "running" | "stopped";
26
- readonly endpoint?: string | undefined;
27
- readonly deadline?: string | null | undefined;
28
- readonly runId?: string | undefined;
29
- readonly launchId?: string | undefined;
30
- }) => WorkspaceRuntimeInfo;
28
+ export declare const toRuntimeInfo: (runtime: WireWorkspaceRuntime) => WorkspaceRuntimeInfo;
31
29
  /** `ready()`'s default readiness bound: the launch outside an image build (queued, booting). */
32
30
  export declare const READY_TIMEOUT_MS: number;
33
31
  /**
@@ -52,31 +50,15 @@ export interface HarnessExecutors {
52
50
  readonly start: RunHarnessFn;
53
51
  }
54
52
  export declare const registerHarnessExecutors: (executors: HarnessExecutors) => void;
53
+ /** The wire's launch phase. */
54
+ type WirePhase = NonNullable<WireWorkspaceDetails["phase"]>;
55
+ /** The wire's published image. */
56
+ type WirePublishedImage = NonNullable<WireWorkspaceDetails["publishedImage"]>;
55
57
  /** Wire → public launch phase. */
56
- export declare const toWorkspacePhase: (phase: {
57
- readonly name: "boot" | "image-build" | "queued";
58
- readonly since?: string | undefined;
59
- readonly imageBuild?: {
60
- readonly step?: number | undefined;
61
- readonly steps?: number | undefined;
62
- readonly stepName?: string | undefined;
63
- readonly progressAt: string;
64
- readonly stallTimeoutMs?: number | undefined;
65
- } | undefined;
66
- }) => WorkspacePhase;
58
+ export declare const toWorkspacePhase: (phase: WirePhase) => WorkspacePhase;
67
59
  /** `Building the workspace image (step 2/12: RUN apt-get …)`, `Booting the workspace`. */
68
60
  export declare const describeWorkspacePhase: (phase: WorkspacePhase) => string;
69
61
  /** Wire → public published image. */
70
- export declare const toWorkspaceImage: (image: {
71
- readonly reference: string;
72
- readonly digestReference: string;
73
- readonly digest: string;
74
- readonly personLayout?: {
75
- readonly status: "supported" | "unknown" | "unsupported";
76
- readonly missing: readonly string[];
77
- readonly unknown: readonly string[];
78
- readonly runtime: string;
79
- readonly acl: "supported" | "unknown" | "unsupported";
80
- } | undefined;
81
- }) => WorkspaceImage;
62
+ export declare const toWorkspaceImage: (image: WirePublishedImage) => WorkspaceImage;
82
63
  export declare const makeWorkspace: (ctx: SdkContext, init: WorkspaceInit) => Workspace;
64
+ export {};
package/dist/harness.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare const codex: () => Harness;
16
16
  /** Anthropic Claude Code. */
17
17
  export declare const claudeCode: (options?: {
18
18
  readonly profile?: string;
19
- } | undefined) => Harness;
19
+ }) => Harness;
20
20
  /** pi, the coding agent from earendil-works/pi. */
21
21
  export declare const pi: () => Harness;
22
22
  /**
@@ -1,39 +1,7 @@
1
+ import { type CreateWorkspaceRequest } from "@sealant/api-contracts";
1
2
  import type { CreateOptions } from "../types.js";
2
3
  import type { SealantInternalConfig } from "./config.js";
3
4
  export declare const toGitUrl: (repository: string) => string;
4
5
  export declare const buildCreateWorkspaceRequest: (options: CreateOptions, config: SealantInternalConfig) => {
5
- readonly payload: {
6
- readonly ownerUserId: string;
7
- readonly registryId: string;
8
- readonly repository: string;
9
- readonly tag: string;
10
- readonly name?: string | undefined;
11
- readonly sourceSelection?: {
12
- readonly provider: "github";
13
- readonly installationId: string;
14
- readonly installationRepositoryId: string;
15
- readonly ref?: string | undefined;
16
- } | undefined;
17
- readonly dotfilesSelection?: {
18
- readonly provider: "github";
19
- readonly installationId: string;
20
- readonly installationRepositoryId: string;
21
- readonly ref?: string | undefined;
22
- } | undefined;
23
- readonly credentials?: {
24
- readonly profileId?: string | undefined;
25
- readonly claude?: string | undefined;
26
- readonly codex?: string | undefined;
27
- readonly github?: string | undefined;
28
- } | undefined;
29
- readonly spec: unknown;
30
- readonly secretEnv?: {
31
- readonly [x: string]: string;
32
- } | undefined;
33
- readonly captureToken?: string | undefined;
34
- readonly ttlSeconds?: number | undefined;
35
- readonly idempotencyKey?: string | undefined;
36
- readonly launchId?: string | undefined;
37
- readonly sshAsOwner?: boolean | undefined;
38
- };
6
+ readonly payload: CreateWorkspaceRequest;
39
7
  };
@@ -14,7 +14,7 @@ export interface WorkspaceCredentialsPayload {
14
14
  readonly codex?: string;
15
15
  readonly github?: string;
16
16
  }
17
- export declare const mapAccountRef: (value: string | boolean | undefined) => string | undefined;
17
+ export declare const mapAccountRef: (value: boolean | string | undefined) => string | undefined;
18
18
  /**
19
19
  * Maps `WorkspaceCredentialsOptions` to the API payload shape, or `undefined` when no credentials were
20
20
  * requested (omitted entirely, rather than serialized as an empty object).
@@ -1,28 +1,13 @@
1
+ /**
2
+ * What the control plane says it can do (its index, `features`), read once per client and kept a
3
+ * few minutes, so a client feature-detects instead of reading a version (a self-built control
4
+ * plane reports `0.0.0`). A control plane from before a feature does not name it: `false`.
5
+ */
6
+ import type { SystemIndexResponse } from "@sealant/api-contracts";
1
7
  import type { SdkContext } from "../facade/context.js";
2
8
  import type { SealantFeatures } from "../types.js";
3
9
  /** The index's `features` as the SDK reports them: every flag named, absent ones `false`. */
4
- export declare const toFeatures: (index: {
5
- readonly name: string;
6
- readonly version: string;
7
- readonly docsPath: string;
8
- readonly openApiPath: string;
9
- readonly features?: {
10
- readonly processUser: boolean;
11
- readonly processUserRoutes?: boolean | undefined;
12
- readonly dotfilesApply?: boolean | undefined;
13
- readonly credentialsPartialPut?: boolean | undefined;
14
- readonly credentialsPiOpencode?: boolean | undefined;
15
- readonly captureOwnerMap?: boolean | undefined;
16
- readonly workspaceSshUser?: boolean | undefined;
17
- readonly personBinding?: boolean | undefined;
18
- readonly sshKeyRemovalEndsConnections?: boolean | undefined;
19
- readonly connectedAccountDefaults?: boolean | undefined;
20
- readonly connectedAccountLoginClass?: boolean | undefined;
21
- readonly kubernetesPersonLayout?: boolean | undefined;
22
- readonly credentialPlacements?: boolean | undefined;
23
- readonly connectedAccountApiKeys?: boolean | undefined;
24
- } | undefined;
25
- }) => SealantFeatures;
10
+ export declare const toFeatures: (index: SystemIndexResponse) => SealantFeatures;
26
11
  /**
27
12
  * The control plane's features, from this client's kept answer or a fresh read. Rejects when the
28
13
  * index could not be read; the failure is kept briefly, then the index is asked again.
@@ -1,47 +1,12 @@
1
+ /**
2
+ * Lowers the public inference options onto the control-plane's `/v1/inference/respond` payload and
3
+ * maps the wire response back onto the public types. Pure and side-effect free — unit-testable on
4
+ * its own; the client calls these around `inferenceRespondOp`.
5
+ *
6
+ * SECURITY: only account **references** cross here;
7
+ * token material never appears on either side of this mapping.
8
+ */
9
+ import type { InferenceRespondRequest, InferenceRespondResponse } from "@sealant/api-contracts";
1
10
  import type { InferenceContinueOptions, InferenceRespondOptions, InferenceResponse } from "../types.js";
2
- export declare const buildInferenceRespondRequest: (options: InferenceContinueOptions | InferenceRespondOptions, ownerUserId: string) => {
3
- readonly ownerUserId: string;
4
- readonly credentials?: {
5
- readonly profileId?: string | undefined;
6
- readonly claude?: string | undefined;
7
- readonly codex?: string | undefined;
8
- } | undefined;
9
- readonly prompt?: string | undefined;
10
- readonly system?: string | undefined;
11
- readonly model?: string | undefined;
12
- readonly maxTurns?: number | undefined;
13
- readonly tools?: readonly {
14
- readonly name: string;
15
- readonly description?: string | undefined;
16
- readonly inputSchema: unknown;
17
- }[] | undefined;
18
- readonly responseFormat?: {
19
- readonly type: "json";
20
- readonly schema?: unknown;
21
- } | undefined;
22
- readonly sessionId?: string | undefined;
23
- readonly toolResults?: readonly {
24
- readonly toolCallId: string;
25
- readonly content: string;
26
- readonly isError?: boolean | undefined;
27
- }[] | undefined;
28
- };
29
- export declare const mapInferenceResponse: (wire: {
30
- readonly sessionId: string;
31
- readonly turn: {
32
- readonly type: "text";
33
- readonly text: string;
34
- readonly json?: unknown;
35
- } | {
36
- readonly type: "toolCalls";
37
- readonly calls: readonly {
38
- readonly toolCallId: string;
39
- readonly name: string;
40
- readonly input: unknown;
41
- }[];
42
- };
43
- readonly usage?: {
44
- readonly inputTokens: number;
45
- readonly outputTokens: number;
46
- } | undefined;
47
- }) => InferenceResponse;
11
+ export declare const buildInferenceRespondRequest: (options: InferenceRespondOptions | InferenceContinueOptions, ownerUserId: string) => InferenceRespondRequest;
12
+ export declare const mapInferenceResponse: (wire: InferenceRespondResponse) => InferenceResponse;
@@ -1,17 +1,5 @@
1
+ /** Wire → public mapping for the workspace-SSH surface (gateway coordinates and SSH keys). */
2
+ import type { SetupStateResponse, SshKeySummary } from "@sealant/api-contracts";
1
3
  import type { SshKey, WorkspaceSshInfo } from "../types.js";
2
- export declare const mapWorkspaceSshInfo: (wire: {
3
- readonly needsSetup: boolean;
4
- readonly sshGateway: {
5
- readonly host: string;
6
- readonly port: number;
7
- readonly usernamePrefix: string;
8
- } | null;
9
- }) => WorkspaceSshInfo | null;
10
- export declare const mapSshKey: (wire: {
11
- readonly sshKeyId: string;
12
- readonly ownerUserId: string;
13
- readonly name: string;
14
- readonly algorithm: string;
15
- readonly fingerprint: string;
16
- readonly createdAt: string;
17
- }) => SshKey;
4
+ export declare const mapWorkspaceSshInfo: (wire: SetupStateResponse) => WorkspaceSshInfo | null;
5
+ export declare const mapSshKey: (wire: SshKeySummary) => SshKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/sdk-next",
3
- "version": "0.40.0-next.772",
3
+ "version": "0.40.0-next.774",
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.772"
29
+ "@sealant/api-contracts": "npm:@sealant/api-contracts-next@0.40.0-next.774"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "effect": "^4.0.5"
33
33
  },
34
- "gitHead": "722ef7c7d08581db5c9c4de770d5630329063a97",
34
+ "gitHead": "343ccbc0c9ce40194a64f7fedc586cad3f54c4cb",
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  }