@gjermundgaraba/clankerbox-sdk 0.18.2 → 0.19.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.
@@ -25,18 +25,28 @@ declare const NotFound_base: Schema.Class<NotFound, Schema.TaggedStruct<"NotFoun
25
25
  }>, import("effect/Cause").YieldableError>;
26
26
  /** The machine or checkpoint doesn't exist. A `delete` that meets it is done. */
27
27
  declare class NotFound extends NotFound_base {}
28
- declare const ConflictKind: Schema.Literals<readonly ["exists", "busy"]>;
29
- type ConflictKind = typeof ConflictKind.Type;
30
28
  declare const Conflict_base: Schema.Class<Conflict, Schema.TaggedStruct<"Conflict", {
31
29
  readonly host: Schema.optionalKey<Schema.String>;
32
30
  readonly action: Schema.optionalKey<Schema.String>;
33
31
  readonly id: Schema.optionalKey<Schema.String>;
34
32
  readonly made: Schema.optionalKey<Schema.String>;
35
33
  readonly message: Schema.String;
36
- readonly kind: Schema.Literals<readonly ["exists", "busy"]>;
37
34
  }>, import("effect/Cause").YieldableError>;
38
- /** The name is taken (`exists`), or another action holds the resource (`busy`). */
35
+ /** The name is taken. */
39
36
  declare class Conflict extends Conflict_base {}
37
+ declare const Superseded_base: Schema.Class<Superseded, Schema.TaggedStruct<"Superseded", {
38
+ readonly host: Schema.optionalKey<Schema.String>;
39
+ readonly action: Schema.optionalKey<Schema.String>;
40
+ readonly id: Schema.optionalKey<Schema.String>;
41
+ readonly made: Schema.optionalKey<Schema.String>;
42
+ readonly message: Schema.String;
43
+ readonly by: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
44
+ }>, import("effect/Cause").YieldableError>;
45
+ /**
46
+ * A later request on the machine replaced this one before the host got there: `by` is what that
47
+ * request asked for. The machine's own state says where it is now.
48
+ */
49
+ declare class Superseded extends Superseded_base {}
40
50
  declare const NotOffered_base: Schema.Class<NotOffered, Schema.TaggedStruct<"NotOffered", {
41
51
  readonly host: Schema.optionalKey<Schema.String>;
42
52
  readonly action: Schema.optionalKey<Schema.String>;
@@ -55,7 +65,7 @@ declare const NotMade_base: Schema.Class<NotMade, Schema.TaggedStruct<"NotMade",
55
65
  readonly message: Schema.String;
56
66
  readonly machine: Schema.String;
57
67
  }>, import("effect/Cause").YieldableError>;
58
- /** `machine`'s create, fork or restore failed before it was made: it can only be deleted. */
68
+ /** `machine` isn't made yet: its create or setup still runs, so it can't be copied or captured. */
59
69
  declare class NotMade extends NotMade_base {}
60
70
  declare const Missing_base: Schema.Class<Missing, Schema.TaggedStruct<"Missing", {
61
71
  readonly host: Schema.optionalKey<Schema.String>;
@@ -67,16 +77,6 @@ declare const Missing_base: Schema.Class<Missing, Schema.TaggedStruct<"Missing",
67
77
  }>, import("effect/Cause").YieldableError>;
68
78
  /** The runtime no longer has `machine`: it can only be deleted. */
69
79
  declare class Missing extends Missing_base {}
70
- declare const NotReady_base: Schema.Class<NotReady, Schema.TaggedStruct<"NotReady", {
71
- readonly host: Schema.optionalKey<Schema.String>;
72
- readonly action: Schema.optionalKey<Schema.String>;
73
- readonly id: Schema.optionalKey<Schema.String>;
74
- readonly made: Schema.optionalKey<Schema.String>;
75
- readonly message: Schema.String;
76
- readonly checkpoint: Schema.String;
77
- }>, import("effect/Cause").YieldableError>;
78
- /** `checkpoint`'s capture failed, so nothing restores from it: it can only be deleted. */
79
- declare class NotReady extends NotReady_base {}
80
80
  declare const PinMismatch_base: Schema.Class<PinMismatch, Schema.TaggedStruct<"PinMismatch", {
81
81
  readonly host: Schema.optionalKey<Schema.String>;
82
82
  readonly action: Schema.optionalKey<Schema.String>;
@@ -113,11 +113,12 @@ declare const ScriptFailed_base: Schema.Class<ScriptFailed, Schema.TaggedStruct<
113
113
  readonly id: Schema.optionalKey<Schema.String>;
114
114
  readonly made: Schema.optionalKey<Schema.String>;
115
115
  readonly message: Schema.String;
116
- readonly script: Schema.Literals<readonly ["setup", "preparation"]>;
116
+ readonly script: Schema.String;
117
117
  }>, import("effect/Cause").YieldableError>;
118
118
  /**
119
119
  * A guest script exited non-zero or ran past its timeout; the message says which, with its
120
- * output's tail. A failed `setup` leaves the machine unmade, a failed `preparation` made.
120
+ * output's tail, and `script` names it: a failed `setup` deletes the machine, and a failed
121
+ * `preparation` runs again on the next start.
121
122
  */
122
123
  declare class ScriptFailed extends ScriptFailed_base {}
123
124
  declare const Refused_base: Schema.Class<Refused, Schema.TaggedStruct<"Refused", {
@@ -160,20 +161,22 @@ declare const Internal_base: Schema.Class<Internal, Schema.TaggedStruct<"Interna
160
161
  }>, import("effect/Cause").YieldableError>;
161
162
  declare class Internal extends Internal_base {}
162
163
  /** What a host may answer with; each action declares its own share. */
163
- declare const hostErrors: readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal];
164
- declare const HostError: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
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 Refused, typeof Capacity, typeof Internal];
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 Refused, typeof Capacity, typeof Internal]>;
165
166
  type HostError = typeof HostError.Type;
166
167
  /**
167
168
  * Each carries, where known: `host` and `action`, which the client sets; `id`, the resource the
168
169
  * error is about, which a host sets on `NotFound` and `Conflict` and the client sets to the call's
169
- * subject otherwise; and `made`, the resource a create, fork, restore or capture makes, which a
170
- * failure may leave behind.
170
+ * subject otherwise; and `made`, the resource a create, fork, restore or capture makes. The host
171
+ * deletes a machine whose copy or setup fails, again at each recheck while that delete fails, and
172
+ * keeps one whose preparation fails; a call whose answer was lost, `Unavailable`, may leave
173
+ * `made` behind unmade.
171
174
  */
