@fungi.computer/oyster 0.48.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/README.md +7 -3
- package/dist/app-region.js +16 -5
- package/dist/build/candidate-cli.mjs +1 -1
- package/dist/build/snapshot-program-scripts.js +1 -1
- package/dist/computer-control-port.d.ts +17 -0
- package/dist/embed-metafiles.js +1 -1
- package/dist/install-preview.d.ts +19 -0
- package/dist/install-preview.js +41 -0
- package/dist/install-release-cli.js +3 -20
- package/dist/mcp.d.ts +61 -0
- package/dist/mcp.js +54 -0
- package/dist/pack.d.ts +21 -18
- package/dist/pack.js +22 -10
- package/dist/standalone/app-set.d.ts +20 -1
- package/dist/standalone/app-set.js +119 -60
- package/dist/standalone/computer-control.js +31 -0
- package/dist/standalone/install-apps-cli.js +25 -3
- package/dist/standalone/registry.d.ts +1 -1
- package/docs/api/mcp.md +74 -46
- package/docs/api/pack.md +123 -2
- package/docs/api/workers.md +16 -16
- package/package.json +3 -3
|
@@ -15,16 +15,19 @@ import process from "node:process";
|
|
|
15
15
|
import { parseArgs } from "node:util";
|
|
16
16
|
import { Cli } from "@fungi.computer/lantern";
|
|
17
17
|
import { createTryCli, reportTryFailure, tryOyster, tryUsage, } from "./try-cli.js";
|
|
18
|
+
import { installPreviewNotes } from "../install-preview.js";
|
|
18
19
|
import { installReleaseCommand, installReleaseUsage, } from "../install-release-cli.js";
|
|
19
20
|
import { defaultStarterBuildConcurrency, installStandaloneAppSet, } from "./app-set.js";
|
|
20
21
|
/** The starter Apps' public source repositories. */
|
|
21
22
|
const defaultRepositories = "https://github.com/fungi-computer";
|
|
22
|
-
const usage = "Usage: oyster install-apps [--repositories <base URL>] [--ref <ref>] [--from <checkout>] [--concurrency 1-3] [--timings <file>] [--only <app>[,<app>]]";
|
|
23
|
+
const usage = "Usage: oyster install-apps [--repositories <base URL>] [--ref <ref>] [--from <checkout>] [--concurrency 1-3] [--timings <file>] [--only <app>[,<app>]] [--yes]";
|
|
23
24
|
const urlSource = "OYSTER_URL is the address of your deployed Oyster Worker, such as https://oyster.<your-subdomain>.workers.dev. You set it when you deploy. For a local trial, run `oyster try`; it sets up its Computer and starter Apps.";
|
|
24
25
|
const keySource = "OYSTER_OWNER_KEY is the owner key you chose for that Oyster: export OYSTER_OWNER_KEY=$(openssl rand -hex 24), then store it with `wrangler secret put OYSTER_OWNER_KEY`.";
|
|
25
26
|
const helpText = `${usage}
|
|
26
27
|
|
|
27
|
-
Builds the seven starter Apps on your Oyster's own Computer
|
|
28
|
+
Builds the seven starter Apps on your Oyster's own Computer, shows what they
|
|
29
|
+
built, what failed and the permissions they ask for, asks you to confirm once,
|
|
30
|
+
then installs them.
|
|
28
31
|
Starter builds need a deployed Oyster host; this command does not create one.
|
|
29
32
|
Deploy first (see the Oyster README), then set:
|
|
30
33
|
|
|
@@ -37,6 +40,7 @@ Options:
|
|
|
37
40
|
--from <checkout> install from a Botanical checkout directory
|
|
38
41
|
--concurrency 1-3 Apps to build at once
|
|
39
42
|
--only <app>[,<app>] install only these Apps, such as --only prints
|
|
43
|
+
-y, --yes confirm the permissions without asking (required without a terminal)
|
|
40
44
|
--timings <file> write the build timings as JSON
|
|
41
45
|
-h, --help show this help
|
|
42
46
|
`;
|
|
@@ -94,6 +98,7 @@ export async function installApps(args, install = installStandaloneAppSet, ui =
|
|
|
94
98
|
concurrency: { type: "string" },
|
|
95
99
|
timings: { type: "string" },
|
|
96
100
|
only: { type: "string" },
|
|
101
|
+
yes: { type: "boolean", short: "y" },
|
|
97
102
|
help: { type: "boolean", short: "h" },
|
|
98
103
|
},
|
|
99
104
|
strict: true,
|
|
@@ -134,18 +139,35 @@ export async function installApps(args, install = installStandaloneAppSet, ui =
|
|
|
134
139
|
source = { kind: "checkout", directory, revision: `git:${revision}` };
|
|
135
140
|
}
|
|
136
141
|
const started = performance.now();
|
|
137
|
-
const { installed, failed } = await install({
|
|
142
|
+
const { installed, failed, declined } = await install({
|
|
138
143
|
source,
|
|
139
144
|
url,
|
|
140
145
|
key,
|
|
141
146
|
concurrency,
|
|
142
147
|
only,
|
|
148
|
+
// Once, after every build settles: what built, what failed and why, and
|
|
149
|
+
// the permissions of what built. Nothing installs before the answer.
|
|
150
|
+
confirm: async ({ previews, failed }) => {
|
|
151
|
+
ui.note("Built", previews.map(({ installationId }) => installationId));
|
|
152
|
+
if (failed.length > 0)
|
|
153
|
+
ui.note("Failed; these will not be installed", failed.map(({ installationId, reason }) => `${installationId}: ${reason}`));
|
|
154
|
+
for (const note of installPreviewNotes(previews))
|
|
155
|
+
ui.note(note.title, [...note.lines]);
|
|
156
|
+
if (values.yes === true)
|
|
157
|
+
return true;
|
|
158
|
+
const answer = await ui.confirm({
|
|
159
|
+
message: `Install ${String(previews.length)} built App${previews.length === 1 ? "" : "s"} with these permissions${failed.length > 0 ? ` (${String(failed.length)} failed)` : ""}?`,
|
|
160
|
+
});
|
|
161
|
+
return answer === true;
|
|
162
|
+
},
|
|
143
163
|
// Builds run side by side, so each report is its own line, not a spinner.
|
|
144
164
|
report: (message) => {
|
|
145
165
|
ui.step(message);
|
|
146
166
|
},
|
|
147
167
|
});
|
|
148
168
|
const elapsed = performance.now() - started;
|
|
169
|
+
if (declined)
|
|
170
|
+
throw new Error("Install cancelled; nothing was installed. Run with --yes to confirm without asking.");
|
|
149
171
|
if (installed.length > 0)
|
|
150
172
|
ui.note("Build timings", timingTable(installed));
|
|
151
173
|
ui.note("Apps", [
|
|
@@ -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" | "
|
|
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
|
-
| `
|
|
306
|
-
| `
|
|
307
|
-
| `
|
|
308
|
-
| `
|
|
309
|
-
| `
|
|
310
|
-
| `
|
|
311
|
-
| `
|
|
312
|
-
| `
|
|
313
|
-
| `
|
|
314
|
-
| `
|
|
315
|
-
| `
|
|
316
|
-
| `
|
|
317
|
-
| `
|
|
318
|
-
| `
|
|
319
|
-
| `
|
|
320
|
-
| `
|
|
321
|
-
| `
|
|
322
|
-
| `
|
|
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
|
|
package/docs/api/pack.md
CHANGED
|
@@ -111,6 +111,16 @@ type PackedRelease = Readonly<{
|
|
|
111
111
|
|
|
112
112
|
A packed Release on disk.
|
|
113
113
|
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### UploadedRelease
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
type UploadedRelease = Schema.Schema.Type<typeof releaseSchema>;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The Release `release.json` names, as read and uploaded.
|
|
123
|
+
|
|
114
124
|
## Variables
|
|
115
125
|
|
|
116
126
|
### installationOperationSchema
|
|
@@ -317,6 +327,117 @@ retains its original lifetime.
|
|
|
317
327
|
|
|
318
328
|
---
|
|
319
329
|
|
|
330
|
+
### previewBuiltRelease()
|
|
331
|
+
|
|
332
|
+
```ts
|
|
333
|
+
function previewBuiltRelease(input): Promise<{
|
|
334
|
+
name: string;
|
|
335
|
+
capabilities: readonly (
|
|
336
|
+
| "computer.list"
|
|
337
|
+
| "computer.readFile"
|
|
338
|
+
| "computer.writeFile"
|
|
339
|
+
| "computer.execute"
|
|
340
|
+
| "approvals"
|
|
341
|
+
| "agent.list"
|
|
342
|
+
| "agent.manage"
|
|
343
|
+
| "agent.rename"
|
|
344
|
+
| "agent.avatar"
|
|
345
|
+
| "agent.instructions"
|
|
346
|
+
| "agent.toolPolicy"
|
|
347
|
+
| "agent.read"
|
|
348
|
+
| "agent.send"
|
|
349
|
+
| "llm.generation"
|
|
350
|
+
| "media.generation"
|
|
351
|
+
| "media.share"
|
|
352
|
+
| "games:servers"
|
|
353
|
+
| "git.repository"
|
|
354
|
+
| "apps.open"
|
|
355
|
+
| "apps.call"
|
|
356
|
+
| "app.storage"
|
|
357
|
+
| "app.events.emit"
|
|
358
|
+
| "team.workbenchHost"
|
|
359
|
+
| "marketplace.browse"
|
|
360
|
+
| "marketplace.purchase"
|
|
361
|
+
| "workflow.run"
|
|
362
|
+
| "workflow.publish"
|
|
363
|
+
| "workflow.arm"
|
|
364
|
+
| "world"
|
|
365
|
+
| "channels.read"
|
|
366
|
+
| "channels.personal.manage"
|
|
367
|
+
)[];
|
|
368
|
+
update: {
|
|
369
|
+
installationId: string;
|
|
370
|
+
needsApproval: readonly (
|
|
371
|
+
| "computer.list"
|
|
372
|
+
| "computer.readFile"
|
|
373
|
+
| "computer.writeFile"
|
|
374
|
+
| "computer.execute"
|
|
375
|
+
| "approvals"
|
|
376
|
+
| "agent.list"
|
|
377
|
+
| "agent.manage"
|
|
378
|
+
| "agent.rename"
|
|
379
|
+
| "agent.avatar"
|
|
380
|
+
| "agent.instructions"
|
|
381
|
+
| "agent.toolPolicy"
|
|
382
|
+
| "agent.read"
|
|
383
|
+
| "agent.send"
|
|
384
|
+
| "llm.generation"
|
|
385
|
+
| "media.generation"
|
|
386
|
+
| "media.share"
|
|
387
|
+
| "games:servers"
|
|
388
|
+
| "git.repository"
|
|
389
|
+
| "apps.open"
|
|
390
|
+
| "apps.call"
|
|
391
|
+
| "app.storage"
|
|
392
|
+
| "app.events.emit"
|
|
393
|
+
| "team.workbenchHost"
|
|
394
|
+
| "marketplace.browse"
|
|
395
|
+
| "marketplace.purchase"
|
|
396
|
+
| "workflow.run"
|
|
397
|
+
| "workflow.publish"
|
|
398
|
+
| "workflow.arm"
|
|
399
|
+
| "world"
|
|
400
|
+
| "channels.read"
|
|
401
|
+
| "channels.personal.manage"
|
|
402
|
+
)[];
|
|
403
|
+
} | null;
|
|
404
|
+
}>;
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Ask the Oyster what installing a Release it already holds would request, and
|
|
408
|
+
whether it would update an existing installation.
|
|
409
|
+
|
|
410
|
+
#### Parameters
|
|
411
|
+
|
|
412
|
+
| Parameter | Type |
|
|
413
|
+
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
414
|
+
| `input` | `Readonly`\<\{ `url`: `string`; `key`: `string`; `release`: [`UploadedRelease`](#uploadedrelease); `installationId?`: `string`; `signal?`: `AbortSignal`; \}\> |
|
|
415
|
+
|
|
416
|
+
#### Returns
|
|
417
|
+
|
|
418
|
+
`Promise`\<\{ `name`: `string`; `capabilities`: readonly ( \| `"computer.list"`
|
|
419
|
+
\| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \|
|
|
420
|
+
`"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \|
|
|
421
|
+
`"agent.avatar"` \| `"agent.instructions"` \| `"agent.toolPolicy"` \|
|
|
422
|
+
`"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"`
|
|
423
|
+
\| `"media.share"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"`
|
|
424
|
+
\| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \|
|
|
425
|
+
`"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \|
|
|
426
|
+
`"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \|
|
|
427
|
+
`"channels.read"` \| `"channels.personal.manage"`)[]; `update`: \| \{
|
|
428
|
+
`installationId`: `string`; `needsApproval`: readonly ( \| `"computer.list"` \|
|
|
429
|
+
`"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \|
|
|
430
|
+
`"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \|
|
|
431
|
+
`"agent.avatar"` \| `"agent.instructions"` \| `"agent.toolPolicy"` \|
|
|
432
|
+
`"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"`
|
|
433
|
+
\| `"media.share"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"`
|
|
434
|
+
\| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \|
|
|
435
|
+
`"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \|
|
|
436
|
+
`"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \|
|
|
437
|
+
`"channels.read"` \| `"channels.personal.manage"`)[]; \} \| `null`; \}\>
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
320
441
|
### previewRelease()
|
|
321
442
|
|
|
322
443
|
```ts
|
|
@@ -407,8 +528,8 @@ function previewRelease(input): Promise<{
|
|
|
407
528
|
}>;
|
|
408
529
|
```
|
|
409
530
|
|
|
410
|
-
Upload one built Release and
|
|
411
|
-
|
|
531
|
+
Upload one built Release and preview it, so an owner can confirm several
|
|
532
|
+
Releases once before any install.
|
|
412
533
|
|
|
413
534
|
#### Parameters
|
|
414
535
|
|