@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.
- package/LICENSE +21 -0
- package/README.md +1082 -2
- package/dist/agents.d.ts +114 -0
- package/dist/agents.js +322 -0
- package/dist/app-builds.d.ts +151 -0
- package/dist/app-builds.js +355 -0
- package/dist/app-sandbox.d.ts +2 -0
- package/dist/app-sandbox.js +2 -0
- package/dist/app-sources.d.ts +46 -0
- package/dist/app-sources.js +335 -0
- package/dist/app-storage.d.ts +141 -0
- package/dist/app-storage.js +281 -0
- package/dist/apps/gate.d.ts +105 -0
- package/dist/apps/gate.js +273 -0
- package/dist/apps/index.d.ts +5 -0
- package/dist/apps/index.js +5 -0
- package/dist/apps/installation.d.ts +248 -0
- package/dist/apps/installation.js +307 -0
- package/dist/apps/operations.d.ts +8 -0
- package/dist/apps/operations.js +98 -0
- package/dist/apps/tools.d.ts +33 -0
- package/dist/apps/tools.js +17 -0
- package/dist/auth.d.ts +11 -0
- package/dist/auth.js +93 -0
- package/dist/backend-request.d.ts +3 -0
- package/dist/backend-request.js +53 -0
- package/dist/build/build-jobs.d.ts +128 -0
- package/dist/build/build-jobs.js +197 -0
- package/dist/build/build-step.d.ts +26 -0
- package/dist/build/build-step.js +20 -0
- package/dist/build/bundled-html.d.ts +7 -0
- package/dist/build/bundled-html.js +64 -0
- package/dist/build/definition-emission.d.ts +34 -0
- package/dist/build/definition-emission.js +201 -0
- package/dist/build/effect.d.ts +231 -0
- package/dist/build/effect.js +396 -0
- package/dist/build/git-environment.d.ts +6 -0
- package/dist/build/git-environment.js +48 -0
- package/dist/build/html-recipe.d.ts +20 -0
- package/dist/build/html-recipe.js +51 -0
- package/dist/build/local-build.d.ts +57 -0
- package/dist/build/local-build.js +1078 -0
- package/dist/build/r2-artifact-writer.d.ts +31 -0
- package/dist/build/r2-artifact-writer.js +179 -0
- package/dist/build/snapshot-package-store.d.ts +2 -0
- package/dist/build/snapshot-package-store.js +21 -0
- package/dist/build/snapshot-program-scripts.d.ts +6 -0
- package/dist/build/snapshot-program-scripts.js +2 -0
- package/dist/build/submission-contract.d.ts +384 -0
- package/dist/build/submission-contract.js +70 -0
- package/dist/build/workspace-build.d.ts +50 -0
- package/dist/build/workspace-build.js +156 -0
- package/dist/build-contract.d.ts +4 -0
- package/dist/build-contract.js +4 -0
- package/dist/build-jobs.d.ts +2 -0
- package/dist/build-jobs.js +2 -0
- package/dist/build.d.ts +11 -0
- package/dist/build.js +13 -0
- package/dist/capability-descriptor.d.ts +46 -0
- package/dist/capability-descriptor.js +51 -0
- package/dist/catalog-frame.d.ts +39 -0
- package/dist/catalog-frame.js +72 -0
- package/dist/cause-class.d.ts +19 -0
- package/dist/cause-class.js +54 -0
- package/dist/cloudflare.d.ts +123 -0
- package/dist/cloudflare.js +391 -0
- package/dist/computer-terminal.d.ts +38 -0
- package/dist/computer-terminal.js +410 -0
- package/dist/computer.d.ts +60 -0
- package/dist/computer.js +33 -0
- package/dist/event-recipients.d.ts +57 -0
- package/dist/event-recipients.js +144 -0
- package/dist/facet-invocation.d.ts +4 -0
- package/dist/facet-invocation.js +45 -0
- package/dist/files.d.ts +42 -0
- package/dist/files.js +123 -0
- package/dist/frame-binding-wire-script.d.ts +2 -0
- package/dist/frame-binding-wire-script.js +1 -0
- package/dist/frame-binding-wire.d.ts +28 -0
- package/dist/frame-binding-wire.js +54 -0
- package/dist/git-admission.d.ts +52 -0
- package/dist/git-admission.js +188 -0
- package/dist/git-auth.d.ts +11 -0
- package/dist/git-auth.js +27 -0
- package/dist/git-door.d.ts +35 -0
- package/dist/git-door.js +108 -0
- package/dist/git-journal.d.ts +31 -0
- package/dist/git-journal.js +188 -0
- package/dist/git.d.ts +31 -0
- package/dist/git.js +64 -0
- package/dist/guest-policy.d.ts +9 -0
- package/dist/guest-policy.js +13 -0
- package/dist/host.d.ts +244 -0
- package/dist/host.js +1043 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +320 -0
- package/dist/installation-consent.d.ts +79 -0
- package/dist/installation-consent.js +82 -0
- package/dist/internal/background-origins.d.ts +3 -0
- package/dist/internal/background-origins.js +8 -0
- package/dist/internal/delivery.d.ts +12 -0
- package/dist/internal/delivery.js +167 -0
- package/dist/internal/host-gate.d.ts +14 -0
- package/dist/internal/host-gate.js +62 -0
- package/dist/internal/registry-installations.d.ts +6 -0
- package/dist/internal/registry-installations.js +12 -0
- package/dist/invocation.d.ts +251 -0
- package/dist/invocation.js +377 -0
- package/dist/keys.d.ts +48 -0
- package/dist/keys.js +52 -0
- package/dist/mcp-owner.d.ts +27 -0
- package/dist/mcp-owner.js +143 -0
- package/dist/mcp.d.ts +89 -0
- package/dist/mcp.js +429 -0
- package/dist/media.d.ts +23 -0
- package/dist/media.js +12 -0
- package/dist/pack.d.ts +76 -0
- package/dist/pack.js +134 -0
- package/dist/page/capabilities.d.ts +23 -0
- package/dist/page/capabilities.js +256 -0
- package/dist/page/computer-handles.d.ts +79 -0
- package/dist/page/computer-handles.js +44 -0
- package/dist/page/lifetime.d.ts +6 -0
- package/dist/page/lifetime.js +19 -0
- package/dist/page/mount.d.ts +163 -0
- package/dist/page/mount.js +390 -0
- package/dist/page/storage.d.ts +3 -0
- package/dist/page/storage.js +82 -0
- package/dist/page/terminal.d.ts +5 -0
- package/dist/page/terminal.js +7 -0
- package/dist/page-script.d.ts +14 -0
- package/dist/page-script.js +5 -0
- package/dist/r2-files.d.ts +3 -0
- package/dist/r2-files.js +79 -0
- package/dist/release.d.ts +72 -0
- package/dist/release.js +164 -0
- package/dist/root-data.d.ts +86 -0
- package/dist/root-data.js +69 -0
- package/dist/shell/app-directory.d.ts +537 -0
- package/dist/shell/app-directory.js +195 -0
- package/dist/shell/browser-actions.d.ts +7 -0
- package/dist/shell/browser-actions.js +56 -0
- package/dist/shell/command-host.d.ts +112 -0
- package/dist/shell/command-host.js +502 -0
- package/dist/shell/commands.d.ts +25 -0
- package/dist/shell/commands.js +78 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +8 -0
- package/dist/shell/keys.d.ts +41 -0
- package/dist/shell/keys.js +134 -0
- package/dist/shell/shell-module.d.ts +31 -0
- package/dist/shell/shell-module.js +37 -0
- package/dist/shell/window-manager.d.ts +124 -0
- package/dist/shell/window-manager.js +711 -0
- package/dist/shell/workbench-contract.d.ts +68 -0
- package/dist/shell/workbench-contract.js +1 -0
- package/dist/shell/workbench-host-types.d.ts +96 -0
- package/dist/shell/workbench-host-types.js +1 -0
- package/dist/shell/workbench-host.d.ts +34 -0
- package/dist/shell/workbench-host.js +347 -0
- package/dist/shell/workbench-model.d.ts +192 -0
- package/dist/shell/workbench-model.js +53 -0
- package/dist/shell/workbench.d.ts +4 -0
- package/dist/shell/workbench.js +2 -0
- package/dist/source/fork.d.ts +27 -0
- package/dist/source/fork.js +46 -0
- package/dist/source/index.d.ts +11 -0
- package/dist/source/index.js +11 -0
- package/dist/source/seed-receipt.d.ts +53 -0
- package/dist/source/seed-receipt.js +18 -0
- package/dist/source/team-source.d.ts +32 -0
- package/dist/source/team-source.js +42 -0
- package/dist/source/template-repository.d.ts +2 -0
- package/dist/source/template-repository.js +8 -0
- package/dist/source/template-write.d.ts +69 -0
- package/dist/source/template-write.js +344 -0
- package/dist/storage-frame.d.ts +64 -0
- package/dist/storage-frame.js +28 -0
- package/dist/tenant.d.ts +81 -0
- package/dist/tenant.js +71 -0
- package/dist/testing/capabilities.d.ts +29 -0
- package/dist/testing/capabilities.js +130 -0
- package/dist/testing/catalog.d.ts +3 -0
- package/dist/testing/catalog.js +53 -0
- package/dist/testing/index.d.ts +10 -0
- package/dist/testing/index.js +10 -0
- package/dist/testing/installation.d.ts +11 -0
- package/dist/testing/installation.js +25 -0
- package/dist/testing/native-worker.d.ts +21 -0
- package/dist/testing/native-worker.js +106 -0
- package/dist/testing/worker.d.ts +18 -0
- package/dist/testing/worker.js +67 -0
- package/dist/testing/workers-runtime.d.ts +24 -0
- package/dist/testing/workers-runtime.js +33 -0
- package/dist/webhook-delivery.d.ts +14 -0
- package/dist/webhook-delivery.js +17 -0
- package/dist/workers-git.d.ts +285 -0
- package/dist/workers-git.js +1174 -0
- package/dist/workers.d.ts +352 -0
- package/dist/workers.js +866 -0
- package/docs/api/README.md +82 -0
- package/docs/api/agents.md +332 -0
- package/docs/api/app-storage.md +209 -0
- package/docs/api/apps.md +1375 -0
- package/docs/api/auth.md +63 -0
- package/docs/api/build-contract.md +507 -0
- package/docs/api/build.md +1476 -0
- package/docs/api/cloudflare.md +421 -0
- package/docs/api/computer.md +203 -0
- package/docs/api/files.md +117 -0
- package/docs/api/git.md +470 -0
- package/docs/api/host.md +1328 -0
- package/docs/api/index.md +430 -0
- package/docs/api/invocation.md +738 -0
- package/docs/api/keys.md +175 -0
- package/docs/api/mcp.md +301 -0
- package/docs/api/media.md +40 -0
- package/docs/api/modules.md +42 -0
- package/docs/api/pack.md +138 -0
- package/docs/api/page/mount.md +298 -0
- package/docs/api/root-data.md +111 -0
- package/docs/api/shell/app-directory.md +332 -0
- package/docs/api/shell/command-host.md +224 -0
- package/docs/api/shell/commands.md +197 -0
- package/docs/api/shell/keys.md +183 -0
- package/docs/api/shell/shell-module.md +143 -0
- package/docs/api/shell/window-manager.md +267 -0
- package/docs/api/shell/workbench.md +186 -0
- package/docs/api/shell.md +1788 -0
- package/docs/api/tenant.md +194 -0
- package/docs/api/workers-git.md +1527 -0
- package/docs/api/workers.md +1678 -0
- package/docs/media/architecture.mmd +32 -0
- package/docs/media/architecture.png +0 -0
- package/docs/media/bonsai-network.png +0 -0
- package/docs/media/bonsai-repository.png +0 -0
- package/docs/site/agent-quickstart.mdx +349 -0
- package/examples/git/worker.ts +39 -0
- package/examples/git/wrangler.jsonc +32 -0
- package/examples/standalone/worker.ts +14 -0
- package/examples/standalone/wrangler.jsonc +21 -0
- package/package.json +249 -3
package/docs/api/host.md
ADDED
|
@@ -0,0 +1,1328 @@
|
|
|
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) / host
|
|
8
|
+
|
|
9
|
+
# host
|
|
10
|
+
|
|
11
|
+
## Classes
|
|
12
|
+
|
|
13
|
+
### ReleaseError
|
|
14
|
+
|
|
15
|
+
Why a Release could not be read; the host maps it to an HTTP refusal.
|
|
16
|
+
|
|
17
|
+
#### Extends
|
|
18
|
+
|
|
19
|
+
- `Error`
|
|
20
|
+
|
|
21
|
+
#### Constructors
|
|
22
|
+
|
|
23
|
+
##### Constructor
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
new ReleaseError(
|
|
27
|
+
code,
|
|
28
|
+
message,
|
|
29
|
+
options?
|
|
30
|
+
): ReleaseError;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
###### Parameters
|
|
34
|
+
|
|
35
|
+
| Parameter | Type |
|
|
36
|
+
| ---------- | ------------------------------------------------------------------------------------------ |
|
|
37
|
+
| `code` | \| `"artifact_missing"` \| `"digest_mismatch"` \| `"invalid_release"` \| `"asset_missing"` |
|
|
38
|
+
| `message` | `string` |
|
|
39
|
+
| `options?` | `ErrorOptions` |
|
|
40
|
+
|
|
41
|
+
###### Returns
|
|
42
|
+
|
|
43
|
+
[`ReleaseError`](#releaseerror)
|
|
44
|
+
|
|
45
|
+
###### Overrides
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
Error.constructor;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Properties
|
|
52
|
+
|
|
53
|
+
##### name
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
readonly name: "ReleaseError" = "ReleaseError";
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
###### Overrides
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
Error.name;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
##### code
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
readonly code:
|
|
69
|
+
| "artifact_missing"
|
|
70
|
+
| "digest_mismatch"
|
|
71
|
+
| "invalid_release"
|
|
72
|
+
| "asset_missing";
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Type Aliases
|
|
76
|
+
|
|
77
|
+
### CapabilityMethodKind
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
type CapabilityMethodKind = Schema.Schema.Type<
|
|
81
|
+
typeof capabilityMethodKindSchema
|
|
82
|
+
>;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The four supported capability method kinds.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### CapabilityDescriptor
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
type CapabilityDescriptor = Schema.Schema.Type<
|
|
93
|
+
typeof capabilityDescriptorSchema
|
|
94
|
+
>;
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
A page descriptor carries routing, never the authority to use a capability.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### OysterVisitor
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
type OysterVisitor = Readonly<{
|
|
105
|
+
actor: Readonly<{
|
|
106
|
+
kind: "visitor";
|
|
107
|
+
}>;
|
|
108
|
+
}>;
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The anonymous reader of a public installation. The host admits it only when
|
|
112
|
+
authentication refuses; it reaches that App's page and its `read` methods.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### OysterPrincipal
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
type OysterPrincipal = TenantPrincipal | OysterVisitor;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Who an admitted request acts for: an authenticated tenant principal or the
|
|
123
|
+
visitor.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### OysterAuthResult
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
type OysterAuthResult =
|
|
131
|
+
| Readonly<{
|
|
132
|
+
kind: "admitted";
|
|
133
|
+
principal: TenantPrincipal;
|
|
134
|
+
}>
|
|
135
|
+
| Readonly<{
|
|
136
|
+
kind: "refused";
|
|
137
|
+
status: 401 | 403 | 404 | 429;
|
|
138
|
+
retryAfter?: number;
|
|
139
|
+
}>;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The outcome of authenticating one request.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### OysterAuth
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
type OysterAuth = Readonly<{
|
|
150
|
+
resolve: (actor) => Promise<TenantPrincipal | null>;
|
|
151
|
+
authenticate: (request) => Promise<OysterAuthResult>;
|
|
152
|
+
login?: (request) => Promise<Response>;
|
|
153
|
+
}>;
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The host's sign-in: who may use this Oyster.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### InstallationCommit
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
type InstallationCommit =
|
|
164
|
+
| Readonly<{
|
|
165
|
+
ok: true;
|
|
166
|
+
}>
|
|
167
|
+
| Readonly<{
|
|
168
|
+
ok: false;
|
|
169
|
+
code: "stale_authority";
|
|
170
|
+
}>;
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
A serializable registry commit result, including across native DO RPC.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### InstallationStore
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
type InstallationStore = InstallationReader &
|
|
181
|
+
Readonly<{
|
|
182
|
+
put: (installation) => Promise<void>;
|
|
183
|
+
compareAndPut: (
|
|
184
|
+
installation,
|
|
185
|
+
expectedAuthorityVersion,
|
|
186
|
+
) => Promise<InstallationCommit>;
|
|
187
|
+
}>;
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Durable commits remain with the host's registry; reads are tenant-scoped.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### OysterJson
|
|
195
|
+
|
|
196
|
+
```ts
|
|
197
|
+
type OysterJson = Schema.Json;
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
A JSON value crossing the method boundary.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### InstanceResult
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
type InstanceResult<T> =
|
|
208
|
+
| Readonly<{
|
|
209
|
+
ok: true;
|
|
210
|
+
value: T;
|
|
211
|
+
}>
|
|
212
|
+
| Readonly<{
|
|
213
|
+
ok: false;
|
|
214
|
+
code: AppInstanceErrorCode | "failed";
|
|
215
|
+
causeClass?:
|
|
216
|
+
| "Error"
|
|
217
|
+
| "TypeError"
|
|
218
|
+
| "RangeError"
|
|
219
|
+
| "SyntaxError"
|
|
220
|
+
| "AbortError"
|
|
221
|
+
| "TimeoutError"
|
|
222
|
+
| "Other";
|
|
223
|
+
}>;
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
The result of one Instance operation; refusals carry Oyster's error code.
|
|
227
|
+
|
|
228
|
+
#### Type Parameters
|
|
229
|
+
|
|
230
|
+
| Type Parameter |
|
|
231
|
+
| -------------- |
|
|
232
|
+
| `T` |
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
### InstanceHandle
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
type InstanceHandle = Readonly<{
|
|
240
|
+
apply: (state, release) => Promise<InstanceResult<Instance>>;
|
|
241
|
+
onGitPush: (facts, fact) => Promise<void>;
|
|
242
|
+
syncRefused: (facts, refusal) => Promise<void>;
|
|
243
|
+
authorizeGitPush: (facts, question) => Promise<GitPushVerdict>;
|
|
244
|
+
fetch: (facts, request) => Promise<Response>;
|
|
245
|
+
gill: (facts, api, source, input) => Promise<InstanceResult<GillReply>>;
|
|
246
|
+
call: (facts, api, name, input) => Promise<InstanceResult<AppMethodReply>>;
|
|
247
|
+
}>;
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
One running App Instance, wherever the host runs it.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### InstanceDirectory
|
|
255
|
+
|
|
256
|
+
```ts
|
|
257
|
+
type InstanceDirectory = Readonly<{
|
|
258
|
+
get: (instanceId, limits?) => InstanceHandle;
|
|
259
|
+
}>;
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Finds the running Instance for an Instance ID.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
### OysterMcp
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
type OysterMcp = Readonly<{
|
|
270
|
+
handleRequest: (request) => Promise<Response>;
|
|
271
|
+
close?: () => Promise<void>;
|
|
272
|
+
}>;
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
An MCP endpoint mounted at `/mcp`.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
### OysterGitHost
|
|
280
|
+
|
|
281
|
+
```ts
|
|
282
|
+
type OysterGitHost = Readonly<{
|
|
283
|
+
writerOf: Extract<
|
|
284
|
+
GitWriter,
|
|
285
|
+
{
|
|
286
|
+
kind: "actor";
|
|
287
|
+
}
|
|
288
|
+
>;
|
|
289
|
+
workflowPass?: Promise<Readonly<{
|
|
290
|
+
kind: "actor";
|
|
291
|
+
actor: HostActor;
|
|
292
|
+
role?: "owner" | "member";
|
|
293
|
+
workflow?: WorkflowAttestation & object;
|
|
294
|
+
}> | null>;
|
|
295
|
+
buildPass?: Promise<Readonly<{
|
|
296
|
+
kind: "actor";
|
|
297
|
+
actor: HostActor;
|
|
298
|
+
role?: "owner" | "member";
|
|
299
|
+
workflow?: WorkflowAttestation & object;
|
|
300
|
+
}> | null>;
|
|
301
|
+
git: Promise<
|
|
302
|
+
Readonly<{
|
|
303
|
+
push: Promise<
|
|
304
|
+
Readonly<{
|
|
305
|
+
status: number;
|
|
306
|
+
headers: Readonly<Record<string, string>>;
|
|
307
|
+
body: Uint8Array;
|
|
308
|
+
}>
|
|
309
|
+
>;
|
|
310
|
+
read: Promise<
|
|
311
|
+
Readonly<{
|
|
312
|
+
status: number;
|
|
313
|
+
headers: Readonly<Record<string, string>>;
|
|
314
|
+
body: Uint8Array;
|
|
315
|
+
}>
|
|
316
|
+
>;
|
|
317
|
+
binding: GitBinding;
|
|
318
|
+
}>
|
|
319
|
+
>;
|
|
320
|
+
}>;
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
What Oyster's git door needs from the host beyond sign-in and Instances.
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
### CapabilityAdmission
|
|
328
|
+
|
|
329
|
+
```ts
|
|
330
|
+
type CapabilityAdmission = Readonly<{
|
|
331
|
+
principal: TenantPrincipal;
|
|
332
|
+
installation: Installation;
|
|
333
|
+
}>;
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
The host's admission of one capability request: who, for which installation.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
### CapabilityEnv
|
|
341
|
+
|
|
342
|
+
```ts
|
|
343
|
+
type CapabilityEnv = object;
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
Capability routes read the host's admission from `c.env`; they never
|
|
347
|
+
authenticate.
|
|
348
|
+
|
|
349
|
+
#### Properties
|
|
350
|
+
|
|
351
|
+
##### Bindings
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
Bindings: CapabilityAdmission;
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### OysterCapability
|
|
360
|
+
|
|
361
|
+
```ts
|
|
362
|
+
type OysterCapability = Readonly<CapabilityDescriptor & object>;
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
A capability adapter whose routes require live installation admission.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
### OysterVariables
|
|
370
|
+
|
|
371
|
+
```ts
|
|
372
|
+
type OysterVariables = object;
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
What the host stamps once per request; inner routes read it with `c.get`.
|
|
376
|
+
|
|
377
|
+
#### Properties
|
|
378
|
+
|
|
379
|
+
##### principal
|
|
380
|
+
|
|
381
|
+
```ts
|
|
382
|
+
principal: OysterPrincipal;
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
##### installation?
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
optional installation?: Installation;
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
### OysterEnv
|
|
394
|
+
|
|
395
|
+
```ts
|
|
396
|
+
type OysterEnv = object;
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
Owner routes run after the host's owner guard and read `c.get("principal")`.
|
|
400
|
+
|
|
401
|
+
#### Properties
|
|
402
|
+
|
|
403
|
+
##### Variables
|
|
404
|
+
|
|
405
|
+
```ts
|
|
406
|
+
Variables: OysterVariables;
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
### OysterHost
|
|
412
|
+
|
|
413
|
+
```ts
|
|
414
|
+
type OysterHost = Readonly<{
|
|
415
|
+
auth: OysterAuth;
|
|
416
|
+
backgroundOriginKey?: () => Promise<CryptoKey>;
|
|
417
|
+
artifacts: ArtifactStore;
|
|
418
|
+
installations: InstallationStore;
|
|
419
|
+
instances: InstanceDirectory;
|
|
420
|
+
computerId?: string;
|
|
421
|
+
computer?: (principal) => KnapsackComputer | null | Promise<KnapsackComputer | null>;
|
|
422
|
+
appToolPolicy?: (actor) =>
|
|
423
|
+
| AppToolPolicy
|
|
424
|
+
| null
|
|
425
|
+
| Promise<AppToolPolicy | null>;
|
|
426
|
+
keys?: Readonly<{
|
|
427
|
+
live: Promise<
|
|
428
|
+
| Readonly<{
|
|
429
|
+
keyId: string;
|
|
430
|
+
owner: string;
|
|
431
|
+
grantVersion: number;
|
|
432
|
+
grants: readonly Grant<...>[];
|
|
433
|
+
}>
|
|
434
|
+
| null>;
|
|
435
|
+
}>;
|
|
436
|
+
guestLimits?: Partial<GuestLimits>;
|
|
437
|
+
mcp?: OysterMcp;
|
|
438
|
+
git?: OysterGitHost;
|
|
439
|
+
ownerRoutes?: Hono<OysterEnv>;
|
|
440
|
+
capabilities?: readonly OysterCapability[];
|
|
441
|
+
workbench?: Readonly<{
|
|
442
|
+
directory: Promise<Readonly<{
|
|
443
|
+
apps: readonly AppDirectoryEntry[];
|
|
444
|
+
roles: OysterRootRoles;
|
|
445
|
+
computer?: Readonly<{
|
|
446
|
+
computerId: string;
|
|
447
|
+
name: string;
|
|
448
|
+
}>;
|
|
449
|
+
}>>;
|
|
450
|
+
storage: Pick<AppStorageWire, "read" | "write" | "reset"> & Readonly<{
|
|
451
|
+
events: Promise<Response>;
|
|
452
|
+
}>;
|
|
453
|
+
}>;
|
|
454
|
+
homeInstallationId?: string;
|
|
455
|
+
pageScript?: string;
|
|
456
|
+
title?: string;
|
|
457
|
+
}>;
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Everything a host supplies to run Oyster.
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
### ArtifactStore
|
|
465
|
+
|
|
466
|
+
```ts
|
|
467
|
+
type ArtifactStore = Readonly<{
|
|
468
|
+
get: (artifactRef) => Promise<Uint8Array | null>;
|
|
469
|
+
put: (artifactRef, bytes) => Promise<void>;
|
|
470
|
+
}>;
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
Immutable Release bytes addressed by their artifact reference.
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
### VerifiedRelease
|
|
478
|
+
|
|
479
|
+
```ts
|
|
480
|
+
type VerifiedRelease = Readonly<{
|
|
481
|
+
release: Release;
|
|
482
|
+
build: AppBuild;
|
|
483
|
+
api: AppApi | null;
|
|
484
|
+
declaration: AppDeclaration | null;
|
|
485
|
+
ui:
|
|
486
|
+
| Readonly<{
|
|
487
|
+
kind: "html";
|
|
488
|
+
artifactRef: ArtifactRef;
|
|
489
|
+
digest: Sha256Digest;
|
|
490
|
+
}>
|
|
491
|
+
| Readonly<{
|
|
492
|
+
kind: "assets";
|
|
493
|
+
build: AssetBuild;
|
|
494
|
+
}>
|
|
495
|
+
| null;
|
|
496
|
+
backend: Readonly<{
|
|
497
|
+
artifactRef: ArtifactRef;
|
|
498
|
+
digest: Sha256Digest;
|
|
499
|
+
}> | null;
|
|
500
|
+
}>;
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
A Release whose root, UI and backend artifacts were read and verified.
|
|
504
|
+
|
|
505
|
+
## Variables
|
|
506
|
+
|
|
507
|
+
### capabilityMethodKindSchema
|
|
508
|
+
|
|
509
|
+
```ts
|
|
510
|
+
const capabilityMethodKindSchema: Literals<
|
|
511
|
+
readonly ["json", "transport", "read", "write"]
|
|
512
|
+
>;
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
How an admitted capability method is exposed to the App.
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
### capabilityMethodSchema
|
|
520
|
+
|
|
521
|
+
```ts
|
|
522
|
+
const capabilityMethodSchema: Union<
|
|
523
|
+
readonly [
|
|
524
|
+
Struct<{
|
|
525
|
+
kind: Literal<"transport">;
|
|
526
|
+
method: Literals<
|
|
527
|
+
readonly [
|
|
528
|
+
"GET",
|
|
529
|
+
"POST",
|
|
530
|
+
"PUT",
|
|
531
|
+
"DELETE",
|
|
532
|
+
"PATCH",
|
|
533
|
+
"HEAD",
|
|
534
|
+
"OPTIONS",
|
|
535
|
+
"ANY",
|
|
536
|
+
]
|
|
537
|
+
>;
|
|
538
|
+
path: String;
|
|
539
|
+
}>,
|
|
540
|
+
Struct<{
|
|
541
|
+
kind: Literals<readonly ["json", "read", "write"]>;
|
|
542
|
+
method: Literals<
|
|
543
|
+
readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]
|
|
544
|
+
>;
|
|
545
|
+
path: String;
|
|
546
|
+
}>,
|
|
547
|
+
]
|
|
548
|
+
>;
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
The HTTP operation exposed by one capability method on an Oyster page.
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
555
|
+
### capabilityDescriptorSchema
|
|
556
|
+
|
|
557
|
+
```ts
|
|
558
|
+
const capabilityDescriptorSchema: Struct<{
|
|
559
|
+
id: String;
|
|
560
|
+
version: Number;
|
|
561
|
+
base: String;
|
|
562
|
+
methods: $Record<
|
|
563
|
+
String,
|
|
564
|
+
Union<
|
|
565
|
+
readonly [
|
|
566
|
+
Struct<{
|
|
567
|
+
kind: Literal<"transport">;
|
|
568
|
+
method: Literals<
|
|
569
|
+
readonly [
|
|
570
|
+
"GET",
|
|
571
|
+
"POST",
|
|
572
|
+
"PUT",
|
|
573
|
+
"DELETE",
|
|
574
|
+
"PATCH",
|
|
575
|
+
"HEAD",
|
|
576
|
+
"OPTIONS",
|
|
577
|
+
"ANY",
|
|
578
|
+
]
|
|
579
|
+
>;
|
|
580
|
+
path: String;
|
|
581
|
+
}>,
|
|
582
|
+
Struct<{
|
|
583
|
+
kind: Literals<readonly ["json", "read", "write"]>;
|
|
584
|
+
method: Literals<
|
|
585
|
+
readonly [
|
|
586
|
+
"GET",
|
|
587
|
+
"POST",
|
|
588
|
+
"PUT",
|
|
589
|
+
"DELETE",
|
|
590
|
+
"PATCH",
|
|
591
|
+
"HEAD",
|
|
592
|
+
"OPTIONS",
|
|
593
|
+
]
|
|
594
|
+
>;
|
|
595
|
+
path: String;
|
|
596
|
+
}>,
|
|
597
|
+
]
|
|
598
|
+
>
|
|
599
|
+
>;
|
|
600
|
+
}>;
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
The serializable part of a capability admitted to an installation's page.
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
### defaultAssetPolicy
|
|
608
|
+
|
|
609
|
+
```ts
|
|
610
|
+
const defaultAssetPolicy: AssetBuildPolicy;
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
Default bounds for an App's UI asset build.
|
|
614
|
+
|
|
615
|
+
## Functions
|
|
616
|
+
|
|
617
|
+
### oysterPrincipalIsVisitor()
|
|
618
|
+
|
|
619
|
+
```ts
|
|
620
|
+
function oysterPrincipalIsVisitor(
|
|
621
|
+
principal,
|
|
622
|
+
): principal is Readonly<{ actor: Readonly<{ kind: "visitor" }> }>;
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
Narrow an admitted principal to the anonymous public reader.
|
|
626
|
+
|
|
627
|
+
#### Parameters
|
|
628
|
+
|
|
629
|
+
| Parameter | Type |
|
|
630
|
+
| ----------- | ------------------------------------- |
|
|
631
|
+
| `principal` | [`OysterPrincipal`](#oysterprincipal) |
|
|
632
|
+
|
|
633
|
+
#### Returns
|
|
634
|
+
|
|
635
|
+
`principal is Readonly<{ actor: Readonly<{ kind: "visitor" }> }>`
|
|
636
|
+
|
|
637
|
+
---
|
|
638
|
+
|
|
639
|
+
### oysterPrincipalIsOwner()
|
|
640
|
+
|
|
641
|
+
```ts
|
|
642
|
+
function oysterPrincipalIsOwner(
|
|
643
|
+
principal,
|
|
644
|
+
): principal is Readonly<{
|
|
645
|
+
actor: { kind: "member"; memberId: string };
|
|
646
|
+
role: "owner";
|
|
647
|
+
}>;
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
True only for a member admitted with the owner role.
|
|
651
|
+
|
|
652
|
+
#### Parameters
|
|
653
|
+
|
|
654
|
+
| Parameter | Type |
|
|
655
|
+
| ----------- | ------------------------------------- |
|
|
656
|
+
| `principal` | [`OysterPrincipal`](#oysterprincipal) |
|
|
657
|
+
|
|
658
|
+
#### Returns
|
|
659
|
+
|
|
660
|
+
`principal is Readonly<{ actor: { kind: "member"; memberId: string }; role: "owner" }>`
|
|
661
|
+
|
|
662
|
+
---
|
|
663
|
+
|
|
664
|
+
### oysterPrincipalId()
|
|
665
|
+
|
|
666
|
+
```ts
|
|
667
|
+
function oysterPrincipalId(principal): string;
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
Stable actor identity for host storage and backend attribution.
|
|
671
|
+
|
|
672
|
+
#### Parameters
|
|
673
|
+
|
|
674
|
+
| Parameter | Type |
|
|
675
|
+
| ----------- | ---------------------------------------------- |
|
|
676
|
+
| `principal` | [`TenantPrincipal`](tenant.md#tenantprincipal) |
|
|
677
|
+
|
|
678
|
+
#### Returns
|
|
679
|
+
|
|
680
|
+
`string`
|
|
681
|
+
|
|
682
|
+
---
|
|
683
|
+
|
|
684
|
+
### installOrSelect()
|
|
685
|
+
|
|
686
|
+
```ts
|
|
687
|
+
function installOrSelect(
|
|
688
|
+
host,
|
|
689
|
+
installationId,
|
|
690
|
+
release,
|
|
691
|
+
principal,
|
|
692
|
+
): Promise<Response>;
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
Install a Release at `installationId`, or switch an already-live one onto it:
|
|
696
|
+
the one path the POST install and PUT release-select routes share, and that a
|
|
697
|
+
build owner's own install call reaches too. Nothing there (or only a deleted
|
|
698
|
+
installation) is a fresh install; a live installation is switched in place,
|
|
699
|
+
refusing a change of the installation's App identity.
|
|
700
|
+
|
|
701
|
+
#### Parameters
|
|
702
|
+
|
|
703
|
+
| Parameter | Type |
|
|
704
|
+
| ---------------- | ------------------------------------- |
|
|
705
|
+
| `host` | [`OysterHost`](#oysterhost) |
|
|
706
|
+
| `installationId` | `string` |
|
|
707
|
+
| `release` | `Release` |
|
|
708
|
+
| `principal` | [`OysterPrincipal`](#oysterprincipal) |
|
|
709
|
+
|
|
710
|
+
#### Returns
|
|
711
|
+
|
|
712
|
+
`Promise`\<`Response`\>
|
|
713
|
+
|
|
714
|
+
---
|
|
715
|
+
|
|
716
|
+
### createOyster()
|
|
717
|
+
|
|
718
|
+
```ts
|
|
719
|
+
function createOyster(host): Hono<OysterEnv>;
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
Create the Oyster App server: a Hono app that installs App Releases, serves
|
|
723
|
+
their UI, forwards their backend requests and methods to their Instances, and
|
|
724
|
+
mounts the host's MCP endpoint. The host's adapters decide where state lives and
|
|
725
|
+
who may sign in.
|
|
726
|
+
|
|
727
|
+
#### Parameters
|
|
728
|
+
|
|
729
|
+
| Parameter | Type |
|
|
730
|
+
| --------- | --------------------------- |
|
|
731
|
+
| `host` | [`OysterHost`](#oysterhost) |
|
|
732
|
+
|
|
733
|
+
#### Returns
|
|
734
|
+
|
|
735
|
+
`Hono`\<[`OysterEnv`](#oysterenv)\>
|
|
736
|
+
|
|
737
|
+
---
|
|
738
|
+
|
|
739
|
+
### sha256()
|
|
740
|
+
|
|
741
|
+
```ts
|
|
742
|
+
function sha256(bytes): Promise<string>;
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
Hex SHA-256 digest in Puffball's `sha256:<hex>` form.
|
|
746
|
+
|
|
747
|
+
#### Parameters
|
|
748
|
+
|
|
749
|
+
| Parameter | Type |
|
|
750
|
+
| --------- | ------------ |
|
|
751
|
+
| `bytes` | `Uint8Array` |
|
|
752
|
+
|
|
753
|
+
#### Returns
|
|
754
|
+
|
|
755
|
+
`Promise`\<`string`\>
|
|
756
|
+
|
|
757
|
+
---
|
|
758
|
+
|
|
759
|
+
### parseRelease()
|
|
760
|
+
|
|
761
|
+
```ts
|
|
762
|
+
function parseRelease(value): Release;
|
|
763
|
+
```
|
|
764
|
+
|
|
765
|
+
Decode an untrusted Release record, as an install request carries it.
|
|
766
|
+
|
|
767
|
+
#### Parameters
|
|
768
|
+
|
|
769
|
+
| Parameter | Type |
|
|
770
|
+
| --------- | --------- |
|
|
771
|
+
| `value` | `unknown` |
|
|
772
|
+
|
|
773
|
+
#### Returns
|
|
774
|
+
|
|
775
|
+
`Release`
|
|
776
|
+
|
|
777
|
+
---
|
|
778
|
+
|
|
779
|
+
### verifyRelease()
|
|
780
|
+
|
|
781
|
+
```ts
|
|
782
|
+
function verifyRelease(
|
|
783
|
+
store,
|
|
784
|
+
release,
|
|
785
|
+
policy?,
|
|
786
|
+
readAssets?
|
|
787
|
+
): Promise<Readonly<{
|
|
788
|
+
release: Release;
|
|
789
|
+
build: | {
|
|
790
|
+
declaration?: Readonly<{
|
|
791
|
+
api?: Readonly<{
|
|
792
|
+
methods: ...;
|
|
793
|
+
toolFamily?: ...;
|
|
794
|
+
events?: ...;
|
|
795
|
+
}>;
|
|
796
|
+
displayName?: string;
|
|
797
|
+
capabilities: readonly (
|
|
798
|
+
| "agent.list"
|
|
799
|
+
| "agent.manage"
|
|
800
|
+
| "agent.rename"
|
|
801
|
+
| "agent.toolPolicy"
|
|
802
|
+
| "agent.read"
|
|
803
|
+
| "agent.send"
|
|
804
|
+
| "computer.list"
|
|
805
|
+
| "computer.readFile"
|
|
806
|
+
| "computer.writeFile"
|
|
807
|
+
| "computer.execute"
|
|
808
|
+
| "llm.generation"
|
|
809
|
+
| "media.generation"
|
|
810
|
+
| "games:servers"
|
|
811
|
+
| "git.repository"
|
|
812
|
+
| "apps.open"
|
|
813
|
+
| "apps.call"
|
|
814
|
+
| "app.storage"
|
|
815
|
+
| "app.events.emit"
|
|
816
|
+
| "team.workbenchHost"
|
|
817
|
+
| "marketplace.browse"
|
|
818
|
+
| "marketplace.purchase"
|
|
819
|
+
| "workflow.run"
|
|
820
|
+
| "workflow.publish"
|
|
821
|
+
| "workflow.arm"
|
|
822
|
+
| "world"
|
|
823
|
+
| "channels.read"
|
|
824
|
+
| "channels.personal.manage")[];
|
|
825
|
+
calls?: readonly Readonly<...>[];
|
|
826
|
+
guidance?: string;
|
|
827
|
+
handlers: readonly "file.open"[];
|
|
828
|
+
receives?: readonly "git.push"[];
|
|
829
|
+
icon?: string;
|
|
830
|
+
roles: readonly ("dashboard" | "inbox" | "files" | "media" | "sessions" | "terminal")[];
|
|
831
|
+
storage?: readonly Readonly<...>[];
|
|
832
|
+
commands?: readonly Readonly<...>[];
|
|
833
|
+
gills?: readonly Readonly<...>[];
|
|
834
|
+
backend?: Readonly<{
|
|
835
|
+
bindings: ...;
|
|
836
|
+
sync?: ...;
|
|
837
|
+
}>;
|
|
838
|
+
}>;
|
|
839
|
+
format: "fungi-app-v1";
|
|
840
|
+
ui: {
|
|
841
|
+
mediaType: "text/html; charset=utf-8" | "application/vnd.fungi.app-assets+json";
|
|
842
|
+
artifactRef: ArtifactRef;
|
|
843
|
+
digest: Sha256Digest;
|
|
844
|
+
version: string;
|
|
845
|
+
byteLength: number;
|
|
846
|
+
};
|
|
847
|
+
backend: {
|
|
848
|
+
mediaType: "application/vnd.fungi.app-backend+json";
|
|
849
|
+
artifactRef: ArtifactRef;
|
|
850
|
+
digest: Sha256Digest;
|
|
851
|
+
version: string;
|
|
852
|
+
byteLength: number;
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
| {
|
|
856
|
+
declaration?: Readonly<{
|
|
857
|
+
api?: Readonly<{
|
|
858
|
+
methods: ...;
|
|
859
|
+
toolFamily?: ...;
|
|
860
|
+
events?: ...;
|
|
861
|
+
}>;
|
|
862
|
+
displayName?: string;
|
|
863
|
+
capabilities: readonly (
|
|
864
|
+
| "agent.list"
|
|
865
|
+
| "agent.manage"
|
|
866
|
+
| "agent.rename"
|
|
867
|
+
| "agent.toolPolicy"
|
|
868
|
+
| "agent.read"
|
|
869
|
+
| "agent.send"
|
|
870
|
+
| "computer.list"
|
|
871
|
+
| "computer.readFile"
|
|
872
|
+
| "computer.writeFile"
|
|
873
|
+
| "computer.execute"
|
|
874
|
+
| "llm.generation"
|
|
875
|
+
| "media.generation"
|
|
876
|
+
| "games:servers"
|
|
877
|
+
| "git.repository"
|
|
878
|
+
| "apps.open"
|
|
879
|
+
| "apps.call"
|
|
880
|
+
| "app.storage"
|
|
881
|
+
| "app.events.emit"
|
|
882
|
+
| "team.workbenchHost"
|
|
883
|
+
| "marketplace.browse"
|
|
884
|
+
| "marketplace.purchase"
|
|
885
|
+
| "workflow.run"
|
|
886
|
+
| "workflow.publish"
|
|
887
|
+
| "workflow.arm"
|
|
888
|
+
| "world"
|
|
889
|
+
| "channels.read"
|
|
890
|
+
| "channels.personal.manage")[];
|
|
891
|
+
calls?: readonly Readonly<...>[];
|
|
892
|
+
guidance?: string;
|
|
893
|
+
handlers: readonly "file.open"[];
|
|
894
|
+
receives?: readonly "git.push"[];
|
|
895
|
+
icon?: string;
|
|
896
|
+
roles: readonly ("dashboard" | "inbox" | "files" | "media" | "sessions" | "terminal")[];
|
|
897
|
+
storage?: readonly Readonly<...>[];
|
|
898
|
+
commands?: readonly Readonly<...>[];
|
|
899
|
+
gills?: readonly Readonly<...>[];
|
|
900
|
+
backend?: Readonly<{
|
|
901
|
+
bindings: ...;
|
|
902
|
+
sync?: ...;
|
|
903
|
+
}>;
|
|
904
|
+
}>;
|
|
905
|
+
format: "fungi-app-v1";
|
|
906
|
+
ui: {
|
|
907
|
+
mediaType: "text/html; charset=utf-8" | "application/vnd.fungi.app-assets+json";
|
|
908
|
+
artifactRef: ArtifactRef;
|
|
909
|
+
digest: Sha256Digest;
|
|
910
|
+
version: string;
|
|
911
|
+
byteLength: number;
|
|
912
|
+
};
|
|
913
|
+
}
|
|
914
|
+
| {
|
|
915
|
+
declaration?: Readonly<{
|
|
916
|
+
api?: Readonly<{
|
|
917
|
+
methods: ...;
|
|
918
|
+
toolFamily?: ...;
|
|
919
|
+
events?: ...;
|
|
920
|
+
}>;
|
|
921
|
+
displayName?: string;
|
|
922
|
+
capabilities: readonly (
|
|
923
|
+
| "agent.list"
|
|
924
|
+
| "agent.manage"
|
|
925
|
+
| "agent.rename"
|
|
926
|
+
| "agent.toolPolicy"
|
|
927
|
+
| "agent.read"
|
|
928
|
+
| "agent.send"
|
|
929
|
+
| "computer.list"
|
|
930
|
+
| "computer.readFile"
|
|
931
|
+
| "computer.writeFile"
|
|
932
|
+
| "computer.execute"
|
|
933
|
+
| "llm.generation"
|
|
934
|
+
| "media.generation"
|
|
935
|
+
| "games:servers"
|
|
936
|
+
| "git.repository"
|
|
937
|
+
| "apps.open"
|
|
938
|
+
| "apps.call"
|
|
939
|
+
| "app.storage"
|
|
940
|
+
| "app.events.emit"
|
|
941
|
+
| "team.workbenchHost"
|
|
942
|
+
| "marketplace.browse"
|
|
943
|
+
| "marketplace.purchase"
|
|
944
|
+
| "workflow.run"
|
|
945
|
+
| "workflow.publish"
|
|
946
|
+
| "workflow.arm"
|
|
947
|
+
| "world"
|
|
948
|
+
| "channels.read"
|
|
949
|
+
| "channels.personal.manage")[];
|
|
950
|
+
calls?: readonly Readonly<...>[];
|
|
951
|
+
guidance?: string;
|
|
952
|
+
handlers: readonly "file.open"[];
|
|
953
|
+
receives?: readonly "git.push"[];
|
|
954
|
+
icon?: string;
|
|
955
|
+
roles: readonly ("dashboard" | "inbox" | "files" | "media" | "sessions" | "terminal")[];
|
|
956
|
+
storage?: readonly Readonly<...>[];
|
|
957
|
+
commands?: readonly Readonly<...>[];
|
|
958
|
+
gills?: readonly Readonly<...>[];
|
|
959
|
+
backend?: Readonly<{
|
|
960
|
+
bindings: ...;
|
|
961
|
+
sync?: ...;
|
|
962
|
+
}>;
|
|
963
|
+
}>;
|
|
964
|
+
format: "fungi-app-v1";
|
|
965
|
+
backend: {
|
|
966
|
+
mediaType: "application/vnd.fungi.app-backend+json";
|
|
967
|
+
artifactRef: ArtifactRef;
|
|
968
|
+
digest: Sha256Digest;
|
|
969
|
+
version: string;
|
|
970
|
+
byteLength: number;
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
api: | Readonly<{
|
|
974
|
+
methods: Readonly<Record<string, Readonly<{
|
|
975
|
+
description: string;
|
|
976
|
+
input: object;
|
|
977
|
+
output: object;
|
|
978
|
+
effect: ... | ... | ...;
|
|
979
|
+
requires: readonly ...;
|
|
980
|
+
pending?: ... | ...;
|
|
981
|
+
hidden?: ... | ...;
|
|
982
|
+
anonymous?: ... | ...;
|
|
983
|
+
}>>>;
|
|
984
|
+
toolFamily?: Readonly<{
|
|
985
|
+
name: string;
|
|
986
|
+
list: string;
|
|
987
|
+
call: string;
|
|
988
|
+
}>;
|
|
989
|
+
events?: Readonly<Record<string, Readonly<{
|
|
990
|
+
description: ...;
|
|
991
|
+
payload: ...;
|
|
992
|
+
}>>>;
|
|
993
|
+
}>
|
|
994
|
+
| null;
|
|
995
|
+
declaration: | Readonly<{
|
|
996
|
+
api?: Readonly<{
|
|
997
|
+
methods: Readonly<Record<..., ...>>;
|
|
998
|
+
toolFamily?: Readonly<...>;
|
|
999
|
+
events?: Readonly<...>;
|
|
1000
|
+
}>;
|
|
1001
|
+
displayName?: string;
|
|
1002
|
+
capabilities: readonly (
|
|
1003
|
+
| "agent.list"
|
|
1004
|
+
| "agent.manage"
|
|
1005
|
+
| "agent.rename"
|
|
1006
|
+
| "agent.toolPolicy"
|
|
1007
|
+
| "agent.read"
|
|
1008
|
+
| "agent.send"
|
|
1009
|
+
| "computer.list"
|
|
1010
|
+
| "computer.readFile"
|
|
1011
|
+
| "computer.writeFile"
|
|
1012
|
+
| "computer.execute"
|
|
1013
|
+
| "llm.generation"
|
|
1014
|
+
| "media.generation"
|
|
1015
|
+
| "games:servers"
|
|
1016
|
+
| "git.repository"
|
|
1017
|
+
| "apps.open"
|
|
1018
|
+
| "apps.call"
|
|
1019
|
+
| "app.storage"
|
|
1020
|
+
| "app.events.emit"
|
|
1021
|
+
| "team.workbenchHost"
|
|
1022
|
+
| "marketplace.browse"
|
|
1023
|
+
| "marketplace.purchase"
|
|
1024
|
+
| "workflow.run"
|
|
1025
|
+
| "workflow.publish"
|
|
1026
|
+
| "workflow.arm"
|
|
1027
|
+
| "world"
|
|
1028
|
+
| "channels.read"
|
|
1029
|
+
| "channels.personal.manage")[];
|
|
1030
|
+
calls?: readonly Readonly<{
|
|
1031
|
+
appId: string;
|
|
1032
|
+
methods: readonly ...[];
|
|
1033
|
+
}>[];
|
|
1034
|
+
guidance?: string;
|
|
1035
|
+
handlers: readonly "file.open"[];
|
|
1036
|
+
receives?: readonly "git.push"[];
|
|
1037
|
+
icon?: string;
|
|
1038
|
+
roles: readonly ("dashboard" | "inbox" | "files" | "media" | "sessions" | "terminal")[];
|
|
1039
|
+
storage?: readonly Readonly<{
|
|
1040
|
+
key: string;
|
|
1041
|
+
scopes: readonly ...[];
|
|
1042
|
+
maxBytes: number;
|
|
1043
|
+
}>[];
|
|
1044
|
+
commands?: readonly Readonly<{
|
|
1045
|
+
id: string;
|
|
1046
|
+
title: string;
|
|
1047
|
+
category: string;
|
|
1048
|
+
description?: ... | ...;
|
|
1049
|
+
sigil?: ... | ...;
|
|
1050
|
+
projections?: ... | ...;
|
|
1051
|
+
}>[];
|
|
1052
|
+
gills?: readonly Readonly<{
|
|
1053
|
+
id: string;
|
|
1054
|
+
source: string;
|
|
1055
|
+
title: string;
|
|
1056
|
+
params?: ... | ...;
|
|
1057
|
+
watch?: ... | ...;
|
|
1058
|
+
desktop?: ... | ...;
|
|
1059
|
+
}>[];
|
|
1060
|
+
backend?: Readonly<{
|
|
1061
|
+
bindings: readonly Readonly<...>[];
|
|
1062
|
+
sync?: Readonly<...>;
|
|
1063
|
+
}>;
|
|
1064
|
+
}>
|
|
1065
|
+
| null;
|
|
1066
|
+
ui: | Readonly<{
|
|
1067
|
+
kind: "html";
|
|
1068
|
+
artifactRef: ArtifactRef;
|
|
1069
|
+
digest: Sha256Digest;
|
|
1070
|
+
}>
|
|
1071
|
+
| Readonly<{
|
|
1072
|
+
kind: "assets";
|
|
1073
|
+
build: {
|
|
1074
|
+
format: "fungi-assets-v1";
|
|
1075
|
+
base: string;
|
|
1076
|
+
assets: readonly object[];
|
|
1077
|
+
};
|
|
1078
|
+
}>
|
|
1079
|
+
| null;
|
|
1080
|
+
backend: | Readonly<{
|
|
1081
|
+
artifactRef: ArtifactRef;
|
|
1082
|
+
digest: Sha256Digest;
|
|
1083
|
+
}>
|
|
1084
|
+
| null;
|
|
1085
|
+
}>>;
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1088
|
+
Read a Release root and verify every artifact it names: the UI document or asset
|
|
1089
|
+
build (and each asset object), and the backend descriptor.
|
|
1090
|
+
|
|
1091
|
+
#### Parameters
|
|
1092
|
+
|
|
1093
|
+
| Parameter | Type | Default value | Description |
|
|
1094
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
1095
|
+
| `store` | [`ArtifactStore`](#artifactstore) | `undefined` | - |
|
|
1096
|
+
| `release` | `Release` | `undefined` | - |
|
|
1097
|
+
| `policy` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} | `defaultAssetPolicy` | - |
|
|
1098
|
+
| `policy.maxManifestBytes` | `number` | `undefined` | - |
|
|
1099
|
+
| `policy.maxObjects` | `number` | `undefined` | - |
|
|
1100
|
+
| `policy.maxObjectBytes` | `number` | `undefined` | - |
|
|
1101
|
+
| `policy.maxTotalBytes` | `number` | `undefined` | - |
|
|
1102
|
+
| `readAssets` | `boolean` | `true` | Read and check every UI asset now. Serving can skip this: each asset is verified against its digest when it is read. |
|
|
1103
|
+
|
|
1104
|
+
#### Returns
|
|
1105
|
+
|
|
1106
|
+
`Promise`\<`Readonly`\<\{ `release`: `Release`; `build`: \| \{ `declaration?`:
|
|
1107
|
+
`Readonly`\<\{ `api?`: `Readonly`\<\{ `methods`: ...; `toolFamily?`: ...;
|
|
1108
|
+
`events?`: ...; \}\>; `displayName?`: `string`; `capabilities`: readonly ( \|
|
|
1109
|
+
`"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.toolPolicy"`
|
|
1110
|
+
\| `"agent.read"` \| `"agent.send"` \| `"computer.list"` \|
|
|
1111
|
+
`"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \|
|
|
1112
|
+
`"llm.generation"` \| `"media.generation"` \| `"games:servers"` \|
|
|
1113
|
+
`"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \|
|
|
1114
|
+
`"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \|
|
|
1115
|
+
`"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \|
|
|
1116
|
+
`"workflow.arm"` \| `"world"` \| `"channels.read"` \|
|
|
1117
|
+
`"channels.personal.manage"`)[]; `calls?`: readonly `Readonly`\<...\>[];
|
|
1118
|
+
`guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`:
|
|
1119
|
+
readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \|
|
|
1120
|
+
`"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[];
|
|
1121
|
+
`storage?`: readonly `Readonly`\<...\>[]; `commands?`: readonly
|
|
1122
|
+
`Readonly`\<...\>[]; `gills?`: readonly `Readonly`\<...\>[]; `backend?`:
|
|
1123
|
+
`Readonly`\<\{ `bindings`: ...; `sync?`: ...; \}\>; \}\>; `format`:
|
|
1124
|
+
`"fungi-app-v1"`; `ui`: \{ `mediaType`: `"text/html; charset=utf-8"` \|
|
|
1125
|
+
`"application/vnd.fungi.app-assets+json"`; `artifactRef`: `ArtifactRef`;
|
|
1126
|
+
`digest`: `Sha256Digest`; `version`: `string`; `byteLength`: `number`; \};
|
|
1127
|
+
`backend`: \{ `mediaType`: `"application/vnd.fungi.app-backend+json"`;
|
|
1128
|
+
`artifactRef`: `ArtifactRef`; `digest`: `Sha256Digest`; `version`: `string`;
|
|
1129
|
+
`byteLength`: `number`; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`:
|
|
1130
|
+
`Readonly`\<\{ `methods`: ...; `toolFamily?`: ...; `events?`: ...; \}\>;
|
|
1131
|
+
`displayName?`: `string`; `capabilities`: readonly ( \| `"agent.list"` \|
|
|
1132
|
+
`"agent.manage"` \| `"agent.rename"` \| `"agent.toolPolicy"` \| `"agent.read"`
|
|
1133
|
+
\| `"agent.send"` \| `"computer.list"` \| `"computer.readFile"` \|
|
|
1134
|
+
`"computer.writeFile"` \| `"computer.execute"` \| `"llm.generation"` \|
|
|
1135
|
+
`"media.generation"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"`
|
|
1136
|
+
\| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \|
|
|
1137
|
+
`"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \|
|
|
1138
|
+
`"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \|
|
|
1139
|
+
`"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly
|
|
1140
|
+
`Readonly`\<...\>[]; `guidance?`: `string`; `handlers`: readonly
|
|
1141
|
+
`"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`;
|
|
1142
|
+
`roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \|
|
|
1143
|
+
`"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<...\>[];
|
|
1144
|
+
`commands?`: readonly `Readonly`\<...\>[]; `gills?`: readonly
|
|
1145
|
+
`Readonly`\<...\>[]; `backend?`: `Readonly`\<\{ `bindings`: ...; `sync?`: ...;
|
|
1146
|
+
\}\>; \}\>; `format`: `"fungi-app-v1"`; `ui`: \{ `mediaType`:
|
|
1147
|
+
`"text/html; charset=utf-8"` \| `"application/vnd.fungi.app-assets+json"`;
|
|
1148
|
+
`artifactRef`: `ArtifactRef`; `digest`: `Sha256Digest`; `version`: `string`;
|
|
1149
|
+
`byteLength`: `number`; \}; \} \| \{ `declaration?`: `Readonly`\<\{ `api?`:
|
|
1150
|
+
`Readonly`\<\{ `methods`: ...; `toolFamily?`: ...; `events?`: ...; \}\>;
|
|
1151
|
+
`displayName?`: `string`; `capabilities`: readonly ( \| `"agent.list"` \|
|
|
1152
|
+
`"agent.manage"` \| `"agent.rename"` \| `"agent.toolPolicy"` \| `"agent.read"`
|
|
1153
|
+
\| `"agent.send"` \| `"computer.list"` \| `"computer.readFile"` \|
|
|
1154
|
+
`"computer.writeFile"` \| `"computer.execute"` \| `"llm.generation"` \|
|
|
1155
|
+
`"media.generation"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"`
|
|
1156
|
+
\| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \|
|
|
1157
|
+
`"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \|
|
|
1158
|
+
`"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \|
|
|
1159
|
+
`"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly
|
|
1160
|
+
`Readonly`\<...\>[]; `guidance?`: `string`; `handlers`: readonly
|
|
1161
|
+
`"file.open"`[]; `receives?`: readonly `"git.push"`[]; `icon?`: `string`;
|
|
1162
|
+
`roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \| `"media"` \|
|
|
1163
|
+
`"sessions"` \| `"terminal"`)[]; `storage?`: readonly `Readonly`\<...\>[];
|
|
1164
|
+
`commands?`: readonly `Readonly`\<...\>[]; `gills?`: readonly
|
|
1165
|
+
`Readonly`\<...\>[]; `backend?`: `Readonly`\<\{ `bindings`: ...; `sync?`: ...;
|
|
1166
|
+
\}\>; \}\>; `format`: `"fungi-app-v1"`; `backend`: \{ `mediaType`:
|
|
1167
|
+
`"application/vnd.fungi.app-backend+json"`; `artifactRef`: `ArtifactRef`;
|
|
1168
|
+
`digest`: `Sha256Digest`; `version`: `string`; `byteLength`: `number`; \}; \};
|
|
1169
|
+
`api`: \| `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`,
|
|
1170
|
+
`Readonly`\<\{ `description`: `string`; `input`: `object`; `output`: `object`;
|
|
1171
|
+
`effect`: ... \| ... \| ...; `requires`: readonly ...; `pending?`: ... \| ...;
|
|
1172
|
+
`hidden?`: ... \| ...; `anonymous?`: ... \| ...; \}\>\>\>; `toolFamily?`:
|
|
1173
|
+
`Readonly`\<\{ `name`: `string`; `list`: `string`; `call`: `string`; \}\>;
|
|
1174
|
+
`events?`: `Readonly`\<`Record`\<`string`, `Readonly`\<\{ `description`: ...;
|
|
1175
|
+
`payload`: ...; \}\>\>\>; \}\> \| `null`; `declaration`: \| `Readonly`\<\{
|
|
1176
|
+
`api?`: `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<..., ...\>\>;
|
|
1177
|
+
`toolFamily?`: `Readonly`\<...\>; `events?`: `Readonly`\<...\>; \}\>;
|
|
1178
|
+
`displayName?`: `string`; `capabilities`: readonly ( \| `"agent.list"` \|
|
|
1179
|
+
`"agent.manage"` \| `"agent.rename"` \| `"agent.toolPolicy"` \| `"agent.read"`
|
|
1180
|
+
\| `"agent.send"` \| `"computer.list"` \| `"computer.readFile"` \|
|
|
1181
|
+
`"computer.writeFile"` \| `"computer.execute"` \| `"llm.generation"` \|
|
|
1182
|
+
`"media.generation"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"`
|
|
1183
|
+
\| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \|
|
|
1184
|
+
`"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \|
|
|
1185
|
+
`"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \|
|
|
1186
|
+
`"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly
|
|
1187
|
+
`Readonly`\<\{ `appId`: `string`; `methods`: readonly ...[]; \}\>[];
|
|
1188
|
+
`guidance?`: `string`; `handlers`: readonly `"file.open"`[]; `receives?`:
|
|
1189
|
+
readonly `"git.push"`[]; `icon?`: `string`; `roles`: readonly (`"dashboard"` \|
|
|
1190
|
+
`"inbox"` \| `"files"` \| `"media"` \| `"sessions"` \| `"terminal"`)[];
|
|
1191
|
+
`storage?`: readonly `Readonly`\<\{ `key`: `string`; `scopes`: readonly ...[];
|
|
1192
|
+
`maxBytes`: `number`; \}\>[]; `commands?`: readonly `Readonly`\<\{ `id`:
|
|
1193
|
+
`string`; `title`: `string`; `category`: `string`; `description?`: ... \| ...;
|
|
1194
|
+
`sigil?`: ... \| ...; `projections?`: ... \| ...; \}\>[]; `gills?`: readonly
|
|
1195
|
+
`Readonly`\<\{ `id`: `string`; `source`: `string`; `title`: `string`; `params?`:
|
|
1196
|
+
... \| ...; `watch?`: ... \| ...; `desktop?`: ... \| ...; \}\>[]; `backend?`:
|
|
1197
|
+
`Readonly`\<\{ `bindings`: readonly `Readonly`\<...\>[]; `sync?`:
|
|
1198
|
+
`Readonly`\<...\>; \}\>; \}\> \| `null`; `ui`: \| `Readonly`\<\{ `kind`:
|
|
1199
|
+
`"html"`; `artifactRef`: `ArtifactRef`; `digest`: `Sha256Digest`; \}\> \|
|
|
1200
|
+
`Readonly`\<\{ `kind`: `"assets"`; `build`: \{ `format`: `"fungi-assets-v1"`;
|
|
1201
|
+
`base`: `string`; `assets`: readonly `object`[]; \}; \}\> \| `null`; `backend`:
|
|
1202
|
+
\| `Readonly`\<\{ `artifactRef`: `ArtifactRef`; `digest`: `Sha256Digest`; \}\>
|
|
1203
|
+
\| `null`; \}\>\>
|
|
1204
|
+
|
|
1205
|
+
---
|
|
1206
|
+
|
|
1207
|
+
### resolveBackend()
|
|
1208
|
+
|
|
1209
|
+
```ts
|
|
1210
|
+
function resolveBackend(store, release): Promise<
|
|
1211
|
+
| Readonly<{
|
|
1212
|
+
digest: Sha256Digest;
|
|
1213
|
+
backend: DurableBackend;
|
|
1214
|
+
declaration: | Readonly<{
|
|
1215
|
+
api?: Readonly<{
|
|
1216
|
+
methods: Readonly<...>;
|
|
1217
|
+
toolFamily?: ... | ...;
|
|
1218
|
+
events?: ... | ...;
|
|
1219
|
+
}>;
|
|
1220
|
+
displayName?: string;
|
|
1221
|
+
capabilities: readonly (
|
|
1222
|
+
| "agent.list"
|
|
1223
|
+
| "agent.manage"
|
|
1224
|
+
| "agent.rename"
|
|
1225
|
+
| "agent.toolPolicy"
|
|
1226
|
+
| "agent.read"
|
|
1227
|
+
| "agent.send"
|
|
1228
|
+
| "computer.list"
|
|
1229
|
+
| "computer.readFile"
|
|
1230
|
+
| "computer.writeFile"
|
|
1231
|
+
| "computer.execute"
|
|
1232
|
+
| "llm.generation"
|
|
1233
|
+
| "media.generation"
|
|
1234
|
+
| "games:servers"
|
|
1235
|
+
| "git.repository"
|
|
1236
|
+
| "apps.open"
|
|
1237
|
+
| "apps.call"
|
|
1238
|
+
| "app.storage"
|
|
1239
|
+
| "app.events.emit"
|
|
1240
|
+
| "team.workbenchHost"
|
|
1241
|
+
| "marketplace.browse"
|
|
1242
|
+
| "marketplace.purchase"
|
|
1243
|
+
| "workflow.run"
|
|
1244
|
+
| "workflow.publish"
|
|
1245
|
+
| "workflow.arm"
|
|
1246
|
+
| "world"
|
|
1247
|
+
| "channels.read"
|
|
1248
|
+
| "channels.personal.manage")[];
|
|
1249
|
+
calls?: readonly Readonly<{
|
|
1250
|
+
appId: ...;
|
|
1251
|
+
methods: ...;
|
|
1252
|
+
}>[];
|
|
1253
|
+
guidance?: string;
|
|
1254
|
+
handlers: readonly "file.open"[];
|
|
1255
|
+
receives?: readonly "git.push"[];
|
|
1256
|
+
icon?: string;
|
|
1257
|
+
roles: readonly ("dashboard" | "inbox" | "files" | "media" | "sessions" | "terminal")[];
|
|
1258
|
+
storage?: readonly Readonly<{
|
|
1259
|
+
key: ...;
|
|
1260
|
+
scopes: ...;
|
|
1261
|
+
maxBytes: ...;
|
|
1262
|
+
}>[];
|
|
1263
|
+
commands?: readonly Readonly<{
|
|
1264
|
+
id: ...;
|
|
1265
|
+
title: ...;
|
|
1266
|
+
category: ...;
|
|
1267
|
+
description?: ...;
|
|
1268
|
+
sigil?: ...;
|
|
1269
|
+
projections?: ...;
|
|
1270
|
+
}>[];
|
|
1271
|
+
gills?: readonly Readonly<{
|
|
1272
|
+
id: ...;
|
|
1273
|
+
source: ...;
|
|
1274
|
+
title: ...;
|
|
1275
|
+
params?: ...;
|
|
1276
|
+
watch?: ...;
|
|
1277
|
+
desktop?: ...;
|
|
1278
|
+
}>[];
|
|
1279
|
+
backend?: Readonly<{
|
|
1280
|
+
bindings: readonly ...[];
|
|
1281
|
+
sync?: ... | ...;
|
|
1282
|
+
}>;
|
|
1283
|
+
}>
|
|
1284
|
+
| null;
|
|
1285
|
+
}>
|
|
1286
|
+
| null>;
|
|
1287
|
+
```
|
|
1288
|
+
|
|
1289
|
+
Resolve a Release to its verified durable backend without reading its UI: the
|
|
1290
|
+
root artifact, then the backend descriptor it names.
|
|
1291
|
+
|
|
1292
|
+
#### Parameters
|
|
1293
|
+
|
|
1294
|
+
| Parameter | Type |
|
|
1295
|
+
| --------- | --------------------------------- |
|
|
1296
|
+
| `store` | [`ArtifactStore`](#artifactstore) |
|
|
1297
|
+
| `release` | `Release` |
|
|
1298
|
+
|
|
1299
|
+
#### Returns
|
|
1300
|
+
|
|
1301
|
+
`Promise`\< \| `Readonly`\<\{ `digest`: `Sha256Digest`; `backend`:
|
|
1302
|
+
`DurableBackend`; `declaration`: \| `Readonly`\<\{ `api?`: `Readonly`\<\{
|
|
1303
|
+
`methods`: `Readonly`\<...\>; `toolFamily?`: ... \| ...; `events?`: ... \| ...;
|
|
1304
|
+
\}\>; `displayName?`: `string`; `capabilities`: readonly ( \| `"agent.list"` \|
|
|
1305
|
+
`"agent.manage"` \| `"agent.rename"` \| `"agent.toolPolicy"` \| `"agent.read"`
|
|
1306
|
+
\| `"agent.send"` \| `"computer.list"` \| `"computer.readFile"` \|
|
|
1307
|
+
`"computer.writeFile"` \| `"computer.execute"` \| `"llm.generation"` \|
|
|
1308
|
+
`"media.generation"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"`
|
|
1309
|
+
\| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \|
|
|
1310
|
+
`"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \|
|
|
1311
|
+
`"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \|
|
|
1312
|
+
`"channels.read"` \| `"channels.personal.manage"`)[]; `calls?`: readonly
|
|
1313
|
+
`Readonly`\<\{ `appId`: ...; `methods`: ...; \}\>[]; `guidance?`: `string`;
|
|
1314
|
+
`handlers`: readonly `"file.open"`[]; `receives?`: readonly `"git.push"`[];
|
|
1315
|
+
`icon?`: `string`; `roles`: readonly (`"dashboard"` \| `"inbox"` \| `"files"` \|
|
|
1316
|
+
`"media"` \| `"sessions"` \| `"terminal"`)[]; `storage?`: readonly
|
|
1317
|
+
`Readonly`\<\{ `key`: ...; `scopes`: ...; `maxBytes`: ...; \}\>[]; `commands?`:
|
|
1318
|
+
readonly `Readonly`\<\{ `id`: ...; `title`: ...; `category`: ...;
|
|
1319
|
+
`description?`: ...; `sigil?`: ...; `projections?`: ...; \}\>[]; `gills?`:
|
|
1320
|
+
readonly `Readonly`\<\{ `id`: ...; `source`: ...; `title`: ...; `params?`: ...;
|
|
1321
|
+
`watch?`: ...; `desktop?`: ...; \}\>[]; `backend?`: `Readonly`\<\{ `bindings`:
|
|
1322
|
+
readonly ...[]; `sync?`: ... \| ...; \}\>; \}\> \| `null`; \}\> \| `null`\>
|
|
1323
|
+
|
|
1324
|
+
## References
|
|
1325
|
+
|
|
1326
|
+
### GuestLimits
|
|
1327
|
+
|
|
1328
|
+
Re-exports [GuestLimits](cloudflare.md#guestlimits)
|