172
- declare const ClankerboxError: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal, typeof Unavailable]>;
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 Refused, typeof Capacity, typeof Internal, typeof Unavailable]>;
173
176
  type ClankerboxError = typeof ClankerboxError.Type;
174
177
  /**
175
- * Whether the same call may succeed later: a busy resource or a full host may free up, and a read
176
- * that got no reply may get one.
178
+ * Whether the same call may succeed later: a full host may free up, and a read that got no reply
179
+ * may get one.
177
180
  */
178
181
  declare const retryable: (error: ClankerboxError) => boolean;
179
182
  //#endregion
@@ -190,21 +193,24 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
190
193
  readonly ramMib: Schema.Int;
191
194
  readonly diskGib: Schema.Int;
192
195
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
193
- readonly made: Schema.Boolean;
194
- readonly action: Schema.Union<readonly [Schema.Struct<{
195
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
196
- readonly status: Schema.Literals<readonly ["running", "done"]>;
197
- }>, Schema.Struct<{
198
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
199
- readonly status: Schema.Literal<"failed">;
200
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
201
- }>]>;
196
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
197
+ 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 Refused, typeof Capacity, typeof Internal]>>;
202
199
  readonly ssh: Schema.optionalKey<Schema.Struct<{
203
200
  readonly host: Schema.String;
204
201
  readonly port: Schema.Int;
205
202
  readonly user: Schema.String;
206
203
  }>>;
207
204
  readonly hostKey: Schema.optionalKey<Schema.String>;
205
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
206
+ readonly state: Schema.Literal<"joined">;
207
+ readonly name: Schema.optionalKey<Schema.String>;
208
+ }>, Schema.Struct<{
209
+ readonly state: Schema.Literal<"failed">;
210
+ readonly error: Schema.String;
211
+ }>, Schema.Struct<{
212
+ readonly state: Schema.Literal<"missing">;
213
+ }>]>>;
208
214
  }>>, readonly (typeof Invalid | typeof Internal)[], true, typeof Action.Anyone>, Action.Action<"getMachine", Schema.Struct<{
209
215
  readonly id: Schema.String;
210
216
  }>, Schema.Struct<{
@@ -217,21 +223,24 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
217
223
  readonly ramMib: Schema.Int;
218
224
  readonly diskGib: Schema.Int;
219
225
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
220
- readonly made: Schema.Boolean;
221
- readonly action: Schema.Union<readonly [Schema.Struct<{
222
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
223
- readonly status: Schema.Literals<readonly ["running", "done"]>;
224
- }>, Schema.Struct<{
225
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
226
- readonly status: Schema.Literal<"failed">;
227
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
228
- }>]>;
226
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
227
+ 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 Refused, typeof Capacity, typeof Internal]>>;
229
229
  readonly ssh: Schema.optionalKey<Schema.Struct<{
230
230
  readonly host: Schema.String;
231
231
  readonly port: Schema.Int;
232
232
  readonly user: Schema.String;
233
233
  }>>;
234
234
  readonly hostKey: Schema.optionalKey<Schema.String>;
235
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
236
+ readonly state: Schema.Literal<"joined">;
237
+ readonly name: Schema.optionalKey<Schema.String>;
238
+ }>, Schema.Struct<{
239
+ readonly state: Schema.Literal<"failed">;
240
+ readonly error: Schema.String;
241
+ }>, Schema.Struct<{
242
+ readonly state: Schema.Literal<"missing">;
243
+ }>]>>;
235
244
  }>, readonly (typeof Invalid | typeof NotFound | typeof Internal)[], true, typeof Action.Anyone>, Action.Action<"createMachine", Schema.Struct<{
236
245
  readonly base: Schema.String;
237
246
  readonly cpu: Schema.Int;
@@ -253,22 +262,25 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
253
262
  readonly ramMib: Schema.Int;
254
263
  readonly diskGib: Schema.Int;
255
264
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
256
- readonly made: Schema.Boolean;
257
- readonly action: Schema.Union<readonly [Schema.Struct<{
258
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
259
- readonly status: Schema.Literals<readonly ["running", "done"]>;
260
- }>, Schema.Struct<{
261
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
262
- readonly status: Schema.Literal<"failed">;
263
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
264
- }>]>;
265
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
266
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
267
+ 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 Refused, typeof Capacity, typeof Internal]>>;
265
268
  readonly ssh: Schema.optionalKey<Schema.Struct<{
266
269
  readonly host: Schema.String;
267
270
  readonly port: Schema.Int;
268
271
  readonly user: Schema.String;
269
272
  }>>;
270
273
  readonly hostKey: Schema.optionalKey<Schema.String>;
271
- }>, readonly (typeof Invalid | typeof Conflict | typeof NotOffered | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"startMachine", Schema.Struct<{
274
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
275
+ readonly state: Schema.Literal<"joined">;
276
+ readonly name: Schema.optionalKey<Schema.String>;
277
+ }>, Schema.Struct<{
278
+ readonly state: Schema.Literal<"failed">;
279
+ readonly error: Schema.String;
280
+ }>, Schema.Struct<{
281
+ readonly state: Schema.Literal<"missing">;
282
+ }>]>>;
283
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"startMachine", Schema.Struct<{
272
284
  readonly id: Schema.String;
273
285
  }>, Schema.Struct<{
274
286
  readonly id: Schema.String;
@@ -280,22 +292,25 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
280
292
  readonly ramMib: Schema.Int;
281
293
  readonly diskGib: Schema.Int;
282
294
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
283
- readonly made: Schema.Boolean;
284
- readonly action: Schema.Union<readonly [Schema.Struct<{
285
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
286
- readonly status: Schema.Literals<readonly ["running", "done"]>;
287
- }>, Schema.Struct<{
288
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
289
- readonly status: Schema.Literal<"failed">;
290
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
291
- }>]>;
295
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
296
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
297
+ 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 Refused, typeof Capacity, typeof Internal]>>;
292
298
  readonly ssh: Schema.optionalKey<Schema.Struct<{
293
299
  readonly host: Schema.String;
294
300
  readonly port: Schema.Int;
295
301
  readonly user: Schema.String;
296
302
  }>>;
297
303
  readonly hostKey: Schema.optionalKey<Schema.String>;
