@fungi.computer/oyster 0.0.1 → 0.2.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 (195) hide show
  1. package/README.md +228 -176
  2. package/dist/agent-avatars.d.ts +103 -0
  3. package/dist/agent-avatars.js +66 -0
  4. package/dist/agents.d.ts +12 -2
  5. package/dist/agents.js +39 -2
  6. package/dist/app-builds.d.ts +76 -17
  7. package/dist/app-builds.js +207 -63
  8. package/dist/app-sources.d.ts +7 -22
  9. package/dist/app-sources.js +49 -14
  10. package/dist/apps/gate.d.ts +7 -7
  11. package/dist/apps/gate.js +6 -6
  12. package/dist/apps/installation.d.ts +35 -35
  13. package/dist/apps/installation.js +20 -19
  14. package/dist/build/artifact-writer.d.ts +40 -0
  15. package/dist/build/artifact-writer.js +181 -0
  16. package/dist/build/build-jobs.js +7 -1
  17. package/dist/build/build-policy.d.ts +10 -0
  18. package/dist/build/build-policy.js +10 -0
  19. package/dist/build/build-step.d.ts +12 -1
  20. package/dist/build/build-step.js +9 -1
  21. package/dist/build/candidate-builder.d.ts +68 -0
  22. package/dist/build/candidate-builder.js +91 -0
  23. package/dist/build/candidate-cli.d.ts +1 -0
  24. package/dist/build/candidate-cli.js +119 -0
  25. package/dist/build/candidate-cli.mjs +28220 -0
  26. package/dist/build/content-objects.d.ts +37 -0
  27. package/dist/build/content-objects.js +53 -0
  28. package/dist/build/effect.d.ts +18 -0
  29. package/dist/build/effect.js +52 -12
  30. package/dist/build/git-environment.d.ts +3 -0
  31. package/dist/build/git-environment.js +21 -9
  32. package/dist/build/local-build.d.ts +13 -3
  33. package/dist/build/local-build.js +149 -99
  34. package/dist/build/snapshot-package-store.d.ts +10 -0
  35. package/dist/build/snapshot-package-store.js +15 -0
  36. package/dist/build/snapshot-program-scripts.js +1 -1
  37. package/dist/build/snapshot-programs/snapshot-path.d.ts +2 -0
  38. package/dist/build/snapshot-programs/snapshot-path.js +6 -0
  39. package/dist/build/submission-contract.d.ts +461 -17
  40. package/dist/build/submission-contract.js +136 -26
  41. package/dist/build/workspace-build.d.ts +7 -2
  42. package/dist/build/workspace-build.js +55 -11
  43. package/dist/build-contract.d.ts +3 -0
  44. package/dist/build-contract.js +3 -0
  45. package/dist/build-egress.d.ts +62 -0
  46. package/dist/build-egress.js +148 -0
  47. package/dist/build.d.ts +1 -0
  48. package/dist/build.js +1 -0
  49. package/dist/cloudflare.js +4 -4
  50. package/dist/frame-binding-wire-script.js +1 -1
  51. package/dist/frame-binding-wire.d.ts +1 -1
  52. package/dist/frame-binding-wire.js +1 -1
  53. package/dist/git-journal.js +4 -4
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +1 -0
  56. package/dist/installation-consent.d.ts +3 -1
  57. package/dist/installation-consent.js +2 -0
  58. package/dist/mcp-owner.js +20 -8
  59. package/dist/pack.d.ts +6 -3
  60. package/dist/pack.js +28 -11
  61. package/dist/page/gill-observation.d.ts +4 -0
  62. package/dist/page/gill-observation.js +31 -0
  63. package/dist/page/mount.d.ts +4 -8
  64. package/dist/page/window-launch.d.ts +18 -0
  65. package/dist/page/window-launch.js +11 -0
  66. package/dist/page-script.js +4 -4
  67. package/dist/release.d.ts +11 -0
  68. package/dist/release.js +4 -1
  69. package/dist/shell/app-directory.d.ts +50 -45
  70. package/dist/shell/app-directory.js +19 -18
  71. package/dist/shell/shell-module.d.ts +26 -2
  72. package/dist/shell/shell-module.js +51 -2
  73. package/dist/shell/window-manager.d.ts +5 -1
  74. package/dist/shell/window-manager.js +21 -2
  75. package/dist/shell/workbench-directory.d.ts +332 -0
  76. package/dist/shell/workbench-directory.js +35 -0
  77. package/dist/shell/workbench-host-types.d.ts +1 -1
  78. package/dist/shell/workbench-host.js +5 -0
  79. package/dist/shell/workbench-model.d.ts +3 -1
  80. package/dist/source/index.d.ts +6 -7
  81. package/dist/source/index.js +6 -7
  82. package/dist/source/template-push.d.ts +33 -0
  83. package/dist/source/template-push.js +223 -0
  84. package/dist/source/template-repository.d.ts +2 -0
  85. package/dist/source/template-repository.js +13 -0
  86. package/dist/source/{template-write.d.ts → template-seed.d.ts} +19 -20
  87. package/dist/source/template-seed.js +80 -0
  88. package/dist/standalone/agent-directory.d.ts +4 -0
  89. package/dist/standalone/agent-directory.js +4 -0
  90. package/dist/standalone/agents.d.ts +227 -0
  91. package/dist/standalone/agents.js +834 -0
  92. package/dist/standalone/app-builds-binding.d.ts +36 -0
  93. package/dist/standalone/app-builds-binding.js +119 -0
  94. package/dist/standalone/app-set.d.ts +91 -0
  95. package/dist/standalone/app-set.js +395 -0
  96. package/dist/standalone/app-source.d.ts +41 -0
  97. package/dist/standalone/app-source.js +59 -0
  98. package/dist/standalone/builds.d.ts +18 -0
  99. package/dist/standalone/builds.js +101 -0
  100. package/dist/standalone/computer-egress.d.ts +37 -0
  101. package/dist/standalone/computer-egress.js +111 -0
  102. package/dist/standalone/computer.d.ts +122 -0
  103. package/dist/standalone/computer.js +714 -0
  104. package/dist/standalone/install-apps-cli.d.ts +2 -0
  105. package/dist/standalone/install-apps-cli.js +126 -0
  106. package/dist/standalone/instance.d.ts +35 -0
  107. package/dist/standalone/instance.js +74 -0
  108. package/dist/standalone/media.d.ts +76 -0
  109. package/dist/standalone/media.js +227 -0
  110. package/dist/standalone/preview.d.ts +51 -0
  111. package/dist/standalone/preview.js +167 -0
  112. package/dist/standalone/registry.d.ts +102 -0
  113. package/dist/standalone/registry.js +193 -0
  114. package/dist/standalone/tenancy.d.ts +42 -0
  115. package/dist/standalone/tenancy.js +241 -0
  116. package/dist/standalone/worker.d.ts +55 -0
  117. package/dist/standalone/worker.js +147 -0
  118. package/dist/standalone/workflow-authority-readers.d.ts +16 -0
  119. package/dist/standalone/workflow-authority-readers.js +35 -0
  120. package/dist/standalone/workflow-binding.d.ts +216 -0
  121. package/dist/standalone/workflow-binding.js +217 -0
  122. package/dist/standalone/workflow-events.d.ts +46 -0
  123. package/dist/standalone/workflow-events.js +39 -0
  124. package/dist/standalone/workflow-git-capture.d.ts +7 -0
  125. package/dist/standalone/workflow-git-capture.js +62 -0
  126. package/dist/standalone/workflow-host.d.ts +955 -0
  127. package/dist/standalone/workflow-host.js +778 -0
  128. package/dist/standalone/workflow-node-capture.d.ts +13 -0
  129. package/dist/standalone/workflow-node-capture.js +72 -0
  130. package/dist/standalone/workflow-root-authority.d.ts +27 -0
  131. package/dist/standalone/workflow-root-authority.js +87 -0
  132. package/dist/standalone/workflow-schedules.d.ts +52 -0
  133. package/dist/standalone/workflow-schedules.js +40 -0
  134. package/dist/standalone/workflow-trigger-host.d.ts +1716 -0
  135. package/dist/standalone/workflow-trigger-host.js +52 -0
  136. package/dist/standalone/workflows.d.ts +713 -0
  137. package/dist/standalone/workflows.js +554 -0
  138. package/dist/tenancy/auth0.d.ts +64 -0
  139. package/dist/tenancy/auth0.js +198 -0
  140. package/dist/tenancy/cloudflare/rate-limit.d.ts +8 -0
  141. package/dist/tenancy/cloudflare/rate-limit.js +19 -0
  142. package/dist/tenancy/cloudflare/registry.d.ts +50 -0
  143. package/dist/tenancy/cloudflare/registry.js +301 -0
  144. package/dist/tenancy/cloudflare.d.ts +2 -0
  145. package/dist/tenancy/cloudflare.js +2 -0
  146. package/dist/tenancy/cold-directory.d.ts +13 -0
  147. package/dist/tenancy/cold-directory.js +43 -0
  148. package/dist/tenancy/contracts.d.ts +195 -0
  149. package/dist/tenancy/contracts.js +1 -0
  150. package/dist/tenancy/index.d.ts +19 -0
  151. package/dist/tenancy/index.js +156 -0
  152. package/dist/tenancy/owner-key.d.ts +26 -0
  153. package/dist/tenancy/owner-key.js +63 -0
  154. package/dist/tenancy/oyster.d.ts +4 -0
  155. package/dist/tenancy/oyster.js +25 -0
  156. package/dist/tenancy/registry-record.d.ts +7 -0
  157. package/dist/tenancy/registry-record.js +44 -0
  158. package/dist/tenancy/registry.d.ts +27 -0
  159. package/dist/tenancy/registry.js +138 -0
  160. package/dist/tenancy/resolve.d.ts +7 -0
  161. package/dist/tenancy/resolve.js +64 -0
  162. package/dist/workers-git.js +1 -4
  163. package/dist/workers.d.ts +2 -2
  164. package/dist/workers.js +3 -1
  165. package/docs/api/build-contract.md +829 -32
  166. package/docs/api/build.md +253 -17
  167. package/docs/api/modules.md +40 -32
  168. package/docs/api/pack.md +6 -3
  169. package/docs/api/shell/app-directory.md +267 -0
  170. package/docs/api/shell/shell-module.md +64 -3
  171. package/docs/api/shell/workbench-directory.md +119 -0
  172. package/docs/api/shell/workbench.md +19 -0
  173. package/docs/api/shell.md +127 -0
  174. package/docs/api/tenancy/auth0.md +110 -0
  175. package/docs/api/tenancy/cloudflare.md +221 -0
  176. package/docs/api/tenancy/cold-directory.md +46 -0
  177. package/docs/api/tenancy/owner-key.md +63 -0
  178. package/docs/api/tenancy/registry.md +77 -0
  179. package/docs/api/tenancy/resolve.md +69 -0
  180. package/docs/api/tenancy.md +430 -0
  181. package/docs/api/workers-git.md +140 -21
  182. package/docs/api/workers.md +15 -2
  183. package/docs/site/agent-quickstart.mdx +52 -55
  184. package/examples/standalone/worker.ts +7 -14
  185. package/examples/standalone/wrangler.jsonc +67 -6
  186. package/package.json +78 -25
  187. package/dist/build/r2-artifact-writer.d.ts +0 -31
  188. package/dist/build/r2-artifact-writer.js +0 -179
  189. package/dist/source/template-write.js +0 -344
  190. package/docs/media/architecture.mmd +0 -32
  191. package/docs/media/architecture.png +0 -0
  192. package/docs/media/bonsai-network.png +0 -0
  193. package/docs/media/bonsai-repository.png +0 -0
  194. package/examples/git/worker.ts +0 -39
  195. package/examples/git/wrangler.jsonc +0 -32
