@fungi.computer/oyster 0.0.0-stage → 0.0.1

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 (242) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1082 -2
  3. package/dist/agents.d.ts +114 -0
  4. package/dist/agents.js +322 -0
  5. package/dist/app-builds.d.ts +151 -0
  6. package/dist/app-builds.js +355 -0
  7. package/dist/app-sandbox.d.ts +2 -0
  8. package/dist/app-sandbox.js +2 -0
  9. package/dist/app-sources.d.ts +46 -0
  10. package/dist/app-sources.js +335 -0
  11. package/dist/app-storage.d.ts +141 -0
  12. package/dist/app-storage.js +281 -0
  13. package/dist/apps/gate.d.ts +105 -0
  14. package/dist/apps/gate.js +273 -0
  15. package/dist/apps/index.d.ts +5 -0
  16. package/dist/apps/index.js +5 -0
  17. package/dist/apps/installation.d.ts +248 -0
  18. package/dist/apps/installation.js +307 -0
  19. package/dist/apps/operations.d.ts +8 -0
  20. package/dist/apps/operations.js +98 -0
  21. package/dist/apps/tools.d.ts +33 -0
  22. package/dist/apps/tools.js +17 -0
  23. package/dist/auth.d.ts +11 -0
  24. package/dist/auth.js +93 -0
  25. package/dist/backend-request.d.ts +3 -0
  26. package/dist/backend-request.js +53 -0
  27. package/dist/build/build-jobs.d.ts +128 -0
  28. package/dist/build/build-jobs.js +197 -0
  29. package/dist/build/build-step.d.ts +26 -0
  30. package/dist/build/build-step.js +20 -0
  31. package/dist/build/bundled-html.d.ts +7 -0
  32. package/dist/build/bundled-html.js +64 -0
  33. package/dist/build/definition-emission.d.ts +34 -0
  34. package/dist/build/definition-emission.js +201 -0
  35. package/dist/build/effect.d.ts +231 -0
  36. package/dist/build/effect.js +396 -0
  37. package/dist/build/git-environment.d.ts +6 -0
  38. package/dist/build/git-environment.js +48 -0
  39. package/dist/build/html-recipe.d.ts +20 -0
  40. package/dist/build/html-recipe.js +51 -0
  41. package/dist/build/local-build.d.ts +57 -0
  42. package/dist/build/local-build.js +1078 -0
  43. package/dist/build/r2-artifact-writer.d.ts +31 -0
  44. package/dist/build/r2-artifact-writer.js +179 -0
  45. package/dist/build/snapshot-package-store.d.ts +2 -0
  46. package/dist/build/snapshot-package-store.js +21 -0
  47. package/dist/build/snapshot-program-scripts.d.ts +6 -0
  48. package/dist/build/snapshot-program-scripts.js +2 -0
  49. package/dist/build/submission-contract.d.ts +384 -0
  50. package/dist/build/submission-contract.js +70 -0
  51. package/dist/build/workspace-build.d.ts +50 -0
  52. package/dist/build/workspace-build.js +156 -0
  53. package/dist/build-contract.d.ts +4 -0
  54. package/dist/build-contract.js +4 -0
  55. package/dist/build-jobs.d.ts +2 -0
  56. package/dist/build-jobs.js +2 -0
  57. package/dist/build.d.ts +11 -0
  58. package/dist/build.js +13 -0
  59. package/dist/capability-descriptor.d.ts +46 -0
  60. package/dist/capability-descriptor.js +51 -0
  61. package/dist/catalog-frame.d.ts +39 -0
  62. package/dist/catalog-frame.js +72 -0
  63. package/dist/cause-class.d.ts +19 -0
  64. package/dist/cause-class.js +54 -0
  65. package/dist/cloudflare.d.ts +123 -0
  66. package/dist/cloudflare.js +391 -0
  67. package/dist/computer-terminal.d.ts +38 -0
  68. package/dist/computer-terminal.js +410 -0
  69. package/dist/computer.d.ts +60 -0
  70. package/dist/computer.js +33 -0
  71. package/dist/event-recipients.d.ts +57 -0
  72. package/dist/event-recipients.js +144 -0
  73. package/dist/facet-invocation.d.ts +4 -0
  74. package/dist/facet-invocation.js +45 -0
  75. package/dist/files.d.ts +42 -0
  76. package/dist/files.js +123 -0
  77. package/dist/frame-binding-wire-script.d.ts +2 -0
  78. package/dist/frame-binding-wire-script.js +1 -0
  79. package/dist/frame-binding-wire.d.ts +28 -0
  80. package/dist/frame-binding-wire.js +54 -0
  81. package/dist/git-admission.d.ts +52 -0
  82. package/dist/git-admission.js +188 -0
  83. package/dist/git-auth.d.ts +11 -0
  84. package/dist/git-auth.js +27 -0
  85. package/dist/git-door.d.ts +35 -0
  86. package/dist/git-door.js +108 -0
  87. package/dist/git-journal.d.ts +31 -0
  88. package/dist/git-journal.js +188 -0
  89. package/dist/git.d.ts +31 -0
  90. package/dist/git.js +64 -0
  91. package/dist/guest-policy.d.ts +9 -0
  92. package/dist/guest-policy.js +13 -0
  93. package/dist/host.d.ts +244 -0
  94. package/dist/host.js +1043 -0
  95. package/dist/index.d.ts +166 -0
  96. package/dist/index.js +320 -0
  97. package/dist/installation-consent.d.ts +79 -0
  98. package/dist/installation-consent.js +82 -0
  99. package/dist/internal/background-origins.d.ts +3 -0
  100. package/dist/internal/background-origins.js +8 -0
  101. package/dist/internal/delivery.d.ts +12 -0
  102. package/dist/internal/delivery.js +167 -0
  103. package/dist/internal/host-gate.d.ts +14 -0
  104. package/dist/internal/host-gate.js +62 -0
  105. package/dist/internal/registry-installations.d.ts +6 -0
  106. package/dist/internal/registry-installations.js +12 -0
  107. package/dist/invocation.d.ts +251 -0
  108. package/dist/invocation.js +377 -0
  109. package/dist/keys.d.ts +48 -0
  110. package/dist/keys.js +52 -0
  111. package/dist/mcp-owner.d.ts +27 -0
  112. package/dist/mcp-owner.js +143 -0
  113. package/dist/mcp.d.ts +89 -0
  114. package/dist/mcp.js +429 -0
  115. package/dist/media.d.ts +23 -0
  116. package/dist/media.js +12 -0
  117. package/dist/pack.d.ts +76 -0
  118. package/dist/pack.js +134 -0
  119. package/dist/page/capabilities.d.ts +23 -0
  120. package/dist/page/capabilities.js +256 -0
  121. package/dist/page/computer-handles.d.ts +79 -0
  122. package/dist/page/computer-handles.js +44 -0
  123. package/dist/page/lifetime.d.ts +6 -0
  124. package/dist/page/lifetime.js +19 -0
  125. package/dist/page/mount.d.ts +163 -0
  126. package/dist/page/mount.js +390 -0
  127. package/dist/page/storage.d.ts +3 -0
  128. package/dist/page/storage.js +82 -0
  129. package/dist/page/terminal.d.ts +5 -0
  130. package/dist/page/terminal.js +7 -0
  131. package/dist/page-script.d.ts +14 -0
  132. package/dist/page-script.js +5 -0
  133. package/dist/r2-files.d.ts +3 -0
  134. package/dist/r2-files.js +79 -0
  135. package/dist/release.d.ts +72 -0
  136. package/dist/release.js +164 -0
  137. package/dist/root-data.d.ts +86 -0
  138. package/dist/root-data.js +69 -0
  139. package/dist/shell/app-directory.d.ts +537 -0
  140. package/dist/shell/app-directory.js +195 -0
  141. package/dist/shell/browser-actions.d.ts +7 -0
  142. package/dist/shell/browser-actions.js +56 -0
  143. package/dist/shell/command-host.d.ts +112 -0
  144. package/dist/shell/command-host.js +502 -0
  145. package/dist/shell/commands.d.ts +25 -0
  146. package/dist/shell/commands.js +78 -0
  147. package/dist/shell/index.d.ts +8 -0
  148. package/dist/shell/index.js +8 -0
  149. package/dist/shell/keys.d.ts +41 -0
  150. package/dist/shell/keys.js +134 -0
  151. package/dist/shell/shell-module.d.ts +31 -0
  152. package/dist/shell/shell-module.js +37 -0
  153. package/dist/shell/window-manager.d.ts +124 -0
  154. package/dist/shell/window-manager.js +711 -0
  155. package/dist/shell/workbench-contract.d.ts +68 -0
  156. package/dist/shell/workbench-contract.js +1 -0
  157. package/dist/shell/workbench-host-types.d.ts +96 -0
  158. package/dist/shell/workbench-host-types.js +1 -0
  159. package/dist/shell/workbench-host.d.ts +34 -0
  160. package/dist/shell/workbench-host.js +347 -0
  161. package/dist/shell/workbench-model.d.ts +192 -0
  162. package/dist/shell/workbench-model.js +53 -0
  163. package/dist/shell/workbench.d.ts +4 -0
  164. package/dist/shell/workbench.js +2 -0
  165. package/dist/source/fork.d.ts +27 -0
  166. package/dist/source/fork.js +46 -0
  167. package/dist/source/index.d.ts +11 -0
  168. package/dist/source/index.js +11 -0
  169. package/dist/source/seed-receipt.d.ts +53 -0
  170. package/dist/source/seed-receipt.js +18 -0
  171. package/dist/source/team-source.d.ts +32 -0
  172. package/dist/source/team-source.js +42 -0
  173. package/dist/source/template-repository.d.ts +2 -0
  174. package/dist/source/template-repository.js +8 -0
  175. package/dist/source/template-write.d.ts +69 -0
  176. package/dist/source/template-write.js +344 -0
  177. package/dist/storage-frame.d.ts +64 -0
  178. package/dist/storage-frame.js +28 -0
  179. package/dist/tenant.d.ts +81 -0
  180. package/dist/tenant.js +71 -0
  181. package/dist/testing/capabilities.d.ts +29 -0
  182. package/dist/testing/capabilities.js +130 -0
  183. package/dist/testing/catalog.d.ts +3 -0
  184. package/dist/testing/catalog.js +53 -0
  185. package/dist/testing/index.d.ts +10 -0
  186. package/dist/testing/index.js +10 -0
  187. package/dist/testing/installation.d.ts +11 -0
  188. package/dist/testing/installation.js +25 -0
  189. package/dist/testing/native-worker.d.ts +21 -0
  190. package/dist/testing/native-worker.js +106 -0
  191. package/dist/testing/worker.d.ts +18 -0
  192. package/dist/testing/worker.js +67 -0
  193. package/dist/testing/workers-runtime.d.ts +24 -0
  194. package/dist/testing/workers-runtime.js +33 -0
  195. package/dist/webhook-delivery.d.ts +14 -0
  196. package/dist/webhook-delivery.js +17 -0
  197. package/dist/workers-git.d.ts +285 -0
  198. package/dist/workers-git.js +1174 -0
  199. package/dist/workers.d.ts +352 -0
  200. package/dist/workers.js +866 -0
  201. package/docs/api/README.md +82 -0
  202. package/docs/api/agents.md +332 -0
  203. package/docs/api/app-storage.md +209 -0
  204. package/docs/api/apps.md +1375 -0
  205. package/docs/api/auth.md +63 -0
  206. package/docs/api/build-contract.md +507 -0
  207. package/docs/api/build.md +1476 -0
  208. package/docs/api/cloudflare.md +421 -0
  209. package/docs/api/computer.md +203 -0
  210. package/docs/api/files.md +117 -0
  211. package/docs/api/git.md +470 -0
  212. package/docs/api/host.md +1328 -0
  213. package/docs/api/index.md +430 -0
  214. package/docs/api/invocation.md +738 -0
  215. package/docs/api/keys.md +175 -0
  216. package/docs/api/mcp.md +301 -0
  217. package/docs/api/media.md +40 -0
  218. package/docs/api/modules.md +42 -0
  219. package/docs/api/pack.md +138 -0
  220. package/docs/api/page/mount.md +298 -0
  221. package/docs/api/root-data.md +111 -0
  222. package/docs/api/shell/app-directory.md +332 -0
  223. package/docs/api/shell/command-host.md +224 -0
  224. package/docs/api/shell/commands.md +197 -0
  225. package/docs/api/shell/keys.md +183 -0
  226. package/docs/api/shell/shell-module.md +143 -0
  227. package/docs/api/shell/window-manager.md +267 -0
  228. package/docs/api/shell/workbench.md +186 -0
  229. package/docs/api/shell.md +1788 -0
  230. package/docs/api/tenant.md +194 -0
  231. package/docs/api/workers-git.md +1527 -0
  232. package/docs/api/workers.md +1678 -0
  233. package/docs/media/architecture.mmd +32 -0
  234. package/docs/media/architecture.png +0 -0
  235. package/docs/media/bonsai-network.png +0 -0
  236. package/docs/media/bonsai-repository.png +0 -0
  237. package/docs/site/agent-quickstart.mdx +349 -0
  238. package/examples/git/worker.ts +39 -0
  239. package/examples/git/wrangler.jsonc +32 -0
  240. package/examples/standalone/worker.ts +14 -0
  241. package/examples/standalone/wrangler.jsonc +21 -0
  242. package/package.json +249 -3
