@fungi.computer/oyster 0.4.1 → 0.6.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.
Files changed (86) hide show
  1. package/README.md +46 -8
  2. package/dist/agents.d.ts +2 -1
  3. package/dist/agents.js +67 -8
  4. package/dist/apps/gate.d.ts +4 -0
  5. package/dist/apps/gate.js +3 -0
  6. package/dist/auth.d.ts +24 -1
  7. package/dist/auth.js +38 -0
  8. package/dist/boot-host-script.js +1 -1
  9. package/dist/build/candidate-cli.mjs +27 -5
  10. package/dist/channels/binding.d.ts +70 -0
  11. package/dist/channels/binding.js +97 -0
  12. package/dist/channels/conversations.d.ts +246 -0
  13. package/dist/channels/conversations.js +705 -0
  14. package/dist/channels/ids.d.ts +8 -0
  15. package/dist/channels/ids.js +15 -0
  16. package/dist/channels/visitor-channel.d.ts +53 -0
  17. package/dist/channels/visitor-channel.js +124 -0
  18. package/dist/channels/visitor-edge.d.ts +115 -0
  19. package/dist/channels/visitor-edge.js +582 -0
  20. package/dist/channels/visitor-request.d.ts +7 -0
  21. package/dist/channels/visitor-request.js +17 -0
  22. package/dist/channels/visitor-stream-slots.d.ts +2 -0
  23. package/dist/channels/visitor-stream-slots.js +33 -0
  24. package/dist/channels/visitors.d.ts +47 -0
  25. package/dist/channels/visitors.js +181 -0
  26. package/dist/cloudflare.d.ts +8 -2
  27. package/dist/cloudflare.js +27 -1
  28. package/dist/computer-target.d.ts +5 -0
  29. package/dist/computer-target.js +11 -0
  30. package/dist/host.d.ts +7 -4
  31. package/dist/host.js +96 -17
  32. package/dist/internal/host-gate.d.ts +6 -4
  33. package/dist/internal/host-gate.js +14 -7
  34. package/dist/invocation.d.ts +11 -4
  35. package/dist/invocation.js +134 -91
  36. package/dist/keys.d.ts +4 -1
  37. package/dist/keys.js +15 -4
  38. package/dist/machine-link/authority.d.ts +7 -0
  39. package/dist/machine-link/delivery.d.ts +12 -0
  40. package/dist/machine-link/delivery.js +22 -1
  41. package/dist/machine-link/disposition.d.ts +16 -0
  42. package/dist/machine-link/disposition.js +65 -0
  43. package/dist/machine-link/host.d.ts +11 -2
  44. package/dist/machine-link/host.js +125 -5
  45. package/dist/machine-link/link.d.ts +4 -0
  46. package/dist/machine-link/link.js +47 -1
  47. package/dist/page/capabilities.js +1 -1
  48. package/dist/page/child-selection.d.ts +27 -0
  49. package/dist/page/child-selection.js +38 -0
  50. package/dist/page/mount.js +1 -1
  51. package/dist/page-script.js +4 -4
  52. package/dist/release.d.ts +13 -0
  53. package/dist/release.js +10 -0
  54. package/dist/request-origin.d.ts +4 -0
  55. package/dist/request-origin.js +10 -0
  56. package/dist/standalone/agent-mail.js +4 -1
  57. package/dist/standalone/agents.d.ts +8 -0
  58. package/dist/standalone/agents.js +30 -11
  59. package/dist/standalone/channel-session-door.d.ts +4 -0
  60. package/dist/standalone/channel-session-door.js +72 -0
  61. package/dist/standalone/computer-fleet.js +7 -1
  62. package/dist/standalone/machine-link.d.ts +2 -0
  63. package/dist/standalone/machine-link.js +34 -1
  64. package/dist/standalone/tenancy.d.ts +3 -0
  65. package/dist/standalone/tenancy.js +7 -2
  66. package/dist/testing/capabilities.d.ts +2 -0
  67. package/dist/testing/capabilities.js +3 -1
  68. package/dist/turnstile.d.ts +27 -0
  69. package/dist/turnstile.js +51 -0
  70. package/dist/workers-git.js +21 -2
  71. package/dist/workers.d.ts +3 -0
  72. package/dist/workers.js +15 -12
  73. package/docs/api/agents.md +8 -4
  74. package/docs/api/apps.md +8 -4
  75. package/docs/api/auth.md +55 -0
  76. package/docs/api/browser.md +40 -16
  77. package/docs/api/build-contract.md +2 -2
  78. package/docs/api/cloudflare.md +26 -1
  79. package/docs/api/host.md +22 -13
  80. package/docs/api/invocation.md +7 -3
  81. package/docs/api/keys.md +25 -3
  82. package/docs/api/workers.md +38 -30
  83. package/docs/site/agent-quickstart.mdx +29 -2
  84. package/examples/standalone/wrangler.celld.jsonc +66 -0
  85. package/examples/standalone/wrangler.jsonc +3 -4
  86. package/package.json +53 -17
