@fungi.computer/oyster 0.49.0 → 0.49.1

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/dist/mcp.d.ts CHANGED
@@ -91,6 +91,29 @@ declare const fleetDetachment: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
91
  uncertain: "uncertain";
92
92
  }>;
93
93
  }, z.core.$strict>], "kind">;
94
+ declare const fleetStop: z.ZodDiscriminatedUnion<[z.ZodObject<{
95
+ kind: z.ZodLiteral<"stopped">;
96
+ }, z.core.$strict>, z.ZodObject<{
97
+ kind: z.ZodEnum<{
98
+ denied: "denied";
99
+ busy: "busy";
100
+ uncertain: "uncertain";
101
+ }>;
102
+ }, z.core.$strict>], "kind">;
103
+ declare const fleetDelete: z.ZodObject<{
104
+ computerId: z.ZodString;
105
+ confirmHandle: z.ZodString;
106
+ }, z.core.$strict>;
107
+ declare const fleetDeletion: z.ZodDiscriminatedUnion<[z.ZodObject<{
108
+ kind: z.ZodLiteral<"deleted">;
109
+ }, z.core.$strict>, z.ZodObject<{
110
+ kind: z.ZodEnum<{
111
+ denied: "denied";
112
+ uncertain: "uncertain";
113
+ unsupported: "unsupported";
114
+ mismatch: "mismatch";
115
+ }>;
116
+ }, z.core.$strict>], "kind">;
94
117
  declare const fleetCreation: z.ZodDiscriminatedUnion<[z.ZodObject<{
95
118
  kind: z.ZodLiteral<"created">;
96
119
  requestId: z.ZodString;
@@ -244,6 +267,44 @@ export declare function computerControlSpecs(port: ComputerControlPort): {
244
267
  /** Mint one identity or preserve the requestId for an uncertain retry. */
245
268
  execute: (input: z.output<typeof fleetCreate>, context: InvocationContext) => Promise<z.output<typeof fleetCreation>>;
246
269
  };
270
+ stop: {
271
+ replay: "unsafe";
272
+ description: string;
273
+ input: z.ZodObject<{
274
+ computerId: z.ZodString;
275
+ }, z.core.$strict>;
276
+ output: z.ZodDiscriminatedUnion<[z.ZodObject<{
277
+ kind: z.ZodLiteral<"stopped">;
278
+ }, z.core.$strict>, z.ZodObject<{
279
+ kind: z.ZodEnum<{
280
+ denied: "denied";
281
+ busy: "busy";
282
+ uncertain: "uncertain";
283
+ }>;
284
+ }, z.core.$strict>], "kind">;
285
+ /** End the runtime; the Computer and its Workspace stay. */
286
+ execute: (input: z.output<typeof fleetComputerId>, context: InvocationContext) => Promise<z.output<typeof fleetStop>>;
287
+ };
288
+ delete: {
289
+ replay: "unsafe";
290
+ description: string;
291
+ input: z.ZodObject<{
292
+ computerId: z.ZodString;
293
+ confirmHandle: z.ZodString;
294
+ }, z.core.$strict>;
295
+ output: z.ZodDiscriminatedUnion<[z.ZodObject<{
296
+ kind: z.ZodLiteral<"deleted">;
297
+ }, z.core.$strict>, z.ZodObject<{
298
+ kind: z.ZodEnum<{
299
+ denied: "denied";
300
+ uncertain: "uncertain";
301
+ unsupported: "unsupported";
302
+ mismatch: "mismatch";
303
+ }>;
304
+ }, z.core.$strict>], "kind">;
305
+ /** Match the handle to the Computer's own name before anything is erased. */
306
+ execute: (input: z.output<typeof fleetDelete>, context: InvocationContext) => Promise<z.output<typeof fleetDeletion>>;
307
+ };
247
308
  backends: {
248
309
  replay: "safe";
249
310
  description: string;
package/dist/mcp.js CHANGED
@@ -89,6 +89,22 @@ const fleetDetachment = z.discriminatedUnion("kind", [
89
89
  z.strictObject({ kind: z.literal("detached"), detached: z.boolean() }),
90
90
  z.strictObject({ kind: z.enum(["denied", "uncertain", "invalid"]) }),
91
91
  ]);
92
+ const fleetStop = z.discriminatedUnion("kind", [
93
+ z.strictObject({ kind: z.literal("stopped") }),
94
+ z.strictObject({ kind: z.enum(["denied", "busy", "uncertain"]) }),
95
+ ]);
96
+ const fleetDelete = z.strictObject({
97
+ computerId: fleetComputerId.shape.computerId,
98
+ confirmHandle: z.string().min(1).max(256),
99
+ });
100
+ const fleetDeletion = z.discriminatedUnion("kind", [
101
+ z.strictObject({ kind: z.literal("deleted") }),
102
+ z.strictObject({
103
+ kind: z.enum(["denied", "mismatch", "unsupported", "uncertain"]),
104
+ }),
105
+ ]);
106
+ /** Directory pages read to find one Computer's name; a Team never has more. */
107
+ const maximumDirectoryPages = 20;
92
108
  const fleetCreation = z.discriminatedUnion("kind", [
93
109
  z.strictObject({
94
110
  kind: z.literal("created"),
@@ -150,6 +166,36 @@ export function computerControlSpecs(port) {
150
166
  return { ...result, requestId };
151
167
  },
152
168
  },
169
+ stop: {
170
+ replay: "unsafe",
171
+ description: 'Stop a Computer now and free its running slot. Running commands end; files are kept and the next start brings it back. Only the signed-in owner may; "busy" means it is starting or finishing an operation, so try again.',
172
+ input: fleetComputerId,
173
+ output: fleetStop,
174
+ /** End the runtime; the Computer and its Workspace stay. */
175
+ execute: (input, context) => port.stop(input.computerId, context),
176
+ },
177
+ delete: {
178
+ replay: "unsafe",
179
+ description: 'Delete a Computer and erase its Workspace, permanently. Pass its exact name as confirmHandle; a different handle deletes nothing. Only the signed-in owner may, never a Team key or an Agent. "uncertain" means retry: a delete cut short finishes on the next attempt.',
180
+ input: fleetDelete,
181
+ output: fleetDeletion,
182
+ /** Match the handle to the Computer's own name before anything is erased. */
183
+ execute: async (input, context) => {
184
+ let name;
185
+ for (let page = 0, offset = 0; page < maximumDirectoryPages && name === undefined; page += 1) {
186
+ const listed = await port.list({ limit: 100, offset }, context);
187
+ name = listed.computers.find((computer) => computer.computerId === input.computerId)?.name;
188
+ if (listed.nextOffset === null)
189
+ break;
190
+ offset = listed.nextOffset;
191
+ }
192
+ if (name === undefined)
193
+ return { kind: "denied" };
194
+ if (name !== input.confirmHandle)
195
+ return { kind: "mismatch" };
196
+ return port.delete(input.computerId, context);
197
+ },
198
+ },
153
199
  backends: {
154
200
  replay: "safe",
155
201
  description: "List one Computer's attached execution backends (platform container, on-box VM, members' machines) with live status.",
@@ -652,6 +698,14 @@ export function oysterMcpCatalogLoad(host) {
652
698
  ...fleetSpecs.create,
653
699
  confirm: true,
654
700
  }),
701
+ stop: Mycelium.operation({
702
+ ...fleetSpecs.stop,
703
+ confirm: true,
704
+ }),
705
+ delete: Mycelium.operation({
706
+ ...fleetSpecs.delete,
707
+ confirm: true,
708
+ }),
655
709
  backends: Mycelium.operation(fleetSpecs.backends),
656
710
  attachLocal: Mycelium.operation(fleetSpecs.attachLocal),
657
711
  detachLocal: Mycelium.operation(fleetSpecs.detachLocal),
@@ -19,6 +19,7 @@ const inventoryError = z.strictObject({
19
19
  const backendList = z.strictObject({
20
20
  backends: z.array(computerBackendViewSchema),
21
21
  });
22
+ const stopped = z.strictObject({ state: z.literal("sleeping") });
22
23
  const attachedBackend = z.strictObject({ backendId: z.string() });
23
24
  const detachedBackend = z.strictObject({ detached: z.boolean() });
24
25
  /** A typed refusal from the owner-admitted fleet, as the MCP result kinds. */
@@ -48,6 +49,36 @@ export function standaloneComputerControl(registry, memberId) {
48
49
  list: async (page) => teamComputerDirectorySchema.parse(inventoryPage.parse(available(await fleet({ operation: "list", page })))),
49
50
  state: async (computerId) => computerStateSchema.parse(available(await fleet({ operation: "state", computerId }))),
50
51
  start: async (computerId) => computerStateSchema.parse(available(await fleet({ operation: "start", computerId }))),
52
+ stop: async (computerId) => {
53
+ let result;
54
+ try {
55
+ result = await fleet({ operation: "stop", computerId });
56
+ }
57
+ catch {
58
+ // The runtime may have stopped before the RPC failed; the caller retries.
59
+ return { kind: "uncertain" };
60
+ }
61
+ if (result === null)
62
+ return { kind: "denied" };
63
+ const error = inventoryError.safeParse(result);
64
+ if (error.success) {
65
+ switch (error.data.error) {
66
+ case "busy":
67
+ return { kind: "busy" };
68
+ case "owner_required":
69
+ case "not_owner":
70
+ case "unknown_computer":
71
+ return { kind: "denied" };
72
+ default:
73
+ return { kind: "uncertain" };
74
+ }
75
+ }
76
+ stopped.parse(result);
77
+ return { kind: "stopped" };
78
+ },
79
+ // Oyster has no delete path: inventory retirement here would leave the
80
+ // Computer's Workspace and runtime behind, so it refuses plainly.
81
+ delete: () => Promise.resolve({ kind: "unsupported" }),
51
82
  create: async (input) => {
52
83
  let result;
53
84
  try {
@@ -57,7 +57,7 @@ export declare abstract class StandaloneRegistry extends OysterRegistry implemen
57
57
  state: "failed" | "installing" | "needs-runtime";
58
58
  appId?: string | undefined;
59
59
  reason?: {
60
- code: "unknown" | "build_failed" | "network" | "unsupported";
60
+ code: "unknown" | "unsupported" | "build_failed" | "network";
61
61
  message: string;
62
62
  } | undefined;
63
63
  }[]>;
package/docs/api/mcp.md CHANGED
@@ -130,6 +130,22 @@ type ComputerControlPort = Readonly<{
130
130
  position: z.ZodNumber;
131
131
  }
132
132
  >;
133
+ stop: Promise<
134
+ | {
135
+ kind: "stopped";
136
+ }
137
+ | {
138
+ kind: "denied" | "busy" | "uncertain";
139
+ }
140
+ >;
141
+ delete: Promise<
142
+ | {
143
+ kind: "deleted";
144
+ }
145
+ | {
146
+ kind: "denied" | "unsupported" | "uncertain";
147
+ }
148
+ >;
133
149
  create: Promise<
134
150
  | {
135
151
  kind: "created";
@@ -274,52 +290,64 @@ One set of schemas and operations for MCP and direct broker invocation.
274
290
 
275
291
  `object`
276
292
 
277
- | Name | Type | Default value | Description |
278
- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
279
- | `list` | `object` | - | - |
280
- | `list.replay` | `"safe"` | - | - |
281
- | `list.access` | `"read"` | - | - |
282
- | `list.description` | `string` | `"List a page of permitted Computers. Follow nextOffset for another page."` | - |
283
- | `list.input` | `ZodObject`\<\{ `limit`: `ZodDefault`\<`ZodNumber`\>; `offset`: `ZodDefault`\<`ZodNumber`\>; \}, `$strict`\> | `computerPageSchema` | - |
284
- | `list.output` | `ZodObject`\<\{ `computers`: `ZodArray`\<`ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; `size`: `ZodEnum`\<\{ `small`: `"small"`; `default`: `"default"`; `large`: `"large"`; \}\>; `createdAt`: `ZodNumber`; `updatedAt`: `ZodNumber`; \}, `$strict`\>\>; `nextOffset`: `ZodNullable`\<`ZodNumber`\>; \}, `$strict`\> | `teamComputerDirectorySchema` | - |
285
- | `list.execute()` | (`input`, `context`) => `Promise`\<\{ `computers`: `object`[]; `nextOffset`: `number` \| `null`; \}\> | - | Return an admitted inventory page to MCP or the retained broker. |
286
- | `state` | `object` | - | - |
287
- | `state.replay` | `"safe"` | - | - |
288
- | `state.access` | `"read"` | - | - |
289
- | `state.description` | `string` | `"Read runtime state without waking a Computer, including its live admission queue position. Pass reason: true to get why a failed start failed."` | - |
290
- | `state.input` | `ZodObject`\<\{ `computerId`: `ZodString`; `reason`: `ZodExactOptional`\<`ZodLiteral`\<`true`\>\>; \}, `$strict`\> | `fleetStateRead` | - |
291
- | `state.output` | `ZodUnion`\<readonly \[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; `reason`: `ZodString`; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\]\> | `computerStateSchema` | - |
292
- | `state.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"`; \} \| \{ `state`: `"start_failed"`; \} \| \{ `state`: `"start_failed"`; `reason`: `string`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Return liveness without waking the runtime. |
293
- | `start` | `object` | - | - |
294
- | `start.replay` | `"unsafe"` | - | - |
295
- | `start.description` | `string` | `"Start a hosted Computer through ordinary admission. Waits until connected; poll computers.state while queued. Safe to retry."` | - |
296
- | `start.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
297
- | `start.output` | `ZodUnion`\<readonly \[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; `reason`: `ZodString`; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\]\> | `computerStateSchema` | - |
298
- | `start.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"`; \} \| \{ `state`: `"start_failed"`; \} \| \{ `state`: `"start_failed"`; `reason`: `string`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Admit and start this Computer. |
299
- | `create` | `object` | - | - |
300
- | `create.replay` | `"unsafe"` | - | - |
301
- | `create.description` | `string` | `"Create a Computer with an optional friendly name and size (small, default or large; default when omitted). Request identity is generated automatically. If the outcome is uncertain, retry with its returned requestId and the original name and size input; do not start a second creation."` | - |
302
- | `create.input` | `ZodObject`\<\{ `name`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; `size`: `ZodDefault`\<`ZodNullable`\<`ZodEnum`\<\{ `default`: `"default"`; `small`: `"small"`; `large`: `"large"`; \}\>\>\>; `requestId`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; \}, `$strict`\> | `fleetCreate` | - |
303
- | `create.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"created"`\>; `requestId`: `ZodString`; `computer`: `ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; `size`: `ZodEnum`\<\{ `default`: `"default"`; `small`: `"small"`; `large`: `"large"`; \}\>; \}, `$strict`\>; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `conflict`: `"conflict"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; `requestId`: `ZodString`; \}, `$strict`\>\], `"kind"`\> | `fleetCreation` | - |
304
- | `create.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"created"`; `requestId`: `string`; `computer`: \{ `computerId`: `string`; `name`: `string`; `size`: `"default"` \| `"small"` \| `"large"`; \}; \} \| \{ `kind`: `"invalid"` \| `"conflict"` \| `"denied"` \| `"uncertain"`; `requestId`: `string`; \}\> | - | Mint one identity or preserve the requestId for an uncertain retry. |
305
- | `backends` | `object` | - | - |
306
- | `backends.replay` | `"safe"` | - | - |
307
- | `backends.description` | `string` | `"List one Computer's attached execution backends (platform container, on-box VM, members' machines) with live status."` | - |
308
- | `backends.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
309
- | `backends.output` | `ZodObject`\<\{ `backends`: `ZodArray`\<`ZodObject`\<\{ `id`: `ZodString`; `kind`: `ZodEnum`\<\{ `platform-container`: `"platform-container"`; `on-box-vm`: `"on-box-vm"`; `local`: `"local"`; \}\>; `status`: `ZodEnum`\<\{ `ready`: `"ready"`; `online`: `"online"`; `offline`: `"offline"`; `queued`: `"queued"`; \}\>; `queuePosition`: `ZodNullable`\<`ZodNumber`\>; `hostId`: `ZodNullable`\<`ZodString`\>; `hostLabel`: `ZodNullable`\<`ZodString`\>; `folderLabel`: `ZodNullable`\<`ZodString`\>; `detachable`: `ZodBoolean`; \}, `$strict`\>\>; \}, `$strict`\> | `fleetBackends` | - |
310
- | `backends.execute()` | (`input`, `context`) => `Promise`\<\{ `backends`: `object`[]; \}\> | - | Return the attached list without waking any backend. |
311
- | `attachLocal` | `object` | - | - |
312
- | `attachLocal.replay` | `"unsafe"` | - | - |
313
- | `attachLocal.description` | `string` | `"Attach this authenticated member's machine to a Computer as an execution backend. Send only the device public key and labels; the folder path and private key stay on the machine. Retry an uncertain outcome with its returned requestId."` | - |
314
- | `attachLocal.input` | `ZodObject`\<\{ `computerId`: `ZodString`; `publicKey`: `ZodBase64`; `hostLabel`: `ZodLazy`\<`ZodString`\>; `folderLabel`: `ZodLazy`\<`ZodString`\>; `requestId`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; \}, `$strict`\> | `fleetAttachInput` | - |
315
- | `attachLocal.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"attached"`\>; `requestId`: `ZodString`; `backendId`: `ZodString`; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `conflict`: `"conflict"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; `requestId`: `ZodString`; \}, `$strict`\>\], `"kind"`\> | `fleetAttachment` | - |
316
- | `attachLocal.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"attached"`; `requestId`: `string`; `backendId`: `string`; \} \| \{ `kind`: `"invalid"` \| `"conflict"` \| `"denied"` \| `"uncertain"`; `requestId`: `string`; \}\> | - | Mint one identity or preserve the requestId for an uncertain retry. |
317
- | `detachLocal` | `object` | - | - |
318
- | `detachLocal.replay` | `"unsafe"` | - | - |
319
- | `detachLocal.description` | `string` | `"Detach a machine this member attached from a Computer. Its live connection closes and the Computer keeps its files. Safe to retry."` | - |
320
- | `detachLocal.input` | `ZodLazy`\<`ZodObject`\<\{ `computerId`: `ZodString`; `backendId`: `ZodString`; \}, `$strict`\>\> | `localBackendDetachSchema` | - |
321
- | `detachLocal.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"detached"`\>; `detached`: `ZodBoolean`; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; \}, `$strict`\>\], `"kind"`\> | `fleetDetachment` | - |
322
- | `detachLocal.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"detached"`; `detached`: `boolean`; \} \| \{ `kind`: `"invalid"` \| `"denied"` \| `"uncertain"`; \}\> | - | Close the attachment and its live connection; a gone one settles. |
293
+ | Name | Type | Default value | Description |
294
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
295
+ | `list` | `object` | - | - |
296
+ | `list.replay` | `"safe"` | - | - |
297
+ | `list.access` | `"read"` | - | - |
298
+ | `list.description` | `string` | `"List a page of permitted Computers. Follow nextOffset for another page."` | - |
299
+ | `list.input` | `ZodObject`\<\{ `limit`: `ZodDefault`\<`ZodNumber`\>; `offset`: `ZodDefault`\<`ZodNumber`\>; \}, `$strict`\> | `computerPageSchema` | - |
300
+ | `list.output` | `ZodObject`\<\{ `computers`: `ZodArray`\<`ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; `size`: `ZodEnum`\<\{ `small`: `"small"`; `default`: `"default"`; `large`: `"large"`; \}\>; `createdAt`: `ZodNumber`; `updatedAt`: `ZodNumber`; \}, `$strict`\>\>; `nextOffset`: `ZodNullable`\<`ZodNumber`\>; \}, `$strict`\> | `teamComputerDirectorySchema` | - |
301
+ | `list.execute()` | (`input`, `context`) => `Promise`\<\{ `computers`: `object`[]; `nextOffset`: `number` \| `null`; \}\> | - | Return an admitted inventory page to MCP or the retained broker. |
302
+ | `state` | `object` | - | - |
303
+ | `state.replay` | `"safe"` | - | - |
304
+ | `state.access` | `"read"` | - | - |
305
+ | `state.description` | `string` | `"Read runtime state without waking a Computer, including its live admission queue position. Pass reason: true to get why a failed start failed."` | - |
306
+ | `state.input` | `ZodObject`\<\{ `computerId`: `ZodString`; `reason`: `ZodExactOptional`\<`ZodLiteral`\<`true`\>\>; \}, `$strict`\> | `fleetStateRead` | - |
307
+ | `state.output` | `ZodUnion`\<readonly \[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; `reason`: `ZodString`; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\]\> | `computerStateSchema` | - |
308
+ | `state.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"`; \} \| \{ `state`: `"start_failed"`; \} \| \{ `state`: `"start_failed"`; `reason`: `string`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Return liveness without waking the runtime. |
309
+ | `start` | `object` | - | - |
310
+ | `start.replay` | `"unsafe"` | - | - |
311
+ | `start.description` | `string` | `"Start a hosted Computer through ordinary admission. Waits until connected; poll computers.state while queued. Safe to retry."` | - |
312
+ | `start.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
313
+ | `start.output` | `ZodUnion`\<readonly \[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"start_failed"`\>; `reason`: `ZodString`; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\]\> | `computerStateSchema` | - |
314
+ | `start.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"`; \} \| \{ `state`: `"start_failed"`; \} \| \{ `state`: `"start_failed"`; `reason`: `string`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Admit and start this Computer. |
315
+ | `create` | `object` | - | - |
316
+ | `create.replay` | `"unsafe"` | - | - |
317
+ | `create.description` | `string` | `"Create a Computer with an optional friendly name and size (small, default or large; default when omitted). Request identity is generated automatically. If the outcome is uncertain, retry with its returned requestId and the original name and size input; do not start a second creation."` | - |
318
+ | `create.input` | `ZodObject`\<\{ `name`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; `size`: `ZodDefault`\<`ZodNullable`\<`ZodEnum`\<\{ `default`: `"default"`; `small`: `"small"`; `large`: `"large"`; \}\>\>\>; `requestId`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; \}, `$strict`\> | `fleetCreate` | - |
319
+ | `create.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"created"`\>; `requestId`: `ZodString`; `computer`: `ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; `size`: `ZodEnum`\<\{ `default`: `"default"`; `small`: `"small"`; `large`: `"large"`; \}\>; \}, `$strict`\>; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `conflict`: `"conflict"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; `requestId`: `ZodString`; \}, `$strict`\>\], `"kind"`\> | `fleetCreation` | - |
320
+ | `create.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"created"`; `requestId`: `string`; `computer`: \{ `computerId`: `string`; `name`: `string`; `size`: `"default"` \| `"small"` \| `"large"`; \}; \} \| \{ `kind`: `"invalid"` \| `"conflict"` \| `"denied"` \| `"uncertain"`; `requestId`: `string`; \}\> | - | Mint one identity or preserve the requestId for an uncertain retry. |
321
+ | `stop` | `object` | - | - |
322
+ | `stop.replay` | `"unsafe"` | - | - |
323
+ | `stop.description` | `string` | `'Stop a Computer now and free its running slot. Running commands end; files are kept and the next start brings it back. Only the signed-in owner may; "busy" means it is starting or finishing an operation, so try again.'` | - |
324
+ | `stop.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
325
+ | `stop.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"stopped"`\>; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `denied`: `"denied"`; `busy`: `"busy"`; `uncertain`: `"uncertain"`; \}\>; \}, `$strict`\>\], `"kind"`\> | `fleetStop` | - |
326
+ | `stop.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"stopped"`; \} \| \{ `kind`: `"denied"` \| `"busy"` \| `"uncertain"`; \}\> | - | End the runtime; the Computer and its Workspace stay. |
327
+ | `delete` | `object` | - | - |
328
+ | `delete.replay` | `"unsafe"` | - | - |
329
+ | `delete.description` | `string` | `'Delete a Computer and erase its Workspace, permanently. Pass its exact name as confirmHandle; a different handle deletes nothing. Only the signed-in owner may, never a Team key or an Agent. "uncertain" means retry: a delete cut short finishes on the next attempt.'` | - |
330
+ | `delete.input` | `ZodObject`\<\{ `computerId`: `ZodString`; `confirmHandle`: `ZodString`; \}, `$strict`\> | `fleetDelete` | - |
331
+ | `delete.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"deleted"`\>; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `denied`: `"denied"`; `uncertain`: `"uncertain"`; `unsupported`: `"unsupported"`; `mismatch`: `"mismatch"`; \}\>; \}, `$strict`\>\], `"kind"`\> | `fleetDeletion` | - |
332
+ | `delete.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"deleted"`; \} \| \{ `kind`: `"denied"` \| `"uncertain"` \| `"unsupported"` \| `"mismatch"`; \}\> | - | Match the handle to the Computer's own name before anything is erased. |
333
+ | `backends` | `object` | - | - |
334
+ | `backends.replay` | `"safe"` | - | - |
335
+ | `backends.description` | `string` | `"List one Computer's attached execution backends (platform container, on-box VM, members' machines) with live status."` | - |
336
+ | `backends.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
337
+ | `backends.output` | `ZodObject`\<\{ `backends`: `ZodArray`\<`ZodObject`\<\{ `id`: `ZodString`; `kind`: `ZodEnum`\<\{ `platform-container`: `"platform-container"`; `on-box-vm`: `"on-box-vm"`; `local`: `"local"`; \}\>; `status`: `ZodEnum`\<\{ `ready`: `"ready"`; `online`: `"online"`; `offline`: `"offline"`; `queued`: `"queued"`; \}\>; `queuePosition`: `ZodNullable`\<`ZodNumber`\>; `hostId`: `ZodNullable`\<`ZodString`\>; `hostLabel`: `ZodNullable`\<`ZodString`\>; `folderLabel`: `ZodNullable`\<`ZodString`\>; `detachable`: `ZodBoolean`; \}, `$strict`\>\>; \}, `$strict`\> | `fleetBackends` | - |
338
+ | `backends.execute()` | (`input`, `context`) => `Promise`\<\{ `backends`: `object`[]; \}\> | - | Return the attached list without waking any backend. |
339
+ | `attachLocal` | `object` | - | - |
340
+ | `attachLocal.replay` | `"unsafe"` | - | - |
341
+ | `attachLocal.description` | `string` | `"Attach this authenticated member's machine to a Computer as an execution backend. Send only the device public key and labels; the folder path and private key stay on the machine. Retry an uncertain outcome with its returned requestId."` | - |
342
+ | `attachLocal.input` | `ZodObject`\<\{ `computerId`: `ZodString`; `publicKey`: `ZodBase64`; `hostLabel`: `ZodLazy`\<`ZodString`\>; `folderLabel`: `ZodLazy`\<`ZodString`\>; `requestId`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; \}, `$strict`\> | `fleetAttachInput` | - |
343
+ | `attachLocal.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"attached"`\>; `requestId`: `ZodString`; `backendId`: `ZodString`; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `conflict`: `"conflict"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; `requestId`: `ZodString`; \}, `$strict`\>\], `"kind"`\> | `fleetAttachment` | - |
344
+ | `attachLocal.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"attached"`; `requestId`: `string`; `backendId`: `string`; \} \| \{ `kind`: `"invalid"` \| `"conflict"` \| `"denied"` \| `"uncertain"`; `requestId`: `string`; \}\> | - | Mint one identity or preserve the requestId for an uncertain retry. |
345
+ | `detachLocal` | `object` | - | - |
346
+ | `detachLocal.replay` | `"unsafe"` | - | - |
347
+ | `detachLocal.description` | `string` | `"Detach a machine this member attached from a Computer. Its live connection closes and the Computer keeps its files. Safe to retry."` | - |
348
+ | `detachLocal.input` | `ZodLazy`\<`ZodObject`\<\{ `computerId`: `ZodString`; `backendId`: `ZodString`; \}, `$strict`\>\> | `localBackendDetachSchema` | - |
349
+ | `detachLocal.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"detached"`\>; `detached`: `ZodBoolean`; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; \}, `$strict`\>\], `"kind"`\> | `fleetDetachment` | - |
350
+ | `detachLocal.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"detached"`; `detached`: `boolean`; \} \| \{ `kind`: `"invalid"` \| `"denied"` \| `"uncertain"`; \}\> | - | Close the attachment and its live connection; a gone one settles. |
323
351
 
324
352
  ---
325
353