298
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"stopMachine", Schema.Struct<{
304
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
305
+ readonly state: Schema.Literal<"joined">;
306
+ readonly name: Schema.optionalKey<Schema.String>;
307
+ }>, Schema.Struct<{
308
+ readonly state: Schema.Literal<"failed">;
309
+ readonly error: Schema.String;
310
+ }>, Schema.Struct<{
311
+ readonly state: Schema.Literal<"missing">;
312
+ }>]>>;
313
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"stopMachine", Schema.Struct<{
299
314
  readonly id: Schema.String;
300
315
  }>, Schema.Struct<{
301
316
  readonly id: Schema.String;
@@ -307,24 +322,27 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
307
322
  readonly ramMib: Schema.Int;
308
323
  readonly diskGib: Schema.Int;
309
324
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
310
- readonly made: Schema.Boolean;
311
- readonly action: Schema.Union<readonly [Schema.Struct<{
312
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
313
- readonly status: Schema.Literals<readonly ["running", "done"]>;
314
- }>, Schema.Struct<{
315
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
316
- readonly status: Schema.Literal<"failed">;
317
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
318
- }>]>;
325
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
326
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
327
+ 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 Refused, typeof Capacity, typeof Internal]>>;
319
328
  readonly ssh: Schema.optionalKey<Schema.Struct<{
320
329
  readonly host: Schema.String;
321
330
  readonly port: Schema.Int;
322
331
  readonly user: Schema.String;
323
332
  }>>;
324
333
  readonly hostKey: Schema.optionalKey<Schema.String>;
325
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"deleteMachine", Schema.Struct<{
334
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
335
+ readonly state: Schema.Literal<"joined">;
336
+ readonly name: Schema.optionalKey<Schema.String>;
337
+ }>, Schema.Struct<{
338
+ readonly state: Schema.Literal<"failed">;
339
+ readonly error: Schema.String;
340
+ }>, Schema.Struct<{
341
+ readonly state: Schema.Literal<"missing">;
342
+ }>]>>;
343
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"deleteMachine", Schema.Struct<{
326
344
  readonly id: Schema.String;
327
- }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"forkMachine", Schema.Struct<{
345
+ }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"forkMachine", Schema.Struct<{
328
346
  readonly machine: Schema.String;
329
347
  readonly name: Schema.String;
330
348
  }>, Schema.Struct<{
@@ -337,22 +355,25 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
337
355
  readonly ramMib: Schema.Int;
338
356
  readonly diskGib: Schema.Int;
339
357
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
340
- readonly made: Schema.Boolean;
341
- readonly action: Schema.Union<readonly [Schema.Struct<{
342
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
343
- readonly status: Schema.Literals<readonly ["running", "done"]>;
344
- }>, Schema.Struct<{
345
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
346
- readonly status: Schema.Literal<"failed">;
347
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
348
- }>]>;
358
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
359
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
360
+ 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 Refused, typeof Capacity, typeof Internal]>>;
349
361
  readonly ssh: Schema.optionalKey<Schema.Struct<{
350
362
  readonly host: Schema.String;
351
363
  readonly port: Schema.Int;
352
364
  readonly user: Schema.String;
353
365
  }>>;
354
366
  readonly hostKey: Schema.optionalKey<Schema.String>;
355
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"restoreMachine", Schema.Struct<{
367
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
368
+ readonly state: Schema.Literal<"joined">;
369
+ readonly name: Schema.optionalKey<Schema.String>;
370
+ }>, Schema.Struct<{
371
+ readonly state: Schema.Literal<"failed">;
372
+ readonly error: Schema.String;
373
+ }>, Schema.Struct<{
374
+ readonly state: Schema.Literal<"missing">;
375
+ }>]>>;
376
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"restoreMachine", Schema.Struct<{
356
377
  readonly checkpoint: Schema.String;
357
378
  readonly name: Schema.String;
358
379
  }>, Schema.Struct<{
@@ -365,22 +386,25 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
365
386
  readonly ramMib: Schema.Int;
366
387
  readonly diskGib: Schema.Int;
367
388
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
368
- readonly made: Schema.Boolean;
369
- readonly action: Schema.Union<readonly [Schema.Struct<{
370
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
371
- readonly status: Schema.Literals<readonly ["running", "done"]>;
372
- }>, Schema.Struct<{
373
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
374
- readonly status: Schema.Literal<"failed">;
375
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
376
- }>]>;
389
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
390
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
391
+ 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 Refused, typeof Capacity, typeof Internal]>>;
377
392
  readonly ssh: Schema.optionalKey<Schema.Struct<{
378
393
  readonly host: Schema.String;
379
394
  readonly port: Schema.Int;
380
395
  readonly user: Schema.String;
381
396
  }>>;
382
397
  readonly hostKey: Schema.optionalKey<Schema.String>;