@@ -8,35 +8,43 @@
8
8
 
9
9
  ## Modules
10
10
 
11
- | Module | Description |
12
- | ----------------------------------------------- | ----------- |
13
- | [agents](agents.md) | - |
14
- | [app-storage](app-storage.md) | - |
15
- | [apps](apps.md) | - |
16
- | [auth](auth.md) | - |
17
- | [build-contract](build-contract.md) | - |
18
- | [build](build.md) | - |
19
- | [cloudflare](cloudflare.md) | - |
20
- | [computer](computer.md) | - |
21
- | [files](files.md) | - |
22
- | [git](git.md) | - |
23
- | [host](host.md) | - |
24
- | [index](index.md) | - |
25
- | [invocation](invocation.md) | - |
26
- | [keys](keys.md) | - |
27
- | [mcp](mcp.md) | - |
28
- | [media](media.md) | - |
29
- | [pack](pack.md) | - |
30
- | [page/mount](page/mount.md) | - |
31
- | [root-data](root-data.md) | - |
32
- | [shell/app-directory](shell/app-directory.md) | - |
33
- | [shell/command-host](shell/command-host.md) | - |
34
- | [shell/commands](shell/commands.md) | - |
35
- | [shell](shell.md) | - |
36
- | [shell/keys](shell/keys.md) | - |
37
- | [shell/shell-module](shell/shell-module.md) | - |
38
- | [shell/window-manager](shell/window-manager.md) | - |
39
- | [shell/workbench](shell/workbench.md) | - |
40
- | [tenant](tenant.md) | - |
41
- | [workers-git](workers-git.md) | - |
42
- | [workers](workers.md) | - |
11
+ | Module | Description |
12
+ | --------------------------------------------------------- | ----------- |
13
+ | [agents](agents.md) | - |
14
+ | [app-storage](app-storage.md) | - |
15
+ | [apps](apps.md) | - |
16
+ | [auth](auth.md) | - |
17
+ | [build-contract](build-contract.md) | - |
18
+ | [build](build.md) | - |
19
+ | [cloudflare](cloudflare.md) | - |
20
+ | [computer](computer.md) | - |
21
+ | [files](files.md) | - |
22
+ | [git](git.md) | - |
23
+ | [host](host.md) | - |
24
+ | [index](index.md) | - |
25
+ | [invocation](invocation.md) | - |
26
+ | [keys](keys.md) | - |
27
+ | [mcp](mcp.md) | - |
28
+ | [media](media.md) | - |
29
+ | [pack](pack.md) | - |
30
+ | [page/mount](page/mount.md) | - |
31
+ | [root-data](root-data.md) | - |
32
+ | [shell/app-directory](shell/app-directory.md) | - |
33
+ | [shell/command-host](shell/command-host.md) | - |
34
+ | [shell/commands](shell/commands.md) | - |
35
+ | [shell](shell.md) | - |
36
+ | [shell/keys](shell/keys.md) | - |
37
+ | [shell/shell-module](shell/shell-module.md) | - |
38
+ | [shell/window-manager](shell/window-manager.md) | - |
39
+ | [shell/workbench-directory](shell/workbench-directory.md) | - |
40
+ | [shell/workbench](shell/workbench.md) | - |
41
+ | [tenancy/auth0](tenancy/auth0.md) | - |
42
+ | [tenancy/cloudflare](tenancy/cloudflare.md) | - |
43
+ | [tenancy/cold-directory](tenancy/cold-directory.md) | - |
44
+ | [tenancy](tenancy.md) | - |
45
+ | [tenancy/owner-key](tenancy/owner-key.md) | - |
46
+ | [tenancy/registry](tenancy/registry.md) | - |
47
+ | [tenancy/resolve](tenancy/resolve.md) | - |
48
+ | [tenant](tenant.md) | - |
49
+ | [workers-git](workers-git.md) | - |
50
+ | [workers](workers.md) | - |
package/docs/api/pack.md CHANGED
@@ -123,9 +123,12 @@ its state; both go through its one install-or-select owner.
123
123
  function publishSource(input): Promise<Response>;