@@ -0,0 +1,175 @@
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) / keys
8
+
9
+ # keys
10
+
11
+ ## Type Aliases
12
+
13
+ ### OysterKeyCapability
14
+
15
+ ```ts
16
+ type OysterKeyCapability = "apps.read" | "apps.use" | "computer.use";
17
+ ```
18
+
19
+ Every capability an Oyster key may carry.
20
+
21
+ ---
22
+
23
+ ### OysterKeyRecord
24
+
25
+ ```ts
26
+ type OysterKeyRecord = KeyRecord<OysterKeyCapability>;
27
+ ```
28
+
29
+ One key's durable record, in the shape a host's own App reads.
30
+
31
+ ---
32
+
33
+ ### OysterKeyPrincipal
34
+
35
+ ```ts
36
+ type OysterKeyPrincipal = KeyPrincipal<OysterKeyCapability>;
37
+ ```
38
+
39
+ One key's live, authenticated principal.
40
+
41
+ ---
42
+
43
+ ### OysterKeyScope
44
+
45
+ ```ts
46
+ type OysterKeyScope = Scope<OysterKeyCapability>;
47
+ ```
48
+
49
+ One key's authority, as `defineGrants` canonicalizes it.
50
+
51
+ ---
52
+
53
+ ### OysterKeyStore
54
+
55
+ ```ts
56
+ type OysterKeyStore = KeyStore<OysterKeyCapability>;
57
+ ```
58
+
59
+ The Ear Tag store's own interface, closed over Oyster's capability vocabulary.
60
+
61
+ ---
62
+
63
+ ### LiveOysterKey
64
+
65
+ ```ts
66
+ type LiveOysterKey = Readonly<{
67
+ keyId: string;
68
+ owner: string;
69
+ grantVersion: number;
70
+ grants: readonly Grant<OysterKeyCapability>[];
71
+ }>;
72
+ ```
73
+
74
+ The minimal live facts `OysterHost`'s `keys.live` port returns: enough to gate
75
+ one call, never the key's name or timestamps. `null` for an unknown, revoked,
76
+ expired or suspended key -- the same closed set `keyAppAccess` and
77
+ `keyAllowsComputerUse` already treat as no authority.
78
+
79
+ ## Variables
80
+
81
+ ### oysterKeyVocabulary
82
+
83
+ ```ts
84
+ const oysterKeyVocabulary: GrantVocabulary<OysterKeyCapability>;
85
+ ```
86
+
87
+ `apps.use` also reaches `apps.read` (one level, per `defineGrants`'s own
88
+ `implies`): a key that may change an App's data may also read it. `computer.use`
89
+ has no narrower capability under it; the Computer is on or off, host-wide.
90
+
91
+ ---
92
+
93
+ ### computerUseGrant
94
+
95
+ ```ts
96
+ const computerUseGrant: Grant<OysterKeyCapability>;
97
+ ```
98
+
99
+ The grant that turns on the Computer for a key, host-wide; there is no narrower
100
+ target.
101
+
102
+ ## Functions
103
+
104
+ ### allInstallations()
105
+
106
+ ```ts
107
+ function allInstallations(capability): Grant<OysterKeyCapability>;
108
+ ```
109
+
110
+ A grant reaching every current and future installation for `capability`.
111
+
112
+ #### Parameters
113
+
114
+ | Parameter | Type |
115
+ | ------------ | ----------------------------- |
116
+ | `capability` | `"apps.read"` \| `"apps.use"` |
117
+
118
+ #### Returns
119
+
120
+ `Grant`\<[`OysterKeyCapability`](#oysterkeycapability)\>
121
+
122
+ ---
123
+
124
+ ### keyAppAccess()
125
+
126
+ ```ts
127
+ function keyAppAccess(
128
+ key,
129
+ installationId,
130
+ ): {
131
+ level: "read" | "write";
132
+ revision: string;
133
+ grantedBy: string;
134
+ } | null;
135
+ ```
136
+
137
+ One live key's access to one installation: `write` when its grants admit
138
+ `apps.use` there, `read` when they admit `apps.read`, otherwise `null` --
139
+ including for an installation added after the key was issued, unless the key
140
+ holds "All Apps" (`targets: {kind: "all"}`). The same shape as an Agent's stored
141
+ [AppToolPolicy](apps.md#apptoolpolicy); its caller adds `bindingName` (which
142
+ varies by caller: the plain installation id for the gate, the uppercased binding
143
+ name for MCP) to reach the full `AppToolAccess`.
144
+
145
+ #### Parameters
146
+
147
+ | Parameter | Type |
148
+ | ---------------- | --------------------------------- |
149
+ | `key` | [`LiveOysterKey`](#liveoysterkey) |
150
+ | `installationId` | `string` |
151
+
152
+ #### Returns
153
+
154
+ \| \{ `level`: `"read"` \| `"write"`; `revision`: `string`; `grantedBy`:
155
+ `string`; \} \| `null`
156
+
157
+ ---
158
+
159
+ ### keyAllowsComputerUse()
160
+
161
+ ```ts
162
+ function keyAllowsComputerUse(key): boolean;
163
+ ```
164
+
165
+ Whether a live key's own grants turn its Computer access on. Off by default.
166
+
167
+ #### Parameters
168
+
169
+ | Parameter | Type |
170
+ | --------- | --------------------------------- |
171
+ | `key` | [`LiveOysterKey`](#liveoysterkey) |
172
+
173
+ #### Returns
174
+
175
+ `boolean`
@@ -0,0 +1,301 @@
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) / mcp
8
+
9
+ # mcp
10
+
11
+ ## Classes
12
+
13
+ ### AppMethodRefused
14
+
15
+ Why an App method call from the MCP catalog was refused.
16
+
17
+ #### Extends
18
+
19
+ - `Error`
20
+
21
+ #### Constructors
22
+
23
+ ##### Constructor
24
+
25
+ ```ts
26
+ new AppMethodRefused(code, detail?): AppMethodRefused;
27
+ ```
28
+
29
+ `detail` is the App's own caller-facing refusal message, when it gave one.
30
+
31
+ ###### Parameters
32
+
33
+ | Parameter | Type |
34
+ | --------- | -------- |
35
+ | `code` | `string` |
36
+ | `detail?` | `string` |
37
+
38
+ ###### Returns
39
+
40
+ [`AppMethodRefused`](#appmethodrefused)
41
+
42
+ ###### Overrides
43
+
44
+ ```ts
45
+ Error.constructor;
46
+ ```
47
+
48
+ #### Properties
49
+
50
+ ##### name
51
+
52
+ ```ts
53
+ readonly name: "AppMethodRefused" = "AppMethodRefused";
54
+ ```
55
+
56
+ ###### Overrides
57
+
58
+ ```ts
59
+ Error.name;
60
+ ```
61
+
62
+ ##### code
63
+
64
+ ```ts
65
+ readonly code: string;
66
+ ```
67
+
68
+ ## Type Aliases
69
+
70
+ ### OysterCallerAccess
71
+
72
+ ```ts
73
+ type OysterCallerAccess =
74
+ | Readonly<{
75
+ kind: "agent";
76
+ policy: AppToolPolicy;
77
+ }>
78
+ | Readonly<{
79
+ kind: "key";
80
+ keyId: string;
81
+ byInstallation: ReadonlyMap<string, AppToolPolicy>;
82
+ }>
83
+ | null;
84
+ ```
85
+
86
+ The App-tool access one caller's catalog capture used, re-checked at call time
87
+ against a fresh read. An Agent's policy is one blanket level for every
88
+ installation (`host.appToolPolicy`); a key's is its own grants, resolved per
89
+ installation (`keyAppAccess`) -- an installation the key has no grant for is
90
+ captured as absent, never merely refused, so it is never listed at all.
91
+
92
+ ---
93
+
94
+ ### ReleaseSurface
95
+
96
+ ```ts
97
+ type ReleaseSurface = Readonly<{
98
+ release: VerifiedRelease;
99
+ api: NonNullable<VerifiedRelease["api"]>;
100
+ declaredOperations: DeclaredOperations;
101
+ toolSchemas: ReturnType<typeof appToolSchemas>;
102
+ }>;
103
+ ```
104
+
105
+ What one Release contributes to every MCP catalog: its verified build, its
106
+ declared operations and its compiled tool schemas.
107
+
108
+ ---
109
+
110
+ ### AppSurfaceCache
111
+
112
+ ```ts
113
+ type AppSurfaceCache = (release) => Promise<ReleaseSurface | null>;
114
+ ```
115
+
116
+ Per-host memo of each installed Release's catalog surface. A Release's artifacts
117
+ are immutable and content-addressed, so verifying the build, deriving its
118
+ operations and compiling its tool schemas happens once per Release ID and
119
+ artifact digest, not on every catalog capture: an MCP call captures the catalog
120
+ several times (refresh, session acquire, the pre-call authority check), and
121
+ redoing this for every installed App on each one exhausted a Durable Object's
122
+ CPU and memory. Only Release-derived facts are cached; installation authority,
123
+ caller access and tool-family listings are still read fresh on every capture. A
124
+ failed build is not cached.
125
+
126
+ #### Parameters
127
+
128
+ | Parameter | Type |
129
+ | --------- | ----------------------------------------------------- |
130
+ | `release` | [`Installation`](apps.md#installation)\[`"release"`\] |
131
+
132
+ #### Returns
133
+
134
+ `Promise`\<[`ReleaseSurface`](#releasesurface) \| `null`\>
135
+
136
+ ## Functions
137
+
138
+ ### appBindingName()
139
+
140
+ ```ts
141
+ function appBindingName(installationId): string;
142
+ ```
143
+
144
+ An installation ID as a guest binding name: `spawn-git` becomes `SPAWN_GIT`.
145
+
146
+ #### Parameters
147
+
148
+ | Parameter | Type |
149
+ | ---------------- | -------- |
150
+ | `installationId` | `string` |
151
+
152
+ #### Returns
153
+
154
+ `string`
155
+
156
+ ---
157
+
158
+ ### appSurfaceCache()
159
+
160
+ ```ts
161
+ function appSurfaceCache(host): AppSurfaceCache;
162
+ ```
163
+
164
+ Make one [AppSurfaceCache](#appsurfacecache) for a host whose artifact store and
165
+ capabilities stay fixed.
166
+
167
+ #### Parameters
168
+
169
+ | Parameter | Type |
170
+ | --------- | ------------------------------------------------------------------------------- |
171
+ | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), `"artifacts"` \| `"capabilities"`\> |
172
+
173
+ #### Returns
174
+
175
+ [`AppSurfaceCache`](#appsurfacecache)
176
+
177
+ ---
178
+
179
+ ### oysterAppMethods()
180
+
181
+ ```ts
182
+ function oysterAppMethods(
183
+ host,
184
+ principal,
185
+ access,
186
+ surfaces,
187
+ preloadedInstallations?,
188
+ ): Promise<
189
+ Readonly<{
190
+ id: string;
191
+ acquire: (context) => Promise<
192
+ Readonly<{
193
+ snapshot: CapabilitySourceSnapshot;
194
+ release: () => Promise<void>;
195
+ }>
196
+ >;
197
+ }> &
198
+ object
199
+ >;
200
+ ```
201
+
202
+ Capture installed App methods for MCP or agents as one principal-scoped source.
203
+ Enabled installations become `env.<APP>` modules using the Instance call path; a
204
+ dotted method such as `repos.list` is `env.<APP>.repos.list()`. Visitors see
205
+ only public read methods; owners see every discoverable method. A key sees only
206
+ the installations its own grants admit, each at the level (`read`/`write`) those
207
+ grants give it; Mycelium itself refuses a write call up front when the module's
208
+ own grant is `read` (`mycelium/src/access.ts`). Call again to capture changes to
209
+ Releases, installation authority or the caller's own grants.
210
+
211
+ #### Parameters
212
+
213
+ | Parameter | Type |
214
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
215
+ | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), \| `"installations"` \| `"instances"` \| `"artifacts"` \| `"guestLimits"` \| `"backgroundOriginKey"` \| `"computerId"` \| `"capabilities"` \| `"appToolPolicy"` \| `"keys"`\> |
216
+ | `principal` | [`OysterPrincipal`](host.md#oysterprincipal) |
217
+ | `access` | [`OysterCallerAccess`](#oystercalleraccess) |
218
+ | `surfaces` | [`AppSurfaceCache`](#appsurfacecache) |
219
+ | `preloadedInstallations?` | readonly `Readonly`\<\{ `installationId`: `string`; `instanceId`: [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{ `releaseId`: `ReleaseId`; `appId`: `AppId`; `artifact`: \{ `artifactRef`: `ArtifactRef`; `artifactDigest`: `Sha256Digest`; `provenance`: \{ `sourceRevision`: `SourceRevision`; `sourceTreeDigest`: `Sha256Digest`; `buildRecipeDigest`: `Sha256Digest`; \}; \}; \}; `releasePin`: `"pinned"` \| `"floating"`; `authorityVersion`: `number`; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; `visibility`: `"private"` \| `"public"`; `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly `Readonly`\<\{ `capability`: \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"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"`; `capabilityApproved`: `true`; `operations`: readonly `string`[]; `resources`: \| `"tenant-scope"` \| readonly `Readonly`\<\{ `kind`: ...; `id`: ...; \}\>[]; \}\>[]; `approval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; `approvedAnonymousMethods`: readonly `Readonly`\<\{ `name`: `string`; `digest`: `Sha256Digest`; \}\>[]; `anonymousApproval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; \}\>[] |
220
+
221
+ #### Returns
222
+
223
+ `Promise`\<`Readonly`\<\{ `id`: `string`; `acquire`: (`context`) =>
224
+ `Promise`\<`Readonly`\<\{ `snapshot`: `CapabilitySourceSnapshot`; `release`: ()
225
+ => `Promise`\<`void`\>; \}\>\>; \}\> & `object`\>
226
+
227
+ ---
228
+
229
+ ### oysterComputerTools()
230
+
231
+ ```ts
232
+ function oysterComputerTools(host, principal): Promise<
233
+ | Readonly<{
234
+ id: string;
235
+ acquire: (context) => Promise<Readonly<{
236
+ snapshot: CapabilitySourceSnapshot;
237
+ release: () => Promise<...>;
238
+ }>>;
239
+ }> & object
240
+ | null>;
241
+ ```
242
+
243
+ Capture the host's fixed Computer for one caller as a Knapsack source. The host
244
+ decides whether the caller holds Computer access; the Computer owner accepts
245
+ every call. Null when the host has no Computer or the caller has no access.
246
+ Grants name exactly the one captured module.
247
+
248
+ #### Parameters
249
+
250
+ | Parameter | Type |
251
+ | ----------- | ---------------------------------------------------------------------------- |
252
+ | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), `"computerId"` \| `"computer"`\> |
253
+ | `principal` | [`OysterPrincipal`](host.md#oysterprincipal) |
254
+
255
+ #### Returns
256
+
257
+ `Promise`\< \| `Readonly`\<\{ `id`: `string`; `acquire`: (`context`) =>
258
+ `Promise`\<`Readonly`\<\{ `snapshot`: `CapabilitySourceSnapshot`; `release`: ()
259
+ => `Promise`\<...\>; \}\>\>; \}\> & `object` \| `null`\>
260
+
261
+ ---
262
+
263
+ ### oysterMcpCatalogLoad()
264
+
265
+ ```ts
266
+ function oysterMcpCatalogLoad(host): (principal) => Promise<Readonly<{
267
+ instructions: string;
268
+ sources: readonly Readonly<{
269
+ id: string;
270
+ acquire: (context) => Promise<Readonly<{
271
+ snapshot: ...;
272
+ release: ...;
273
+ }>>;
274
+ }>[];
275
+ grants: Grants;
276
+ approvedWrites?: readonly string[];
277
+ }>>;
278
+ ```
279
+
280
+ Load the current catalog for an authenticated owner or key: installed App
281
+ methods, plus the host's Computer when the caller holds Computer access. A key
282
+ sees exactly the installations and levels its own grants admit, and the Computer
283
+ only with its own `computer.use` grant; each App retains its own caller checks
284
+ regardless. The owner's stored write approval of an Agent's App tools is that
285
+ principal's confirmation for App writes, so a headless client can write; the
286
+ shared MCP server asks the client to approve every other write (an owner's own
287
+ calls, the Computer). Each call still re-admits the key, rechecks that same
288
+ stored approval, and passes the App's gate.
289
+
290
+ #### Parameters
291
+
292
+ | Parameter | Type |
293
+ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
294
+ | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), \| `"installations"` \| `"instances"` \| `"artifacts"` \| `"guestLimits"` \| `"backgroundOriginKey"` \| `"computerId"` \| `"computer"` \| `"capabilities"` \| `"appToolPolicy"` \| `"keys"`\> |
295
+
296
+ #### Returns
297
+
298
+ (`principal`) => `Promise`\<`Readonly`\<\{ `instructions`: `string`; `sources`:
299
+ readonly `Readonly`\<\{ `id`: `string`; `acquire`: (`context`) =>
300
+ `Promise`\<`Readonly`\<\{ `snapshot`: ...; `release`: ...; \}\>\>; \}\>[];
301
+ `grants`: `Grants`; `approvedWrites?`: readonly `string`[]; \}\>\>
@@ -0,0 +1,40 @@
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) / media
8
+
9
+ # media
10
+
11
+ ## Variables
12
+
13
+ ### mediaSlot
14
+
15
+ ```ts
16
+ const mediaSlot: object;
17
+ ```
18
+
19
+ Media slot supplied by the host; Oyster owns routing, never generation.
20
+
21
+ #### Type Declaration
22
+
23
+ | Name | Type | Default value |
24
+ | --------------------------------------- | -------------------- | ------------------------- |
25
+ | <a id="property-id"></a> `id` | `"media.generation"` | `"media.generation"` |
26
+ | <a id="property-version"></a> `version` | `number` | `mediaGeneration.version` |
27
+ | <a id="property-base"></a> `base` | `"/media/"` | `"/media/"` |
28
+ | <a id="property-methods"></a> `methods` | `object` | - |
29
+ | `methods.describe` | `object` | - |
30
+ | `methods.describe.kind` | `"json"` | `"json"` |
31
+ | `methods.describe.method` | `"GET"` | `"GET"` |
32
+ | `methods.describe.path` | `"describe"` | `"describe"` |
33
+ | `methods.generate` | `object` | - |
34
+ | `methods.generate.kind` | `"json"` | `"json"` |
35
+ | `methods.generate.method` | `"POST"` | `"POST"` |
36
+ | `methods.generate.path` | `"generate"` | `"generate"` |
37
+ | `methods.cancelAttempt` | `object` | - |
38
+ | `methods.cancelAttempt.kind` | `"json"` | `"json"` |
39
+ | `methods.cancelAttempt.method` | `"POST"` | `"POST"` |
40
+ | `methods.cancelAttempt.path` | `"cancel-attempt"` | `"cancel-attempt"` |
@@ -0,0 +1,42 @@
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
8
+
9
+ ## Modules
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) | - |