@fungi.computer/oyster 0.25.0 → 0.27.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/dist/agents.d.ts +24 -8
- package/dist/agents.js +12 -5
- package/dist/app-builds.d.ts +4 -2
- package/dist/app-builds.js +14 -0
- package/dist/apps/catalog.js +1 -1
- package/dist/boot-host-script.js +1 -1
- package/dist/build/build-memory.d.ts +13 -0
- package/dist/build/build-memory.js +29 -0
- package/dist/build/candidate-cli.mjs +25 -2
- package/dist/build/local-build.js +4 -5
- package/dist/cloudflare.d.ts +2 -2
- package/dist/cloudflare.js +3 -0
- package/dist/computer-control-port.d.ts +2 -0
- package/dist/embed-metafiles.js +2 -2
- package/dist/embed-scripts.js +1 -1
- package/dist/hello-app-script.js +1 -1
- package/dist/mcp.d.ts +26 -0
- package/dist/mcp.js +12 -2
- package/dist/media.d.ts +5 -0
- package/dist/media.js +1 -0
- package/dist/page-script.js +2 -2
- package/dist/release.d.ts +5 -0
- package/dist/standalone/agent-computers.js +17 -1
- package/dist/standalone/agents.d.ts +16 -8
- package/dist/standalone/agents.js +88 -25
- package/dist/standalone/app-set.d.ts +11 -3
- package/dist/standalone/app-set.js +26 -8
- package/dist/standalone/computer-control.js +7 -1
- package/dist/standalone/computer-fleet.d.ts +6 -0
- package/dist/standalone/computer-fleet.js +9 -1
- package/dist/standalone/computer-skill-source.d.ts +20 -0
- package/dist/standalone/computer-skill-source.js +165 -0
- package/dist/standalone/computer.d.ts +30 -4
- package/dist/standalone/computer.js +60 -3
- package/dist/standalone/install-apps-cli.js +9 -3
- package/dist/standalone/media.d.ts +9 -4
- package/dist/standalone/media.js +76 -7
- package/dist/standalone/registry.d.ts +8 -1
- package/dist/standalone/registry.js +10 -1
- package/docs/api/agents.md +204 -214
- package/docs/api/apps.md +33 -33
- package/docs/api/cloudflare.md +4 -1
- package/docs/api/mcp.md +52 -46
- package/docs/api/media.md +4 -0
- package/docs/api/workers-git.md +7 -7
- package/examples/standalone/wrangler.jsonc +3 -0
- package/package.json +19 -23
- package/dist/agent-instructions.d.ts +0 -35
- package/dist/agent-instructions.js +0 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/oyster",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
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",
|
|
@@ -142,10 +142,6 @@
|
|
|
142
142
|
"types": "./dist/event-recipients.d.ts",
|
|
143
143
|
"import": "./dist/event-recipients.js"
|
|
144
144
|
},
|
|
145
|
-
"./agent-instructions": {
|
|
146
|
-
"types": "./dist/agent-instructions.d.ts",
|
|
147
|
-
"import": "./dist/agent-instructions.js"
|
|
148
|
-
},
|
|
149
145
|
"./channels/ids": {
|
|
150
146
|
"types": "./dist/channels/ids.d.ts",
|
|
151
147
|
"import": "./dist/channels/ids.js"
|
|
@@ -346,37 +342,37 @@
|
|
|
346
342
|
"dependencies": {
|
|
347
343
|
"@cfworker/json-schema": "4.1.1",
|
|
348
344
|
"@earendil-works/pi-ai": "1.3.0",
|
|
349
|
-
"@fungi.computer/agar": "0.
|
|
345
|
+
"@fungi.computer/agar": "0.13.0",
|
|
350
346
|
"@fungi.computer/bird-dog": "0.3.6",
|
|
351
|
-
"@fungi.computer/braid": "0.4.
|
|
347
|
+
"@fungi.computer/braid": "0.4.14",
|
|
352
348
|
"@fungi.computer/burrow": "0.2.1",
|
|
353
349
|
"@fungi.computer/cairn": "0.1.0",
|
|
354
350
|
"@fungi.computer/capnweb": "0.12.0-fungi.0",
|
|
355
|
-
"@fungi.computer/caps": "0.11.
|
|
351
|
+
"@fungi.computer/caps": "0.11.4",
|
|
356
352
|
"@fungi.computer/carrier": "0.2.4",
|
|
357
|
-
"@fungi.computer/computer": "0.
|
|
358
|
-
"@fungi.computer/computer-contract": "0.
|
|
359
|
-
"@fungi.computer/darkroom": "0.
|
|
353
|
+
"@fungi.computer/computer": "0.12.0",
|
|
354
|
+
"@fungi.computer/computer-contract": "0.4.0",
|
|
355
|
+
"@fungi.computer/darkroom": "0.7.0",
|
|
360
356
|
"@fungi.computer/ear-tag": "0.1.0",
|
|
361
|
-
"@fungi.computer/forage": "0.3.
|
|
357
|
+
"@fungi.computer/forage": "0.3.8",
|
|
362
358
|
"@fungi.computer/gills": "0.3.0",
|
|
363
|
-
"@fungi.computer/knapsack": "0.4.
|
|
359
|
+
"@fungi.computer/knapsack": "0.4.12",
|
|
364
360
|
"@fungi.computer/lantern": "0.4.2",
|
|
365
|
-
"@fungi.computer/mycelium": "0.3.
|
|
366
|
-
"@fungi.computer/nacre": "0.
|
|
367
|
-
"@fungi.computer/parakeet": "0.11.
|
|
368
|
-
"@fungi.computer/puffball": "0.
|
|
361
|
+
"@fungi.computer/mycelium": "0.3.11",
|
|
362
|
+
"@fungi.computer/nacre": "0.6.1",
|
|
363
|
+
"@fungi.computer/parakeet": "0.11.26",
|
|
364
|
+
"@fungi.computer/puffball": "0.8.0",
|
|
369
365
|
"@fungi.computer/seam": "0.2.5",
|
|
370
|
-
"@fungi.computer/shiitake": "0.
|
|
371
|
-
"@fungi.computer/shiitake-extensions": "0.
|
|
372
|
-
"@fungi.computer/sigils": "0.3.
|
|
366
|
+
"@fungi.computer/shiitake": "0.16.0",
|
|
367
|
+
"@fungi.computer/shiitake-extensions": "0.9.0",
|
|
368
|
+
"@fungi.computer/sigils": "0.3.2",
|
|
373
369
|
"@fungi.computer/sprite": "0.2.2",
|
|
374
370
|
"@fungi.computer/sprite-zdog": "0.3.2",
|
|
375
|
-
"@fungi.computer/veil": "0.7.
|
|
371
|
+
"@fungi.computer/veil": "0.7.3",
|
|
376
372
|
"@fungi.computer/watchdog": "0.1.3",
|
|
377
373
|
"@fungi.computer/whistle": "0.3.0",
|
|
378
|
-
"@fungi.computer/workflows-wire": "0.4.
|
|
379
|
-
"@fungi.computer/zookeeper": "0.0.
|
|
374
|
+
"@fungi.computer/workflows-wire": "0.4.14",
|
|
375
|
+
"@fungi.computer/zookeeper": "0.0.25",
|
|
380
376
|
"@modelcontextprotocol/server": "2.0.0",
|
|
381
377
|
"@pnpm/lockfile.fs": "1100.2.13",
|
|
382
378
|
"@pnpm/lockfile.pruner": "1100.0.27",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* The standing instructions an owner gave one Agent. They live in the Agent's
|
|
4
|
-
* own store, so every turn reads them where it runs. The owner's text is
|
|
5
|
-
* appended after Oyster's fixed instructions and never replaces them.
|
|
6
|
-
*/
|
|
7
|
-
/** The SQL an Agent's own store offers: the one statement call both hosts share. */
|
|
8
|
-
export type InstructionsSql = Readonly<{
|
|
9
|
-
exec: (statement: string, ...bindings: (ArrayBuffer | string | number | null)[]) => Readonly<{
|
|
10
|
-
toArray: () => readonly unknown[];
|
|
11
|
-
}>;
|
|
12
|
-
}>;
|
|
13
|
-
declare const storedRow: z.ZodObject<{
|
|
14
|
-
instructions: z.ZodString;
|
|
15
|
-
version: z.ZodNumber;
|
|
16
|
-
}, z.core.$strict>;
|
|
17
|
-
/** What the owner wrote, and which edit of it this is; 0 means never written. */
|
|
18
|
-
export type StoredAgentInstructions = z.infer<typeof storedRow>;
|
|
19
|
-
/** Open the Agent's one instructions row in its own SQLite. */
|
|
20
|
-
export declare function createAgentInstructions(sql: InstructionsSql): {
|
|
21
|
-
read(): StoredAgentInstructions;
|
|
22
|
-
/** Replace the text, one version up; empty text clears it. */
|
|
23
|
-
write(instructions: string): StoredAgentInstructions;
|
|
24
|
-
};
|
|
25
|
-
/** One turn's instructions: a revision that names them, and their text. */
|
|
26
|
-
export type LoadedInstructions = Readonly<{
|
|
27
|
-
revision: string;
|
|
28
|
-
text: string;
|
|
29
|
-
}>;
|
|
30
|
-
/**
|
|
31
|
-
* The fixed instructions, then the owner's after them. A revision names both,
|
|
32
|
-
* so an edit is seen by the next turn and by nothing already running.
|
|
33
|
-
*/
|
|
34
|
-
export declare function withOwnerInstructions(fixed: LoadedInstructions, owner: StoredAgentInstructions): LoadedInstructions;
|
|
35
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { appAgentInstructionsMaxLength } from "@fungi.computer/agar";
|
|
3
|
-
const storedRow = z.strictObject({
|
|
4
|
-
instructions: z.string().max(appAgentInstructionsMaxLength),
|
|
5
|
-
version: z.number().int().nonnegative(),
|
|
6
|
-
});
|
|
7
|
-
/** Open the Agent's one instructions row in its own SQLite. */
|
|
8
|
-
export function createAgentInstructions(sql) {
|
|
9
|
-
sql.exec("CREATE TABLE IF NOT EXISTS agent_instructions (id INTEGER PRIMARY KEY CHECK (id = 1), instructions TEXT NOT NULL, version INTEGER NOT NULL) STRICT");
|
|
10
|
-
return {
|
|
11
|
-
read() {
|
|
12
|
-
const row = sql
|
|
13
|
-
.exec("SELECT instructions, version FROM agent_instructions")
|
|
14
|
-
.toArray()[0];
|
|
15
|
-
return row === undefined
|
|
16
|
-
? { instructions: "", version: 0 }
|
|
17
|
-
: storedRow.parse(row);
|
|
18
|
-
},
|
|
19
|
-
/** Replace the text, one version up; empty text clears it. */
|
|
20
|
-
write(instructions) {
|
|
21
|
-
const checked = z
|
|
22
|
-
.string()
|
|
23
|
-
.max(appAgentInstructionsMaxLength)
|
|
24
|
-
.parse(instructions);
|
|
25
|
-
sql.exec("INSERT INTO agent_instructions(id, instructions, version) VALUES(1, ?, 1) ON CONFLICT(id) DO UPDATE SET instructions = excluded.instructions, version = version + 1", checked);
|
|
26
|
-
return this.read();
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The fixed instructions, then the owner's after them. A revision names both,
|
|
32
|
-
* so an edit is seen by the next turn and by nothing already running.
|
|
33
|
-
*/
|
|
34
|
-
export function withOwnerInstructions(fixed, owner) {
|
|
35
|
-
const text = owner.instructions.trim();
|
|
36
|
-
if (text.length === 0)
|
|
37
|
-
return fixed;
|
|
38
|
-
return {
|
|
39
|
-
revision: `${fixed.revision}+owner-${String(owner.version)}`,
|
|
40
|
-
text: `${fixed.text}\n\nYour owner's standing instructions. Follow them on every turn, within the rules above:\n${text}`,
|
|
41
|
-
};
|
|
42
|
-
}
|