124
124
  ```
125
125
 
126
- Project one exact first-party commit's editable source and seed it into an
127
- Oyster's own template, so `APPS.fork` can later fork it. The operator owner key
128
- authenticates; no provider credential ever leaves this call.
126
+ Project one exact first-party commit's editable source, `git push` it to an
127
+ Oyster's own template for that App, and claim the pushed head, so `APPS.fork`
128
+ and Computer builds can later read it. The operator owner key authenticates
129
+ both; it reaches Git only through its config environment and no provider
130
+ credential ever leaves the Oyster. Answers the claim response:
131
+ `{ kind: "recorded" | "existing", receipt }` on success.
129
132
 
130
133
  #### Parameters
131
134
 
@@ -55,6 +55,73 @@ An App directory row before host-specific permissions are attached.
55
55
 
56
56
  ---
57
57
 
58
+ ### AppComputerOperation
59
+
60
+ ```ts
61
+ type AppComputerOperation = Extract<
62
+ z.output<typeof appComputerPermissionSchema>,
63
+ {
64
+ kind: "all-team-computers";
65
+ }
66
+ >["operations"][number];
67
+ ```
68
+
69
+ One operation an App may request for a Computer.
70
+
71
+ ---
72
+
73
+ ### AppComputerPermission
74
+
75
+ ```ts
76
+ type AppComputerPermission = z.output<typeof appComputerPermissionSchema>;
77
+ ```
78
+
79
+ Decoded Computer permission scope attached to an App directory entry.
80
+
81
+ ---
82
+
83
+ ### AppAgentPermission
84
+
85
+ ```ts
86
+ type AppAgentPermission = z.output<typeof appAgentPermissionSchema>;
87
+ ```
88
+
89
+ Decoded Agent permission scope attached to an App directory entry.
90
+
91
+ ---
92
+
93
+ ### AppGenerationPermissions
94
+
95
+ ```ts
96
+ type AppGenerationPermissions = z.output<typeof appGenerationPermissionsSchema>;
97
+ ```
98
+
99
+ Decoded generation permissions attached to an App directory entry.
100
+
101
+ ---
102
+
103
+ ### AppMarketplacePermissions
104
+
105
+ ```ts
106
+ type AppMarketplacePermissions = z.output<
107
+ typeof appMarketplacePermissionsSchema
108
+ >;
109
+ ```
110
+
111
+ Decoded marketplace permissions attached to an App directory entry.
112
+
113
+ ---
114
+
115
+ ### AppDirectory
116
+
117
+ ```ts
118
+ type AppDirectory = z.output<typeof appDirectoryResponseSchema>;
119
+ ```
120
+
121
+ The host-resolved Team App directory and its permission projections.
122
+
123
+ ---
124
+
58
125
  ### AppCatalog
59
126
 
60
127
  ```ts