383
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotReady | typeof PinMismatch | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"listCheckpoints", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Struct<{
398
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
399
+ readonly state: Schema.Literal<"joined">;
400
+ readonly name: Schema.optionalKey<Schema.String>;
401
+ }>, Schema.Struct<{
402
+ readonly state: Schema.Literal<"failed">;
403
+ readonly error: Schema.String;
404
+ }>, Schema.Struct<{
405
+ readonly state: Schema.Literal<"missing">;
406
+ }>]>>;
407
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"listCheckpoints", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Struct<{
384
408
  readonly id: Schema.String;
385
409
  readonly createdAt: Schema.DateTimeUtcFromString;
386
410
  readonly machine: Schema.String;
@@ -390,14 +414,6 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
390
414
  readonly cpu: Schema.Int;
391
415
  readonly ramMib: Schema.Int;
392
416
  readonly diskGib: Schema.Int;
393
- readonly action: Schema.Union<readonly [Schema.Struct<{
394
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
395
- readonly status: Schema.Literals<readonly ["running", "done"]>;
396
- }>, Schema.Struct<{
397
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
398
- readonly status: Schema.Literal<"failed">;
399
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
400
- }>]>;
401
417
  }>>, readonly (typeof Invalid | typeof Internal)[], true, typeof Action.Anyone>, Action.Action<"getCheckpoint", Schema.Struct<{
402
418
  readonly id: Schema.String;
403
419
  }>, Schema.Struct<{
@@ -410,14 +426,6 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
410
426
  readonly cpu: Schema.Int;
411
427
  readonly ramMib: Schema.Int;
412
428
  readonly diskGib: Schema.Int;
413
- readonly action: Schema.Union<readonly [Schema.Struct<{
414
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
415
- readonly status: Schema.Literals<readonly ["running", "done"]>;
416
- }>, Schema.Struct<{
417
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
418
- readonly status: Schema.Literal<"failed">;
419
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
420
- }>]>;
421
429
  }>, readonly (typeof Invalid | typeof NotFound | typeof Internal)[], true, typeof Action.Anyone>, Action.Action<"captureCheckpoint", Schema.Struct<{
422
430
  readonly machine: Schema.String;
423
431
  readonly name: Schema.String;
@@ -431,17 +439,33 @@ declare const Http: ActionHttp.Binding<readonly [Action.Action<"listMachines", S
431
439
  readonly cpu: Schema.Int;
432
440
  readonly ramMib: Schema.Int;
433
441
  readonly diskGib: Schema.Int;
434
- readonly action: Schema.Union<readonly [Schema.Struct<{
435
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
436
- readonly status: Schema.Literals<readonly ["running", "done"]>;
437
- }>, Schema.Struct<{
438
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
439
- readonly status: Schema.Literal<"failed">;
440
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
441
- }>]>;
442
442
  }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"deleteCheckpoint", Schema.Struct<{
443
443
  readonly id: Schema.String;
444
- }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"getHost", Schema.$Record<Schema.String, Schema.Never>, Schema.Struct<{
444
+ }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"prebuildCheckpoint", Schema.Struct<{
445
+ readonly base: Schema.String;
446
+ readonly cpu: Schema.Int;
447
+ readonly ramMib: Schema.Int;
448
+ readonly diskGib: Schema.Int;
449
+ readonly profile: Schema.optionalKey<Schema.String>;
450
+ readonly id: Schema.String;
451
+ readonly setup: Schema.Struct<{
452
+ readonly script: Schema.String;
453
+ readonly timeoutSeconds: Schema.optionalKey<Schema.Int>;
454
+ }>;
455
+ }>, Schema.Struct<{
456
+ readonly checkpoint: Schema.Struct<{
457
+ readonly id: Schema.String;
458
+ readonly createdAt: Schema.DateTimeUtcFromString;
459
+ readonly machine: Schema.String;
460
+ readonly kind: Schema.Literals<readonly ["ram", "disk"]>;
461
+ readonly base: Schema.String;
462
+ readonly profile: Schema.optionalKey<Schema.String>;
463
+ readonly cpu: Schema.Int;
464
+ readonly ramMib: Schema.Int;
465
+ readonly diskGib: Schema.Int;
466
+ }>;
467
+ readonly built: Schema.Boolean;
468
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>, Action.Action<"getHost", Schema.$Record<Schema.String, Schema.Never>, Schema.Struct<{
445
469
  readonly id: Schema.String;
446
470
  readonly runtime: Schema.Literals<readonly ["smolvm", "tart", "boat"]>;
447
471
  readonly version: Schema.String;
@@ -473,14 +497,6 @@ declare const actionsByName: {
473
497
  readonly cpu: Schema.Int;
474
498
  readonly ramMib: Schema.Int;
475
499
  readonly diskGib: Schema.Int;
476
- readonly action: Schema.Union<readonly [Schema.Struct<{
477
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
478
- readonly status: Schema.Literals<readonly ["running", "done"]>;
479
- }>, Schema.Struct<{
480
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
481
- readonly status: Schema.Literal<"failed">;
482
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
483
- }>]>;
484
500
  }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
485
501
  readonly createMachine: Action.Action<"createMachine", Schema.Struct<{
486
502
  readonly base: Schema.String;
@@ -503,28 +519,31 @@ declare const actionsByName: {
503
519
  readonly ramMib: Schema.Int;
504
520
  readonly diskGib: Schema.Int;
505
521
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
506
- readonly made: Schema.Boolean;
507
- readonly action: Schema.Union<readonly [Schema.Struct<{
508
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
509
- readonly status: Schema.Literals<readonly ["running", "done"]>;
510
- }>, Schema.Struct<{
511
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
512
- readonly status: Schema.Literal<"failed">;
513
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
514
- }>]>;
522
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
523
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
524
+ 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 Refused, typeof Capacity, typeof Internal]>>;
515
525
  readonly ssh: Schema.optionalKey<Schema.Struct<{
516
526
  readonly host: Schema.String;
517
527
  readonly port: Schema.Int;
518
528
  readonly user: Schema.String;
519
529
  }>>;
520
530
  readonly hostKey: Schema.optionalKey<Schema.String>;
521
- }>, readonly (typeof Invalid | typeof Conflict | typeof NotOffered | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
531
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
532
+ readonly state: Schema.Literal<"joined">;
533
+ readonly name: Schema.optionalKey<Schema.String>;
534
+ }>, Schema.Struct<{
535
+ readonly state: Schema.Literal<"failed">;
536
+ readonly error: Schema.String;
537
+ }>, Schema.Struct<{
538
+ readonly state: Schema.Literal<"missing">;
539
+ }>]>>;
540
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
522
541
  readonly deleteCheckpoint: Action.Action<"deleteCheckpoint", Schema.Struct<{
523
542
  readonly id: Schema.String;
524
- }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>;
543
+ }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>;
525
544
  readonly deleteMachine: Action.Action<"deleteMachine", Schema.Struct<{
526
545
  readonly id: Schema.String;
527
- }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>;
546
+ }>, Schema.Void, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
528
547
  readonly forkMachine: Action.Action<"forkMachine", Schema.Struct<{
529
548
  readonly machine: Schema.String;
530
549
  readonly name: Schema.String;
@@ -538,22 +557,25 @@ declare const actionsByName: {
538
557
  readonly ramMib: Schema.Int;
539
558
  readonly diskGib: Schema.Int;
540
559
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
541
- readonly made: Schema.Boolean;
542
- readonly action: Schema.Union<readonly [Schema.Struct<{
543
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
544
- readonly status: Schema.Literals<readonly ["running", "done"]>;
545
- }>, Schema.Struct<{
546
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
547
- readonly status: Schema.Literal<"failed">;
548
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
549
- }>]>;
560
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
561
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
562
+ 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 Refused, typeof Capacity, typeof Internal]>>;
550
563
  readonly ssh: Schema.optionalKey<Schema.Struct<{
551
564
  readonly host: Schema.String;
552
565
  readonly port: Schema.Int;
553
566
  readonly user: Schema.String;
554
567
  }>>;
555
568
  readonly hostKey: Schema.optionalKey<Schema.String>;
556
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
569
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
570
+ readonly state: Schema.Literal<"joined">;
571
+ readonly name: Schema.optionalKey<Schema.String>;
572
+ }>, Schema.Struct<{
573
+ readonly state: Schema.Literal<"failed">;
574
+ readonly error: Schema.String;
575
+ }>, Schema.Struct<{
576
+ readonly state: Schema.Literal<"missing">;
577
+ }>]>>;
578
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
557
579
  readonly getCapacity: Action.Action<"getCapacity", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Union<readonly [Schema.Struct<{
558
580
  readonly host: Schema.String;
559
581
  readonly resource: Schema.Literals<readonly ["cpu", "ramMib", "runningVms", "activeSandboxes", "startsPerMinute", "startsPerHour", "startsPerDay"]>;
@@ -577,14 +599,6 @@ declare const actionsByName: {
577
599
  readonly cpu: Schema.Int;
578
600
  readonly ramMib: Schema.Int;
579
601
  readonly diskGib: Schema.Int;
580
- readonly action: Schema.Union<readonly [Schema.Struct<{
581
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
582
- readonly status: Schema.Literals<readonly ["running", "done"]>;
583
- }>, Schema.Struct<{
584
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
585
- readonly status: Schema.Literal<"failed">;
586
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
587
- }>]>;
588
602
  }>, readonly (typeof Invalid | typeof NotFound | typeof Internal)[], true, typeof Action.Anyone>;
589
603
  readonly getHost: Action.Action<"getHost", Schema.$Record<Schema.String, Schema.Never>, Schema.Struct<{
590
604
  readonly id: Schema.String;
@@ -606,21 +620,24 @@ declare const actionsByName: {
606
620
  readonly ramMib: Schema.Int;
607
621
  readonly diskGib: Schema.Int;
608
622
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
609
- readonly made: Schema.Boolean;
610
- readonly action: Schema.Union<readonly [Schema.Struct<{
611
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
612
- readonly status: Schema.Literals<readonly ["running", "done"]>;
613
- }>, Schema.Struct<{
614
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
615
- readonly status: Schema.Literal<"failed">;
616
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
617
- }>]>;
623
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
624
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
625
+ 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 Refused, typeof Capacity, typeof Internal]>>;
618
626
  readonly ssh: Schema.optionalKey<Schema.Struct<{
619
627
  readonly host: Schema.String;
620
628
  readonly port: Schema.Int;
621
629
  readonly user: Schema.String;
622
630
  }>>;
623
631
  readonly hostKey: Schema.optionalKey<Schema.String>;
632
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
633
+ readonly state: Schema.Literal<"joined">;
634
+ readonly name: Schema.optionalKey<Schema.String>;
635
+ }>, Schema.Struct<{
636
+ readonly state: Schema.Literal<"failed">;
637
+ readonly error: Schema.String;
638
+ }>, Schema.Struct<{
639
+ readonly state: Schema.Literal<"missing">;
640
+ }>]>>;
624
641
  }>, readonly (typeof Invalid | typeof NotFound | typeof Internal)[], true, typeof Action.Anyone>;
