@fungi.computer/oyster 0.8.2 → 0.10.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 +34 -17
- package/dist/agents.d.ts +16 -1
- package/dist/agents.js +63 -3
- package/dist/apps/catalog.d.ts +11 -0
- package/dist/apps/catalog.js +1 -0
- package/dist/apps/gate.d.ts +2 -2
- package/dist/apps/installation.d.ts +7 -7
- package/dist/apps/permissions.d.ts +5 -5
- package/dist/boot-host-script.js +1 -1
- package/dist/build/candidate-cli.mjs +1 -0
- package/dist/computer-control-port.d.ts +20 -1
- package/dist/host.js +11 -4
- package/dist/installation-client.d.ts +6 -5
- package/dist/installation-client.js +21 -17
- package/dist/installation-execution.js +41 -8
- package/dist/installation-operations.d.ts +30 -8
- package/dist/installation-operations.js +122 -24
- package/dist/instance-refusal.d.ts +4 -2
- package/dist/instance-refusal.js +5 -1
- package/dist/mcp.d.ts +132 -2
- package/dist/mcp.js +63 -1
- package/dist/page/mount.d.ts +8 -1
- package/dist/page/mount.js +72 -6
- package/dist/page-script.js +3 -3
- package/dist/standalone/agent-computers.d.ts +12 -1
- package/dist/standalone/agent-computers.js +35 -0
- package/dist/standalone/agent-connections.d.ts +47 -0
- package/dist/standalone/agent-connections.js +170 -0
- package/dist/standalone/agent-model-choice.d.ts +7 -3
- package/dist/standalone/agent-model-choice.js +33 -4
- package/dist/standalone/agents.d.ts +70 -9
- package/dist/standalone/agents.js +187 -110
- package/dist/standalone/app-set.js +6 -7
- package/dist/standalone/browser.d.ts +4 -3
- package/dist/standalone/browser.js +4 -3
- package/dist/standalone/computer-control.js +55 -1
- package/dist/standalone/computer-fleet.d.ts +29 -2
- package/dist/standalone/computer-fleet.js +51 -23
- package/dist/standalone/computer.d.ts +20 -1
- package/dist/standalone/computer.js +63 -1
- package/dist/standalone/model-key-vault.d.ts +50 -0
- package/dist/standalone/model-key-vault.js +147 -0
- package/dist/standalone/registry.d.ts +23 -0
- package/dist/standalone/registry.js +39 -0
- package/dist/standalone/web.d.ts +10 -0
- package/dist/standalone/web.js +34 -0
- package/dist/standalone/worker-routes.d.ts +3 -1
- package/dist/standalone/worker-routes.js +1 -0
- package/dist/standalone/worker.js +9 -1
- package/dist/standalone/workflow-host.d.ts +5 -5
- package/dist/standalone/workflow-trigger-host.d.ts +1 -1
- package/dist/web/index.d.ts +3 -0
- package/dist/web/index.js +3 -0
- package/dist/web/search-contract.d.ts +19 -0
- package/dist/web/search-contract.js +14 -0
- package/dist/web/search.d.ts +25 -0
- package/dist/web/search.js +123 -0
- package/dist/web/source.d.ts +46 -0
- package/dist/web/source.js +335 -0
- package/dist/workers-git.js +2 -1
- package/docs/api/agents.md +81 -3
- package/docs/api/apps.md +160 -142
- package/docs/api/build-contract.md +27 -21
- package/docs/api/build.md +55 -54
- package/docs/api/git.md +3 -3
- package/docs/api/host.md +226 -60
- package/docs/api/mcp.md +83 -44
- package/docs/api/page/mount.md +6 -1
- package/docs/api/workers-git.md +6 -6
- package/docs/api/workers.md +53 -47
- package/docs/site/agent-quickstart.mdx +4 -2
- package/package.json +27 -22
|
@@ -19718,6 +19718,7 @@ var appCapabilityIds = [
|
|
|
19718
19718
|
"computer.execute",
|
|
19719
19719
|
"llm.generation",
|
|
19720
19720
|
"media.generation",
|
|
19721
|
+
"media.share",
|
|
19721
19722
|
"games:servers",
|
|
19722
19723
|
"git.repository",
|
|
19723
19724
|
"apps.open",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
2
|
import type { computerCreateRequestSchema, computerPageSchema } from "@fungi.computer/computer/fleet/inventory-wire";
|
|
3
|
-
import type { computerStateSchema } from "@fungi.computer/computer/fleet/wire";
|
|
3
|
+
import type { computerBackendViewSchema, computerStateSchema, LocalBackendAttachInput } from "@fungi.computer/computer/fleet/wire";
|
|
4
4
|
import type { teamComputerDirectorySchema } from "@fungi.computer/nacre/workbench";
|
|
5
5
|
import type { InvocationContext } from "@fungi.computer/mycelium";
|
|
6
6
|
/** Host policy stays outside this family: Hub admits funded slots, standalone
|
|
@@ -23,4 +23,23 @@ export type ComputerControlPort = Readonly<{
|
|
|
23
23
|
} | {
|
|
24
24
|
kind: "uncertain" | "denied" | "conflict" | "invalid";
|
|
25
25
|
}>;
|
|
26
|
+
/** List one Computer's attached execution backends with live status. */
|
|
27
|
+
backends(computerId: string, context: InvocationContext): Promise<z.output<typeof computerBackendViewSchema>[]>;
|
|
28
|
+
/** Attach the caller's machine, or replay the same request. */
|
|
29
|
+
attachLocal(input: LocalBackendAttachInput, context: InvocationContext): Promise<{
|
|
30
|
+
kind: "attached";
|
|
31
|
+
backendId: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "uncertain" | "denied" | "conflict" | "invalid";
|
|
34
|
+
}>;
|
|
35
|
+
/** Detach a machine the caller attached; one already gone settles. */
|
|
36
|
+
detachLocal(input: Readonly<{
|
|
37
|
+
computerId: string;
|
|
38
|
+
backendId: string;
|
|
39
|
+
}>, context: InvocationContext): Promise<{
|
|
40
|
+
kind: "detached";
|
|
41
|
+
detached: boolean;
|
|
42
|
+
} | {
|
|
43
|
+
kind: "denied" | "uncertain" | "invalid";
|
|
44
|
+
}>;
|
|
26
45
|
}>;
|
package/dist/host.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hostGateFacts, releaseCache } from "./internal/host-gate.js";
|
|
2
|
-
import { InstallationOperationError, installationCommandIds, installationRequestIdSchema, } from "./installation-operations.js";
|
|
2
|
+
import { InstallationOperationError, installationCommandIds, installationRequestIdSchema, installationWaitQuerySchema, maxSettlementWaitMs, } from "./installation-operations.js";
|
|
3
3
|
import { completedInstallationResponse, observeInstallation, InstallationObservationError, } from "./installation-client.js";
|
|
4
4
|
import { instanceRefusalBody, instanceRefusalStatus, } from "./instance-refusal.js";
|
|
5
5
|
import { appSandbox } from "./app-sandbox.js";
|
|
@@ -168,7 +168,7 @@ export async function installOrSelect(host, installationId, release, principal,
|
|
|
168
168
|
return completedInstallationResponse(await observeInstallation({
|
|
169
169
|
requestId,
|
|
170
170
|
initial: admitted,
|
|
171
|
-
read: () => operations.
|
|
171
|
+
read: () => operations.awaitSettled(requestId, installationId, maxSettlementWaitMs),
|
|
172
172
|
signal,
|
|
173
173
|
}));
|
|
174
174
|
}
|
|
@@ -649,11 +649,18 @@ export function oysterRouteTable(host) {
|
|
|
649
649
|
const key = installationRequestIdSchema.safeParse(context.req.query("requestId"));
|
|
650
650
|
if (!key.success)
|
|
651
651
|
return refusal(400, "Invalid installation request identity");
|
|
652
|
+
const wait = installationWaitQuerySchema.safeParse(context.req.query("waitMs"));
|
|
653
|
+
if (!wait.success)
|
|
654
|
+
return refusal(400, "Invalid installation wait");
|
|
652
655
|
const operations = host.installations.operations;
|
|
653
656
|
if (operations === undefined)
|
|
654
657
|
return refusal(503, "Installation commands unavailable");
|
|
655
658
|
try {
|
|
656
|
-
const
|
|
659
|
+
const installationId = context.req.param("installationId");
|
|
660
|
+
// With waitMs, the owner answers when it settles the command.
|
|
661
|
+
const operation = wait.data === undefined
|
|
662
|
+
? await operations.read(key.data, installationId)
|
|
663
|
+
: await operations.awaitSettled(key.data, installationId, wait.data);
|
|
657
664
|
return operation === null
|
|
658
665
|
? refusal(404, "Installation request not found")
|
|
659
666
|
: Response.json(operation);
|
|
@@ -878,7 +885,7 @@ export function oysterRouteTable(host) {
|
|
|
878
885
|
// desktop chrome belongs to the shell.
|
|
879
886
|
return new Response(config.workbench
|
|
880
887
|
? `${head}<style>html,body,#oyster-shell{margin:0;height:100%}body{font-family:var(--font-sans)}</style><div id="oyster-shell"></div>${tail}`
|
|
881
|
-
: `${head}<style>html,body{margin:0;height:100%}iframe{border:0;width:100%;height:100%;display:block}</style><iframe id="oyster-app" sandbox="${appSandbox}" allowfullscreen
|
|
888
|
+
: `${head}<style>html,body{margin:0;height:100%}iframe{border:0;width:100%;height:100%;display:block}</style><iframe id="oyster-app" sandbox="${appSandbox}" allowfullscreen title="${escapeHtml(installation.installationId)}"></iframe>${tail}`, {
|
|
882
889
|
headers: {
|
|
883
890
|
"Content-Type": "text/html; charset=utf-8",
|
|
884
891
|
"Cache-Control": "no-store",
|
|
@@ -16,14 +16,17 @@ export declare class InstallationObservationError extends Error {
|
|
|
16
16
|
readonly requestId: string;
|
|
17
17
|
constructor(requestId: string, options?: ErrorOptions);
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Observe one retained command, over either HTTP or the host's decoded port.
|
|
21
|
+
* Each `read` is the owner's settlement wait: it answers as soon as the owner
|
|
22
|
+
* settles (or admits) the command, or with the still-pending state after the
|
|
23
|
+
* owner's bounded wait, so this loop never sleeps between reads.
|
|
24
|
+
*/
|
|
20
25
|
export declare function observeInstallation(input: Readonly<{
|
|
21
26
|
requestId: string;
|
|
22
27
|
initial: InstallationOperation | null;
|
|
23
28
|
read(): Promise<InstallationOperation | null>;
|
|
24
29
|
signal: AbortSignal;
|
|
25
|
-
pollMs?: number;
|
|
26
|
-
idle?: (ms: number, signal: AbortSignal) => Promise<void>;
|
|
27
30
|
}>): Promise<InstallationCompletion>;
|
|
28
31
|
/** Completed HTTP meaning shared by pack and the retained PUT selection door. */
|
|
29
32
|
export declare function completedInstallationResponse(operation: InstallationCompletion): Response;
|
|
@@ -36,8 +39,6 @@ export declare function installOnOyster(input: Readonly<{
|
|
|
36
39
|
key: string;
|
|
37
40
|
installationId: string;
|
|
38
41
|
release: Release;
|
|
39
|
-
pollMs?: number;
|
|
40
|
-
idle?: (ms: number, signal: AbortSignal) => Promise<void>;
|
|
41
42
|
/** Once, after the owner supplies a correlated record, even after a lost ack. */
|
|
42
43
|
onAdmitted?: (operation: InstallationOperation) => void;
|
|
43
44
|
}> & InstallationObservationBudget): Promise<InstallationCompletion>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { setTimeout as sleep } from "node:timers/promises";
|
|
2
1
|
import { addAbortListener } from "node:events";
|
|
3
2
|
import * as Schema from "effect/Schema";
|
|
4
3
|
import { releaseSchema } from "@fungi.computer/puffball/effect";
|
|
5
4
|
import { instanceRefusalBody } from "./instance-refusal.js";
|
|
6
|
-
import { installationOperationSchema, installationCommandIds, } from "./installation-operations.js";
|
|
5
|
+
import { installationOperationSchema, installationCommandIds, maxSettlementWaitMs, } from "./installation-operations.js";
|
|
7
6
|
/**
|
|
8
7
|
* Installer-owned observer budget, matching the standalone installer's existing
|
|
9
8
|
* twenty-minute default. Not an App grant lifetime or a server execution limit.
|
|
@@ -26,8 +25,12 @@ export class InstallationObservationError extends Error {
|
|
|
26
25
|
this.requestId = requestId;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Observe one retained command, over either HTTP or the host's decoded port.
|
|
30
|
+
* Each `read` is the owner's settlement wait: it answers as soon as the owner
|
|
31
|
+
* settles (or admits) the command, or with the still-pending state after the
|
|
32
|
+
* owner's bounded wait, so this loop never sleeps between reads.
|
|
33
|
+
*/
|
|
31
34
|
export async function observeInstallation(input) {
|
|
32
35
|
try {
|
|
33
36
|
input.signal.throwIfAborted();
|
|
@@ -54,8 +57,6 @@ export async function observeInstallation(input) {
|
|
|
54
57
|
listener?.[Symbol.dispose]();
|
|
55
58
|
}
|
|
56
59
|
input.signal.throwIfAborted();
|
|
57
|
-
if (operation === null || operation.state === "pending")
|
|
58
|
-
await (input.idle ?? idle)(input.pollMs ?? 5_000, input.signal);
|
|
59
60
|
}
|
|
60
61
|
return operation;
|
|
61
62
|
}
|
|
@@ -149,26 +150,29 @@ export async function installOnOyster(input) {
|
|
|
149
150
|
throw new InstallationObservationError(requestId);
|
|
150
151
|
const statusUrl = new URL(`/api/installations/${encodeURIComponent(input.installationId)}/status`, input.url);
|
|
151
152
|
statusUrl.searchParams.set("requestId", requestId);
|
|
152
|
-
|
|
153
|
+
const settlementUrl = new URL(statusUrl);
|
|
154
|
+
settlementUrl.searchParams.set("waitMs", String(maxSettlementWaitMs));
|
|
155
|
+
// Without an acknowledgement, read once at once so the caller learns of
|
|
156
|
+
// its admission promptly; every later read is the owner's settlement wait.
|
|
157
|
+
let readOnce = false;
|
|
158
|
+
return await observeInstallation({
|
|
153
159
|
requestId,
|
|
154
160
|
initial: operation,
|
|
155
161
|
signal,
|
|
156
162
|
read: async () => {
|
|
163
|
+
const url = admitted || readOnce ? settlementUrl : statusUrl;
|
|
164
|
+
readOnce = true;
|
|
157
165
|
// Like decoded RPC reads, transport errors reach the observer with
|
|
158
166
|
// their original cause; they are not an authoritative pending read.
|
|
159
|
-
|
|
167
|
+
// A 404 is the owner's answer: not admitted (yet).
|
|
168
|
+
const observed = await fetch(url, { headers, signal });
|
|
160
169
|
if (observed.status === 200)
|
|
161
170
|
return decode(observed);
|
|
162
|
-
if (observed.status
|
|
163
|
-
|
|
164
|
-
|
|
171
|
+
if (observed.status === 404)
|
|
172
|
+
return null;
|
|
173
|
+
throw new InstallationObservationError(requestId);
|
|
165
174
|
},
|
|
166
|
-
};
|
|
167
|
-
if (input.pollMs !== undefined)
|
|
168
|
-
observation = { ...observation, pollMs: input.pollMs };
|
|
169
|
-
if (input.idle !== undefined)
|
|
170
|
-
observation = { ...observation, idle: input.idle };
|
|
171
|
-
return await observeInstallation(observation);
|
|
175
|
+
});
|
|
172
176
|
}
|
|
173
177
|
catch (cause) {
|
|
174
178
|
if (cause instanceof InstallationObservationError)
|
|
@@ -7,6 +7,7 @@ import { applyInstallationCommand, isCommittedInstallation, } from "./apps/insta
|
|
|
7
7
|
import { deriveDeclaredOperations } from "./apps/operations.js";
|
|
8
8
|
import { pendingCapabilities } from "./apps/permissions.js";
|
|
9
9
|
import { BootGateError } from "./boot-gate.js";
|
|
10
|
+
import { failureDiagnostic } from "./cause-class.js";
|
|
10
11
|
import { guestLimits } from "./guest-policy.js";
|
|
11
12
|
import { instanceSchema, selectionOf } from "./index.js";
|
|
12
13
|
import { ReleaseError, verifyRelease } from "./release.js";
|
|
@@ -22,6 +23,28 @@ const unconfirmed = {
|
|
|
22
23
|
state: "unconfirmed",
|
|
23
24
|
outcome: "outcome_unknown",
|
|
24
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Delays before each further preparation attempt. A cold Instance (first
|
|
28
|
+
* backend construction, a Durable Object reset or an overloaded isolate) can
|
|
29
|
+
* fail its first generic preparation and pass the next one.
|
|
30
|
+
*/
|
|
31
|
+
const preparationRetryDelaysMs = [500, 2_000];
|
|
32
|
+
/** Retry only generic preparation failures; typed refusals are final. */
|
|
33
|
+
async function prepareWithRetry(prepare) {
|
|
34
|
+
for (let attempt = 1;; attempt++) {
|
|
35
|
+
const prepared = await prepare();
|
|
36
|
+
if (prepared.ok || prepared.code !== "failed")
|
|
37
|
+
return prepared;
|
|
38
|
+
console.error("Installation preparation failed", {
|
|
39
|
+
attempt,
|
|
40
|
+
causeClass: prepared.causeClass,
|
|
41
|
+
});
|
|
42
|
+
const wait = preparationRetryDelaysMs[attempt - 1];
|
|
43
|
+
if (wait === undefined)
|
|
44
|
+
return prepared;
|
|
45
|
+
await new Promise((resolve) => setTimeout(resolve, wait));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
25
48
|
/** Ordinary Worker-side verification and lifecycle I/O for one retained intent. */
|
|
26
49
|
export async function executeInstallation(host, input) {
|
|
27
50
|
let command = retainedInstallationCommandSchema.parse(input);
|
|
@@ -45,9 +68,13 @@ export async function executeInstallation(host, input) {
|
|
|
45
68
|
verified = await verifyRelease(host.artifacts, command.admission.release);
|
|
46
69
|
}
|
|
47
70
|
catch (cause) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
71
|
+
if (cause instanceof ReleaseError)
|
|
72
|
+
return refused(422, cause.code);
|
|
73
|
+
console.error("Installation release verification failed", {
|
|
74
|
+
requestId: command.admission.requestId,
|
|
75
|
+
...failureDiagnostic(cause),
|
|
76
|
+
});
|
|
77
|
+
return unconfirmed;
|
|
51
78
|
}
|
|
52
79
|
if (command.plan === null) {
|
|
53
80
|
const declaration = verified.declaration ?? emptyAppDeclaration;
|
|
@@ -123,16 +150,22 @@ export async function executeInstallation(host, input) {
|
|
|
123
150
|
uiCheck = await host.bootUi(verified.release);
|
|
124
151
|
}
|
|
125
152
|
catch (cause) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
153
|
+
if (cause instanceof BootGateError)
|
|
154
|
+
return refused(422, cause.code);
|
|
155
|
+
console.error("Installation UI boot check failed", {
|
|
156
|
+
requestId: command.admission.requestId,
|
|
157
|
+
...failureDiagnostic(cause),
|
|
158
|
+
});
|
|
159
|
+
return unconfirmed;
|
|
129
160
|
}
|
|
130
161
|
}
|
|
131
162
|
else {
|
|
132
|
-
const prepared = await instance.prepare(state, next.release);
|
|
163
|
+
const prepared = await prepareWithRetry(() => instance.prepare(state, next.release));
|
|
133
164
|
if (!prepared.ok)
|
|
165
|
+
// Preparation never changes the active runtime and runs before the
|
|
166
|
+
// commit, so a generic failure here leaves the previous release live.
|
|
134
167
|
return prepared.code === "failed"
|
|
135
|
-
?
|
|
168
|
+
? refused(503, "installation_not_applied")
|
|
136
169
|
: refused(instanceRefusalStatus(prepared.code), prepared.code);
|
|
137
170
|
uiCheck = prepared.value;
|
|
138
171
|
}
|
|
@@ -32,7 +32,7 @@ declare const installationOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
32
32
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
33
33
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
34
34
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
35
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
35
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
36
36
|
capabilityApproved: z.ZodLiteral<true>;
|
|
37
37
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
38
38
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|
|
@@ -250,7 +250,7 @@ export declare const installationOperationSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
250
250
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
251
251
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
252
252
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
253
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
253
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
254
254
|
capabilityApproved: z.ZodLiteral<true>;
|
|
255
255
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
256
256
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|
|
@@ -431,7 +431,7 @@ export declare const retainedInstallationCommandSchema: z.ZodObject<{
|
|
|
431
431
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
432
432
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
433
433
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
434
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
434
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
435
435
|
capabilityApproved: z.ZodLiteral<true>;
|
|
436
436
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
437
437
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|
|
@@ -492,7 +492,7 @@ export declare const retainedInstallationCommandSchema: z.ZodObject<{
|
|
|
492
492
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
493
493
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
494
494
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
495
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
495
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
496
496
|
capabilityApproved: z.ZodLiteral<true>;
|
|
497
497
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
498
498
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|
|
@@ -598,6 +598,12 @@ export type InstallationOperations = Readonly<{
|
|
|
598
598
|
admit(input: InstallationAdmission): Promise<InstallationOperation>;
|
|
599
599
|
/** The operation's current state, when it names this installation. */
|
|
600
600
|
read(requestId: string, installationId: string): Promise<InstallationOperation | null>;
|
|
601
|
+
/**
|
|
602
|
+
* The operation once it leaves pending, or its current state when it is
|
|
603
|
+
* still pending (or not yet admitted) after at most `waitMs`. The owner
|
|
604
|
+
* answers the moment it settles the command; there is no caller poll.
|
|
605
|
+
*/
|
|
606
|
+
awaitSettled(requestId: string, installationId: string, waitMs: number): Promise<InstallationOperation | null>;
|
|
601
607
|
/** Only pending recovery is executable; terminal history returns null. */
|
|
602
608
|
load(requestId: string): Promise<RetainedInstallationCommand | null>;
|
|
603
609
|
/** Record the executor's one reduced installation for this command. */
|
|
@@ -605,6 +611,13 @@ export type InstallationOperations = Readonly<{
|
|
|
605
611
|
/** Commit the planned installation against its exact baseline. */
|
|
606
612
|
commit(requestId: string, uiCheck: UiBootCheckOutcome | null): Promise<InstallationCommit>;
|
|
607
613
|
}>;
|
|
614
|
+
/**
|
|
615
|
+
* One owner wait's bound, under ordinary HTTP idle timeouts; an observer that
|
|
616
|
+
* needs longer simply waits again.
|
|
617
|
+
*/
|
|
618
|
+
export declare const maxSettlementWaitMs = 25000;
|
|
619
|
+
/** The status door's optional `waitMs` query: whole milliseconds, bounded. */
|
|
620
|
+
export declare const installationWaitQuerySchema: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>>;
|
|
608
621
|
declare const installationOperationRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
609
622
|
action: z.ZodLiteral<"admit">;
|
|
610
623
|
scope: z.ZodObject<{
|
|
@@ -655,6 +668,15 @@ declare const installationOperationRequestSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
655
668
|
}, z.core.$strict>;
|
|
656
669
|
requestId: z.ZodString;
|
|
657
670
|
installationId: z.ZodLazy<z.ZodString>;
|
|
671
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
672
|
+
action: z.ZodLiteral<"await">;
|
|
673
|
+
scope: z.ZodObject<{
|
|
674
|
+
tenantId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<string & import("effect/Brand").Brand<"OysterTenantId">, unknown>>;
|
|
675
|
+
origin: z.ZodURL;
|
|
676
|
+
}, z.core.$strict>;
|
|
677
|
+
requestId: z.ZodString;
|
|
678
|
+
installationId: z.ZodLazy<z.ZodString>;
|
|
679
|
+
waitMs: z.ZodNumber;
|
|
658
680
|
}, z.core.$strict>, z.ZodObject<{
|
|
659
681
|
action: z.ZodLiteral<"load">;
|
|
660
682
|
scope: z.ZodObject<{
|
|
@@ -694,7 +716,7 @@ declare const installationOperationRequestSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
694
716
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
695
717
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
696
718
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
697
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
719
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
698
720
|
capabilityApproved: z.ZodLiteral<true>;
|
|
699
721
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
700
722
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|
|
@@ -914,7 +936,7 @@ declare const installationOperationReplySchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
914
936
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
915
937
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
916
938
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
917
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
939
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
918
940
|
capabilityApproved: z.ZodLiteral<true>;
|
|
919
941
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
920
942
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|
|
@@ -1058,7 +1080,7 @@ declare const installationOperationReplySchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1058
1080
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
1059
1081
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
1060
1082
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
1061
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
1083
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
1062
1084
|
capabilityApproved: z.ZodLiteral<true>;
|
|
1063
1085
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
1064
1086
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|
|
@@ -1119,7 +1141,7 @@ declare const installationOperationReplySchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1119
1141
|
authorityVersion: z.ZodLazy<z.ZodNumber>;
|
|
1120
1142
|
declaredOperationsDigest: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@fungi.computer/puffball").Sha256Digest, unknown>>;
|
|
1121
1143
|
approvedGrants: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
1122
|
-
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
1144
|
+
capability: z.ZodPipe<z.ZodUnknown, z.ZodTransform<"approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "media.share" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage", unknown>>;
|
|
1123
1145
|
capabilityApproved: z.ZodLiteral<true>;
|
|
1124
1146
|
operations: z.ZodLazy<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
1125
1147
|
resources: z.ZodUnion<readonly [z.ZodLiteral<"tenant-scope">, z.ZodReadonly<z.ZodArray<z.ZodLazy<z.ZodReadonly<z.ZodObject<{
|