@sealant/api-contracts-next 0.40.0-next.935 → 0.40.0-next.937

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.
@@ -1,6 +1,8 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import { BudgetExceededError } from "./budgets.js";
4
+ /** A control scope a create names (`controlScopeProblem`'s rules: one segment, not `sealant…`). */
5
+ export declare const controlScopeSchema: Schema.String;
4
6
  /**
5
7
  * `retained`: the workspace's executor ended (or its capture launch failed after it started)
6
8
  * with work on its disk not confirmed saved. It is kept, not dead: the control plane drains or
@@ -89,6 +91,14 @@ export declare const workspaceRuntimeSchema: Schema.Struct<{
89
91
  readonly runId: Schema.optional<Schema.String>;
90
92
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
91
93
  readonly launchId: Schema.optional<Schema.String>;
94
+ /**
95
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
96
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
97
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
98
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
99
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
100
+ */
101
+ readonly controlScope: Schema.optional<Schema.String>;
92
102
  }>;
93
103
  export type WorkspaceRuntime = typeof workspaceRuntimeSchema.Type;
94
104
  export declare const workspaceSshTargetSchema: Schema.Struct<{
@@ -344,6 +354,19 @@ export declare const createWorkspaceRequestSchema: Schema.Struct<{
344
354
  * completion attestation that names a launch must name this one.
345
355
  */
346
356
  readonly launchId: Schema.optional<Schema.String>;
357
+ /**
358
+ * The control scope of the ONE executor this create launches: the subdirectory of the
359
+ * deployment's control root it mounts at `/run/sealant` (`control-scope.ts`). A caller that
360
+ * serves the executor's `capture.sock` and `session.sock` names it so it can bind both there
361
+ * BEFORE the create, and so before sealantd dials them. One path segment of lowercase letters,
362
+ * digits, `_`, `.` and `-`, never starting with `sealant` (sealant's own directories there do).
363
+ * Recorded on the launch attempt and unique for all time: a create naming a scope any executor
364
+ * has held is refused (`409`, code `control-scope-taken`), first come, first served, so mint it
365
+ * unguessable (from the launch id). Kept by the executor's recovery; a restart is a new
366
+ * executor, in its container name's scope. Refused on a runtime with no control directory.
367
+ * Omitted: the executor's container name, reported as `runtime.controlScope`.
368
+ */
369
+ readonly controlScope: Schema.optional<Schema.String>;
347
370
  /**
348
371
  * The SSH gateway runs this workspace's SSH sessions as its owner's own Linux user: the person
349
372
  * the owner is bound to (`POST /v1/users/:id/person`). The create must carry a capture owner map
@@ -764,6 +787,11 @@ export declare const workspaceCaptureReplannedSchema: Schema.Struct<{
764
787
  readonly bytesSkipped: Schema.Number;
765
788
  readonly removed: Schema.Number;
766
789
  readonly unchanged: Schema.Boolean;
790
+ /**
791
+ * The claimed executor's control scope (`runtime.controlScope`), when its runtime has one: the
792
+ * subdirectory a caller claiming a standby serves its `capture.sock` and `session.sock` in.
793
+ */
794
+ readonly controlScope: Schema.optional<Schema.String>;
767
795
  }>;
768
796
  export type WorkspaceCaptureReplanned = typeof workspaceCaptureReplannedSchema.Type;
769
797
  export declare const renameWorkspaceRequestSchema: Schema.Struct<{
@@ -874,6 +902,12 @@ export declare const recoverWorkspaceResponseSchema: Schema.Struct<{
874
902
  readonly workspaceId: Schema.String;
875
903
  readonly state: Schema.Literals<readonly ["requested", "not-retained"]>;
876
904
  readonly recoverable: Schema.optional<Schema.Boolean>;
905
+ /**
906
+ * The retained executor's control scope (`runtime.controlScope`), when its runtime has one: a
907
+ * recovery boot dials only `capture.sock` there, so the caller binds that (and no
908
+ * `session.sock`) before the recovery runs.
909
+ */
910
+ readonly controlScope: Schema.optional<Schema.String>;
877
911
  }>;
878
912
  export type RecoverWorkspaceResponse = typeof recoverWorkspaceResponseSchema.Type;
879
913
  export declare const restartWorkspaceRequestSchema: Schema.Struct<{
@@ -1830,11 +1864,21 @@ export declare const createWorkspaceResponseSchema: Schema.Struct<{
1830
1864
  readonly runId: Schema.optional<Schema.String>;
1831
1865
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
1832
1866
  readonly launchId: Schema.optional<Schema.String>;
1867
+ /**
1868
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
1869
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
1870
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
1871
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
1872
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
1873
+ */
1874
+ readonly controlScope: Schema.optional<Schema.String>;
1833
1875
  }>>;
1834
1876
  /** `true` when an earlier create with the same `idempotencyKey` made this workspace. */
1835
1877
  readonly replayed: Schema.optional<Schema.Boolean>;
1836
1878
  /** The launch identity the create named (`launchId`), recorded on its attempt. */
1837
1879
  readonly launchId: Schema.optional<Schema.String>;
1880
+ /** The control scope the create named (`controlScope`), recorded on its attempt. */
1881
+ readonly controlScope: Schema.optional<Schema.String>;
1838
1882
  }>;
1839
1883
  export type CreateWorkspaceResponse = typeof createWorkspaceResponseSchema.Type;
1840
1884
  /**
@@ -1924,6 +1968,14 @@ export declare const workspaceSummarySchema: Schema.Struct<{
1924
1968
  readonly runId: Schema.optional<Schema.String>;
1925
1969
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
1926
1970
  readonly launchId: Schema.optional<Schema.String>;
1971
+ /**
1972
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
1973
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
1974
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
1975
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
1976
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
1977
+ */
1978
+ readonly controlScope: Schema.optional<Schema.String>;
1927
1979
  }>>;
1928
1980
  readonly publishedImage: Schema.optional<Schema.Struct<{
1929
1981
  readonly reference: Schema.String;
@@ -2155,6 +2207,14 @@ export declare const workspaceDetailsSchema: Schema.Struct<{
2155
2207
  readonly runId: Schema.optional<Schema.String>;
2156
2208
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
2157
2209
  readonly launchId: Schema.optional<Schema.String>;
2210
+ /**
2211
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
2212
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
2213
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
2214
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
2215
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
2216
+ */
2217
+ readonly controlScope: Schema.optional<Schema.String>;
2158
2218
  }>>;
2159
2219
  readonly publishedImage: Schema.optional<Schema.Struct<{
2160
2220
  readonly reference: Schema.String;
@@ -2387,6 +2447,14 @@ export declare const listWorkspacesResponseSchema: Schema.Struct<{
2387
2447
  readonly runId: Schema.optional<Schema.String>;
2388
2448
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
2389
2449
  readonly launchId: Schema.optional<Schema.String>;
2450
+ /**
2451
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
2452
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
2453
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
2454
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
2455
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
2456
+ */
2457
+ readonly controlScope: Schema.optional<Schema.String>;
2390
2458
  }>>;
2391
2459
  readonly publishedImage: Schema.optional<Schema.Struct<{
2392
2460
  readonly reference: Schema.String;
@@ -2542,6 +2610,14 @@ export declare const workspaceAttemptSummarySchema: Schema.Struct<{
2542
2610
  readonly runId: Schema.optional<Schema.String>;
2543
2611
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
2544
2612
  readonly launchId: Schema.optional<Schema.String>;
2613
+ /**
2614
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
2615
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
2616
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
2617
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
2618
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
2619
+ */
2620
+ readonly controlScope: Schema.optional<Schema.String>;
2545
2621
  }>>;
2546
2622
  readonly publishedImage: Schema.optional<Schema.Struct<{
2547
2623
  readonly reference: Schema.String;
@@ -2676,6 +2752,14 @@ export declare const listWorkspaceAttemptsResponseSchema: Schema.Struct<{
2676
2752
  readonly runId: Schema.optional<Schema.String>;
2677
2753
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
2678
2754
  readonly launchId: Schema.optional<Schema.String>;
2755
+ /**
2756
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
2757
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
2758
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
2759
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
2760
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
2761
+ */
2762
+ readonly controlScope: Schema.optional<Schema.String>;
2679
2763
  }>>;
2680
2764
  readonly publishedImage: Schema.optional<Schema.Struct<{
2681
2765
  readonly reference: Schema.String;
@@ -3280,6 +3364,19 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
3280
3364
  * completion attestation that names a launch must name this one.
3281
3365
  */
3282
3366
  readonly launchId: Schema.optional<Schema.String>;
3367
+ /**
3368
+ * The control scope of the ONE executor this create launches: the subdirectory of the
3369
+ * deployment's control root it mounts at `/run/sealant` (`control-scope.ts`). A caller that
3370
+ * serves the executor's `capture.sock` and `session.sock` names it so it can bind both there
3371
+ * BEFORE the create, and so before sealantd dials them. One path segment of lowercase letters,
3372
+ * digits, `_`, `.` and `-`, never starting with `sealant` (sealant's own directories there do).
3373
+ * Recorded on the launch attempt and unique for all time: a create naming a scope any executor
3374
+ * has held is refused (`409`, code `control-scope-taken`), first come, first served, so mint it
3375
+ * unguessable (from the launch id). Kept by the executor's recovery; a restart is a new
3376
+ * executor, in its container name's scope. Refused on a runtime with no control directory.
3377
+ * Omitted: the executor's container name, reported as `runtime.controlScope`.
3378
+ */
3379
+ readonly controlScope: Schema.optional<Schema.String>;
3283
3380
  /**
3284
3381
  * The SSH gateway runs this workspace's SSH sessions as its owner's own Linux user: the person
3285
3382
  * the owner is bound to (`POST /v1/users/:id/person`). The create must carry a capture owner map
@@ -3326,11 +3423,21 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
3326
3423
  readonly runId: Schema.optional<Schema.String>;
3327
3424
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
3328
3425
  readonly launchId: Schema.optional<Schema.String>;
3426
+ /**
3427
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
3428
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
3429
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
3430
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
3431
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
3432
+ */
3433
+ readonly controlScope: Schema.optional<Schema.String>;
3329
3434
  }>>;
3330
3435
  /** `true` when an earlier create with the same `idempotencyKey` made this workspace. */
3331
3436
  readonly replayed: Schema.optional<Schema.Boolean>;
3332
3437
  /** The launch identity the create named (`launchId`), recorded on its attempt. */
3333
3438
  readonly launchId: Schema.optional<Schema.String>;
3439
+ /** The control scope the create named (`controlScope`), recorded on its attempt. */
3440
+ readonly controlScope: Schema.optional<Schema.String>;
3334
3441
  }>>, Schema.toCodecJson<typeof BudgetExceededError | typeof WorkspaceBadRequestError | typeof WorkspaceRuntimeEnvReferencesUnsupportedError | typeof WorkspaceRuntimeRequirementUnsupportedError | typeof WorkspaceDockerServiceUnsupportedError | typeof WorkspaceSshOwnerRefusedError | typeof WorkspaceForbiddenError | typeof WorkspaceNotFoundError | typeof WorkspaceConflictError | typeof WorkspaceBadGatewayError | typeof WorkspaceServiceUnavailableError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"execWorkspace", "POST", "/:workspaceId/exec", Schema.toCodecStringTree<Schema.Struct<{
3335
3442
  readonly workspaceId: Schema.String;
3336
3443
  }>>, never, Schema.toCodecJson<Schema.Struct<{
@@ -3588,6 +3695,14 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
3588
3695
  readonly runId: Schema.optional<Schema.String>;
3589
3696
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
3590
3697
  readonly launchId: Schema.optional<Schema.String>;
3698
+ /**
3699
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
3700
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
3701
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
3702
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
3703
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
3704
+ */
3705
+ readonly controlScope: Schema.optional<Schema.String>;
3591
3706
  }>>;
3592
3707
  readonly publishedImage: Schema.optional<Schema.Struct<{
3593
3708
  readonly reference: Schema.String;
@@ -4133,6 +4248,14 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
4133
4248
  readonly runId: Schema.optional<Schema.String>;
4134
4249
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
4135
4250
  readonly launchId: Schema.optional<Schema.String>;
4251
+ /**
4252
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
4253
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
4254
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
4255
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
4256
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
4257
+ */
4258
+ readonly controlScope: Schema.optional<Schema.String>;
4136
4259
  }>>;
4137
4260
  readonly publishedImage: Schema.optional<Schema.Struct<{
4138
4261
  readonly reference: Schema.String;
@@ -4499,6 +4622,14 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
4499
4622
  readonly runId: Schema.optional<Schema.String>;
4500
4623
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
4501
4624
  readonly launchId: Schema.optional<Schema.String>;
4625
+ /**
4626
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
4627
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
4628
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
4629
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
4630
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
4631
+ */
4632
+ readonly controlScope: Schema.optional<Schema.String>;
4502
4633
  }>>;
4503
4634
  readonly publishedImage: Schema.optional<Schema.Struct<{
4504
4635
  readonly reference: Schema.String;
@@ -4823,6 +4954,12 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
4823
4954
  readonly workspaceId: Schema.String;
4824
4955
  readonly state: Schema.Literals<readonly ["requested", "not-retained"]>;
4825
4956
  readonly recoverable: Schema.optional<Schema.Boolean>;
4957
+ /**
4958
+ * The retained executor's control scope (`runtime.controlScope`), when its runtime has one: a
4959
+ * recovery boot dials only `capture.sock` there, so the caller binds that (and no
4960
+ * `session.sock`) before the recovery runs.
4961
+ */
4962
+ readonly controlScope: Schema.optional<Schema.String>;
4826
4963
  }>>, Schema.toCodecJson<typeof WorkspaceBadRequestError | typeof WorkspaceNotFoundError | typeof WorkspaceConflictError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"releaseWorkspaceCredentials", "DELETE", "/:workspaceId/credentials", Schema.toCodecStringTree<Schema.Struct<{
4827
4964
  readonly workspaceId: Schema.String;
4828
4965
  }>>, Schema.toCodecStringTree<Schema.Struct<{
@@ -4874,6 +5011,11 @@ export declare const WorkspacesGroup: HttpApiGroup.HttpApiGroup<"workspaces", Ht
4874
5011
  readonly bytesSkipped: Schema.Number;
4875
5012
  readonly removed: Schema.Number;
4876
5013
  readonly unchanged: Schema.Boolean;
5014
+ /**
5015
+ * The claimed executor's control scope (`runtime.controlScope`), when its runtime has one: the
5016
+ * subdirectory a caller claiming a standby serves its `capture.sock` and `session.sock` in.
5017
+ */
5018
+ readonly controlScope: Schema.optional<Schema.String>;
4877
5019
  }>>, Schema.toCodecJson<typeof WorkspaceBadRequestError | typeof WorkspaceNotFoundError | typeof WorkspaceConflictError | typeof WorkspaceInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"restartWorkspace", "POST", "/:workspaceId/restart", Schema.toCodecStringTree<Schema.Struct<{
4878
5020
  readonly workspaceId: Schema.String;
4879
5021
  }>>, never, Schema.toCodecJson<Schema.Struct<{
@@ -1,5 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
+ import { CONTROL_SCOPE_PROBLEMS, controlScopeProblem } from "../control-scope.js";
3
4
  import { canonicalRevocationHost, brokeredSecretsProblems, brokeredSecretValuesProblems, networkPolicyProblems, } from "../network-policy.js";
4
5
  import { boatFailureSchema } from "./boat-failures.js";
5
6
  import { BudgetExceededError } from "./budgets.js";
@@ -10,6 +11,8 @@ import { refusalWords } from "./refusal-words.js";
10
11
  import { runCommandSchema, runSchema } from "./runs.js";
11
12
  import { workspaceProcessUserSchema } from "./sessions.js";
12
13
  const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
14
+ /** A control scope a create names (`controlScopeProblem`'s rules: one segment, not `sealant…`). */
15
+ export const controlScopeSchema = Schema.String.check(Schema.makeFilter(controlScopeProblem, refusalWords(...Object.values(CONTROL_SCOPE_PROBLEMS))));
13
16
  /**
14
17
  * `retained`: the workspace's executor ended (or its capture launch failed after it started)
15
18
  * with work on its disk not confirmed saved. It is kept, not dead: the control plane drains or
@@ -115,6 +118,14 @@ export const workspaceRuntimeSchema = Schema.Struct({
115
118
  runId: Schema.optional(NonEmptyString),
116
119
  /** The launch identity the create named for this executor (`launchId`), when it named one. */
117
120
  launchId: Schema.optional(NonEmptyString),
121
+ /**
122
+ * The executor's control scope (`control-scope.ts`): the subdirectory of the deployment's
123
+ * control root it mounts at `/run/sealant`, where the caller serves its `capture.sock` and
124
+ * `session.sock`. The create's `controlScope` when it named one, else the container name.
125
+ * Absent on a runtime with no control directory (Kubernetes, Boat, MicroVM, Cloudflare, Docker
126
+ * without `WORKSPACE_CONTROL_SOCKET_HOST_DIR`) and from older control planes.
127
+ */
128
+ controlScope: Schema.optional(NonEmptyString),
118
129
  });
119
130
  export const workspaceSshTargetSchema = Schema.Struct({
120
131
  workspaceId: NonEmptyString,
@@ -339,6 +350,19 @@ export const createWorkspaceRequestSchema = Schema.Struct({
339
350
  * completion attestation that names a launch must name this one.
340
351
  */
341
352
  launchId: Schema.optional(NonEmptyString),
353
+ /**
354
+ * The control scope of the ONE executor this create launches: the subdirectory of the
355
+ * deployment's control root it mounts at `/run/sealant` (`control-scope.ts`). A caller that
356
+ * serves the executor's `capture.sock` and `session.sock` names it so it can bind both there
357
+ * BEFORE the create, and so before sealantd dials them. One path segment of lowercase letters,
358
+ * digits, `_`, `.` and `-`, never starting with `sealant` (sealant's own directories there do).
359
+ * Recorded on the launch attempt and unique for all time: a create naming a scope any executor
360
+ * has held is refused (`409`, code `control-scope-taken`), first come, first served, so mint it
361
+ * unguessable (from the launch id). Kept by the executor's recovery; a restart is a new
362
+ * executor, in its container name's scope. Refused on a runtime with no control directory.
363
+ * Omitted: the executor's container name, reported as `runtime.controlScope`.
364
+ */
365
+ controlScope: Schema.optional(controlScopeSchema),
342
366
  /**
343
367
  * The SSH gateway runs this workspace's SSH sessions as its owner's own Linux user: the person
344
368
  * the owner is bound to (`POST /v1/users/:id/person`). The create must carry a capture owner map
@@ -695,6 +719,11 @@ export const workspaceCaptureReplannedSchema = Schema.Struct({
695
719
  bytesSkipped: Schema.Number,
696
720
  removed: Schema.Number,
697
721
  unchanged: Schema.Boolean,
722
+ /**
723
+ * The claimed executor's control scope (`runtime.controlScope`), when its runtime has one: the
724
+ * subdirectory a caller claiming a standby serves its `capture.sock` and `session.sock` in.
725
+ */
726
+ controlScope: Schema.optional(NonEmptyString),
698
727
  });
699
728
  export const renameWorkspaceRequestSchema = Schema.Struct({
700
729
  name: NonEmptyString,
@@ -794,6 +823,12 @@ export const recoverWorkspaceResponseSchema = Schema.Struct({
794
823
  workspaceId: NonEmptyString,
795
824
  state: Schema.Literals(["requested", "not-retained"]),
796
825
  recoverable: Schema.optional(Schema.Boolean),
826
+ /**
827
+ * The retained executor's control scope (`runtime.controlScope`), when its runtime has one: a
828
+ * recovery boot dials only `capture.sock` there, so the caller binds that (and no
829
+ * `session.sock`) before the recovery runs.
830
+ */
831
+ controlScope: Schema.optional(NonEmptyString),
797
832
  });
798
833
  export const restartWorkspaceRequestSchema = Schema.Struct({
799
834
  ownerUserId: PersonId,
@@ -1177,6 +1212,8 @@ export const createWorkspaceResponseSchema = Schema.Struct({
1177
1212
  replayed: Schema.optional(Schema.Boolean),
1178
1213
  /** The launch identity the create named (`launchId`), recorded on its attempt. */
1179
1214
  launchId: Schema.optional(NonEmptyString),
1215
+ /** The control scope the create named (`controlScope`), recorded on its attempt. */
1216
+ controlScope: Schema.optional(NonEmptyString),
1180
1217
  });
1181
1218
  /**
1182
1219
  * What became of an idempotent create, by its key (owner-scoped):
package/dist/index.d.ts CHANGED
@@ -28,5 +28,6 @@ export * from "./workspace-environment.js";
28
28
  export * from "./capture-owner-map.js";
29
29
  export * from "./connected-account-selector.js";
30
30
  export * from "./network-policy.js";
31
+ export * from "./control-scope.js";
31
32
  export { resourceDomainOwnerKindSchema, ResourceDomainOwnerDiffersError, type ResourceDomainOwnerKind, } from "./core-api/resource-domains.js";
32
33
  export { resourceCallerReachSchema, resourceInstanceSecretEnvSchema, ResourceInstanceBusyError, ResourceInstanceBudgetError, RESOURCE_INSTANCE_BACKUP, type ResourceCallerReach, } from "./core-api/resource-instances.js";
package/dist/index.js CHANGED
@@ -28,5 +28,6 @@ export * from "./workspace-environment.js";
28
28
  export * from "./capture-owner-map.js";
29
29
  export * from "./connected-account-selector.js";
30
30
  export * from "./network-policy.js";
31
+ export * from "./control-scope.js";
31
32
  export { resourceDomainOwnerKindSchema, ResourceDomainOwnerDiffersError, } from "./core-api/resource-domains.js";
32
33
  export { resourceCallerReachSchema, resourceInstanceSecretEnvSchema, ResourceInstanceBusyError, ResourceInstanceBudgetError, RESOURCE_INSTANCE_BACKUP, } from "./core-api/resource-instances.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/api-contracts-next",
3
- "version": "0.40.0-next.935",
3
+ "version": "0.40.0-next.937",
4
4
  "description": "Contract-first HTTP API definitions for Sealant services",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -29,6 +29,10 @@
29
29
  "./network-policy": {
30
30
  "types": "./dist/network-policy.d.ts",
31
31
  "import": "./dist/network-policy.js"
32
+ },
33
+ "./control-scope": {
34
+ "types": "./dist/control-scope.d.ts",
35
+ "import": "./dist/control-scope.js"
32
36
  }
33
37
  },
34
38
  "files": [
@@ -40,7 +44,7 @@
40
44
  "peerDependencies": {
41
45
  "effect": "^4.0.5"
42
46
  },
43
- "gitHead": "692011a24d7f4de9d273d9db025f6c29edb79bc2",
47
+ "gitHead": "ce04b9190a56121780edc18f8eecbd1d7d356e37",
44
48
  "publishConfig": {
45
49
  "access": "public"
46
50
  }