625
642
  readonly listCheckpoints: Action.Action<"listCheckpoints", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Struct<{
626
643
  readonly id: Schema.String;
@@ -632,14 +649,6 @@ declare const actionsByName: {
632
649
  readonly cpu: Schema.Int;
633
650
  readonly ramMib: Schema.Int;
634
651
  readonly diskGib: Schema.Int;
635
- readonly action: Schema.Union<readonly [Schema.Struct<{
636
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
637
- readonly status: Schema.Literals<readonly ["running", "done"]>;
638
- }>, Schema.Struct<{
639
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
640
- readonly status: Schema.Literal<"failed">;
641
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
642
- }>]>;
643
652
  }>>, readonly (typeof Invalid | typeof Internal)[], true, typeof Action.Anyone>;
644
653
  readonly listMachines: Action.Action<"listMachines", Schema.$Record<Schema.String, Schema.Never>, Schema.$Array<Schema.Struct<{
645
654
  readonly id: Schema.String;
@@ -651,22 +660,50 @@ declare const actionsByName: {
651
660
  readonly ramMib: Schema.Int;
652
661
  readonly diskGib: Schema.Int;
653
662
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
654
- readonly made: Schema.Boolean;
655
- readonly action: Schema.Union<readonly [Schema.Struct<{
656
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
657
- readonly status: Schema.Literals<readonly ["running", "done"]>;
658
- }>, Schema.Struct<{
659
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
660
- readonly status: Schema.Literal<"failed">;
661
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
662
- }>]>;
663
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
664
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
665
+ 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 Refused, typeof Capacity, typeof Internal]>>;
663
666
  readonly ssh: Schema.optionalKey<Schema.Struct<{
664
667
  readonly host: Schema.String;
665
668
  readonly port: Schema.Int;
666
669
  readonly user: Schema.String;
667
670
  }>>;
668
671
  readonly hostKey: Schema.optionalKey<Schema.String>;
672
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
673
+ readonly state: Schema.Literal<"joined">;
674
+ readonly name: Schema.optionalKey<Schema.String>;
675
+ }>, Schema.Struct<{
676
+ readonly state: Schema.Literal<"failed">;
677
+ readonly error: Schema.String;
678
+ }>, Schema.Struct<{
679
+ readonly state: Schema.Literal<"missing">;
680
+ }>]>>;
669
681
  }>>, readonly (typeof Invalid | typeof Internal)[], true, typeof Action.Anyone>;
