@fungi.computer/oyster 0.49.0 → 0.50.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.
@@ -0,0 +1,529 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/oyster**](README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/oyster](modules.md) / computer-api
8
+
9
+ # computer-api
10
+
11
+ ## Type Aliases
12
+
13
+ ### ComputerApiRequest
14
+
15
+ ```ts
16
+ type ComputerApiRequest = typeof computerApiRequestSchema.Type;
17
+ ```
18
+
19
+ A decoded REST operation, with no caller-supplied authority.
20
+
21
+ ## Variables
22
+
23
+ ### computerApiDotSegment
24
+
25
+ ```ts
26
+ const computerApiDotSegment: RegExp;
27
+ ```
28
+
29
+ A `..` segment: paths stay whole-machine for the owner, but never ambiguous.
30
+
31
+ ---
32
+
33
+ ### computerApiBodyBytes
34
+
35
+ ```ts
36
+ const computerApiBodyBytes: number;
37
+ ```
38
+
39
+ HTTP envelopes are bounded before JSON parsing, including escaped file text.
40
+
41
+ ---
42
+
43
+ ### computerApiId
44
+
45
+ ```ts
46
+ const computerApiId: String;
47
+ ```
48
+
49
+ The inventory identity is independent of the currently selected UI Computer.
50
+
51
+ ---
52
+
53
+ ### computerApiInputs
54
+
55
+ ```ts
56
+ const computerApiInputs: object;
57
+ ```
58
+
59
+ These schemas own the public wire grammar; OpenAPI is projected from them.
60
+
61
+ #### Type Declaration
62
+
63
+ | Name | Type |
64
+ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
65
+ | <a id="property-exec"></a> `exec` | `Struct`\<\{ `command`: `String`; `cwd`: `optionalKey`\<`String`\>; `requestId`: `String`; `timeoutMs`: `optionalKey`\<`Int`\>; \}\> |
66
+ | <a id="property-start"></a> `start` | `Struct`\<\{ `command`: `String`; `cwd`: `optionalKey`\<`String`\>; `requestId`: `String`; \}\> |
67
+ | <a id="property-logs"></a> `logs` | `Struct`\<\{ `id`: `String`; `lines`: `optionalKey`\<`Int`\>; \}\> |
68
+ | <a id="property-kill"></a> `kill` | `Struct`\<\{ `id`: `String`; \}\> |
69
+ | <a id="property-read"></a> `read` | `Struct`\<\{ `path`: `String`; \}\> |
70
+ | <a id="property-write"></a> `write` | `Struct`\<\{ `path`: `String`; `content`: `String`; \}\> |
71
+ | <a id="property-list"></a> `list` | `Struct`\<\{ `path`: `optionalKey`\<`String`\>; `limit`: `optionalKey`\<`Int`\>; `offset`: `optionalKey`\<`Int`\>; \}\> |
72
+ | <a id="property-remove"></a> `remove` | `Struct`\<\{ `path`: `String`; \}\> |
73
+ | <a id="property-expose"></a> `expose` | `Struct`\<\{ `port`: `Int`; \}\> |
74
+
75
+ ---
76
+
77
+ ### computerApiRequestSchema
78
+
79
+ ```ts
80
+ const computerApiRequestSchema: Union<
81
+ readonly [
82
+ Struct<{
83
+ operation: Literal<"exec">;
84
+ input: Struct<{
85
+ command: String;
86
+ cwd: optionalKey<String>;
87
+ requestId: String;
88
+ timeoutMs: optionalKey<Int>;
89
+ }>;
90
+ }>,
91
+ Struct<{
92
+ operation: Literal<"start">;
93
+ input: Struct<{
94
+ command: String;
95
+ cwd: optionalKey<String>;
96
+ requestId: String;
97
+ }>;
98
+ }>,
99
+ Struct<{
100
+ operation: Literal<"logs">;
101
+ input: Struct<{
102
+ id: String;
103
+ lines: optionalKey<Int>;
104
+ }>;
105
+ }>,
106
+ Struct<{
107
+ operation: Literal<"kill">;
108
+ input: Struct<{
109
+ id: String;
110
+ }>;
111
+ }>,
112
+ Struct<{
113
+ operation: Literal<"read">;
114
+ input: Struct<{
115
+ path: String;
116
+ }>;
117
+ }>,
118
+ Struct<{
119
+ operation: Literal<"write">;
120
+ input: Struct<{
121
+ path: String;
122
+ content: String;
123
+ }>;
124
+ }>,
125
+ Struct<{
126
+ operation: Literal<"list">;
127
+ input: Struct<{
128
+ path: optionalKey<String>;
129
+ limit: optionalKey<Int>;
130
+ offset: optionalKey<Int>;
131
+ }>;
132
+ }>,
133
+ Struct<{
134
+ operation: Literal<"remove">;
135
+ input: Struct<{
136
+ path: String;
137
+ }>;
138
+ }>,
139
+ Struct<{
140
+ operation: Literal<"expose">;
141
+ input: Struct<{
142
+ port: Int;
143
+ }>;
144
+ }>,
145
+ ]
146
+ >;
147
+ ```
148
+
149
+ The native owner receives a closed, typed operation, never an arbitrary method
150
+ name.
151
+
152
+ ---
153
+
154
+ ### computerApiOperations
155
+
156
+ ```ts
157
+ const computerApiOperations: readonly [{
158
+ operation: "exec";
159
+ method: "post";
160
+ path: "/exec";
161
+ action: "exec";
162
+ output: ZodObject<{
163
+ requestId: ZodUUID;
164
+ status: ZodEnum<{
165
+ accepted: "accepted";
166
+ running: "running";
167
+ succeeded: "succeeded";
168
+ failed: "failed";
169
+ unknown: "unknown";
170
+ expired: "expired";
171
+ }>;
172
+ output: ZodNullable<ZodObject<{
173
+ status: ZodEnum<{
174
+ completed: "completed";
175
+ failed: "failed";
176
+ cancelled: "cancelled";
177
+ }>;
178
+ exitCode: ZodNumber;
179
+ stdout: ZodString;
180
+ stderr: ZodString;
181
+ truncated: ZodUnion<readonly [ZodLiteral<false>, ZodArray<ZodObject<..., ...>>]>;
182
+ }, $strict>>;
183
+ }, $strict>;
184
+ }, {
185
+ operation: "start";
186
+ method: "post";
187
+ path: "/processes/start";
188
+ action: "processStart";
189
+ output: ZodObject<{
190
+ id: ZodLazy<ZodString & ZodType<CairnId<"computer-process", "process", 1>, string, $ZodTypeInternals<CairnId<"computer-process", "process", 1>, string>>>;
191
+ port: ZodNullable<ZodLazy<ZodNumber>>;
192
+ command: ZodString;
193
+ cwd: ZodNullable<ZodString>;
194
+ state: ZodEnum<{
195
+ running: "running";
196
+ exited: "exited";
197
+ uncertain: "uncertain";
198
+ }>;
199
+ exitCode: ZodNullable<ZodNumber>;
200
+ sync: ZodEnum<{
201
+ synced: "synced";
202
+ pending: "pending";
203
+ unknown: "unknown";
204
+ }>;
205
+ startedAt: ZodNumber;
206
+ endedAt: ZodNullable<ZodNumber>;
207
+ endedReason: ZodNullable<ZodLiteral<"idle-sleep">>;
208
+ }, $strict>;
209
+ }, {
210
+ operation: "logs";
211
+ method: "get";
212
+ path: "/processes/logs";
213
+ action: "processLogs";
214
+ output: ZodObject<{
215
+ process: ZodObject<{
216
+ id: ZodLazy<ZodString & ZodType<CairnId<"computer-process", "process", 1>, string, $ZodTypeInternals<CairnId<..., ..., ...>, string>>>;
217
+ port: ZodNullable<ZodLazy<ZodNumber>>;
218
+ command: ZodString;
219
+ cwd: ZodNullable<ZodString>;
220
+ state: ZodEnum<{
221
+ running: "running";
222
+ exited: "exited";
223
+ uncertain: "uncertain";
224
+ }>;
225
+ exitCode: ZodNullable<ZodNumber>;
226
+ sync: ZodEnum<{
227
+ synced: "synced";
228
+ pending: "pending";
229
+ unknown: "unknown";
230
+ }>;
231
+ startedAt: ZodNumber;
232
+ endedAt: ZodNullable<ZodNumber>;
233
+ endedReason: ZodNullable<ZodLiteral<"idle-sleep">>;
234
+ }, $strict>;
235
+ lines: ZodArray<ZodString>;
236
+ truncated: ZodBoolean;
237
+ }, $strict>;
238
+ }, {
239
+ operation: "kill";
240
+ method: "post";
241
+ path: "/processes/kill";
242
+ action: "processKill";
243
+ output: ZodLazy<ZodObject<{
244
+ process: ZodObject<{
245
+ id: ZodLazy<ZodString & ZodType<CairnId<..., ..., ...>, string, $ZodTypeInternals<..., ...>>>;
246
+ port: ZodNullable<ZodLazy<ZodNumber>>;
247
+ command: ZodString;
248
+ cwd: ZodNullable<ZodString>;
249
+ state: ZodEnum<{
250
+ running: "running";
251
+ exited: "exited";
252
+ uncertain: "uncertain";
253
+ }>;
254
+ exitCode: ZodNullable<ZodNumber>;
255
+ sync: ZodEnum<{
256
+ synced: "synced";
257
+ pending: "pending";
258
+ unknown: "unknown";
259
+ }>;
260
+ startedAt: ZodNumber;
261
+ endedAt: ZodNullable<ZodNumber>;
262
+ endedReason: ZodNullable<ZodLiteral<"idle-sleep">>;
263
+ }, $strict>;
264
+ signalled: ZodBoolean;
265
+ }, $strict>>;
266
+ }, {
267
+ operation: "read";
268
+ method: "get";
269
+ path: "/files";
270
+ action: "files.read";
271
+ output: ZodLazy<ZodObject<{
272
+ path: ZodString;
273
+ content: ZodString;
274
+ }, $strict>>;
275
+ }, {
276
+ operation: "write";
277
+ method: "put";
278
+ path: "/files";
279
+ action: "files.write";
280
+ output: ZodLazy<ZodObject<{
281
+ path: ZodString;
282
+ bytes: ZodNumber;
283
+ }, $strict>>;
284
+ }, {
285
+ operation: "list";
286
+ method: "get";
287
+ path: "/files/list";
288
+ action: "files.list";
289
+ output: ZodLazy<ZodObject<{
290
+ path: ZodString;
291
+ entries: ZodArray<ZodLazy<ZodObject<{
292
+ name: ZodString;
293
+ size: ZodNumber;
294
+ modifiedAt: ZodNumber;
295
+ type: ZodEnum<{
296
+ file: ...;
297
+ directory: ...;
298
+ symlink: ...;
299
+ }>;
300
+ }, $strict>>>;
301
+ nextOffset: ZodNullable<ZodNumber>;
302
+ }, $strict>>;
303
+ }, {
304
+ operation: "remove";
305
+ method: "delete";
306
+ path: "/files";
307
+ action: "files.remove";
308
+ output: ZodObject<{
309
+ path: ZodString;
310
+ }, $strict>;
311
+ }, {
312
+ operation: "expose";
313
+ method: "post";
314
+ path: "/ports";
315
+ action: "exposePort";
316
+ output: ZodLazy<ZodObject<{
317
+ port: ZodLazy<ZodNumber>;
318
+ exposed: ZodBoolean;
319
+ }, $strict>>;
320
+ }];
321
+ ```
322
+
323
+ Shared REST operations for Oyster and the Team Computers OpenAPI document.
324
+
325
+ ## Functions
326
+
327
+ ### computerApiInputDocument()
328
+
329
+ ```ts
330
+ function computerApiInputDocument(operation): JsonSchema;
331
+ ```
332
+
333
+ Project the same runtime request schema into the existing OpenAPI registry.
334
+
335
+ #### Parameters
336
+
337
+ | Parameter | Type |
338
+ | ----------- | ----------------------------------------------------------------------------------------------------------------- |
339
+ | `operation` | \| `"exec"` \| `"read"` \| `"write"` \| `"remove"` \| `"list"` \| `"start"` \| `"logs"` \| `"kill"` \| `"expose"` |
340
+
341
+ #### Returns
342
+
343
+ `JsonSchema`
344
+
345
+ ---
346
+
347
+ ### computerApiOutputDocument()
348
+
349
+ ```ts
350
+ function computerApiOutputDocument(operation): ZodStandardJSONSchemaPayload<
351
+ | ZodObject<{
352
+ requestId: ZodUUID;
353
+ status: ZodEnum<{
354
+ accepted: "accepted";
355
+ running: "running";
356
+ succeeded: "succeeded";
357
+ failed: "failed";
358
+ unknown: "unknown";
359
+ expired: "expired";
360
+ }>;
361
+ output: ZodNullable<ZodObject<{
362
+ status: ZodEnum<{
363
+ completed: "completed";
364
+ failed: "failed";
365
+ cancelled: "cancelled";
366
+ }>;
367
+ exitCode: ZodNumber;
368
+ stdout: ZodString;
369
+ stderr: ZodString;
370
+ truncated: ZodUnion<readonly [ZodLiteral<false>, ZodArray<ZodObject<..., ...>>]>;
371
+ }, $strict>>;
372
+ }, $strict>
373
+ | ZodObject<{
374
+ id: ZodLazy<ZodString & ZodType<CairnId<"computer-process", "process", 1>, string, $ZodTypeInternals<CairnId<"computer-process", "process", 1>, string>>>;
375
+ port: ZodNullable<ZodLazy<ZodNumber>>;
376
+ command: ZodString;
377
+ cwd: ZodNullable<ZodString>;
378
+ state: ZodEnum<{
379
+ running: "running";
380
+ exited: "exited";
381
+ uncertain: "uncertain";
382
+ }>;
383
+ exitCode: ZodNullable<ZodNumber>;
384
+ sync: ZodEnum<{
385
+ synced: "synced";
386
+ pending: "pending";
387
+ unknown: "unknown";
388
+ }>;
389
+ startedAt: ZodNumber;
390
+ endedAt: ZodNullable<ZodNumber>;
391
+ endedReason: ZodNullable<ZodLiteral<"idle-sleep">>;
392
+ }, $strict>
393
+ | ZodObject<{
394
+ process: ZodObject<{
395
+ id: ZodLazy<ZodString & ZodType<CairnId<"computer-process", "process", 1>, string, $ZodTypeInternals<CairnId<..., ..., ...>, string>>>;
396
+ port: ZodNullable<ZodLazy<ZodNumber>>;
397
+ command: ZodString;
398
+ cwd: ZodNullable<ZodString>;
399
+ state: ZodEnum<{
400
+ running: "running";
401
+ exited: "exited";
402
+ uncertain: "uncertain";
403
+ }>;
404
+ exitCode: ZodNullable<ZodNumber>;
405
+ sync: ZodEnum<{
406
+ synced: "synced";
407
+ pending: "pending";
408
+ unknown: "unknown";
409
+ }>;
410
+ startedAt: ZodNumber;
411
+ endedAt: ZodNullable<ZodNumber>;
412
+ endedReason: ZodNullable<ZodLiteral<"idle-sleep">>;
413
+ }, $strict>;
414
+ lines: ZodArray<ZodString>;
415
+ truncated: ZodBoolean;
416
+ }, $strict>
417
+ | ZodLazy<ZodObject<{
418
+ process: ZodObject<{
419
+ id: ZodLazy<ZodString & ZodType<CairnId<..., ..., ...>, string, $ZodTypeInternals<..., ...>>>;
420
+ port: ZodNullable<ZodLazy<ZodNumber>>;
421
+ command: ZodString;
422
+ cwd: ZodNullable<ZodString>;
423
+ state: ZodEnum<{
424
+ running: "running";
425
+ exited: "exited";
426
+ uncertain: "uncertain";
427
+ }>;
428
+ exitCode: ZodNullable<ZodNumber>;
429
+ sync: ZodEnum<{
430
+ synced: "synced";
431
+ pending: "pending";
432
+ unknown: "unknown";
433
+ }>;
434
+ startedAt: ZodNumber;
435
+ endedAt: ZodNullable<ZodNumber>;
436
+ endedReason: ZodNullable<ZodLiteral<"idle-sleep">>;
437
+ }, $strict>;
438
+ signalled: ZodBoolean;
439
+ }, $strict>>
440
+ | ZodLazy<ZodObject<{
441
+ path: ZodString;
442
+ content: ZodString;
443
+ }, $strict>>
444
+ | ZodLazy<ZodObject<{
445
+ path: ZodString;
446
+ bytes: ZodNumber;
447
+ }, $strict>>
448
+ | ZodLazy<ZodObject<{
449
+ path: ZodString;
450
+ entries: ZodArray<ZodLazy<ZodObject<{
451
+ name: ZodString;
452
+ size: ZodNumber;
453
+ modifiedAt: ZodNumber;
454
+ type: ZodEnum<{
455
+ file: ...;
456
+ directory: ...;
457
+ symlink: ...;
458
+ }>;
459
+ }, $strict>>>;
460
+ nextOffset: ZodNullable<ZodNumber>;
461
+ }, $strict>>
462
+ | ZodObject<{
463
+ path: ZodString;
464
+ }, $strict>
465
+ | ZodLazy<ZodObject<{
466
+ port: ZodLazy<ZodNumber>;
467
+ exposed: ZodBoolean;
468
+ }, $strict>>>;
469
+ ```
470
+
471
+ Native Computer contracts continue to own their bounded response shapes.
472
+
473
+ #### Parameters
474
+
475
+ | Parameter | Type |
476
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
477
+ | `operation` | \| \{ `operation`: `"exec"`; `method`: `"post"`; `path`: `"/exec"`; `action`: `"exec"`; `output`: `ZodObject`\<\{ `requestId`: `ZodUUID`; `status`: `ZodEnum`\<\{ `accepted`: `"accepted"`; `running`: `"running"`; `succeeded`: `"succeeded"`; `failed`: `"failed"`; `unknown`: `"unknown"`; `expired`: `"expired"`; \}\>; `output`: `ZodNullable`\<`ZodObject`\<\{ `status`: `ZodEnum`\<\{ `completed`: `"completed"`; `failed`: `"failed"`; `cancelled`: `"cancelled"`; \}\>; `exitCode`: `ZodNumber`; `stdout`: `ZodString`; `stderr`: `ZodString`; `truncated`: `ZodUnion`\<readonly \[`ZodLiteral`\<`false`\>, `ZodArray`\<`ZodObject`\<..., ...\>\>\]\>; \}, `$strict`\>\>; \}, `$strict`\>; \} \| \{ `operation`: `"start"`; `method`: `"post"`; `path`: `"/processes/start"`; `action`: `"processStart"`; `output`: `ZodObject`\<\{ `id`: `ZodLazy`\<`ZodString` & `ZodType`\<`CairnId`\<`"computer-process"`, `"process"`, `1`\>, `string`, `$ZodTypeInternals`\<`CairnId`\<`"computer-process"`, `"process"`, `1`\>, `string`\>\>\>; `port`: `ZodNullable`\<`ZodLazy`\<`ZodNumber`\>\>; `command`: `ZodString`; `cwd`: `ZodNullable`\<`ZodString`\>; `state`: `ZodEnum`\<\{ `running`: `"running"`; `exited`: `"exited"`; `uncertain`: `"uncertain"`; \}\>; `exitCode`: `ZodNullable`\<`ZodNumber`\>; `sync`: `ZodEnum`\<\{ `synced`: `"synced"`; `pending`: `"pending"`; `unknown`: `"unknown"`; \}\>; `startedAt`: `ZodNumber`; `endedAt`: `ZodNullable`\<`ZodNumber`\>; `endedReason`: `ZodNullable`\<`ZodLiteral`\<`"idle-sleep"`\>\>; \}, `$strict`\>; \} \| \{ `operation`: `"logs"`; `method`: `"get"`; `path`: `"/processes/logs"`; `action`: `"processLogs"`; `output`: `ZodObject`\<\{ `process`: `ZodObject`\<\{ `id`: `ZodLazy`\<`ZodString` & `ZodType`\<`CairnId`\<`"computer-process"`, `"process"`, `1`\>, `string`, `$ZodTypeInternals`\<`CairnId`\<..., ..., ...\>, `string`\>\>\>; `port`: `ZodNullable`\<`ZodLazy`\<`ZodNumber`\>\>; `command`: `ZodString`; `cwd`: `ZodNullable`\<`ZodString`\>; `state`: `ZodEnum`\<\{ `running`: `"running"`; `exited`: `"exited"`; `uncertain`: `"uncertain"`; \}\>; `exitCode`: `ZodNullable`\<`ZodNumber`\>; `sync`: `ZodEnum`\<\{ `synced`: `"synced"`; `pending`: `"pending"`; `unknown`: `"unknown"`; \}\>; `startedAt`: `ZodNumber`; `endedAt`: `ZodNullable`\<`ZodNumber`\>; `endedReason`: `ZodNullable`\<`ZodLiteral`\<`"idle-sleep"`\>\>; \}, `$strict`\>; `lines`: `ZodArray`\<`ZodString`\>; `truncated`: `ZodBoolean`; \}, `$strict`\>; \} \| \{ `operation`: `"kill"`; `method`: `"post"`; `path`: `"/processes/kill"`; `action`: `"processKill"`; `output`: `ZodLazy`\<`ZodObject`\<\{ `process`: `ZodObject`\<\{ `id`: `ZodLazy`\<`ZodString` & `ZodType`\<`CairnId`\<..., ..., ...\>, `string`, `$ZodTypeInternals`\<..., ...\>\>\>; `port`: `ZodNullable`\<`ZodLazy`\<`ZodNumber`\>\>; `command`: `ZodString`; `cwd`: `ZodNullable`\<`ZodString`\>; `state`: `ZodEnum`\<\{ `running`: `"running"`; `exited`: `"exited"`; `uncertain`: `"uncertain"`; \}\>; `exitCode`: `ZodNullable`\<`ZodNumber`\>; `sync`: `ZodEnum`\<\{ `synced`: `"synced"`; `pending`: `"pending"`; `unknown`: `"unknown"`; \}\>; `startedAt`: `ZodNumber`; `endedAt`: `ZodNullable`\<`ZodNumber`\>; `endedReason`: `ZodNullable`\<`ZodLiteral`\<`"idle-sleep"`\>\>; \}, `$strict`\>; `signalled`: `ZodBoolean`; \}, `$strict`\>\>; \} \| \{ `operation`: `"read"`; `method`: `"get"`; `path`: `"/files"`; `action`: `"files.read"`; `output`: `ZodLazy`\<`ZodObject`\<\{ `path`: `ZodString`; `content`: `ZodString`; \}, `$strict`\>\>; \} \| \{ `operation`: `"write"`; `method`: `"put"`; `path`: `"/files"`; `action`: `"files.write"`; `output`: `ZodLazy`\<`ZodObject`\<\{ `path`: `ZodString`; `bytes`: `ZodNumber`; \}, `$strict`\>\>; \} \| \{ `operation`: `"list"`; `method`: `"get"`; `path`: `"/files/list"`; `action`: `"files.list"`; `output`: `ZodLazy`\<`ZodObject`\<\{ `path`: `ZodString`; `entries`: `ZodArray`\<`ZodLazy`\<`ZodObject`\<\{ `name`: `ZodString`; `size`: `ZodNumber`; `modifiedAt`: `ZodNumber`; `type`: `ZodEnum`\<\{ `file`: ...; `directory`: ...; `symlink`: ...; \}\>; \}, `$strict`\>\>\>; `nextOffset`: `ZodNullable`\<`ZodNumber`\>; \}, `$strict`\>\>; \} \| \{ `operation`: `"remove"`; `method`: `"delete"`; `path`: `"/files"`; `action`: `"files.remove"`; `output`: `ZodObject`\<\{ `path`: `ZodString`; \}, `$strict`\>; \} \| \{ `operation`: `"expose"`; `method`: `"post"`; `path`: `"/ports"`; `action`: `"exposePort"`; `output`: `ZodLazy`\<`ZodObject`\<\{ `port`: `ZodLazy`\<`ZodNumber`\>; `exposed`: `ZodBoolean`; \}, `$strict`\>\>; \} |
478
+
479
+ #### Returns
480
+
481
+ `ZodStandardJSONSchemaPayload`\< \| `ZodObject`\<\{ `requestId`: `ZodUUID`;
482
+ `status`: `ZodEnum`\<\{ `accepted`: `"accepted"`; `running`: `"running"`;
483
+ `succeeded`: `"succeeded"`; `failed`: `"failed"`; `unknown`: `"unknown"`;
484
+ `expired`: `"expired"`; \}\>; `output`: `ZodNullable`\<`ZodObject`\<\{ `status`:
485
+ `ZodEnum`\<\{ `completed`: `"completed"`; `failed`: `"failed"`; `cancelled`:
486
+ `"cancelled"`; \}\>; `exitCode`: `ZodNumber`; `stdout`: `ZodString`; `stderr`:
487
+ `ZodString`; `truncated`: `ZodUnion`\<readonly \[`ZodLiteral`\<`false`\>,
488
+ `ZodArray`\<`ZodObject`\<..., ...\>\>\]\>; \}, `$strict`\>\>; \}, `$strict`\> \|
489
+ `ZodObject`\<\{ `id`: `ZodLazy`\<`ZodString` &
490
+ `ZodType`\<`CairnId`\<`"computer-process"`, `"process"`, `1`\>, `string`,
491
+ `$ZodTypeInternals`\<`CairnId`\<`"computer-process"`, `"process"`, `1`\>,
492
+ `string`\>\>\>; `port`: `ZodNullable`\<`ZodLazy`\<`ZodNumber`\>\>; `command`:
493
+ `ZodString`; `cwd`: `ZodNullable`\<`ZodString`\>; `state`: `ZodEnum`\<\{
494
+ `running`: `"running"`; `exited`: `"exited"`; `uncertain`: `"uncertain"`; \}\>;
495
+ `exitCode`: `ZodNullable`\<`ZodNumber`\>; `sync`: `ZodEnum`\<\{ `synced`:
496
+ `"synced"`; `pending`: `"pending"`; `unknown`: `"unknown"`; \}\>; `startedAt`:
497
+ `ZodNumber`; `endedAt`: `ZodNullable`\<`ZodNumber`\>; `endedReason`:
498
+ `ZodNullable`\<`ZodLiteral`\<`"idle-sleep"`\>\>; \}, `$strict`\> \|
499
+ `ZodObject`\<\{ `process`: `ZodObject`\<\{ `id`: `ZodLazy`\<`ZodString` &
500
+ `ZodType`\<`CairnId`\<`"computer-process"`, `"process"`, `1`\>, `string`,
501
+ `$ZodTypeInternals`\<`CairnId`\<..., ..., ...\>, `string`\>\>\>; `port`:
502
+ `ZodNullable`\<`ZodLazy`\<`ZodNumber`\>\>; `command`: `ZodString`; `cwd`:
503
+ `ZodNullable`\<`ZodString`\>; `state`: `ZodEnum`\<\{ `running`: `"running"`;
504
+ `exited`: `"exited"`; `uncertain`: `"uncertain"`; \}\>; `exitCode`:
505
+ `ZodNullable`\<`ZodNumber`\>; `sync`: `ZodEnum`\<\{ `synced`: `"synced"`;
506
+ `pending`: `"pending"`; `unknown`: `"unknown"`; \}\>; `startedAt`: `ZodNumber`;
507
+ `endedAt`: `ZodNullable`\<`ZodNumber`\>; `endedReason`:
508
+ `ZodNullable`\<`ZodLiteral`\<`"idle-sleep"`\>\>; \}, `$strict`\>; `lines`:
509
+ `ZodArray`\<`ZodString`\>; `truncated`: `ZodBoolean`; \}, `$strict`\> \|
510
+ `ZodLazy`\<`ZodObject`\<\{ `process`: `ZodObject`\<\{ `id`:
511
+ `ZodLazy`\<`ZodString` & `ZodType`\<`CairnId`\<..., ..., ...\>, `string`,
512
+ `$ZodTypeInternals`\<..., ...\>\>\>; `port`:
513
+ `ZodNullable`\<`ZodLazy`\<`ZodNumber`\>\>; `command`: `ZodString`; `cwd`:
514
+ `ZodNullable`\<`ZodString`\>; `state`: `ZodEnum`\<\{ `running`: `"running"`;
515
+ `exited`: `"exited"`; `uncertain`: `"uncertain"`; \}\>; `exitCode`:
516
+ `ZodNullable`\<`ZodNumber`\>; `sync`: `ZodEnum`\<\{ `synced`: `"synced"`;
517
+ `pending`: `"pending"`; `unknown`: `"unknown"`; \}\>; `startedAt`: `ZodNumber`;
518
+ `endedAt`: `ZodNullable`\<`ZodNumber`\>; `endedReason`:
519
+ `ZodNullable`\<`ZodLiteral`\<`"idle-sleep"`\>\>; \}, `$strict`\>; `signalled`:
520
+ `ZodBoolean`; \}, `$strict`\>\> \| `ZodLazy`\<`ZodObject`\<\{ `path`:
521
+ `ZodString`; `content`: `ZodString`; \}, `$strict`\>\> \|
522
+ `ZodLazy`\<`ZodObject`\<\{ `path`: `ZodString`; `bytes`: `ZodNumber`; \},
523
+ `$strict`\>\> \| `ZodLazy`\<`ZodObject`\<\{ `path`: `ZodString`; `entries`:
524
+ `ZodArray`\<`ZodLazy`\<`ZodObject`\<\{ `name`: `ZodString`; `size`: `ZodNumber`;
525
+ `modifiedAt`: `ZodNumber`; `type`: `ZodEnum`\<\{ `file`: ...; `directory`: ...;
526
+ `symlink`: ...; \}\>; \}, `$strict`\>\>\>; `nextOffset`:
527
+ `ZodNullable`\<`ZodNumber`\>; \}, `$strict`\>\> \| `ZodObject`\<\{ `path`:
528
+ `ZodString`; \}, `$strict`\> \| `ZodLazy`\<`ZodObject`\<\{ `port`:
529
+ `ZodLazy`\<`ZodNumber`\>; `exposed`: `ZodBoolean`; \}, `$strict`\>\>\>