@gjermundgaraba/clankerbox-sdk 0.20.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -88,11 +88,6 @@ var ScriptFailed = class extends Schema.TaggedError()("ScriptFailed", {
|
|
|
88
88
|
...located,
|
|
89
89
|
script: Schema.String
|
|
90
90
|
}, { httpApiStatus: 422 }) {};
|
|
91
|
-
/** The provider under the runtime refused the call for good, such as for its plan or API key. */
|
|
92
|
-
var Refused = class extends Schema.TaggedError()("Refused", {
|
|
93
|
-
message: Schema.String,
|
|
94
|
-
...located
|
|
95
|
-
}, { httpApiStatus: 403 }) {};
|
|
96
91
|
/** The host has no room now; room can free up, so a later call may succeed. */
|
|
97
92
|
var Capacity = class extends Schema.TaggedError()("Capacity", {
|
|
98
93
|
message: Schema.String,
|
|
@@ -124,7 +119,6 @@ const hostErrors = [
|
|
|
124
119
|
WrongState,
|
|
125
120
|
Unsizable,
|
|
126
121
|
ScriptFailed,
|
|
127
|
-
Refused,
|
|
128
122
|
Capacity,
|
|
129
123
|
Internal
|
|
130
124
|
];
|
|
@@ -154,7 +148,6 @@ const retryable = (error) => Match.value(error).pipe(Match.tagsExhaustive({
|
|
|
154
148
|
WrongState: () => false,
|
|
155
149
|
Unsizable: () => false,
|
|
156
150
|
ScriptFailed: () => false,
|
|
157
|
-
Refused: () => false,
|
|
158
151
|
Capacity: () => true,
|
|
159
152
|
Unavailable: ({ readOnly }) => readOnly,
|
|
160
153
|
Internal: () => false
|
|
@@ -198,11 +191,14 @@ const formatId = (host, name) => {
|
|
|
198
191
|
};
|
|
199
192
|
//#endregion
|
|
200
193
|
//#region src/resources.ts
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
194
|
+
/** What a host's machines are: `linux` guests on smolvm, or `mac` guests on Tart. */
|
|
195
|
+
const Kind = Schema.Literals(["linux", "mac"]);
|
|
196
|
+
const CheckpointKind = Schema.Literals(["ram", "disk"]);
|
|
197
|
+
/**
|
|
198
|
+
* The user a machine is logged in as, on either kind: the user a setup, run as root, leaves in the
|
|
199
|
+
* guest, for whom the host installs the operator's keys. Tart's bases ship it; never root.
|
|
200
|
+
*/
|
|
201
|
+
const loginUser = "admin";
|
|
206
202
|
const Size = Schema.Int.check(Schema.isGreaterThan(0));
|
|
207
203
|
/** What the operator asked a machine to be; the host keeps moving the machine toward it. */
|
|
208
204
|
const Desired = Schema.Literals([
|
|
@@ -268,7 +264,7 @@ const TailnetStatus = Schema.Union([
|
|
|
268
264
|
*/
|
|
269
265
|
const Machine = Schema.Struct({
|
|
270
266
|
id: Id,
|
|
271
|
-
|
|
267
|
+
kind: Kind,
|
|
272
268
|
createdAt: Schema.DateTimeUtcFromString,
|
|
273
269
|
base: Schema.String,
|
|
274
270
|
profile: Schema.optionalKey(Schema.String),
|
|
@@ -294,30 +290,27 @@ const Machine = Schema.Struct({
|
|
|
294
290
|
*/
|
|
295
291
|
const stateLabel = ({ state, desired, phase }) => phase === "settled" ? state : state === desired ? `${state} (${phase})` : `${state}, wants ${desired} (${phase})`;
|
|
296
292
|
/**
|
|
297
|
-
* `kind`
|
|
298
|
-
* once its capture is done, and never
|
|
293
|
+
* `kind` follows its host's: `ram` (RAM and disks) on linux, captured from a running machine, and
|
|
294
|
+
* `disk` on mac, from a stopped one. A checkpoint exists only once its capture is done, and never
|
|
295
|
+
* changes after.
|
|
299
296
|
*/
|
|
300
297
|
const Checkpoint = Schema.Struct({
|
|
301
298
|
id: Id,
|
|
302
299
|
createdAt: Schema.DateTimeUtcFromString,
|
|
303
300
|
machine: Id,
|
|
304
|
-
kind:
|
|
301
|
+
kind: CheckpointKind,
|
|
305
302
|
base: Schema.String,
|
|
306
303
|
profile: Schema.optionalKey(Schema.String),
|
|
307
304
|
cpu: Size,
|
|
308
305
|
ramMib: Size,
|
|
309
306
|
diskGib: Size
|
|
310
307
|
}).annotate({ identifier: "Checkpoint" });
|
|
311
|
-
/**
|
|
312
|
-
* `runtimeVersion` is boat's API version on boat. `captureFrom` is the state a machine must be in
|
|
313
|
-
* to be captured: Tart's is `stopped`.
|
|
314
|
-
*/
|
|
308
|
+
/** `runtimeVersion` is the version of smolvm on linux, and of Tart on mac. */
|
|
315
309
|
const Host = Schema.Struct({
|
|
316
310
|
id: HostId,
|
|
317
|
-
|
|
311
|
+
kind: Kind,
|
|
318
312
|
version: Schema.String,
|
|
319
313
|
runtimeVersion: Schema.String,
|
|
320
|
-
captureFrom: Schema.Literals(["running", "stopped"]),
|
|
321
314
|
bases: Schema.Array(Schema.String)
|
|
322
315
|
}).annotate({ identifier: "Host" });
|
|
323
316
|
const usageFields = {
|
|
@@ -325,11 +318,7 @@ const usageFields = {
|
|
|
325
318
|
resource: Schema.Literals([
|
|
326
319
|
"cpu",
|
|
327
320
|
"ramMib",
|
|
328
|
-
"runningVms"
|
|
329
|
-
"activeSandboxes",
|
|
330
|
-
"startsPerMinute",
|
|
331
|
-
"startsPerHour",
|
|
332
|
-
"startsPerDay"
|
|
321
|
+
"runningVms"
|
|
333
322
|
]),
|
|
334
323
|
limit: Schema.optionalKey(Schema.Int)
|
|
335
324
|
};
|
|
@@ -338,8 +327,8 @@ const usageFields = {
|
|
|
338
327
|
* needn't match the host's own machines. When a machine the sum counts couldn't be read, the
|
|
339
328
|
* sum would be a guess, so the row names those machines instead.
|
|
340
329
|
*
|
|
341
|
-
* `cpu` and `ramMib` are what the host's running machines were given, `runningVms
|
|
342
|
-
* VMs per Mac
|
|
330
|
+
* `cpu` and `ramMib` are what the host's running machines were given, and `runningVms`, on mac,
|
|
331
|
+
* Apple's two VMs per Mac.
|
|
343
332
|
* `limit` is there only where the host refuses an action that would pass it.
|
|
344
333
|
*/
|
|
345
334
|
const Usage = Schema.Union([Schema.Struct({
|
|
@@ -418,12 +407,6 @@ const reading = [
|
|
|
418
407
|
NotFound,
|
|
419
408
|
Internal
|
|
420
409
|
];
|
|
421
|
-
const removing = [
|
|
422
|
-
Invalid,
|
|
423
|
-
NotFound,
|
|
424
|
-
Refused,
|
|
425
|
-
Internal
|
|
426
|
-
];
|
|
427
410
|
const converging = [
|
|
428
411
|
Invalid,
|
|
429
412
|
NotFound,
|
|
@@ -433,7 +416,6 @@ const converging = [
|
|
|
433
416
|
PinMismatch,
|
|
434
417
|
Unsizable,
|
|
435
418
|
ScriptFailed,
|
|
436
|
-
Refused,
|
|
437
419
|
Capacity,
|
|
438
420
|
Superseded,
|
|
439
421
|
Internal
|
|
@@ -520,17 +502,16 @@ const Http = ActionHttp.make([
|
|
|
520
502
|
NotMade,
|
|
521
503
|
Missing,
|
|
522
504
|
WrongState,
|
|
523
|
-
Refused,
|
|
524
505
|
Capacity,
|
|
525
506
|
Internal
|
|
526
507
|
],
|
|
527
|
-
description: "Capture a checkpoint of a machine. Its kind follows the
|
|
508
|
+
description: "Capture a checkpoint of a machine. Its kind follows the host's: ram on linux, which captures only a running machine, and disk on mac, which captures only a stopped one.",
|
|
528
509
|
input: FromMachine,
|
|
529
510
|
success: Checkpoint
|
|
530
511
|
}),
|
|
531
512
|
Action.make("deleteCheckpoint", {
|
|
532
513
|
...write,
|
|
533
|
-
error:
|
|
514
|
+
error: reading,
|
|
534
515
|
description: "Delete a checkpoint, once the restores that read it are done.",
|
|
535
516
|
input: ById
|
|
536
517
|
}),
|
|
@@ -544,16 +525,12 @@ const Http = ActionHttp.make([
|
|
|
544
525
|
Action.make("getHost", {
|
|
545
526
|
...read,
|
|
546
527
|
error: [Invalid],
|
|
547
|
-
description: "Read the host: its
|
|
528
|
+
description: "Read the host: its kind, versions and bases.",
|
|
548
529
|
success: Host
|
|
549
530
|
}),
|
|
550
531
|
Action.make("getCapacity", {
|
|
551
532
|
...read,
|
|
552
|
-
error:
|
|
553
|
-
Invalid,
|
|
554
|
-
Refused,
|
|
555
|
-
Internal
|
|
556
|
-
],
|
|
533
|
+
error: listing,
|
|
557
534
|
description: "Read the host's resources, how much of each is in use, and their limits. A machine whose state can't be read leaves the rows that count it unread; it fails when the runtime can't be read at all.",
|
|
558
535
|
success: Schema.Array(Usage)
|
|
559
536
|
})
|
|
@@ -562,7 +539,7 @@ const actionsByName = Action.byName(Http.actions);
|
|
|
562
539
|
//#endregion
|
|
563
540
|
//#region src/release.ts
|
|
564
541
|
/** Also the version of the clankerbox CLI released with it. */
|
|
565
|
-
const version = "0.
|
|
542
|
+
const version = "0.22.0";
|
|
566
543
|
/** major.minor: releases that share it speak the same API. */
|
|
567
544
|
const release = (of) => of.split(".").slice(0, 2).join(".");
|
|
568
545
|
/** A host refuses a request whose `release` differs from its own, or that has none. */
|
|
@@ -770,4 +747,4 @@ const make = (hosts, options) => Effect.gen(function* () {
|
|
|
770
747
|
});
|
|
771
748
|
const layer = (hosts, options) => Layer.effect(Client, make(hosts, options));
|
|
772
749
|
//#endregion
|
|
773
|
-
export {
|
|
750
|
+
export { Id as A, Invalid as B, SshEndpoint as C, loginUser as D, Usage as E, Capacity as F, PinMismatch as G, NotFound as H, ClankerboxError as I, Unavailable as J, ScriptFailed as K, Conflict as L, formatId as M, parseId as N, stateLabel as O, parseName as P, retryable as Q, HostError as R, Setup as S, TailnetStatus as T, NotMade as U, Missing as V, NotOffered as W, WrongState as X, Unsizable as Y, hostErrors as Z, MachineSpec as _, release as a, Prebuilt as b, Http as c, Checkpoint as d, CreateRequest as f, Machine as g, Kind as h, describeIssues as i, Name as j, HostId as k, actionsByName as l, Host as m, layer as n, version as o, Desired as p, Superseded as q, describeFileError as r, versionHeader as s, client_exports as t, readTimeout as u, Phase as v, SshLogin as w, PublicKeys as x, PrebuildRequest as y, Internal as z };
|
|
@@ -121,15 +121,6 @@ declare const ScriptFailed_base: Schema.Class<ScriptFailed, Schema.TaggedStruct<
|
|
|
121
121
|
* `preparation` runs again on the next start.
|
|
122
122
|
*/
|
|
123
123
|
declare class ScriptFailed extends ScriptFailed_base {}
|
|
124
|
-
declare const Refused_base: Schema.Class<Refused, Schema.TaggedStruct<"Refused", {
|
|
125
|
-
readonly host: Schema.optionalKey<Schema.String>;
|
|
126
|
-
readonly action: Schema.optionalKey<Schema.String>;
|
|
127
|
-
readonly id: Schema.optionalKey<Schema.String>;
|
|
128
|
-
readonly made: Schema.optionalKey<Schema.String>;
|
|
129
|
-
readonly message: Schema.String;
|
|
130
|
-
}>, import("effect/Cause").YieldableError>;
|
|
131
|
-
/** The provider under the runtime refused the call for good, such as for its plan or API key. */
|
|
132
|
-
declare class Refused extends Refused_base {}
|
|
133
124
|
declare const Capacity_base: Schema.Class<Capacity, Schema.TaggedStruct<"Capacity", {
|
|
134
125
|
readonly host: Schema.optionalKey<Schema.String>;
|
|
135
126
|
readonly action: Schema.optionalKey<Schema.String>;
|
|
@@ -161,8 +152,8 @@ declare const Internal_base: Schema.Class<Internal, Schema.TaggedStruct<"Interna
|
|
|
161
152
|
}>, import("effect/Cause").YieldableError>;
|
|
162
153
|
declare class Internal extends Internal_base {}
|
|
163
154
|
/** What a host may answer with; each action declares its own share. */
|
|
164
|
-
declare const hostErrors: readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
165
|
-
declare const HostError: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
155
|
+
declare const hostErrors: readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal];
|
|
156
|
+
declare const HostError: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>;
|
|
166
157
|
type HostError = typeof HostError.Type;
|
|
167
158
|
/**
|
|
168
159
|
* Each carries, where known: `host` and `action`, which the client sets; `id`, the resource the
|
|
@@ -172,7 +163,7 @@ type HostError = typeof HostError.Type;
|
|
|
172
163
|
* keeps one whose preparation fails; a call whose answer was lost, `Unavailable`, may leave
|
|
173
164
|
* `made` behind unmade.
|
|
174
165
|
*/
|
|
175
|
-
declare const ClankerboxError: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
166
|
+
declare const ClankerboxError: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal, typeof Unavailable]>;
|
|
176
167
|
type ClankerboxError = typeof ClankerboxError.Type;
|
|
177
168
|
/**
|
|
178
169
|
* Whether the same call may succeed later: a full host may free up, and a read that got no reply
|
|
@@ -185,7 +176,7 @@ declare const retryable: (error: ClankerboxError) => boolean;
|
|
|
185
176
|
declare const readTimeout: Duration.Duration;
|
|
186
177
|
declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Struct<{
|
|
187
178
|
readonly id: Schema.String;
|
|
188
|
-
readonly
|
|
179
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
189
180
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
190
181
|
readonly base: Schema.String;
|
|
191
182
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -195,7 +186,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
195
186
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
196
187
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
197
188
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
198
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
189
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
199
190
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
200
191
|
readonly host: Schema.String;
|
|
201
192
|
readonly port: Schema.Int;
|
|
@@ -215,7 +206,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
215
206
|
readonly id: Schema.String;
|
|
216
207
|
}>, Schema.Struct<{
|
|
217
208
|
readonly id: Schema.String;
|
|
218
|
-
readonly
|
|
209
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
219
210
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
220
211
|
readonly base: Schema.String;
|
|
221
212
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -225,7 +216,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
225
216
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
226
217
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
227
218
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
228
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
219
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
229
220
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
230
221
|
readonly host: Schema.String;
|
|
231
222
|
readonly port: Schema.Int;
|
|
@@ -255,7 +246,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
255
246
|
readonly id: Schema.String;
|
|
256
247
|
}>, Schema.Struct<{
|
|
257
248
|
readonly id: Schema.String;
|
|
258
|
-
readonly
|
|
249
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
259
250
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
260
251
|
readonly base: Schema.String;
|
|
261
252
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -265,7 +256,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
265
256
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
266
257
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
267
258
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
268
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
259
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
269
260
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
270
261
|
readonly host: Schema.String;
|
|
271
262
|
readonly port: Schema.Int;
|
|
@@ -281,11 +272,11 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
281
272
|
}>, Schema.Struct<{
|
|
282
273
|
readonly state: Schema.Literal<"missing">;
|
|
283
274
|
}>]>>;
|
|
284
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
275
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"startMachine", Schema.Struct<{
|
|
285
276
|
readonly id: Schema.String;
|
|
286
277
|
}>, Schema.Struct<{
|
|
287
278
|
readonly id: Schema.String;
|
|
288
|
-
readonly
|
|
279
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
289
280
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
290
281
|
readonly base: Schema.String;
|
|
291
282
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -295,7 +286,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
295
286
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
296
287
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
297
288
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
298
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
289
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
299
290
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
300
291
|
readonly host: Schema.String;
|
|
301
292
|
readonly port: Schema.Int;
|
|
@@ -311,11 +302,11 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
311
302
|
}>, Schema.Struct<{
|
|
312
303
|
readonly state: Schema.Literal<"missing">;
|
|
313
304
|
}>]>>;
|
|
314
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
305
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"stopMachine", Schema.Struct<{
|
|
315
306
|
readonly id: Schema.String;
|
|
316
307
|
}>, Schema.Struct<{
|
|
317
308
|
readonly id: Schema.String;
|
|
318
|
-
readonly
|
|
309
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
319
310
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
320
311
|
readonly base: Schema.String;
|
|
321
312
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -325,7 +316,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
325
316
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
326
317
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
327
318
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
328
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
319
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
329
320
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
330
321
|
readonly host: Schema.String;
|
|
331
322
|
readonly port: Schema.Int;
|
|
@@ -341,14 +332,14 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
341
332
|
}>, Schema.Struct<{
|
|
342
333
|
readonly state: Schema.Literal<"missing">;
|
|
343
334
|
}>]>>;
|
|
344
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
335
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"deleteMachine", Schema.Struct<{
|
|
345
336
|
readonly id: Schema.String;
|
|
346
|
-
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
337
|
+
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"forkMachine", Schema.Struct<{
|
|
347
338
|
readonly machine: Schema.String;
|
|
348
339
|
readonly name: Schema.String;
|
|
349
340
|
}>, Schema.Struct<{
|
|
350
341
|
readonly id: Schema.String;
|
|
351
|
-
readonly
|
|
342
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
352
343
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
353
344
|
readonly base: Schema.String;
|
|
354
345
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -358,7 +349,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
358
349
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
359
350
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
360
351
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
361
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
352
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
362
353
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
363
354
|
readonly host: Schema.String;
|
|
364
355
|
readonly port: Schema.Int;
|
|
@@ -374,12 +365,12 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
374
365
|
}>, Schema.Struct<{
|
|
375
366
|
readonly state: Schema.Literal<"missing">;
|
|
376
367
|
}>]>>;
|
|
377
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
368
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"restoreMachine", Schema.Struct<{
|
|
378
369
|
readonly checkpoint: Schema.String;
|
|
379
370
|
readonly name: Schema.String;
|
|
380
371
|
}>, Schema.Struct<{
|
|
381
372
|
readonly id: Schema.String;
|
|
382
|
-
readonly
|
|
373
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
383
374
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
384
375
|
readonly base: Schema.String;
|
|
385
376
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -389,7 +380,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
389
380
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
390
381
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
391
382
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
392
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
383
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
393
384
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
394
385
|
readonly host: Schema.String;
|
|
395
386
|
readonly port: Schema.Int;
|
|
@@ -405,7 +396,7 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
405
396
|
}>, Schema.Struct<{
|
|
406
397
|
readonly state: Schema.Literal<"missing">;
|
|
407
398
|
}>]>>;
|
|
408
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
399
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"listCheckpoints", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Struct<{
|
|
409
400
|
readonly id: Schema.String;
|
|
410
401
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
411
402
|
readonly machine: Schema.String;
|
|
@@ -440,9 +431,9 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
440
431
|
readonly cpu: Schema.Int;
|
|
441
432
|
readonly ramMib: Schema.Int;
|
|
442
433
|
readonly diskGib: Schema.Int;
|
|
443
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof
|
|
434
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"deleteCheckpoint", Schema.Struct<{
|
|
444
435
|
readonly id: Schema.String;
|
|
445
|
-
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof
|
|
436
|
+
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"prebuildCheckpoint", Schema.Struct<{
|
|
446
437
|
readonly base: Schema.String;
|
|
447
438
|
readonly cpu: Schema.Int;
|
|
448
439
|
readonly ramMib: Schema.Int;
|
|
@@ -467,24 +458,23 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
|
|
|
467
458
|
readonly diskGib: Schema.Int;
|
|
468
459
|
}>;
|
|
469
460
|
readonly built: Schema.Boolean;
|
|
470
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
461
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"getHost", Schema.$Record<Schema.String, Schema.Never>, Schema.Struct<{
|
|
471
462
|
readonly id: Schema.String;
|
|
472
|
-
readonly
|
|
463
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
473
464
|
readonly version: Schema.String;
|
|
474
465
|
readonly runtimeVersion: Schema.String;
|
|
475
|
-
readonly captureFrom: Schema.Literals<readonly ["running", "stopped"]>;
|
|
476
466
|
readonly bases: Schema.$Array<Schema.String>;
|
|
477
467
|
}>, readonly (typeof Invalid)[], true, typeof Action.Anyone>, Action.Action<"getCapacity", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
478
468
|
readonly host: Schema.String;
|
|
479
|
-
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"
|
|
469
|
+
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"]>;
|
|
480
470
|
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
481
471
|
readonly used: Schema.Int;
|
|
482
472
|
}>, Schema.Struct<{
|
|
483
473
|
readonly host: Schema.String;
|
|
484
|
-
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"
|
|
474
|
+
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"]>;
|
|
485
475
|
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
486
476
|
readonly unread: Schema.$Array<Schema.String>;
|
|
487
|
-
}>]>>, readonly (typeof Invalid | typeof
|
|
477
|
+
}>]>>, readonly (typeof Invalid | typeof Internal)[], true, typeof Action.Anyone>], [], undefined>;
|
|
488
478
|
declare const actionsByName: {
|
|
489
479
|
readonly captureCheckpoint: Action.Action<"captureCheckpoint", Schema.Struct<{
|
|
490
480
|
readonly machine: Schema.String;
|
|
@@ -499,7 +489,7 @@ declare const actionsByName: {
|
|
|
499
489
|
readonly cpu: Schema.Int;
|
|
500
490
|
readonly ramMib: Schema.Int;
|
|
501
491
|
readonly diskGib: Schema.Int;
|
|
502
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof
|
|
492
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
503
493
|
readonly createMachine: Action.Action<"createMachine", Schema.Struct<{
|
|
504
494
|
readonly base: Schema.String;
|
|
505
495
|
readonly cpu: Schema.Int;
|
|
@@ -514,7 +504,7 @@ declare const actionsByName: {
|
|
|
514
504
|
readonly id: Schema.String;
|
|
515
505
|
}>, Schema.Struct<{
|
|
516
506
|
readonly id: Schema.String;
|
|
517
|
-
readonly
|
|
507
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
518
508
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
519
509
|
readonly base: Schema.String;
|
|
520
510
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -524,7 +514,7 @@ declare const actionsByName: {
|
|
|
524
514
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
525
515
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
526
516
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
527
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
517
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
528
518
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
529
519
|
readonly host: Schema.String;
|
|
530
520
|
readonly port: Schema.Int;
|
|
@@ -540,19 +530,19 @@ declare const actionsByName: {
|
|
|
540
530
|
}>, Schema.Struct<{
|
|
541
531
|
readonly state: Schema.Literal<"missing">;
|
|
542
532
|
}>]>>;
|
|
543
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
533
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
544
534
|
readonly deleteCheckpoint: Action.Action<"deleteCheckpoint", Schema.Struct<{
|
|
545
535
|
readonly id: Schema.String;
|
|
546
|
-
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof
|
|
536
|
+
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Internal)[], false, typeof Action.Anyone>;
|
|
547
537
|
readonly deleteMachine: Action.Action<"deleteMachine", Schema.Struct<{
|
|
548
538
|
readonly id: Schema.String;
|
|
549
|
-
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
539
|
+
}>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
550
540
|
readonly forkMachine: Action.Action<"forkMachine", Schema.Struct<{
|
|
551
541
|
readonly machine: Schema.String;
|
|
552
542
|
readonly name: Schema.String;
|
|
553
543
|
}>, Schema.Struct<{
|
|
554
544
|
readonly id: Schema.String;
|
|
555
|
-
readonly
|
|
545
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
556
546
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
557
547
|
readonly base: Schema.String;
|
|
558
548
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -562,7 +552,7 @@ declare const actionsByName: {
|
|
|
562
552
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
563
553
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
564
554
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
565
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
555
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
566
556
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
567
557
|
readonly host: Schema.String;
|
|
568
558
|
readonly port: Schema.Int;
|
|
@@ -578,18 +568,18 @@ declare const actionsByName: {
|
|
|
578
568
|
}>, Schema.Struct<{
|
|
579
569
|
readonly state: Schema.Literal<"missing">;
|
|
580
570
|
}>]>>;
|
|
581
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
571
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
582
572
|
readonly getCapacity: Action.Action<"getCapacity", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
583
573
|
readonly host: Schema.String;
|
|
584
|
-
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"
|
|
574
|
+
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"]>;
|
|
585
575
|
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
586
576
|
readonly used: Schema.Int;
|
|
587
577
|
}>, Schema.Struct<{
|
|
588
578
|
readonly host: Schema.String;
|
|
589
|
-
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"
|
|
579
|
+
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"]>;
|
|
590
580
|
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
591
581
|
readonly unread: Schema.$Array<Schema.String>;
|
|
592
|
-
}>]>>, readonly (typeof Invalid | typeof
|
|
582
|
+
}>]>>, readonly (typeof Invalid | typeof Internal)[], true, typeof Action.Anyone>;
|
|
593
583
|
readonly getCheckpoint: Action.Action<"getCheckpoint", Schema.Struct<{
|
|
594
584
|
readonly id: Schema.String;
|
|
595
585
|
}>, Schema.Struct<{
|
|
@@ -605,17 +595,16 @@ declare const actionsByName: {
|
|
|
605
595
|
}>, readonly (typeof Invalid | typeof NotFound | typeof Internal)[], true, typeof Action.Anyone>;
|
|
606
596
|
readonly getHost: Action.Action<"getHost", Schema.$Record<Schema.String, Schema.Never>, Schema.Struct<{
|
|
607
597
|
readonly id: Schema.String;
|
|
608
|
-
readonly
|
|
598
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
609
599
|
readonly version: Schema.String;
|
|
610
600
|
readonly runtimeVersion: Schema.String;
|
|
611
|
-
readonly captureFrom: Schema.Literals<readonly ["running", "stopped"]>;
|
|
612
601
|
readonly bases: Schema.$Array<Schema.String>;
|
|
613
602
|
}>, readonly (typeof Invalid)[], true, typeof Action.Anyone>;
|
|
614
603
|
readonly getMachine: Action.Action<"getMachine", Schema.Struct<{
|
|
615
604
|
readonly id: Schema.String;
|
|
616
605
|
}>, Schema.Struct<{
|
|
617
606
|
readonly id: Schema.String;
|
|
618
|
-
readonly
|
|
607
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
619
608
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
620
609
|
readonly base: Schema.String;
|
|
621
610
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -625,7 +614,7 @@ declare const actionsByName: {
|
|
|
625
614
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
626
615
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
627
616
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
628
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
617
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
629
618
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
630
619
|
readonly host: Schema.String;
|
|
631
620
|
readonly port: Schema.Int;
|
|
@@ -655,7 +644,7 @@ declare const actionsByName: {
|
|
|
655
644
|
}>>, readonly (typeof Invalid | typeof Internal)[], true, typeof Action.Anyone>;
|
|
656
645
|
readonly listMachines: Action.Action<"listMachines", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Struct<{
|
|
657
646
|
readonly id: Schema.String;
|
|
658
|
-
readonly
|
|
647
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
659
648
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
660
649
|
readonly base: Schema.String;
|
|
661
650
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -665,7 +654,7 @@ declare const actionsByName: {
|
|
|
665
654
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
666
655
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
667
656
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
668
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
657
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
669
658
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
670
659
|
readonly host: Schema.String;
|
|
671
660
|
readonly port: Schema.Int;
|
|
@@ -707,13 +696,13 @@ declare const actionsByName: {
|
|
|
707
696
|
readonly diskGib: Schema.Int;
|
|
708
697
|
}>;
|
|
709
698
|
readonly built: Schema.Boolean;
|
|
710
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
699
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
711
700
|
readonly restoreMachine: Action.Action<"restoreMachine", Schema.Struct<{
|
|
712
701
|
readonly checkpoint: Schema.String;
|
|
713
702
|
readonly name: Schema.String;
|
|
714
703
|
}>, Schema.Struct<{
|
|
715
704
|
readonly id: Schema.String;
|
|
716
|
-
readonly
|
|
705
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
717
706
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
718
707
|
readonly base: Schema.String;
|
|
719
708
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -723,7 +712,7 @@ declare const actionsByName: {
|
|
|
723
712
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
724
713
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
725
714
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
726
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
715
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
727
716
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
728
717
|
readonly host: Schema.String;
|
|
729
718
|
readonly port: Schema.Int;
|
|
@@ -739,12 +728,12 @@ declare const actionsByName: {
|
|
|
739
728
|
}>, Schema.Struct<{
|
|
740
729
|
readonly state: Schema.Literal<"missing">;
|
|
741
730
|
}>]>>;
|
|
742
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
731
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
743
732
|
readonly startMachine: Action.Action<"startMachine", Schema.Struct<{
|
|
744
733
|
readonly id: Schema.String;
|
|
745
734
|
}>, Schema.Struct<{
|
|
746
735
|
readonly id: Schema.String;
|
|
747
|
-
readonly
|
|
736
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
748
737
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
749
738
|
readonly base: Schema.String;
|
|
750
739
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -754,7 +743,7 @@ declare const actionsByName: {
|
|
|
754
743
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
755
744
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
756
745
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
757
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
746
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
758
747
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
759
748
|
readonly host: Schema.String;
|
|
760
749
|
readonly port: Schema.Int;
|
|
@@ -770,12 +759,12 @@ declare const actionsByName: {
|
|
|
770
759
|
}>, Schema.Struct<{
|
|
771
760
|
readonly state: Schema.Literal<"missing">;
|
|
772
761
|
}>]>>;
|
|
773
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
762
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
774
763
|
readonly stopMachine: Action.Action<"stopMachine", Schema.Struct<{
|
|
775
764
|
readonly id: Schema.String;
|
|
776
765
|
}>, Schema.Struct<{
|
|
777
766
|
readonly id: Schema.String;
|
|
778
|
-
readonly
|
|
767
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
779
768
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
780
769
|
readonly base: Schema.String;
|
|
781
770
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -785,7 +774,7 @@ declare const actionsByName: {
|
|
|
785
774
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
786
775
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
787
776
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
788
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
777
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
789
778
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
790
779
|
readonly host: Schema.String;
|
|
791
780
|
readonly port: Schema.Int;
|
|
@@ -801,14 +790,20 @@ declare const actionsByName: {
|
|
|
801
790
|
}>, Schema.Struct<{
|
|
802
791
|
readonly state: Schema.Literal<"missing">;
|
|
803
792
|
}>]>>;
|
|
804
|
-
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof
|
|
793
|
+
}>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
|
|
805
794
|
};
|
|
806
795
|
/** What a host may answer action `N` with: the errors the contract declares for it. */
|
|
807
796
|
type Declared<N extends keyof typeof actionsByName> = (typeof actionsByName)[N]["error"][number]["Type"];
|
|
808
797
|
//#endregion
|
|
809
798
|
//#region src/resources.d.ts
|
|
810
|
-
|
|
811
|
-
|
|
799
|
+
/** What a host's machines are: `linux` guests on smolvm, or `mac` guests on Tart. */
|
|
800
|
+
declare const Kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
801
|
+
type Kind = typeof Kind.Type;
|
|
802
|
+
/**
|
|
803
|
+
* The user a machine is logged in as, on either kind: the user a setup, run as root, leaves in the
|
|
804
|
+
* guest, for whom the host installs the operator's keys. Tart's bases ship it; never root.
|
|
805
|
+
*/
|
|
806
|
+
declare const loginUser = "admin";
|
|
812
807
|
/** What the operator asked a machine to be; the host keeps moving the machine toward it. */
|
|
813
808
|
declare const Desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
814
809
|
type Desired = typeof Desired.Type;
|
|
@@ -860,7 +855,7 @@ type TailnetStatus = typeof TailnetStatus.Type;
|
|
|
860
855
|
*/
|
|
861
856
|
declare const Machine: Schema.Struct<{
|
|
862
857
|
readonly id: Schema.String;
|
|
863
|
-
readonly
|
|
858
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
864
859
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
|
865
860
|
readonly base: Schema.String;
|
|
866
861
|
readonly profile: Schema.optionalKey<Schema.String>;
|
|
@@ -870,7 +865,7 @@ declare const Machine: Schema.Struct<{
|
|
|
870
865
|
readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
|
|
871
866
|
readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
|
|
872
867
|
readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
|
|
873
|
-
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof
|
|
868
|
+
readonly error: Schema.optionalKey<Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof Superseded, typeof NotOffered, typeof NotMade, typeof Missing, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Capacity, typeof Internal]>>;
|
|
874
869
|
readonly ssh: Schema.optionalKey<Schema.Struct<{
|
|
875
870
|
readonly host: Schema.String;
|
|
876
871
|
readonly port: Schema.Int;
|
|
@@ -894,8 +889,9 @@ type Machine = typeof Machine.Type;
|
|
|
894
889
|
*/
|
|
895
890
|
declare const stateLabel: ({ state, desired, phase }: Machine) => string;
|
|
896
891
|
/**
|
|
897
|
-
* `kind`
|
|
898
|
-
* once its capture is done, and never
|
|
892
|
+
* `kind` follows its host's: `ram` (RAM and disks) on linux, captured from a running machine, and
|
|
893
|
+
* `disk` on mac, from a stopped one. A checkpoint exists only once its capture is done, and never
|
|
894
|
+
* changes after.
|
|
899
895
|
*/
|
|
900
896
|
declare const Checkpoint: Schema.Struct<{
|
|
901
897
|
readonly id: Schema.String;
|
|
@@ -909,16 +905,12 @@ declare const Checkpoint: Schema.Struct<{
|
|
|
909
905
|
readonly diskGib: Schema.Int;
|
|
910
906
|
}>;
|
|
911
907
|
type Checkpoint = typeof Checkpoint.Type;
|
|
912
|
-
/**
|
|
913
|
-
* `runtimeVersion` is boat's API version on boat. `captureFrom` is the state a machine must be in
|
|
914
|
-
* to be captured: Tart's is `stopped`.
|
|
915
|
-
*/
|
|
908
|
+
/** `runtimeVersion` is the version of smolvm on linux, and of Tart on mac. */
|
|
916
909
|
declare const Host: Schema.Struct<{
|
|
917
910
|
readonly id: Schema.String;
|
|
918
|
-
readonly
|
|
911
|
+
readonly kind: Schema.Literals<readonly ["linux", "mac"]>;
|
|
919
912
|
readonly version: Schema.String;
|
|
920
913
|
readonly runtimeVersion: Schema.String;
|
|
921
|
-
readonly captureFrom: Schema.Literals<readonly ["running", "stopped"]>;
|
|
922
914
|
readonly bases: Schema.$Array<Schema.String>;
|
|
923
915
|
}>;
|
|
924
916
|
type Host = typeof Host.Type;
|
|
@@ -927,18 +919,18 @@ type Host = typeof Host.Type;
|
|
|
927
919
|
* needn't match the host's own machines. When a machine the sum counts couldn't be read, the
|
|
928
920
|
* sum would be a guess, so the row names those machines instead.
|
|
929
921
|
*
|
|
930
|
-
* `cpu` and `ramMib` are what the host's running machines were given, `runningVms
|
|
931
|
-
* VMs per Mac
|
|
922
|
+
* `cpu` and `ramMib` are what the host's running machines were given, and `runningVms`, on mac,
|
|
923
|
+
* Apple's two VMs per Mac.
|
|
932
924
|
* `limit` is there only where the host refuses an action that would pass it.
|
|
933
925
|
*/
|
|
934
926
|
declare const Usage: Schema.Union<readonly [Schema.Struct<{
|
|
935
927
|
readonly host: Schema.String;
|
|
936
|
-
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"
|
|
928
|
+
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"]>;
|
|
937
929
|
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
938
930
|
readonly used: Schema.Int;
|
|
939
931
|
}>, Schema.Struct<{
|
|
940
932
|
readonly host: Schema.String;
|
|
941
|
-
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"
|
|
933
|
+
readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms"]>;
|
|
942
934
|
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
943
935
|
readonly unread: Schema.$Array<Schema.String>;
|
|
944
936
|
}>]>;
|
|
@@ -1113,4 +1105,4 @@ declare class Client extends Client_base {}
|
|
|
1113
1105
|
declare const make: (hosts: ReadonlyArray<HostEntry>, options?: Options) => Effect.Effect<Interface, Invalid, HttpClient.HttpClient>;
|
|
1114
1106
|
declare const layer: (hosts: ReadonlyArray<HostEntry>, options?: Options) => Layer.Layer<Client, Invalid, HttpClient.HttpClient>;
|
|
1115
1107
|
//#endregion
|
|
1116
|
-
export {
|
|
1108
|
+
export { Capacity as A, PinMismatch as B, Usage as C, Http as D, Declared as E, Invalid as F, WrongState as G, Superseded as H, Missing as I, hostErrors as K, NotFound as L, Conflict as M, HostError as N, actionsByName as O, Internal as P, NotMade as R, TailnetStatus as S, stateLabel as T, Unavailable as U, ScriptFailed as V, Unsizable as W, PublicKeys as _, Options as a, SshEndpoint as b, CreateRequest as c, Kind as d, Machine as f, Prebuilt as g, PrebuildRequest as h, Interface as i, ClankerboxError as j, readTimeout as k, Desired as l, Phase as m, CreateOptions as n, client_d_exports as o, MachineSpec as p, retryable as q, HostEntry as r, Checkpoint as s, Client as t, Host as u, Reading as v, loginUser as w, SshLogin as x, Setup as y, NotOffered as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as Capacity, B as PinMismatch, C as Usage, D as Http, E as Declared, F as Invalid, G as WrongState, H as Superseded, I as Missing, K as hostErrors, L as NotFound, M as Conflict, N as HostError, O as actionsByName, P as Internal, R as NotMade, S as TailnetStatus, T as stateLabel, U as Unavailable, V as ScriptFailed, W as Unsizable, _ as PublicKeys, b as SshEndpoint, c as CreateRequest, d as Kind, f as Machine, g as Prebuilt, h as PrebuildRequest, i as Interface, j as ClankerboxError, k as readTimeout, l as Desired, m as Phase, n as CreateOptions$1, o as client_d_exports, p as MachineSpec, q as retryable, s as Checkpoint, u as Host, v as Reading, w as loginUser, x as SshLogin, y as Setup, z as NotOffered } from "./client-D6pHB56g.mjs";
|
|
2
2
|
import { Effect, FileSystem, Path, PlatformError, Schema, Scope } from "effect";
|
|
3
3
|
//#region src/ids.d.ts
|
|
4
4
|
export declare const HostId: Schema.String;
|
|
@@ -131,8 +131,8 @@ export declare const knownHostsLine: (name: string, hostKey: string) => string;
|
|
|
131
131
|
/**
|
|
132
132
|
* ssh's arguments to the target's address, pinned to its host key through a known-hosts file that
|
|
133
133
|
* lasts as long as the scope, which must outlast the ssh. The destination is the address, not the
|
|
134
|
-
* ID, so no ssh_config block for the ID applies. Ports change on fork
|
|
135
|
-
*
|
|
134
|
+
* ID, so no ssh_config block for the ID applies. Ports change on fork and restore, so read the
|
|
135
|
+
* target anew for each ssh.
|
|
136
136
|
*/
|
|
137
137
|
export declare const pinnedSsh: (target: SshTarget, user: string, extra: ReadonlyArray<string>) => Effect.Effect<Array<string>, PlatformError.PlatformError, FileSystem.FileSystem | Path.Path | Scope.Scope>;
|
|
138
138
|
//#endregion
|
|
@@ -152,4 +152,4 @@ export declare const formatMib: (mib: number) => string;
|
|
|
152
152
|
/** As a size flag takes it: `60G`. */
|
|
153
153
|
export declare const formatGib: (gib: number) => string;
|
|
154
154
|
//#endregion
|
|
155
|
-
export { Capacity, Checkpoint, ClankerboxError, client_d_exports as Client, Conflict, CreateRequest, Declared, Desired, Host, HostError, Http, Internal, Invalid, Machine, MachineSpec, Missing, NotFound, NotMade, NotOffered, Phase, PinMismatch, prebuild_d_exports as Prebuild, PrebuildRequest, Prebuilt, PublicKeys, Reading,
|
|
155
|
+
export { Capacity, Checkpoint, ClankerboxError, client_d_exports as Client, Conflict, CreateRequest, Declared, Desired, Host, HostError, Http, Internal, Invalid, Kind, Machine, MachineSpec, Missing, NotFound, NotMade, NotOffered, Phase, PinMismatch, prebuild_d_exports as Prebuild, PrebuildRequest, Prebuilt, PublicKeys, Reading, ScriptFailed, Setup, SshEndpoint, SshLogin, Superseded, TailnetStatus, Unavailable, Unsizable, Usage, WrongState, actionsByName, hostErrors, loginUser, readTimeout, retryable, stateLabel };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as Id, B as Invalid, C as SshEndpoint, D as loginUser, E as Usage, F as Capacity, G as PinMismatch, H as NotFound, I as ClankerboxError, J as Unavailable, K as ScriptFailed, L as Conflict, M as formatId, N as parseId, O as stateLabel, P as parseName, Q as retryable, R as HostError, S as Setup, T as TailnetStatus, U as NotMade, V as Missing, W as NotOffered, X as WrongState, Y as Unsizable, Z as hostErrors, _ as MachineSpec, a as release, b as Prebuilt, c as Http, d as Checkpoint, f as CreateRequest, g as Machine, h as Kind, i as describeIssues, j as Name, k as HostId, l as actionsByName, m as Host, o as version, p as Desired, q as Superseded, r as describeFileError, s as versionHeader, t as client_exports, u as readTimeout, v as Phase, w as SshLogin, x as PublicKeys, y as PrebuildRequest, z as Internal } from "./client-CW42FiN2.mjs";
|
|
3
3
|
import { Effect, FileSystem, Option, Path, Predicate, Record, Schema } from "effect";
|
|
4
4
|
import { Base64, Hex } from "effect/encoding";
|
|
5
5
|
//#region src/prebuild.ts
|
|
@@ -273,8 +273,8 @@ const sshArguments = (target, user, knownHosts, extra) => [
|
|
|
273
273
|
/**
|
|
274
274
|
* ssh's arguments to the target's address, pinned to its host key through a known-hosts file that
|
|
275
275
|
* lasts as long as the scope, which must outlast the ssh. The destination is the address, not the
|
|
276
|
-
* ID, so no ssh_config block for the ID applies. Ports change on fork
|
|
277
|
-
*
|
|
276
|
+
* ID, so no ssh_config block for the ID applies. Ports change on fork and restore, so read the
|
|
277
|
+
* target anew for each ssh.
|
|
278
278
|
*/
|
|
279
279
|
const pinnedSsh = (target, user, extra) => Effect.gen(function* () {
|
|
280
280
|
const fs = yield* FileSystem.FileSystem;
|
|
@@ -292,4 +292,4 @@ const formatMib = (mib) => mib >= 1024 && mib % 512 === 0 ? `${mib / mibPerGib}G
|
|
|
292
292
|
/** As a size flag takes it: `60G`. */
|
|
293
293
|
const formatGib = (gib) => `${gib}G`;
|
|
294
294
|
//#endregion
|
|
295
|
-
export { Capacity, Checkpoint, ClankerboxError, client_exports as Client, Conflict, CreateRequest, Desired, Host, HostError, HostId, Http, Id, Internal, Invalid, Machine, MachineSpec, Missing, Name, NotFound, NotMade, NotOffered, Phase, PinMismatch, prebuild_exports as Prebuild, PrebuildRequest, Prebuilt, Profile, PublicKeys,
|
|
295
|
+
export { Capacity, Checkpoint, ClankerboxError, client_exports as Client, Conflict, CreateRequest, Desired, Host, HostError, HostId, Http, Id, Internal, Invalid, Kind, Machine, MachineSpec, Missing, Name, NotFound, NotMade, NotOffered, Phase, PinMismatch, prebuild_exports as Prebuild, PrebuildRequest, Prebuilt, Profile, PublicKeys, ScriptFailed, Setup, SshEndpoint, SshLogin, Superseded, TailnetStatus, Unavailable, Unsizable, Usage, WrongState, actionsByName, describeFileError, describeIssues, formatGib, formatId, formatMib, hostErrors, knownHostsLine, loadProfile, loginUser, mibPerGib, packRecipe, parseId, parseName, pinnedSsh, readAuthorizedKeys, readSetup, readTimeout, release, retryable, specRequest, sshTarget, stateLabel, version, versionHeader };
|
package/dist/node.d.mts
CHANGED
package/dist/node.mjs
CHANGED