682
+ readonly prebuildCheckpoint: Action.Action<"prebuildCheckpoint", Schema.Struct<{
683
+ readonly base: Schema.String;
684
+ readonly cpu: Schema.Int;
685
+ readonly ramMib: Schema.Int;
686
+ readonly diskGib: Schema.Int;
687
+ readonly profile: Schema.optionalKey<Schema.String>;
688
+ readonly id: Schema.String;
689
+ readonly setup: Schema.Struct<{
690
+ readonly script: Schema.String;
691
+ readonly timeoutSeconds: Schema.optionalKey<Schema.Int>;
692
+ }>;
693
+ }>, Schema.Struct<{
694
+ readonly checkpoint: Schema.Struct<{
695
+ readonly id: Schema.String;
696
+ readonly createdAt: Schema.DateTimeUtcFromString;
697
+ readonly machine: Schema.String;
698
+ readonly kind: Schema.Literals<readonly ["ram", "disk"]>;
699
+ readonly base: Schema.String;
700
+ readonly profile: Schema.optionalKey<Schema.String>;
701
+ readonly cpu: Schema.Int;
702
+ readonly ramMib: Schema.Int;
703
+ readonly diskGib: Schema.Int;
704
+ }>;
705
+ readonly built: Schema.Boolean;
706
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotOffered | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
670
707
  readonly restoreMachine: Action.Action<"restoreMachine", Schema.Struct<{
671
708
  readonly checkpoint: Schema.String;
672
709
  readonly name: Schema.String;
@@ -680,22 +717,25 @@ declare const actionsByName: {
680
717
  readonly ramMib: Schema.Int;
681
718
  readonly diskGib: Schema.Int;
682
719
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
683
- readonly made: Schema.Boolean;
684
- readonly action: Schema.Union<readonly [Schema.Struct<{
685
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
686
- readonly status: Schema.Literals<readonly ["running", "done"]>;
687
- }>, Schema.Struct<{
688
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
689
- readonly status: Schema.Literal<"failed">;
690
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
691
- }>]>;
720
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
721
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
722
+ 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 Refused, typeof Capacity, typeof Internal]>>;
692
723
  readonly ssh: Schema.optionalKey<Schema.Struct<{
693
724
  readonly host: Schema.String;
694
725
  readonly port: Schema.Int;
695
726
  readonly user: Schema.String;
696
727
  }>>;
697
728
  readonly hostKey: Schema.optionalKey<Schema.String>;
698
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotReady | typeof PinMismatch | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
729
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
730
+ readonly state: Schema.Literal<"joined">;
731
+ readonly name: Schema.optionalKey<Schema.String>;
732
+ }>, Schema.Struct<{
733
+ readonly state: Schema.Literal<"failed">;
734
+ readonly error: Schema.String;
735
+ }>, Schema.Struct<{
736
+ readonly state: Schema.Literal<"missing">;
737
+ }>]>>;
738
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
699
739
  readonly startMachine: Action.Action<"startMachine", Schema.Struct<{
700
740
  readonly id: Schema.String;
701
741
  }>, Schema.Struct<{
@@ -708,22 +748,25 @@ declare const actionsByName: {
708
748
  readonly ramMib: Schema.Int;
709
749
  readonly diskGib: Schema.Int;
710
750
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
711
- readonly made: Schema.Boolean;
712
- readonly action: Schema.Union<readonly [Schema.Struct<{
713
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
714
- readonly status: Schema.Literals<readonly ["running", "done"]>;
715
- }>, Schema.Struct<{
716
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
717
- readonly status: Schema.Literal<"failed">;
718
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
719
- }>]>;
751
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
752
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
753
+ 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 Refused, typeof Capacity, typeof Internal]>>;
720
754
  readonly ssh: Schema.optionalKey<Schema.Struct<{
721
755
  readonly host: Schema.String;
722
756
  readonly port: Schema.Int;
723
757
  readonly user: Schema.String;
724
758
  }>>;
725
759
  readonly hostKey: Schema.optionalKey<Schema.String>;
726
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof NotMade | typeof Missing | typeof WrongState | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
760
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
761
+ readonly state: Schema.Literal<"joined">;
762
+ readonly name: Schema.optionalKey<Schema.String>;
763
+ }>, Schema.Struct<{
764
+ readonly state: Schema.Literal<"failed">;
765
+ readonly error: Schema.String;
766
+ }>, Schema.Struct<{
767
+ readonly state: Schema.Literal<"missing">;
768
+ }>]>>;
769
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
727
770
  readonly stopMachine: Action.Action<"stopMachine", Schema.Struct<{
728
771
  readonly id: Schema.String;
729
772
  }>, Schema.Struct<{
@@ -736,22 +779,25 @@ declare const actionsByName: {
736
779
  readonly ramMib: Schema.Int;
737
780
  readonly diskGib: Schema.Int;
738
781
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
739
- readonly made: Schema.Boolean;
740
- readonly action: Schema.Union<readonly [Schema.Struct<{
741
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
742
- readonly status: Schema.Literals<readonly ["running", "done"]>;
743
- }>, Schema.Struct<{
744
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
745
- readonly status: Schema.Literal<"failed">;
746
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
747
- }>]>;
782
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
783
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
784
+ 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 Refused, typeof Capacity, typeof Internal]>>;
748
785
  readonly ssh: Schema.optionalKey<Schema.Struct<{
749
786
  readonly host: Schema.String;
750
787
  readonly port: Schema.Int;
751
788
  readonly user: Schema.String;
752
789
  }>>;
753
790
  readonly hostKey: Schema.optionalKey<Schema.String>;
754
- }>, readonly (typeof Invalid | typeof NotFound | typeof Conflict | typeof Refused | typeof Internal)[], false, typeof Action.Anyone>;
791
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
792
+ readonly state: Schema.Literal<"joined">;
793
+ readonly name: Schema.optionalKey<Schema.String>;
794
+ }>, Schema.Struct<{
795
+ readonly state: Schema.Literal<"failed">;
796
+ readonly error: Schema.String;
797
+ }>, Schema.Struct<{
798
+ readonly state: Schema.Literal<"missing">;
799
+ }>]>>;
800
+ }>, readonly (typeof Invalid | typeof NotFound | typeof Superseded | typeof NotMade | typeof Missing | typeof PinMismatch | typeof WrongState | typeof Unsizable | typeof ScriptFailed | typeof Refused | typeof Capacity | typeof Internal)[], false, typeof Action.Anyone>;
755
801
  };
756
802
  /** What a host may answer action `N` with: the errors the contract declares for it. */
757
803
  type Declared<N extends keyof typeof actionsByName> = (typeof actionsByName)[N]["error"][number]["Type"];