@@ -220,6 +287,206 @@ A host-resolved role selection; a surface address is not launch authority.
220
287
 
221
288
  ---
222
289
 
290
+ ### appComputerPermissionSchema
291
+
292
+ ```ts
293
+ const appComputerPermissionSchema: ZodDiscriminatedUnion<[ZodObject<{
294
+ kind: ZodLiteral<"selected-computers">;
295
+ computers: ZodArray<ZodObject<{
296
+ computerId: ZodString;
297
+ operations: ZodArray<ZodEnum<{
298
+ computer.list: "computer.list";
299
+ computer.readFile: "computer.readFile";
300
+ computer.writeFile: "computer.writeFile";
301
+ computer.execute: "computer.execute";
302
+ }>>;
303
+ }, $strict>>;
304
+ }, $strict>, ZodObject<{
305
+ kind: ZodLiteral<"all-team-computers">;
306
+ operations: ZodArray<ZodEnum<{
307
+ computer.list: "computer.list";
308
+ computer.readFile: "computer.readFile";
309
+ computer.writeFile: "computer.writeFile";
310
+ computer.execute: "computer.execute";
311
+ }>>;
312
+ }, $strict>], "kind">;
313
+ ```
314
+
315
+ App Computer permissions limited to selected Computers or the Team's Computers.
316
+
317
+ ---
318
+
319
+ ### appAgentPermissionSchema
320
+
321
+ ```ts
322
+ const appAgentPermissionSchema: ZodDiscriminatedUnion<[ZodObject<{
323
+ kind: ZodLiteral<"all-team-agents">;
324
+ directoryOperations: ZodArray<ZodEnum<{
325
+ agent.list: "agent.list";
326
+ }>>;
327
+ sessionOperations: ZodArray<ZodEnum<{
328
+ agent.manage: "agent.manage";
329
+ agent.read: "agent.read";
330
+ agent.send: "agent.send";
331
+ }>>;
332
+ }, $strict>, ZodObject<{
333
+ kind: ZodLiteral<"selected-agents">;
334
+ directoryOperations: ZodArray<ZodEnum<{
335
+ agent.list: "agent.list";
336
+ }>>;
337
+ agents: ZodArray<ZodObject<{
338
+ agentId: ZodString;
339
+ sessionOperations: ZodArray<ZodEnum<{
340
+ agent.manage: "agent.manage";
341
+ agent.read: "agent.read";
342
+ agent.send: "agent.send";
343
+ }>>;
344
+ }, $strict>>;
345
+ }, $strict>], "kind">;
346
+ ```
347
+
348
+ Agent directory and session operations an App may request from its host.
349
+
350
+ ---
351
+
352
+ ### appGenerationPermissionsSchema
353
+
354
+ ```ts
355
+ const appGenerationPermissionsSchema: ZodObject<
356
+ {
357
+ llm: ZodBoolean;
358
+ media: ZodBoolean;
359
+ },
360
+ $strict
361
+ >;
362
+ ```
363
+
364
+ Whether an App may use language-model and media generation services.
365
+
366
+ ---
367
+
368
+ ### appMarketplacePermissionsSchema
369
+
370
+ ```ts
371
+ const appMarketplacePermissionsSchema: ZodObject<
372
+ {
373
+ browse: ZodBoolean;
374
+ purchase: ZodBoolean;
375
+ installFree: ZodBoolean;
376
+ },
377
+ $strict
378
+ >;
379
+ ```
380
+
381
+ Whether an App may browse, buy, or install free marketplace entries.
382
+
383
+ ---
384
+
385
+ ### appDirectoryResponseSchema
386
+
387
+ ```ts
388
+ const appDirectoryResponseSchema: ZodObject<{
389
+ actorIsTeamOwner: ZodBoolean;
390
+ needsUpdate: ZodOptional<ZodArray<ZodObject<{
391
+ installationId: ZodNullable<ZodString>;
392
+ appId: ZodNullable<ZodString>;
393
+ displayName: ZodString;
394
+ }, $strict>>>;
395
+ apps: ZodArray<ZodObject<{
396
+ address: ZodUnion<readonly [ZodObject<{
397
+ kind: ZodLiteral<"default">;
398
+ appId: ZodString;
399
+ }, $strict>, ZodObject<{
400
+ kind: ZodLiteral<"installation">;
401
+ installationId: ZodString;
402
+ }, $strict>]>;
403
+ installationId: ZodNullable<ZodString>;
404
+ surfaceId: ZodString;
405
+ appId: ZodString;
406
+ displayName: ZodOptional<ZodString>;
407
+ icon: ZodOptional<ZodNullable<ZodString>>;
408
+ releaseId: ZodNullable<ZodString>;
409
+ authorityVersion: ZodNumber;
410
+ enforcement: ZodNullable<ZodObject<{
411
+ requestId: ZodString;
412
+ address: ZodUnion<readonly [ZodObject<..., ...>, ZodObject<..., ...>]>;
413
+ authorityVersion: ZodNumber;
414
+ state: ZodEnum<{
415
+ pending: "pending";
416
+ expired: "expired";
417
+ unaffected: "unaffected";
418
+ applied: "applied";
419
+ }>;
420
+ outstanding: ZodNumber;
421
+ }, $strict>>;
422
+ handlers: ZodArray<ZodLiteral<"file.open">>;
423
+ roles: ZodArray<ZodString>;
424
+ declaredCapabilities: ZodArray<ZodString>;
425
+ calls: ZodOptional<ZodPipe<ZodUnknown, ZodTransform<readonly object[], unknown>>>;
426
+ commands: ZodPipe<ZodArray<ZodUnknown>, ZodTransform<Readonly<{
427
+ id: string;
428
+ title: string;
429
+ category: string;
430
+ description?: ... | ...;
431
+ sigil?: ... | ...;
432
+ projections?: ... | ...;
433
+ }>[], unknown[]>>;
434
+ gills: ZodPipe<ZodArray<ZodUnknown>, ZodTransform<AppDirectoryGill[], unknown[]>>;
435
+ availability: ZodEnum<{
436
+ unavailable: "unavailable";
437
+ available: "available";
438
+ }>;
439
+ surface: ZodNullable<ZodObject<{
440
+ stableRoute: ZodString;
441
+ }, $strict>>;
442
+ surfacePath: ZodString;
443
+ override: ZodNullable<ZodObject<{
444
+ appId: ZodOptional<ZodString>;
445
+ releaseId: ZodString;
446
+ surfaceRoute: ZodNullable<ZodString>;
447
+ }, $strict>>;
448
+ grants: ZodArray<ZodObject<{
449
+ operation: ZodString;
450
+ resourceId: ZodString;
451
+ }, $strict>>;
452
+ computerPermission: ZodOptional<ZodNullable<ZodDiscriminatedUnion<[ZodObject<{
453
+ kind: ...;
454
+ computers: ...;
455
+ }, $strict>, ZodObject<{
456
+ kind: ...;
457
+ operations: ...;
458
+ }, $strict>], "kind">>>;
459
+ generationPermissions: ZodObject<{
460
+ llm: ZodBoolean;
461
+ media: ZodBoolean;
462
+ }, $strict>;
463
+ marketplacePermissions: ZodObject<{
464
+ browse: ZodBoolean;
465
+ purchase: ZodBoolean;
466
+ installFree: ZodBoolean;
467
+ }, $strict>;
468
+ agentPermission: ZodDiscriminatedUnion<[ZodObject<{
469
+ kind: ZodLiteral<"all-team-agents">;
470
+ directoryOperations: ZodArray<ZodEnum<...>>;
471
+ sessionOperations: ZodArray<ZodEnum<...>>;
472
+ }, $strict>, ZodObject<{
473
+ kind: ZodLiteral<"selected-agents">;
474
+ directoryOperations: ZodArray<ZodEnum<...>>;
475
+ agents: ZodArray<ZodObject<..., ...>>;
476
+ }, $strict>], "kind">;
477
+ }, $strict>>;
478
+ roles: ZodRecord<ZodString, ZodObject<{
479
+ surfaceId: ZodNullable<ZodString>;
480
+ chosen: ZodBoolean;
481
+ }, $strict>>;
482
+ }, $strict>;
483
+ ```
484
+
485
+ A host's Team App directory with its permission projection, parsed strictly by
486
+ every consumer: an unknown field is a contract change both sides make.
487
+
488
+ ---
489
+
223
490
  ### appCatalogEntrySchema
