@zgeoff/imp-client 0.0.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.
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/dist/index.d.ts +2265 -0
- package/dist/index.js +678 -0
- package/package.json +38 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2265 @@
|
|
|
1
|
+
import { ORPCError, isDefinedError, safe } from "@orpc/client";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
import { ContractRouterClient } from "@orpc/contract";
|
|
4
|
+
//#region ../api/src/checkpoint-schema.d.ts
|
|
5
|
+
declare const CheckpointSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
label: z.ZodOptional<z.ZodString>;
|
|
8
|
+
createdAt: z.ZodDate;
|
|
9
|
+
sizeBytes: z.ZodOptional<z.ZodInt>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type Checkpoint = z.infer<typeof CheckpointSchema>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region ../api/src/exec-protocol.d.ts
|
|
14
|
+
declare const DETACH_REASONS: readonly ['taken_over', 'slow', 'lost'];
|
|
15
|
+
type DetachReason = (typeof DETACH_REASONS)[number];
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../api/src/image-schema.d.ts
|
|
18
|
+
declare const ImageSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
ref: z.ZodString;
|
|
22
|
+
digest: z.ZodString;
|
|
23
|
+
createdAt: z.ZodDate;
|
|
24
|
+
sizeBytes: z.ZodInt;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
type Image = z.infer<typeof ImageSchema>;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region ../api/src/imp-contract.d.ts
|
|
29
|
+
declare const impContract: {
|
|
30
|
+
imps: {
|
|
31
|
+
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
32
|
+
name: z.ZodOptional<z.ZodString>;
|
|
33
|
+
image: z.ZodOptional<z.ZodString>;
|
|
34
|
+
vcpus: z.ZodOptional<z.ZodInt>;
|
|
35
|
+
memoryMib: z.ZodOptional<z.ZodInt>;
|
|
36
|
+
httpPort: z.ZodOptional<z.ZodInt>;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
image: z.ZodString;
|
|
41
|
+
state: z.ZodEnum<{
|
|
42
|
+
creating: "creating";
|
|
43
|
+
error: "error";
|
|
44
|
+
running: "running";
|
|
45
|
+
sleeping: "sleeping";
|
|
46
|
+
stopped: "stopped";
|
|
47
|
+
}>;
|
|
48
|
+
vcpus: z.ZodInt;
|
|
49
|
+
memoryMib: z.ZodInt;
|
|
50
|
+
ip: z.ZodIPv4;
|
|
51
|
+
slot: z.ZodInt;
|
|
52
|
+
port: z.ZodInt;
|
|
53
|
+
httpPort: z.ZodInt;
|
|
54
|
+
url: z.ZodURL;
|
|
55
|
+
createdAt: z.ZodDate;
|
|
56
|
+
lastActiveAt: z.ZodDate;
|
|
57
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
58
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
59
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
60
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
61
|
+
error: z.ZodOptional<z.ZodString>;
|
|
62
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
63
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
64
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
65
|
+
agent: "agent";
|
|
66
|
+
firecracker: "firecracker";
|
|
67
|
+
impd: "impd";
|
|
68
|
+
kernel: "kernel";
|
|
69
|
+
}>>>>;
|
|
70
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
71
|
+
NOT_FOUND: {
|
|
72
|
+
readonly message: "Not found";
|
|
73
|
+
readonly data: z.ZodObject<{
|
|
74
|
+
kind: z.ZodEnum<{
|
|
75
|
+
checkpoint: "checkpoint";
|
|
76
|
+
image: "image";
|
|
77
|
+
imp: "imp";
|
|
78
|
+
session: "session";
|
|
79
|
+
}>;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
};
|
|
83
|
+
CONFLICT: {
|
|
84
|
+
readonly message: "Already exists";
|
|
85
|
+
readonly data: z.ZodObject<{
|
|
86
|
+
kind: z.ZodEnum<{
|
|
87
|
+
checkpoint: "checkpoint";
|
|
88
|
+
image: "image";
|
|
89
|
+
imp: "imp";
|
|
90
|
+
session: "session";
|
|
91
|
+
}>;
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
};
|
|
95
|
+
FORBIDDEN: {
|
|
96
|
+
readonly message: "Not allowed";
|
|
97
|
+
};
|
|
98
|
+
RAM_BUDGET_EXCEEDED: {
|
|
99
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
100
|
+
readonly status: 503;
|
|
101
|
+
readonly data: z.ZodObject<{
|
|
102
|
+
budgetMib: z.ZodInt;
|
|
103
|
+
usedMib: z.ZodInt;
|
|
104
|
+
requestedMib: z.ZodInt;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
};
|
|
107
|
+
SERVICE_UNAVAILABLE: {
|
|
108
|
+
readonly message: "impd is stopping";
|
|
109
|
+
};
|
|
110
|
+
INVALID_STATE: {
|
|
111
|
+
readonly message: "The imp is not in a state that allows this";
|
|
112
|
+
readonly status: 409;
|
|
113
|
+
readonly data: z.ZodObject<{
|
|
114
|
+
state: z.ZodEnum<{
|
|
115
|
+
creating: "creating";
|
|
116
|
+
error: "error";
|
|
117
|
+
running: "running";
|
|
118
|
+
sleeping: "sleeping";
|
|
119
|
+
stopped: "stopped";
|
|
120
|
+
}>;
|
|
121
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
122
|
+
creating: "creating";
|
|
123
|
+
error: "error";
|
|
124
|
+
running: "running";
|
|
125
|
+
sleeping: "sleeping";
|
|
126
|
+
stopped: "stopped";
|
|
127
|
+
}>>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
};
|
|
130
|
+
AGENT_OUTDATED: {
|
|
131
|
+
readonly message: "The imp's agent is too old for this";
|
|
132
|
+
readonly status: 409;
|
|
133
|
+
};
|
|
134
|
+
}>, Record<never, never>>;
|
|
135
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
136
|
+
id: z.ZodString;
|
|
137
|
+
name: z.ZodString;
|
|
138
|
+
image: z.ZodString;
|
|
139
|
+
state: z.ZodEnum<{
|
|
140
|
+
creating: "creating";
|
|
141
|
+
error: "error";
|
|
142
|
+
running: "running";
|
|
143
|
+
sleeping: "sleeping";
|
|
144
|
+
stopped: "stopped";
|
|
145
|
+
}>;
|
|
146
|
+
vcpus: z.ZodInt;
|
|
147
|
+
memoryMib: z.ZodInt;
|
|
148
|
+
ip: z.ZodIPv4;
|
|
149
|
+
slot: z.ZodInt;
|
|
150
|
+
port: z.ZodInt;
|
|
151
|
+
httpPort: z.ZodInt;
|
|
152
|
+
url: z.ZodURL;
|
|
153
|
+
createdAt: z.ZodDate;
|
|
154
|
+
lastActiveAt: z.ZodDate;
|
|
155
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
156
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
157
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
158
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
159
|
+
error: z.ZodOptional<z.ZodString>;
|
|
160
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
161
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
162
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
163
|
+
agent: "agent";
|
|
164
|
+
firecracker: "firecracker";
|
|
165
|
+
impd: "impd";
|
|
166
|
+
kernel: "kernel";
|
|
167
|
+
}>>>>;
|
|
168
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
169
|
+
NOT_FOUND: {
|
|
170
|
+
readonly message: "Not found";
|
|
171
|
+
readonly data: z.ZodObject<{
|
|
172
|
+
kind: z.ZodEnum<{
|
|
173
|
+
checkpoint: "checkpoint";
|
|
174
|
+
image: "image";
|
|
175
|
+
imp: "imp";
|
|
176
|
+
session: "session";
|
|
177
|
+
}>;
|
|
178
|
+
name: z.ZodString;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
};
|
|
181
|
+
CONFLICT: {
|
|
182
|
+
readonly message: "Already exists";
|
|
183
|
+
readonly data: z.ZodObject<{
|
|
184
|
+
kind: z.ZodEnum<{
|
|
185
|
+
checkpoint: "checkpoint";
|
|
186
|
+
image: "image";
|
|
187
|
+
imp: "imp";
|
|
188
|
+
session: "session";
|
|
189
|
+
}>;
|
|
190
|
+
name: z.ZodString;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
};
|
|
193
|
+
FORBIDDEN: {
|
|
194
|
+
readonly message: "Not allowed";
|
|
195
|
+
};
|
|
196
|
+
RAM_BUDGET_EXCEEDED: {
|
|
197
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
198
|
+
readonly status: 503;
|
|
199
|
+
readonly data: z.ZodObject<{
|
|
200
|
+
budgetMib: z.ZodInt;
|
|
201
|
+
usedMib: z.ZodInt;
|
|
202
|
+
requestedMib: z.ZodInt;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
};
|
|
205
|
+
SERVICE_UNAVAILABLE: {
|
|
206
|
+
readonly message: "impd is stopping";
|
|
207
|
+
};
|
|
208
|
+
INVALID_STATE: {
|
|
209
|
+
readonly message: "The imp is not in a state that allows this";
|
|
210
|
+
readonly status: 409;
|
|
211
|
+
readonly data: z.ZodObject<{
|
|
212
|
+
state: z.ZodEnum<{
|
|
213
|
+
creating: "creating";
|
|
214
|
+
error: "error";
|
|
215
|
+
running: "running";
|
|
216
|
+
sleeping: "sleeping";
|
|
217
|
+
stopped: "stopped";
|
|
218
|
+
}>;
|
|
219
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
220
|
+
creating: "creating";
|
|
221
|
+
error: "error";
|
|
222
|
+
running: "running";
|
|
223
|
+
sleeping: "sleeping";
|
|
224
|
+
stopped: "stopped";
|
|
225
|
+
}>>;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
};
|
|
228
|
+
AGENT_OUTDATED: {
|
|
229
|
+
readonly message: "The imp's agent is too old for this";
|
|
230
|
+
readonly status: 409;
|
|
231
|
+
};
|
|
232
|
+
}>, Record<never, never>>;
|
|
233
|
+
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
234
|
+
name: z.ZodString;
|
|
235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
name: z.ZodString;
|
|
238
|
+
image: z.ZodString;
|
|
239
|
+
state: z.ZodEnum<{
|
|
240
|
+
creating: "creating";
|
|
241
|
+
error: "error";
|
|
242
|
+
running: "running";
|
|
243
|
+
sleeping: "sleeping";
|
|
244
|
+
stopped: "stopped";
|
|
245
|
+
}>;
|
|
246
|
+
vcpus: z.ZodInt;
|
|
247
|
+
memoryMib: z.ZodInt;
|
|
248
|
+
ip: z.ZodIPv4;
|
|
249
|
+
slot: z.ZodInt;
|
|
250
|
+
port: z.ZodInt;
|
|
251
|
+
httpPort: z.ZodInt;
|
|
252
|
+
url: z.ZodURL;
|
|
253
|
+
createdAt: z.ZodDate;
|
|
254
|
+
lastActiveAt: z.ZodDate;
|
|
255
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
256
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
257
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
258
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
259
|
+
error: z.ZodOptional<z.ZodString>;
|
|
260
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
261
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
262
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
263
|
+
agent: "agent";
|
|
264
|
+
firecracker: "firecracker";
|
|
265
|
+
impd: "impd";
|
|
266
|
+
kernel: "kernel";
|
|
267
|
+
}>>>>;
|
|
268
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
269
|
+
NOT_FOUND: {
|
|
270
|
+
readonly message: "Not found";
|
|
271
|
+
readonly data: z.ZodObject<{
|
|
272
|
+
kind: z.ZodEnum<{
|
|
273
|
+
checkpoint: "checkpoint";
|
|
274
|
+
image: "image";
|
|
275
|
+
imp: "imp";
|
|
276
|
+
session: "session";
|
|
277
|
+
}>;
|
|
278
|
+
name: z.ZodString;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
};
|
|
281
|
+
CONFLICT: {
|
|
282
|
+
readonly message: "Already exists";
|
|
283
|
+
readonly data: z.ZodObject<{
|
|
284
|
+
kind: z.ZodEnum<{
|
|
285
|
+
checkpoint: "checkpoint";
|
|
286
|
+
image: "image";
|
|
287
|
+
imp: "imp";
|
|
288
|
+
session: "session";
|
|
289
|
+
}>;
|
|
290
|
+
name: z.ZodString;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
};
|
|
293
|
+
FORBIDDEN: {
|
|
294
|
+
readonly message: "Not allowed";
|
|
295
|
+
};
|
|
296
|
+
RAM_BUDGET_EXCEEDED: {
|
|
297
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
298
|
+
readonly status: 503;
|
|
299
|
+
readonly data: z.ZodObject<{
|
|
300
|
+
budgetMib: z.ZodInt;
|
|
301
|
+
usedMib: z.ZodInt;
|
|
302
|
+
requestedMib: z.ZodInt;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
};
|
|
305
|
+
SERVICE_UNAVAILABLE: {
|
|
306
|
+
readonly message: "impd is stopping";
|
|
307
|
+
};
|
|
308
|
+
INVALID_STATE: {
|
|
309
|
+
readonly message: "The imp is not in a state that allows this";
|
|
310
|
+
readonly status: 409;
|
|
311
|
+
readonly data: z.ZodObject<{
|
|
312
|
+
state: z.ZodEnum<{
|
|
313
|
+
creating: "creating";
|
|
314
|
+
error: "error";
|
|
315
|
+
running: "running";
|
|
316
|
+
sleeping: "sleeping";
|
|
317
|
+
stopped: "stopped";
|
|
318
|
+
}>;
|
|
319
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
320
|
+
creating: "creating";
|
|
321
|
+
error: "error";
|
|
322
|
+
running: "running";
|
|
323
|
+
sleeping: "sleeping";
|
|
324
|
+
stopped: "stopped";
|
|
325
|
+
}>>;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
};
|
|
328
|
+
AGENT_OUTDATED: {
|
|
329
|
+
readonly message: "The imp's agent is too old for this";
|
|
330
|
+
readonly status: 409;
|
|
331
|
+
};
|
|
332
|
+
}>, Record<never, never>>;
|
|
333
|
+
destroy: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
334
|
+
name: z.ZodString;
|
|
335
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
336
|
+
NOT_FOUND: {
|
|
337
|
+
readonly message: "Not found";
|
|
338
|
+
readonly data: z.ZodObject<{
|
|
339
|
+
kind: z.ZodEnum<{
|
|
340
|
+
checkpoint: "checkpoint";
|
|
341
|
+
image: "image";
|
|
342
|
+
imp: "imp";
|
|
343
|
+
session: "session";
|
|
344
|
+
}>;
|
|
345
|
+
name: z.ZodString;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
};
|
|
348
|
+
CONFLICT: {
|
|
349
|
+
readonly message: "Already exists";
|
|
350
|
+
readonly data: z.ZodObject<{
|
|
351
|
+
kind: z.ZodEnum<{
|
|
352
|
+
checkpoint: "checkpoint";
|
|
353
|
+
image: "image";
|
|
354
|
+
imp: "imp";
|
|
355
|
+
session: "session";
|
|
356
|
+
}>;
|
|
357
|
+
name: z.ZodString;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
};
|
|
360
|
+
FORBIDDEN: {
|
|
361
|
+
readonly message: "Not allowed";
|
|
362
|
+
};
|
|
363
|
+
RAM_BUDGET_EXCEEDED: {
|
|
364
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
365
|
+
readonly status: 503;
|
|
366
|
+
readonly data: z.ZodObject<{
|
|
367
|
+
budgetMib: z.ZodInt;
|
|
368
|
+
usedMib: z.ZodInt;
|
|
369
|
+
requestedMib: z.ZodInt;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
};
|
|
372
|
+
SERVICE_UNAVAILABLE: {
|
|
373
|
+
readonly message: "impd is stopping";
|
|
374
|
+
};
|
|
375
|
+
INVALID_STATE: {
|
|
376
|
+
readonly message: "The imp is not in a state that allows this";
|
|
377
|
+
readonly status: 409;
|
|
378
|
+
readonly data: z.ZodObject<{
|
|
379
|
+
state: z.ZodEnum<{
|
|
380
|
+
creating: "creating";
|
|
381
|
+
error: "error";
|
|
382
|
+
running: "running";
|
|
383
|
+
sleeping: "sleeping";
|
|
384
|
+
stopped: "stopped";
|
|
385
|
+
}>;
|
|
386
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
387
|
+
creating: "creating";
|
|
388
|
+
error: "error";
|
|
389
|
+
running: "running";
|
|
390
|
+
sleeping: "sleeping";
|
|
391
|
+
stopped: "stopped";
|
|
392
|
+
}>>;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
};
|
|
395
|
+
AGENT_OUTDATED: {
|
|
396
|
+
readonly message: "The imp's agent is too old for this";
|
|
397
|
+
readonly status: 409;
|
|
398
|
+
};
|
|
399
|
+
}>, Record<never, never>>;
|
|
400
|
+
start: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
401
|
+
name: z.ZodString;
|
|
402
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
403
|
+
id: z.ZodString;
|
|
404
|
+
name: z.ZodString;
|
|
405
|
+
image: z.ZodString;
|
|
406
|
+
state: z.ZodEnum<{
|
|
407
|
+
creating: "creating";
|
|
408
|
+
error: "error";
|
|
409
|
+
running: "running";
|
|
410
|
+
sleeping: "sleeping";
|
|
411
|
+
stopped: "stopped";
|
|
412
|
+
}>;
|
|
413
|
+
vcpus: z.ZodInt;
|
|
414
|
+
memoryMib: z.ZodInt;
|
|
415
|
+
ip: z.ZodIPv4;
|
|
416
|
+
slot: z.ZodInt;
|
|
417
|
+
port: z.ZodInt;
|
|
418
|
+
httpPort: z.ZodInt;
|
|
419
|
+
url: z.ZodURL;
|
|
420
|
+
createdAt: z.ZodDate;
|
|
421
|
+
lastActiveAt: z.ZodDate;
|
|
422
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
423
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
424
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
425
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
426
|
+
error: z.ZodOptional<z.ZodString>;
|
|
427
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
428
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
429
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
430
|
+
agent: "agent";
|
|
431
|
+
firecracker: "firecracker";
|
|
432
|
+
impd: "impd";
|
|
433
|
+
kernel: "kernel";
|
|
434
|
+
}>>>>;
|
|
435
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
436
|
+
NOT_FOUND: {
|
|
437
|
+
readonly message: "Not found";
|
|
438
|
+
readonly data: z.ZodObject<{
|
|
439
|
+
kind: z.ZodEnum<{
|
|
440
|
+
checkpoint: "checkpoint";
|
|
441
|
+
image: "image";
|
|
442
|
+
imp: "imp";
|
|
443
|
+
session: "session";
|
|
444
|
+
}>;
|
|
445
|
+
name: z.ZodString;
|
|
446
|
+
}, z.core.$strip>;
|
|
447
|
+
};
|
|
448
|
+
CONFLICT: {
|
|
449
|
+
readonly message: "Already exists";
|
|
450
|
+
readonly data: z.ZodObject<{
|
|
451
|
+
kind: z.ZodEnum<{
|
|
452
|
+
checkpoint: "checkpoint";
|
|
453
|
+
image: "image";
|
|
454
|
+
imp: "imp";
|
|
455
|
+
session: "session";
|
|
456
|
+
}>;
|
|
457
|
+
name: z.ZodString;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
};
|
|
460
|
+
FORBIDDEN: {
|
|
461
|
+
readonly message: "Not allowed";
|
|
462
|
+
};
|
|
463
|
+
RAM_BUDGET_EXCEEDED: {
|
|
464
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
465
|
+
readonly status: 503;
|
|
466
|
+
readonly data: z.ZodObject<{
|
|
467
|
+
budgetMib: z.ZodInt;
|
|
468
|
+
usedMib: z.ZodInt;
|
|
469
|
+
requestedMib: z.ZodInt;
|
|
470
|
+
}, z.core.$strip>;
|
|
471
|
+
};
|
|
472
|
+
SERVICE_UNAVAILABLE: {
|
|
473
|
+
readonly message: "impd is stopping";
|
|
474
|
+
};
|
|
475
|
+
INVALID_STATE: {
|
|
476
|
+
readonly message: "The imp is not in a state that allows this";
|
|
477
|
+
readonly status: 409;
|
|
478
|
+
readonly data: z.ZodObject<{
|
|
479
|
+
state: z.ZodEnum<{
|
|
480
|
+
creating: "creating";
|
|
481
|
+
error: "error";
|
|
482
|
+
running: "running";
|
|
483
|
+
sleeping: "sleeping";
|
|
484
|
+
stopped: "stopped";
|
|
485
|
+
}>;
|
|
486
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
487
|
+
creating: "creating";
|
|
488
|
+
error: "error";
|
|
489
|
+
running: "running";
|
|
490
|
+
sleeping: "sleeping";
|
|
491
|
+
stopped: "stopped";
|
|
492
|
+
}>>;
|
|
493
|
+
}, z.core.$strip>;
|
|
494
|
+
};
|
|
495
|
+
AGENT_OUTDATED: {
|
|
496
|
+
readonly message: "The imp's agent is too old for this";
|
|
497
|
+
readonly status: 409;
|
|
498
|
+
};
|
|
499
|
+
}>, Record<never, never>>;
|
|
500
|
+
stop: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
501
|
+
name: z.ZodString;
|
|
502
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
503
|
+
id: z.ZodString;
|
|
504
|
+
name: z.ZodString;
|
|
505
|
+
image: z.ZodString;
|
|
506
|
+
state: z.ZodEnum<{
|
|
507
|
+
creating: "creating";
|
|
508
|
+
error: "error";
|
|
509
|
+
running: "running";
|
|
510
|
+
sleeping: "sleeping";
|
|
511
|
+
stopped: "stopped";
|
|
512
|
+
}>;
|
|
513
|
+
vcpus: z.ZodInt;
|
|
514
|
+
memoryMib: z.ZodInt;
|
|
515
|
+
ip: z.ZodIPv4;
|
|
516
|
+
slot: z.ZodInt;
|
|
517
|
+
port: z.ZodInt;
|
|
518
|
+
httpPort: z.ZodInt;
|
|
519
|
+
url: z.ZodURL;
|
|
520
|
+
createdAt: z.ZodDate;
|
|
521
|
+
lastActiveAt: z.ZodDate;
|
|
522
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
523
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
524
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
525
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
526
|
+
error: z.ZodOptional<z.ZodString>;
|
|
527
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
528
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
529
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
530
|
+
agent: "agent";
|
|
531
|
+
firecracker: "firecracker";
|
|
532
|
+
impd: "impd";
|
|
533
|
+
kernel: "kernel";
|
|
534
|
+
}>>>>;
|
|
535
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
536
|
+
NOT_FOUND: {
|
|
537
|
+
readonly message: "Not found";
|
|
538
|
+
readonly data: z.ZodObject<{
|
|
539
|
+
kind: z.ZodEnum<{
|
|
540
|
+
checkpoint: "checkpoint";
|
|
541
|
+
image: "image";
|
|
542
|
+
imp: "imp";
|
|
543
|
+
session: "session";
|
|
544
|
+
}>;
|
|
545
|
+
name: z.ZodString;
|
|
546
|
+
}, z.core.$strip>;
|
|
547
|
+
};
|
|
548
|
+
CONFLICT: {
|
|
549
|
+
readonly message: "Already exists";
|
|
550
|
+
readonly data: z.ZodObject<{
|
|
551
|
+
kind: z.ZodEnum<{
|
|
552
|
+
checkpoint: "checkpoint";
|
|
553
|
+
image: "image";
|
|
554
|
+
imp: "imp";
|
|
555
|
+
session: "session";
|
|
556
|
+
}>;
|
|
557
|
+
name: z.ZodString;
|
|
558
|
+
}, z.core.$strip>;
|
|
559
|
+
};
|
|
560
|
+
FORBIDDEN: {
|
|
561
|
+
readonly message: "Not allowed";
|
|
562
|
+
};
|
|
563
|
+
RAM_BUDGET_EXCEEDED: {
|
|
564
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
565
|
+
readonly status: 503;
|
|
566
|
+
readonly data: z.ZodObject<{
|
|
567
|
+
budgetMib: z.ZodInt;
|
|
568
|
+
usedMib: z.ZodInt;
|
|
569
|
+
requestedMib: z.ZodInt;
|
|
570
|
+
}, z.core.$strip>;
|
|
571
|
+
};
|
|
572
|
+
SERVICE_UNAVAILABLE: {
|
|
573
|
+
readonly message: "impd is stopping";
|
|
574
|
+
};
|
|
575
|
+
INVALID_STATE: {
|
|
576
|
+
readonly message: "The imp is not in a state that allows this";
|
|
577
|
+
readonly status: 409;
|
|
578
|
+
readonly data: z.ZodObject<{
|
|
579
|
+
state: z.ZodEnum<{
|
|
580
|
+
creating: "creating";
|
|
581
|
+
error: "error";
|
|
582
|
+
running: "running";
|
|
583
|
+
sleeping: "sleeping";
|
|
584
|
+
stopped: "stopped";
|
|
585
|
+
}>;
|
|
586
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
587
|
+
creating: "creating";
|
|
588
|
+
error: "error";
|
|
589
|
+
running: "running";
|
|
590
|
+
sleeping: "sleeping";
|
|
591
|
+
stopped: "stopped";
|
|
592
|
+
}>>;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
};
|
|
595
|
+
AGENT_OUTDATED: {
|
|
596
|
+
readonly message: "The imp's agent is too old for this";
|
|
597
|
+
readonly status: 409;
|
|
598
|
+
};
|
|
599
|
+
}>, Record<never, never>>;
|
|
600
|
+
sleep: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
601
|
+
name: z.ZodString;
|
|
602
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
603
|
+
id: z.ZodString;
|
|
604
|
+
name: z.ZodString;
|
|
605
|
+
image: z.ZodString;
|
|
606
|
+
state: z.ZodEnum<{
|
|
607
|
+
creating: "creating";
|
|
608
|
+
error: "error";
|
|
609
|
+
running: "running";
|
|
610
|
+
sleeping: "sleeping";
|
|
611
|
+
stopped: "stopped";
|
|
612
|
+
}>;
|
|
613
|
+
vcpus: z.ZodInt;
|
|
614
|
+
memoryMib: z.ZodInt;
|
|
615
|
+
ip: z.ZodIPv4;
|
|
616
|
+
slot: z.ZodInt;
|
|
617
|
+
port: z.ZodInt;
|
|
618
|
+
httpPort: z.ZodInt;
|
|
619
|
+
url: z.ZodURL;
|
|
620
|
+
createdAt: z.ZodDate;
|
|
621
|
+
lastActiveAt: z.ZodDate;
|
|
622
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
623
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
624
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
625
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
626
|
+
error: z.ZodOptional<z.ZodString>;
|
|
627
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
628
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
629
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
630
|
+
agent: "agent";
|
|
631
|
+
firecracker: "firecracker";
|
|
632
|
+
impd: "impd";
|
|
633
|
+
kernel: "kernel";
|
|
634
|
+
}>>>>;
|
|
635
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
636
|
+
NOT_FOUND: {
|
|
637
|
+
readonly message: "Not found";
|
|
638
|
+
readonly data: z.ZodObject<{
|
|
639
|
+
kind: z.ZodEnum<{
|
|
640
|
+
checkpoint: "checkpoint";
|
|
641
|
+
image: "image";
|
|
642
|
+
imp: "imp";
|
|
643
|
+
session: "session";
|
|
644
|
+
}>;
|
|
645
|
+
name: z.ZodString;
|
|
646
|
+
}, z.core.$strip>;
|
|
647
|
+
};
|
|
648
|
+
CONFLICT: {
|
|
649
|
+
readonly message: "Already exists";
|
|
650
|
+
readonly data: z.ZodObject<{
|
|
651
|
+
kind: z.ZodEnum<{
|
|
652
|
+
checkpoint: "checkpoint";
|
|
653
|
+
image: "image";
|
|
654
|
+
imp: "imp";
|
|
655
|
+
session: "session";
|
|
656
|
+
}>;
|
|
657
|
+
name: z.ZodString;
|
|
658
|
+
}, z.core.$strip>;
|
|
659
|
+
};
|
|
660
|
+
FORBIDDEN: {
|
|
661
|
+
readonly message: "Not allowed";
|
|
662
|
+
};
|
|
663
|
+
RAM_BUDGET_EXCEEDED: {
|
|
664
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
665
|
+
readonly status: 503;
|
|
666
|
+
readonly data: z.ZodObject<{
|
|
667
|
+
budgetMib: z.ZodInt;
|
|
668
|
+
usedMib: z.ZodInt;
|
|
669
|
+
requestedMib: z.ZodInt;
|
|
670
|
+
}, z.core.$strip>;
|
|
671
|
+
};
|
|
672
|
+
SERVICE_UNAVAILABLE: {
|
|
673
|
+
readonly message: "impd is stopping";
|
|
674
|
+
};
|
|
675
|
+
INVALID_STATE: {
|
|
676
|
+
readonly message: "The imp is not in a state that allows this";
|
|
677
|
+
readonly status: 409;
|
|
678
|
+
readonly data: z.ZodObject<{
|
|
679
|
+
state: z.ZodEnum<{
|
|
680
|
+
creating: "creating";
|
|
681
|
+
error: "error";
|
|
682
|
+
running: "running";
|
|
683
|
+
sleeping: "sleeping";
|
|
684
|
+
stopped: "stopped";
|
|
685
|
+
}>;
|
|
686
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
687
|
+
creating: "creating";
|
|
688
|
+
error: "error";
|
|
689
|
+
running: "running";
|
|
690
|
+
sleeping: "sleeping";
|
|
691
|
+
stopped: "stopped";
|
|
692
|
+
}>>;
|
|
693
|
+
}, z.core.$strip>;
|
|
694
|
+
};
|
|
695
|
+
AGENT_OUTDATED: {
|
|
696
|
+
readonly message: "The imp's agent is too old for this";
|
|
697
|
+
readonly status: 409;
|
|
698
|
+
};
|
|
699
|
+
}>, Record<never, never>>;
|
|
700
|
+
wake: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
701
|
+
name: z.ZodString;
|
|
702
|
+
restartError: z.ZodOptional<z.ZodBoolean>;
|
|
703
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
704
|
+
id: z.ZodString;
|
|
705
|
+
name: z.ZodString;
|
|
706
|
+
image: z.ZodString;
|
|
707
|
+
state: z.ZodEnum<{
|
|
708
|
+
creating: "creating";
|
|
709
|
+
error: "error";
|
|
710
|
+
running: "running";
|
|
711
|
+
sleeping: "sleeping";
|
|
712
|
+
stopped: "stopped";
|
|
713
|
+
}>;
|
|
714
|
+
vcpus: z.ZodInt;
|
|
715
|
+
memoryMib: z.ZodInt;
|
|
716
|
+
ip: z.ZodIPv4;
|
|
717
|
+
slot: z.ZodInt;
|
|
718
|
+
port: z.ZodInt;
|
|
719
|
+
httpPort: z.ZodInt;
|
|
720
|
+
url: z.ZodURL;
|
|
721
|
+
createdAt: z.ZodDate;
|
|
722
|
+
lastActiveAt: z.ZodDate;
|
|
723
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
724
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
725
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
726
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
727
|
+
error: z.ZodOptional<z.ZodString>;
|
|
728
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
729
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
730
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
731
|
+
agent: "agent";
|
|
732
|
+
firecracker: "firecracker";
|
|
733
|
+
impd: "impd";
|
|
734
|
+
kernel: "kernel";
|
|
735
|
+
}>>>>;
|
|
736
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
737
|
+
NOT_FOUND: {
|
|
738
|
+
readonly message: "Not found";
|
|
739
|
+
readonly data: z.ZodObject<{
|
|
740
|
+
kind: z.ZodEnum<{
|
|
741
|
+
checkpoint: "checkpoint";
|
|
742
|
+
image: "image";
|
|
743
|
+
imp: "imp";
|
|
744
|
+
session: "session";
|
|
745
|
+
}>;
|
|
746
|
+
name: z.ZodString;
|
|
747
|
+
}, z.core.$strip>;
|
|
748
|
+
};
|
|
749
|
+
CONFLICT: {
|
|
750
|
+
readonly message: "Already exists";
|
|
751
|
+
readonly data: z.ZodObject<{
|
|
752
|
+
kind: z.ZodEnum<{
|
|
753
|
+
checkpoint: "checkpoint";
|
|
754
|
+
image: "image";
|
|
755
|
+
imp: "imp";
|
|
756
|
+
session: "session";
|
|
757
|
+
}>;
|
|
758
|
+
name: z.ZodString;
|
|
759
|
+
}, z.core.$strip>;
|
|
760
|
+
};
|
|
761
|
+
FORBIDDEN: {
|
|
762
|
+
readonly message: "Not allowed";
|
|
763
|
+
};
|
|
764
|
+
RAM_BUDGET_EXCEEDED: {
|
|
765
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
766
|
+
readonly status: 503;
|
|
767
|
+
readonly data: z.ZodObject<{
|
|
768
|
+
budgetMib: z.ZodInt;
|
|
769
|
+
usedMib: z.ZodInt;
|
|
770
|
+
requestedMib: z.ZodInt;
|
|
771
|
+
}, z.core.$strip>;
|
|
772
|
+
};
|
|
773
|
+
SERVICE_UNAVAILABLE: {
|
|
774
|
+
readonly message: "impd is stopping";
|
|
775
|
+
};
|
|
776
|
+
INVALID_STATE: {
|
|
777
|
+
readonly message: "The imp is not in a state that allows this";
|
|
778
|
+
readonly status: 409;
|
|
779
|
+
readonly data: z.ZodObject<{
|
|
780
|
+
state: z.ZodEnum<{
|
|
781
|
+
creating: "creating";
|
|
782
|
+
error: "error";
|
|
783
|
+
running: "running";
|
|
784
|
+
sleeping: "sleeping";
|
|
785
|
+
stopped: "stopped";
|
|
786
|
+
}>;
|
|
787
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
788
|
+
creating: "creating";
|
|
789
|
+
error: "error";
|
|
790
|
+
running: "running";
|
|
791
|
+
sleeping: "sleeping";
|
|
792
|
+
stopped: "stopped";
|
|
793
|
+
}>>;
|
|
794
|
+
}, z.core.$strip>;
|
|
795
|
+
};
|
|
796
|
+
AGENT_OUTDATED: {
|
|
797
|
+
readonly message: "The imp's agent is too old for this";
|
|
798
|
+
readonly status: 409;
|
|
799
|
+
};
|
|
800
|
+
}>, Record<never, never>>;
|
|
801
|
+
hold: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
802
|
+
name: z.ZodString;
|
|
803
|
+
seconds: z.ZodInt;
|
|
804
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
805
|
+
id: z.ZodString;
|
|
806
|
+
name: z.ZodString;
|
|
807
|
+
image: z.ZodString;
|
|
808
|
+
state: z.ZodEnum<{
|
|
809
|
+
creating: "creating";
|
|
810
|
+
error: "error";
|
|
811
|
+
running: "running";
|
|
812
|
+
sleeping: "sleeping";
|
|
813
|
+
stopped: "stopped";
|
|
814
|
+
}>;
|
|
815
|
+
vcpus: z.ZodInt;
|
|
816
|
+
memoryMib: z.ZodInt;
|
|
817
|
+
ip: z.ZodIPv4;
|
|
818
|
+
slot: z.ZodInt;
|
|
819
|
+
port: z.ZodInt;
|
|
820
|
+
httpPort: z.ZodInt;
|
|
821
|
+
url: z.ZodURL;
|
|
822
|
+
createdAt: z.ZodDate;
|
|
823
|
+
lastActiveAt: z.ZodDate;
|
|
824
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
825
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
826
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
827
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
828
|
+
error: z.ZodOptional<z.ZodString>;
|
|
829
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
830
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
831
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
832
|
+
agent: "agent";
|
|
833
|
+
firecracker: "firecracker";
|
|
834
|
+
impd: "impd";
|
|
835
|
+
kernel: "kernel";
|
|
836
|
+
}>>>>;
|
|
837
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
838
|
+
NOT_FOUND: {
|
|
839
|
+
readonly message: "Not found";
|
|
840
|
+
readonly data: z.ZodObject<{
|
|
841
|
+
kind: z.ZodEnum<{
|
|
842
|
+
checkpoint: "checkpoint";
|
|
843
|
+
image: "image";
|
|
844
|
+
imp: "imp";
|
|
845
|
+
session: "session";
|
|
846
|
+
}>;
|
|
847
|
+
name: z.ZodString;
|
|
848
|
+
}, z.core.$strip>;
|
|
849
|
+
};
|
|
850
|
+
CONFLICT: {
|
|
851
|
+
readonly message: "Already exists";
|
|
852
|
+
readonly data: z.ZodObject<{
|
|
853
|
+
kind: z.ZodEnum<{
|
|
854
|
+
checkpoint: "checkpoint";
|
|
855
|
+
image: "image";
|
|
856
|
+
imp: "imp";
|
|
857
|
+
session: "session";
|
|
858
|
+
}>;
|
|
859
|
+
name: z.ZodString;
|
|
860
|
+
}, z.core.$strip>;
|
|
861
|
+
};
|
|
862
|
+
FORBIDDEN: {
|
|
863
|
+
readonly message: "Not allowed";
|
|
864
|
+
};
|
|
865
|
+
RAM_BUDGET_EXCEEDED: {
|
|
866
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
867
|
+
readonly status: 503;
|
|
868
|
+
readonly data: z.ZodObject<{
|
|
869
|
+
budgetMib: z.ZodInt;
|
|
870
|
+
usedMib: z.ZodInt;
|
|
871
|
+
requestedMib: z.ZodInt;
|
|
872
|
+
}, z.core.$strip>;
|
|
873
|
+
};
|
|
874
|
+
SERVICE_UNAVAILABLE: {
|
|
875
|
+
readonly message: "impd is stopping";
|
|
876
|
+
};
|
|
877
|
+
INVALID_STATE: {
|
|
878
|
+
readonly message: "The imp is not in a state that allows this";
|
|
879
|
+
readonly status: 409;
|
|
880
|
+
readonly data: z.ZodObject<{
|
|
881
|
+
state: z.ZodEnum<{
|
|
882
|
+
creating: "creating";
|
|
883
|
+
error: "error";
|
|
884
|
+
running: "running";
|
|
885
|
+
sleeping: "sleeping";
|
|
886
|
+
stopped: "stopped";
|
|
887
|
+
}>;
|
|
888
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
889
|
+
creating: "creating";
|
|
890
|
+
error: "error";
|
|
891
|
+
running: "running";
|
|
892
|
+
sleeping: "sleeping";
|
|
893
|
+
stopped: "stopped";
|
|
894
|
+
}>>;
|
|
895
|
+
}, z.core.$strip>;
|
|
896
|
+
};
|
|
897
|
+
AGENT_OUTDATED: {
|
|
898
|
+
readonly message: "The imp's agent is too old for this";
|
|
899
|
+
readonly status: 409;
|
|
900
|
+
};
|
|
901
|
+
}>, Record<never, never>>;
|
|
902
|
+
url: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
903
|
+
name: z.ZodString;
|
|
904
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
905
|
+
local: z.ZodURL;
|
|
906
|
+
tailnet: z.ZodNullable<z.ZodURL>;
|
|
907
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
908
|
+
NOT_FOUND: {
|
|
909
|
+
readonly message: "Not found";
|
|
910
|
+
readonly data: z.ZodObject<{
|
|
911
|
+
kind: z.ZodEnum<{
|
|
912
|
+
checkpoint: "checkpoint";
|
|
913
|
+
image: "image";
|
|
914
|
+
imp: "imp";
|
|
915
|
+
session: "session";
|
|
916
|
+
}>;
|
|
917
|
+
name: z.ZodString;
|
|
918
|
+
}, z.core.$strip>;
|
|
919
|
+
};
|
|
920
|
+
CONFLICT: {
|
|
921
|
+
readonly message: "Already exists";
|
|
922
|
+
readonly data: z.ZodObject<{
|
|
923
|
+
kind: z.ZodEnum<{
|
|
924
|
+
checkpoint: "checkpoint";
|
|
925
|
+
image: "image";
|
|
926
|
+
imp: "imp";
|
|
927
|
+
session: "session";
|
|
928
|
+
}>;
|
|
929
|
+
name: z.ZodString;
|
|
930
|
+
}, z.core.$strip>;
|
|
931
|
+
};
|
|
932
|
+
FORBIDDEN: {
|
|
933
|
+
readonly message: "Not allowed";
|
|
934
|
+
};
|
|
935
|
+
RAM_BUDGET_EXCEEDED: {
|
|
936
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
937
|
+
readonly status: 503;
|
|
938
|
+
readonly data: z.ZodObject<{
|
|
939
|
+
budgetMib: z.ZodInt;
|
|
940
|
+
usedMib: z.ZodInt;
|
|
941
|
+
requestedMib: z.ZodInt;
|
|
942
|
+
}, z.core.$strip>;
|
|
943
|
+
};
|
|
944
|
+
SERVICE_UNAVAILABLE: {
|
|
945
|
+
readonly message: "impd is stopping";
|
|
946
|
+
};
|
|
947
|
+
INVALID_STATE: {
|
|
948
|
+
readonly message: "The imp is not in a state that allows this";
|
|
949
|
+
readonly status: 409;
|
|
950
|
+
readonly data: z.ZodObject<{
|
|
951
|
+
state: z.ZodEnum<{
|
|
952
|
+
creating: "creating";
|
|
953
|
+
error: "error";
|
|
954
|
+
running: "running";
|
|
955
|
+
sleeping: "sleeping";
|
|
956
|
+
stopped: "stopped";
|
|
957
|
+
}>;
|
|
958
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
959
|
+
creating: "creating";
|
|
960
|
+
error: "error";
|
|
961
|
+
running: "running";
|
|
962
|
+
sleeping: "sleeping";
|
|
963
|
+
stopped: "stopped";
|
|
964
|
+
}>>;
|
|
965
|
+
}, z.core.$strip>;
|
|
966
|
+
};
|
|
967
|
+
AGENT_OUTDATED: {
|
|
968
|
+
readonly message: "The imp's agent is too old for this";
|
|
969
|
+
readonly status: 409;
|
|
970
|
+
};
|
|
971
|
+
}>, Record<never, never>>;
|
|
972
|
+
fork: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
973
|
+
source: z.ZodString;
|
|
974
|
+
name: z.ZodString;
|
|
975
|
+
checkpoint: z.ZodOptional<z.ZodString>;
|
|
976
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
977
|
+
id: z.ZodString;
|
|
978
|
+
name: z.ZodString;
|
|
979
|
+
image: z.ZodString;
|
|
980
|
+
state: z.ZodEnum<{
|
|
981
|
+
creating: "creating";
|
|
982
|
+
error: "error";
|
|
983
|
+
running: "running";
|
|
984
|
+
sleeping: "sleeping";
|
|
985
|
+
stopped: "stopped";
|
|
986
|
+
}>;
|
|
987
|
+
vcpus: z.ZodInt;
|
|
988
|
+
memoryMib: z.ZodInt;
|
|
989
|
+
ip: z.ZodIPv4;
|
|
990
|
+
slot: z.ZodInt;
|
|
991
|
+
port: z.ZodInt;
|
|
992
|
+
httpPort: z.ZodInt;
|
|
993
|
+
url: z.ZodURL;
|
|
994
|
+
createdAt: z.ZodDate;
|
|
995
|
+
lastActiveAt: z.ZodDate;
|
|
996
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
997
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
998
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
999
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
1000
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
1002
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
1004
|
+
agent: "agent";
|
|
1005
|
+
firecracker: "firecracker";
|
|
1006
|
+
impd: "impd";
|
|
1007
|
+
kernel: "kernel";
|
|
1008
|
+
}>>>>;
|
|
1009
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1010
|
+
NOT_FOUND: {
|
|
1011
|
+
readonly message: "Not found";
|
|
1012
|
+
readonly data: z.ZodObject<{
|
|
1013
|
+
kind: z.ZodEnum<{
|
|
1014
|
+
checkpoint: "checkpoint";
|
|
1015
|
+
image: "image";
|
|
1016
|
+
imp: "imp";
|
|
1017
|
+
session: "session";
|
|
1018
|
+
}>;
|
|
1019
|
+
name: z.ZodString;
|
|
1020
|
+
}, z.core.$strip>;
|
|
1021
|
+
};
|
|
1022
|
+
CONFLICT: {
|
|
1023
|
+
readonly message: "Already exists";
|
|
1024
|
+
readonly data: z.ZodObject<{
|
|
1025
|
+
kind: z.ZodEnum<{
|
|
1026
|
+
checkpoint: "checkpoint";
|
|
1027
|
+
image: "image";
|
|
1028
|
+
imp: "imp";
|
|
1029
|
+
session: "session";
|
|
1030
|
+
}>;
|
|
1031
|
+
name: z.ZodString;
|
|
1032
|
+
}, z.core.$strip>;
|
|
1033
|
+
};
|
|
1034
|
+
FORBIDDEN: {
|
|
1035
|
+
readonly message: "Not allowed";
|
|
1036
|
+
};
|
|
1037
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1038
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1039
|
+
readonly status: 503;
|
|
1040
|
+
readonly data: z.ZodObject<{
|
|
1041
|
+
budgetMib: z.ZodInt;
|
|
1042
|
+
usedMib: z.ZodInt;
|
|
1043
|
+
requestedMib: z.ZodInt;
|
|
1044
|
+
}, z.core.$strip>;
|
|
1045
|
+
};
|
|
1046
|
+
SERVICE_UNAVAILABLE: {
|
|
1047
|
+
readonly message: "impd is stopping";
|
|
1048
|
+
};
|
|
1049
|
+
INVALID_STATE: {
|
|
1050
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1051
|
+
readonly status: 409;
|
|
1052
|
+
readonly data: z.ZodObject<{
|
|
1053
|
+
state: z.ZodEnum<{
|
|
1054
|
+
creating: "creating";
|
|
1055
|
+
error: "error";
|
|
1056
|
+
running: "running";
|
|
1057
|
+
sleeping: "sleeping";
|
|
1058
|
+
stopped: "stopped";
|
|
1059
|
+
}>;
|
|
1060
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1061
|
+
creating: "creating";
|
|
1062
|
+
error: "error";
|
|
1063
|
+
running: "running";
|
|
1064
|
+
sleeping: "sleeping";
|
|
1065
|
+
stopped: "stopped";
|
|
1066
|
+
}>>;
|
|
1067
|
+
}, z.core.$strip>;
|
|
1068
|
+
};
|
|
1069
|
+
AGENT_OUTDATED: {
|
|
1070
|
+
readonly message: "The imp's agent is too old for this";
|
|
1071
|
+
readonly status: 409;
|
|
1072
|
+
};
|
|
1073
|
+
}>, Record<never, never>>;
|
|
1074
|
+
};
|
|
1075
|
+
checkpoints: {
|
|
1076
|
+
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1077
|
+
name: z.ZodString;
|
|
1078
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1080
|
+
id: z.ZodString;
|
|
1081
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
createdAt: z.ZodDate;
|
|
1083
|
+
sizeBytes: z.ZodOptional<z.ZodInt>;
|
|
1084
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1085
|
+
NOT_FOUND: {
|
|
1086
|
+
readonly message: "Not found";
|
|
1087
|
+
readonly data: z.ZodObject<{
|
|
1088
|
+
kind: z.ZodEnum<{
|
|
1089
|
+
checkpoint: "checkpoint";
|
|
1090
|
+
image: "image";
|
|
1091
|
+
imp: "imp";
|
|
1092
|
+
session: "session";
|
|
1093
|
+
}>;
|
|
1094
|
+
name: z.ZodString;
|
|
1095
|
+
}, z.core.$strip>;
|
|
1096
|
+
};
|
|
1097
|
+
CONFLICT: {
|
|
1098
|
+
readonly message: "Already exists";
|
|
1099
|
+
readonly data: z.ZodObject<{
|
|
1100
|
+
kind: z.ZodEnum<{
|
|
1101
|
+
checkpoint: "checkpoint";
|
|
1102
|
+
image: "image";
|
|
1103
|
+
imp: "imp";
|
|
1104
|
+
session: "session";
|
|
1105
|
+
}>;
|
|
1106
|
+
name: z.ZodString;
|
|
1107
|
+
}, z.core.$strip>;
|
|
1108
|
+
};
|
|
1109
|
+
FORBIDDEN: {
|
|
1110
|
+
readonly message: "Not allowed";
|
|
1111
|
+
};
|
|
1112
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1113
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1114
|
+
readonly status: 503;
|
|
1115
|
+
readonly data: z.ZodObject<{
|
|
1116
|
+
budgetMib: z.ZodInt;
|
|
1117
|
+
usedMib: z.ZodInt;
|
|
1118
|
+
requestedMib: z.ZodInt;
|
|
1119
|
+
}, z.core.$strip>;
|
|
1120
|
+
};
|
|
1121
|
+
SERVICE_UNAVAILABLE: {
|
|
1122
|
+
readonly message: "impd is stopping";
|
|
1123
|
+
};
|
|
1124
|
+
INVALID_STATE: {
|
|
1125
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1126
|
+
readonly status: 409;
|
|
1127
|
+
readonly data: z.ZodObject<{
|
|
1128
|
+
state: z.ZodEnum<{
|
|
1129
|
+
creating: "creating";
|
|
1130
|
+
error: "error";
|
|
1131
|
+
running: "running";
|
|
1132
|
+
sleeping: "sleeping";
|
|
1133
|
+
stopped: "stopped";
|
|
1134
|
+
}>;
|
|
1135
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1136
|
+
creating: "creating";
|
|
1137
|
+
error: "error";
|
|
1138
|
+
running: "running";
|
|
1139
|
+
sleeping: "sleeping";
|
|
1140
|
+
stopped: "stopped";
|
|
1141
|
+
}>>;
|
|
1142
|
+
}, z.core.$strip>;
|
|
1143
|
+
};
|
|
1144
|
+
AGENT_OUTDATED: {
|
|
1145
|
+
readonly message: "The imp's agent is too old for this";
|
|
1146
|
+
readonly status: 409;
|
|
1147
|
+
};
|
|
1148
|
+
}>, Record<never, never>>;
|
|
1149
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1150
|
+
name: z.ZodString;
|
|
1151
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
1152
|
+
id: z.ZodString;
|
|
1153
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1154
|
+
createdAt: z.ZodDate;
|
|
1155
|
+
sizeBytes: z.ZodOptional<z.ZodInt>;
|
|
1156
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1157
|
+
NOT_FOUND: {
|
|
1158
|
+
readonly message: "Not found";
|
|
1159
|
+
readonly data: z.ZodObject<{
|
|
1160
|
+
kind: z.ZodEnum<{
|
|
1161
|
+
checkpoint: "checkpoint";
|
|
1162
|
+
image: "image";
|
|
1163
|
+
imp: "imp";
|
|
1164
|
+
session: "session";
|
|
1165
|
+
}>;
|
|
1166
|
+
name: z.ZodString;
|
|
1167
|
+
}, z.core.$strip>;
|
|
1168
|
+
};
|
|
1169
|
+
CONFLICT: {
|
|
1170
|
+
readonly message: "Already exists";
|
|
1171
|
+
readonly data: z.ZodObject<{
|
|
1172
|
+
kind: z.ZodEnum<{
|
|
1173
|
+
checkpoint: "checkpoint";
|
|
1174
|
+
image: "image";
|
|
1175
|
+
imp: "imp";
|
|
1176
|
+
session: "session";
|
|
1177
|
+
}>;
|
|
1178
|
+
name: z.ZodString;
|
|
1179
|
+
}, z.core.$strip>;
|
|
1180
|
+
};
|
|
1181
|
+
FORBIDDEN: {
|
|
1182
|
+
readonly message: "Not allowed";
|
|
1183
|
+
};
|
|
1184
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1185
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1186
|
+
readonly status: 503;
|
|
1187
|
+
readonly data: z.ZodObject<{
|
|
1188
|
+
budgetMib: z.ZodInt;
|
|
1189
|
+
usedMib: z.ZodInt;
|
|
1190
|
+
requestedMib: z.ZodInt;
|
|
1191
|
+
}, z.core.$strip>;
|
|
1192
|
+
};
|
|
1193
|
+
SERVICE_UNAVAILABLE: {
|
|
1194
|
+
readonly message: "impd is stopping";
|
|
1195
|
+
};
|
|
1196
|
+
INVALID_STATE: {
|
|
1197
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1198
|
+
readonly status: 409;
|
|
1199
|
+
readonly data: z.ZodObject<{
|
|
1200
|
+
state: z.ZodEnum<{
|
|
1201
|
+
creating: "creating";
|
|
1202
|
+
error: "error";
|
|
1203
|
+
running: "running";
|
|
1204
|
+
sleeping: "sleeping";
|
|
1205
|
+
stopped: "stopped";
|
|
1206
|
+
}>;
|
|
1207
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1208
|
+
creating: "creating";
|
|
1209
|
+
error: "error";
|
|
1210
|
+
running: "running";
|
|
1211
|
+
sleeping: "sleeping";
|
|
1212
|
+
stopped: "stopped";
|
|
1213
|
+
}>>;
|
|
1214
|
+
}, z.core.$strip>;
|
|
1215
|
+
};
|
|
1216
|
+
AGENT_OUTDATED: {
|
|
1217
|
+
readonly message: "The imp's agent is too old for this";
|
|
1218
|
+
readonly status: 409;
|
|
1219
|
+
};
|
|
1220
|
+
}>, Record<never, never>>;
|
|
1221
|
+
restore: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1222
|
+
name: z.ZodString;
|
|
1223
|
+
checkpoint: z.ZodString;
|
|
1224
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1225
|
+
id: z.ZodString;
|
|
1226
|
+
name: z.ZodString;
|
|
1227
|
+
image: z.ZodString;
|
|
1228
|
+
state: z.ZodEnum<{
|
|
1229
|
+
creating: "creating";
|
|
1230
|
+
error: "error";
|
|
1231
|
+
running: "running";
|
|
1232
|
+
sleeping: "sleeping";
|
|
1233
|
+
stopped: "stopped";
|
|
1234
|
+
}>;
|
|
1235
|
+
vcpus: z.ZodInt;
|
|
1236
|
+
memoryMib: z.ZodInt;
|
|
1237
|
+
ip: z.ZodIPv4;
|
|
1238
|
+
slot: z.ZodInt;
|
|
1239
|
+
port: z.ZodInt;
|
|
1240
|
+
httpPort: z.ZodInt;
|
|
1241
|
+
url: z.ZodURL;
|
|
1242
|
+
createdAt: z.ZodDate;
|
|
1243
|
+
lastActiveAt: z.ZodDate;
|
|
1244
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
1245
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
1246
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
1247
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
1248
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1249
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
1250
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
1251
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
1252
|
+
agent: "agent";
|
|
1253
|
+
firecracker: "firecracker";
|
|
1254
|
+
impd: "impd";
|
|
1255
|
+
kernel: "kernel";
|
|
1256
|
+
}>>>>;
|
|
1257
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1258
|
+
NOT_FOUND: {
|
|
1259
|
+
readonly message: "Not found";
|
|
1260
|
+
readonly data: z.ZodObject<{
|
|
1261
|
+
kind: z.ZodEnum<{
|
|
1262
|
+
checkpoint: "checkpoint";
|
|
1263
|
+
image: "image";
|
|
1264
|
+
imp: "imp";
|
|
1265
|
+
session: "session";
|
|
1266
|
+
}>;
|
|
1267
|
+
name: z.ZodString;
|
|
1268
|
+
}, z.core.$strip>;
|
|
1269
|
+
};
|
|
1270
|
+
CONFLICT: {
|
|
1271
|
+
readonly message: "Already exists";
|
|
1272
|
+
readonly data: z.ZodObject<{
|
|
1273
|
+
kind: z.ZodEnum<{
|
|
1274
|
+
checkpoint: "checkpoint";
|
|
1275
|
+
image: "image";
|
|
1276
|
+
imp: "imp";
|
|
1277
|
+
session: "session";
|
|
1278
|
+
}>;
|
|
1279
|
+
name: z.ZodString;
|
|
1280
|
+
}, z.core.$strip>;
|
|
1281
|
+
};
|
|
1282
|
+
FORBIDDEN: {
|
|
1283
|
+
readonly message: "Not allowed";
|
|
1284
|
+
};
|
|
1285
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1286
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1287
|
+
readonly status: 503;
|
|
1288
|
+
readonly data: z.ZodObject<{
|
|
1289
|
+
budgetMib: z.ZodInt;
|
|
1290
|
+
usedMib: z.ZodInt;
|
|
1291
|
+
requestedMib: z.ZodInt;
|
|
1292
|
+
}, z.core.$strip>;
|
|
1293
|
+
};
|
|
1294
|
+
SERVICE_UNAVAILABLE: {
|
|
1295
|
+
readonly message: "impd is stopping";
|
|
1296
|
+
};
|
|
1297
|
+
INVALID_STATE: {
|
|
1298
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1299
|
+
readonly status: 409;
|
|
1300
|
+
readonly data: z.ZodObject<{
|
|
1301
|
+
state: z.ZodEnum<{
|
|
1302
|
+
creating: "creating";
|
|
1303
|
+
error: "error";
|
|
1304
|
+
running: "running";
|
|
1305
|
+
sleeping: "sleeping";
|
|
1306
|
+
stopped: "stopped";
|
|
1307
|
+
}>;
|
|
1308
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1309
|
+
creating: "creating";
|
|
1310
|
+
error: "error";
|
|
1311
|
+
running: "running";
|
|
1312
|
+
sleeping: "sleeping";
|
|
1313
|
+
stopped: "stopped";
|
|
1314
|
+
}>>;
|
|
1315
|
+
}, z.core.$strip>;
|
|
1316
|
+
};
|
|
1317
|
+
AGENT_OUTDATED: {
|
|
1318
|
+
readonly message: "The imp's agent is too old for this";
|
|
1319
|
+
readonly status: 409;
|
|
1320
|
+
};
|
|
1321
|
+
}>, Record<never, never>>;
|
|
1322
|
+
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1323
|
+
name: z.ZodString;
|
|
1324
|
+
checkpoint: z.ZodString;
|
|
1325
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1326
|
+
NOT_FOUND: {
|
|
1327
|
+
readonly message: "Not found";
|
|
1328
|
+
readonly data: z.ZodObject<{
|
|
1329
|
+
kind: z.ZodEnum<{
|
|
1330
|
+
checkpoint: "checkpoint";
|
|
1331
|
+
image: "image";
|
|
1332
|
+
imp: "imp";
|
|
1333
|
+
session: "session";
|
|
1334
|
+
}>;
|
|
1335
|
+
name: z.ZodString;
|
|
1336
|
+
}, z.core.$strip>;
|
|
1337
|
+
};
|
|
1338
|
+
CONFLICT: {
|
|
1339
|
+
readonly message: "Already exists";
|
|
1340
|
+
readonly data: z.ZodObject<{
|
|
1341
|
+
kind: z.ZodEnum<{
|
|
1342
|
+
checkpoint: "checkpoint";
|
|
1343
|
+
image: "image";
|
|
1344
|
+
imp: "imp";
|
|
1345
|
+
session: "session";
|
|
1346
|
+
}>;
|
|
1347
|
+
name: z.ZodString;
|
|
1348
|
+
}, z.core.$strip>;
|
|
1349
|
+
};
|
|
1350
|
+
FORBIDDEN: {
|
|
1351
|
+
readonly message: "Not allowed";
|
|
1352
|
+
};
|
|
1353
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1354
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1355
|
+
readonly status: 503;
|
|
1356
|
+
readonly data: z.ZodObject<{
|
|
1357
|
+
budgetMib: z.ZodInt;
|
|
1358
|
+
usedMib: z.ZodInt;
|
|
1359
|
+
requestedMib: z.ZodInt;
|
|
1360
|
+
}, z.core.$strip>;
|
|
1361
|
+
};
|
|
1362
|
+
SERVICE_UNAVAILABLE: {
|
|
1363
|
+
readonly message: "impd is stopping";
|
|
1364
|
+
};
|
|
1365
|
+
INVALID_STATE: {
|
|
1366
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1367
|
+
readonly status: 409;
|
|
1368
|
+
readonly data: z.ZodObject<{
|
|
1369
|
+
state: z.ZodEnum<{
|
|
1370
|
+
creating: "creating";
|
|
1371
|
+
error: "error";
|
|
1372
|
+
running: "running";
|
|
1373
|
+
sleeping: "sleeping";
|
|
1374
|
+
stopped: "stopped";
|
|
1375
|
+
}>;
|
|
1376
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1377
|
+
creating: "creating";
|
|
1378
|
+
error: "error";
|
|
1379
|
+
running: "running";
|
|
1380
|
+
sleeping: "sleeping";
|
|
1381
|
+
stopped: "stopped";
|
|
1382
|
+
}>>;
|
|
1383
|
+
}, z.core.$strip>;
|
|
1384
|
+
};
|
|
1385
|
+
AGENT_OUTDATED: {
|
|
1386
|
+
readonly message: "The imp's agent is too old for this";
|
|
1387
|
+
readonly status: 409;
|
|
1388
|
+
};
|
|
1389
|
+
}>, Record<never, never>>;
|
|
1390
|
+
};
|
|
1391
|
+
images: {
|
|
1392
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
1393
|
+
id: z.ZodString;
|
|
1394
|
+
name: z.ZodString;
|
|
1395
|
+
ref: z.ZodString;
|
|
1396
|
+
digest: z.ZodString;
|
|
1397
|
+
createdAt: z.ZodDate;
|
|
1398
|
+
sizeBytes: z.ZodInt;
|
|
1399
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1400
|
+
NOT_FOUND: {
|
|
1401
|
+
readonly message: "Not found";
|
|
1402
|
+
readonly data: z.ZodObject<{
|
|
1403
|
+
kind: z.ZodEnum<{
|
|
1404
|
+
checkpoint: "checkpoint";
|
|
1405
|
+
image: "image";
|
|
1406
|
+
imp: "imp";
|
|
1407
|
+
session: "session";
|
|
1408
|
+
}>;
|
|
1409
|
+
name: z.ZodString;
|
|
1410
|
+
}, z.core.$strip>;
|
|
1411
|
+
};
|
|
1412
|
+
CONFLICT: {
|
|
1413
|
+
readonly message: "Already exists";
|
|
1414
|
+
readonly data: z.ZodObject<{
|
|
1415
|
+
kind: z.ZodEnum<{
|
|
1416
|
+
checkpoint: "checkpoint";
|
|
1417
|
+
image: "image";
|
|
1418
|
+
imp: "imp";
|
|
1419
|
+
session: "session";
|
|
1420
|
+
}>;
|
|
1421
|
+
name: z.ZodString;
|
|
1422
|
+
}, z.core.$strip>;
|
|
1423
|
+
};
|
|
1424
|
+
FORBIDDEN: {
|
|
1425
|
+
readonly message: "Not allowed";
|
|
1426
|
+
};
|
|
1427
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1428
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1429
|
+
readonly status: 503;
|
|
1430
|
+
readonly data: z.ZodObject<{
|
|
1431
|
+
budgetMib: z.ZodInt;
|
|
1432
|
+
usedMib: z.ZodInt;
|
|
1433
|
+
requestedMib: z.ZodInt;
|
|
1434
|
+
}, z.core.$strip>;
|
|
1435
|
+
};
|
|
1436
|
+
SERVICE_UNAVAILABLE: {
|
|
1437
|
+
readonly message: "impd is stopping";
|
|
1438
|
+
};
|
|
1439
|
+
INVALID_STATE: {
|
|
1440
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1441
|
+
readonly status: 409;
|
|
1442
|
+
readonly data: z.ZodObject<{
|
|
1443
|
+
state: z.ZodEnum<{
|
|
1444
|
+
creating: "creating";
|
|
1445
|
+
error: "error";
|
|
1446
|
+
running: "running";
|
|
1447
|
+
sleeping: "sleeping";
|
|
1448
|
+
stopped: "stopped";
|
|
1449
|
+
}>;
|
|
1450
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1451
|
+
creating: "creating";
|
|
1452
|
+
error: "error";
|
|
1453
|
+
running: "running";
|
|
1454
|
+
sleeping: "sleeping";
|
|
1455
|
+
stopped: "stopped";
|
|
1456
|
+
}>>;
|
|
1457
|
+
}, z.core.$strip>;
|
|
1458
|
+
};
|
|
1459
|
+
AGENT_OUTDATED: {
|
|
1460
|
+
readonly message: "The imp's agent is too old for this";
|
|
1461
|
+
readonly status: 409;
|
|
1462
|
+
};
|
|
1463
|
+
}>, Record<never, never>>;
|
|
1464
|
+
add: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1465
|
+
ref: z.ZodString;
|
|
1466
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1467
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1468
|
+
id: z.ZodString;
|
|
1469
|
+
name: z.ZodString;
|
|
1470
|
+
ref: z.ZodString;
|
|
1471
|
+
digest: z.ZodString;
|
|
1472
|
+
createdAt: z.ZodDate;
|
|
1473
|
+
sizeBytes: z.ZodInt;
|
|
1474
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1475
|
+
NOT_FOUND: {
|
|
1476
|
+
readonly message: "Not found";
|
|
1477
|
+
readonly data: z.ZodObject<{
|
|
1478
|
+
kind: z.ZodEnum<{
|
|
1479
|
+
checkpoint: "checkpoint";
|
|
1480
|
+
image: "image";
|
|
1481
|
+
imp: "imp";
|
|
1482
|
+
session: "session";
|
|
1483
|
+
}>;
|
|
1484
|
+
name: z.ZodString;
|
|
1485
|
+
}, z.core.$strip>;
|
|
1486
|
+
};
|
|
1487
|
+
CONFLICT: {
|
|
1488
|
+
readonly message: "Already exists";
|
|
1489
|
+
readonly data: z.ZodObject<{
|
|
1490
|
+
kind: z.ZodEnum<{
|
|
1491
|
+
checkpoint: "checkpoint";
|
|
1492
|
+
image: "image";
|
|
1493
|
+
imp: "imp";
|
|
1494
|
+
session: "session";
|
|
1495
|
+
}>;
|
|
1496
|
+
name: z.ZodString;
|
|
1497
|
+
}, z.core.$strip>;
|
|
1498
|
+
};
|
|
1499
|
+
FORBIDDEN: {
|
|
1500
|
+
readonly message: "Not allowed";
|
|
1501
|
+
};
|
|
1502
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1503
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1504
|
+
readonly status: 503;
|
|
1505
|
+
readonly data: z.ZodObject<{
|
|
1506
|
+
budgetMib: z.ZodInt;
|
|
1507
|
+
usedMib: z.ZodInt;
|
|
1508
|
+
requestedMib: z.ZodInt;
|
|
1509
|
+
}, z.core.$strip>;
|
|
1510
|
+
};
|
|
1511
|
+
SERVICE_UNAVAILABLE: {
|
|
1512
|
+
readonly message: "impd is stopping";
|
|
1513
|
+
};
|
|
1514
|
+
INVALID_STATE: {
|
|
1515
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1516
|
+
readonly status: 409;
|
|
1517
|
+
readonly data: z.ZodObject<{
|
|
1518
|
+
state: z.ZodEnum<{
|
|
1519
|
+
creating: "creating";
|
|
1520
|
+
error: "error";
|
|
1521
|
+
running: "running";
|
|
1522
|
+
sleeping: "sleeping";
|
|
1523
|
+
stopped: "stopped";
|
|
1524
|
+
}>;
|
|
1525
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1526
|
+
creating: "creating";
|
|
1527
|
+
error: "error";
|
|
1528
|
+
running: "running";
|
|
1529
|
+
sleeping: "sleeping";
|
|
1530
|
+
stopped: "stopped";
|
|
1531
|
+
}>>;
|
|
1532
|
+
}, z.core.$strip>;
|
|
1533
|
+
};
|
|
1534
|
+
AGENT_OUTDATED: {
|
|
1535
|
+
readonly message: "The imp's agent is too old for this";
|
|
1536
|
+
readonly status: 409;
|
|
1537
|
+
};
|
|
1538
|
+
}>, Record<never, never>>;
|
|
1539
|
+
build: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1540
|
+
contextDir: z.ZodString;
|
|
1541
|
+
name: z.ZodString;
|
|
1542
|
+
dockerfile: z.ZodOptional<z.ZodString>;
|
|
1543
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1544
|
+
id: z.ZodString;
|
|
1545
|
+
name: z.ZodString;
|
|
1546
|
+
ref: z.ZodString;
|
|
1547
|
+
digest: z.ZodString;
|
|
1548
|
+
createdAt: z.ZodDate;
|
|
1549
|
+
sizeBytes: z.ZodInt;
|
|
1550
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1551
|
+
NOT_FOUND: {
|
|
1552
|
+
readonly message: "Not found";
|
|
1553
|
+
readonly data: z.ZodObject<{
|
|
1554
|
+
kind: z.ZodEnum<{
|
|
1555
|
+
checkpoint: "checkpoint";
|
|
1556
|
+
image: "image";
|
|
1557
|
+
imp: "imp";
|
|
1558
|
+
session: "session";
|
|
1559
|
+
}>;
|
|
1560
|
+
name: z.ZodString;
|
|
1561
|
+
}, z.core.$strip>;
|
|
1562
|
+
};
|
|
1563
|
+
CONFLICT: {
|
|
1564
|
+
readonly message: "Already exists";
|
|
1565
|
+
readonly data: z.ZodObject<{
|
|
1566
|
+
kind: z.ZodEnum<{
|
|
1567
|
+
checkpoint: "checkpoint";
|
|
1568
|
+
image: "image";
|
|
1569
|
+
imp: "imp";
|
|
1570
|
+
session: "session";
|
|
1571
|
+
}>;
|
|
1572
|
+
name: z.ZodString;
|
|
1573
|
+
}, z.core.$strip>;
|
|
1574
|
+
};
|
|
1575
|
+
FORBIDDEN: {
|
|
1576
|
+
readonly message: "Not allowed";
|
|
1577
|
+
};
|
|
1578
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1579
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1580
|
+
readonly status: 503;
|
|
1581
|
+
readonly data: z.ZodObject<{
|
|
1582
|
+
budgetMib: z.ZodInt;
|
|
1583
|
+
usedMib: z.ZodInt;
|
|
1584
|
+
requestedMib: z.ZodInt;
|
|
1585
|
+
}, z.core.$strip>;
|
|
1586
|
+
};
|
|
1587
|
+
SERVICE_UNAVAILABLE: {
|
|
1588
|
+
readonly message: "impd is stopping";
|
|
1589
|
+
};
|
|
1590
|
+
INVALID_STATE: {
|
|
1591
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1592
|
+
readonly status: 409;
|
|
1593
|
+
readonly data: z.ZodObject<{
|
|
1594
|
+
state: z.ZodEnum<{
|
|
1595
|
+
creating: "creating";
|
|
1596
|
+
error: "error";
|
|
1597
|
+
running: "running";
|
|
1598
|
+
sleeping: "sleeping";
|
|
1599
|
+
stopped: "stopped";
|
|
1600
|
+
}>;
|
|
1601
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1602
|
+
creating: "creating";
|
|
1603
|
+
error: "error";
|
|
1604
|
+
running: "running";
|
|
1605
|
+
sleeping: "sleeping";
|
|
1606
|
+
stopped: "stopped";
|
|
1607
|
+
}>>;
|
|
1608
|
+
}, z.core.$strip>;
|
|
1609
|
+
};
|
|
1610
|
+
AGENT_OUTDATED: {
|
|
1611
|
+
readonly message: "The imp's agent is too old for this";
|
|
1612
|
+
readonly status: 409;
|
|
1613
|
+
};
|
|
1614
|
+
}>, Record<never, never>>;
|
|
1615
|
+
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1616
|
+
name: z.ZodString;
|
|
1617
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1618
|
+
NOT_FOUND: {
|
|
1619
|
+
readonly message: "Not found";
|
|
1620
|
+
readonly data: z.ZodObject<{
|
|
1621
|
+
kind: z.ZodEnum<{
|
|
1622
|
+
checkpoint: "checkpoint";
|
|
1623
|
+
image: "image";
|
|
1624
|
+
imp: "imp";
|
|
1625
|
+
session: "session";
|
|
1626
|
+
}>;
|
|
1627
|
+
name: z.ZodString;
|
|
1628
|
+
}, z.core.$strip>;
|
|
1629
|
+
};
|
|
1630
|
+
CONFLICT: {
|
|
1631
|
+
readonly message: "Already exists";
|
|
1632
|
+
readonly data: z.ZodObject<{
|
|
1633
|
+
kind: z.ZodEnum<{
|
|
1634
|
+
checkpoint: "checkpoint";
|
|
1635
|
+
image: "image";
|
|
1636
|
+
imp: "imp";
|
|
1637
|
+
session: "session";
|
|
1638
|
+
}>;
|
|
1639
|
+
name: z.ZodString;
|
|
1640
|
+
}, z.core.$strip>;
|
|
1641
|
+
};
|
|
1642
|
+
FORBIDDEN: {
|
|
1643
|
+
readonly message: "Not allowed";
|
|
1644
|
+
};
|
|
1645
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1646
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1647
|
+
readonly status: 503;
|
|
1648
|
+
readonly data: z.ZodObject<{
|
|
1649
|
+
budgetMib: z.ZodInt;
|
|
1650
|
+
usedMib: z.ZodInt;
|
|
1651
|
+
requestedMib: z.ZodInt;
|
|
1652
|
+
}, z.core.$strip>;
|
|
1653
|
+
};
|
|
1654
|
+
SERVICE_UNAVAILABLE: {
|
|
1655
|
+
readonly message: "impd is stopping";
|
|
1656
|
+
};
|
|
1657
|
+
INVALID_STATE: {
|
|
1658
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1659
|
+
readonly status: 409;
|
|
1660
|
+
readonly data: z.ZodObject<{
|
|
1661
|
+
state: z.ZodEnum<{
|
|
1662
|
+
creating: "creating";
|
|
1663
|
+
error: "error";
|
|
1664
|
+
running: "running";
|
|
1665
|
+
sleeping: "sleeping";
|
|
1666
|
+
stopped: "stopped";
|
|
1667
|
+
}>;
|
|
1668
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1669
|
+
creating: "creating";
|
|
1670
|
+
error: "error";
|
|
1671
|
+
running: "running";
|
|
1672
|
+
sleeping: "sleeping";
|
|
1673
|
+
stopped: "stopped";
|
|
1674
|
+
}>>;
|
|
1675
|
+
}, z.core.$strip>;
|
|
1676
|
+
};
|
|
1677
|
+
AGENT_OUTDATED: {
|
|
1678
|
+
readonly message: "The imp's agent is too old for this";
|
|
1679
|
+
readonly status: 409;
|
|
1680
|
+
};
|
|
1681
|
+
}>, Record<never, never>>;
|
|
1682
|
+
};
|
|
1683
|
+
exec: {
|
|
1684
|
+
ticket: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1685
|
+
name: z.ZodString;
|
|
1686
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1687
|
+
ticket: z.ZodString;
|
|
1688
|
+
expiresAt: z.ZodDate;
|
|
1689
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1690
|
+
NOT_FOUND: {
|
|
1691
|
+
readonly message: "Not found";
|
|
1692
|
+
readonly data: z.ZodObject<{
|
|
1693
|
+
kind: z.ZodEnum<{
|
|
1694
|
+
checkpoint: "checkpoint";
|
|
1695
|
+
image: "image";
|
|
1696
|
+
imp: "imp";
|
|
1697
|
+
session: "session";
|
|
1698
|
+
}>;
|
|
1699
|
+
name: z.ZodString;
|
|
1700
|
+
}, z.core.$strip>;
|
|
1701
|
+
};
|
|
1702
|
+
CONFLICT: {
|
|
1703
|
+
readonly message: "Already exists";
|
|
1704
|
+
readonly data: z.ZodObject<{
|
|
1705
|
+
kind: z.ZodEnum<{
|
|
1706
|
+
checkpoint: "checkpoint";
|
|
1707
|
+
image: "image";
|
|
1708
|
+
imp: "imp";
|
|
1709
|
+
session: "session";
|
|
1710
|
+
}>;
|
|
1711
|
+
name: z.ZodString;
|
|
1712
|
+
}, z.core.$strip>;
|
|
1713
|
+
};
|
|
1714
|
+
FORBIDDEN: {
|
|
1715
|
+
readonly message: "Not allowed";
|
|
1716
|
+
};
|
|
1717
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1718
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1719
|
+
readonly status: 503;
|
|
1720
|
+
readonly data: z.ZodObject<{
|
|
1721
|
+
budgetMib: z.ZodInt;
|
|
1722
|
+
usedMib: z.ZodInt;
|
|
1723
|
+
requestedMib: z.ZodInt;
|
|
1724
|
+
}, z.core.$strip>;
|
|
1725
|
+
};
|
|
1726
|
+
SERVICE_UNAVAILABLE: {
|
|
1727
|
+
readonly message: "impd is stopping";
|
|
1728
|
+
};
|
|
1729
|
+
INVALID_STATE: {
|
|
1730
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1731
|
+
readonly status: 409;
|
|
1732
|
+
readonly data: z.ZodObject<{
|
|
1733
|
+
state: z.ZodEnum<{
|
|
1734
|
+
creating: "creating";
|
|
1735
|
+
error: "error";
|
|
1736
|
+
running: "running";
|
|
1737
|
+
sleeping: "sleeping";
|
|
1738
|
+
stopped: "stopped";
|
|
1739
|
+
}>;
|
|
1740
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1741
|
+
creating: "creating";
|
|
1742
|
+
error: "error";
|
|
1743
|
+
running: "running";
|
|
1744
|
+
sleeping: "sleeping";
|
|
1745
|
+
stopped: "stopped";
|
|
1746
|
+
}>>;
|
|
1747
|
+
}, z.core.$strip>;
|
|
1748
|
+
};
|
|
1749
|
+
AGENT_OUTDATED: {
|
|
1750
|
+
readonly message: "The imp's agent is too old for this";
|
|
1751
|
+
readonly status: 409;
|
|
1752
|
+
};
|
|
1753
|
+
}>, Record<never, never>>;
|
|
1754
|
+
};
|
|
1755
|
+
sessions: {
|
|
1756
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1757
|
+
name: z.ZodString;
|
|
1758
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
1759
|
+
name: z.ZodString;
|
|
1760
|
+
pid: z.ZodInt;
|
|
1761
|
+
argv: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
1762
|
+
state: z.ZodEnum<{
|
|
1763
|
+
exited: "exited";
|
|
1764
|
+
running: "running";
|
|
1765
|
+
}>;
|
|
1766
|
+
attached: z.ZodBoolean;
|
|
1767
|
+
cols: z.ZodInt;
|
|
1768
|
+
rows: z.ZodInt;
|
|
1769
|
+
startedAt: z.ZodDate;
|
|
1770
|
+
exit: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
1771
|
+
code: z.ZodNullable<z.ZodInt>;
|
|
1772
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
1773
|
+
}, z.core.$strip>>>;
|
|
1774
|
+
}, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1775
|
+
NOT_FOUND: {
|
|
1776
|
+
readonly message: "Not found";
|
|
1777
|
+
readonly data: z.ZodObject<{
|
|
1778
|
+
kind: z.ZodEnum<{
|
|
1779
|
+
checkpoint: "checkpoint";
|
|
1780
|
+
image: "image";
|
|
1781
|
+
imp: "imp";
|
|
1782
|
+
session: "session";
|
|
1783
|
+
}>;
|
|
1784
|
+
name: z.ZodString;
|
|
1785
|
+
}, z.core.$strip>;
|
|
1786
|
+
};
|
|
1787
|
+
CONFLICT: {
|
|
1788
|
+
readonly message: "Already exists";
|
|
1789
|
+
readonly data: z.ZodObject<{
|
|
1790
|
+
kind: z.ZodEnum<{
|
|
1791
|
+
checkpoint: "checkpoint";
|
|
1792
|
+
image: "image";
|
|
1793
|
+
imp: "imp";
|
|
1794
|
+
session: "session";
|
|
1795
|
+
}>;
|
|
1796
|
+
name: z.ZodString;
|
|
1797
|
+
}, z.core.$strip>;
|
|
1798
|
+
};
|
|
1799
|
+
FORBIDDEN: {
|
|
1800
|
+
readonly message: "Not allowed";
|
|
1801
|
+
};
|
|
1802
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1803
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1804
|
+
readonly status: 503;
|
|
1805
|
+
readonly data: z.ZodObject<{
|
|
1806
|
+
budgetMib: z.ZodInt;
|
|
1807
|
+
usedMib: z.ZodInt;
|
|
1808
|
+
requestedMib: z.ZodInt;
|
|
1809
|
+
}, z.core.$strip>;
|
|
1810
|
+
};
|
|
1811
|
+
SERVICE_UNAVAILABLE: {
|
|
1812
|
+
readonly message: "impd is stopping";
|
|
1813
|
+
};
|
|
1814
|
+
INVALID_STATE: {
|
|
1815
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1816
|
+
readonly status: 409;
|
|
1817
|
+
readonly data: z.ZodObject<{
|
|
1818
|
+
state: z.ZodEnum<{
|
|
1819
|
+
creating: "creating";
|
|
1820
|
+
error: "error";
|
|
1821
|
+
running: "running";
|
|
1822
|
+
sleeping: "sleeping";
|
|
1823
|
+
stopped: "stopped";
|
|
1824
|
+
}>;
|
|
1825
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1826
|
+
creating: "creating";
|
|
1827
|
+
error: "error";
|
|
1828
|
+
running: "running";
|
|
1829
|
+
sleeping: "sleeping";
|
|
1830
|
+
stopped: "stopped";
|
|
1831
|
+
}>>;
|
|
1832
|
+
}, z.core.$strip>;
|
|
1833
|
+
};
|
|
1834
|
+
AGENT_OUTDATED: {
|
|
1835
|
+
readonly message: "The imp's agent is too old for this";
|
|
1836
|
+
readonly status: 409;
|
|
1837
|
+
};
|
|
1838
|
+
}>, Record<never, never>>;
|
|
1839
|
+
kill: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1840
|
+
name: z.ZodString;
|
|
1841
|
+
session: z.ZodString;
|
|
1842
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1843
|
+
NOT_FOUND: {
|
|
1844
|
+
readonly message: "Not found";
|
|
1845
|
+
readonly data: z.ZodObject<{
|
|
1846
|
+
kind: z.ZodEnum<{
|
|
1847
|
+
checkpoint: "checkpoint";
|
|
1848
|
+
image: "image";
|
|
1849
|
+
imp: "imp";
|
|
1850
|
+
session: "session";
|
|
1851
|
+
}>;
|
|
1852
|
+
name: z.ZodString;
|
|
1853
|
+
}, z.core.$strip>;
|
|
1854
|
+
};
|
|
1855
|
+
CONFLICT: {
|
|
1856
|
+
readonly message: "Already exists";
|
|
1857
|
+
readonly data: z.ZodObject<{
|
|
1858
|
+
kind: z.ZodEnum<{
|
|
1859
|
+
checkpoint: "checkpoint";
|
|
1860
|
+
image: "image";
|
|
1861
|
+
imp: "imp";
|
|
1862
|
+
session: "session";
|
|
1863
|
+
}>;
|
|
1864
|
+
name: z.ZodString;
|
|
1865
|
+
}, z.core.$strip>;
|
|
1866
|
+
};
|
|
1867
|
+
FORBIDDEN: {
|
|
1868
|
+
readonly message: "Not allowed";
|
|
1869
|
+
};
|
|
1870
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1871
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1872
|
+
readonly status: 503;
|
|
1873
|
+
readonly data: z.ZodObject<{
|
|
1874
|
+
budgetMib: z.ZodInt;
|
|
1875
|
+
usedMib: z.ZodInt;
|
|
1876
|
+
requestedMib: z.ZodInt;
|
|
1877
|
+
}, z.core.$strip>;
|
|
1878
|
+
};
|
|
1879
|
+
SERVICE_UNAVAILABLE: {
|
|
1880
|
+
readonly message: "impd is stopping";
|
|
1881
|
+
};
|
|
1882
|
+
INVALID_STATE: {
|
|
1883
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1884
|
+
readonly status: 409;
|
|
1885
|
+
readonly data: z.ZodObject<{
|
|
1886
|
+
state: z.ZodEnum<{
|
|
1887
|
+
creating: "creating";
|
|
1888
|
+
error: "error";
|
|
1889
|
+
running: "running";
|
|
1890
|
+
sleeping: "sleeping";
|
|
1891
|
+
stopped: "stopped";
|
|
1892
|
+
}>;
|
|
1893
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1894
|
+
creating: "creating";
|
|
1895
|
+
error: "error";
|
|
1896
|
+
running: "running";
|
|
1897
|
+
sleeping: "sleeping";
|
|
1898
|
+
stopped: "stopped";
|
|
1899
|
+
}>>;
|
|
1900
|
+
}, z.core.$strip>;
|
|
1901
|
+
};
|
|
1902
|
+
AGENT_OUTDATED: {
|
|
1903
|
+
readonly message: "The imp's agent is too old for this";
|
|
1904
|
+
readonly status: 409;
|
|
1905
|
+
};
|
|
1906
|
+
}>, Record<never, never>>;
|
|
1907
|
+
};
|
|
1908
|
+
system: {
|
|
1909
|
+
info: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
1910
|
+
version: z.ZodString;
|
|
1911
|
+
ramBudgetMib: z.ZodInt;
|
|
1912
|
+
ramUsedMib: z.ZodInt;
|
|
1913
|
+
ramReservedMib: z.ZodInt;
|
|
1914
|
+
ramCommittedMib: z.ZodInt;
|
|
1915
|
+
awakeCount: z.ZodInt;
|
|
1916
|
+
impCount: z.ZodInt;
|
|
1917
|
+
sessionCount: z.ZodInt;
|
|
1918
|
+
firecrackerVersion: z.ZodNullable<z.ZodString>;
|
|
1919
|
+
guestKernel: z.ZodObject<{
|
|
1920
|
+
version: z.ZodNullable<z.ZodString>;
|
|
1921
|
+
sha256: z.ZodString;
|
|
1922
|
+
}, z.core.$strip>;
|
|
1923
|
+
systemDrive: z.ZodObject<{
|
|
1924
|
+
sha256: z.ZodString;
|
|
1925
|
+
}, z.core.$strip>;
|
|
1926
|
+
storage: z.ZodObject<{
|
|
1927
|
+
backend: z.ZodEnum<{
|
|
1928
|
+
xfs: "xfs";
|
|
1929
|
+
zfs: "zfs";
|
|
1930
|
+
}>;
|
|
1931
|
+
usedBytes: z.ZodInt;
|
|
1932
|
+
availableBytes: z.ZodInt;
|
|
1933
|
+
}, z.core.$strip>;
|
|
1934
|
+
tailscale: z.ZodObject<{
|
|
1935
|
+
enabled: z.ZodBoolean;
|
|
1936
|
+
state: z.ZodNullable<z.ZodString>;
|
|
1937
|
+
hostname: z.ZodNullable<z.ZodString>;
|
|
1938
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
1939
|
+
}, z.core.$strip>;
|
|
1940
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1941
|
+
NOT_FOUND: {
|
|
1942
|
+
readonly message: "Not found";
|
|
1943
|
+
readonly data: z.ZodObject<{
|
|
1944
|
+
kind: z.ZodEnum<{
|
|
1945
|
+
checkpoint: "checkpoint";
|
|
1946
|
+
image: "image";
|
|
1947
|
+
imp: "imp";
|
|
1948
|
+
session: "session";
|
|
1949
|
+
}>;
|
|
1950
|
+
name: z.ZodString;
|
|
1951
|
+
}, z.core.$strip>;
|
|
1952
|
+
};
|
|
1953
|
+
CONFLICT: {
|
|
1954
|
+
readonly message: "Already exists";
|
|
1955
|
+
readonly data: z.ZodObject<{
|
|
1956
|
+
kind: z.ZodEnum<{
|
|
1957
|
+
checkpoint: "checkpoint";
|
|
1958
|
+
image: "image";
|
|
1959
|
+
imp: "imp";
|
|
1960
|
+
session: "session";
|
|
1961
|
+
}>;
|
|
1962
|
+
name: z.ZodString;
|
|
1963
|
+
}, z.core.$strip>;
|
|
1964
|
+
};
|
|
1965
|
+
FORBIDDEN: {
|
|
1966
|
+
readonly message: "Not allowed";
|
|
1967
|
+
};
|
|
1968
|
+
RAM_BUDGET_EXCEEDED: {
|
|
1969
|
+
readonly message: "Not enough RAM budget, even after sleeping idle imps";
|
|
1970
|
+
readonly status: 503;
|
|
1971
|
+
readonly data: z.ZodObject<{
|
|
1972
|
+
budgetMib: z.ZodInt;
|
|
1973
|
+
usedMib: z.ZodInt;
|
|
1974
|
+
requestedMib: z.ZodInt;
|
|
1975
|
+
}, z.core.$strip>;
|
|
1976
|
+
};
|
|
1977
|
+
SERVICE_UNAVAILABLE: {
|
|
1978
|
+
readonly message: "impd is stopping";
|
|
1979
|
+
};
|
|
1980
|
+
INVALID_STATE: {
|
|
1981
|
+
readonly message: "The imp is not in a state that allows this";
|
|
1982
|
+
readonly status: 409;
|
|
1983
|
+
readonly data: z.ZodObject<{
|
|
1984
|
+
state: z.ZodEnum<{
|
|
1985
|
+
creating: "creating";
|
|
1986
|
+
error: "error";
|
|
1987
|
+
running: "running";
|
|
1988
|
+
sleeping: "sleeping";
|
|
1989
|
+
stopped: "stopped";
|
|
1990
|
+
}>;
|
|
1991
|
+
allowed: z.ZodArray<z.ZodEnum<{
|
|
1992
|
+
creating: "creating";
|
|
1993
|
+
error: "error";
|
|
1994
|
+
running: "running";
|
|
1995
|
+
sleeping: "sleeping";
|
|
1996
|
+
stopped: "stopped";
|
|
1997
|
+
}>>;
|
|
1998
|
+
}, z.core.$strip>;
|
|
1999
|
+
};
|
|
2000
|
+
AGENT_OUTDATED: {
|
|
2001
|
+
readonly message: "The imp's agent is too old for this";
|
|
2002
|
+
readonly status: 409;
|
|
2003
|
+
};
|
|
2004
|
+
}>, Record<never, never>>;
|
|
2005
|
+
};
|
|
2006
|
+
};
|
|
2007
|
+
type ImpContract = typeof impContract;
|
|
2008
|
+
//#endregion
|
|
2009
|
+
//#region ../api/src/imp-schema.d.ts
|
|
2010
|
+
declare const ImpStateSchema: z.ZodEnum<{
|
|
2011
|
+
creating: "creating";
|
|
2012
|
+
error: "error";
|
|
2013
|
+
running: "running";
|
|
2014
|
+
sleeping: "sleeping";
|
|
2015
|
+
stopped: "stopped";
|
|
2016
|
+
}>;
|
|
2017
|
+
type ImpState = z.infer<typeof ImpStateSchema>;
|
|
2018
|
+
declare const ImpSchema: z.ZodObject<{
|
|
2019
|
+
id: z.ZodString;
|
|
2020
|
+
name: z.ZodString;
|
|
2021
|
+
image: z.ZodString;
|
|
2022
|
+
state: z.ZodEnum<{
|
|
2023
|
+
creating: "creating";
|
|
2024
|
+
error: "error";
|
|
2025
|
+
running: "running";
|
|
2026
|
+
sleeping: "sleeping";
|
|
2027
|
+
stopped: "stopped";
|
|
2028
|
+
}>;
|
|
2029
|
+
vcpus: z.ZodInt;
|
|
2030
|
+
memoryMib: z.ZodInt;
|
|
2031
|
+
ip: z.ZodIPv4;
|
|
2032
|
+
slot: z.ZodInt;
|
|
2033
|
+
port: z.ZodInt;
|
|
2034
|
+
httpPort: z.ZodInt;
|
|
2035
|
+
url: z.ZodURL;
|
|
2036
|
+
createdAt: z.ZodDate;
|
|
2037
|
+
lastActiveAt: z.ZodDate;
|
|
2038
|
+
ramMib: z.ZodOptional<z.ZodInt>;
|
|
2039
|
+
rssMib: z.ZodOptional<z.ZodInt>;
|
|
2040
|
+
sleptAt: z.ZodOptional<z.ZodDate>;
|
|
2041
|
+
holdUntil: z.ZodOptional<z.ZodDate>;
|
|
2042
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2043
|
+
sessions: z.ZodOptional<z.ZodInt>;
|
|
2044
|
+
coldBootReason: z.ZodOptional<z.ZodString>;
|
|
2045
|
+
outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
2046
|
+
agent: "agent";
|
|
2047
|
+
firecracker: "firecracker";
|
|
2048
|
+
impd: "impd";
|
|
2049
|
+
kernel: "kernel";
|
|
2050
|
+
}>>>>;
|
|
2051
|
+
}, z.core.$strip>;
|
|
2052
|
+
type Imp = z.infer<typeof ImpSchema>;
|
|
2053
|
+
//#endregion
|
|
2054
|
+
//#region ../api/src/session-schema.d.ts
|
|
2055
|
+
declare const SessionSchema: z.ZodObject<{
|
|
2056
|
+
name: z.ZodString;
|
|
2057
|
+
pid: z.ZodInt;
|
|
2058
|
+
argv: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
2059
|
+
state: z.ZodEnum<{
|
|
2060
|
+
exited: "exited";
|
|
2061
|
+
running: "running";
|
|
2062
|
+
}>;
|
|
2063
|
+
attached: z.ZodBoolean;
|
|
2064
|
+
cols: z.ZodInt;
|
|
2065
|
+
rows: z.ZodInt;
|
|
2066
|
+
startedAt: z.ZodDate;
|
|
2067
|
+
exit: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
2068
|
+
code: z.ZodNullable<z.ZodInt>;
|
|
2069
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
2070
|
+
}, z.core.$strip>>>;
|
|
2071
|
+
}, z.core.$strip>;
|
|
2072
|
+
type Session = z.infer<typeof SessionSchema>;
|
|
2073
|
+
//#endregion
|
|
2074
|
+
//#region ../api/src/system-info-schema.d.ts
|
|
2075
|
+
declare const SystemInfoSchema: z.ZodObject<{
|
|
2076
|
+
version: z.ZodString;
|
|
2077
|
+
ramBudgetMib: z.ZodInt;
|
|
2078
|
+
ramUsedMib: z.ZodInt;
|
|
2079
|
+
ramReservedMib: z.ZodInt;
|
|
2080
|
+
ramCommittedMib: z.ZodInt;
|
|
2081
|
+
awakeCount: z.ZodInt;
|
|
2082
|
+
impCount: z.ZodInt;
|
|
2083
|
+
sessionCount: z.ZodInt;
|
|
2084
|
+
firecrackerVersion: z.ZodNullable<z.ZodString>;
|
|
2085
|
+
guestKernel: z.ZodObject<{
|
|
2086
|
+
version: z.ZodNullable<z.ZodString>;
|
|
2087
|
+
sha256: z.ZodString;
|
|
2088
|
+
}, z.core.$strip>;
|
|
2089
|
+
systemDrive: z.ZodObject<{
|
|
2090
|
+
sha256: z.ZodString;
|
|
2091
|
+
}, z.core.$strip>;
|
|
2092
|
+
storage: z.ZodObject<{
|
|
2093
|
+
backend: z.ZodEnum<{
|
|
2094
|
+
xfs: "xfs";
|
|
2095
|
+
zfs: "zfs";
|
|
2096
|
+
}>;
|
|
2097
|
+
usedBytes: z.ZodInt;
|
|
2098
|
+
availableBytes: z.ZodInt;
|
|
2099
|
+
}, z.core.$strip>;
|
|
2100
|
+
tailscale: z.ZodObject<{
|
|
2101
|
+
enabled: z.ZodBoolean;
|
|
2102
|
+
state: z.ZodNullable<z.ZodString>;
|
|
2103
|
+
hostname: z.ZodNullable<z.ZodString>;
|
|
2104
|
+
ip: z.ZodNullable<z.ZodString>;
|
|
2105
|
+
}, z.core.$strip>;
|
|
2106
|
+
}, z.core.$strip>;
|
|
2107
|
+
type SystemInfo = z.infer<typeof SystemInfoSchema>;
|
|
2108
|
+
//#endregion
|
|
2109
|
+
//#region src/check-server.d.ts
|
|
2110
|
+
export declare const CLIENT_VERSION: string;
|
|
2111
|
+
interface ServerCheck {
|
|
2112
|
+
readonly clientVersion: string;
|
|
2113
|
+
readonly serverVersion: string;
|
|
2114
|
+
readonly compatible: boolean;
|
|
2115
|
+
}
|
|
2116
|
+
//#endregion
|
|
2117
|
+
//#region src/exec/open-exec-session.d.ts
|
|
2118
|
+
interface ExecStart {
|
|
2119
|
+
readonly name: string;
|
|
2120
|
+
readonly argv: readonly string[];
|
|
2121
|
+
readonly tty: boolean;
|
|
2122
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
2123
|
+
readonly cwd?: string;
|
|
2124
|
+
readonly cols?: number;
|
|
2125
|
+
readonly rows?: number;
|
|
2126
|
+
readonly session?: string;
|
|
2127
|
+
}
|
|
2128
|
+
interface ExecAttach {
|
|
2129
|
+
readonly name: string;
|
|
2130
|
+
readonly session: string;
|
|
2131
|
+
readonly cols?: number;
|
|
2132
|
+
readonly rows?: number;
|
|
2133
|
+
}
|
|
2134
|
+
interface ExecStarted {
|
|
2135
|
+
readonly pid: number;
|
|
2136
|
+
readonly session: string | null;
|
|
2137
|
+
readonly created: boolean;
|
|
2138
|
+
}
|
|
2139
|
+
type ExecOutcome = {
|
|
2140
|
+
readonly kind: 'exit';
|
|
2141
|
+
readonly code: number | null;
|
|
2142
|
+
readonly signal: string | null;
|
|
2143
|
+
} | {
|
|
2144
|
+
readonly kind: 'failed';
|
|
2145
|
+
readonly code: string | null;
|
|
2146
|
+
readonly message: string;
|
|
2147
|
+
readonly data?: unknown;
|
|
2148
|
+
} | {
|
|
2149
|
+
readonly kind: 'unauthorized';
|
|
2150
|
+
readonly ticketRefused?: boolean;
|
|
2151
|
+
} | {
|
|
2152
|
+
readonly kind: 'unreachable';
|
|
2153
|
+
readonly detail: string;
|
|
2154
|
+
} | {
|
|
2155
|
+
readonly kind: 'detached';
|
|
2156
|
+
readonly reason: DetachReason;
|
|
2157
|
+
} | {
|
|
2158
|
+
readonly kind: 'closed';
|
|
2159
|
+
readonly reason: string;
|
|
2160
|
+
readonly closeCode?: number;
|
|
2161
|
+
} | {
|
|
2162
|
+
readonly kind: 'bad_message';
|
|
2163
|
+
readonly detail: string;
|
|
2164
|
+
} | {
|
|
2165
|
+
readonly kind: 'local_error';
|
|
2166
|
+
readonly error: unknown;
|
|
2167
|
+
};
|
|
2168
|
+
interface ExecSessionOptions {
|
|
2169
|
+
readonly baseUrl: string;
|
|
2170
|
+
readonly token: string | null;
|
|
2171
|
+
readonly ticket?: string;
|
|
2172
|
+
readonly start: ExecStart | ExecAttach;
|
|
2173
|
+
readonly onStarted: (started: ExecStarted) => void;
|
|
2174
|
+
readonly onOutput: (channel: 'stdout' | 'stderr', data: Uint8Array) => void;
|
|
2175
|
+
readonly connect: (url: string, headers: Readonly<Record<string, string>>) => WebSocket;
|
|
2176
|
+
readonly fetch?: (request: Request) => Promise<Response>;
|
|
2177
|
+
}
|
|
2178
|
+
interface ExecSession {
|
|
2179
|
+
readonly outcome: Promise<ExecOutcome>;
|
|
2180
|
+
readonly isStarted: () => boolean;
|
|
2181
|
+
readonly sendStdin: (data: Uint8Array) => boolean;
|
|
2182
|
+
readonly waitForDrain: () => Promise<void>;
|
|
2183
|
+
readonly closeStdin: () => void;
|
|
2184
|
+
readonly resize: (cols: number, rows: number) => void;
|
|
2185
|
+
readonly sendSignal: (signal: string) => void;
|
|
2186
|
+
readonly stop: () => void;
|
|
2187
|
+
}
|
|
2188
|
+
export declare function openExecSession(options: Readonly<ExecSessionOptions>): ExecSession;
|
|
2189
|
+
//#endregion
|
|
2190
|
+
//#region src/exec/open-exec.d.ts
|
|
2191
|
+
interface ExecOptions {
|
|
2192
|
+
readonly tty?: boolean;
|
|
2193
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
2194
|
+
readonly cwd?: string;
|
|
2195
|
+
readonly cols?: number;
|
|
2196
|
+
readonly rows?: number;
|
|
2197
|
+
readonly session?: string;
|
|
2198
|
+
readonly signal?: Readonly<AbortSignal>;
|
|
2199
|
+
readonly maxUnreadBytes?: number;
|
|
2200
|
+
}
|
|
2201
|
+
interface ExecExit {
|
|
2202
|
+
readonly code: number | null;
|
|
2203
|
+
readonly signal: string | null;
|
|
2204
|
+
}
|
|
2205
|
+
interface ExecHandle {
|
|
2206
|
+
readonly started: Promise<ExecStarted>;
|
|
2207
|
+
readonly stdout: ReadableStream<Uint8Array>;
|
|
2208
|
+
readonly stderr: ReadableStream<Uint8Array>;
|
|
2209
|
+
readonly exit: Promise<ExecExit>;
|
|
2210
|
+
readonly write: (data: string | Uint8Array) => Promise<void>;
|
|
2211
|
+
readonly closeStdin: () => Promise<void>;
|
|
2212
|
+
readonly resize: (cols: number, rows: number) => void;
|
|
2213
|
+
readonly sendSignal: (signal: string) => void;
|
|
2214
|
+
readonly close: () => void;
|
|
2215
|
+
}
|
|
2216
|
+
export declare const CONSOLE_SHELL: string;
|
|
2217
|
+
type AttachOptions = Pick<ExecOptions, 'cols' | 'rows' | 'signal' | 'maxUnreadBytes'>;
|
|
2218
|
+
type ConsoleOptions = Omit<ExecOptions, 'tty'>;
|
|
2219
|
+
interface RunResult extends ExecExit {
|
|
2220
|
+
readonly stdout: Uint8Array;
|
|
2221
|
+
readonly stderr: Uint8Array;
|
|
2222
|
+
}
|
|
2223
|
+
interface RunOptions extends Omit<ExecOptions, 'tty' | 'cols' | 'rows'> {
|
|
2224
|
+
readonly stdin?: string | Uint8Array;
|
|
2225
|
+
}
|
|
2226
|
+
//#endregion
|
|
2227
|
+
//#region src/require-awake.d.ts
|
|
2228
|
+
interface RequireAwakeOptions {
|
|
2229
|
+
readonly restartError?: boolean;
|
|
2230
|
+
readonly retryUnavailable?: {
|
|
2231
|
+
readonly attempts: number;
|
|
2232
|
+
readonly delayMs: number;
|
|
2233
|
+
};
|
|
2234
|
+
readonly signal?: Readonly<AbortSignal>;
|
|
2235
|
+
}
|
|
2236
|
+
//#endregion
|
|
2237
|
+
//#region src/create-imp-client.d.ts
|
|
2238
|
+
type RpcClient = ContractRouterClient<ImpContract>;
|
|
2239
|
+
interface ImpClientOptions {
|
|
2240
|
+
readonly url: string;
|
|
2241
|
+
readonly token?: string;
|
|
2242
|
+
readonly fetch?: (request: Request) => Promise<Response>;
|
|
2243
|
+
}
|
|
2244
|
+
interface ImpClient extends RpcClient {
|
|
2245
|
+
readonly requireAwake: (name: string, options?: RequireAwakeOptions) => Promise<Imp>;
|
|
2246
|
+
readonly checkServer: () => Promise<ServerCheck>;
|
|
2247
|
+
readonly openExec: (name: string, argv: readonly string[], options?: ExecOptions) => Promise<ExecHandle>;
|
|
2248
|
+
readonly run: (name: string, argv: readonly string[], options?: RunOptions) => Promise<RunResult>;
|
|
2249
|
+
readonly openConsole: (name: string, options?: ConsoleOptions) => Promise<ExecHandle>;
|
|
2250
|
+
readonly openAttach: (name: string, session: string, options?: AttachOptions) => Promise<ExecHandle>;
|
|
2251
|
+
}
|
|
2252
|
+
export declare function createImpClient(options: Readonly<ImpClientOptions>): ImpClient;
|
|
2253
|
+
//#endregion
|
|
2254
|
+
//#region src/exec/exec-error.d.ts
|
|
2255
|
+
type ExecClientErrorCode = 'UNAUTHORIZED' | 'UNREACHABLE' | 'RESTARTING' | 'CONNECTION_CLOSED' | 'DETACHED' | 'BAD_MESSAGE' | 'CLOSED' | 'OUTPUT_OVERFLOW' | 'LOCAL_ERROR';
|
|
2256
|
+
export declare class ExecError extends Error {
|
|
2257
|
+
readonly code: string;
|
|
2258
|
+
readonly data: unknown;
|
|
2259
|
+
constructor(code: string, message: string, options?: Readonly<{
|
|
2260
|
+
data?: unknown;
|
|
2261
|
+
cause?: unknown;
|
|
2262
|
+
}>);
|
|
2263
|
+
}
|
|
2264
|
+
//#endregion
|
|
2265
|
+
export { type AttachOptions, type Checkpoint, type ConsoleOptions, type DetachReason, type ExecClientErrorCode, type ExecExit, type ExecHandle, type ExecOptions, type ExecOutcome, type ExecSession, type ExecSessionOptions, type ExecStarted, type Image, type Imp, type ImpClient, type ImpClientOptions, type ImpState, ORPCError, type RequireAwakeOptions, type RunOptions, type RunResult, type ServerCheck, type Session, type SystemInfo, isDefinedError, safe };
|