@@ -759,21 +805,19 @@ type Declared<N extends keyof typeof actionsByName> = (typeof actionsByName)[N][
759
805
  //#region src/resources.d.ts
760
806
  declare const Runtime: Schema.Literals<readonly ["smolvm", "tart", "boat"]>;
761
807
  type Runtime = typeof Runtime.Type;
762
- /** The contract's mutations, which record themselves on a resource's `action`. */
763
- declare const ActionName: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
764
- type ActionName = typeof ActionName.Type;
765
- declare const ActionStatus: Schema.Literals<readonly ["running", "failed", "done"]>;
766
- type ActionStatus = typeof ActionStatus.Type;
767
- /** A resource's last action; the next action replaces it. */
768
- declare const ActionRecord: Schema.Union<readonly [Schema.Struct<{
769
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
770
- readonly status: Schema.Literals<readonly ["running", "done"]>;
771
- }>, Schema.Struct<{
772
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
773
- readonly status: Schema.Literal<"failed">;
774
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
775
- }>]>;
776
- type ActionRecord = typeof ActionRecord.Type;
808
+ /** What the operator asked a machine to be; the host keeps moving the machine toward it. */
809
+ declare const Desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
810
+ type Desired = typeof Desired.Type;
811
+ /**
812
+ * What the host is doing about a machine. A request waits for a rest: `settled`, at rest with what
813
+ * was asked; `failed`, after a step failed, until the next request; `lost`, one the runtime no
814
+ * longer has, which can only be deleted; and `waiting`, one the runtime can't read, which fails the
815
+ * request and is read again at the host's next recheck. `creating` copies the machine and runs its
816
+ * setup, and a machine whose create or setup fails is deleted. `starting` starts the machine, also
817
+ * when it runs already, and prepares it.
818
+ */
819
+ declare const Phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
820
+ type Phase = typeof Phase.Type;
777
821
  declare const SshEndpoint: Schema.Struct<{
778
822
  readonly host: Schema.String;
779
823
  readonly port: Schema.Int;
@@ -786,10 +830,29 @@ declare const SshLogin: Schema.Struct<{
786
830
  }>;
787
831
  type SshLogin = typeof SshLogin.Type;
788
832
  /**
789
- * `state` is `missing` when the runtime doesn't have the machine, and `unknown` when it couldn't
790
- * be read. Until its create, fork or restore has `made` it, a machine can only be read, stopped or
791
- * deleted. `ssh` is only on a running machine whose runtime gives it an endpoint, and `hostKey`,
792
- * `<type> <base64>`, once preparation has recorded it.
833
+ * A running machine's place on the tailnet, as the host last checked it: `joined` once
834
+ * `tailscaled` runs signed in, with the MagicDNS name Tailscale gave it, if any; `failed` with
835
+ * why; or `missing` when the guest has no `tailscaled`. Kept in the host's memory only: each start
836
+ * checks again, a joined machine is checked again every half hour or so, and a failed one sooner,
837
+ * waiting longer after each failure.
838
+ */
839
+ declare const TailnetStatus: Schema.Union<readonly [Schema.Struct<{
840
+ readonly state: Schema.Literal<"joined">;
841
+ readonly name: Schema.optionalKey<Schema.String>;
842
+ }>, Schema.Struct<{
843
+ readonly state: Schema.Literal<"failed">;
844
+ readonly error: Schema.String;
845
+ }>, Schema.Struct<{
846
+ readonly state: Schema.Literal<"missing">;
847
+ }>]>;
848
+ type TailnetStatus = typeof TailnetStatus.Type;
849
+ /**
850
+ * `state` is what the runtime reports: `missing` when it doesn't have the machine, and `unknown`
851
+ * when it couldn't be read. `desired` is what the last request asked for, `phase` what the host is
852
+ * doing about it, and `error` why the last step failed, until the next request. `ssh` is only
853
+ * on a running machine whose runtime gives it an endpoint, and `hostKey`, `<type> <base64>`, once
854
+ * preparation has recorded it. `tailnet` is on a running machine of a host that joins its machines
855
+ * to a tailnet, once the host has checked it.
793
856
  */
794
857
  declare const Machine: Schema.Struct<{
795
858
  readonly id: Schema.String;
@@ -801,26 +864,35 @@ declare const Machine: Schema.Struct<{
801
864
  readonly ramMib: Schema.Int;
802
865
  readonly diskGib: Schema.Int;
803
866
  readonly state: Schema.Literals<readonly ["running", "stopped", "missing", "unknown"]>;
804
- readonly made: Schema.Boolean;
805
- readonly action: Schema.Union<readonly [Schema.Struct<{
806
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
807
- readonly status: Schema.Literals<readonly ["running", "done"]>;
808
- }>, Schema.Struct<{
809
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
810
- readonly status: Schema.Literal<"failed">;
811
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
812
- }>]>;
867
+ readonly desired: Schema.Literals<readonly ["running", "stopped", "deleted"]>;
868
+ readonly phase: Schema.Literals<readonly ["observing", "waiting", "creating", "starting", "stopping", "deleting", "settled", "failed", "lost"]>;
869
+ 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 Refused, typeof Capacity, typeof Internal]>>;
813
870
  readonly ssh: Schema.optionalKey<Schema.Struct<{
814
871
  readonly host: Schema.String;
815
872
  readonly port: Schema.Int;
816
873
  readonly user: Schema.String;
817
874
  }>>;
818
875
  readonly hostKey: Schema.optionalKey<Schema.String>;
876
+ readonly tailnet: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
877
+ readonly state: Schema.Literal<"joined">;
878
+ readonly name: Schema.optionalKey<Schema.String>;
879
+ }>, Schema.Struct<{
880
+ readonly state: Schema.Literal<"failed">;
881
+ readonly error: Schema.String;
882
+ }>, Schema.Struct<{
883
+ readonly state: Schema.Literal<"missing">;
884
+ }>]>>;
819
885
  }>;
820
886
  type Machine = typeof Machine.Type;
