@fungi.computer/computer 0.0.1 → 0.2.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/README.md +38 -10
- package/dist/computer-backends.d.ts +11 -12
- package/dist/computer-backends.js +4 -7
- package/dist/exec-output.d.ts +13 -0
- package/dist/exec-output.js +24 -0
- package/dist/execution-lifecycle.d.ts +35 -0
- package/dist/execution-lifecycle.js +78 -0
- package/dist/files-patch.d.ts +12 -4
- package/dist/files-patch.js +8 -14
- package/dist/files.d.ts +65 -15
- package/dist/files.js +152 -31
- package/dist/fleet/backing.js +2 -2
- package/dist/fleet/index.d.ts +1 -1
- package/dist/fleet/index.js +1 -1
- package/dist/fleet/inventory-wire.d.ts +4 -0
- package/dist/fleet/inventory-wire.js +5 -0
- package/dist/fleet/inventory.js +4 -4
- package/dist/fleet/lifecycle.d.ts +7 -1
- package/dist/fleet/lifecycle.js +23 -6
- package/dist/fleet/wire.d.ts +28 -28
- package/dist/fleet/wire.js +9 -9
- package/dist/index.d.ts +33 -15
- package/dist/index.js +426 -109
- package/dist/internet-access.d.ts +4 -0
- package/dist/internet-access.js +14 -0
- package/dist/local-backend-replay.d.ts +10 -0
- package/dist/local-backend-replay.js +43 -0
- package/dist/local-backend.d.ts +2 -1
- package/dist/local-backend.js +4 -4
- package/dist/on-box-vm.d.ts +15 -4
- package/dist/on-box-vm.js +43 -20
- package/dist/operation-record.d.ts +1 -1
- package/dist/operation-record.js +1 -1
- package/dist/process-inventory.d.ts +3 -1
- package/dist/process-inventory.js +2 -2
- package/dist/team-candidate-builder.mjs +8428 -337
- package/package.json +17 -24
- package/dist/light-shell.d.ts +0 -44
- package/dist/light-shell.js +0 -376
- package/dist/operation-contract.d.ts +0 -456
- package/dist/operation-contract.js +0 -452
|
@@ -1,456 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
export declare const maximumFileBytes: number;
|
|
3
|
-
export declare const maximumListEntries = 256;
|
|
4
|
-
export declare const maximumPatternCharacters = 512;
|
|
5
|
-
export declare const maximumCommandCharacters: number;
|
|
6
|
-
export declare const maximumStreamBytes: number;
|
|
7
|
-
/** The bound for ordinary Computer commands; hosts own any admitted job budget. */
|
|
8
|
-
export declare const maximumExecutionTimeMs = 120000;
|
|
9
|
-
/** Host-owned policy, never supplied in a Computer request body. */
|
|
10
|
-
export type ComputerExecutionBudget = Readonly<{
|
|
11
|
-
maximumTimeMs: number;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const genericComputerExecutionBudget: ComputerExecutionBudget;
|
|
14
|
-
export declare const computerValueSchema: z.ZodJSONSchema;
|
|
15
|
-
export type ComputerValue = z.output<typeof computerValueSchema>;
|
|
16
|
-
export declare const capabilityNameSchema: z.ZodString;
|
|
17
|
-
/** One valid TCP port number, used only with this Computer's container. */
|
|
18
|
-
export declare const computerPortSchema: z.ZodNumber;
|
|
19
|
-
export declare const maximumExposedPorts = 64;
|
|
20
|
-
/** computerd's Workspace RPC port, pinned by the Cloudflare container backend. */
|
|
21
|
-
export declare const computerDaemonPort = 8080;
|
|
22
|
-
/** The Computer-owned terminal server inside the container image. */
|
|
23
|
-
export declare const computerTerminalPort = 7681;
|
|
24
|
-
/**
|
|
25
|
-
* Ports served by the Computer's own in-container daemons. An admitted
|
|
26
|
-
* preview must never reach a control plane.
|
|
27
|
-
*/
|
|
28
|
-
export declare const computerReservedPorts: ReadonlySet<number>;
|
|
29
|
-
export declare function isComputerReservedPort(port: number): boolean;
|
|
30
|
-
export declare const computerPortInputSchema: z.ZodObject<{
|
|
31
|
-
port: z.ZodNumber;
|
|
32
|
-
}, z.core.$strict>;
|
|
33
|
-
export declare const computerPortOutputSchema: z.ZodObject<{
|
|
34
|
-
port: z.ZodNumber;
|
|
35
|
-
exposed: z.ZodBoolean;
|
|
36
|
-
}, z.core.$strict>;
|
|
37
|
-
export declare const computerPortRemovalOutputSchema: z.ZodObject<{
|
|
38
|
-
port: z.ZodNumber;
|
|
39
|
-
removed: z.ZodBoolean;
|
|
40
|
-
}, z.core.$strict>;
|
|
41
|
-
export declare const computerPortsOutputSchema: z.ZodObject<{
|
|
42
|
-
ports: z.ZodArray<z.ZodNumber>;
|
|
43
|
-
}, z.core.$strict>;
|
|
44
|
-
/** The port belongs to a Computer daemon and cannot be admitted for preview. */
|
|
45
|
-
export declare class ComputerPortReservedError extends Error {
|
|
46
|
-
constructor(port: number);
|
|
47
|
-
}
|
|
48
|
-
/** A requested port cannot be reserved; no other process identity is disclosed. */
|
|
49
|
-
export declare class ComputerPortConflictError extends Error {
|
|
50
|
-
constructor();
|
|
51
|
-
}
|
|
52
|
-
/** This Computer already admits the maximum number of preview ports. */
|
|
53
|
-
export declare class ComputerPortLimitError extends Error {
|
|
54
|
-
constructor();
|
|
55
|
-
}
|
|
56
|
-
/** Native operation descriptions shared by discovery and its OpenAPI document. */
|
|
57
|
-
export declare const computerCapabilitiesSchema: z.ZodArray<z.ZodObject<{
|
|
58
|
-
id: z.ZodString;
|
|
59
|
-
name: z.ZodString;
|
|
60
|
-
kind: z.ZodString;
|
|
61
|
-
description: z.ZodString;
|
|
62
|
-
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
63
|
-
output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
64
|
-
}, z.core.$strict>>;
|
|
65
|
-
export declare const pathSchema: z.ZodString;
|
|
66
|
-
export declare const boundedTextSchema: (minimumLength?: number) => z.ZodString;
|
|
67
|
-
/** Complete bounded UTF-8 text reads. Binary reads use the same path input. */
|
|
68
|
-
export declare const readInputSchema: z.ZodObject<{
|
|
69
|
-
path: z.ZodString;
|
|
70
|
-
}, z.core.$strict>;
|
|
71
|
-
export type ComputerFileReadInput = z.output<typeof readInputSchema>;
|
|
72
|
-
export declare const readOutputSchema: z.ZodObject<{
|
|
73
|
-
path: z.ZodString;
|
|
74
|
-
content: z.ZodString;
|
|
75
|
-
}, z.core.$strict>;
|
|
76
|
-
export type ComputerFileReadOutput = z.output<typeof readOutputSchema>;
|
|
77
|
-
/** Optional byte window; text reads remain complete and independently bounded. */
|
|
78
|
-
export declare const readBytesInputSchema: z.ZodObject<{
|
|
79
|
-
path: z.ZodString;
|
|
80
|
-
byteOffset: z.ZodOptional<z.ZodNumber>;
|
|
81
|
-
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
}, z.core.$strict>;
|
|
83
|
-
export type ComputerFileByteReadInput = z.output<typeof readBytesInputSchema>;
|
|
84
|
-
/** Finite byte-read reply used by admitted App frame bindings. */
|
|
85
|
-
export declare const computerByteReadReplySchema: z.ZodObject<{
|
|
86
|
-
path: z.ZodString;
|
|
87
|
-
byteOffset: z.ZodNumber;
|
|
88
|
-
content: z.ZodString;
|
|
89
|
-
encoding: z.ZodLiteral<"base64">;
|
|
90
|
-
truncated: z.ZodBoolean;
|
|
91
|
-
}, z.core.$strict>;
|
|
92
|
-
/** Host-admitted App method preview; parsing does not grant port access. */
|
|
93
|
-
export declare const appMethodPreviewResultSchema: z.ZodObject<{
|
|
94
|
-
previewUrl: z.ZodURL;
|
|
95
|
-
expiresAt: z.ZodNumber;
|
|
96
|
-
}, z.core.$strict>;
|
|
97
|
-
export declare const listLimitSchema: z.ZodDefault<z.ZodNumber>;
|
|
98
|
-
export declare const listOffsetSchema: z.ZodDefault<z.ZodNumber>;
|
|
99
|
-
export declare const listInputSchema: z.ZodObject<{
|
|
100
|
-
path: z.ZodDefault<z.ZodString>;
|
|
101
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
102
|
-
offset: z.ZodDefault<z.ZodNumber>;
|
|
103
|
-
}, z.core.$strict>;
|
|
104
|
-
export declare const listOutputSchema: z.ZodObject<{
|
|
105
|
-
path: z.ZodString;
|
|
106
|
-
entries: z.ZodArray<z.ZodObject<{
|
|
107
|
-
name: z.ZodString;
|
|
108
|
-
size: z.ZodNumber;
|
|
109
|
-
modifiedAt: z.ZodNumber;
|
|
110
|
-
type: z.ZodEnum<{
|
|
111
|
-
file: "file";
|
|
112
|
-
directory: "directory";
|
|
113
|
-
symlink: "symlink";
|
|
114
|
-
}>;
|
|
115
|
-
}, z.core.$strict>>;
|
|
116
|
-
nextOffset: z.ZodNullable<z.ZodNumber>;
|
|
117
|
-
}, z.core.$strict>;
|
|
118
|
-
export type ComputerFileListInput = z.output<typeof listInputSchema>;
|
|
119
|
-
export type ComputerFileListOutput = z.output<typeof listOutputSchema>;
|
|
120
|
-
export declare const fileContentSchema: z.ZodString;
|
|
121
|
-
export declare const writeInputSchema: z.ZodObject<{
|
|
122
|
-
path: z.ZodString;
|
|
123
|
-
content: z.ZodString;
|
|
124
|
-
}, z.core.$strict>;
|
|
125
|
-
export declare const writeOutputSchema: z.ZodObject<{
|
|
126
|
-
path: z.ZodString;
|
|
127
|
-
bytes: z.ZodNumber;
|
|
128
|
-
}, z.core.$strict>;
|
|
129
|
-
export type ComputerFileWriteInput = z.output<typeof writeInputSchema>;
|
|
130
|
-
export type ComputerFileWriteOutput = z.output<typeof writeOutputSchema>;
|
|
131
|
-
export declare const writeBytesInputSchema: z.ZodObject<{
|
|
132
|
-
path: z.ZodString;
|
|
133
|
-
}, z.core.$strict>;
|
|
134
|
-
export declare const replaceInputSchema: z.ZodObject<{
|
|
135
|
-
path: z.ZodString;
|
|
136
|
-
expectedContent: z.ZodString;
|
|
137
|
-
content: z.ZodString;
|
|
138
|
-
}, z.core.$strict>;
|
|
139
|
-
export declare const replaceOutputSchema: z.ZodObject<{
|
|
140
|
-
path: z.ZodString;
|
|
141
|
-
bytes: z.ZodNumber;
|
|
142
|
-
}, z.core.$strict>;
|
|
143
|
-
export declare const globInputSchema: z.ZodObject<{
|
|
144
|
-
path: z.ZodString;
|
|
145
|
-
pattern: z.ZodString;
|
|
146
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
147
|
-
}, z.core.$strict>;
|
|
148
|
-
export declare const globOutputSchema: z.ZodObject<{
|
|
149
|
-
path: z.ZodString;
|
|
150
|
-
matches: z.ZodArray<z.ZodString>;
|
|
151
|
-
truncated: z.ZodBoolean;
|
|
152
|
-
}, z.core.$strict>;
|
|
153
|
-
export declare const grepInputSchema: z.ZodObject<{
|
|
154
|
-
path: z.ZodString;
|
|
155
|
-
pattern: z.ZodString;
|
|
156
|
-
regex: z.ZodDefault<z.ZodBoolean>;
|
|
157
|
-
ignoreCase: z.ZodDefault<z.ZodBoolean>;
|
|
158
|
-
limit: z.ZodDefault<z.ZodNumber>;
|
|
159
|
-
}, z.core.$strict>;
|
|
160
|
-
export declare const grepOutputSchema: z.ZodObject<{
|
|
161
|
-
path: z.ZodString;
|
|
162
|
-
matches: z.ZodArray<z.ZodObject<{
|
|
163
|
-
path: z.ZodString;
|
|
164
|
-
line: z.ZodNumber;
|
|
165
|
-
text: z.ZodString;
|
|
166
|
-
}, z.core.$strict>>;
|
|
167
|
-
truncated: z.ZodBoolean;
|
|
168
|
-
}, z.core.$strict>;
|
|
169
|
-
export declare const editInputSchema: z.ZodObject<{
|
|
170
|
-
path: z.ZodString;
|
|
171
|
-
oldText: z.ZodString;
|
|
172
|
-
newText: z.ZodString;
|
|
173
|
-
}, z.core.$strict>;
|
|
174
|
-
export declare const editOutputSchema: z.ZodObject<{
|
|
175
|
-
path: z.ZodString;
|
|
176
|
-
bytes: z.ZodNumber;
|
|
177
|
-
diff: z.ZodString;
|
|
178
|
-
firstChangedLine: z.ZodNullable<z.ZodNumber>;
|
|
179
|
-
}, z.core.$strict>;
|
|
180
|
-
export { patchInputSchema, patchOutputSchema, } from "@fungi.computer/knapsack/files-patch";
|
|
181
|
-
export declare const mkdirInputSchema: z.ZodObject<{
|
|
182
|
-
path: z.ZodString;
|
|
183
|
-
recursive: z.ZodDefault<z.ZodBoolean>;
|
|
184
|
-
}, z.core.$strict>;
|
|
185
|
-
export declare const mkdirOutputSchema: z.ZodObject<{
|
|
186
|
-
path: z.ZodString;
|
|
187
|
-
}, z.core.$strict>;
|
|
188
|
-
/**
|
|
189
|
-
* Host-owned idempotency key for one `exec` or `bash` tool invocation. The
|
|
190
|
-
* host mints it once per invocation and keeps it across its own retries of that
|
|
191
|
-
* invocation; the model never sees or supplies it.
|
|
192
|
-
*/
|
|
193
|
-
export declare const computerRequestIdSchema: z.ZodUUID;
|
|
194
|
-
export type ComputerRequestId = z.output<typeof computerRequestIdSchema>;
|
|
195
|
-
/** Mint the request ID for one host tool invocation. */
|
|
196
|
-
export declare function mintComputerRequestId(): ComputerRequestId;
|
|
197
|
-
export declare const execInputSchema: z.ZodObject<{
|
|
198
|
-
command: z.ZodString;
|
|
199
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
200
|
-
backend: z.ZodOptional<z.ZodString>;
|
|
201
|
-
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
202
|
-
}, z.core.$strict>;
|
|
203
|
-
/** Resource hosts select a budget only after admitting their job principal. */
|
|
204
|
-
export declare function computerExecutionRequestSchema(budget: ComputerExecutionBudget): z.ZodObject<{
|
|
205
|
-
command: z.ZodString;
|
|
206
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
207
|
-
backend: z.ZodOptional<z.ZodString>;
|
|
208
|
-
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
209
|
-
requestId: z.ZodUUID;
|
|
210
|
-
}, z.core.$strict>;
|
|
211
|
-
/** Host-to-Computer command request: the model input plus the host's ID. */
|
|
212
|
-
export declare const execRequestSchema: z.ZodObject<{
|
|
213
|
-
command: z.ZodString;
|
|
214
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
215
|
-
backend: z.ZodOptional<z.ZodString>;
|
|
216
|
-
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
217
|
-
requestId: z.ZodUUID;
|
|
218
|
-
}, z.core.$strict>;
|
|
219
|
-
export declare const execOutputSchema: z.ZodObject<{
|
|
220
|
-
status: z.ZodEnum<{
|
|
221
|
-
completed: "completed";
|
|
222
|
-
failed: "failed";
|
|
223
|
-
cancelled: "cancelled";
|
|
224
|
-
}>;
|
|
225
|
-
exitCode: z.ZodNumber;
|
|
226
|
-
stdout: z.ZodString;
|
|
227
|
-
stderr: z.ZodString;
|
|
228
|
-
truncated: z.ZodBoolean;
|
|
229
|
-
}, z.core.$strict>;
|
|
230
|
-
export declare const computerProcessIdSchema: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
|
|
231
|
-
export type ComputerProcessId = z.output<typeof computerProcessIdSchema>;
|
|
232
|
-
/** At most this many processes may be running in one host scope at once. */
|
|
233
|
-
export declare const maximumRunningProcesses = 16;
|
|
234
|
-
/** At most this many process records, running or exited, are kept per host scope. */
|
|
235
|
-
export declare const maximumProcessRecords = 64;
|
|
236
|
-
/** Mint the durable identity of one started process. */
|
|
237
|
-
export declare function mintComputerProcessId(): ComputerProcessId;
|
|
238
|
-
export declare const processStartInputSchema: z.ZodObject<{
|
|
239
|
-
requestId: z.ZodString;
|
|
240
|
-
requestScope: z.ZodString;
|
|
241
|
-
port: z.ZodOptional<z.ZodNumber>;
|
|
242
|
-
command: z.ZodString;
|
|
243
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
244
|
-
}, z.core.$strict>;
|
|
245
|
-
/** Model input excludes the host's replay identity and authority scope. */
|
|
246
|
-
export declare const processStartToolInputSchema: z.ZodObject<{
|
|
247
|
-
port: z.ZodOptional<z.ZodNumber>;
|
|
248
|
-
command: z.ZodString;
|
|
249
|
-
cwd: z.ZodOptional<z.ZodString>;
|
|
250
|
-
}, z.core.$strict>;
|
|
251
|
-
/** A trusted App host binds replay identity to its admitted installation and caller. */
|
|
252
|
-
export declare function installationProcessScope(installation: string, method: string, actor: Readonly<{
|
|
253
|
-
kind: "member" | "agent" | "team-key";
|
|
254
|
-
id: string;
|
|
255
|
-
}>): string;
|
|
256
|
-
export declare const processIdInputSchema: z.ZodObject<{
|
|
257
|
-
id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
|
|
258
|
-
}, z.core.$strict>;
|
|
259
|
-
/**
|
|
260
|
-
* `running`: computerd still reports the execution live. `exited`: it ended;
|
|
261
|
-
* `exitCode` is null when the runtime that ran it was replaced or its record
|
|
262
|
-
* expired before the exit code was observed. `uncertain`: the Computer could
|
|
263
|
-
* not reach its container to check, so neither is claimed.
|
|
264
|
-
*/
|
|
265
|
-
export declare const computerProcessStateSchema: z.ZodEnum<{
|
|
266
|
-
running: "running";
|
|
267
|
-
exited: "exited";
|
|
268
|
-
uncertain: "uncertain";
|
|
269
|
-
}>;
|
|
270
|
-
/**
|
|
271
|
-
* `synced`: the drain that recorded this exit read all the way to EOF,
|
|
272
|
-
* which is also the read that runs computerd's post-command pull.
|
|
273
|
-
* `pending`: that drain gave up waiting at its own deadline (a
|
|
274
|
-
* backgrounded child, for example `node server.js &`, can hold the
|
|
275
|
-
* transport open long after its parent exits) -- a background
|
|
276
|
-
* continuation keeps watching and upgrades this row to `synced` once it
|
|
277
|
-
* reaches that real EOF, so `pending` rows stay updatable. `unknown`:
|
|
278
|
-
* this exit was recorded with no pull evidence at all (a replaced
|
|
279
|
-
* runtime, an expired record, or any other exit path that never drained
|
|
280
|
-
* for one). Never claim `synced` without the specific evidence for this
|
|
281
|
-
* exit; default to `unknown`, not `synced`.
|
|
282
|
-
*/
|
|
283
|
-
export declare const computerProcessSyncSchema: z.ZodEnum<{
|
|
284
|
-
unknown: "unknown";
|
|
285
|
-
synced: "synced";
|
|
286
|
-
pending: "pending";
|
|
287
|
-
}>;
|
|
288
|
-
export type ComputerProcessSync = z.output<typeof computerProcessSyncSchema>;
|
|
289
|
-
export declare const computerProcessSchema: z.ZodObject<{
|
|
290
|
-
id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
|
|
291
|
-
port: z.ZodNullable<z.ZodNumber>;
|
|
292
|
-
command: z.ZodString;
|
|
293
|
-
cwd: z.ZodNullable<z.ZodString>;
|
|
294
|
-
state: z.ZodEnum<{
|
|
295
|
-
running: "running";
|
|
296
|
-
exited: "exited";
|
|
297
|
-
uncertain: "uncertain";
|
|
298
|
-
}>;
|
|
299
|
-
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
300
|
-
sync: z.ZodEnum<{
|
|
301
|
-
unknown: "unknown";
|
|
302
|
-
synced: "synced";
|
|
303
|
-
pending: "pending";
|
|
304
|
-
}>;
|
|
305
|
-
startedAt: z.ZodNumber;
|
|
306
|
-
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
307
|
-
}, z.core.$strict>;
|
|
308
|
-
export type ComputerProcess = z.output<typeof computerProcessSchema>;
|
|
309
|
-
export declare const processListOutputSchema: z.ZodObject<{
|
|
310
|
-
processes: z.ZodArray<z.ZodObject<{
|
|
311
|
-
id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
|
|
312
|
-
port: z.ZodNullable<z.ZodNumber>;
|
|
313
|
-
command: z.ZodString;
|
|
314
|
-
cwd: z.ZodNullable<z.ZodString>;
|
|
315
|
-
state: z.ZodEnum<{
|
|
316
|
-
running: "running";
|
|
317
|
-
exited: "exited";
|
|
318
|
-
uncertain: "uncertain";
|
|
319
|
-
}>;
|
|
320
|
-
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
321
|
-
sync: z.ZodEnum<{
|
|
322
|
-
unknown: "unknown";
|
|
323
|
-
synced: "synced";
|
|
324
|
-
pending: "pending";
|
|
325
|
-
}>;
|
|
326
|
-
startedAt: z.ZodNumber;
|
|
327
|
-
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
328
|
-
}, z.core.$strict>>;
|
|
329
|
-
}, z.core.$strict>;
|
|
330
|
-
export declare const processKillOutputSchema: z.ZodObject<{
|
|
331
|
-
process: z.ZodObject<{
|
|
332
|
-
id: z.ZodString & z.ZodType<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string, z.core.$ZodTypeInternals<import("@fungi.computer/cairn").CairnId<"computer-process", "process", 1>, string>>;
|
|
333
|
-
port: z.ZodNullable<z.ZodNumber>;
|
|
334
|
-
command: z.ZodString;
|
|
335
|
-
cwd: z.ZodNullable<z.ZodString>;
|
|
336
|
-
state: z.ZodEnum<{
|
|
337
|
-
running: "running";
|
|
338
|
-
exited: "exited";
|
|
339
|
-
uncertain: "uncertain";
|
|
340
|
-
}>;
|
|
341
|
-
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
342
|
-
sync: z.ZodEnum<{
|
|
343
|
-
unknown: "unknown";
|
|
344
|
-
synced: "synced";
|
|
345
|
-
pending: "pending";
|
|
346
|
-
}>;
|
|
347
|
-
startedAt: z.ZodNumber;
|
|
348
|
-
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
349
|
-
}, z.core.$strict>;
|
|
350
|
-
signalled: z.ZodBoolean;
|
|
351
|
-
}, z.core.$strict>;
|
|
352
|
-
/** No process with this id was started on this Computer. */
|
|
353
|
-
export declare class ComputerProcessNotFoundError extends Error {
|
|
354
|
-
constructor(id: string);
|
|
355
|
-
}
|
|
356
|
-
/** Every process slot is occupied by a running process. */
|
|
357
|
-
export declare class ComputerProcessLimitError extends Error {
|
|
358
|
-
constructor();
|
|
359
|
-
}
|
|
360
|
-
export type ComputerExecInput = z.output<typeof execInputSchema>;
|
|
361
|
-
export type ComputerExecRequest = z.output<typeof execRequestSchema>;
|
|
362
|
-
export type ComputerExecOutput = z.output<typeof execOutputSchema>;
|
|
363
|
-
export declare const computerOperationStatusSchema: z.ZodEnum<{
|
|
364
|
-
unknown: "unknown";
|
|
365
|
-
running: "running";
|
|
366
|
-
failed: "failed";
|
|
367
|
-
accepted: "accepted";
|
|
368
|
-
succeeded: "succeeded";
|
|
369
|
-
expired: "expired";
|
|
370
|
-
}>;
|
|
371
|
-
/** Durable operation status returned to the host that owns the request ID. */
|
|
372
|
-
export declare const computerOperationResultSchema: z.ZodObject<{
|
|
373
|
-
requestId: z.ZodUUID;
|
|
374
|
-
status: z.ZodEnum<{
|
|
375
|
-
unknown: "unknown";
|
|
376
|
-
running: "running";
|
|
377
|
-
failed: "failed";
|
|
378
|
-
accepted: "accepted";
|
|
379
|
-
succeeded: "succeeded";
|
|
380
|
-
expired: "expired";
|
|
381
|
-
}>;
|
|
382
|
-
output: z.ZodNullable<z.ZodObject<{
|
|
383
|
-
status: z.ZodEnum<{
|
|
384
|
-
completed: "completed";
|
|
385
|
-
failed: "failed";
|
|
386
|
-
cancelled: "cancelled";
|
|
387
|
-
}>;
|
|
388
|
-
exitCode: z.ZodNumber;
|
|
389
|
-
stdout: z.ZodString;
|
|
390
|
-
stderr: z.ZodString;
|
|
391
|
-
truncated: z.ZodBoolean;
|
|
392
|
-
}, z.core.$strict>>;
|
|
393
|
-
}, z.core.$strict>;
|
|
394
|
-
export type ComputerOperationResult = z.output<typeof computerOperationResultSchema>;
|
|
395
|
-
/** Model-facing command result: the durable status without the host's ID. */
|
|
396
|
-
export declare const computerToolResultSchema: z.ZodObject<{
|
|
397
|
-
output: z.ZodNullable<z.ZodObject<{
|
|
398
|
-
status: z.ZodEnum<{
|
|
399
|
-
completed: "completed";
|
|
400
|
-
failed: "failed";
|
|
401
|
-
cancelled: "cancelled";
|
|
402
|
-
}>;
|
|
403
|
-
exitCode: z.ZodNumber;
|
|
404
|
-
stdout: z.ZodString;
|
|
405
|
-
stderr: z.ZodString;
|
|
406
|
-
truncated: z.ZodBoolean;
|
|
407
|
-
}, z.core.$strict>>;
|
|
408
|
-
status: z.ZodEnum<{
|
|
409
|
-
unknown: "unknown";
|
|
410
|
-
running: "running";
|
|
411
|
-
failed: "failed";
|
|
412
|
-
accepted: "accepted";
|
|
413
|
-
succeeded: "succeeded";
|
|
414
|
-
expired: "expired";
|
|
415
|
-
}>;
|
|
416
|
-
}, z.core.$strict>;
|
|
417
|
-
export type ComputerToolResult = z.output<typeof computerToolResultSchema>;
|
|
418
|
-
/** Project one host operation result onto the model-facing tool result. */
|
|
419
|
-
export declare function computerToolResult(result: ComputerOperationResult): ComputerToolResult;
|
|
420
|
-
/** Public operation vocabulary; transport adapters map these to routes. */
|
|
421
|
-
export declare const computerOperationSchema: z.ZodEnum<{
|
|
422
|
-
exec: "exec";
|
|
423
|
-
"files.read": "files.read";
|
|
424
|
-
"files.readBytes": "files.readBytes";
|
|
425
|
-
"files.write": "files.write";
|
|
426
|
-
"files.writeBytes": "files.writeBytes";
|
|
427
|
-
"files.list": "files.list";
|
|
428
|
-
"files.glob": "files.glob";
|
|
429
|
-
"files.grep": "files.grep";
|
|
430
|
-
"files.edit": "files.edit";
|
|
431
|
-
"files.patch": "files.patch";
|
|
432
|
-
mkdir: "mkdir";
|
|
433
|
-
bash: "bash";
|
|
434
|
-
}>;
|
|
435
|
-
export type ComputerOperation = z.output<typeof computerOperationSchema>;
|
|
436
|
-
export type ComputerFileReplacement = z.output<typeof replaceInputSchema>;
|
|
437
|
-
export type ComputerFileReplacementResult = z.output<typeof replaceOutputSchema>;
|
|
438
|
-
/** The expected file contents no longer match at atomic replacement. */
|
|
439
|
-
export declare class ComputerFileConflict extends Error {
|
|
440
|
-
constructor();
|
|
441
|
-
}
|
|
442
|
-
/** A byte window starts beyond the current file extent. */
|
|
443
|
-
export declare class ComputerFileRangeError extends Error {
|
|
444
|
-
readonly size: number;
|
|
445
|
-
constructor(size: number);
|
|
446
|
-
}
|
|
447
|
-
/** The requested file bytes exceed the admitted read bound. */
|
|
448
|
-
export declare class ComputerFileTooLargeError extends Error {
|
|
449
|
-
constructor();
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* The operations every Computer advertises; static, so hosts can describe them
|
|
453
|
-
* without a call. Built on first read: deriving JSON Schema for every operation
|
|
454
|
-
* is real work that a Worker should not pay at startup.
|
|
455
|
-
*/
|
|
456
|
-
export declare function computerCapabilities(): z.output<typeof computerCapabilitiesSchema>;
|