@sealant/api-contracts-next 0.40.0-next.876 → 0.40.0-next.878
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/core-api/boat-accounts.d.ts +34 -34
- package/dist/core-api/boat-accounts.js +12 -12
- package/dist/core-api/boat-failures.d.ts +7 -6
- package/dist/core-api/boat-failures.js +7 -6
- package/dist/core-api/control-plane.d.ts +2319 -2319
- package/dist/core-api/person-id.d.ts +1 -1
- package/dist/core-api/person-id.js +1 -1
- package/dist/core-api/resource-domains.d.ts +1 -1
- package/dist/core-api/resource-domains.js +1 -1
- package/dist/core-api/resource-instances.d.ts +11 -11
- package/dist/core-api/resource-instances.js +7 -7
- package/dist/core-api/workspace-forward.d.ts +8 -8
- package/dist/core-api/workspace-forward.js +8 -8
- package/dist/core-api/workspaces.d.ts +8 -8
- package/dist/core-api/workspaces.js +11 -11
- package/package.json +2 -2
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* An install's default Boat account is its env key (`SEALANT_BOAT_API_KEY`). A product that serves
|
|
5
5
|
* several organizations (Mend) stores one more account per organization, so each organization's
|
|
6
|
-
* Boat VMs run in, and are billed to, that organization's own Boat account.
|
|
7
|
-
* organizations: it knows the account by id, and the caller keeps the mapping.
|
|
6
|
+
* Boat VMs run in, and are billed to, that organization's own Boat account. sealant has no notion
|
|
7
|
+
* of organizations: it knows the account by id, and the caller keeps the mapping.
|
|
8
8
|
*
|
|
9
9
|
* A workspace names its account at create (`spec.runtime.boatAccountId`; SDK `boatAccountId`) and
|
|
10
10
|
* every run of it stays in that account. Install-scoped: a caller that reached this surface holds
|
|
@@ -19,11 +19,11 @@ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const BOAT_DEFAULT_ACCOUNT_ID = "default";
|
|
21
21
|
/**
|
|
22
|
-
* A fact Boat did not let
|
|
22
|
+
* A fact Boat did not let sealant observe, and why. `refused`: Boat refused the read (`boat` says
|
|
23
23
|
* how; an organization key is refused Boat's key list). `no-answer`: Boat did not answer.
|
|
24
24
|
* `not-listed`: Boat's key list did not include this key (a key limited to some VMs gets an empty
|
|
25
25
|
* list), or included more than one that could be it. `unreadable`: Boat answered with something
|
|
26
|
-
*
|
|
26
|
+
* sealant could not read. sealant never guesses a fact it did not observe.
|
|
27
27
|
*/
|
|
28
28
|
export declare const boatKeyNotObservedSchema: Schema.Struct<{
|
|
29
29
|
readonly observed: Schema.Literal<false>;
|
|
@@ -44,7 +44,7 @@ export declare const boatKeyNotObservedSchema: Schema.Struct<{
|
|
|
44
44
|
}>;
|
|
45
45
|
export type BoatKeyNotObserved = typeof boatKeyNotObservedSchema.Type;
|
|
46
46
|
/**
|
|
47
|
-
* What
|
|
47
|
+
* What sealant observed of a Boat key, from Boat's own answers, at `observedAt`. Each fact is
|
|
48
48
|
* `observed: true` with its value, or `observed: false` with the reason Boat did not show it.
|
|
49
49
|
*/
|
|
50
50
|
export declare const boatKeyReportSchema: Schema.Struct<{
|
|
@@ -128,7 +128,7 @@ export declare const boatKeyReportSchema: Schema.Struct<{
|
|
|
128
128
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
129
129
|
}>>;
|
|
130
130
|
}>]>;
|
|
131
|
-
/** The permissions
|
|
131
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
132
132
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
133
133
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
134
134
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -136,7 +136,7 @@ export declare const boatKeyReportSchema: Schema.Struct<{
|
|
|
136
136
|
} & {
|
|
137
137
|
held: Schema.$Array<Schema.String>;
|
|
138
138
|
missing: Schema.$Array<Schema.String>;
|
|
139
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
139
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
140
140
|
limitedToSandboxes: Schema.Boolean;
|
|
141
141
|
}>, Schema.Struct<{
|
|
142
142
|
readonly observed: Schema.Literal<false>;
|
|
@@ -257,12 +257,12 @@ export declare const boatKeyProofStepSchema: Schema.Struct<{
|
|
|
257
257
|
}>;
|
|
258
258
|
export type BoatKeyProofStep = typeof boatKeyProofStepSchema.Type;
|
|
259
259
|
/**
|
|
260
|
-
* A full check of a Boat key:
|
|
261
|
-
* saved a snapshot, then deleted the snapshot and the VM, and says how far it got. `outcome`:
|
|
260
|
+
* A full check of a Boat key: sealant started the smallest VM, ran a command in it, published a
|
|
261
|
+
* port, saved a snapshot, then deleted the snapshot and the VM, and says how far it got. `outcome`:
|
|
262
262
|
* `passed` (every step), `refused` (Boat refused a step; the first refused or unanswered step
|
|
263
263
|
* says why), or `interrupted` (the check stopped before it finished; what it made was removed by
|
|
264
264
|
* the sweep). `starts`: how many VM starts it asked Boat for (0 or 1). `leftBehind`: what Boat
|
|
265
|
-
* may still hold of it when the answer was given. `removalConfirmed` true:
|
|
265
|
+
* may still hold of it when the answer was given. `removalConfirmed` true: sealant saw Boat delete
|
|
266
266
|
* everything it made. False: the worker's sweep owns what is left and keeps deleting it, with
|
|
267
267
|
* `vm` (an id) and `snapshot` (a name) naming what is known; `vm` is null when a VM may exist
|
|
268
268
|
* whose id Boat never answered (the sweep finds it by its label). Until the sweep has finished,
|
|
@@ -390,7 +390,7 @@ export declare const boatAccountSchema: Schema.Struct<{
|
|
|
390
390
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
391
391
|
}>>;
|
|
392
392
|
}>]>;
|
|
393
|
-
/** The permissions
|
|
393
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
394
394
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
395
395
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
396
396
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -398,7 +398,7 @@ export declare const boatAccountSchema: Schema.Struct<{
|
|
|
398
398
|
} & {
|
|
399
399
|
held: Schema.$Array<Schema.String>;
|
|
400
400
|
missing: Schema.$Array<Schema.String>;
|
|
401
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
401
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
402
402
|
limitedToSandboxes: Schema.Boolean;
|
|
403
403
|
}>, Schema.Struct<{
|
|
404
404
|
readonly observed: Schema.Literal<false>;
|
|
@@ -612,7 +612,7 @@ export declare const boatInstallKeySchema: Schema.Struct<{
|
|
|
612
612
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
613
613
|
}>>;
|
|
614
614
|
}>]>;
|
|
615
|
-
/** The permissions
|
|
615
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
616
616
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
617
617
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
618
618
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -620,7 +620,7 @@ export declare const boatInstallKeySchema: Schema.Struct<{
|
|
|
620
620
|
} & {
|
|
621
621
|
held: Schema.$Array<Schema.String>;
|
|
622
622
|
missing: Schema.$Array<Schema.String>;
|
|
623
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
623
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
624
624
|
limitedToSandboxes: Schema.Boolean;
|
|
625
625
|
}>, Schema.Struct<{
|
|
626
626
|
readonly observed: Schema.Literal<false>;
|
|
@@ -825,7 +825,7 @@ export declare const listBoatAccountsResponseSchema: Schema.Struct<{
|
|
|
825
825
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
826
826
|
}>>;
|
|
827
827
|
}>]>;
|
|
828
|
-
/** The permissions
|
|
828
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
829
829
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
830
830
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
831
831
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -833,7 +833,7 @@ export declare const listBoatAccountsResponseSchema: Schema.Struct<{
|
|
|
833
833
|
} & {
|
|
834
834
|
held: Schema.$Array<Schema.String>;
|
|
835
835
|
missing: Schema.$Array<Schema.String>;
|
|
836
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
836
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
837
837
|
limitedToSandboxes: Schema.Boolean;
|
|
838
838
|
}>, Schema.Struct<{
|
|
839
839
|
readonly observed: Schema.Literal<false>;
|
|
@@ -1062,7 +1062,7 @@ declare const BoatAccountKeyRefusedError_base: Schema.Class<BoatAccountKeyRefuse
|
|
|
1062
1062
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
1063
1063
|
}>>;
|
|
1064
1064
|
}>]>;
|
|
1065
|
-
/** The permissions
|
|
1065
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
1066
1066
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
1067
1067
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
1068
1068
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -1070,7 +1070,7 @@ declare const BoatAccountKeyRefusedError_base: Schema.Class<BoatAccountKeyRefuse
|
|
|
1070
1070
|
} & {
|
|
1071
1071
|
held: Schema.$Array<Schema.String>;
|
|
1072
1072
|
missing: Schema.$Array<Schema.String>;
|
|
1073
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
1073
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
1074
1074
|
limitedToSandboxes: Schema.Boolean;
|
|
1075
1075
|
}>, Schema.Struct<{
|
|
1076
1076
|
readonly observed: Schema.Literal<false>;
|
|
@@ -1166,7 +1166,7 @@ declare const BoatAccountKeyRefusedError_base: Schema.Class<BoatAccountKeyRefuse
|
|
|
1166
1166
|
}>, import("effect/Cause").YieldableError>;
|
|
1167
1167
|
/**
|
|
1168
1168
|
* Boat refused the key (`boat-key-refused`: it answered that the key is not valid, has expired or
|
|
1169
|
-
* belongs to another organization; `boat` says which), the key provably lacks permissions
|
|
1169
|
+
* belongs to another organization; `boat` says which), the key provably lacks permissions sealant
|
|
1170
1170
|
* needs (`boat-key-missing-permissions`, named in `missingPermissions`), or Boat did not answer
|
|
1171
1171
|
* whether it is valid (`boat-key-unverified`: try again). Nothing was stored or changed. The
|
|
1172
1172
|
* message never names the key or any part of it.
|
|
@@ -1196,7 +1196,7 @@ declare const BoatAccountConflictError_base: Schema.Class<BoatAccountConflictErr
|
|
|
1196
1196
|
* `boat-account-environment`: the install's own key (`default`) is set in its environment, not
|
|
1197
1197
|
* through this API. `boat-proof-running`: a full check of the account is running, or Boat may
|
|
1198
1198
|
* still hold what one made (the message names the VM and the snapshot): a second check, a key
|
|
1199
|
-
* rotation and a removal wait until
|
|
1199
|
+
* rotation and a removal wait until sealant has deleted it.
|
|
1200
1200
|
*/
|
|
1201
1201
|
export declare class BoatAccountConflictError extends BoatAccountConflictError_base {
|
|
1202
1202
|
}
|
|
@@ -1305,7 +1305,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1305
1305
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
1306
1306
|
}>>;
|
|
1307
1307
|
}>]>;
|
|
1308
|
-
/** The permissions
|
|
1308
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
1309
1309
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
1310
1310
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
1311
1311
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -1313,7 +1313,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1313
1313
|
} & {
|
|
1314
1314
|
held: Schema.$Array<Schema.String>;
|
|
1315
1315
|
missing: Schema.$Array<Schema.String>;
|
|
1316
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
1316
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
1317
1317
|
limitedToSandboxes: Schema.Boolean;
|
|
1318
1318
|
}>, Schema.Struct<{
|
|
1319
1319
|
readonly observed: Schema.Literal<false>;
|
|
@@ -1520,7 +1520,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1520
1520
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
1521
1521
|
}>>;
|
|
1522
1522
|
}>]>;
|
|
1523
|
-
/** The permissions
|
|
1523
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
1524
1524
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
1525
1525
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
1526
1526
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -1528,7 +1528,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1528
1528
|
} & {
|
|
1529
1529
|
held: Schema.$Array<Schema.String>;
|
|
1530
1530
|
missing: Schema.$Array<Schema.String>;
|
|
1531
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
1531
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
1532
1532
|
limitedToSandboxes: Schema.Boolean;
|
|
1533
1533
|
}>, Schema.Struct<{
|
|
1534
1534
|
readonly observed: Schema.Literal<false>;
|
|
@@ -1723,7 +1723,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1723
1723
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
1724
1724
|
}>>;
|
|
1725
1725
|
}>]>;
|
|
1726
|
-
/** The permissions
|
|
1726
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
1727
1727
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
1728
1728
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
1729
1729
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -1731,7 +1731,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1731
1731
|
} & {
|
|
1732
1732
|
held: Schema.$Array<Schema.String>;
|
|
1733
1733
|
missing: Schema.$Array<Schema.String>;
|
|
1734
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
1734
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
1735
1735
|
limitedToSandboxes: Schema.Boolean;
|
|
1736
1736
|
}>, Schema.Struct<{
|
|
1737
1737
|
readonly observed: Schema.Literal<false>;
|
|
@@ -1938,7 +1938,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1938
1938
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
1939
1939
|
}>>;
|
|
1940
1940
|
}>]>;
|
|
1941
|
-
/** The permissions
|
|
1941
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
1942
1942
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
1943
1943
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
1944
1944
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -1946,7 +1946,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
1946
1946
|
} & {
|
|
1947
1947
|
held: Schema.$Array<Schema.String>;
|
|
1948
1948
|
missing: Schema.$Array<Schema.String>;
|
|
1949
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
1949
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
1950
1950
|
limitedToSandboxes: Schema.Boolean;
|
|
1951
1951
|
}>, Schema.Struct<{
|
|
1952
1952
|
readonly observed: Schema.Literal<false>;
|
|
@@ -2132,7 +2132,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
2132
2132
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
2133
2133
|
}>>;
|
|
2134
2134
|
}>]>;
|
|
2135
|
-
/** The permissions
|
|
2135
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
2136
2136
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
2137
2137
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
2138
2138
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -2140,7 +2140,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
2140
2140
|
} & {
|
|
2141
2141
|
held: Schema.$Array<Schema.String>;
|
|
2142
2142
|
missing: Schema.$Array<Schema.String>;
|
|
2143
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
2143
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
2144
2144
|
limitedToSandboxes: Schema.Boolean;
|
|
2145
2145
|
}>, Schema.Struct<{
|
|
2146
2146
|
readonly observed: Schema.Literal<false>;
|
|
@@ -2388,7 +2388,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
2388
2388
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
2389
2389
|
}>>;
|
|
2390
2390
|
}>]>;
|
|
2391
|
-
/** The permissions
|
|
2391
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
2392
2392
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
2393
2393
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
2394
2394
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -2396,7 +2396,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
2396
2396
|
} & {
|
|
2397
2397
|
held: Schema.$Array<Schema.String>;
|
|
2398
2398
|
missing: Schema.$Array<Schema.String>;
|
|
2399
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
2399
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
2400
2400
|
limitedToSandboxes: Schema.Boolean;
|
|
2401
2401
|
}>, Schema.Struct<{
|
|
2402
2402
|
readonly observed: Schema.Literal<false>;
|
|
@@ -2616,7 +2616,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
2616
2616
|
readonly billingUrl: Schema.optional<Schema.String>;
|
|
2617
2617
|
}>>;
|
|
2618
2618
|
}>]>;
|
|
2619
|
-
/** The permissions
|
|
2619
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
2620
2620
|
readonly requiredPermissions: Schema.$Array<Schema.String>;
|
|
2621
2621
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
2622
2622
|
readonly permissions: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -2624,7 +2624,7 @@ export declare const BoatAccountsGroup: HttpApiGroup.HttpApiGroup<"boatAccounts"
|
|
|
2624
2624
|
} & {
|
|
2625
2625
|
held: Schema.$Array<Schema.String>;
|
|
2626
2626
|
missing: Schema.$Array<Schema.String>;
|
|
2627
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
2627
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
2628
2628
|
limitedToSandboxes: Schema.Boolean;
|
|
2629
2629
|
}>, Schema.Struct<{
|
|
2630
2630
|
readonly observed: Schema.Literal<false>;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* An install's default Boat account is its env key (`SEALANT_BOAT_API_KEY`). A product that serves
|
|
5
5
|
* several organizations (Mend) stores one more account per organization, so each organization's
|
|
6
|
-
* Boat VMs run in, and are billed to, that organization's own Boat account.
|
|
7
|
-
* organizations: it knows the account by id, and the caller keeps the mapping.
|
|
6
|
+
* Boat VMs run in, and are billed to, that organization's own Boat account. sealant has no notion
|
|
7
|
+
* of organizations: it knows the account by id, and the caller keeps the mapping.
|
|
8
8
|
*
|
|
9
9
|
* A workspace names its account at create (`spec.runtime.boatAccountId`; SDK `boatAccountId`) and
|
|
10
10
|
* every run of it stays in that account. Install-scoped: a caller that reached this surface holds
|
|
@@ -28,11 +28,11 @@ const BoatAccountId = Schema.String.check(Schema.isPattern(/^[0-9a-f]{8}-[0-9a-f
|
|
|
28
28
|
export const BOAT_DEFAULT_ACCOUNT_ID = "default";
|
|
29
29
|
const BoatAccountRef = Schema.Union([BoatAccountId, Schema.Literal(BOAT_DEFAULT_ACCOUNT_ID)]);
|
|
30
30
|
/**
|
|
31
|
-
* A fact Boat did not let
|
|
31
|
+
* A fact Boat did not let sealant observe, and why. `refused`: Boat refused the read (`boat` says
|
|
32
32
|
* how; an organization key is refused Boat's key list). `no-answer`: Boat did not answer.
|
|
33
33
|
* `not-listed`: Boat's key list did not include this key (a key limited to some VMs gets an empty
|
|
34
34
|
* list), or included more than one that could be it. `unreadable`: Boat answered with something
|
|
35
|
-
*
|
|
35
|
+
* sealant could not read. sealant never guesses a fact it did not observe.
|
|
36
36
|
*/
|
|
37
37
|
export const boatKeyNotObservedSchema = Schema.Struct({
|
|
38
38
|
observed: Schema.Literal(false),
|
|
@@ -44,7 +44,7 @@ const observedOr = (fields) => Schema.Union([
|
|
|
44
44
|
boatKeyNotObservedSchema,
|
|
45
45
|
]);
|
|
46
46
|
/**
|
|
47
|
-
* What
|
|
47
|
+
* What sealant observed of a Boat key, from Boat's own answers, at `observedAt`. Each fact is
|
|
48
48
|
* `observed: true` with its value, or `observed: false` with the reason Boat did not show it.
|
|
49
49
|
*/
|
|
50
50
|
export const boatKeyReportSchema = Schema.Struct({
|
|
@@ -72,13 +72,13 @@ export const boatKeyReportSchema = Schema.Struct({
|
|
|
72
72
|
organizationName: Schema.optional(Schema.String),
|
|
73
73
|
role: Schema.optional(Schema.String),
|
|
74
74
|
}),
|
|
75
|
-
/** The permissions
|
|
75
|
+
/** The permissions sealant needs of every key, from the Boat calls it makes. */
|
|
76
76
|
requiredPermissions: Schema.Array(Schema.String),
|
|
77
77
|
/** The key's permissions (`GET /api-keys`), and which of the required ones it lacks. */
|
|
78
78
|
permissions: observedOr({
|
|
79
79
|
held: Schema.Array(Schema.String),
|
|
80
80
|
missing: Schema.Array(Schema.String),
|
|
81
|
-
/** The key is limited to some VMs or environments: it cannot reach VMs
|
|
81
|
+
/** The key is limited to some VMs or environments: it cannot reach VMs sealant creates. */
|
|
82
82
|
limitedToSandboxes: Schema.Boolean,
|
|
83
83
|
}),
|
|
84
84
|
/** When the key expires; `expiresAt` null: it never does. */
|
|
@@ -118,12 +118,12 @@ export const boatKeyProofStepSchema = Schema.Struct({
|
|
|
118
118
|
boat: Schema.optional(boatFailureSchema),
|
|
119
119
|
});
|
|
120
120
|
/**
|
|
121
|
-
* A full check of a Boat key:
|
|
122
|
-
* saved a snapshot, then deleted the snapshot and the VM, and says how far it got. `outcome`:
|
|
121
|
+
* A full check of a Boat key: sealant started the smallest VM, ran a command in it, published a
|
|
122
|
+
* port, saved a snapshot, then deleted the snapshot and the VM, and says how far it got. `outcome`:
|
|
123
123
|
* `passed` (every step), `refused` (Boat refused a step; the first refused or unanswered step
|
|
124
124
|
* says why), or `interrupted` (the check stopped before it finished; what it made was removed by
|
|
125
125
|
* the sweep). `starts`: how many VM starts it asked Boat for (0 or 1). `leftBehind`: what Boat
|
|
126
|
-
* may still hold of it when the answer was given. `removalConfirmed` true:
|
|
126
|
+
* may still hold of it when the answer was given. `removalConfirmed` true: sealant saw Boat delete
|
|
127
127
|
* everything it made. False: the worker's sweep owns what is left and keeps deleting it, with
|
|
128
128
|
* `vm` (an id) and `snapshot` (a name) naming what is known; `vm` is null when a VM may exist
|
|
129
129
|
* whose id Boat never answered (the sweep finds it by its label). Until the sweep has finished,
|
|
@@ -189,7 +189,7 @@ export class BoatAccountBadRequestError extends Schema.TaggedError()("BoatAccoun
|
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* Boat refused the key (`boat-key-refused`: it answered that the key is not valid, has expired or
|
|
192
|
-
* belongs to another organization; `boat` says which), the key provably lacks permissions
|
|
192
|
+
* belongs to another organization; `boat` says which), the key provably lacks permissions sealant
|
|
193
193
|
* needs (`boat-key-missing-permissions`, named in `missingPermissions`), or Boat did not answer
|
|
194
194
|
* whether it is valid (`boat-key-unverified`: try again). Nothing was stored or changed. The
|
|
195
195
|
* message never names the key or any part of it.
|
|
@@ -219,7 +219,7 @@ export class BoatAccountNotFoundError extends Schema.TaggedError()("BoatAccountN
|
|
|
219
219
|
* `boat-account-environment`: the install's own key (`default`) is set in its environment, not
|
|
220
220
|
* through this API. `boat-proof-running`: a full check of the account is running, or Boat may
|
|
221
221
|
* still hold what one made (the message names the VM and the snapshot): a second check, a key
|
|
222
|
-
* rotation and a removal wait until
|
|
222
|
+
* rotation and a removal wait until sealant has deleted it.
|
|
223
223
|
*/
|
|
224
224
|
export class BoatAccountConflictError extends Schema.TaggedError()("BoatAccountConflictError", {
|
|
225
225
|
message: Schema.String,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Why Boat refused, or did not answer, a request
|
|
3
|
-
* image build's VM or saved snapshot, a key check. One closed set of kinds, each with
|
|
4
|
-
* can do about it, plus what Boat itself said: its error code, its own message, its
|
|
5
|
-
* Boat's support), when to retry and its billing link.
|
|
2
|
+
* Why Boat refused, or did not answer, a request sealant made for a workspace: a launch's VM
|
|
3
|
+
* create, an image build's VM or saved snapshot, a key check. One closed set of kinds, each with
|
|
4
|
+
* what a caller can do about it, plus what Boat itself said: its error code, its own message, its
|
|
5
|
+
* request id (for Boat's support), when to retry and its billing link.
|
|
6
6
|
*
|
|
7
7
|
* Nothing else of Boat's answer is kept, and no part of a Boat key is ever in it.
|
|
8
8
|
*/
|
|
@@ -30,7 +30,8 @@ import { Schema } from "effect";
|
|
|
30
30
|
* - `no-machine`: Boat has no machine of the size right now (`no_ready_machine`, `out_of_capacity`).
|
|
31
31
|
* - `snapshot-allowance-full`: the wallet keeps all its included saved snapshots and cannot pay for
|
|
32
32
|
* another (`credit_required` on a save).
|
|
33
|
-
* - `no-answer`: Boat did not answer, or answered with a server error or a reply
|
|
33
|
+
* - `no-answer`: Boat did not answer, or answered with a server error or a reply sealant cannot
|
|
34
|
+
* read.
|
|
34
35
|
* - `refused`: Boat refused for another reason; `code` is Boat's own.
|
|
35
36
|
*/
|
|
36
37
|
export declare const BOAT_FAILURE_KINDS: readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"];
|
|
@@ -42,7 +43,7 @@ export declare const boatFailureSchema: Schema.Struct<{
|
|
|
42
43
|
readonly kind: Schema.Literals<readonly ["key-refused", "key-expired", "permission-missing", "sandbox-outside-key", "organization-mismatch", "account-suspended", "billing-required", "running-limit", "member-cap", "rate-limited", "trial-restricted", "no-machine", "snapshot-allowance-full", "no-answer", "refused"]>;
|
|
43
44
|
/** Whether the same call may succeed later as it stands (see `BOAT_RETRYABLE_FAILURE_KINDS`). */
|
|
44
45
|
readonly retryable: Schema.Boolean;
|
|
45
|
-
/**
|
|
46
|
+
/** sealant's call that Boat refused (`create`, `saveSnapshot`, `verify`), when known. */
|
|
46
47
|
readonly operation: Schema.optional<Schema.String>;
|
|
47
48
|
/** Boat's error code (`api_key_expired`). Absent when Boat did not answer with one. */
|
|
48
49
|
readonly code: Schema.optional<Schema.String>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Why Boat refused, or did not answer, a request
|
|
3
|
-
* image build's VM or saved snapshot, a key check. One closed set of kinds, each with
|
|
4
|
-
* can do about it, plus what Boat itself said: its error code, its own message, its
|
|
5
|
-
* Boat's support), when to retry and its billing link.
|
|
2
|
+
* Why Boat refused, or did not answer, a request sealant made for a workspace: a launch's VM
|
|
3
|
+
* create, an image build's VM or saved snapshot, a key check. One closed set of kinds, each with
|
|
4
|
+
* what a caller can do about it, plus what Boat itself said: its error code, its own message, its
|
|
5
|
+
* request id (for Boat's support), when to retry and its billing link.
|
|
6
6
|
*
|
|
7
7
|
* Nothing else of Boat's answer is kept, and no part of a Boat key is ever in it.
|
|
8
8
|
*/
|
|
@@ -30,7 +30,8 @@ import { Schema } from "effect";
|
|
|
30
30
|
* - `no-machine`: Boat has no machine of the size right now (`no_ready_machine`, `out_of_capacity`).
|
|
31
31
|
* - `snapshot-allowance-full`: the wallet keeps all its included saved snapshots and cannot pay for
|
|
32
32
|
* another (`credit_required` on a save).
|
|
33
|
-
* - `no-answer`: Boat did not answer, or answered with a server error or a reply
|
|
33
|
+
* - `no-answer`: Boat did not answer, or answered with a server error or a reply sealant cannot
|
|
34
|
+
* read.
|
|
34
35
|
* - `refused`: Boat refused for another reason; `code` is Boat's own.
|
|
35
36
|
*/
|
|
36
37
|
export const BOAT_FAILURE_KINDS = [
|
|
@@ -61,7 +62,7 @@ export const boatFailureSchema = Schema.Struct({
|
|
|
61
62
|
kind: boatFailureKindSchema,
|
|
62
63
|
/** Whether the same call may succeed later as it stands (see `BOAT_RETRYABLE_FAILURE_KINDS`). */
|
|
63
64
|
retryable: Schema.Boolean,
|
|
64
|
-
/**
|
|
65
|
+
/** sealant's call that Boat refused (`create`, `saveSnapshot`, `verify`), when known. */
|
|
65
66
|
operation: Schema.optional(Schema.String),
|
|
66
67
|
/** Boat's error code (`api_key_expired`). Absent when Boat did not answer with one. */
|
|
67
68
|
code: Schema.optional(Schema.String),
|