821
- /** The state as people read it: `running`, or `stopped (unmade)` for one never made. */
822
- declare const stateLabel: ({ state, made }: Machine) => string;
823
- /** `kind` is `ram` (RAM and disks) on smolvm, and `disk` on Tart and boat. */
887
+ /**
888
+ * The state as people read it: `running` at rest, `running (failed)` where it is but not at rest,
889
+ * and `stopped, wants running (starting)` on the way.
890
+ */
891
+ declare const stateLabel: ({ state, desired, phase }: Machine) => string;
892
+ /**
893
+ * `kind` is `ram` (RAM and disks) on smolvm, and `disk` on Tart and boat. A checkpoint exists only
894
+ * once its capture is done, and never changes after.
895
+ */
824
896
  declare const Checkpoint: Schema.Struct<{
825
897
  readonly id: Schema.String;
826
898
  readonly createdAt: Schema.DateTimeUtcFromString;
@@ -831,18 +903,8 @@ declare const Checkpoint: Schema.Struct<{
831
903
  readonly cpu: Schema.Int;
832
904
  readonly ramMib: Schema.Int;
833
905
  readonly diskGib: Schema.Int;
834
- readonly action: Schema.Union<readonly [Schema.Struct<{
835
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
836
- readonly status: Schema.Literals<readonly ["running", "done"]>;
837
- }>, Schema.Struct<{
838
- readonly name: Schema.Literals<readonly ["createMachine", "startMachine", "stopMachine", "deleteMachine", "forkMachine", "restoreMachine", "captureCheckpoint", "deleteCheckpoint"]>;
839
- readonly status: Schema.Literal<"failed">;
840
- readonly error: Schema.Union<readonly [typeof Invalid, typeof NotFound, typeof Conflict, typeof NotOffered, typeof NotMade, typeof Missing, typeof NotReady, typeof PinMismatch, typeof WrongState, typeof Unsizable, typeof ScriptFailed, typeof Refused, typeof Capacity, typeof Internal]>;
841
- }>]>;
842
906
  }>;
843
907
  type Checkpoint = typeof Checkpoint.Type;
844
- /** A checkpoint restores once its capture is done; it never changes after. */
845
- declare const isReady: (checkpoint: Pick<Checkpoint, "action">) => boolean;
846
908
  /**
847
909
  * `runtimeVersion` is boat's API version on boat. `captureFrom` is the state a machine must be in
848
910
  * to be captured: Tart's is `stopped`.
@@ -913,6 +975,36 @@ declare const CreateRequest: Schema.Struct<{
913
975
  readonly id: Schema.String;
914
976
  }>;
915
977
  type CreateRequest = typeof CreateRequest.Type;
978
+ /** A prebuild is the checkpoint `id` of a machine made from the spec, setup and all. */
979
+ declare const PrebuildRequest: Schema.Struct<{
980
+ readonly base: Schema.String;
981
+ readonly cpu: Schema.Int;
982
+ readonly ramMib: Schema.Int;
983
+ readonly diskGib: Schema.Int;
984
+ readonly profile: Schema.optionalKey<Schema.String>;
985
+ readonly id: Schema.String;
986
+ readonly setup: Schema.Struct<{
987
+ readonly script: Schema.String;
988
+ readonly timeoutSeconds: Schema.optionalKey<Schema.Int>;
989
+ }>;
990
+ }>;
991
+ type PrebuildRequest = typeof PrebuildRequest.Type;
992
+ /** `built` is false when the host already had the checkpoint. */
993
+ declare const Prebuilt: Schema.Struct<{
994
+ readonly checkpoint: Schema.Struct<{
995
+ readonly id: Schema.String;
996
+ readonly createdAt: Schema.DateTimeUtcFromString;
997
+ readonly machine: Schema.String;
998
+ readonly kind: Schema.Literals<readonly ["ram", "disk"]>;
999
+ readonly base: Schema.String;
1000
+ readonly profile: Schema.optionalKey<Schema.String>;
1001
+ readonly cpu: Schema.Int;
1002
+ readonly ramMib: Schema.Int;
1003
+ readonly diskGib: Schema.Int;
1004
+ }>;
1005
+ readonly built: Schema.Boolean;
1006
+ }>;
1007
+ type Prebuilt = typeof Prebuilt.Type;
916
1008
  declare namespace client_d_exports {
917
1009
  export { Calls, Client, CreateOptions, Deleted, ErrorOf, Gathered, HostAction, HostEntry, Interface, Options, Routed, Unreachable, layer, make };
918
1010
  }
@@ -969,7 +1061,7 @@ type Routed = { readonly [N in HostAction]: Input<N> extends Subject ? N : never
969
1061
  /**
970
1062
  * One method per action on a resource, named and typed as in the contract, but for `create` and
971
1063
  * the deletes. A create, fork, restore or capture's errors carry `made`, the resource it makes, so
972
- * a caller can find what a failure left behind.
1064
+ * a caller whose answer was lost can find what it left behind.
973
1065
  */
974
1066
  type Calls = { readonly [N in Exclude<Routed, "createMachine" | "deleteMachine" | "deleteCheckpoint">]: (input: Input<N>) => Effect.Effect<Success<N>, ErrorOf<N>>; };
975
1067
  interface Interface extends Calls {
@@ -1004,4 +1096,4 @@ declare class Client extends Client_base {}
1004
1096
  declare const make: (hosts: ReadonlyArray<HostEntry>, options?: Options) => Effect.Effect<Interface, Invalid, HttpClient.HttpClient>;
1005
1097
  declare const layer: (hosts: ReadonlyArray<HostEntry>, options?: Options) => Layer.Layer<Client, Invalid, HttpClient.HttpClient>;
1006
1098
  //#endregion
1007
- export { ConflictKind as A, Refused as B, Declared as C, Capacity as D, readTimeout as E, NotFound as F, hostErrors as G, Unavailable as H, NotMade as I, retryable as K, NotOffered as L, Internal as M, Invalid as N, ClankerboxError as O, Missing as P, NotReady as R, stateLabel as S, actionsByName as T, Unsizable as U, ScriptFailed as V, WrongState as W, Setup as _, Options as a, Usage as b, ActionRecord as c, CreateRequest as d, Host as f, Runtime as g, Reading as h, Interface as i, HostError as j, Conflict as k, ActionStatus as l, MachineSpec as m, CreateOptions as n, client_d_exports as o, Machine as p, HostEntry as r, ActionName as s, Client as t, Checkpoint as u, SshEndpoint as v, Http as w, isReady as x, SshLogin as y, PinMismatch as z };
1099
+ export { Conflict as A, ScriptFailed as B, stateLabel as C, readTimeout as D, actionsByName as E, NotFound as F, hostErrors as G, Unavailable as H, NotMade as I, retryable as K, NotOffered as L, Internal as M, Invalid as N, Capacity as O, Missing as P, PinMismatch as R, Usage as S, Http as T, Unsizable as U, Superseded as V, WrongState as W, Runtime as _, Options as a, SshLogin as b, CreateRequest as c, Machine as d, MachineSpec as f, Reading as g, Prebuilt as h, Interface as i, HostError as j, ClankerboxError as k, Desired as l, PrebuildRequest as m, CreateOptions as n, client_d_exports as o, Phase as p, HostEntry as r, Checkpoint as s, Client as t, Host as u, Setup as v, Declared as w, TailnetStatus as x, SshEndpoint as y, Refused as z };