224
491
 
225
492
  ```ts
@@ -120,16 +120,75 @@ that removes it again. The shell loads its own code and styles.
120
120
 
121
121
  `Promise`\<() => `void`\>
122
122
 
123
+ ---
124
+
125
+ ### ShellPlatformControls
126
+
127
+ ```ts
128
+ type ShellPlatformControls = Readonly<{
129
+ controls: WorkbenchHostControls;
130
+ suggestDesktopSettings: void;
131
+ dispose: void;
132
+ }>;
133
+ ```
134
+
135
+ Settings a shell renders for a host that has none of its own, such as a
136
+ standalone Oyster: the shell draws them into `root`, and the host hands
137
+ `controls` to its workbench so Apps and the dashboard can open them.
138
+
139
+ ---
140
+
141
+ ### MountPlatformControls
142
+
143
+ ```ts
144
+ type MountPlatformControls = (root, input) => Promise<ShellPlatformControls>;
145
+ ```
146
+
147
+ Render the shell's own Settings into `root` for the host at `teamId`.
148
+
149
+ #### Parameters
150
+
151
+ | Parameter | Type |
152
+ | --------- | --------------------------------------- |
153
+ | `root` | `HTMLElement` |
154
+ | `input` | `Readonly`\<\{ `teamId`: `string`; \}\> |
155
+
156
+ #### Returns
157
+
158
+ `Promise`\<[`ShellPlatformControls`](#shellplatformcontrols)\>
159
+
160
+ ---
161
+
162
+ ### ShellModule
163
+
164
+ ```ts
165
+ type ShellModule = Readonly<{
166
+ mountShell: MountShell;
167
+ mountPlatformControls: MountPlatformControls | null;
168
+ }>;
169
+ ```
170
+
171
+ What a host gets from a picked shell Release's module.
172
+
123
173
  ## Functions
124
174
 
125
175
  ### importShellModule()
126
176
 
127
177
  ```ts