@@ -10,6 +10,33 @@ Run every command exactly as written, from the directory each step names.
10
10
  Compare its output with the expected output before you go on. When a step fails,
11
11
  read the "If it fails" notes under it before trying anything else.
12
12
 
13
+ Not sure Oyster fits the job?
14
+ [Is Oyster for you?](https://docs.fungi.computer/is-oyster-for-you/) compares it
15
+ with Cloudflare Workers Builds before you install anything.
16
+
17
+ ## Before you start
18
+
19
+ - **Cloudflare plan:** SQLite-backed Durable Objects are available on Workers
20
+ Free; they do not by themselves require Paid. Cloudflare's SQLite-backed
21
+ Durable Objects limits list 30 seconds of CPU per request by default,
22
+ configurable to 5 minutes. See Cloudflare's
23
+ [Durable Objects limits](https://developers.cloudflare.com/durable-objects/platform/limits/)
24
+ and
25
+ [Durable Objects pricing](https://developers.cloudflare.com/durable-objects/platform/pricing/).
26
+ - **Agent chat and AI Gateway:** By default, Agent chat uses the Workers AI
27
+ binding; it needs no separate provider key or Gateway setup. Prints uses your
28
+ account's default AI Gateway (created automatically); set `AI_GATEWAY_ID` to
29
+ use another. The routed models include `openai/gpt-image-2` and video IDs
30
+ `bytedance/seedance-2.0`, `bytedance/seedance-2.0-fast`,
31
+ `bytedance/seedance-2.0-mini`, `google/veo-3.1`, `google/veo-3.1-fast` and
32
+ `minimax/h3-max`.
33
+
34
+ - **Deployment plan:** Step 7 needs Workers Paid because this deployment uses
35
+ Containers for the Computer image; Cloudflare lists Containers as available on
36
+ the
37
+ [Workers Paid plan](https://developers.cloudflare.com/containers/platform/).
38
+ SQLite-backed Durable Objects alone do not require Paid.
39
+
13
40
  ## What Oyster is
14
41
 
15
42
  - Oyster hosts Apps on one Cloudflare Worker, or on celld, a Workers-compatible
@@ -280,8 +307,8 @@ If it fails:
280
307
 
281
308
  - `SESSION` is empty: the `initialize` call was refused. Check the key as in
282
309
  step 3.
283
- - Named keys for each agent (`POST /api/keys`) come with the Git worker in
284
- step 6. The plain standalone Worker answers `404` there.
310
+ - The copied Worker already includes `POST /api/keys`. Use the owner key to
311
+ create a separate key for each agent; no extra Worker is needed.
285
312
 
286
313
  ## 6. Add Git
287
314
 
@@ -0,0 +1,66 @@
1
+ {
2
+ // Copy beside this package's worker.ts into a celld project as wrangler.jsonc.
3
+ // Set OYSTER_ORIGIN to the public HTTPS origin and keep the owner key out of
4
+ // this file (.dev.vars for dev; --secret-name / --secrets-file for a fleet).
5
+ "name": "oyster",
6
+ "main": "worker.ts",
7
+ "compatibility_date": "2026-09-04",
8
+ "compatibility_flags": ["nodejs_compat"],
9
+ // The React build uses console.createTask() without this production define.
10
+ "define": { "process.env.NODE_ENV": "\"production\"" },
11
+ "workflows": [
12
+ {
13
+ "binding": "GRAPH_WORKFLOWS",
14
+ "name": "oyster-graphs",
15
+ "class_name": "StandaloneGraphWorkflow",
16
+ },
17
+ ],
18
+ "worker_loaders": [{ "binding": "LOADER" }],
19
+ // celld requires distinct bucket names (unlike the Cloudflare example, which
20
+ // uses oyster-releases for both); these are prefixes in the same fleet bucket.
21
+ "r2_buckets": [
22
+ { "binding": "RELEASES", "bucket_name": "oyster-releases" },
23
+ { "binding": "APP_ARTIFACTS", "bucket_name": "oyster-media" },
24
+ ],
25
+ "vars": {
26
+ "OYSTER_ORIGIN": "https://oyster.example",
27
+ "OYSTER_COMPUTER_ID": "workspace",
28
+ "OYSTER_HOME_INSTALLATION": "tourtois",
29
+ "OYSTER_OWNER_NAME": "owner",
30
+ },
31
+ "durable_objects": {
32
+ "bindings": [
33
+ { "name": "TENANTS", "class_name": "StandaloneTenants" },
34
+ { "name": "MCP", "class_name": "OysterMcp" },
35
+ { "name": "REGISTRY", "class_name": "OysterRegistry" },
36
+ { "name": "WORKFLOW_RUNS", "class_name": "StandaloneWorkflowRuns" },
37
+ { "name": "INSTANCES", "class_name": "StandaloneInstance" },
38
+ { "name": "COMPUTER", "class_name": "ComputerDO" },
39
+ { "name": "KEYS", "class_name": "OysterKeys" },
40
+ { "name": "WEBHOOKS", "class_name": "OysterWebhooks" },
41
+ { "name": "AGENTS", "class_name": "StandaloneAgent" },
42
+ { "name": "AGENT_DIRECTORY", "class_name": "AgentDirectory" },
43
+ { "name": "MACHINE_LINK", "class_name": "MachineLinkDO" },
44
+ { "name": "MEDIA_OPERATION", "class_name": "MediaOperationDO" },
45
+ ],
46
+ },
47
+ "migrations": [
48
+ {
49
+ "tag": "oyster-v1",
50
+ "new_sqlite_classes": [
51
+ "StandaloneTenants",
52
+ "OysterMcp",
53
+ "OysterRegistry",
54
+ "StandaloneWorkflowRuns",
55
+ "StandaloneInstance",
56
+ "ComputerDO",
57
+ "OysterKeys",
58
+ "OysterWebhooks",
59
+ "StandaloneAgent",
60
+ "AgentDirectory",
61
+ "MachineLinkDO",
62
+ "MediaOperationDO",
63
+ ],
64
+ },
65
+ ],
66
+ }
@@ -40,10 +40,9 @@
40
40
  "OYSTER_HOME_INSTALLATION": "tourtois",
41
41
  "OYSTER_ORIGIN": "https://oyster.example",
42
42
  "OYSTER_OWNER_NAME": "owner",
43
- // Names the AI Gateway that Prints' third-party models (GPT Image 2,
44
- // Seedance, Veo) and the background media retry owner route through.
45
- // Not a secret: Cloudflare creates the gateway by this id on first use.
46
- "AI_GATEWAY_ID": "oyster",
43
+ // Cloudflare creates the account's default AI Gateway on first use.
44
+ // Set another ID here to route Prints through a Gateway you configured.
45
+ "AI_GATEWAY_ID": "default",
47
46
  },
48
47
  "durable_objects": {
49
48
  "bindings": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/oyster",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Run your own Apps on Cloudflare Workers or celld: installable App Releases, each with its own Durable Object, SQLite database and declared bindings",
6
6
  "type": "module",
@@ -104,6 +104,38 @@
104
104
  "types": "./dist/event-recipients.d.ts",
105
105
  "import": "./dist/event-recipients.js"
106
106
  },
107
+ "./channels/ids": {
108
+ "types": "./dist/channels/ids.d.ts",
109
+ "import": "./dist/channels/ids.js"
110
+ },
111
+ "./channels/binding": {
112
+ "types": "./dist/channels/binding.d.ts",
113
+ "import": "./dist/channels/binding.js"
114
+ },
115
+ "./channels/visitors": {
116
+ "types": "./dist/channels/visitors.d.ts",
117
+ "import": "./dist/channels/visitors.js"
118
+ },
119
+ "./channels/visitor-request": {
120
+ "types": "./dist/channels/visitor-request.d.ts",
121
+ "import": "./dist/channels/visitor-request.js"
122
+ },
123
+ "./channels/visitor-stream-slots": {
124
+ "types": "./dist/channels/visitor-stream-slots.d.ts",
125
+ "import": "./dist/channels/visitor-stream-slots.js"
126
+ },
127
+ "./channels/visitor-channel": {
128
+ "types": "./dist/channels/visitor-channel.d.ts",
129
+ "import": "./dist/channels/visitor-channel.js"
130
+ },
131
+ "./channels/visitor-edge": {
132
+ "types": "./dist/channels/visitor-edge.d.ts",
133
+ "import": "./dist/channels/visitor-edge.js"
134
+ },
135
+ "./channels/conversations": {
136
+ "types": "./dist/channels/conversations.d.ts",
137
+ "import": "./dist/channels/conversations.js"
138
+ },
107
139
  "./app-storage": {
108
140
  "types": "./dist/app-storage.d.ts",
109
141
  "import": "./dist/app-storage.js"
@@ -220,6 +252,10 @@
220
252
  "types": "./dist/auth.d.ts",
221
253
  "import": "./dist/auth.js"
222
254
  },
255
+ "./turnstile": {
256
+ "types": "./dist/turnstile.d.ts",
257
+ "import": "./dist/turnstile.js"
258
+ },
223
259
  "./apps": {
224
260
  "types": "./dist/apps/index.d.ts",
225
261
  "import": "./dist/apps/index.js"
@@ -252,35 +288,35 @@
252
288
  "dependencies": {
253
289
  "@cfworker/json-schema": "4.1.1",
254
290
  "@earendil-works/pi-ai": "1.3.0",
255
- "@fungi.computer/agar": "0.3.1",
256
- "@fungi.computer/bird-dog": "0.2.0",
257
- "@fungi.computer/braid": "0.2.2",
291
+ "@fungi.computer/agar": "0.5.0",
292
+ "@fungi.computer/bird-dog": "0.3.0",
293
+ "@fungi.computer/braid": "0.2.4",
258
294
  "@fungi.computer/burrow": "0.1.0",
259
295
  "@fungi.computer/cairn": "0.1.0",
260
296
  "@fungi.computer/capnweb": "0.12.0",
261
- "@fungi.computer/caps": "0.3.0",
297
+ "@fungi.computer/caps": "0.4.0",
262
298
  "@fungi.computer/carrier": "0.2.0",
263
- "@fungi.computer/computer": "0.3.0",
264
- "@fungi.computer/computer-contract": "0.0.3",
265
- "@fungi.computer/darkroom": "0.2.1",
299
+ "@fungi.computer/computer": "0.3.2",
300
+ "@fungi.computer/computer-contract": "0.0.5",
301
+ "@fungi.computer/darkroom": "0.3.1",
266
302
  "@fungi.computer/ear-tag": "0.1.0",
267
303
  "@fungi.computer/forage": "0.2.0",
268
304
  "@fungi.computer/gills": "0.2.0",
269
- "@fungi.computer/knapsack": "0.3.0",
270
- "@fungi.computer/mycelium": "0.2.2",
271
- "@fungi.computer/nacre": "0.0.2",
305
+ "@fungi.computer/knapsack": "0.4.0",
306
+ "@fungi.computer/mycelium": "0.2.3",
307
+ "@fungi.computer/nacre": "0.1.0",
272
308
  "@fungi.computer/puffball": "0.2.0",
273
309
  "@fungi.computer/seam": "0.2.0",
274
- "@fungi.computer/shiitake": "0.4.0",
275
- "@fungi.computer/shiitake-extensions": "0.2.0",
310
+ "@fungi.computer/shiitake": "0.6.0",
311
+ "@fungi.computer/shiitake-extensions": "0.4.0",
276
312
  "@fungi.computer/sigils": "0.2.0",
277
313
  "@fungi.computer/sprite": "0.2.0",
278
314
  "@fungi.computer/sprite-zdog": "0.2.0",
279
- "@fungi.computer/veil": "0.2.0",
315
+ "@fungi.computer/veil": "0.2.1",
280
316
  "@fungi.computer/watchdog": "0.1.0",
281
- "@fungi.computer/whistle": "0.1.0",
282
- "@fungi.computer/workflows-wire": "0.2.2",
283
- "@fungi.computer/zookeeper": "0.0.3",
317
+ "@fungi.computer/whistle": "0.3.0",
318
+ "@fungi.computer/workflows-wire": "0.2.4",
319
+ "@fungi.computer/zookeeper": "0.0.5",
284
320
  "@modelcontextprotocol/server": "2.0.0",
285
321
  "@pnpm/lockfile.fs": "1100.2.13",
286
322
  "@pnpm/lockfile.pruner": "1100.0.27",