@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,1678 @@
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) / workers
8
+
9
+ # workers
10
+
11
+ ## Classes
12
+
13
+ ### OysterMcpOwner
14
+
15
+ One tenant's live SDK transports; cold owners refuse old IDs without execution
16
+ replay. The persisted origin is a lifetime pin. Changing the configured origin
17
+ requires a fresh MCP namespace; an existing owner never retargets its retained
18
+ pin.
19
+
20
+ #### Extends
21
+
22
+ - `DurableObject`\<`Env`\>
23
+
24
+ #### Extended by
25
+
26
+ - [`OysterMcp`](#oystermcp)
27
+
28
+ #### Type Parameters
29
+
30
+ | Type Parameter | Default type |
31
+ | --------------------------------------------------------- | ----------------------------------------- |
32
+ | `Env` _extends_ [`OysterMcpOwnerEnv`](#oystermcpownerenv) | [`OysterMcpOwnerEnv`](#oystermcpownerenv) |
33
+
34
+ #### Constructors
35
+
36
+ ##### Constructor
37
+
38
+ ```ts
39
+ new OysterMcpOwner<Env>(
40
+ ctx,
41
+ env,
42
+ createHost
43
+ ): OysterMcpOwner<Env>;
44
+ ```
45
+
46
+ ###### Parameters
47
+
48
+ | Parameter | Type |
49
+ | ------------ | ------------------------------------------------------ |
50
+ | `ctx` | `DurableObjectState` |
51
+ | `env` | `Env` |
52
+ | `createHost` | (`env`, `scope`) => [`OysterHost`](host.md#oysterhost) |
53
+
54
+ ###### Returns
55
+
56
+ [`OysterMcpOwner`](#oystermcpowner)\<`Env`\>
57
+
58
+ ###### Overrides
59
+
60
+ ```ts
61
+ DurableObject<Env>.constructor
62
+ ```
63
+
64
+ #### Methods
65
+
66
+ ##### serve()
67
+
68
+ ```ts
69
+ serve(request, tenant): Promise<Response>;
70
+ ```
71
+
72
+ Trusted host RPC: the namespace and pin are never selected by guest headers.
73
+
74
+ ###### Parameters
75
+
76
+ | Parameter | Type |
77
+ | --------- | ------------------------------------------- |
78
+ | `request` | `Request` |
79
+ | `tenant` | [`OysterMcpTenantPin`](#oystermcptenantpin) |
80
+
81
+ ###### Returns
82
+
83
+ `Promise`\<`Response`\>
84
+
85
+ ---
86
+
87
+ ### OysterRegistry
88
+
89
+ The installation registry: one SQLite-backed Durable Object per Oyster.
90
+
91
+ #### Extends
92
+
93
+ - `DurableObject`\<[`OysterWorkerEnv`](#oysterworkerenv)\>
94
+
95
+ #### Constructors
96
+
97
+ ##### Constructor
98
+
99
+ ```ts
100
+ new OysterRegistry(ctx, env): OysterRegistry;
101
+ ```
102
+
103
+ ###### Parameters
104
+
105
+ | Parameter | Type |
106
+ | --------- | ------------------------------------- |
107
+ | `ctx` | `DurableObjectState` |
108
+ | `env` | [`OysterWorkerEnv`](#oysterworkerenv) |
109
+
110
+ ###### Returns
111
+
112
+ [`OysterRegistry`](#oysterregistry)
113
+
114
+ ###### Overrides
115
+
116
+ ```ts
117
+ DurableObject<OysterWorkerEnv>.constructor
118
+ ```
119
+
120
+ #### Methods
121
+
122
+ ##### directory()
123
+
124
+ ```ts
125
+ directory(): Promise<Readonly<{
126
+ apps: readonly object[];
127
+ roles: OysterRootRoles;
128
+ computer?: Readonly<{
129
+ computerId: string;
130
+ name: string;
131
+ }>;
132
+ }>>;
133
+ ```
134
+
135
+ Current desktop metadata; roles are the ADR's derived default, never Hub's
136
+ stored choice.
137
+
138
+ ###### Returns
139
+
140
+ `Promise`\<`Readonly`\<\{ `apps`: readonly `object`[]; `roles`:
141
+ [`OysterRootRoles`](root-data.md#oysterrootroles); `computer?`: `Readonly`\<\{
142
+ `computerId`: `string`; `name`: `string`; \}\>; \}\>\>
143
+
144
+ ##### storageRead()
145
+
146
+ ```ts
147
+ storageRead(
148
+ installationId,
149
+ ownerId,
150
+ key
151
+ ): Promise<AppStorageResult<{
152
+ value: Json;
153
+ source: "team" | "member" | "none";
154
+ team: | {
155
+ value: Json;
156
+ revision: number;
157
+ }
158
+ | null;
159
+ member: | {
160
+ value: Json;
161
+ revision: number;
162
+ }
163
+ | null;
164
+ canWriteTeam: boolean;
165
+ }>>;
166
+ ```
167
+
168
+ Read one key for the authenticated root owner, under fresh App admission.
169
+
170
+ ###### Parameters
171
+
172
+ | Parameter | Type |
173
+ | ---------------- | -------- |
174
+ | `installationId` | `string` |
175
+ | `ownerId` | `string` |
176
+ | `key` | `string` |
177
+
178
+ ###### Returns
179
+
180
+ `Promise`\<`AppStorageResult`\<\{ `value`: `Json`; `source`: `"team"` \|
181
+ `"member"` \| `"none"`; `team`: \| \{ `value`: `Json`; `revision`: `number`; \}
182
+ \| `null`; `member`: \| \{ `value`: `Json`; `revision`: `number`; \} \| `null`;
183
+ `canWriteTeam`: `boolean`; \}\>\>
184
+
185
+ ##### storageWrite()
186
+
187
+ ```ts
188
+ storageWrite(
189
+ installationId,
190
+ ownerId,
191
+ input
192
+ ): Promise<AppStorageResult<{
193
+ revision: number;
194
+ }>>;
195
+ ```
196
+
197
+ Write one declared key for the authenticated root owner.
198
+
199
+ ###### Parameters
200
+
201
+ | Parameter | Type |
202
+ | ---------------- | ------------------------------------------------------------------------------------------------------- |
203
+ | `installationId` | `string` |
204
+ | `ownerId` | `string` |
205
+ | `input` | \{ `value`: `Json`; `key`: `string`; `scope`: `"team"` \| `"member"`; `basedOn`: `number` \| `null`; \} |
206
+ | `input.value` | `Json` |
207
+ | `input.key` | `string` |
208
+ | `input.scope` | `"team"` \| `"member"` |
209
+ | `input.basedOn` | `number` \| `null` |
210
+
211
+ ###### Returns
212
+
213
+ `Promise`\<`AppStorageResult`\<\{ `revision`: `number`; \}\>\>
214
+
215
+ ##### storageReset()
216
+
217
+ ```ts
218
+ storageReset(
219
+ installationId,
220
+ ownerId,
221
+ input
222
+ ): Promise<AppStorageResult<{
223
+ revision: number;
224
+ }>>;
225
+ ```
226
+
227
+ Reset one declared layer for the authenticated root owner.
228
+
229
+ ###### Parameters
230
+
231
+ | Parameter | Type |
232
+ | ---------------- | -------------------------------------------------------------------------------------- |
233
+ | `installationId` | `string` |
234
+ | `ownerId` | `string` |
235
+ | `input` | \{ `key`: `string`; `scope`: `"team"` \| `"member"`; `basedOn`: `number` \| `null`; \} |
236
+ | `input.key` | `string` |
237
+ | `input.scope` | `"team"` \| `"member"` |
238
+ | `input.basedOn` | `number` \| `null` |
239
+
240
+ ###### Returns
241
+
242
+ `Promise`\<`AppStorageResult`\<\{ `revision`: `number`; \}\>\>
243
+
244
+ ##### storageBackend()
245
+
246
+ ```ts
247
+ storageBackend(
248
+ raw,
249
+ method,
250
+ args,
251
+ tenantId
252
+ ): Promise<OysterBindingResult>;
253
+ ```
254
+
255
+ Storage for a live owner method frame; no guest-selected installation or member.
256
+
257
+ ###### Parameters
258
+
259
+ | Parameter | Type |
260
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
261
+ | `raw` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} |
262
+ | `raw.instanceId` | [`InstanceId`](index.md#instanceid) |
263
+ | `raw.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} |
264
+ | `raw.selection.instanceId` | [`InstanceId`](index.md#instanceid) |
265
+ | `raw.selection.owner` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} |
266
+ | `raw.selection.owner.kind` | `"installation"` \| `"deployment"` |
267
+ | `raw.selection.owner.id` | `string` |
268
+ | `raw.selection.appId` | `AppId` |
269
+ | `raw.selection.releaseId` | `ReleaseId` |
270
+ | `raw.selection.authorityVersion` | `number` |
271
+ | `raw.artifactDigest` | `Sha256Digest` |
272
+ | `raw.subject` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} |
273
+ | `raw.grants` | readonly `object`[] |
274
+ | `raw.deadlineAt` | `number` |
275
+ | `raw.ancestry` | readonly [`InstanceId`](index.md#instanceid)[] |
276
+ | `method` | `string` |
277
+ | `args` | readonly `unknown`[] |
278
+ | `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> |
279
+
280
+ ###### Returns
281
+
282
+ `Promise`\<[`OysterBindingResult`](#oysterbindingresult)\>
283
+
284
+ ##### storageEvents()
285
+
286
+ ```ts
287
+ storageEvents(
288
+ installationId,
289
+ ownerId,
290
+ key
291
+ ): Promise<Response>;
292
+ ```
293
+
294
+ Open the existing App-storage invalidation stream under fresh owner admission.
295
+
296
+ ###### Parameters
297
+
298
+ | Parameter | Type |
299
+ | ---------------- | -------- |
300
+ | `installationId` | `string` |
301
+ | `ownerId` | `string` |
302
+ | `key` | `string` |
303
+
304
+ ###### Returns
305
+
306
+ `Promise`\<`Response`\>
307
+
308
+ ##### list()
309
+
310
+ ```ts
311
+ list(): Readonly<{
312
+ installationId: string;
313
+ instanceId: InstanceId | null;
314
+ appId: AppId;
315
+ release: {
316
+ releaseId: ReleaseId;
317
+ appId: AppId;
318
+ artifact: {
319
+ artifactRef: ArtifactRef;
320
+ artifactDigest: Sha256Digest;
321
+ provenance: {
322
+ sourceRevision: SourceRevision;
323
+ sourceTreeDigest: Sha256Digest;
324
+ buildRecipeDigest: Sha256Digest;
325
+ };
326
+ };
327
+ };
328
+ releasePin: "pinned" | "floating";
329
+ authorityVersion: number;
330
+ status: "enabled" | "disabled" | "deleted";
331
+ visibility: "private" | "public";
332
+ declaredOperationsDigest: Sha256Digest;
333
+ approvedGrants: readonly Readonly<{
334
+ capability: | "agent.list"
335
+ | "agent.manage"
336
+ | "agent.rename"
337
+ | "agent.toolPolicy"
338
+ | "agent.read"
339
+ | "agent.send"
340
+ | "computer.list"
341
+ | "computer.readFile"
342
+ | "computer.writeFile"
343
+ | "computer.execute"
344
+ | "llm.generation"
345
+ | "media.generation"
346
+ | "games:servers"
347
+ | "git.repository"
348
+ | "apps.open"
349
+ | "apps.call"
350
+ | "app.storage"
351
+ | "app.events.emit"
352
+ | "team.workbenchHost"
353
+ | "marketplace.browse"
354
+ | "marketplace.purchase"
355
+ | "workflow.run"
356
+ | "workflow.publish"
357
+ | "workflow.arm"
358
+ | "world"
359
+ | "channels.read"
360
+ | "channels.personal.manage";
361
+ capabilityApproved: true;
362
+ operations: readonly string[];
363
+ resources: | "tenant-scope"
364
+ | readonly Readonly<{
365
+ kind: string;
366
+ id: string;
367
+ }>[];
368
+ }>[];
369
+ approval: | Readonly<{
370
+ by: | {
371
+ kind: "member";
372
+ memberId: string;
373
+ }
374
+ | {
375
+ kind: "agent";
376
+ agentId: string;
377
+ }
378
+ | {
379
+ kind: "team-key";
380
+ keyId: string;
381
+ };
382
+ at: number;
383
+ authorityVersion: number;
384
+ }>
385
+ | null;
386
+ approvedAnonymousMethods: readonly Readonly<{
387
+ name: string;
388
+ digest: Sha256Digest;
389
+ }>[];
390
+ anonymousApproval: | Readonly<{
391
+ by: | {
392
+ kind: "member";
393
+ memberId: string;
394
+ }
395
+ | {
396
+ kind: "agent";
397
+ agentId: string;
398
+ }
399
+ | {
400
+ kind: "team-key";
401
+ keyId: string;
402
+ };
403
+ at: number;
404
+ authorityVersion: number;
405
+ }>
406
+ | null;
407
+ }>[];
408
+ ```
409
+
410
+ Every installation record.
411
+
412
+ ###### Returns
413
+
414
+ `Readonly`\<\{ `installationId`: `string`; `instanceId`:
415
+ [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{
416
+ `releaseId`: `ReleaseId`; `appId`: `AppId`; `artifact`: \{ `artifactRef`:
417
+ `ArtifactRef`; `artifactDigest`: `Sha256Digest`; `provenance`: \{
418
+ `sourceRevision`: `SourceRevision`; `sourceTreeDigest`: `Sha256Digest`;
419
+ `buildRecipeDigest`: `Sha256Digest`; \}; \}; \}; `releasePin`: `"pinned"` \|
420
+ `"floating"`; `authorityVersion`: `number`; `status`: `"enabled"` \|
421
+ `"disabled"` \| `"deleted"`; `visibility`: `"private"` \| `"public"`;
422
+ `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly
423
+ `Readonly`\<\{ `capability`: \| `"agent.list"` \| `"agent.manage"` \|
424
+ `"agent.rename"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \|
425
+ `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \|
426
+ `"computer.execute"` \| `"llm.generation"` \| `"media.generation"` \|
427
+ `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \|
428
+ `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \|
429
+ `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \|
430
+ `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \|
431
+ `"channels.personal.manage"`; `capabilityApproved`: `true`; `operations`:
432
+ readonly `string`[]; `resources`: \| `"tenant-scope"` \| readonly `Readonly`\<\{
433
+ `kind`: `string`; `id`: `string`; \}\>[]; \}\>[]; `approval`: \| `Readonly`\<\{
434
+ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`:
435
+ `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`:
436
+ `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`;
437
+ `approvedAnonymousMethods`: readonly `Readonly`\<\{ `name`: `string`; `digest`:
438
+ `Sha256Digest`; \}\>[]; `anonymousApproval`: \| `Readonly`\<\{ `by`: \| \{
439
+ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`:
440
+ `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`;
441
+ `authorityVersion`: `number`; \}\> \| `null`; \}\>[]
442
+
443
+ ##### get()
444
+
445
+ ```ts
446
+ get(installationId):
447
+ | Readonly<{
448
+ installationId: string;
449
+ instanceId: InstanceId | null;
450
+ appId: AppId;
451
+ release: {
452
+ releaseId: ReleaseId;
453
+ appId: AppId;
454
+ artifact: {
455
+ artifactRef: ArtifactRef;
456
+ artifactDigest: Sha256Digest;
457
+ provenance: {
458
+ sourceRevision: SourceRevision;
459
+ sourceTreeDigest: Sha256Digest;
460
+ buildRecipeDigest: Sha256Digest;
461
+ };
462
+ };
463
+ };
464
+ releasePin: "pinned" | "floating";
465
+ authorityVersion: number;
466
+ status: "enabled" | "disabled" | "deleted";
467
+ visibility: "private" | "public";
468
+ declaredOperationsDigest: Sha256Digest;
469
+ approvedGrants: readonly Readonly<{
470
+ capability: | "agent.list"
471
+ | "agent.manage"
472
+ | "agent.rename"
473
+ | "agent.toolPolicy"
474
+ | "agent.read"
475
+ | "agent.send"
476
+ | "computer.list"
477
+ | "computer.readFile"
478
+ | "computer.writeFile"
479
+ | "computer.execute"
480
+ | "llm.generation"
481
+ | "media.generation"
482
+ | "games:servers"
483
+ | "git.repository"
484
+ | "apps.open"
485
+ | "apps.call"
486
+ | "app.storage"
487
+ | "app.events.emit"
488
+ | "team.workbenchHost"
489
+ | "marketplace.browse"
490
+ | "marketplace.purchase"
491
+ | "workflow.run"
492
+ | "workflow.publish"
493
+ | "workflow.arm"
494
+ | "world"
495
+ | "channels.read"
496
+ | "channels.personal.manage";
497
+ capabilityApproved: true;
498
+ operations: readonly string[];
499
+ resources: | "tenant-scope"
500
+ | readonly Readonly<{
501
+ kind: string;
502
+ id: string;
503
+ }>[];
504
+ }>[];
505
+ approval: | Readonly<{
506
+ by: | {
507
+ kind: "member";
508
+ memberId: string;
509
+ }
510
+ | {
511
+ kind: "agent";
512
+ agentId: string;
513
+ }
514
+ | {
515
+ kind: "team-key";
516
+ keyId: string;
517
+ };
518
+ at: number;
519
+ authorityVersion: number;
520
+ }>
521
+ | null;
522
+ approvedAnonymousMethods: readonly Readonly<{
523
+ name: string;
524
+ digest: Sha256Digest;
525
+ }>[];
526
+ anonymousApproval: | Readonly<{
527
+ by: | {
528
+ kind: "member";
529
+ memberId: string;
530
+ }
531
+ | {
532
+ kind: "agent";
533
+ agentId: string;
534
+ }
535
+ | {
536
+ kind: "team-key";
537
+ keyId: string;
538
+ };
539
+ at: number;
540
+ authorityVersion: number;
541
+ }>
542
+ | null;
543
+ }>
544
+ | null;
545
+ ```
546
+
547
+ One installation record, or `null`.
548
+
549
+ ###### Parameters
550
+
551
+ | Parameter | Type |
552
+ | ---------------- | -------- |
553
+ | `installationId` | `string` |
554
+
555
+ ###### Returns
556
+
557
+ \| `Readonly`\<\{ `installationId`: `string`; `instanceId`:
558
+ [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{
559
+ `releaseId`: `ReleaseId`; `appId`: `AppId`; `artifact`: \{ `artifactRef`:
560
+ `ArtifactRef`; `artifactDigest`: `Sha256Digest`; `provenance`: \{
561
+ `sourceRevision`: `SourceRevision`; `sourceTreeDigest`: `Sha256Digest`;
562
+ `buildRecipeDigest`: `Sha256Digest`; \}; \}; \}; `releasePin`: `"pinned"` \|
563
+ `"floating"`; `authorityVersion`: `number`; `status`: `"enabled"` \|
564
+ `"disabled"` \| `"deleted"`; `visibility`: `"private"` \| `"public"`;
565
+ `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly
566
+ `Readonly`\<\{ `capability`: \| `"agent.list"` \| `"agent.manage"` \|
567
+ `"agent.rename"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \|
568
+ `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \|
569
+ `"computer.execute"` \| `"llm.generation"` \| `"media.generation"` \|
570
+ `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \|
571
+ `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \|
572
+ `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \|
573
+ `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \|
574
+ `"channels.personal.manage"`; `capabilityApproved`: `true`; `operations`:
575
+ readonly `string`[]; `resources`: \| `"tenant-scope"` \| readonly `Readonly`\<\{
576
+ `kind`: `string`; `id`: `string`; \}\>[]; \}\>[]; `approval`: \| `Readonly`\<\{
577
+ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`:
578
+ `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`:
579
+ `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`;
580
+ `approvedAnonymousMethods`: readonly `Readonly`\<\{ `name`: `string`; `digest`:
581
+ `Sha256Digest`; \}\>[]; `anonymousApproval`: \| `Readonly`\<\{ `by`: \| \{
582
+ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`:
583
+ `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`;
584
+ `authorityVersion`: `number`; \}\> \| `null`; \}\> \| `null`
585
+
586
+ ##### put()
587
+
588
+ ```ts
589
+ put(installation, tenantId?): Promise<void>;
590
+ ```
591
+
592
+ Create or replace one installation record.
593
+
594
+ ###### Parameters
595
+
596
+ | Parameter | Type | Default value |
597
+ | -------------- | ---------------------------------------- | --------------- |
598
+ | `installation` | [`Installation`](apps.md#installation) | `undefined` |
599
+ | `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
600
+
601
+ ###### Returns
602
+
603
+ `Promise`\<`void`\>
604
+
605
+ ##### compareAndPut()
606
+
607
+ ```ts
608
+ compareAndPut(
609
+ installation,
610
+ expectedAuthorityVersion,
611
+ tenantId?
612
+ ): Promise<InstallationCommit>;
613
+ ```
614
+
615
+ Native RPC returns a closed result; callers never classify a transported Error.
616
+
617
+ ###### Parameters
618
+
619
+ | Parameter | Type | Default value |
620
+ | -------------------------- | ---------------------------------------- | --------------- |
621
+ | `installation` | [`Installation`](apps.md#installation) | `undefined` |
622
+ | `expectedAuthorityVersion` | `number` | `undefined` |
623
+ | `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
624
+
625
+ ###### Returns
626
+
627
+ `Promise`\<[`InstallationCommit`](host.md#installationcommit)\>
628
+
629
+ ---
630
+
631
+ ### OysterBinding
632
+
633
+ The plain Oyster Worker's guest binding entrypoint.
634
+
635
+ #### Extends
636
+
637
+ - `WorkerEntrypoint`\<`Readonly`\<\{ `OYSTER_OWNER_KEY`: `string`;
638
+ `OYSTER_OWNER_NAME?`: `string`; `AGENT_DIRECTORY?`: `Readonly`\<\{
639
+ `getByName`: `Readonly`\<\{ `readCreator`: `Promise`\<... \| ...\>; \}\>;
640
+ \}\>; `OYSTER_ORIGIN`: `string`; `MCP`:
641
+ `DurableObjectNamespace`\<[`OysterMcpOwner`](#oystermcpowner)\<`Readonly`\<\{
642
+ `LOADER`: `WorkerLoader`; \}\>\>\>; `RELEASES`: `R2Bucket`; `REGISTRY`:
643
+ `DurableObjectNamespace`\<[`OysterRegistry`](#oysterregistry)\>; `INSTANCES`:
644
+ `DurableObjectNamespace`\<[`OysterInstance`](#oysterinstance)\<`Readonly`\<\{
645
+ OYSTER\_OWNER\_KEY: string; OYSTER\_OWNER\_NAME?: string \| undefined;
646
+ AGENT\_DIRECTORY?: Readonly\<\{ getByName(name: string): Readonly\<\{
647
+ readCreator(agentId: string): Promise\<string \| null\>; \}\>; \}\> \|
648
+ undefined; ... 5 more ...; LOADER: WorkerLoader; \}\>\>\>; `LOADER`:
649
+ `WorkerLoader`; \}\>, `Readonly`\<\{ `instanceId`: `string`; `binding`: \|
650
+ `"BACKGROUND"` \| `"GIT"` \| `"EVENTS"` \| `"APPS"` \| `"WORKFLOWS"` \|
651
+ `"APP_STORAGE"` \| `"MEDIA"` \| `"COMPUTER"` \| `"INBOX"` \| `"AGENTS"`;
652
+ `frameId`: `string`; \}\>, `this`\>
653
+
654
+ #### Constructors
655
+
656
+ ##### Constructor
657
+
658
+ ```ts
659
+ new OysterBinding(ctx, env): OysterBinding;
660
+ ```
661
+
662
+ ###### Parameters
663
+
664
+ | Parameter | Type |
665
+ | --------- | ------------------ |
666
+ | `ctx` | `ExecutionContext` |
667
+ | `env` | `Env` |
668
+
669
+ ###### Returns
670
+
671
+ [`OysterBinding`](#oysterbinding)
672
+
673
+ ###### Inherited from
674
+
675
+ ```ts
676
+ oysterBindingEntrypoint(oysterBindings).constructor;
677
+ ```
678
+
679
+ ---
680
+
681
+ ### OysterInstance
682
+
683
+ One App Instance: Oyster's lifecycle supervisor in this Durable Object's SQLite
684
+ and the App backend in its `app` facet.
685
+
686
+ #### Extends
687
+
688
+ - `DurableObject`\<`Env`\>
689
+
690
+ #### Extended by
691
+
692
+ - [`OysterGitInstance`](workers-git.md#abstract-oystergitinstance)
693
+
694
+ #### Type Parameters
695
+
696
+ | Type Parameter | Default type |
697
+ | ----------------------------------------------------- | ------------------------------------- |
698
+ | `Env` _extends_ [`OysterWorkerEnv`](#oysterworkerenv) | [`OysterWorkerEnv`](#oysterworkerenv) |
699
+
700
+ #### Constructors
701
+
702
+ ##### Constructor
703
+
704
+ ```ts
705
+ new OysterInstance<Env>(ctx, env): OysterInstance<Env>;
706
+ ```
707
+
708
+ ###### Parameters
709
+
710
+ | Parameter | Type |
711
+ | --------- | -------------------- |
712
+ | `ctx` | `DurableObjectState` |
713
+ | `env` | `Env` |
714
+
715
+ ###### Returns
716
+
717
+ [`OysterInstance`](#oysterinstance)\<`Env`\>
718
+
719
+ ###### Overrides
720
+
721
+ ```ts
722
+ DurableObject<Env>.constructor
723
+ ```
724
+
725
+ #### Methods
726
+
727
+ ##### bindingCall()
728
+
729
+ ```ts
730
+ bindingCall(
731
+ raw,
732
+ method,
733
+ input
734
+ ): Promise<FrameBindingReply<OysterBindingResult>>;
735
+ ```
736
+
737
+ Resolve each guest packet against its immutable frame before any host effect.
738
+
739
+ ###### Parameters
740
+
741
+ | Parameter | Type |
742
+ | --------- | ------------------------------------------------------ |
743
+ | `raw` | [`FrameBindingProps`](cloudflare.md#framebindingprops) |
744
+ | `method` | `string` |
745
+ | `input` | readonly `unknown`[] |
746
+
747
+ ###### Returns
748
+
749
+ `Promise`\<[`FrameBindingReply`](cloudflare.md#framebindingreply)\<[`OysterBindingResult`](#oysterbindingresult)\>\>
750
+
751
+ ##### gitTip()
752
+
753
+ ```ts
754
+ gitTip(
755
+ installationId,
756
+ repository,
757
+ ref,
758
+ tenantId?
759
+ ): Promise<string | null>;
760
+ ```
761
+
762
+ Last provider-accepted ref recorded by this installation's journal.
763
+
764
+ ###### Parameters
765
+
766
+ | Parameter | Type | Default value |
767
+ | ---------------- | ---------------------------------------- | --------------- |
768
+ | `installationId` | `string` | `undefined` |
769
+ | `repository` | `string` | `undefined` |
770
+ | `ref` | `string` | `undefined` |
771
+ | `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
772
+
773
+ ###### Returns
774
+
775
+ `Promise`\<`string` \| `null`\>
776
+
777
+ ##### recordGitPush()
778
+
779
+ ```ts
780
+ recordGitPush(
781
+ installationId,
782
+ fact,
783
+ tenantId?
784
+ ): Promise<"duplicate" | "recorded">;
785
+ ```
786
+
787
+ Join accepted fact identity and Carrier delivery in one local transaction.
788
+
789
+ ###### Parameters
790
+
791
+ | Parameter | Type | Default value |
792
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
793
+ | `installationId` | `string` | `undefined` |
794
+ | `fact` | \{ `repository`: `string`; `writer`: \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \}; `updates`: `object`[]; `unexplained?`: `object`[]; `eventId`: `string`; \} | `undefined` |
795
+ | `fact.repository` | `string` | `undefined` |
796
+ | `fact.writer` | \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \} | `undefined` |
797
+ | `fact.updates` | `object`[] | `undefined` |
798
+ | `fact.unexplained?` | `object`[] | `undefined` |
799
+ | `fact.eventId` | `string` | `undefined` |
800
+ | `tenantId` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
801
+
802
+ ###### Returns
803
+
804
+ `Promise`\<`"duplicate"` \| `"recorded"`\>
805
+
806
+ ##### alarm()
807
+
808
+ ```ts
809
+ alarm(): Promise<void>;
810
+ ```
811
+
812
+ Carrier owns retries, dead letters and retained delivery receipts.
813
+
814
+ ###### Returns
815
+
816
+ `Promise`\<`void`\>
817
+
818
+ ###### Overrides
819
+
820
+ ```ts
821
+ DurableObject.alarm;
822
+ ```
823
+
824
+ ##### revoke()
825
+
826
+ ```ts
827
+ revoke(
828
+ installationId,
829
+ runId?,
830
+ tenantId?
831
+ ): Promise<void>;
832
+ ```
833
+
834
+ Installation changes end guest work; a Workflow cancel targets only its run.
835
+
836
+ ###### Parameters
837
+
838
+ | Parameter | Type | Default value |
839
+ | ---------------- | ---------------------------------------- | --------------- |
840
+ | `installationId` | `string` | `undefined` |
841
+ | `runId?` | `string` | `undefined` |
842
+ | `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
843
+
844
+ ###### Returns
845
+
846
+ `Promise`\<`void`\>
847
+
848
+ ##### apply()
849
+
850
+ ```ts
851
+ apply(
852
+ state,
853
+ release,
854
+ limits,
855
+ tenant
856
+ ): Promise<InstanceResult<{
857
+ instanceId: InstanceId;
858
+ owner: {
859
+ kind: "installation" | "deployment";
860
+ id: string;
861
+ };
862
+ appId: AppId;
863
+ releaseId: ReleaseId;
864
+ authorityVersion: number;
865
+ stateSchema: number | null;
866
+ desiredStatus: "enabled" | "disabled" | "deleted";
867
+ status: "disabled" | "deleted" | "active" | "deleting";
868
+ }>>;
869
+ ```
870
+
871
+ Remember `release`, then apply the owner state under the host's tenant pin.
872
+
873
+ ###### Parameters
874
+
875
+ | Parameter | Type |
876
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
877
+ | `state` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; \} |
878
+ | `state.instanceId` | [`InstanceId`](index.md#instanceid) |
879
+ | `state.owner` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} |
880
+ | `state.owner.kind` | `"installation"` \| `"deployment"` |
881
+ | `state.owner.id` | `string` |
882
+ | `state.appId` | `AppId` |
883
+ | `state.releaseId` | `ReleaseId` |
884
+ | `state.authorityVersion` | `number` |
885
+ | `state.status` | `"enabled"` \| `"disabled"` \| `"deleted"` |
886
+ | `release` | `Release` |
887
+ | `limits` | \| `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> \| `undefined` |
888
+ | `tenant` | `Pick`\<[`TenantScope`](tenant.md#tenantscope), `"tenantId"` \| `"origin"`\> |
889
+
890
+ ###### Returns
891
+
892
+ `Promise`\<[`InstanceResult`](host.md#instanceresult)\<\{ `instanceId`:
893
+ [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \|
894
+ `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`;
895
+ `authorityVersion`: `number`; `stateSchema`: `number` \| `null`;
896
+ `desiredStatus`: `"enabled"` \| `"disabled"` \| `"deleted"`; `status`:
897
+ `"disabled"` \| `"deleted"` \| `"active"` \| `"deleting"`; \}\>\>
898
+
899
+ ##### backend()
900
+
901
+ ```ts
902
+ backend(
903
+ facts,
904
+ request,
905
+ limits?,
906
+ tenantId?
907
+ ): Promise<Response>;
908
+ ```
909
+
910
+ Forward an admitted HTTP request to the App backend.
911
+
912
+ ###### Parameters
913
+
914
+ | Parameter | Type | Default value |
915
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
916
+ | `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
917
+ | `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
918
+ | `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
919
+ | `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
920
+ | `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
921
+ | `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
922
+ | `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
923
+ | `facts.selection.appId?` | `AppId` | `appIdSchema` |
924
+ | `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
925
+ | `facts.selection.authorityVersion?` | `number` | `...` |
926
+ | `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
927
+ | `facts.subject?` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `...` |
928
+ | `facts.grants?` | readonly `object`[] | `grantsSchema` |
929
+ | `facts.deadlineAt?` | `number` | `...` |
930
+ | `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
931
+ | `request?` | `Request` | `undefined` |
932
+ | `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
933
+ | `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
934
+
935
+ ###### Returns
936
+
937
+ `Promise`\<`Response`\>
938
+
939
+ ##### onGitPush()
940
+
941
+ ```ts
942
+ onGitPush(
943
+ facts,
944
+ fact,
945
+ limits?,
946
+ tenantId?
947
+ ): Promise<void>;
948
+ ```
949
+
950
+ Deliver a Git push through the same selected-Instance admission as methods.
951
+
952
+ ###### Parameters
953
+
954
+ | Parameter | Type | Default value |
955
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
956
+ | `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
957
+ | `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
958
+ | `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
959
+ | `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
960
+ | `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
961
+ | `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
962
+ | `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
963
+ | `facts.selection.appId?` | `AppId` | `appIdSchema` |
964
+ | `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
965
+ | `facts.selection.authorityVersion?` | `number` | `...` |
966
+ | `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
967
+ | `facts.subject?` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `...` |
968
+ | `facts.grants?` | readonly `object`[] | `grantsSchema` |
969
+ | `facts.deadlineAt?` | `number` | `...` |
970
+ | `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
971
+ | `fact?` | \{ `repository`: `string`; `writer`: \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \}; `updates`: `object`[]; `unexplained?`: `object`[]; `eventId`: `string`; \} | `undefined` |
972
+ | `fact.repository?` | `string` | `undefined` |
973
+ | `fact.writer?` | \| \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} \| \{ `kind`: `"installation"`; `installationId`: `string`; `onBehalfOf`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} \| `null`; \} | `undefined` |
974
+ | `fact.updates?` | `object`[] | `undefined` |
975
+ | `fact.unexplained?` | `object`[] | `undefined` |
976
+ | `fact.eventId?` | `string` | `undefined` |
977
+ | `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
978
+ | `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
979
+
980
+ ###### Returns
981
+
982
+ `Promise`\<`void`\>
983
+
984
+ ##### authorizeGitPush()
985
+
986
+ ```ts
987
+ authorizeGitPush(
988
+ facts,
989
+ question,
990
+ limits?,
991
+ tenantId?
992
+ ): Promise<
993
+ | {
994
+ allowed: true;
995
+ }
996
+ | {
997
+ allowed: false;
998
+ refused: object[];
999
+ }>;
1000
+ ```
1001
+
1002
+ Ask the App's declared authorizer through the same frame-bound connection.
1003
+
1004
+ ###### Parameters
1005
+
1006
+ | Parameter | Type | Default value |
1007
+ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
1008
+ | `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
1009
+ | `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1010
+ | `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
1011
+ | `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1012
+ | `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
1013
+ | `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
1014
+ | `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
1015
+ | `facts.selection.appId?` | `AppId` | `appIdSchema` |
1016
+ | `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
1017
+ | `facts.selection.authorityVersion?` | `number` | `...` |
1018
+ | `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
1019
+ | `facts.subject?` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `...` |
1020
+ | `facts.grants?` | readonly `object`[] | `grantsSchema` |
1021
+ | `facts.deadlineAt?` | `number` | `...` |
1022
+ | `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
1023
+ | `question?` | \{ `repository`: `string`; `writer`: \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \}; `updates`: `object`[]; \} | `undefined` |
1024
+ | `question.repository?` | `string` | `undefined` |
1025
+ | `question.writer?` | \{ `kind`: `"actor"`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `role?`: `"member"` \| `"owner"`; `workflow?`: \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \}; \} | `undefined` |
1026
+ | `question.writer.kind?` | `"actor"` | `undefined` |
1027
+ | `question.writer.actor?` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
1028
+ | `question.writer.role?` | `"member"` \| `"owner"` | `undefined` |
1029
+ | `question.writer.workflow?` | \{ `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `branches`: `string`[]; `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; \} | `undefined` |
1030
+ | `question.writer.workflow.armedBy?` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `undefined` |
1031
+ | `question.writer.workflow.branches?` | `string`[] | `undefined` |
1032
+ | `question.writer.workflow.workflowId?` | `string` | `undefined` |
1033
+ | `question.writer.workflow.runId?` | `string` | `undefined` |
1034
+ | `question.writer.workflow.nodeId?` | `string` | `undefined` |
1035
+ | `question.updates?` | `object`[] | `undefined` |
1036
+ | `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
1037
+ | `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
1038
+
1039
+ ###### Returns
1040
+
1041
+ `Promise`\< \| \{ `allowed`: `true`; \} \| \{ `allowed`: `false`; `refused`:
1042
+ `object`[]; \}\>
1043
+
1044
+ ##### syncRefused()
1045
+
1046
+ ```ts
1047
+ syncRefused(
1048
+ facts,
1049
+ refusal,
1050
+ limits?,
1051
+ tenantId?
1052
+ ): Promise<void>;
1053
+ ```
1054
+
1055
+ An available lane settles a refusal under an active frame with no binding
1056
+ grants.
1057
+
1058
+ ###### Parameters
1059
+
1060
+ | Parameter | Type | Default value |
1061
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
1062
+ | `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
1063
+ | `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1064
+ | `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
1065
+ | `facts.selection.instanceId?` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1066
+ | `facts.selection.owner?` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
1067
+ | `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
1068
+ | `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
1069
+ | `facts.selection.appId?` | `AppId` | `appIdSchema` |
1070
+ | `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
1071
+ | `facts.selection.authorityVersion?` | `number` | `...` |
1072
+ | `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
1073
+ | `facts.subject?` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `...` |
1074
+ | `facts.grants?` | readonly `object`[] | `grantsSchema` |
1075
+ | `facts.deadlineAt?` | `number` | `...` |
1076
+ | `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
1077
+ | `refusal?` | \{ `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `undefined` |
1078
+ | `refusal.lane?` | `string` | `undefined` |
1079
+ | `refusal.code?` | `"access_changed"` \| `"installation_unavailable"` | `undefined` |
1080
+ | `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
1081
+ | `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
1082
+
1083
+ ###### Returns
1084
+
1085
+ `Promise`\<`void`\>
1086
+
1087
+ ##### gill()
1088
+
1089
+ ```ts
1090
+ gill(
1091
+ facts,
1092
+ _api,
1093
+ source,
1094
+ input,
1095
+ limits?,
1096
+ tenantId?
1097
+ ): Promise<InstanceResult<
1098
+ | {
1099
+ viewId: string;
1100
+ title: string;
1101
+ state: "empty";
1102
+ rows: readonly [];
1103
+ next?: string;
1104
+ }
1105
+ | {
1106
+ viewId: string;
1107
+ title: string;
1108
+ state: "error";
1109
+ rows: readonly [];
1110
+ reason?: "exec_isolation_required" | "params_required";
1111
+ error: string;
1112
+ recovery?: | {
1113
+ kind: "configure";
1114
+ param: string;
1115
+ }
1116
+ | {
1117
+ kind: "open";
1118
+ };
1119
+ }
1120
+ | {
1121
+ viewId: string;
1122
+ title: string;
1123
+ state: "full";
1124
+ rows: readonly object[];
1125
+ next?: string;
1126
+ }
1127
+ | {
1128
+ options: readonly object[];
1129
+ next?: string;
1130
+ }>>;
1131
+ ```
1132
+
1133
+ Invoke a Release-declared Gill in a fresh immutable frame.
1134
+
1135
+ ###### Parameters
1136
+
1137
+ | Parameter | Type | Default value |
1138
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
1139
+ | `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
1140
+ | `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1141
+ | `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
1142
+ | `facts.selection.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1143
+ | `facts.selection.owner` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
1144
+ | `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
1145
+ | `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
1146
+ | `facts.selection.appId?` | `AppId` | `appIdSchema` |
1147
+ | `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
1148
+ | `facts.selection.authorityVersion?` | `number` | `...` |
1149
+ | `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
1150
+ | `facts.subject?` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `...` |
1151
+ | `facts.grants?` | readonly `object`[] | `grantsSchema` |
1152
+ | `facts.deadlineAt?` | `number` | `...` |
1153
+ | `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
1154
+ | `_api?` | `AppApi` | `undefined` |
1155
+ | `source?` | `string` | `undefined` |
1156
+ | `input?` | \{ `id`: `string`; `params?`: \{ \[`key`: `string`\]: `string`; \}; `after?`: `string`; `options?`: `string`; \} | `undefined` |
1157
+ | `input.id?` | `string` | `undefined` |
1158
+ | `input.params?` | \{ \[`key`: `string`\]: `string`; \} | `undefined` |
1159
+ | `input.after?` | `string` | `undefined` |
1160
+ | `input.options?` | `string` | `undefined` |
1161
+ | `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
1162
+ | `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
1163
+
1164
+ ###### Returns
1165
+
1166
+ `Promise`\<[`InstanceResult`](host.md#instanceresult)\< \| \{ `viewId`:
1167
+ `string`; `title`: `string`; `state`: `"empty"`; `rows`: readonly \[\]; `next?`:
1168
+ `string`; \} \| \{ `viewId`: `string`; `title`: `string`; `state`: `"error"`;
1169
+ `rows`: readonly \[\]; `reason?`: `"exec_isolation_required"` \|
1170
+ `"params_required"`; `error`: `string`; `recovery?`: \| \{ `kind`:
1171
+ `"configure"`; `param`: `string`; \} \| \{ `kind`: `"open"`; \}; \} \| \{
1172
+ `viewId`: `string`; `title`: `string`; `state`: `"full"`; `rows`: readonly
1173
+ `object`[]; `next?`: `string`; \} \| \{ `options`: readonly `object`[]; `next?`:
1174
+ `string`; \}\>\>
1175
+
1176
+ ##### call()
1177
+
1178
+ ```ts
1179
+ call(
1180
+ facts,
1181
+ _api,
1182
+ name,
1183
+ input,
1184
+ limits?,
1185
+ tenantId?
1186
+ ): Promise<InstanceResult<Json>>;
1187
+ ```
1188
+
1189
+ Invoke one declared App method; the value is its AppMethodReply wire, which the
1190
+ host handle decodes.
1191
+
1192
+ ###### Parameters
1193
+
1194
+ | Parameter | Type | Default value |
1195
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
1196
+ | `facts` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `selection`: \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \}; `artifactDigest`: `Sha256Digest`; `subject`: \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \}; `grants`: readonly `object`[]; `deadlineAt`: `number`; `ancestry`: readonly [`InstanceId`](index.md#instanceid)[]; \} | `undefined` |
1197
+ | `facts.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1198
+ | `facts.selection` | \{ `instanceId`: [`InstanceId`](index.md#instanceid); `owner`: \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \}; `appId`: `AppId`; `releaseId`: `ReleaseId`; `authorityVersion`: `number`; \} | `selectionSchema` |
1199
+ | `facts.selection.instanceId` | [`InstanceId`](index.md#instanceid) | `instanceIdSchema` |
1200
+ | `facts.selection.owner` | \{ `kind`: `"installation"` \| `"deployment"`; `id`: `string`; \} | `ownerSchema` |
1201
+ | `facts.selection.owner.kind?` | `"installation"` \| `"deployment"` | `...` |
1202
+ | `facts.selection.owner.id?` | `string` | `Schema.NonEmptyString` |
1203
+ | `facts.selection.appId?` | `AppId` | `appIdSchema` |
1204
+ | `facts.selection.releaseId?` | `ReleaseId` | `releaseIdSchema` |
1205
+ | `facts.selection.authorityVersion?` | `number` | `...` |
1206
+ | `facts.artifactDigest?` | `Sha256Digest` | `sha256DigestSchema` |
1207
+ | `facts.subject?` | \| \{ `kind`: `"call"`; `context`: \{ `computerId`: `string` \| `null`; `actor`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `backgroundLane?`: `string`; `backgroundOrigin?`: \{ `method`: `string`; `seal`: `string`; \}; `role?`: `"member"` \| `"owner"`; `soleMember?`: `true`; `workflow?`: \{ `workflowId`: `string`; `runId`: `string`; `nodeId`: `string`; `armedBy`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; \}; `idempotencyKey?`: `string`; \}; `sessionId?`: `string`; `agentPolicy?`: \{ `policyRevision`: `string`; `grantorMemberId`: `string`; \}; `method?`: \{ `name`: `string`; `effect`: `"read"` \| `"write"` \| `"external"`; \}; `replay?`: \{ `lane`: `string`; `epoch`: `number`; `admitted`: readonly `string`[]; \}; \} \| \{ `kind`: `"lifecycle"`; `name`: `"onGitPush"`; `eventId`: `string`; \} \| \{ `kind`: `"lifecycle"`; `name`: `"syncRefused"`; `lane`: `string`; `code`: `"access_changed"` \| `"installation_unavailable"`; \} | `...` |
1208
+ | `facts.grants?` | readonly `object`[] | `grantsSchema` |
1209
+ | `facts.deadlineAt?` | `number` | `...` |
1210
+ | `facts.ancestry?` | readonly [`InstanceId`](index.md#instanceid)[] | `...` |
1211
+ | `_api?` | `AppApi` | `undefined` |
1212
+ | `name?` | `string` | `undefined` |
1213
+ | `input?` | `Json` | `undefined` |
1214
+ | `limits?` | `Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\> | `undefined` |
1215
+ | `tenantId?` | `string` & `Brand`\<`"OysterTenantId"`\> | `defaultTenant` |
1216
+
1217
+ ###### Returns
1218
+
1219
+ `Promise`\<[`InstanceResult`](host.md#instanceresult)\<`Json`\>\>
1220
+
1221
+ ---
1222
+
1223
+ ### OysterMcp
1224
+
1225
+ The non-git standalone root's MCP owner.
1226
+
1227
+ #### Extends
1228
+
1229
+ - [`OysterMcpOwner`](#oystermcpowner)\<`Readonly`\<\{ `OYSTER_OWNER_KEY`:
1230
+ `string`; `OYSTER_OWNER_NAME?`: `string`; `AGENT_DIRECTORY?`: `Readonly`\<\{
1231
+ `getByName`: `Readonly`\<\{ `readCreator`: `Promise`\<... \| ...\>; \}\>;
1232
+ \}\>; `OYSTER_ORIGIN`: `string`; `MCP`:
1233
+ `DurableObjectNamespace`\<[`OysterMcpOwner`](#oystermcpowner)\<`Readonly`\<\{
1234
+ `LOADER`: `WorkerLoader`; \}\>\>\>; `RELEASES`: `R2Bucket`; `REGISTRY`:
1235
+ `DurableObjectNamespace`\<[`OysterRegistry`](#oysterregistry)\>; `INSTANCES`:
1236
+ `DurableObjectNamespace`\<[`OysterInstance`](#oysterinstance)\<`Readonly`\<\{
1237
+ OYSTER\_OWNER\_KEY: string; OYSTER\_OWNER\_NAME?: string \| undefined;
1238
+ AGENT\_DIRECTORY?: Readonly\<\{ getByName(name: string): Readonly\<\{
1239
+ readCreator(agentId: string): Promise\<string \| null\>; \}\>; \}\> \|
1240
+ undefined; ... 5 more ...; LOADER: WorkerLoader; \}\>\>\>; `LOADER`:
1241
+ `WorkerLoader`; \}\>, `this`\>
1242
+
1243
+ #### Constructors
1244
+
1245
+ ##### Constructor
1246
+
1247
+ ```ts
1248
+ new OysterMcp(ctx, env): OysterMcp;
1249
+ ```
1250
+
1251
+ ###### Parameters
1252
+
1253
+ | Parameter | Type |
1254
+ | --------- | -------------------- |
1255
+ | `ctx` | `DurableObjectState` |
1256
+ | `env` | `Env` |
1257
+
1258
+ ###### Returns
1259
+
1260
+ [`OysterMcp`](#oystermcp)
1261
+
1262
+ ###### Inherited from
1263
+
1264
+ [`OysterMcpOwner`](#oystermcpowner).[`constructor`](#constructor)
1265
+
1266
+ #### Methods
1267
+
1268
+ ##### serve()
1269
+
1270
+ ```ts
1271
+ serve(request, tenant): Promise<Response>;
1272
+ ```
1273
+
1274
+ Trusted host RPC: the namespace and pin are never selected by guest headers.
1275
+
1276
+ ###### Parameters
1277
+
1278
+ | Parameter | Type |
1279
+ | --------- | ------------------------------------------- |
1280
+ | `request` | `Request` |
1281
+ | `tenant` | [`OysterMcpTenantPin`](#oystermcptenantpin) |
1282
+
1283
+ ###### Returns
1284
+
1285
+ `Promise`\<`Response`\>
1286
+
1287
+ ###### Inherited from
1288
+
1289
+ [`OysterMcpOwner`](#oystermcpowner).[`serve`](#serve)
1290
+
1291
+ ## Type Aliases
1292
+
1293
+ ### OysterMcpOwnerEnv
1294
+
1295
+ ```ts
1296
+ type OysterMcpOwnerEnv = Readonly<{
1297
+ LOADER: WorkerLoader;
1298
+ }>;
1299
+ ```
1300
+
1301
+ Worker Loader used by the existing Mycelium sandbox.
1302
+
1303
+ ---
1304
+
1305
+ ### OysterMcpTenantPin
1306
+
1307
+ ```ts
1308
+ type OysterMcpTenantPin = Readonly<{
1309
+ tenantId: string;
1310
+ origin: string;
1311
+ }>;
1312
+ ```
1313
+
1314
+ Serialized trusted tenant pin supplied by the selected host.
1315
+
1316
+ ---
1317
+
1318
+ ### OysterBindingResult
1319
+
1320
+ ```ts
1321
+ type OysterBindingResult =
1322
+ Awaited<ReturnType<GitBinding[keyof GitBinding]>> | Schema.Json | undefined;
1323
+ ```
1324
+
1325
+ Native values returned by the standalone Git, event and JSON binding owners.
1326
+
1327
+ ---
1328
+
1329
+ ### OysterInvocationHost
1330
+
1331
+ ```ts
1332
+ type OysterInvocationHost = BackgroundFrameState &
1333
+ Readonly<{
1334
+ artifact: Backend;
1335
+ declaration: AppDeclaration | null;
1336
+ method?: Readonly<{
1337
+ name: string;
1338
+ }>;
1339
+ }>;
1340
+ ```
1341
+
1342
+ Verified backend custody is captured in the frame, never in a current-context
1343
+ field.
1344
+
1345
+ ---
1346
+
1347
+ ### OysterStorageAgentDirectory
1348
+
1349
+ ```ts
1350
+ type OysterStorageAgentDirectory = Readonly<{
1351
+ getByName: Readonly<{
1352
+ readCreator: Promise<string | null>;
1353
+ }>;
1354
+ }>;
1355
+ ```
1356
+
1357
+ Existing fleet directory owner records, resolved by the host rather than App
1358
+ input.
1359
+
1360
+ ---
1361
+
1362
+ ### OysterWorkerEnv
1363
+
1364
+ ```ts
1365
+ type OysterWorkerEnv = Readonly<{
1366
+ OYSTER_OWNER_KEY: string;
1367
+ OYSTER_OWNER_NAME?: string;
1368
+ AGENT_DIRECTORY?: OysterStorageAgentDirectory;
1369
+ OYSTER_ORIGIN: string;
1370
+ MCP: DurableObjectNamespace<OysterMcpOwner>;
1371
+ RELEASES: R2Bucket;
1372
+ REGISTRY: DurableObjectNamespace<OysterRegistry>;
1373
+ INSTANCES: DurableObjectNamespace<OysterInstance>;
1374
+ LOADER: WorkerLoader;
1375
+ }>;
1376
+ ```
1377
+
1378
+ Bindings a standalone Oyster Worker declares in its Wrangler config.
1379
+
1380
+ ---
1381
+
1382
+ ### OysterBindingContext
1383
+
1384
+ ```ts
1385
+ type OysterBindingContext<Env> = Readonly<{
1386
+ env: Env;
1387
+ scope: TenantScope;
1388
+ backgroundHost: Promise<
1389
+ | Readonly<{
1390
+ auth: OysterAuth;
1391
+ backgroundOriginKey?: () => Promise<CryptoKey>;
1392
+ artifacts: ArtifactStore;
1393
+ installations: InstallationStore;
1394
+ instances: InstanceDirectory;
1395
+ computerId?: string;
1396
+ computer?: (principal) => KnapsackComputer | null | Promise<KnapsackComputer | null>;
1397
+ appToolPolicy?: (actor) =>
1398
+ | AppToolPolicy
1399
+ | null
1400
+ | Promise<AppToolPolicy | null>;
1401
+ keys?: Readonly<{
1402
+ live: Promise<Readonly<...> | null>;
1403
+ }>;
1404
+ guestLimits?: Partial<GuestLimits>;
1405
+ mcp?: OysterMcp;
1406
+ git?: OysterGitHost;
1407
+ ownerRoutes?: Hono<OysterEnv>;
1408
+ capabilities?: readonly OysterCapability[];
1409
+ workbench?: Readonly<{
1410
+ directory: Promise<Readonly<{
1411
+ apps: ...;
1412
+ roles: ...;
1413
+ computer?: ...;
1414
+ }>>;
1415
+ storage: Pick<AppStorageWire, ... | ... | ...> & Readonly<{
1416
+ events: ...;
1417
+ }>;
1418
+ }>;
1419
+ homeInstallationId?: string;
1420
+ pageScript?: string;
1421
+ title?: string;
1422
+ }>
1423
+ | null>;
1424
+ }>;
1425
+ ```
1426
+
1427
+ What a binding row may read from the Instance that owns the frame.
1428
+
1429
+ #### Type Parameters
1430
+
1431
+ | Type Parameter |
1432
+ | -------------- |
1433
+ | `Env` |
1434
+
1435
+ ---
1436
+
1437
+ ### OysterBindingRow
1438
+
1439
+ ```ts
1440
+ type OysterBindingRow<Env> = Readonly<{
1441
+ methods: Readonly<Record<string, FrameBindingMethod<OysterBindingResult>>>;
1442
+ dispatch: Promise<OysterBindingResult>;
1443
+ }>;
1444
+ ```
1445
+
1446
+ One guest binding: the frame codecs both sides of the RPC share, and the host
1447
+ owner that serves a decoded, granted packet under its captured frame.
1448
+
1449
+ #### Type Parameters
1450
+
1451
+ | Type Parameter |
1452
+ | -------------- |
1453
+ | `Env` |
1454
+
1455
+ ---
1456
+
1457
+ ### OysterBindingTable
1458
+
1459
+ ```ts
1460
+ type OysterBindingTable<Env> = Readonly<{
1461
+ APP_STORAGE?: OysterBindingRow<Env>;
1462
+ APPS?: OysterBindingRow<Env>;
1463
+ BACKGROUND?: OysterBindingRow<Env>;
1464
+ GIT?: OysterBindingRow<Env>;
1465
+ EVENTS?: OysterBindingRow<Env>;
1466
+ INBOX?: OysterBindingRow<Env>;
1467
+ AGENTS?: OysterBindingRow<Env>;
1468
+ COMPUTER?: OysterBindingRow<Env>;
1469
+ MEDIA?: OysterBindingRow<Env>;
1470
+ WORKFLOWS?: OysterBindingRow<Env>;
1471
+ }>;
1472
+ ```
1473
+
1474
+ The bindings an Instance serves, keyed by the closed App binding vocabulary; a
1475
+ missing row is `binding_unavailable`.
1476
+
1477
+ #### Type Parameters
1478
+
1479
+ | Type Parameter |
1480
+ | -------------- |
1481
+ | `Env` |
1482
+
1483
+ ---
1484
+
1485
+ ### OysterWorkspace
1486
+
1487
+ ```ts
1488
+ type OysterWorkspace = Readonly<{
1489
+ computerId: string;
1490
+ files: FileSource;
1491
+ computer?: OysterHost["computer"];
1492
+ }>;
1493
+ ```
1494
+
1495
+ One host-selected workspace shared by App context and capability adapters.
1496
+
1497
+ ## Variables
1498
+
1499
+ ### oysterBindings
1500
+
1501
+ ```ts
1502
+ const oysterBindings: OysterBindingTable<OysterWorkerEnv>;
1503
+ ```
1504
+
1505
+ The plain Oyster host's bindings: App storage, the read-only catalog and replay
1506
+ admission.
1507
+
1508
+ ## Functions
1509
+
1510
+ ### createOysterMcpOwner()
1511
+
1512
+ ```ts
1513
+ function createOysterMcpOwner<Env>(host): (ctx, env) => OysterMcpOwner<Env>;
1514
+ ```
1515
+
1516
+ Bind the owner to the deployment's existing host factory and options.
1517
+
1518
+ #### Type Parameters
1519
+
1520
+ | Type Parameter |
1521
+ | ------------------------------------------------------------- |
1522
+ | `Env` _extends_ `Readonly`\<\{ `LOADER`: `WorkerLoader`; \}\> |
1523
+
1524
+ #### Parameters
1525
+
1526
+ | Parameter | Type |
1527
+ | --------- | ------------------------------------------------------ |
1528
+ | `host` | (`env`, `scope`) => [`OysterHost`](host.md#oysterhost) |
1529
+
1530
+ #### Returns
1531
+
1532
+ (`ctx`, `env`) => [`OysterMcpOwner`](#oystermcpowner)\<`Env`\>
1533
+
1534
+ ---
1535
+
1536
+ ### r2FileSource()
1537
+
1538
+ ```ts
1539
+ function r2FileSource(bucket, prefix): FileSource;
1540
+ ```
1541
+
1542
+ Files in an R2 bucket under `prefix` (one workspace per prefix).
1543
+
1544
+ #### Parameters
1545
+
1546
+ | Parameter | Type |
1547
+ | --------- | ---------- |
1548
+ | `bucket` | `R2Bucket` |
1549
+ | `prefix` | `string` |
1550
+
1551
+ #### Returns
1552
+
1553
+ [`FileSource`](files.md#filesource)
1554
+
1555
+ ---
1556
+
1557
+ ### r2ArtifactStore()
1558
+
1559
+ ```ts
1560
+ function r2ArtifactStore(bucket): ArtifactStore;
1561
+ ```
1562
+
1563
+ Store Release artifacts in an R2 bucket.
1564
+
1565
+ #### Parameters
1566
+
1567
+ | Parameter | Type |
1568
+ | --------- | ---------- |
1569
+ | `bucket` | `R2Bucket` |
1570
+
1571
+ #### Returns
1572
+
1573
+ [`ArtifactStore`](host.md#artifactstore)
1574
+
1575
+ ---
1576
+
1577
+ ### oysterBindingEntrypoint()
1578
+
1579
+ ```ts
1580
+ function oysterBindingEntrypoint<Env>(table): typeof WorkerEntrypoint;
1581
+ ```
1582
+
1583
+ The one guest binding entrypoint over `table`. Every binding in a frame is this
1584
+ export with its own props; each packet returns to its originating Instance,
1585
+ which serves it from the same table.
1586
+
1587
+ #### Type Parameters
1588
+
1589
+ | Type Parameter |
1590
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1591
+ | `Env` _extends_ `Readonly`\<\{ `OYSTER_OWNER_KEY`: `string`; `OYSTER_OWNER_NAME?`: `string`; `AGENT_DIRECTORY?`: `Readonly`\<\{ `getByName`: `Readonly`\<\{ `readCreator`: `Promise`\<`string` \| `null`\>; \}\>; \}\>; `OYSTER_ORIGIN`: `string`; `MCP`: `DurableObjectNamespace`\<[`OysterMcpOwner`](#oystermcpowner)\<`Readonly`\<\{ `LOADER`: `WorkerLoader`; \}\>\>\>; `RELEASES`: `R2Bucket`; `REGISTRY`: `DurableObjectNamespace`\<[`OysterRegistry`](#oysterregistry)\>; `INSTANCES`: `DurableObjectNamespace`\<[`OysterInstance`](#oysterinstance)\<`Readonly`\<\{ OYSTER\_OWNER\_KEY: string; OYSTER\_OWNER\_NAME?: string \| undefined; AGENT\_DIRECTORY?: Readonly\<\{ getByName(name: string): Readonly\<\{ readCreator(agentId: string): Promise\<string \| null\>; \}\>; \}\> \| undefined; ... 5 more ...; LOADER: WorkerLoader; \}\>\>\>; `LOADER`: `WorkerLoader`; \}\> |
1592
+
1593
+ #### Parameters
1594
+
1595
+ | Parameter | Type |
1596
+ | --------- | ---------------------------------------------------- |
1597
+ | `table` | [`OysterBindingTable`](#oysterbindingtable)\<`Env`\> |
1598
+
1599
+ #### Returns
1600
+
1601
+ _typeof_ `WorkerEntrypoint`
1602
+
1603
+ ---
1604
+
1605
+ ### oysterWorkerHost()
1606
+
1607
+ ```ts
1608
+ function oysterWorkerHost(env, auth, options?): OysterHost;
1609
+ ```
1610
+
1611
+ Host adapters for a standalone Oyster Worker over its own bindings.
1612
+
1613
+ #### Parameters
1614
+
1615
+ | Parameter | Type |
1616
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1617
+ | `env` | [`OysterWorkerEnv`](#oysterworkerenv) |
1618
+ | `auth` | [`OysterAuth`](host.md#oysterauth) |
1619
+ | `options` | `Pick`\<`Readonly`\<\{ `auth`: [`OysterAuth`](host.md#oysterauth); `backgroundOriginKey?`: () => `Promise`\<`CryptoKey`\>; `artifacts`: [`ArtifactStore`](host.md#artifactstore); `installations`: [`InstallationStore`](host.md#installationstore); `instances`: [`InstanceDirectory`](host.md#instancedirectory); `computerId?`: `string`; `computer?`: (`principal`) => \| `Readonly`\<\{ `getCapabilities`: (`signal`) => `Promise`\<...\>; `call`: (`capabilityId`, `input`, `context`) => `Promise`\<...\>; \}\> \| `Promise`\< \| `Readonly`\<\{ `getCapabilities`: ...; `call`: ...; \}\> \| `null`\> \| `null`; `appToolPolicy?`: (`actor`) => \| \{ `level`: `"read"` \| `"write"`; `revision`: `string`; `grantedBy`: `string`; \} \| `Promise`\< \| \{ `level`: ... \| ...; `revision`: `string`; `grantedBy`: `string`; \} \| `null`\> \| `null`; `keys?`: `Readonly`\<\{ `live`: `Promise`\< \| `Readonly`\<\{ `keyId`: ...; `owner`: ...; `grantVersion`: ...; `grants`: ...; \}\> \| `null`\>; \}\>; `guestLimits?`: `Partial`\<`Readonly`\<\{ `cpuMs`: `number`; `subRequests`: `number`; \}\>\>; `mcp?`: `Readonly`\<\{ `handleRequest`: (`request`) => `Promise`\<`Response`\>; `close?`: () => `Promise`\<`void`\>; \}\>; `git?`: `Readonly`\<\{ `writerOf`: `Extract`\<`GitWriter`, \{ `kind`: `"actor"`; \}\>; `workflowPass?`: `Promise`\< \| `Readonly`\<\{ `kind`: ...; `actor`: ...; `role?`: ...; `workflow?`: ...; \}\> \| `null`\>; `buildPass?`: `Promise`\< \| `Readonly`\<\{ `kind`: ...; `actor`: ...; `role?`: ...; `workflow?`: ...; \}\> \| `null`\>; `git`: `Promise`\<`Readonly`\<\{ `push`: `Promise`\<...\>; `read`: `Promise`\<...\>; `binding`: `GitBinding`; \}\>\>; \}\>; `ownerRoutes?`: `Hono`\<[`OysterEnv`](host.md#oysterenv), `BlankSchema`, `"/"`\>; `capabilities?`: readonly `Readonly`\<`object` & `object`\>[]; `workbench?`: `Readonly`\<\{ `directory`: `Promise`\<`Readonly`\<\{ `apps`: readonly ...[]; `roles`: [`OysterRootRoles`](root-data.md#oysterrootroles); `computer?`: ... \| ...; \}\>\>; `storage`: `Pick`\<`AppStorageWire`, `"read"` \| `"write"` \| `"reset"`\> & `Readonly`\<\{ `events`: `Promise`\<...\>; \}\>; \}\>; `homeInstallationId?`: `string`; `pageScript?`: `string`; `title?`: `string`; \}\>, `"appToolPolicy"` \| `"guestLimits"`\> & `Readonly`\<\{ `workspace?`: `Readonly`\<\{ `computerId`: `string`; `files`: [`FileSource`](files.md#filesource); `computer?`: (`principal`) => \| `Readonly`\<\{ `getCapabilities`: ...; `call`: ...; \}\> \| `Promise`\<... \| ...\> \| `null`; \}\>; `scope?`: `Readonly`\<\{ `tenantId`: `string` & `Brand`\<`"OysterTenantId"`\>; `origin`: `string`; `durableName`: `string`; `computerName`: `string`; `workspacePrefix`: `string`; `repositoryPrefix`: `string`; \}\>; \}\> |
1620
+
1621
+ #### Returns
1622
+
1623
+ [`OysterHost`](host.md#oysterhost)
1624
+
1625
+ ---
1626
+
1627
+ ### createOysterWorker()
1628
+
1629
+ ```ts
1630
+ function createOysterWorker(options?): ExportedHandler<Readonly<{
1631
+ OYSTER_OWNER_KEY: string;
1632
+ OYSTER_OWNER_NAME?: string;
1633
+ AGENT_DIRECTORY?: Readonly<{
1634
+ getByName: Readonly<{
1635
+ readCreator: Promise<string | null>;
1636
+ }>;
1637
+ }>;
1638
+ OYSTER_ORIGIN: string;
1639
+ MCP: DurableObjectNamespace<OysterMcpOwner<Readonly<{
1640
+ LOADER: WorkerLoader;
1641
+ }>>>;
1642
+ RELEASES: R2Bucket;
1643
+ REGISTRY: DurableObjectNamespace<OysterRegistry>;
1644
+ INSTANCES: DurableObjectNamespace<OysterInstance<Readonly<{ OYSTER_OWNER_KEY: string; OYSTER_OWNER_NAME?: string | undefined; AGENT_DIRECTORY?: Readonly<{ getByName(name: string): Readonly<{ readCreator(agentId: string): Promise<string | null>; }>; }> | undefined; ... 5 more ...; LOADER: WorkerLoader; }>>>;
1645
+ LOADER: WorkerLoader;
1646
+ }>>;
1647
+ ```
1648
+
1649
+ The standalone Worker's `fetch` handler; frontend hosts are cached per env. MCP
1650
+ transports belong to the tenant Durable Object, independent of that cache.
1651
+
1652
+ #### Parameters
1653
+
1654
+ | Parameter | Type |
1655
+ | --------- | ------------------------------------------------------------- |
1656
+ | `options` | `Pick`\<[`OysterHost`](host.md#oysterhost), `"guestLimits"`\> |
1657
+
1658
+ #### Returns
1659
+
1660
+ `ExportedHandler`\<`Readonly`\<\{ `OYSTER_OWNER_KEY`: `string`;
1661
+ `OYSTER_OWNER_NAME?`: `string`; `AGENT_DIRECTORY?`: `Readonly`\<\{ `getByName`:
1662
+ `Readonly`\<\{ `readCreator`: `Promise`\<`string` \| `null`\>; \}\>; \}\>;
1663
+ `OYSTER_ORIGIN`: `string`; `MCP`:
1664
+ `DurableObjectNamespace`\<[`OysterMcpOwner`](#oystermcpowner)\<`Readonly`\<\{
1665
+ `LOADER`: `WorkerLoader`; \}\>\>\>; `RELEASES`: `R2Bucket`; `REGISTRY`:
1666
+ `DurableObjectNamespace`\<[`OysterRegistry`](#oysterregistry)\>; `INSTANCES`:
1667
+ `DurableObjectNamespace`\<[`OysterInstance`](#oysterinstance)\<`Readonly`\<\{
1668
+ OYSTER\_OWNER\_KEY: string; OYSTER\_OWNER\_NAME?: string \| undefined;
1669
+ AGENT\_DIRECTORY?: Readonly\<\{ getByName(name: string): Readonly\<\{
1670
+ readCreator(agentId: string): Promise\<string \| null\>; \}\>; \}\> \|
1671
+ undefined; ... 5 more ...; LOADER: WorkerLoader; \}\>\>\>; `LOADER`:
1672
+ `WorkerLoader`; \}\>\>
1673
+
1674
+ ## References
1675
+
1676
+ ### ownerKeyAuth
1677
+
1678
+ Re-exports [ownerKeyAuth](auth.md#ownerkeyauth)