128
- function importShellModule(moduleUrl, hostOrigin): Promise<MountShell>;
178
+ function importShellModule(
179
+ moduleUrl,
180
+ hostOrigin,
181
+ ): Promise<
182
+ Readonly<{
183
+ mountShell: MountShell;
184
+ mountPlatformControls: MountPlatformControls | null;
185
+ }>
186
+ >;
129
187
  ```
130
188
 
131
189
  Import the picked shell Release's module from the host's own origin and check
132
- that it exports `mountShell`. The host never bundles a shell.
190
+ that it exports `mountShell`, and `mountPlatformControls` when it offers its own
191
+ Settings. The host never bundles a shell.
133
192
 
134
193
  #### Parameters
135
194
 
@@ -140,4 +199,6 @@ that it exports `mountShell`. The host never bundles a shell.
140
199
 
141
200
  #### Returns
142
201
 
143
- `Promise`\<[`MountShell`](#mountshell)\>
202
+ `Promise`\<`Readonly`\<\{ `mountShell`: [`MountShell`](#mountshell);
203
+ `mountPlatformControls`: [`MountPlatformControls`](#mountplatformcontrols) \|
204
+ `null`; \}\>\>
@@ -0,0 +1,119 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/oyster**](../README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/oyster](../modules.md) / shell/workbench-directory
8
+
9
+ # shell/workbench-directory
10
+
11
+ ## Type Aliases
12
+
13
+ ### WorkbenchDirectory
14
+
15
+ ```ts
16
+ type WorkbenchDirectory = z.output<typeof workbenchDirectorySchema>;
17
+ ```
18
+
19
+ One host's current desktop rows and actual role selections.
20
+
21
+ ## Variables
22
+
23
+ ### workbenchDirectorySchema
24
+
25
+ ```ts
26
+ const workbenchDirectorySchema: ZodPipe<ZodObject<{
27
+ apps: ZodArray<ZodObject<{
28
+ address: ZodUnion<readonly [ZodObject<{
29
+ kind: ZodLiteral<...>;
30
+ appId: ZodString;
31
+ }, $strict>, ZodObject<{
32
+ kind: ZodLiteral<...>;
33
+ installationId: ZodString;
34
+ }, $strict>]>;
35
+ installationId: ZodNullable<ZodString>;
36
+ surfaceId: ZodString;
37
+ appId: ZodString;
38
+ displayName: ZodOptional<ZodString>;
39
+ icon: ZodOptional<ZodNullable<ZodString>>;
40
+ releaseId: ZodNullable<ZodString>;
41
+ authorityVersion: ZodNumber;
42
+ enforcement: ZodNullable<ZodObject<{
43
+ requestId: ZodString;
44
+ address: ZodUnion<readonly [..., ...]>;
45
+ authorityVersion: ZodNumber;
46
+ state: ZodEnum<{
47
+ unaffected: ...;
48
+ pending: ...;
49
+ applied: ...;
50
+ expired: ...;
51
+ }>;
52
+ outstanding: ZodNumber;
53
+ }, $strict>>;
54
+ handlers: ZodArray<ZodLiteral<"file.open">>;
55
+ roles: ZodArray<ZodString>;
56
+ declaredCapabilities: ZodArray<ZodString>;
57
+ calls: ZodOptional<ZodPipe<ZodUnknown, ZodTransform<readonly object[], unknown>>>;
58
+ commands: ZodPipe<ZodArray<ZodUnknown>, ZodTransform<Readonly<{
59
+ id: ...;
60
+ title: ...;
61
+ category: ...;
62
+ description?: ...;
63
+ sigil?: ...;
64
+ projections?: ...;
65
+ }>[], unknown[]>>;
66
+ gills: ZodPipe<ZodArray<ZodUnknown>, ZodTransform<AppDirectoryGill[], unknown[]>>;
67
+ availability: ZodEnum<{
68
+ available: "available";
69
+ unavailable: "unavailable";
70
+ }>;
71
+ surface: ZodNullable<ZodObject<{
72
+ stableRoute: ZodString;
73
+ }, $strict>>;
74
+ surfacePath: ZodString;
75
+ computer: ZodOptional<ZodObject<{
76
+ computerId: ZodString;
77
+ name: ZodString;
78
+ }, $strip>>;
79
+ computerPermission: ZodOptional<ZodNullable<ZodDiscriminatedUnion<[ZodObject<..., ...>, ZodObject<..., ...>], "kind">>>;
80
+ }, $strip>>;
81
+ computer: ZodOptional<ZodObject<{
82
+ computerId: ZodString;
83
+ name: ZodString;
84
+ }, $strip>>;
85
+ roles: ZodRecord<ZodString, ZodObject<{
86
+ surfaceId: ZodNullable<ZodString>;
87
+ chosen: ZodBoolean;
88
+ }, $strict>>;
89
+ needsUpdate: ZodOptional<ZodArray<ZodObject<{
90
+ installationId: ZodNullable<ZodString>;
91
+ appId: ZodNullable<ZodString>;
92
+ displayName: ZodString;
93
+ }, $strict>>>;
94
+ }, $strip>, ZodTransform<{
95
+ apps: object[];
96
+ computer?: {
97
+ computerId: string;
98
+ name: string;
99
+ };
100
+ roles: Record<string, {
101
+ surfaceId: string | null;
102
+ chosen: boolean;
103
+ }>;
104
+ needsUpdate?: object[];
105
+ }, {
106
+ apps: object[];
107
+ computer?: {
108
+ computerId: string;
109
+ name: string;
110
+ };
111
+ roles: Record<string, {
112
+ surfaceId: string | null;
113
+ chosen: boolean;
114
+ }>;
115
+ needsUpdate?: object[];
116
+ }>>;
117
+ ```
118
+
119
+ Desktop metadata shared by hosts; hosted administration stays in Settings.
@@ -169,6 +169,25 @@ Re-exports [appOpenRequestSchema](../shell.md#appopenrequestschema)
169
169
 
170
170
  ---
171
171
 
172
+ ### teamComputerSchema
173
+
174
+ Re-exports [teamComputerSchema](../shell.md#teamcomputerschema)
175
+
176
+ ---
177
+
178
+ ### TeamComputer
179
+
180
+ Re-exports [TeamComputer](../shell.md#teamcomputer)
181
+
182
+ ---
183
+
184
+ ### teamComputerDirectorySchema
185
+
186
+ Re-exports
187
+ [teamComputerDirectorySchema](../shell.md#teamcomputerdirectoryschema)
188
+
189
+ ---
190
+
172
191
  ### TeamWorkbenchHostHandle
173
192
 
174
193
  Re-exports [TeamWorkbenchHostHandle](../shell.md#teamworkbenchhosthandle)