@fungi.computer/oyster 0.20.3 → 0.20.4
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/apps/permissions.d.ts +16 -0
- package/dist/apps/permissions.js +11 -0
- package/dist/embed-metafiles.js +1 -1
- package/dist/embed-scripts.js +2 -2
- package/dist/host.js +2 -3
- package/dist/page/app-permissions.js +2 -2
- package/dist/page-script.js +3 -3
- package/dist/standalone/computer.d.ts +1 -1
- package/dist/standalone/computer.js +27 -10
- package/dist/standalone/registry.d.ts +1 -0
- package/dist/standalone/trial-starters.d.ts +1 -0
- package/dist/standalone/try-cli.js +4 -0
- package/package.json +4 -4
|
@@ -39,7 +39,7 @@ export type StandaloneComputerResult = z.output<typeof listOutputSchema> | Reado
|
|
|
39
39
|
encoding: "base64";
|
|
40
40
|
truncated: boolean;
|
|
41
41
|
}> | Readonly<{
|
|
42
|
-
error: "conflict" | "no_runtime";
|
|
42
|
+
error: "conflict" | "no_runtime" | "not_found";
|
|
43
43
|
}> | z.output<typeof writeOutputSchema> | z.output<typeof mkdirOutputSchema> | z.output<typeof computerPortsOutputSchema> | z.output<typeof computerPortOutputSchema> | z.output<typeof computerPortRemovalOutputSchema> | z.output<typeof processListOutputSchema> | z.output<typeof processKillOutputSchema> | z.output<typeof processLogsOutputSchema> | z.output<typeof computerProcessSchema> | ComputerPorts["ports"][number] | z.output<typeof computerOperationResultSchema> | z.output<typeof readOutputSchema> | z.output<typeof computerToolResultSchema>;
|
|
44
44
|
/**
|
|
45
45
|
* A port-preview listing, or the typed refusal the owner route presents with
|
|
@@ -743,7 +743,12 @@ export const computerFrameMethods = {
|
|
|
743
743
|
},
|
|
744
744
|
read: {
|
|
745
745
|
decodeArgs: (args) => z.tuple([readBytesInputSchema]).parse(args),
|
|
746
|
-
decodeResult: (value) =>
|
|
746
|
+
decodeResult: (value) => z
|
|
747
|
+
.union([
|
|
748
|
+
computerByteReadReplySchema,
|
|
749
|
+
z.strictObject({ error: z.literal("not_found") }),
|
|
750
|
+
])
|
|
751
|
+
.parse(value),
|
|
747
752
|
requiredOperations: () => ["read"],
|
|
748
753
|
},
|
|
749
754
|
write: {
|
|
@@ -751,7 +756,7 @@ export const computerFrameMethods = {
|
|
|
751
756
|
decodeResult: (value) => z
|
|
752
757
|
.union([
|
|
753
758
|
writeOutputSchema,
|
|
754
|
-
z.strictObject({ error: z.
|
|
759
|
+
z.strictObject({ error: z.enum(["conflict", "not_found"]) }),
|
|
755
760
|
])
|
|
756
761
|
.parse(value),
|
|
757
762
|
requiredOperations: () => ["write"],
|
|
@@ -931,12 +936,24 @@ export async function computerInvocation(env, scope, frame, method, args) {
|
|
|
931
936
|
: null;
|
|
932
937
|
const native = env.COMPUTER.getByName(computerId);
|
|
933
938
|
frame.signal.throwIfAborted();
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
939
|
+
try {
|
|
940
|
+
return await native.value({
|
|
941
|
+
computerId,
|
|
942
|
+
actions: new Set([action]),
|
|
943
|
+
expiresAt: Math.min(frame.facts.deadlineAt, Date.now() + 60_000),
|
|
944
|
+
provenance: { actor: `${actor.kind}:${actorId}` },
|
|
945
|
+
}, action, input, grant === null
|
|
946
|
+
? undefined
|
|
947
|
+
: computerValueSchema.parse(JSON.parse(JSON.stringify({ workflowGit: grant }))));
|
|
948
|
+
}
|
|
949
|
+
catch (cause) {
|
|
950
|
+
// A missing file or parent folder is a domain answer. Rethrown, native RPC
|
|
951
|
+
// reports it to an Agent only as an unrecognized sandbox failure.
|
|
952
|
+
if ((action === "files.write" ||
|
|
953
|
+
action === "files.edit" ||
|
|
954
|
+
action === "files.readBytes") &&
|
|
955
|
+
missingFile.safeParse(cause).success)
|
|
956
|
+
return { error: "not_found" };
|
|
957
|
+
throw cause;
|
|
958
|
+
}
|
|
942
959
|
}
|
|
@@ -55,6 +55,7 @@ export declare abstract class StandaloneRegistry extends OysterRegistry implemen
|
|
|
55
55
|
installationId: string;
|
|
56
56
|
displayName: string;
|
|
57
57
|
state: "failed" | "installing" | "needs-runtime";
|
|
58
|
+
appId?: string | undefined;
|
|
58
59
|
reason?: {
|
|
59
60
|
code: "unknown" | "build_failed" | "network" | "unsupported";
|
|
60
61
|
message: string;
|
|
@@ -8,6 +8,7 @@ export declare const trialStartersBodySchema: z.ZodObject<{
|
|
|
8
8
|
installing: z.ZodArray<z.ZodObject<{
|
|
9
9
|
installationId: z.ZodString;
|
|
10
10
|
displayName: z.ZodString;
|
|
11
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
11
12
|
state: z.ZodEnum<{
|
|
12
13
|
readonly installing: "installing";
|
|
13
14
|
readonly failed: "failed";
|
|
@@ -921,6 +921,7 @@ export async function tryOyster(args, effects = realEffects, ui = createTryCli(a
|
|
|
921
921
|
pending.set(name, {
|
|
922
922
|
installationId: name,
|
|
923
923
|
displayName: app.displayName,
|
|
924
|
+
appId: app.appId,
|
|
924
925
|
state: "installing",
|
|
925
926
|
});
|
|
926
927
|
await publish();
|
|
@@ -931,6 +932,7 @@ export async function tryOyster(args, effects = realEffects, ui = createTryCli(a
|
|
|
931
932
|
pending.set(name, {
|
|
932
933
|
installationId: name,
|
|
933
934
|
displayName: app.displayName,
|
|
935
|
+
appId: app.appId,
|
|
934
936
|
state: "failed",
|
|
935
937
|
reason: failureReason(settled.cause),
|
|
936
938
|
});
|
|
@@ -940,6 +942,7 @@ export async function tryOyster(args, effects = realEffects, ui = createTryCli(a
|
|
|
940
942
|
pending.set(name, {
|
|
941
943
|
installationId: name,
|
|
942
944
|
displayName: app.displayName,
|
|
945
|
+
appId: app.appId,
|
|
943
946
|
state: "needs-runtime",
|
|
944
947
|
});
|
|
945
948
|
ui.info(`${name} installed: needs a Computer runtime (see ${name})`);
|
|
@@ -961,6 +964,7 @@ export async function tryOyster(args, effects = realEffects, ui = createTryCli(a
|
|
|
961
964
|
pending.set(app.installationId, {
|
|
962
965
|
installationId: app.installationId,
|
|
963
966
|
displayName: app.displayName,
|
|
967
|
+
appId: app.appId,
|
|
964
968
|
state: "installing",
|
|
965
969
|
});
|
|
966
970
|
await publish();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/oyster",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.4",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Oyster by Fungi: open-source Apps for people and AI agents. Try with one command or run on your own Cloudflare account.",
|
|
6
6
|
"homepage": "https://docs.fungi.computer/oyster",
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
"@fungi.computer/burrow": "0.2.1",
|
|
345
345
|
"@fungi.computer/cairn": "0.1.0",
|
|
346
346
|
"@fungi.computer/capnweb": "0.12.0-fungi.0",
|
|
347
|
-
"@fungi.computer/caps": "0.10.
|
|
347
|
+
"@fungi.computer/caps": "0.10.6",
|
|
348
348
|
"@fungi.computer/carrier": "0.2.4",
|
|
349
349
|
"@fungi.computer/computer": "0.8.3",
|
|
350
350
|
"@fungi.computer/computer-contract": "0.1.0",
|
|
@@ -355,8 +355,8 @@
|
|
|
355
355
|
"@fungi.computer/knapsack": "0.4.9",
|
|
356
356
|
"@fungi.computer/lantern": "0.4.2",
|
|
357
357
|
"@fungi.computer/mycelium": "0.3.8",
|
|
358
|
-
"@fungi.computer/nacre": "0.4.
|
|
359
|
-
"@fungi.computer/parakeet": "0.11.
|
|
358
|
+
"@fungi.computer/nacre": "0.4.6",
|
|
359
|
+
"@fungi.computer/parakeet": "0.11.13",
|
|
360
360
|
"@fungi.computer/puffball": "0.5.5",
|
|
361
361
|
"@fungi.computer/seam": "0.2.5",
|
|
362
362
|
"@fungi.computer/shiitake": "0.13.0",
|